@zapier/zapier-sdk 0.76.2 โ 0.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +7 -7
- package/dist/experimental.cjs +19 -30
- package/dist/experimental.d.mts +6 -6
- package/dist/experimental.d.ts +6 -6
- package/dist/experimental.mjs +19 -30
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +3 -9
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.js +17 -29
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts +3 -3
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.js +4 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.77.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 19303e0: `triggerWorkflow` (and `trigger-workflow`) now authenticates with Zapier credentials and runs the workflow as the authenticated account; triggering is limited to workflows that account can access. It now returns the trigger's `id`, `workflow_id`, and `created_at` on `data` (previously `{ workflow, status, body }`). The call is unchanged: pass the workflow id and optional `input`.
|
|
8
|
+
|
|
3
9
|
## 0.76.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1744,7 +1744,7 @@ const result = await zapier.runDurable({
|
|
|
1744
1744
|
|
|
1745
1745
|
#### `triggerWorkflow` ๐งช _experimental_
|
|
1746
1746
|
|
|
1747
|
-
Look up a workflow's trigger URL and fire it manually
|
|
1747
|
+
Look up a workflow's trigger URL and fire it manually, as the authenticated account.
|
|
1748
1748
|
|
|
1749
1749
|
**Parameters:**
|
|
1750
1750
|
|
|
@@ -1756,12 +1756,12 @@ Look up a workflow's trigger URL and fire it manually. The trigger endpoint is t
|
|
|
1756
1756
|
|
|
1757
1757
|
**Returns:** `Promise<WorkflowRunItem>`
|
|
1758
1758
|
|
|
1759
|
-
| Name
|
|
1760
|
-
|
|
|
1761
|
-
| `data`
|
|
1762
|
-
| โย โณย `
|
|
1763
|
-
| โย โณย `
|
|
1764
|
-
| โย โณย `
|
|
1759
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1760
|
+
| ----------------- | -------- | -------- | --------------- | ---------------------------------------- |
|
|
1761
|
+
| `data` | `object` | โ
| โ | |
|
|
1762
|
+
| โย โณย `id` | `string` | โ
| โ | Trigger ID (UUID) |
|
|
1763
|
+
| โย โณย `workflow_id` | `string` | โ
| โ | The workflow that was triggered (UUID) |
|
|
1764
|
+
| โย โณย `created_at` | `string` | โ
| โ | When the trigger was received (ISO-8601) |
|
|
1765
1765
|
|
|
1766
1766
|
**Example:**
|
|
1767
1767
|
|
package/dist/experimental.cjs
CHANGED
|
@@ -3403,7 +3403,7 @@ function parseApprovalReviewStreamPayload(parsed, toolNames) {
|
|
|
3403
3403
|
}
|
|
3404
3404
|
|
|
3405
3405
|
// src/sdk-version.ts
|
|
3406
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
3406
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.77.0" : void 0) || "unknown";
|
|
3407
3407
|
|
|
3408
3408
|
// src/utils/open-url.ts
|
|
3409
3409
|
var nodePrefix = "node:";
|
|
@@ -13099,14 +13099,12 @@ var TriggerWorkflowOptionsSchema = zod.z.object({
|
|
|
13099
13099
|
"JSON payload delivered as the trigger body. Sent as `application/json`; omit to fire with an empty body."
|
|
13100
13100
|
)
|
|
13101
13101
|
}).describe(
|
|
13102
|
-
"Look up a workflow's trigger URL and fire it manually
|
|
13102
|
+
"Look up a workflow's trigger URL and fire it manually, as the authenticated account."
|
|
13103
13103
|
);
|
|
13104
13104
|
var TriggerWorkflowResponseSchema = zod.z.object({
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
"Response body from the trigger endpoint. Parsed as JSON when the response body parses, otherwise returned as the raw response text."
|
|
13109
|
-
)
|
|
13105
|
+
id: zod.z.string().describe("Trigger ID (UUID)"),
|
|
13106
|
+
workflow_id: zod.z.string().describe("The workflow that was triggered (UUID)"),
|
|
13107
|
+
created_at: zod.z.string().describe("When the trigger was received (ISO-8601)")
|
|
13110
13108
|
});
|
|
13111
13109
|
|
|
13112
13110
|
// src/plugins/codeSubstrate/triggerWorkflow/index.ts
|
|
@@ -13128,32 +13126,23 @@ var triggerWorkflowPlugin = definePlugin(
|
|
|
13128
13126
|
}
|
|
13129
13127
|
);
|
|
13130
13128
|
const workflow = TriggerWorkflowLookupResponseSchema.parse(rawWorkflow);
|
|
13131
|
-
const
|
|
13132
|
-
const
|
|
13133
|
-
|
|
13134
|
-
headers: { "Content-Type": "application/json" },
|
|
13135
|
-
body: options.input === void 0 ? void 0 : JSON.stringify(options.input)
|
|
13136
|
-
});
|
|
13137
|
-
const text = await response.text().catch(() => "");
|
|
13138
|
-
let body = text;
|
|
13139
|
-
if (text) {
|
|
13140
|
-
try {
|
|
13141
|
-
body = JSON.parse(text);
|
|
13142
|
-
} catch {
|
|
13143
|
-
body = text;
|
|
13144
|
-
}
|
|
13145
|
-
}
|
|
13146
|
-
if (!response.ok) {
|
|
13129
|
+
const segments = new URL(workflow.trigger_url).pathname.split("/");
|
|
13130
|
+
const triggerToken = segments[segments.length - 1];
|
|
13131
|
+
if (!triggerToken) {
|
|
13147
13132
|
throw new ZapierApiError(
|
|
13148
|
-
`
|
|
13149
|
-
{ statusCode:
|
|
13133
|
+
`Workflow ${options.workflow} returned a malformed trigger_url`,
|
|
13134
|
+
{ statusCode: 0, response: workflow.trigger_url }
|
|
13150
13135
|
);
|
|
13151
13136
|
}
|
|
13152
|
-
const
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13137
|
+
const raw = await sdk2.context.api.post(
|
|
13138
|
+
`/durableworkflowzaps/api/v0/workflows/trigger/${encodeURIComponent(triggerToken)}`,
|
|
13139
|
+
options.input,
|
|
13140
|
+
{
|
|
13141
|
+
authRequired: true,
|
|
13142
|
+
resource: { type: "workflow", id: options.workflow }
|
|
13143
|
+
}
|
|
13144
|
+
);
|
|
13145
|
+
const data = TriggerWorkflowResponseSchema.parse(raw);
|
|
13157
13146
|
return { data };
|
|
13158
13147
|
}
|
|
13159
13148
|
})
|
package/dist/experimental.d.mts
CHANGED
|
@@ -3162,9 +3162,9 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
3162
3162
|
input?: unknown;
|
|
3163
3163
|
} | undefined) => Promise<{
|
|
3164
3164
|
data: {
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3165
|
+
id: string;
|
|
3166
|
+
workflow_id: string;
|
|
3167
|
+
created_at: string;
|
|
3168
3168
|
};
|
|
3169
3169
|
}>;
|
|
3170
3170
|
} & {
|
|
@@ -6365,9 +6365,9 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
6365
6365
|
input?: unknown;
|
|
6366
6366
|
} | undefined) => Promise<{
|
|
6367
6367
|
data: {
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6368
|
+
id: string;
|
|
6369
|
+
workflow_id: string;
|
|
6370
|
+
created_at: string;
|
|
6371
6371
|
};
|
|
6372
6372
|
}>;
|
|
6373
6373
|
} & {
|
package/dist/experimental.d.ts
CHANGED
|
@@ -3177,9 +3177,9 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
3177
3177
|
input?: unknown;
|
|
3178
3178
|
} | undefined) => Promise<{
|
|
3179
3179
|
data: {
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3180
|
+
id: string;
|
|
3181
|
+
workflow_id: string;
|
|
3182
|
+
created_at: string;
|
|
3183
3183
|
};
|
|
3184
3184
|
}>;
|
|
3185
3185
|
} & {
|
|
@@ -6380,9 +6380,9 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
6380
6380
|
input?: unknown;
|
|
6381
6381
|
} | undefined) => Promise<{
|
|
6382
6382
|
data: {
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6383
|
+
id: string;
|
|
6384
|
+
workflow_id: string;
|
|
6385
|
+
created_at: string;
|
|
6386
6386
|
};
|
|
6387
6387
|
}>;
|
|
6388
6388
|
} & {
|
package/dist/experimental.mjs
CHANGED
|
@@ -3401,7 +3401,7 @@ function parseApprovalReviewStreamPayload(parsed, toolNames) {
|
|
|
3401
3401
|
}
|
|
3402
3402
|
|
|
3403
3403
|
// src/sdk-version.ts
|
|
3404
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
3404
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.77.0" : void 0) || "unknown";
|
|
3405
3405
|
|
|
3406
3406
|
// src/utils/open-url.ts
|
|
3407
3407
|
var nodePrefix = "node:";
|
|
@@ -13097,14 +13097,12 @@ var TriggerWorkflowOptionsSchema = z.object({
|
|
|
13097
13097
|
"JSON payload delivered as the trigger body. Sent as `application/json`; omit to fire with an empty body."
|
|
13098
13098
|
)
|
|
13099
13099
|
}).describe(
|
|
13100
|
-
"Look up a workflow's trigger URL and fire it manually
|
|
13100
|
+
"Look up a workflow's trigger URL and fire it manually, as the authenticated account."
|
|
13101
13101
|
);
|
|
13102
13102
|
var TriggerWorkflowResponseSchema = z.object({
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
"Response body from the trigger endpoint. Parsed as JSON when the response body parses, otherwise returned as the raw response text."
|
|
13107
|
-
)
|
|
13103
|
+
id: z.string().describe("Trigger ID (UUID)"),
|
|
13104
|
+
workflow_id: z.string().describe("The workflow that was triggered (UUID)"),
|
|
13105
|
+
created_at: z.string().describe("When the trigger was received (ISO-8601)")
|
|
13108
13106
|
});
|
|
13109
13107
|
|
|
13110
13108
|
// src/plugins/codeSubstrate/triggerWorkflow/index.ts
|
|
@@ -13126,32 +13124,23 @@ var triggerWorkflowPlugin = definePlugin(
|
|
|
13126
13124
|
}
|
|
13127
13125
|
);
|
|
13128
13126
|
const workflow = TriggerWorkflowLookupResponseSchema.parse(rawWorkflow);
|
|
13129
|
-
const
|
|
13130
|
-
const
|
|
13131
|
-
|
|
13132
|
-
headers: { "Content-Type": "application/json" },
|
|
13133
|
-
body: options.input === void 0 ? void 0 : JSON.stringify(options.input)
|
|
13134
|
-
});
|
|
13135
|
-
const text = await response.text().catch(() => "");
|
|
13136
|
-
let body = text;
|
|
13137
|
-
if (text) {
|
|
13138
|
-
try {
|
|
13139
|
-
body = JSON.parse(text);
|
|
13140
|
-
} catch {
|
|
13141
|
-
body = text;
|
|
13142
|
-
}
|
|
13143
|
-
}
|
|
13144
|
-
if (!response.ok) {
|
|
13127
|
+
const segments = new URL(workflow.trigger_url).pathname.split("/");
|
|
13128
|
+
const triggerToken = segments[segments.length - 1];
|
|
13129
|
+
if (!triggerToken) {
|
|
13145
13130
|
throw new ZapierApiError(
|
|
13146
|
-
`
|
|
13147
|
-
{ statusCode:
|
|
13131
|
+
`Workflow ${options.workflow} returned a malformed trigger_url`,
|
|
13132
|
+
{ statusCode: 0, response: workflow.trigger_url }
|
|
13148
13133
|
);
|
|
13149
13134
|
}
|
|
13150
|
-
const
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13135
|
+
const raw = await sdk2.context.api.post(
|
|
13136
|
+
`/durableworkflowzaps/api/v0/workflows/trigger/${encodeURIComponent(triggerToken)}`,
|
|
13137
|
+
options.input,
|
|
13138
|
+
{
|
|
13139
|
+
authRequired: true,
|
|
13140
|
+
resource: { type: "workflow", id: options.workflow }
|
|
13141
|
+
}
|
|
13142
|
+
);
|
|
13143
|
+
const data = TriggerWorkflowResponseSchema.parse(raw);
|
|
13155
13144
|
return { data };
|
|
13156
13145
|
}
|
|
13157
13146
|
})
|
package/dist/index.cjs
CHANGED
|
@@ -6996,7 +6996,7 @@ function parseApprovalReviewStreamPayload(parsed, toolNames) {
|
|
|
6996
6996
|
}
|
|
6997
6997
|
|
|
6998
6998
|
// src/sdk-version.ts
|
|
6999
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6999
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.77.0" : void 0) || "unknown";
|
|
7000
7000
|
|
|
7001
7001
|
// src/utils/open-url.ts
|
|
7002
7002
|
var nodePrefix = "node:";
|
package/dist/index.mjs
CHANGED
|
@@ -6994,7 +6994,7 @@ function parseApprovalReviewStreamPayload(parsed, toolNames) {
|
|
|
6994
6994
|
}
|
|
6995
6995
|
|
|
6996
6996
|
// src/sdk-version.ts
|
|
6997
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6997
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.77.0" : void 0) || "unknown";
|
|
6998
6998
|
|
|
6999
6999
|
// src/utils/open-url.ts
|
|
7000
7000
|
var nodePrefix = "node:";
|
|
@@ -52,12 +52,6 @@ export declare const triggerWorkflowPlugin: (sdk: {
|
|
|
52
52
|
listWorkflows: import("kitcore").PluginMeta<unknown>;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
-
} & {
|
|
56
|
-
context: {
|
|
57
|
-
options: {
|
|
58
|
-
fetch?: typeof globalThis.fetch;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
55
|
} & {
|
|
62
56
|
context: {
|
|
63
57
|
meta: Record<string, import("kitcore").PluginMeta>;
|
|
@@ -68,9 +62,9 @@ export declare const triggerWorkflowPlugin: (sdk: {
|
|
|
68
62
|
input?: unknown;
|
|
69
63
|
} | undefined) => Promise<{
|
|
70
64
|
data: {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
id: string;
|
|
66
|
+
workflow_id: string;
|
|
67
|
+
created_at: string;
|
|
74
68
|
};
|
|
75
69
|
}>;
|
|
76
70
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/triggerWorkflow/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/triggerWorkflow/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -12,41 +12,29 @@ export const triggerWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sd
|
|
|
12
12
|
outputSchema: TriggerWorkflowResponseSchema,
|
|
13
13
|
resolvers: { workflow: workflowIdResolver },
|
|
14
14
|
handler: async ({ sdk, options }) => {
|
|
15
|
-
// Two-step: get the workflow's trigger_url
|
|
16
|
-
//
|
|
17
|
-
// auth header โ the URL itself embeds a secret token. Custom
|
|
18
|
-
// fetch (e.g. tests) flows through sdk.context.options.fetch.
|
|
15
|
+
// Two-step: get the workflow's trigger_url, then fire it. Both go
|
|
16
|
+
// through the authenticated api client.
|
|
19
17
|
const rawWorkflow = await sdk.context.api.get(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`, {
|
|
20
18
|
authRequired: true,
|
|
21
19
|
resource: { type: "workflow", id: options.workflow },
|
|
22
20
|
});
|
|
23
21
|
const workflow = TriggerWorkflowLookupResponseSchema.parse(rawWorkflow);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
const text = await response.text().catch(() => "");
|
|
33
|
-
let body = text;
|
|
34
|
-
if (text) {
|
|
35
|
-
try {
|
|
36
|
-
body = JSON.parse(text);
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
body = text;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (!response.ok) {
|
|
43
|
-
throw new ZapierApiError(`Trigger failed: ${response.status} ${response.statusText}: ${text || "(empty body)"}`, { statusCode: response.status, response: body });
|
|
22
|
+
// trigger_url is an absolute URL. Take only the token (its last path
|
|
23
|
+
// segment) and rebuild the gateway path so the call routes through the
|
|
24
|
+
// authenticated proxy, the same as every other call here.
|
|
25
|
+
const segments = new URL(workflow.trigger_url).pathname.split("/");
|
|
26
|
+
const triggerToken = segments[segments.length - 1];
|
|
27
|
+
if (!triggerToken) {
|
|
28
|
+
throw new ZapierApiError(`Workflow ${options.workflow} returned a malformed trigger_url`, { statusCode: 0, response: workflow.trigger_url });
|
|
44
29
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
30
|
+
// Fire the trigger through the authenticated api client and return its
|
|
31
|
+
// response directly, the same as every other code-substrate method.
|
|
32
|
+
// api.post throws the SDK's typed errors on non-2xx.
|
|
33
|
+
const raw = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/trigger/${encodeURIComponent(triggerToken)}`, options.input, {
|
|
34
|
+
authRequired: true,
|
|
35
|
+
resource: { type: "workflow", id: options.workflow },
|
|
36
|
+
});
|
|
37
|
+
const data = TriggerWorkflowResponseSchema.parse(raw);
|
|
50
38
|
return { data };
|
|
51
39
|
},
|
|
52
40
|
}));
|
|
@@ -8,9 +8,9 @@ export declare const TriggerWorkflowOptionsSchema: z.ZodObject<{
|
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export type TriggerWorkflowOptions = z.infer<typeof TriggerWorkflowOptionsSchema>;
|
|
10
10
|
export declare const TriggerWorkflowResponseSchema: z.ZodObject<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
workflow_id: z.ZodString;
|
|
13
|
+
created_at: z.ZodString;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
export type TriggerWorkflowResponse = z.infer<typeof TriggerWorkflowResponseSchema>;
|
|
16
16
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/triggerWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,mCAAmC;;iBAIhC,CAAC;AAEjB,eAAO,MAAM,4BAA4B;;;iBAYtC,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/triggerWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,mCAAmC;;iBAIhC,CAAC;AAEjB,eAAO,MAAM,4BAA4B;;;iBAYtC,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
|
|
@@ -18,14 +18,9 @@ export const TriggerWorkflowOptionsSchema = z
|
|
|
18
18
|
.optional()
|
|
19
19
|
.describe("JSON payload delivered as the trigger body. Sent as `application/json`; omit to fire with an empty body."),
|
|
20
20
|
})
|
|
21
|
-
.describe("Look up a workflow's trigger URL and fire it manually
|
|
21
|
+
.describe("Look up a workflow's trigger URL and fire it manually, as the authenticated account.");
|
|
22
22
|
export const TriggerWorkflowResponseSchema = z.object({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.int()
|
|
27
|
-
.describe("HTTP status returned by the trigger endpoint"),
|
|
28
|
-
body: z
|
|
29
|
-
.unknown()
|
|
30
|
-
.describe("Response body from the trigger endpoint. Parsed as JSON when the response body parses, otherwise returned as the raw response text."),
|
|
23
|
+
id: z.string().describe("Trigger ID (UUID)"),
|
|
24
|
+
workflow_id: z.string().describe("The workflow that was triggered (UUID)"),
|
|
25
|
+
created_at: z.string().describe("When the trigger was received (ISO-8601)"),
|
|
31
26
|
});
|