Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default tseslint.config(
},
{
// enable jest rules on test files
files: ['**/*.test.ts'],
files: ['**/*.test.ts', '**/*.spec.ts'],
extends: [jestPlugin.configs['flat/recommended']],
rules: {
'jest/no-standalone-expect': ['error', { additionalTestBlockFunctions: ['itif'] }],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@makehq/sdk",
"version": "1.3.0",
"version": "1.4.0",
"description": "Make TypeScript SDK",
"license": "MIT",
"author": "Make",
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/connections.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../make.js';
import type { JSONValue } from '../types.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'connections_list',
title: 'List connections',
Expand Down
10 changes: 6 additions & 4 deletions src/endpoints/credential-requests.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'credential-requests_list',
title: 'List credential requests',
Expand All @@ -19,7 +20,7 @@ export const tools = [
teamId: { type: 'number', description: 'Filter by team ID' },
userId: { type: 'number', description: 'Filter by user ID' },
makeProviderId: {
type: ['string', 'number'],
oneOf: [{ type: 'string' }, { type: 'number' }],
description: 'Filter by Make provider ID',
},
status: { type: 'string', description: 'Filter by status' },
Expand Down Expand Up @@ -465,8 +466,9 @@ export const tools = [
'For custom/SDK apps, prefix the app name with `app#` (e.g. `app#my-custom-app`).',
category: 'credential-requests',
scope: 'apps:read',
scopeId: 'appName',
identifier: 'appName',
scopeId: undefined,
identifier: undefined,
resourceId: 'appName',
annotations: {
readOnlyHint: true,
},
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/data-store-records.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../make.js';
import type { JSONValue } from '../types.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'data-store-records_list',
title: 'List data store records',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/data-stores.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'data-stores_list',
title: 'List data stores',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/data-structures.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../make.js';
import type { DataStructureField } from './data-structures.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'data-structures_list',
title: 'List data structures',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/devices.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'devices_list',
title: 'List devices',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/enums.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'enums_countries',
title: 'List countries',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/executions.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'executions_list',
title: 'List executions',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/folders.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'folders_list',
title: 'List folders',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/functions.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'functions_list',
title: 'List functions',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/hooks.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../make.js';
import type { JSONValue } from '../types.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'hooks_list',
title: 'List webhooks/mailhooks',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/incomplete-executions.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'incomplete-executions_list',
title: 'List incomplete executions',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/keys.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../make.js';
import type { JSONValue } from '../types.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'keys_list',
title: 'List keys',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/organizations.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'organizations_list',
title: 'List organizations',
Expand Down
4 changes: 2 additions & 2 deletions src/endpoints/organizations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FetchFunction, Pagination, PickColumns } from '../types.js';
import type { FetchFunction, JSONValue, Pagination, PickColumns } from '../types.js';

/**
* Represents an organization in Make.
Expand Down Expand Up @@ -131,7 +131,7 @@ export type Organization = {
/** Unused transfer */
unusedTransfer: string;
/** Organization features */
features: Record<string, unknown>;
features: Record<string, JSONValue>;
/** External ID for white label instances */
externalId: string;
/** Number of active apps */
Expand Down
10 changes: 6 additions & 4 deletions src/endpoints/public-templates.tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const tools = [
'Search and list public (approved) templates available for anyone. Supports name-based search for template discovery. Results are sorted by usage by default.',
category: 'public-templates',
scope: 'templates:read',
scopeId: undefined,
identifier: undefined,
annotations: {
Comment on lines 9 to 13
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is now being updated, but unlike the other *.tools.ts modules it still exports an untyped tools array (no MakeTool[] annotation). That makes it easier for tool objects here to drift from the MakeTool contract without TypeScript catching it. Consider importing MakeTool and declaring export const tools: MakeTool[] = [...] for consistency with the rest of src/endpoints/*/*.tools.ts.

Copilot uses AI. Check for mistakes.
readOnlyHint: true,
},
Expand Down Expand Up @@ -38,8 +40,8 @@ export const tools = [
'Get details of a public template by its URL slug (e.g. "12289-add-webhook-data-to-a-google-sheet"). Use this for templates discovered via public-templates_list.',
category: 'public-templates',
scope: 'templates:read',
scopeId: 'templateUrl',
identifier: 'templateUrl',
scopeId: undefined,
identifier: undefined,
resourceId: 'templateUrl',
annotations: {
readOnlyHint: true,
Expand Down Expand Up @@ -67,8 +69,8 @@ export const tools = [
'Get the full blueprint of a public template including scenario flow, controller configuration, scheduling, and metadata. Use this for templates discovered via public-templates_list.',
category: 'public-templates',
scope: 'templates:read',
scopeId: 'templateUrl',
identifier: 'templateUrl',
scopeId: undefined,
identifier: undefined,
resourceId: 'templateUrl',
annotations: {
readOnlyHint: true,
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/scenarios.tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import type { Blueprint, DataStructureField } from '../index.js';
import type { Make } from '../make.js';
import type { JSONValue } from '../types.js';
import type { Scheduling } from './scenarios.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'scenarios_list',
title: 'List scenarios',
Expand Down
4 changes: 2 additions & 2 deletions src/endpoints/scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export type Scenario = {
/** Data transfer consumed in the current period */
transfer: number;
/** Custom properties defined for the scenario */
customProperties?: Record<string, unknown>;
customProperties?: Record<string, JSONValue>;
};

export type Scheduling = {
Expand Down Expand Up @@ -168,7 +168,7 @@ export type RunScenarioResponse = {
/** Status of the scenario execution when run in responsive mode (1 = successful, 2 = successful with warnings, 3 = failed) */
status?: 1 | 2 | 3;
/** Output data from the scenario execution (when run in responsive mode) */
outputs: unknown;
outputs?: JSONValue;
};

/**
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/sdk/apps.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../../make.js';
import type { JSONValue } from '../../types.js';
import type { MakeTool } from '../../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'sdk-apps_list',
title: 'List SDK apps',
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/sdk/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type SDKApp = {
/** The manifest version */
manifestVersion: number;
/** Stack of changes made to the app */
changes?: unknown[];
changes?: Record<string, JSONValue>[];
};

/**
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/sdk/connections.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../../make.js';
import type { JSONValue } from '../../types.js';
import type { MakeTool } from '../../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'sdk-connections_list',
title: 'List SDK connections',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/sdk/functions.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../../make.js';
import type { MakeTool } from '../../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'sdk-functions_list',
title: 'List SDK functions',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/sdk/modules.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../../make.js';
import type { MakeTool } from '../../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'sdk-modules_list',
title: 'List SDK modules',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/sdk/rpcs.tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Make } from '../../make.js';
import type { JSONValue } from '../../types.js';
import type { MakeTool } from '../../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'sdk-rpcs_list',
title: 'List SDK RPCs',
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/sdk/rpcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class SDKRPCs {
* Test an RPC with provided data and schema
* @returns The test result
*/
async test(appName: string, appVersion: number, rpcName: string, body: TestSDKRPCBody): Promise<unknown> {
async test(appName: string, appVersion: number, rpcName: string, body: TestSDKRPCBody): Promise<JSONValue> {
return await this.#fetch(`/sdk/apps/${appName}/${appVersion}/rpcs/${rpcName}`, {
method: 'POST',
body,
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/sdk/webhooks.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../../make.js';
import type { MakeTool } from '../../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'sdk-webhooks_list',
title: 'List SDK webhooks',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/teams.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'teams_list',
title: 'List teams',
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/users.tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';

export const tools = [
export const tools: MakeTool[] = [
{
name: 'users_me',
title: 'Get current user',
Expand Down
4 changes: 3 additions & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export type JSONSchema = {
type?: 'object' | 'string' | 'number' | 'boolean' | 'array' | 'null';
/** Properties definition for object types */
properties?: Record<string, JSONSchema>;
/** Schemas for properties whose names match a regex pattern (object types) */
patternProperties?: Record<string, JSONSchema>;
/** Required property names for object types */
required?: string[];
/** Items schema for array types */
Expand Down Expand Up @@ -177,7 +179,7 @@ export type MakeTool = {
* @param args The input arguments matching the inputSchema
* @returns Promise resolving to the operation result
*/
execute: (make: Make, args?: Record<string, JSONValue>) => Promise<JSONValue>;
execute(make: Make, args: Record<string, JSONValue>): Promise<JSONValue>;
};
Comment on lines 181 to 183
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing MakeTool.execute to require args is a breaking API change for any tool runner that previously called execute(make) for tools with empty inputSchema (and it forces callers to always pass an object even when no args exist). If backward compatibility is desired, consider keeping args optional (or giving it a default {}) while still allowing tools with required inputs to enforce required keys via their own arg types.

Copilot uses AI. Check for mistakes.

/**
Expand Down
Loading