@zapier/zapier-sdk 0.70.0 → 0.70.2

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +11 -0
  3. package/dist/experimental.cjs +40 -18
  4. package/dist/experimental.d.mts +12 -12
  5. package/dist/experimental.d.ts +10 -10
  6. package/dist/experimental.mjs +40 -18
  7. package/dist/{index-C0bQ5snd.d.mts → index-DjLMJ3w8.d.mts} +3 -3
  8. package/dist/{index-C0bQ5snd.d.ts → index-DjLMJ3w8.d.ts} +3 -3
  9. package/dist/index.cjs +5 -2
  10. package/dist/index.d.mts +1 -1
  11. package/dist/index.mjs +5 -2
  12. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +1 -1
  13. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -1
  14. package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +2 -1
  15. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -1
  16. package/dist/plugins/codeSubstrate/createWorkflow/index.js +2 -1
  17. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
  18. package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +2 -1
  19. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +4 -0
  20. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -1
  21. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +7 -0
  22. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
  23. package/dist/plugins/codeSubstrate/disableWorkflow/index.js +2 -1
  24. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
  25. package/dist/plugins/codeSubstrate/enableWorkflow/index.js +2 -1
  26. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +5 -5
  27. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +1 -1
  28. package/dist/plugins/codeSubstrate/getDurableRun/index.js +2 -1
  29. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +24 -24
  30. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +1 -1
  31. package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +4 -9
  32. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +1 -1
  33. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +1 -1
  34. package/dist/plugins/codeSubstrate/listDurableRuns/index.js +6 -2
  35. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +6 -6
  36. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts.map +1 -1
  37. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.js +2 -3
  38. package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -1
  39. package/dist/plugins/codeSubstrate/runDurable/index.js +3 -2
  40. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
  41. package/dist/plugins/codeSubstrate/updateWorkflow/index.js +2 -1
  42. package/dist/plugins/listActions/index.d.ts.map +1 -1
  43. package/dist/plugins/listActions/index.js +4 -1
  44. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
1
  import { z } from "zod";
2
- export declare const OperationTypeSchema: z.ZodEnum<{
2
+ export declare const OperationTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
3
3
  step: "step";
4
4
  wait: "wait";
5
5
  callback: "callback";
6
- }>;
6
+ }>, z.ZodString]>;
7
7
  export type OperationType = z.infer<typeof OperationTypeSchema>;
8
- export declare const OperationStatusSchema: z.ZodEnum<{
8
+ export declare const OperationStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
9
9
  pending: "pending";
10
10
  failed: "failed";
11
11
  exhausted: "exhausted";
12
12
  completed: "completed";
13
- }>;
13
+ }>, z.ZodString]>;
14
14
  export type OperationStatus = z.infer<typeof OperationStatusSchema>;
15
15
  export declare const OperationSchema: z.ZodObject<{
16
16
  id: z.ZodString;
17
17
  execution_id: z.ZodString;
18
18
  name: z.ZodString;
19
- type: z.ZodEnum<{
19
+ type: z.ZodUnion<readonly [z.ZodEnum<{
20
20
  step: "step";
21
21
  wait: "wait";
22
22
  callback: "callback";
23
- }>;
24
- status: z.ZodEnum<{
23
+ }>, z.ZodString]>;
24
+ status: z.ZodUnion<readonly [z.ZodEnum<{
25
25
  pending: "pending";
26
26
  failed: "failed";
27
27
  exhausted: "exhausted";
28
28
  completed: "completed";
29
- }>;
29
+ }>, z.ZodString]>;
30
30
  result: z.ZodOptional<z.ZodUnknown>;
31
31
  error: z.ZodOptional<z.ZodUnknown>;
32
32
  retry_count: z.ZodNumber;
@@ -41,22 +41,22 @@ export declare const OperationSchema: z.ZodObject<{
41
41
  created_at: z.ZodString;
42
42
  }, z.core.$strip>;
43
43
  export type Operation = z.infer<typeof OperationSchema>;
44
- export declare const ExecutionStatusSchema: z.ZodEnum<{
44
+ export declare const ExecutionStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
45
45
  failed: "failed";
46
46
  waiting: "waiting";
47
47
  completed: "completed";
48
48
  running: "running";
49
- }>;
49
+ }>, z.ZodString]>;
50
50
  export type ExecutionStatus = z.infer<typeof ExecutionStatusSchema>;
51
51
  export declare const ExecutionSummarySchema: z.ZodObject<{
52
52
  id: z.ZodString;
53
53
  name: z.ZodString;
54
- status: z.ZodEnum<{
54
+ status: z.ZodUnion<readonly [z.ZodEnum<{
55
55
  failed: "failed";
56
56
  waiting: "waiting";
57
57
  completed: "completed";
58
58
  running: "running";
59
- }>;
59
+ }>, z.ZodString]>;
60
60
  input: z.ZodUnknown;
61
61
  output: z.ZodOptional<z.ZodUnknown>;
62
62
  error: z.ZodOptional<z.ZodUnknown>;
@@ -74,17 +74,17 @@ export declare const ExecutionSummarySchema: z.ZodObject<{
74
74
  id: z.ZodString;
75
75
  execution_id: z.ZodString;
76
76
  name: z.ZodString;
77
- type: z.ZodEnum<{
77
+ type: z.ZodUnion<readonly [z.ZodEnum<{
78
78
  step: "step";
79
79
  wait: "wait";
80
80
  callback: "callback";
81
- }>;
82
- status: z.ZodEnum<{
81
+ }>, z.ZodString]>;
82
+ status: z.ZodUnion<readonly [z.ZodEnum<{
83
83
  pending: "pending";
84
84
  failed: "failed";
85
85
  exhausted: "exhausted";
86
86
  completed: "completed";
87
- }>;
87
+ }>, z.ZodString]>;
88
88
  result: z.ZodOptional<z.ZodUnknown>;
89
89
  error: z.ZodOptional<z.ZodUnknown>;
90
90
  retry_count: z.ZodNumber;
@@ -106,13 +106,13 @@ export declare const GetDurableRunOptionsSchema: z.ZodObject<{
106
106
  export type GetDurableRunOptions = z.infer<typeof GetDurableRunOptionsSchema>;
107
107
  export declare const GetDurableRunResponseSchema: z.ZodObject<{
108
108
  id: z.ZodString;
109
- status: z.ZodEnum<{
109
+ status: z.ZodUnion<readonly [z.ZodEnum<{
110
110
  initialized: "initialized";
111
111
  started: "started";
112
112
  finished: "finished";
113
113
  failed: "failed";
114
114
  cancelled: "cancelled";
115
- }>;
115
+ }>, z.ZodString]>;
116
116
  input: z.ZodUnknown;
117
117
  output: z.ZodNullable<z.ZodUnknown>;
118
118
  error: z.ZodNullable<z.ZodObject<{
@@ -122,12 +122,12 @@ export declare const GetDurableRunResponseSchema: z.ZodObject<{
122
122
  execution: z.ZodNullable<z.ZodObject<{
123
123
  id: z.ZodString;
124
124
  name: z.ZodString;
125
- status: z.ZodEnum<{
125
+ status: z.ZodUnion<readonly [z.ZodEnum<{
126
126
  failed: "failed";
127
127
  waiting: "waiting";
128
128
  completed: "completed";
129
129
  running: "running";
130
- }>;
130
+ }>, z.ZodString]>;
131
131
  input: z.ZodUnknown;
132
132
  output: z.ZodOptional<z.ZodUnknown>;
133
133
  error: z.ZodOptional<z.ZodUnknown>;
@@ -145,17 +145,17 @@ export declare const GetDurableRunResponseSchema: z.ZodObject<{
145
145
  id: z.ZodString;
146
146
  execution_id: z.ZodString;
147
147
  name: z.ZodString;
148
- type: z.ZodEnum<{
148
+ type: z.ZodUnion<readonly [z.ZodEnum<{
149
149
  step: "step";
150
150
  wait: "wait";
151
151
  callback: "callback";
152
- }>;
153
- status: z.ZodEnum<{
152
+ }>, z.ZodString]>;
153
+ status: z.ZodUnion<readonly [z.ZodEnum<{
154
154
  pending: "pending";
155
155
  failed: "failed";
156
156
  exhausted: "exhausted";
157
157
  completed: "completed";
158
- }>;
158
+ }>, z.ZodString]>;
159
159
  result: z.ZodOptional<z.ZodUnknown>;
160
160
  error: z.ZodOptional<z.ZodUnknown>;
161
161
  retry_count: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;;;EAI7B,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;EAI/B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;;EAI/B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;iBAMpC,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;iBAG/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;iBAMpC,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,11 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { RunErrorSchema, RunStatusSchema } from "../listDurableRuns/schemas";
3
- export const OperationTypeSchema = z
4
- .enum(["step", "wait", "callback"])
5
- .describe("Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback.");
6
- export const OperationStatusSchema = z
7
- .enum(["pending", "completed", "failed", "exhausted"])
8
- .describe("Operation lifecycle status. `exhausted` means retries were exceeded.");
3
+ import { openEnum } from "kitcore";
4
+ export const OperationTypeSchema = openEnum(["step", "wait", "callback"], "Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback.");
5
+ export const OperationStatusSchema = openEnum(["pending", "completed", "failed", "exhausted"], "Operation lifecycle status. `exhausted` means retries were exceeded.");
9
6
  export const OperationSchema = z.object({
10
7
  id: z.string().describe("Operation ID (UUID)"),
11
8
  execution_id: z.string().describe("Parent execution ID"),
@@ -58,9 +55,7 @@ export const OperationSchema = z.object({
58
55
  .describe("When the operation reached a terminal state (ISO-8601)"),
59
56
  created_at: z.string().describe("When the operation was created (ISO-8601)"),
60
57
  });
61
- export const ExecutionStatusSchema = z
62
- .enum(["running", "waiting", "completed", "failed"])
63
- .describe("Execution lifecycle status. `waiting` means blocked on a wait or callback operation.");
58
+ export const ExecutionStatusSchema = openEnum(["running", "waiting", "completed", "failed"], "Execution lifecycle status. `waiting` means blocked on a wait or callback operation.");
64
59
  export const ExecutionSummarySchema = z.object({
65
60
  id: z.string().describe("Execution ID (UUID)"),
66
61
  name: z.string().describe("Durable function name"),
@@ -31,7 +31,7 @@ export declare const listDurableRunsPlugin: (sdk: {
31
31
  maxItems?: number;
32
32
  }) | undefined) => import("kitcore").PaginatedSdkResult<{
33
33
  id: string;
34
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
34
+ status: string;
35
35
  input: unknown;
36
36
  output: unknown;
37
37
  error: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { definePlugin, createPaginatedPluginMethod } from "kitcore";
2
2
  import { DEFAULT_PAGE_SIZE } from "../../../constants";
3
3
  import { codeSubstrateDefaults } from "../shared";
4
- import { ListDurableRunsOptionsSchema, RunItemSchema, } from "./schemas";
4
+ import { ListDurableRunsApiResponseSchema, ListDurableRunsOptionsSchema, RunItemSchema, } from "./schemas";
5
5
  export const listDurableRunsPlugin = definePlugin((sdk) => createPaginatedPluginMethod(sdk, {
6
6
  ...codeSubstrateDefaults,
7
7
  name: "listDurableRuns",
@@ -18,7 +18,11 @@ export const listDurableRunsPlugin = definePlugin((sdk) => createPaginatedPlugin
18
18
  if (options.cursor) {
19
19
  searchParams.cursor = options.cursor;
20
20
  }
21
- const response = await sdk.context.api.get("/sdkdurableapi/api/v0/runs", { searchParams, authRequired: true });
21
+ const raw = await sdk.context.api.get("/sdkdurableapi/api/v0/runs", {
22
+ searchParams,
23
+ authRequired: true,
24
+ });
25
+ const response = ListDurableRunsApiResponseSchema.parse(raw);
22
26
  return {
23
27
  data: response.results,
24
28
  nextCursor: response.meta.next_cursor ?? undefined,
@@ -1,11 +1,11 @@
1
1
  import { z } from "zod";
2
- export declare const RunStatusSchema: z.ZodEnum<{
2
+ export declare const RunStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
3
3
  initialized: "initialized";
4
4
  started: "started";
5
5
  finished: "finished";
6
6
  failed: "failed";
7
7
  cancelled: "cancelled";
8
- }>;
8
+ }>, z.ZodString]>;
9
9
  export type RunStatus = z.infer<typeof RunStatusSchema>;
10
10
  export declare const RunErrorSchema: z.ZodObject<{
11
11
  code: z.ZodString;
@@ -14,13 +14,13 @@ export declare const RunErrorSchema: z.ZodObject<{
14
14
  export type RunError = z.infer<typeof RunErrorSchema>;
15
15
  export declare const RunItemSchema: z.ZodObject<{
16
16
  id: z.ZodString;
17
- status: z.ZodEnum<{
17
+ status: z.ZodUnion<readonly [z.ZodEnum<{
18
18
  initialized: "initialized";
19
19
  started: "started";
20
20
  finished: "finished";
21
21
  failed: "failed";
22
22
  cancelled: "cancelled";
23
- }>;
23
+ }>, z.ZodString]>;
24
24
  input: z.ZodUnknown;
25
25
  output: z.ZodNullable<z.ZodUnknown>;
26
26
  error: z.ZodNullable<z.ZodObject<{
@@ -42,13 +42,13 @@ export type ListDurableRunsOptions = z.infer<typeof ListDurableRunsOptionsSchema
42
42
  export declare const ListDurableRunsApiResponseSchema: z.ZodObject<{
43
43
  results: z.ZodArray<z.ZodObject<{
44
44
  id: z.ZodString;
45
- status: z.ZodEnum<{
45
+ status: z.ZodUnion<readonly [z.ZodEnum<{
46
46
  initialized: "initialized";
47
47
  started: "started";
48
48
  finished: "finished";
49
49
  failed: "failed";
50
50
  cancelled: "cancelled";
51
- }>;
51
+ }>, z.ZodString]>;
52
52
  input: z.ZodUnknown;
53
53
  output: z.ZodNullable<z.ZodUnknown>;
54
54
  error: z.ZodNullable<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;;;EAIzB,CAAC;AAEJ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc;;;iBAQxB,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;iBAwBxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,4BAA4B;;;;iBAiBtC,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe;;;;;;iBAG3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc;;;iBAQxB,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;iBAwBxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,4BAA4B;;;;iBAiBtC,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
- export const RunStatusSchema = z
3
- .enum(["initialized", "started", "finished", "failed", "cancelled"])
4
- .describe("Run lifecycle status. `finished` / `failed` / `cancelled` are terminal.");
2
+ import { openEnum } from "kitcore";
3
+ export const RunStatusSchema = openEnum(["initialized", "started", "finished", "failed", "cancelled"], "Run lifecycle status. `finished` / `failed` / `cancelled` are terminal.");
5
4
  export const RunErrorSchema = z
6
5
  .object({
7
6
  code: z.string().describe("Machine-readable error category"),
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC5B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { definePlugin, createPluginMethod } from "kitcore";
2
2
  import { codeSubstrateDefaults } from "../shared";
3
- import { RunDurableOptionsSchema, RunDurableResponseSchema, } from "./schemas";
3
+ import { RunDurableOptionsSchema, RunDurableResponseSchema } from "./schemas";
4
4
  export const runDurablePlugin = definePlugin((sdk) => createPluginMethod(sdk, {
5
5
  ...codeSubstrateDefaults,
6
6
  name: "runDurable",
@@ -30,7 +30,8 @@ export const runDurablePlugin = definePlugin((sdk) => createPluginMethod(sdk, {
30
30
  if (options.private !== undefined) {
31
31
  body.is_private = options.private;
32
32
  }
33
- const data = await sdk.context.api.post("/sdkdurableapi/api/v0/runs", body, { authRequired: true });
33
+ const raw = await sdk.context.api.post("/sdkdurableapi/api/v0/runs", body, { authRequired: true });
34
+ const data = RunDurableResponseSchema.parse(raw);
34
35
  return { data };
35
36
  },
36
37
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/updateWorkflow/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/updateWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
@@ -18,10 +18,11 @@ export const updateWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
18
18
  if (options.description !== undefined) {
19
19
  body.description = options.description;
20
20
  }
21
- const data = await sdk.context.api.patch(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`, body, {
21
+ const raw = await sdk.context.api.patch(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`, body, {
22
22
  authRequired: true,
23
23
  resource: { type: "workflow", id: options.workflow },
24
24
  });
25
+ const data = UpdateWorkflowResponseSchema.parse(raw);
25
26
  return { data };
26
27
  },
27
28
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActions/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,WAAW,CAAC;AAS3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAOxE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;sBA8EqlW,CAAC;;;;sBAAiX,CAAC;qBAAyB,CAAC;;;;;;;;;;;;;aA3Ej/W;QACP,GAAG,EAAE,SAAS,CAAC;QACf,4BAA4B,EAAE,4BAA4B,CAAC;KAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEN,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActions/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,WAAW,CAAC;AAS3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAOxE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;sBAiF02V,CAAC;;;;sBAAiX,CAAC;qBAAyB,CAAC;;;;;;;;;;;;;aA9EtwW;QACP,GAAG,EAAE,SAAS,CAAC;QACf,4BAA4B,EAAE,4BAA4B,CAAC;KAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEN,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -34,7 +34,10 @@ export const listActionsPlugin = definePlugin((sdk) => createPaginatedPluginMeth
34
34
  const data = await api.get("/zapier/api/v4/implementations/", {
35
35
  searchParams: {
36
36
  global: "true",
37
- public_only: "true",
37
+ // Include private/unlisted implementations the caller has access
38
+ // to. With public_only the API drops actions on private apps, so
39
+ // they surface as "unknown action" downstream (COSUB-562).
40
+ public_only: "false",
38
41
  selected_apis: selectedApi,
39
42
  },
40
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.70.0",
3
+ "version": "0.70.2",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",