@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
@@ -1014,6 +1014,9 @@ function isPositional(schema) {
1014
1014
  }
1015
1015
  return false;
1016
1016
  }
1017
+ function openEnum(values, description) {
1018
+ return z.union([z.enum(values), z.string()]).describe(description);
1019
+ }
1017
1020
 
1018
1021
  // src/utils/logging.ts
1019
1022
  var { logDeprecation: logDeprecation2, resetDeprecationWarnings: resetDeprecationWarnings2 } = createDeprecationLogger("zapier-sdk");
@@ -3183,7 +3186,7 @@ function createSseParserStream() {
3183
3186
  }
3184
3187
 
3185
3188
  // src/sdk-version.ts
3186
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.0" : void 0) || "unknown";
3189
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.2" : void 0) || "unknown";
3187
3190
 
3188
3191
  // src/utils/open-url.ts
3189
3192
  var nodePrefix = "node:";
@@ -5810,7 +5813,10 @@ var listActionsPlugin = definePlugin(
5810
5813
  {
5811
5814
  searchParams: {
5812
5815
  global: "true",
5813
- public_only: "true",
5816
+ // Include private/unlisted implementations the caller has access
5817
+ // to. With public_only the API drops actions on private apps, so
5818
+ // they surface as "unknown action" downstream (COSUB-562).
5819
+ public_only: "false",
5814
5820
  selected_apis: selectedApi
5815
5821
  }
5816
5822
  }
@@ -11299,11 +11305,12 @@ var createWorkflowPlugin = definePlugin(
11299
11305
  if (options.is_private !== void 0) {
11300
11306
  body.is_private = options.is_private;
11301
11307
  }
11302
- const data = await sdk2.context.api.post(
11308
+ const raw = await sdk2.context.api.post(
11303
11309
  "/durableworkflowzaps/api/v0/workflows",
11304
11310
  body,
11305
11311
  { authRequired: true }
11306
11312
  );
11313
+ const data = CreateWorkflowResponseSchema.parse(raw);
11307
11314
  return { data };
11308
11315
  }
11309
11316
  })
@@ -11345,7 +11352,7 @@ var updateWorkflowPlugin = definePlugin(
11345
11352
  if (options.description !== void 0) {
11346
11353
  body.description = options.description;
11347
11354
  }
11348
- const data = await sdk2.context.api.patch(
11355
+ const raw = await sdk2.context.api.patch(
11349
11356
  `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
11350
11357
  body,
11351
11358
  {
@@ -11353,6 +11360,7 @@ var updateWorkflowPlugin = definePlugin(
11353
11360
  resource: { type: "workflow", id: options.workflow }
11354
11361
  }
11355
11362
  );
11363
+ const data = UpdateWorkflowResponseSchema.parse(raw);
11356
11364
  return { data };
11357
11365
  }
11358
11366
  })
@@ -11376,7 +11384,7 @@ var enableWorkflowPlugin = definePlugin(
11376
11384
  outputSchema: EnableWorkflowResponseSchema,
11377
11385
  resolvers: { workflow: workflowIdResolver },
11378
11386
  handler: async ({ sdk: sdk2, options }) => {
11379
- const data = await sdk2.context.api.post(
11387
+ const raw = await sdk2.context.api.post(
11380
11388
  `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`,
11381
11389
  void 0,
11382
11390
  {
@@ -11384,6 +11392,7 @@ var enableWorkflowPlugin = definePlugin(
11384
11392
  resource: { type: "workflow", id: options.workflow }
11385
11393
  }
11386
11394
  );
11395
+ const data = EnableWorkflowResponseSchema.parse(raw);
11387
11396
  return { data };
11388
11397
  }
11389
11398
  })
@@ -11409,7 +11418,7 @@ var disableWorkflowPlugin = definePlugin(
11409
11418
  outputSchema: DisableWorkflowResponseSchema,
11410
11419
  resolvers: { workflow: workflowIdResolver },
11411
11420
  handler: async ({ sdk: sdk2, options }) => {
11412
- const data = await sdk2.context.api.post(
11421
+ const raw = await sdk2.context.api.post(
11413
11422
  `/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`,
11414
11423
  void 0,
11415
11424
  {
@@ -11417,6 +11426,7 @@ var disableWorkflowPlugin = definePlugin(
11417
11426
  resource: { type: "workflow", id: options.workflow }
11418
11427
  }
11419
11428
  );
11429
+ const data = DisableWorkflowResponseSchema.parse(raw);
11420
11430
  return { data };
11421
11431
  }
11422
11432
  })
@@ -11426,6 +11436,9 @@ var DeleteWorkflowOptionsSchema = z.object({
11426
11436
  }).describe(
11427
11437
  "Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves."
11428
11438
  );
11439
+ var DeleteWorkflowResponseSchema = z.object({
11440
+ id: z.string().describe("Workflow ID that was targeted for deletion")
11441
+ });
11429
11442
 
11430
11443
  // src/plugins/codeSubstrate/deleteWorkflow/index.ts
11431
11444
  var deleteWorkflowPlugin = definePlugin(
@@ -11436,6 +11449,7 @@ var deleteWorkflowPlugin = definePlugin(
11436
11449
  itemType: "Workflow",
11437
11450
  confirm: "delete",
11438
11451
  inputSchema: DeleteWorkflowOptionsSchema,
11452
+ outputSchema: DeleteWorkflowResponseSchema,
11439
11453
  resolvers: { workflow: workflowIdResolver },
11440
11454
  handler: async ({ sdk: sdk2, options }) => {
11441
11455
  await sdk2.context.api.delete(
@@ -11450,7 +11464,8 @@ var deleteWorkflowPlugin = definePlugin(
11450
11464
  }
11451
11465
  })
11452
11466
  );
11453
- var RunStatusSchema = z.enum(["initialized", "started", "finished", "failed", "cancelled"]).describe(
11467
+ var RunStatusSchema = openEnum(
11468
+ ["initialized", "started", "finished", "failed", "cancelled"],
11454
11469
  "Run lifecycle status. `finished` / `failed` / `cancelled` are terminal."
11455
11470
  );
11456
11471
  var RunErrorSchema = z.object({
@@ -11483,7 +11498,7 @@ var ListDurableRunsOptionsSchema = z.object({
11483
11498
  }).describe(
11484
11499
  "List run-once durable runs for the authenticated account, newest first"
11485
11500
  );
11486
- z.object({
11501
+ var ListDurableRunsApiResponseSchema = z.object({
11487
11502
  results: z.array(RunItemSchema),
11488
11503
  meta: z.object({
11489
11504
  limit: z.number(),
@@ -11513,10 +11528,11 @@ var listDurableRunsPlugin = definePlugin(
11513
11528
  if (options.cursor) {
11514
11529
  searchParams.cursor = options.cursor;
11515
11530
  }
11516
- const response = await sdk2.context.api.get(
11517
- "/sdkdurableapi/api/v0/runs",
11518
- { searchParams, authRequired: true }
11519
- );
11531
+ const raw = await sdk2.context.api.get("/sdkdurableapi/api/v0/runs", {
11532
+ searchParams,
11533
+ authRequired: true
11534
+ });
11535
+ const response = ListDurableRunsApiResponseSchema.parse(raw);
11520
11536
  return {
11521
11537
  data: response.results,
11522
11538
  nextCursor: response.meta.next_cursor ?? void 0
@@ -11524,10 +11540,12 @@ var listDurableRunsPlugin = definePlugin(
11524
11540
  }
11525
11541
  })
11526
11542
  );
11527
- var OperationTypeSchema = z.enum(["step", "wait", "callback"]).describe(
11543
+ var OperationTypeSchema = openEnum(
11544
+ ["step", "wait", "callback"],
11528
11545
  "Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback."
11529
11546
  );
11530
- var OperationStatusSchema = z.enum(["pending", "completed", "failed", "exhausted"]).describe(
11547
+ var OperationStatusSchema = openEnum(
11548
+ ["pending", "completed", "failed", "exhausted"],
11531
11549
  "Operation lifecycle status. `exhausted` means retries were exceeded."
11532
11550
  );
11533
11551
  var OperationSchema = z.object({
@@ -11555,7 +11573,8 @@ var OperationSchema = z.object({
11555
11573
  completed_at: z.string().optional().describe("When the operation reached a terminal state (ISO-8601)"),
11556
11574
  created_at: z.string().describe("When the operation was created (ISO-8601)")
11557
11575
  });
11558
- var ExecutionStatusSchema = z.enum(["running", "waiting", "completed", "failed"]).describe(
11576
+ var ExecutionStatusSchema = openEnum(
11577
+ ["running", "waiting", "completed", "failed"],
11559
11578
  "Execution lifecycle status. `waiting` means blocked on a wait or callback operation."
11560
11579
  );
11561
11580
  var ExecutionSummarySchema = z.object({
@@ -11619,13 +11638,14 @@ var getDurableRunPlugin = definePlugin(
11619
11638
  outputSchema: GetDurableRunResponseSchema,
11620
11639
  resolvers: { run: durableRunIdResolver },
11621
11640
  handler: async ({ sdk: sdk2, options }) => {
11622
- const data = await sdk2.context.api.get(
11641
+ const raw = await sdk2.context.api.get(
11623
11642
  `/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`,
11624
11643
  {
11625
11644
  authRequired: true,
11626
11645
  resource: { type: "run", id: options.run }
11627
11646
  }
11628
11647
  );
11648
+ const data = GetDurableRunResponseSchema.parse(raw);
11629
11649
  return { data };
11630
11650
  }
11631
11651
  })
@@ -11704,11 +11724,12 @@ var runDurablePlugin = definePlugin(
11704
11724
  if (options.private !== void 0) {
11705
11725
  body.is_private = options.private;
11706
11726
  }
11707
- const data = await sdk2.context.api.post(
11727
+ const raw = await sdk2.context.api.post(
11708
11728
  "/sdkdurableapi/api/v0/runs",
11709
11729
  body,
11710
11730
  { authRequired: true }
11711
11731
  );
11732
+ const data = RunDurableResponseSchema.parse(raw);
11712
11733
  return { data };
11713
11734
  }
11714
11735
  })
@@ -11718,7 +11739,7 @@ var CancelDurableRunOptionsSchema = z.object({
11718
11739
  }).describe(
11719
11740
  "Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal."
11720
11741
  );
11721
- z.object({
11742
+ var CancelDurableRunResponseSchema = z.object({
11722
11743
  id: z.string().describe("Run ID that was targeted"),
11723
11744
  status: z.literal("cancelled").describe(
11724
11745
  "Always `cancelled` on a successful call. Synthesized client-side \u2014 the backend returns 204; callers needing the run's full state should follow up with getDurableRun."
@@ -11733,6 +11754,7 @@ var cancelDurableRunPlugin = definePlugin(
11733
11754
  type: "update",
11734
11755
  itemType: "DurableRun",
11735
11756
  inputSchema: CancelDurableRunOptionsSchema,
11757
+ outputSchema: CancelDurableRunResponseSchema,
11736
11758
  resolvers: { run: durableRunIdResolver },
11737
11759
  handler: async ({ sdk: sdk2, options }) => {
11738
11760
  await sdk2.context.api.post(
@@ -7529,7 +7529,7 @@ declare const listDurableRunsPlugin: (sdk: {
7529
7529
  maxItems?: number;
7530
7530
  }) | undefined) => PaginatedSdkResult<{
7531
7531
  id: string;
7532
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
7532
+ status: string;
7533
7533
  input: unknown;
7534
7534
  output: unknown;
7535
7535
  error: {
@@ -7553,13 +7553,13 @@ type ListDurableRunsPluginProvides = ReturnType<typeof listDurableRunsPlugin>;
7553
7553
 
7554
7554
  declare const RunItemSchema: z.ZodObject<{
7555
7555
  id: z.ZodString;
7556
- status: z.ZodEnum<{
7556
+ status: z.ZodUnion<readonly [z.ZodEnum<{
7557
7557
  initialized: "initialized";
7558
7558
  started: "started";
7559
7559
  finished: "finished";
7560
7560
  failed: "failed";
7561
7561
  cancelled: "cancelled";
7562
- }>;
7562
+ }>, z.ZodString]>;
7563
7563
  input: z.ZodUnknown;
7564
7564
  output: z.ZodNullable<z.ZodUnknown>;
7565
7565
  error: z.ZodNullable<z.ZodObject<{
@@ -7529,7 +7529,7 @@ declare const listDurableRunsPlugin: (sdk: {
7529
7529
  maxItems?: number;
7530
7530
  }) | undefined) => PaginatedSdkResult<{
7531
7531
  id: string;
7532
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
7532
+ status: string;
7533
7533
  input: unknown;
7534
7534
  output: unknown;
7535
7535
  error: {
@@ -7553,13 +7553,13 @@ type ListDurableRunsPluginProvides = ReturnType<typeof listDurableRunsPlugin>;
7553
7553
 
7554
7554
  declare const RunItemSchema: z.ZodObject<{
7555
7555
  id: z.ZodString;
7556
- status: z.ZodEnum<{
7556
+ status: z.ZodUnion<readonly [z.ZodEnum<{
7557
7557
  initialized: "initialized";
7558
7558
  started: "started";
7559
7559
  finished: "finished";
7560
7560
  failed: "failed";
7561
7561
  cancelled: "cancelled";
7562
- }>;
7562
+ }>, z.ZodString]>;
7563
7563
  input: z.ZodUnknown;
7564
7564
  output: z.ZodNullable<z.ZodUnknown>;
7565
7565
  error: z.ZodNullable<z.ZodObject<{
package/dist/index.cjs CHANGED
@@ -3640,7 +3640,10 @@ var listActionsPlugin = definePlugin(
3640
3640
  {
3641
3641
  searchParams: {
3642
3642
  global: "true",
3643
- public_only: "true",
3643
+ // Include private/unlisted implementations the caller has access
3644
+ // to. With public_only the API drops actions on private apps, so
3645
+ // they surface as "unknown action" downstream (COSUB-562).
3646
+ public_only: "false",
3644
3647
  selected_apis: selectedApi
3645
3648
  }
3646
3649
  }
@@ -6778,7 +6781,7 @@ function createSseParserStream() {
6778
6781
  }
6779
6782
 
6780
6783
  // src/sdk-version.ts
6781
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.0" : void 0) || "unknown";
6784
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.2" : void 0) || "unknown";
6782
6785
 
6783
6786
  // src/utils/open-url.ts
6784
6787
  var nodePrefix = "node:";
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { x as Action, f as ActionEntry, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, E as EventEmissionContext, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, b as Manifest, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, O as OutputFormatter, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, i as PaginatedSdkResult, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, R as ResolvedAppLocator, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, k as ZapierFetchInitOptions, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, f4 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f2 as createZapierSdk, f3 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, g as findManifestEntry, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-C0bQ5snd.mjs';
1
+ export { x as Action, f as ActionEntry, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, E as EventEmissionContext, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, b as Manifest, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, O as OutputFormatter, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, i as PaginatedSdkResult, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, R as ResolvedAppLocator, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, k as ZapierFetchInitOptions, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, f4 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f2 as createZapierSdk, f3 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, g as findManifestEntry, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-DjLMJ3w8.mjs';
2
2
  import 'zod';
3
3
  import 'zod/v4/core';
4
4
  import '@zapier/zapier-sdk-core/v0/schemas/connections';
package/dist/index.mjs CHANGED
@@ -3638,7 +3638,10 @@ var listActionsPlugin = definePlugin(
3638
3638
  {
3639
3639
  searchParams: {
3640
3640
  global: "true",
3641
- public_only: "true",
3641
+ // Include private/unlisted implementations the caller has access
3642
+ // to. With public_only the API drops actions on private apps, so
3643
+ // they surface as "unknown action" downstream (COSUB-562).
3644
+ public_only: "false",
3642
3645
  selected_apis: selectedApi
3643
3646
  }
3644
3647
  }
@@ -6776,7 +6779,7 @@ function createSseParserStream() {
6776
6779
  }
6777
6780
 
6778
6781
  // src/sdk-version.ts
6779
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.0" : void 0) || "unknown";
6782
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.2" : void 0) || "unknown";
6780
6783
 
6781
6784
  // src/utils/open-url.ts
6782
6785
  var nodePrefix = "node:";
@@ -27,7 +27,7 @@ export declare const cancelDurableRunPlugin: (sdk: {
27
27
  maxItems?: number;
28
28
  }) | undefined) => import("kitcore").PaginatedSdkResult<{
29
29
  id: string;
30
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
30
+ status: string;
31
31
  input: unknown;
32
32
  output: unknown;
33
33
  error: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/cancelDurableRun/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiClC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,UAAU,CACrD,OAAO,sBAAsB,CAC9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/cancelDurableRun/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,UAAU,CACrD,OAAO,sBAAsB,CAC9B,CAAC"}
@@ -1,13 +1,14 @@
1
1
  import { definePlugin, createPluginMethod } from "kitcore";
2
2
  import { durableRunIdResolver } from "../../../resolvers/durableRunId";
3
3
  import { codeSubstrateDefaults } from "../shared";
4
- import { CancelDurableRunOptionsSchema } from "./schemas";
4
+ import { CancelDurableRunOptionsSchema, CancelDurableRunResponseSchema, } from "./schemas";
5
5
  export const cancelDurableRunPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
6
6
  ...codeSubstrateDefaults,
7
7
  name: "cancelDurableRun",
8
8
  type: "update",
9
9
  itemType: "DurableRun",
10
10
  inputSchema: CancelDurableRunOptionsSchema,
11
+ outputSchema: CancelDurableRunResponseSchema,
11
12
  resolvers: { run: durableRunIdResolver },
12
13
  handler: async ({ sdk, options }) => {
13
14
  // Backend returns 204 on success. 404 (run missing) and 409 (run
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
@@ -16,7 +16,8 @@ export const createWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
16
16
  if (options.is_private !== undefined) {
17
17
  body.is_private = options.is_private;
18
18
  }
19
- const data = await sdk.context.api.post("/durableworkflowzaps/api/v0/workflows", body, { authRequired: true });
19
+ const raw = await sdk.context.api.post("/durableworkflowzaps/api/v0/workflows", body, { authRequired: true });
20
+ const data = CreateWorkflowResponseSchema.parse(raw);
20
21
  return { data };
21
22
  },
22
23
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/index.ts"],"names":[],"mappings":"AAQA,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/deleteWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { definePlugin, createPluginMethod } from "kitcore";
2
2
  import { workflowIdResolver } from "../../../resolvers/workflowId";
3
3
  import { codeSubstrateDefaults } from "../shared";
4
- import { DeleteWorkflowOptionsSchema } from "./schemas";
4
+ import { DeleteWorkflowOptionsSchema, DeleteWorkflowResponseSchema, } from "./schemas";
5
5
  export const deleteWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
6
6
  ...codeSubstrateDefaults,
7
7
  name: "deleteWorkflow",
@@ -9,6 +9,7 @@ export const deleteWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
9
9
  itemType: "Workflow",
10
10
  confirm: "delete",
11
11
  inputSchema: DeleteWorkflowOptionsSchema,
12
+ outputSchema: DeleteWorkflowResponseSchema,
12
13
  resolvers: { workflow: workflowIdResolver },
13
14
  handler: async ({ sdk, options }) => {
14
15
  // Backend returns 204 on success. 404 (workflow missing) propagates
@@ -3,4 +3,8 @@ export declare const DeleteWorkflowOptionsSchema: z.ZodObject<{
3
3
  workflow: z.ZodString;
4
4
  }, z.core.$strip>;
5
5
  export type DeleteWorkflowOptions = z.infer<typeof DeleteWorkflowOptionsSchema>;
6
+ export declare const DeleteWorkflowResponseSchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export type DeleteWorkflowResponse = z.infer<typeof DeleteWorkflowResponseSchema>;
6
10
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;iBAMrC,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;iBAMrC,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
@@ -4,3 +4,10 @@ export const DeleteWorkflowOptionsSchema = z
4
4
  workflow: z.string().uuid().describe("Durable workflow ID"),
5
5
  })
6
6
  .describe("Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves.");
7
+ // Synthesized client-side — the backend returns 204 with no body. We
8
+ // echo the targeted workflow id so callers don't lose the handle across
9
+ // the call. Wired as `outputSchema` so the framework can validate the
10
+ // handler's contract.
11
+ export const DeleteWorkflowResponseSchema = z.object({
12
+ id: z.string().describe("Workflow ID that was targeted for deletion"),
13
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/disableWorkflow/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/disableWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
@@ -11,10 +11,11 @@ export const disableWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sd
11
11
  outputSchema: DisableWorkflowResponseSchema,
12
12
  resolvers: { workflow: workflowIdResolver },
13
13
  handler: async ({ sdk, options }) => {
14
- const data = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`, undefined, {
14
+ const raw = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`, undefined, {
15
15
  authRequired: true,
16
16
  resource: { type: "workflow", id: options.workflow },
17
17
  });
18
+ const data = DisableWorkflowResponseSchema.parse(raw);
18
19
  return { data };
19
20
  },
20
21
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/enableWorkflow/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/enableWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
@@ -11,10 +11,11 @@ export const enableWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
11
11
  outputSchema: EnableWorkflowResponseSchema,
12
12
  resolvers: { workflow: workflowIdResolver },
13
13
  handler: async ({ sdk, options }) => {
14
- const data = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`, undefined, {
14
+ const raw = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`, undefined, {
15
15
  authRequired: true,
16
16
  resource: { type: "workflow", id: options.workflow },
17
17
  });
18
+ const data = EnableWorkflowResponseSchema.parse(raw);
18
19
  return { data };
19
20
  },
20
21
  }));
@@ -27,7 +27,7 @@ export declare const getDurableRunPlugin: (sdk: {
27
27
  maxItems?: number;
28
28
  }) | undefined) => import("kitcore").PaginatedSdkResult<{
29
29
  id: string;
30
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
30
+ status: string;
31
31
  input: unknown;
32
32
  output: unknown;
33
33
  error: {
@@ -56,7 +56,7 @@ export declare const getDurableRunPlugin: (sdk: {
56
56
  } | undefined) => Promise<{
57
57
  data: {
58
58
  id: string;
59
- status: "initialized" | "started" | "finished" | "failed" | "cancelled";
59
+ status: string;
60
60
  input: unknown;
61
61
  output: unknown;
62
62
  error: {
@@ -67,7 +67,7 @@ export declare const getDurableRunPlugin: (sdk: {
67
67
  execution: {
68
68
  id: string;
69
69
  name: string;
70
- status: "failed" | "waiting" | "completed" | "running";
70
+ status: string;
71
71
  input: unknown;
72
72
  created_at: string;
73
73
  output?: unknown;
@@ -87,8 +87,8 @@ export declare const getDurableRunPlugin: (sdk: {
87
87
  id: string;
88
88
  execution_id: string;
89
89
  name: string;
90
- type: "step" | "wait" | "callback";
91
- status: "pending" | "failed" | "exhausted" | "completed";
90
+ type: string;
91
+ status: string;
92
92
  retry_count: number;
93
93
  created_at: string;
94
94
  result?: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB/B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,mBAAmB,CAC3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B/B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,mBAAmB,CAC3B,CAAC"}
@@ -11,10 +11,11 @@ export const getDurableRunPlugin = definePlugin((sdk) => createPluginMethod(sdk,
11
11
  outputSchema: GetDurableRunResponseSchema,
12
12
  resolvers: { run: durableRunIdResolver },
13
13
  handler: async ({ sdk, options }) => {
14
- const data = await sdk.context.api.get(`/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`, {
14
+ const raw = await sdk.context.api.get(`/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`, {
15
15
  authRequired: true,
16
16
  resource: { type: "run", id: options.run },
17
17
  });
18
+ const data = GetDurableRunResponseSchema.parse(raw);
18
19
  return { data };
19
20
  },
20
21
  }));