@zapier/zapier-sdk 0.62.0 → 0.64.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 +12 -0
- package/README.md +185 -0
- package/dist/experimental.cjs +310 -2
- package/dist/experimental.d.mts +114 -2
- package/dist/experimental.d.ts +112 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +10 -0
- package/dist/experimental.mjs +310 -3
- package/dist/{index-3fBEDEsp.d.mts → index-Bfvj0KLi.d.mts} +15 -1
- package/dist/{index-3fBEDEsp.d.ts → index-Bfvj0KLi.d.ts} +15 -1
- package/dist/index.cjs +22 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +22 -2
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +40 -0
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +27 -0
- package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.d.ts +11 -0
- package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.js +12 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +46 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.js +25 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts +17 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.js +25 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +49 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.js +34 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts +37 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.js +48 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +49 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +33 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +20 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +42 -0
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts +53 -0
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/runDurable/index.js +36 -0
- package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts +24 -0
- package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/runDurable/schemas.js +61 -0
- package/dist/resolvers/index.d.ts +1 -0
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -0
- package/dist/resolvers/workflowVersionId.d.ts +6 -0
- package/dist/resolvers/workflowVersionId.d.ts.map +1 -0
- package/dist/resolvers/workflowVersionId.js +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const runDurablePlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../..").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
runDurable: (options?: {
|
|
25
|
+
source_files: Record<string, string>;
|
|
26
|
+
input?: unknown;
|
|
27
|
+
dependencies?: Record<string, string> | undefined;
|
|
28
|
+
zapier_durable_version?: string | undefined;
|
|
29
|
+
connections?: Record<string, {
|
|
30
|
+
connection_id: string | number;
|
|
31
|
+
}> | undefined;
|
|
32
|
+
app_versions?: Record<string, {
|
|
33
|
+
implementation_name: string;
|
|
34
|
+
version?: string | undefined;
|
|
35
|
+
}> | undefined;
|
|
36
|
+
private?: boolean | undefined;
|
|
37
|
+
} | undefined) => Promise<{
|
|
38
|
+
data: {
|
|
39
|
+
id: string;
|
|
40
|
+
status: "initialized";
|
|
41
|
+
is_private: boolean;
|
|
42
|
+
created_at: string;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
} & {
|
|
46
|
+
context: {
|
|
47
|
+
meta: {
|
|
48
|
+
runDurable: import("../../..").PluginMeta;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type RunDurablePluginProvides = ReturnType<typeof runDurablePlugin>;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC5B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { definePlugin, createPluginMethod } from "../../../utils/plugin-utils";
|
|
2
|
+
import { codeSubstrateDefaults } from "../shared";
|
|
3
|
+
import { RunDurableOptionsSchema, RunDurableResponseSchema, } from "./schemas";
|
|
4
|
+
export const runDurablePlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
5
|
+
...codeSubstrateDefaults,
|
|
6
|
+
name: "runDurable",
|
|
7
|
+
type: "create",
|
|
8
|
+
itemType: "DurableRun",
|
|
9
|
+
inputSchema: RunDurableOptionsSchema,
|
|
10
|
+
outputSchema: RunDurableResponseSchema,
|
|
11
|
+
handler: async ({ sdk, options }) => {
|
|
12
|
+
const body = {
|
|
13
|
+
source_files: options.source_files,
|
|
14
|
+
};
|
|
15
|
+
if (options.input !== undefined) {
|
|
16
|
+
body.input = options.input;
|
|
17
|
+
}
|
|
18
|
+
if (options.dependencies !== undefined) {
|
|
19
|
+
body.dependencies = options.dependencies;
|
|
20
|
+
}
|
|
21
|
+
if (options.zapier_durable_version !== undefined) {
|
|
22
|
+
body.zapier_durable_version = options.zapier_durable_version;
|
|
23
|
+
}
|
|
24
|
+
if (options.connections !== undefined) {
|
|
25
|
+
body.connections = options.connections;
|
|
26
|
+
}
|
|
27
|
+
if (options.app_versions !== undefined) {
|
|
28
|
+
body.app_versions = options.app_versions;
|
|
29
|
+
}
|
|
30
|
+
if (options.private !== undefined) {
|
|
31
|
+
body.is_private = options.private;
|
|
32
|
+
}
|
|
33
|
+
const data = await sdk.context.api.post("/sdkdurableapi/api/v0/runs", body, { authRequired: true });
|
|
34
|
+
return { data };
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const RunDurableOptionsSchema: z.ZodObject<{
|
|
3
|
+
source_files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
5
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6
|
+
zapier_durable_version: z.ZodOptional<z.ZodString>;
|
|
7
|
+
connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
8
|
+
connection_id: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodNumber]>;
|
|
9
|
+
}, z.core.$strip>>>;
|
|
10
|
+
app_versions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
11
|
+
implementation_name: z.ZodString;
|
|
12
|
+
version: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>>>;
|
|
14
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type RunDurableOptions = z.infer<typeof RunDurableOptionsSchema>;
|
|
17
|
+
export declare const RunDurableResponseSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
status: z.ZodLiteral<"initialized">;
|
|
20
|
+
is_private: z.ZodBoolean;
|
|
21
|
+
created_at: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type RunDurableResponse = z.infer<typeof RunDurableResponseSchema>;
|
|
24
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAsCjC,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const ConnectionMapEntrySchema = z.object({
|
|
3
|
+
connection_id: z
|
|
4
|
+
.union([
|
|
5
|
+
z.string().regex(/^[1-9][0-9]*$/, "must be a positive integer string"),
|
|
6
|
+
z.string().uuid("must be a UUID"),
|
|
7
|
+
z.number().int().positive(),
|
|
8
|
+
])
|
|
9
|
+
.describe("Zapier connection ID. Accepts a positive integer (legacy) or a UUID string (newer connections)."),
|
|
10
|
+
});
|
|
11
|
+
const AppVersionMapEntrySchema = z.object({
|
|
12
|
+
implementation_name: z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1)
|
|
15
|
+
.describe("Zapier app implementation name (e.g. `SlackCLIAPI`)"),
|
|
16
|
+
version: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("Pinned app version (e.g. `1.27.1`). Latest if omitted."),
|
|
20
|
+
});
|
|
21
|
+
export const RunDurableOptionsSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
source_files: z
|
|
24
|
+
.record(z.string(), z.string())
|
|
25
|
+
.refine((files) => Object.keys(files).length > 0, {
|
|
26
|
+
message: "source_files must contain at least one file",
|
|
27
|
+
})
|
|
28
|
+
.describe("Source files keyed by filename → contents"),
|
|
29
|
+
input: z.unknown().optional().describe("Input data passed to the run"),
|
|
30
|
+
dependencies: z
|
|
31
|
+
.record(z.string(), z.string())
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Optional npm package dependencies"),
|
|
34
|
+
zapier_durable_version: z
|
|
35
|
+
.string()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted.'),
|
|
38
|
+
connections: z
|
|
39
|
+
.record(z.string(), ConnectionMapEntrySchema)
|
|
40
|
+
.optional()
|
|
41
|
+
.describe("Named connection aliases. Maps alias names to Zapier connection IDs."),
|
|
42
|
+
app_versions: z
|
|
43
|
+
.record(z.string(), AppVersionMapEntrySchema)
|
|
44
|
+
.optional()
|
|
45
|
+
.describe("Pinned app versions. Maps app keys (slugs) to implementation names and versions."),
|
|
46
|
+
private: z
|
|
47
|
+
.boolean()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe("Only the creating user can see the run (default false)"),
|
|
50
|
+
})
|
|
51
|
+
.describe("Run a workflow source file as a run-once durable run on sdkdurableapi (no deployed workflow required). Returns the run ID immediately; poll via getDurableRun for terminal status.");
|
|
52
|
+
export const RunDurableResponseSchema = z.object({
|
|
53
|
+
id: z.string().describe("Run ID (UUID) — server-generated, time-sortable"),
|
|
54
|
+
status: z
|
|
55
|
+
.literal("initialized")
|
|
56
|
+
.describe("Always `initialized` on creation. Poll via getDurableRun to observe the run advancing to `started` / `finished` / `failed` / `cancelled`."),
|
|
57
|
+
is_private: z
|
|
58
|
+
.boolean()
|
|
59
|
+
.describe("When true, the run is visible only to the creating user; otherwise visible across the account."),
|
|
60
|
+
created_at: z.string().describe("When the run was created (ISO-8601)"),
|
|
61
|
+
});
|
|
@@ -14,6 +14,7 @@ export { tableIdResolver } from "./tableId";
|
|
|
14
14
|
export { triggerInboxResolver } from "./triggerInbox";
|
|
15
15
|
export { workflowIdResolver } from "./workflowId";
|
|
16
16
|
export { durableRunIdResolver } from "./durableRunId";
|
|
17
|
+
export { workflowVersionIdResolver } from "./workflowVersionId";
|
|
17
18
|
export { triggerMessagesResolver } from "./triggerMessages";
|
|
18
19
|
export { tableRecordIdResolver, tableRecordIdsResolver } from "./tableRecordId";
|
|
19
20
|
export { tableFieldIdsResolver } from "./tableFieldIds";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,iBAAiB,E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AC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/resolvers/index.js
CHANGED
|
@@ -16,6 +16,7 @@ export { tableIdResolver } from "./tableId";
|
|
|
16
16
|
export { triggerInboxResolver } from "./triggerInbox";
|
|
17
17
|
export { workflowIdResolver } from "./workflowId";
|
|
18
18
|
export { durableRunIdResolver } from "./durableRunId";
|
|
19
|
+
export { workflowVersionIdResolver } from "./workflowVersionId";
|
|
19
20
|
export { triggerMessagesResolver } from "./triggerMessages";
|
|
20
21
|
export { tableRecordIdResolver, tableRecordIdsResolver } from "./tableRecordId";
|
|
21
22
|
export { tableFieldIdsResolver } from "./tableFieldIds";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DynamicResolver } from "../utils/schema-utils";
|
|
2
|
+
import type { WorkflowVersionListItem } from "../plugins/codeSubstrate/listWorkflowVersions/schemas";
|
|
3
|
+
export declare const workflowVersionIdResolver: DynamicResolver<WorkflowVersionListItem, {
|
|
4
|
+
workflow: string;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=workflowVersionId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowVersionId.d.ts","sourceRoot":"","sources":["../../src/resolvers/workflowVersionId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAarG,eAAO,MAAM,yBAAyB,EAAE,eAAe,CACrD,uBAAuB,EACvB;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAmBrB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { toIterable } from "../utils/pagination-utils";
|
|
2
|
+
// Dependent resolver — needs the parent workflow id to fetch the
|
|
3
|
+
// version list. Picker shows versions newest-first per the backend
|
|
4
|
+
// ordering.
|
|
5
|
+
export const workflowVersionIdResolver = {
|
|
6
|
+
type: "dynamic",
|
|
7
|
+
depends: ["workflow"],
|
|
8
|
+
fetch: async (sdk, params) => toIterable(sdk.listWorkflowVersions({
|
|
9
|
+
workflow: params.workflow,
|
|
10
|
+
})),
|
|
11
|
+
prompt: (versions) => ({
|
|
12
|
+
type: "list",
|
|
13
|
+
name: "version",
|
|
14
|
+
message: "Select a workflow version:",
|
|
15
|
+
choices: versions.map((v) => ({
|
|
16
|
+
name: `${v.id} — ${v.zapier_durable_version}`,
|
|
17
|
+
value: v.id,
|
|
18
|
+
})),
|
|
19
|
+
}),
|
|
20
|
+
};
|