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
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ MAKE_ORGANIZATION="12345"
# Numeric team ID (used by most integration tests, e.g. scenarios, connections, executions)
MAKE_TEAM="12345"

# Dedicated non-confidential scheduled webhook whose inactive scenario leaves deliveries queued;
# token needs hooks:read + hooks:write
MAKE_HOOK_INCOMINGS_HOOK_ID=""
MAKE_HOOK_INCOMINGS_WEBHOOK_URL=""

# Existing SDK app name for SDK integration tests; if unset, a temporary app is created and deleted
MAKE_APP_NAME=""

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const make = new Make('your-api-key', 'eu2.make.com', {
- **Scenario Labels** - Team-scoped tags assignable to scenarios
- **Functions** - Custom JavaScript functions for scenarios
- **Hooks** - Webhooks and mailhooks for external integrations
- **Hook Incoming Queue** - Inspect and clear items queued for a webhook awaiting processing
- **Incomplete Executions** - Failed or incomplete scenario runs
- **Keys** - API keys and secrets
- **On-Prem Agents** - On-prem bridge agents running on customer infrastructure
Expand Down Expand Up @@ -212,6 +213,7 @@ All tools are organized into the following categories:
- `folders`
- `functions`
- `hooks`
- `hook-incomings`
- `incomplete-executions`
- `keys`
- `scenario-labels`
Expand Down Expand Up @@ -287,6 +289,17 @@ MAKE_TEAM="<team-id>"
MAKE_ORGANIZATION="<organization-id>"
```

Required only for Hook Incoming Queue integration tests:

```
MAKE_HOOK_INCOMINGS_HOOK_ID="<dedicated-hook-id>"
MAKE_HOOK_INCOMINGS_WEBHOOK_URL="<dedicated-webhook-url>"
```

Use a dedicated non-confidential scheduled webhook whose scenario is inactive so deliveries remain queued. The API
token needs `hooks:read` and `hooks:write`; the tests preserve pre-existing queue items and never create or delete the
hook.

Required for connected-system **create** integration (field names from `getAppConfig`):

```
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.6.14",
"version": "1.6.15",
"description": "Make TypeScript SDK",
"license": "MIT",
"author": "Make",
Expand Down
196 changes: 196 additions & 0 deletions src/endpoints/hook-incomings.tools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
import type { Make } from '../make.js';
import type { MakeTool } from '../tools.js';
import type { DeleteHookIncomingsOptions, ListHookIncomingsOptions } from './hook-incomings.js';

export const tools: MakeTool[] = [
{
name: 'hook-incomings_list',
title: 'List webhook queue items',
description:
"List items currently waiting in a webhook's processing queue — payloads the webhook received but hasn't handed off to a scenario yet (e.g. because the scenario isn't active).",
category: 'hook-incomings',
scope: 'hooks:read',
scopeId: 'hookId',
identifier: 'hookId',
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: false,
},
inputSchema: {
type: 'object',
properties: {
hookId: { type: 'number', description: 'The hook ID to list queued items for' },
from: {
type: 'integer',
description: 'Only include items queued at or after this Unix timestamp (ms)',
},
to: {
type: 'integer',
description: 'Only include items queued at or before this Unix timestamp (ms)',
},
pg: {
type: 'object',
description: 'Pagination and sorting options',
properties: {
sortBy: {
type: 'string',
enum: ['created'],
description: 'Sort queue items by their creation time',
},
sortDir: {
type: 'string',
enum: ['asc', 'desc'],
description: 'Sort direction',
},
offset: { type: 'integer', minimum: 0, description: 'Number of items to skip' },
limit: {
type: 'integer',
minimum: 1,
maximum: 10_000,
description: 'Maximum number of items to return (up to 10,000)',
},
},
additionalProperties: false,
},
},
required: ['hookId'],
},
examples: [{ hookId: 11 }],
execute: async (
make: Make,
args: { hookId: number; from?: number; to?: number; pg?: ListHookIncomingsOptions['pg'] },
) => {
return await make.hooks.incomings.list(args.hookId, {
from: args.from,
to: args.to,
pg: args.pg,
});
},
},
{
name: 'hook-incomings_stats',
title: 'Get webhook queue stats',
description: "Get the current size and limit of a webhook's processing queue.",
category: 'hook-incomings',
scope: 'hooks:read',
scopeId: 'hookId',
identifier: 'hookId',
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: false,
},
inputSchema: {
type: 'object',
properties: {
hookId: { type: 'number', description: 'The hook ID to get queue stats for' },
},
required: ['hookId'],
},
examples: [{ hookId: 11 }],
execute: async (make: Make, args: { hookId: number }) => {
return await make.hooks.incomings.stats(args.hookId);
},
},
{
name: 'hook-incomings_get',
title: 'Get webhook queue item detail',
description:
'Get the full detail of a single queued item, including its payload when available. Confidential hooks omit payload data.',
category: 'hook-incomings',
scope: 'hooks:read',
scopeId: 'hookId',
identifier: 'hookId',
resourceId: 'incomingId',
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: false,
},
inputSchema: {
type: 'object',
properties: {
hookId: { type: 'number', description: 'The hook ID the queue item belongs to' },
incomingId: {
type: 'string',
pattern: '^[0-9a-f]{32}$',
description: 'The 32-character lowercase hexadecimal ID of the queue item to retrieve',
},
},
required: ['hookId', 'incomingId'],
},
examples: [{ hookId: 11, incomingId: '7a567f385d1a4f5ab7bff89162b7605e' }],
execute: async (make: Make, args: { hookId: number; incomingId: string }) => {
return await make.hooks.incomings.get(args.hookId, args.incomingId);
},
},
{
name: 'hook-incomings_delete',
title: 'Delete webhook queue items',
description:
"Delete items from a webhook's processing queue. Specify `ids` to delete specific items, or `all: true` (with `confirmed: true`) to clear the entire queue. An item currently being processed cannot be deleted.",
category: 'hook-incomings',
scope: 'hooks:write',
scopeId: 'hookId',
identifier: 'hookId',
annotations: {
readOnlyHint: false,
destructiveHint: true,
openWorldHint: false,
},
inputSchema: {
type: 'object',
properties: {
hookId: { type: 'number', description: 'The hook ID to delete queue items for' },
ids: {
type: 'array',
items: { type: 'string' },
minItems: 1,
description: 'IDs of the queue items to delete',
},
exceptIds: {
type: 'array',
items: { type: 'string' },
description: 'When used with `all`, IDs of queue items to keep instead of deleting',
},
all: { type: 'boolean', description: 'Delete every item in the queue' },
confirmed: {
type: 'boolean',
description: 'Required (and must be `true`) when `all` is used, to confirm the bulk deletion',
},
},
required: ['hookId'],
oneOf: [
{
type: 'object',
properties: {
hookId: { type: 'number' },
ids: { type: 'array', items: { type: 'string' }, minItems: 1 },
},
required: ['ids'],
additionalProperties: false,
},
{
type: 'object',
properties: {
hookId: { type: 'number' },
exceptIds: { type: 'array', items: { type: 'string' } },
all: { type: 'boolean', const: true },
confirmed: { type: 'boolean', const: true },
},
required: ['all', 'confirmed'],
additionalProperties: false,
},
],
},
examples: [
{ hookId: 11, ids: ['d1efa5318a034d36ad7cbeac543573cf'] },
{ hookId: 11, all: true, confirmed: true },
],
execute: async (make: Make, args: { hookId: number } & DeleteHookIncomingsOptions) => {
const { hookId, ...options } = args;
return await make.hooks.incomings.delete(hookId, options);
},
},
];
Loading