@zapier/zapier-sdk 0.42.0 → 0.43.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.
Files changed (152) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/client.d.ts.map +1 -1
  3. package/dist/api/client.js +309 -35
  4. package/dist/api/types.d.ts +29 -0
  5. package/dist/api/types.d.ts.map +1 -1
  6. package/dist/constants.d.ts +25 -0
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +32 -0
  9. package/dist/index.cjs +616 -197
  10. package/dist/index.d.mts +241 -408
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -1
  14. package/dist/index.mjs +611 -198
  15. package/dist/plugins/api/index.d.ts +5 -1
  16. package/dist/plugins/api/index.d.ts.map +1 -1
  17. package/dist/plugins/api/index.js +6 -3
  18. package/dist/plugins/apps/index.d.ts +2 -3
  19. package/dist/plugins/apps/index.d.ts.map +1 -1
  20. package/dist/plugins/apps/index.js +1 -1
  21. package/dist/plugins/capabilities/index.d.ts +8 -6
  22. package/dist/plugins/capabilities/index.d.ts.map +1 -1
  23. package/dist/plugins/capabilities/index.js +3 -3
  24. package/dist/plugins/connections/index.d.ts +3 -1
  25. package/dist/plugins/connections/index.d.ts.map +1 -1
  26. package/dist/plugins/connections/index.js +2 -3
  27. package/dist/plugins/createClientCredentials/index.d.ts +6 -4
  28. package/dist/plugins/createClientCredentials/index.d.ts.map +1 -1
  29. package/dist/plugins/createClientCredentials/index.js +4 -3
  30. package/dist/plugins/createClientCredentials/schemas.d.ts +1 -0
  31. package/dist/plugins/createClientCredentials/schemas.d.ts.map +1 -1
  32. package/dist/plugins/createClientCredentials/schemas.js +6 -0
  33. package/dist/plugins/deleteClientCredentials/index.d.ts +6 -4
  34. package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
  35. package/dist/plugins/deleteClientCredentials/index.js +3 -3
  36. package/dist/plugins/deprecated/authentications.d.ts +9 -9
  37. package/dist/plugins/deprecated/authentications.d.ts.map +1 -1
  38. package/dist/plugins/deprecated/authentications.js +4 -4
  39. package/dist/plugins/eventEmission/index.d.ts +4 -5
  40. package/dist/plugins/eventEmission/index.d.ts.map +1 -1
  41. package/dist/plugins/eventEmission/index.js +8 -7
  42. package/dist/plugins/fetch/index.d.ts +6 -6
  43. package/dist/plugins/fetch/index.d.ts.map +1 -1
  44. package/dist/plugins/fetch/index.js +20 -6
  45. package/dist/plugins/findFirstConnection/index.d.ts +3 -4
  46. package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
  47. package/dist/plugins/findFirstConnection/index.js +2 -2
  48. package/dist/plugins/findUniqueConnection/index.d.ts +3 -4
  49. package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
  50. package/dist/plugins/findUniqueConnection/index.js +2 -2
  51. package/dist/plugins/getAction/index.d.ts +7 -7
  52. package/dist/plugins/getAction/index.d.ts.map +1 -1
  53. package/dist/plugins/getAction/index.js +2 -2
  54. package/dist/plugins/getApp/index.d.ts +2 -3
  55. package/dist/plugins/getApp/index.d.ts.map +1 -1
  56. package/dist/plugins/getApp/index.js +2 -2
  57. package/dist/plugins/getConnection/index.d.ts +6 -6
  58. package/dist/plugins/getConnection/index.d.ts.map +1 -1
  59. package/dist/plugins/getConnection/index.js +3 -3
  60. package/dist/plugins/getInputFieldsSchema/index.d.ts +8 -6
  61. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +1 -1
  62. package/dist/plugins/getInputFieldsSchema/index.js +4 -4
  63. package/dist/plugins/getProfile/index.d.ts +6 -6
  64. package/dist/plugins/getProfile/index.d.ts.map +1 -1
  65. package/dist/plugins/getProfile/index.js +3 -3
  66. package/dist/plugins/listActions/index.d.ts +8 -6
  67. package/dist/plugins/listActions/index.d.ts.map +1 -1
  68. package/dist/plugins/listActions/index.js +3 -3
  69. package/dist/plugins/listApps/index.d.ts +3 -3
  70. package/dist/plugins/listApps/index.d.ts.map +1 -1
  71. package/dist/plugins/listApps/index.js +3 -3
  72. package/dist/plugins/listClientCredentials/index.d.ts +6 -4
  73. package/dist/plugins/listClientCredentials/index.d.ts.map +1 -1
  74. package/dist/plugins/listClientCredentials/index.js +3 -3
  75. package/dist/plugins/listConnections/index.d.ts +8 -6
  76. package/dist/plugins/listConnections/index.d.ts.map +1 -1
  77. package/dist/plugins/listConnections/index.js +5 -5
  78. package/dist/plugins/listInputFieldChoices/index.d.ts +9 -8
  79. package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
  80. package/dist/plugins/listInputFieldChoices/index.js +4 -4
  81. package/dist/plugins/listInputFields/index.d.ts +8 -8
  82. package/dist/plugins/listInputFields/index.d.ts.map +1 -1
  83. package/dist/plugins/listInputFields/index.js +4 -4
  84. package/dist/plugins/manifest/index.d.ts +8 -3
  85. package/dist/plugins/manifest/index.d.ts.map +1 -1
  86. package/dist/plugins/manifest/index.js +2 -3
  87. package/dist/plugins/registry/index.d.ts +1 -2
  88. package/dist/plugins/registry/index.d.ts.map +1 -1
  89. package/dist/plugins/registry/index.js +3 -3
  90. package/dist/plugins/request/index.d.ts +3 -4
  91. package/dist/plugins/request/index.d.ts.map +1 -1
  92. package/dist/plugins/request/index.js +2 -2
  93. package/dist/plugins/runAction/index.d.ts +8 -8
  94. package/dist/plugins/runAction/index.d.ts.map +1 -1
  95. package/dist/plugins/runAction/index.js +17 -6
  96. package/dist/plugins/tables/createTable/index.d.ts +3 -5
  97. package/dist/plugins/tables/createTable/index.d.ts.map +1 -1
  98. package/dist/plugins/tables/createTable/index.js +3 -3
  99. package/dist/plugins/tables/createTableFields/index.d.ts +3 -5
  100. package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
  101. package/dist/plugins/tables/createTableFields/index.js +3 -3
  102. package/dist/plugins/tables/createTableRecords/index.d.ts +3 -5
  103. package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
  104. package/dist/plugins/tables/createTableRecords/index.js +3 -3
  105. package/dist/plugins/tables/deleteTable/index.d.ts +5 -5
  106. package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
  107. package/dist/plugins/tables/deleteTable/index.js +4 -4
  108. package/dist/plugins/tables/deleteTableFields/index.d.ts +3 -5
  109. package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
  110. package/dist/plugins/tables/deleteTableFields/index.js +3 -3
  111. package/dist/plugins/tables/deleteTableRecords/index.d.ts +3 -5
  112. package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
  113. package/dist/plugins/tables/deleteTableRecords/index.js +3 -3
  114. package/dist/plugins/tables/getTable/index.d.ts +3 -5
  115. package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
  116. package/dist/plugins/tables/getTable/index.js +3 -3
  117. package/dist/plugins/tables/getTableRecord/index.d.ts +3 -5
  118. package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
  119. package/dist/plugins/tables/getTableRecord/index.js +3 -3
  120. package/dist/plugins/tables/listTableFields/index.d.ts +3 -5
  121. package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
  122. package/dist/plugins/tables/listTableFields/index.js +3 -3
  123. package/dist/plugins/tables/listTableRecords/index.d.ts +3 -3
  124. package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
  125. package/dist/plugins/tables/listTableRecords/index.js +3 -3
  126. package/dist/plugins/tables/listTables/index.d.ts +5 -3
  127. package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
  128. package/dist/plugins/tables/listTables/index.js +4 -4
  129. package/dist/plugins/tables/updateTableRecords/index.d.ts +3 -5
  130. package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
  131. package/dist/plugins/tables/updateTableRecords/index.js +3 -3
  132. package/dist/resolvers/connectionId.js +1 -1
  133. package/dist/resolvers/tableId.js +1 -1
  134. package/dist/sdk.d.ts +29 -257
  135. package/dist/sdk.d.ts.map +1 -1
  136. package/dist/sdk.js +33 -43
  137. package/dist/types/errors.d.ts +37 -0
  138. package/dist/types/errors.d.ts.map +1 -1
  139. package/dist/types/errors.js +18 -0
  140. package/dist/types/plugin.d.ts +29 -48
  141. package/dist/types/plugin.d.ts.map +1 -1
  142. package/dist/types/plugin.js +7 -3
  143. package/dist/types/sdk.d.ts +9 -3
  144. package/dist/types/sdk.d.ts.map +1 -1
  145. package/dist/types/sdk.js +20 -0
  146. package/dist/utils/open-approval.d.ts +2 -0
  147. package/dist/utils/open-approval.d.ts.map +1 -0
  148. package/dist/utils/open-approval.js +13 -0
  149. package/dist/utils/open-url.d.ts +3 -0
  150. package/dist/utils/open-url.d.ts.map +1 -0
  151. package/dist/utils/open-url.js +72 -0
  152. package/package.json +3 -1
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import * as zod from 'zod';
2
1
  import { z } from 'zod';
3
2
  import { ConnectionSchema, ConnectionsResponseSchema, ConnectionItem as ConnectionItem$2, GetConnectionResponse } from '@zapier/zapier-sdk-core/v0/schemas/connections';
3
+ import { RequestContext } from '@zapier/policy-context';
4
4
  import { AppItem as AppItem$1 } from '@zapier/zapier-sdk-core/v0/schemas/apps';
5
5
  import { ClientCredentialsItem as ClientCredentialsItem$1, ClientCredentialsCreatedItem } from '@zapier/zapier-sdk-core/v0/schemas/client-credentials';
6
6
  import * as _zapier_zapier_sdk_cli_login from '@zapier/zapier-sdk-cli-login';
@@ -45,19 +45,22 @@ type EventCallback = (event: SdkEvent) => void;
45
45
 
46
46
  /**
47
47
  * ------------------------------
48
- * Plugin Type System with Explicit Context Dependencies
48
+ * Plugin Type System
49
49
  * ------------------------------
50
50
  *
51
- * This system makes context dependencies explicit to restore TypeScript's
52
- * ability to catch missing context at compile time.
51
+ * Plugins receive the sdk as a positional parameter. sdk.context holds shared
52
+ * internal state (api client, event emission, meta, options, etc.). SDK methods
53
+ * live at the root, context nests under .context.
54
+ *
55
+ * A plugin is (sdk) => partialSdk. createSdk() returns an empty SDK. addPlugin
56
+ * merges the plugin's result into the SDK, producing a new SDK.
53
57
  */
54
58
 
55
- interface PluginDependencies<TSdk = {}, TContext = {}> {
56
- sdk: TSdk;
57
- context: TContext;
58
- }
59
59
  interface PluginProvides extends Record<string, any> {
60
- context?: Record<string, any>;
60
+ context?: {
61
+ meta?: Record<string, PluginMeta>;
62
+ [key: string]: any;
63
+ };
61
64
  }
62
65
  interface PluginMeta {
63
66
  /**
@@ -66,62 +69,42 @@ interface PluginMeta {
66
69
  * the inputSchema's `.describe()` value or a generic placeholder.
67
70
  */
68
71
  description?: string;
69
- categories: string[];
72
+ categories?: string[];
70
73
  type?: "list" | "item" | "create" | "delete";
71
74
  itemType?: string;
72
75
  returnType?: string;
73
- inputSchema: z.ZodSchema;
76
+ inputSchema?: z.ZodSchema;
74
77
  outputSchema?: z.ZodSchema;
75
78
  resolvers?: Record<string, any>;
76
79
  /** Confirmation prompt type - prompts user before executing */
77
80
  confirm?: "create-secret" | "delete";
78
81
  [key: string]: any;
79
82
  }
80
- type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
81
- type ExtractContextProperties<T extends PluginProvides> = T["context"];
82
- type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
83
- getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
84
- };
85
- type GetContextType<TPluginProvides extends PluginProvides> = NonNullable<ExtractContextProperties<TPluginProvides>>;
86
- type PluginOptions<TSdk = {}, TContext = {}> = {
87
- sdk: TSdk;
88
- context: TContext & {
89
- meta: Record<string, any>;
90
- };
91
- };
92
83
  /**
93
- * Plugin interface — now has 3 type params:
84
+ * Plugin interface — 2 type params:
85
+ *
86
+ * TSdk = what this plugin needs (the SDK shape including context)
87
+ * TProvides = what this plugin returns (a partial SDK shape)
94
88
  *
95
- * TRequiresContext = what this plugin *needs* in context
96
- * TProvides = what this plugin *returns* (sdk + context)
97
- * TSdk = current sdk shape when plugin runs
98
- */
99
- interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
100
- (params: {
101
- sdk: TSdk;
102
- context: TRequiresContext & {
89
+ * The sdk param always includes context.meta, even if TSdk doesn't declare it.
90
+ */
91
+ interface Plugin<TSdk = {}, TProvides extends PluginProvides = PluginProvides> {
92
+ (sdk: TSdk & {
93
+ context: {
103
94
  meta: Record<string, PluginMeta>;
104
- options: BaseSdkOptions;
105
95
  };
106
96
  }): TProvides;
107
97
  }
108
- type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
109
- [K in keyof TRequired]: K extends keyof TCurrent ? never : K;
110
- }[keyof TRequired] : keyof TRequired : never;
111
- type ContextError<TRequired, TCurrent> = MissingContextKeys<TRequired, TCurrent> extends never ? never : MissingContextKeys<TRequired, TCurrent> extends infer Missing ? Missing extends string ? `❌ Missing required context: { ${Missing}: any }` : Missing extends number ? `❌ Missing required context: { ${Missing}: any }` : `❌ Missing required context properties. Required: ${keyof TRequired extends string ? keyof TRequired : "unknown"}, Available: ${keyof TCurrent extends string ? keyof TCurrent : "unknown"}` : "❌ Context requirement not satisfied";
112
98
  /**
113
- * SDK interface result of createSdk()
114
- *
115
- * addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
116
- * If not, TypeScript will emit a detailed error showing missing properties.
117
- */
118
- type Sdk<TCurrentSdk = {}, TCurrentContext = {
119
- meta: Record<string, PluginMeta>;
120
- }> = TCurrentSdk & {
121
- addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
122
- getContext(): TCurrentContext;
123
- }, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
124
- getContext(): TCurrentContext;
99
+ * Takes an SDK shape and adds an addPlugin method to it.
100
+ * addPlugin merges a plugin's result into the shape, producing a new SDK.
101
+ */
102
+ type WithAddPlugin<T = {
103
+ context: {
104
+ meta: Record<string, PluginMeta>;
105
+ };
106
+ }> = T & {
107
+ addPlugin<TProvides extends PluginProvides>(plugin: Plugin<T, TProvides>): WithAddPlugin<T & TProvides>;
125
108
  };
126
109
 
127
110
  /**
@@ -859,6 +842,7 @@ interface ApiClient {
859
842
  fetch: (path: string, init?: RequestInit & {
860
843
  searchParams?: Record<string, string>;
861
844
  authRequired?: boolean;
845
+ approvalContext?: () => RequestContext;
862
846
  }) => Promise<Response>;
863
847
  }
864
848
  interface RequestOptions {
@@ -876,6 +860,12 @@ interface RequestOptions {
876
860
  statusText: string;
877
861
  data: unknown;
878
862
  }) => Error | undefined;
863
+ /**
864
+ * Builds the policy context for this request if it triggers the approval
865
+ * flow. Callers that may receive a 403 `approval_required` response MUST
866
+ * provide this so the SDK can create an approval with the correct context.
867
+ */
868
+ approvalContext?: () => RequestContext;
879
869
  }
880
870
  interface PollOptions extends RequestOptions {
881
871
  initialDelay?: number;
@@ -1067,9 +1057,14 @@ declare function findManifestEntry({ appKey, manifest, }: {
1067
1057
  manifest: Manifest;
1068
1058
  }): [string, ManifestEntry] | null;
1069
1059
 
1070
- declare const manifestPlugin: Plugin<{}, // no SDK dependencies
1071
- {
1072
- api: ApiClient;
1060
+ declare const manifestPlugin: Plugin<{
1061
+ context: {
1062
+ api: ApiClient;
1063
+ options?: {
1064
+ manifestPath?: string;
1065
+ manifest?: Manifest;
1066
+ };
1067
+ };
1073
1068
  }, ManifestPluginProvides>;
1074
1069
 
1075
1070
  /**
@@ -1273,6 +1268,43 @@ declare class ZapierRateLimitError extends ZapierError {
1273
1268
  retries?: number;
1274
1269
  });
1275
1270
  }
1271
+ /**
1272
+ * Terminal status of an approval attempt, exposed on `ZapierApprovalError.approvalStatus`.
1273
+ *
1274
+ * - `pending`: The approval was created but not yet resolved. Only thrown in
1275
+ * `approvalMode: "fail"` — the caller is expected to surface the approval URL
1276
+ * to an end user (e.g. an LLM instructing its user to click the link).
1277
+ * - `denied`: A human explicitly rejected the approval in the UI.
1278
+ * - `policy_denied`: A policy rule blocked the request before (or instead of)
1279
+ * creating an approval. Cannot be approved by a human.
1280
+ * - `approval_required`: The backend requested approval, but the current
1281
+ * session is non-interactive so the SDK cannot open the approval URL. Retry
1282
+ * in an interactive session, or use `approvalMode: "fail"` to surface the
1283
+ * approval URL to the caller.
1284
+ * - `timeout`: Poll mode exceeded `approvalTimeoutMs` without the approval
1285
+ * being resolved.
1286
+ * - `max_retries_exceeded`: A single request triggered more sequential approval
1287
+ * rounds than `maxApprovalRetries` allows (runaway-loop safeguard).
1288
+ */
1289
+ type ApprovalStatus = "denied" | "timeout" | "pending" | "policy_denied" | "approval_required" | "max_retries_exceeded";
1290
+ /**
1291
+ * Error thrown when a request requires approval and the approval is denied, times out,
1292
+ * or the auth type doesn't support the approval flow.
1293
+ */
1294
+ declare class ZapierApprovalError extends ZapierError {
1295
+ readonly name = "ZapierApprovalError";
1296
+ readonly code: "ZAPIER_APPROVAL_ERROR";
1297
+ approvalId?: string;
1298
+ approvalStatus?: ApprovalStatus;
1299
+ approvalUrl?: string;
1300
+ pollUrl?: string;
1301
+ constructor(message: string, options?: ErrorOptions & {
1302
+ approvalId?: string;
1303
+ status?: ApprovalStatus;
1304
+ approvalUrl?: string;
1305
+ pollUrl?: string;
1306
+ });
1307
+ }
1276
1308
  /**
1277
1309
  * Error thrown when Relay itself encounters an error (as opposed to the upstream partner API returning an error).
1278
1310
  * Indicated by the presence of the X-Relay-Error response header.
@@ -1436,8 +1468,7 @@ interface RegistryPluginProvides {
1436
1468
  }[];
1437
1469
  };
1438
1470
  }
1439
- declare const registryPlugin: Plugin<{}, // accepts any SDK shape
1440
- {}, // requires no context
1471
+ declare const registryPlugin: Plugin<{}, // accepts any SDK shape, requires no context
1441
1472
  RegistryPluginProvides>;
1442
1473
 
1443
1474
  declare const GetProfileSchema: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
@@ -1455,11 +1486,11 @@ interface GetProfilePluginProvides {
1455
1486
  };
1456
1487
  };
1457
1488
  }
1458
- declare const getProfilePlugin: Plugin<{}, // no SDK dependencies
1459
- // no SDK dependencies
1460
- {
1461
- api: ApiClient;
1462
- } & EventEmissionContext, // requires api and eventEmission in context
1489
+ declare const getProfilePlugin: Plugin<{
1490
+ context: {
1491
+ api: ApiClient;
1492
+ };
1493
+ } & EventEmissionProvides, // no SDK dependencies, requires api and eventEmission in context
1463
1494
  GetProfilePluginProvides>;
1464
1495
 
1465
1496
  interface ApiPluginOptions extends BaseSdkOptions {
@@ -1470,7 +1501,11 @@ interface ApiPluginProvides {
1470
1501
  resolveCredentials: () => Promise<ResolvedCredentials | undefined>;
1471
1502
  };
1472
1503
  }
1473
- declare const apiPlugin: Plugin<{}, {}, ApiPluginProvides>;
1504
+ declare const apiPlugin: Plugin<{
1505
+ context: {
1506
+ options: BaseSdkOptions;
1507
+ };
1508
+ }, ApiPluginProvides>;
1474
1509
 
1475
1510
  declare const AppKeyPropertySchema: z.ZodString & {
1476
1511
  _def: z.core.$ZodStringDef & PositionalMetadata;
@@ -1595,7 +1630,9 @@ interface ConnectionsPluginProvides {
1595
1630
  getConnectionsMap: () => Promise<ConnectionsMap | null>;
1596
1631
  };
1597
1632
  }
1598
- declare const connectionsPlugin: Plugin<{}, ManifestPluginProvides["context"], ConnectionsPluginProvides>;
1633
+ declare const connectionsPlugin: Plugin<{
1634
+ context: Pick<ManifestPluginProvides["context"], "getManifestConnections">;
1635
+ }, ConnectionsPluginProvides>;
1599
1636
 
1600
1637
  interface ZapierFetchInitOptions extends RequestInit {
1601
1638
  /** @deprecated Use `connection` instead. */
@@ -1628,11 +1665,11 @@ interface FetchPluginProvides {
1628
1665
  * Fetch plugin — the primary way to make authenticated HTTP requests through Zapier's Relay service.
1629
1666
  * Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.
1630
1667
  */
1631
- declare const fetchPlugin: Plugin<{}, // no SDK dependencies
1632
- // no SDK dependencies
1633
- {
1634
- api: ApiClient;
1635
- } & ConnectionsPluginProvides["context"] & EventEmissionContext, // requires api, connections, and eventEmission in context
1668
+ declare const fetchPlugin: Plugin<{
1669
+ context: {
1670
+ api: ApiClient;
1671
+ } & ConnectionsPluginProvides["context"];
1672
+ } & EventEmissionProvides, // no SDK dependencies, requires api, connections, and eventEmission in context
1636
1673
  FetchPluginProvides>;
1637
1674
 
1638
1675
  declare const RunActionSchema: z.ZodObject<{
@@ -1792,10 +1829,12 @@ interface ListActionsPluginProvides {
1792
1829
  };
1793
1830
  };
1794
1831
  }
1795
- declare const listActionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
1796
- api: ApiClient;
1797
- getVersionedImplementationId: GetVersionedImplementationId;
1798
- } & EventEmissionContext, ListActionsPluginProvides>;
1832
+ declare const listActionsPlugin: Plugin<ManifestPluginProvides & {
1833
+ context: {
1834
+ api: ApiClient;
1835
+ getVersionedImplementationId: GetVersionedImplementationId;
1836
+ };
1837
+ } & EventEmissionProvides, ListActionsPluginProvides>;
1799
1838
 
1800
1839
  interface GetActionPluginProvides {
1801
1840
  getAction: (options: GetActionOptions) => Promise<{
@@ -1809,11 +1848,11 @@ interface GetActionPluginProvides {
1809
1848
  };
1810
1849
  };
1811
1850
  }
1812
- declare const getActionPlugin: Plugin<GetSdkType<ListActionsPluginProvides>, // requires listActions in SDK
1813
- // requires listActions in SDK
1814
- {
1815
- api: ApiClient;
1816
- } & EventEmissionContext, // requires api in context
1851
+ declare const getActionPlugin: Plugin<ListActionsPluginProvides & {
1852
+ context: {
1853
+ api: ApiClient;
1854
+ };
1855
+ } & EventEmissionProvides, // requires listActions in SDK, api and eventEmission in context
1817
1856
  GetActionPluginProvides>;
1818
1857
 
1819
1858
  declare const GetAppSchema: z.ZodObject<{
@@ -1878,7 +1917,7 @@ interface ListAppsPluginProvides {
1878
1917
  };
1879
1918
  };
1880
1919
  }
1881
- declare const listAppsPlugin: Plugin<{}, GetContextType<ApiPluginProvides & ManifestPluginProvides> & EventEmissionContext, ListAppsPluginProvides>;
1920
+ declare const listAppsPlugin: Plugin<ApiPluginProvides & ManifestPluginProvides & EventEmissionProvides, ListAppsPluginProvides>;
1882
1921
 
1883
1922
  interface GetAppPluginProvides {
1884
1923
  getApp: (options: GetAppOptions) => Promise<{
@@ -1892,7 +1931,7 @@ interface GetAppPluginProvides {
1892
1931
  };
1893
1932
  };
1894
1933
  }
1895
- declare const getAppPlugin: Plugin<GetSdkType<ListAppsPluginProvides>, EventEmissionContext, GetAppPluginProvides>;
1934
+ declare const getAppPlugin: Plugin<ListAppsPluginProvides & EventEmissionProvides, GetAppPluginProvides>;
1896
1935
 
1897
1936
  interface RunActionPluginProvides {
1898
1937
  runAction: (options?: RunActionOptions) => Promise<{
@@ -1914,19 +1953,18 @@ interface RunActionPluginProvides {
1914
1953
  }
1915
1954
  declare const CONTEXT_CACHE_TTL_MS = 60000;
1916
1955
  declare const CONTEXT_CACHE_MAX_SIZE = 500;
1917
- declare const runActionPlugin: Plugin<GetSdkType<GetActionPluginProvides & GetAppPluginProvides>, // requires getAction and getApp in SDK
1918
- // requires getAction and getApp in SDK
1919
- {
1920
- api: ApiClient;
1921
- getVersionedImplementationId: GetVersionedImplementationId;
1922
- } & ConnectionsPluginProvides["context"] & EventEmissionContext, // requires api, connections, and eventEmission in context
1956
+ declare const runActionPlugin: Plugin<GetActionPluginProvides & GetAppPluginProvides & {
1957
+ context: {
1958
+ api: ApiClient;
1959
+ getVersionedImplementationId: GetVersionedImplementationId;
1960
+ } & ConnectionsPluginProvides["context"];
1961
+ } & EventEmissionProvides, // requires getAction and getApp in SDK, api, connections, and eventEmission in context
1923
1962
  RunActionPluginProvides>;
1924
1963
 
1925
1964
  interface AppsPluginProvides {
1926
1965
  apps: ActionProxy;
1927
1966
  }
1928
- declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPluginProvides>, // requires fetch + runAction in SDK
1929
- {}, // no context requirements
1967
+ declare const appsPlugin: Plugin<FetchPluginProvides & RunActionPluginProvides, // requires fetch + runAction in SDK, no context requirements
1930
1968
  AppsPluginProvides>;
1931
1969
 
1932
1970
  interface ZapierSdkApps {
@@ -1983,10 +2021,12 @@ interface ListConnectionsPluginProvides {
1983
2021
  };
1984
2022
  };
1985
2023
  }
1986
- declare const listConnectionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
1987
- api: ApiClient;
1988
- getVersionedImplementationId: GetVersionedImplementationId;
1989
- } & EventEmissionContext & CapabilitiesContext & ConnectionsPluginProvides["context"], ListConnectionsPluginProvides>;
2024
+ declare const listConnectionsPlugin: Plugin<ManifestPluginProvides & {
2025
+ context: {
2026
+ api: ApiClient;
2027
+ getVersionedImplementationId: GetVersionedImplementationId;
2028
+ } & CapabilitiesContext & ConnectionsPluginProvides["context"];
2029
+ } & EventEmissionProvides, ListConnectionsPluginProvides>;
1990
2030
 
1991
2031
  interface GetConnectionPluginProvides {
1992
2032
  getConnection: (options: GetConnectionParam) => Promise<GetConnectionResponse>;
@@ -1998,11 +2038,11 @@ interface GetConnectionPluginProvides {
1998
2038
  };
1999
2039
  };
2000
2040
  }
2001
- declare const getConnectionPlugin: Plugin<{}, // no SDK dependencies
2002
- // no SDK dependencies
2003
- {
2004
- api: ApiClient;
2005
- } & EventEmissionContext, // requires api in context
2041
+ declare const getConnectionPlugin: Plugin<{
2042
+ context: {
2043
+ api: ApiClient;
2044
+ };
2045
+ } & EventEmissionProvides, // no SDK dependencies, requires api and eventEmission in context
2006
2046
  GetConnectionPluginProvides>;
2007
2047
 
2008
2048
  interface FindFirstConnectionPluginProvides {
@@ -2017,8 +2057,7 @@ interface FindFirstConnectionPluginProvides {
2017
2057
  };
2018
2058
  };
2019
2059
  }
2020
- declare const findFirstConnectionPlugin: Plugin<GetSdkType<ListConnectionsPluginProvides>, // requires listConnections in SDK
2021
- EventEmissionContext, // requires eventEmission in context
2060
+ declare const findFirstConnectionPlugin: Plugin<ListConnectionsPluginProvides & EventEmissionProvides, // requires listConnections in SDK, eventEmission in context
2022
2061
  FindFirstConnectionPluginProvides>;
2023
2062
 
2024
2063
  interface FindUniqueConnectionPluginProvides {
@@ -2033,8 +2072,7 @@ interface FindUniqueConnectionPluginProvides {
2033
2072
  };
2034
2073
  };
2035
2074
  }
2036
- declare const findUniqueConnectionPlugin: Plugin<GetSdkType<ListConnectionsPluginProvides>, // requires listConnections in SDK
2037
- EventEmissionContext, // requires eventEmission in context
2075
+ declare const findUniqueConnectionPlugin: Plugin<ListConnectionsPluginProvides & EventEmissionProvides, // requires listConnections in SDK, eventEmission in context
2038
2076
  FindUniqueConnectionPluginProvides>;
2039
2077
 
2040
2078
  /**
@@ -2052,7 +2090,7 @@ FindUniqueConnectionPluginProvides>;
2052
2090
  */
2053
2091
 
2054
2092
  interface ListAuthenticationsPluginProvides {
2055
- listAuthentications: GetSdkType<ListConnectionsPluginProvides>["listConnections"];
2093
+ listAuthentications: ListConnectionsPluginProvides["listConnections"];
2056
2094
  context: {
2057
2095
  meta: {
2058
2096
  listAuthentications: {
@@ -2062,7 +2100,7 @@ interface ListAuthenticationsPluginProvides {
2062
2100
  };
2063
2101
  }
2064
2102
  interface GetAuthenticationPluginProvides {
2065
- getAuthentication: GetSdkType<GetConnectionPluginProvides>["getConnection"];
2103
+ getAuthentication: GetConnectionPluginProvides["getConnection"];
2066
2104
  context: {
2067
2105
  meta: {
2068
2106
  getAuthentication: {
@@ -2072,7 +2110,7 @@ interface GetAuthenticationPluginProvides {
2072
2110
  };
2073
2111
  }
2074
2112
  interface FindFirstAuthenticationPluginProvides {
2075
- findFirstAuthentication: GetSdkType<FindFirstConnectionPluginProvides>["findFirstConnection"];
2113
+ findFirstAuthentication: FindFirstConnectionPluginProvides["findFirstConnection"];
2076
2114
  context: {
2077
2115
  meta: {
2078
2116
  findFirstAuthentication: {
@@ -2082,7 +2120,7 @@ interface FindFirstAuthenticationPluginProvides {
2082
2120
  };
2083
2121
  }
2084
2122
  interface FindUniqueAuthenticationPluginProvides {
2085
- findUniqueAuthentication: GetSdkType<FindUniqueConnectionPluginProvides>["findUniqueConnection"];
2123
+ findUniqueAuthentication: FindUniqueConnectionPluginProvides["findUniqueConnection"];
2086
2124
  context: {
2087
2125
  meta: {
2088
2126
  findUniqueAuthentication: {
@@ -2115,16 +2153,19 @@ interface ListClientCredentialsPluginProvides {
2115
2153
  };
2116
2154
  };
2117
2155
  }
2118
- declare const listClientCredentialsPlugin: Plugin<{}, {
2119
- api: ApiClient;
2120
- } & EventEmissionContext, ListClientCredentialsPluginProvides>;
2156
+ declare const listClientCredentialsPlugin: Plugin<{
2157
+ context: {
2158
+ api: ApiClient;
2159
+ };
2160
+ } & EventEmissionProvides, ListClientCredentialsPluginProvides>;
2121
2161
 
2122
2162
  declare const CreateClientCredentialsSchema: z.ZodObject<{
2123
2163
  name: z.ZodString;
2124
2164
  allowedScopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2125
- credentials: "credentials";
2126
2165
  external: "external";
2166
+ credentials: "credentials";
2127
2167
  }>>>;
2168
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2128
2169
  }, z.core.$strip>;
2129
2170
  type CreateClientCredentialsOptions = z.infer<typeof CreateClientCredentialsSchema> & FunctionOptions;
2130
2171
  interface CreateClientCredentialsResult {
@@ -2141,9 +2182,11 @@ interface CreateClientCredentialsPluginProvides {
2141
2182
  };
2142
2183
  };
2143
2184
  }
2144
- declare const createClientCredentialsPlugin: Plugin<{}, {
2145
- api: ApiClient;
2146
- } & EventEmissionContext, CreateClientCredentialsPluginProvides>;
2185
+ declare const createClientCredentialsPlugin: Plugin<{
2186
+ context: {
2187
+ api: ApiClient;
2188
+ };
2189
+ } & EventEmissionProvides, CreateClientCredentialsPluginProvides>;
2147
2190
 
2148
2191
  declare const DeleteClientCredentialsSchema: z.ZodObject<{
2149
2192
  clientId: z.ZodString;
@@ -2163,9 +2206,11 @@ interface DeleteClientCredentialsPluginProvides {
2163
2206
  };
2164
2207
  };
2165
2208
  }
2166
- declare const deleteClientCredentialsPlugin: Plugin<{}, {
2167
- api: ApiClient;
2168
- } & EventEmissionContext, DeleteClientCredentialsPluginProvides>;
2209
+ declare const deleteClientCredentialsPlugin: Plugin<{
2210
+ context: {
2211
+ api: ApiClient;
2212
+ };
2213
+ } & EventEmissionProvides, DeleteClientCredentialsPluginProvides>;
2169
2214
 
2170
2215
  interface ListInputFieldsPluginProvides {
2171
2216
  listInputFields: (options?: ListInputFieldsOptions) => Promise<{
@@ -2185,12 +2230,12 @@ interface ListInputFieldsPluginProvides {
2185
2230
  };
2186
2231
  };
2187
2232
  }
2188
- declare const listInputFieldsPlugin: Plugin<GetSdkType<GetAppPluginProvides & GetActionPluginProvides>, // requires getApp and getAction in SDK
2189
- // requires getApp and getAction in SDK
2190
- {
2191
- api: ApiClient;
2192
- getVersionedImplementationId: GetVersionedImplementationId;
2193
- } & EventEmissionContext & ConnectionsPluginProvides["context"], // requires api, getVersionedImplementationId, eventEmission, and resolveConnection in context
2233
+ declare const listInputFieldsPlugin: Plugin<GetAppPluginProvides & GetActionPluginProvides & {
2234
+ context: {
2235
+ api: ApiClient;
2236
+ getVersionedImplementationId: GetVersionedImplementationId;
2237
+ } & ConnectionsPluginProvides["context"];
2238
+ } & EventEmissionProvides, // requires getApp and getAction in SDK, api, getVersionedImplementationId, eventEmission, and resolveConnection in context
2194
2239
  ListInputFieldsPluginProvides>;
2195
2240
 
2196
2241
  declare const GetInputFieldsSchemaSchema: z.ZodObject<{
@@ -2358,8 +2403,7 @@ interface RequestPluginProvides {
2358
2403
  * @deprecated Use `sdk.fetch(url, init?)` instead. This plugin now delegates to the fetch plugin
2359
2404
  * and is kept only for backward compatibility. It is hidden from the CLI/MCP registries.
2360
2405
  */
2361
- declare const requestPlugin: Plugin<GetSdkType<FetchPluginProvides>, // requires fetch in SDK
2362
- EventEmissionContext, // requires eventEmission context for telemetry
2406
+ declare const requestPlugin: Plugin<FetchPluginProvides & EventEmissionProvides, // requires fetch in SDK, eventEmission context for telemetry
2363
2407
  RequestPluginProvides>;
2364
2408
 
2365
2409
  declare const TableItemSchema: z.ZodObject<{
@@ -2415,7 +2459,9 @@ interface ListTablesPluginProvides {
2415
2459
  };
2416
2460
  };
2417
2461
  }
2418
- declare const listTablesPlugin: Plugin<{}, GetContextType<ApiPluginProvides> & EventEmissionContext & CapabilitiesContext, ListTablesPluginProvides>;
2462
+ declare const listTablesPlugin: Plugin<ApiPluginProvides & EventEmissionProvides & {
2463
+ context: CapabilitiesContext;
2464
+ }, ListTablesPluginProvides>;
2419
2465
 
2420
2466
  declare const GetTableOptionsSchema: z.ZodObject<{
2421
2467
  table: z.ZodString & {
@@ -2442,9 +2488,7 @@ interface GetTablePluginProvides {
2442
2488
  };
2443
2489
  };
2444
2490
  }
2445
- declare const getTablePlugin: Plugin<{}, {
2446
- api: ApiClient;
2447
- } & EventEmissionContext, GetTablePluginProvides>;
2491
+ declare const getTablePlugin: Plugin<ApiPluginProvides & EventEmissionProvides, GetTablePluginProvides>;
2448
2492
 
2449
2493
  declare const DeleteTableOptionsSchema: z.ZodObject<{
2450
2494
  table: z.ZodString & {
@@ -2472,9 +2516,9 @@ interface DeleteTablePluginProvides {
2472
2516
  };
2473
2517
  };
2474
2518
  }
2475
- declare const deleteTablePlugin: Plugin<{}, {
2476
- api: ApiClient;
2477
- } & EventEmissionContext & CapabilitiesContext, DeleteTablePluginProvides>;
2519
+ declare const deleteTablePlugin: Plugin<ApiPluginProvides & EventEmissionProvides & {
2520
+ context: CapabilitiesContext;
2521
+ }, DeleteTablePluginProvides>;
2478
2522
 
2479
2523
  declare const CreateTableOptionsSchema: z.ZodObject<{
2480
2524
  name: z.ZodString;
@@ -2495,9 +2539,7 @@ interface CreateTablePluginProvides {
2495
2539
  };
2496
2540
  };
2497
2541
  }
2498
- declare const createTablePlugin: Plugin<{}, {
2499
- api: ApiClient;
2500
- } & EventEmissionContext, CreateTablePluginProvides>;
2542
+ declare const createTablePlugin: Plugin<ApiPluginProvides & EventEmissionProvides, CreateTablePluginProvides>;
2501
2543
 
2502
2544
  declare const FieldItemSchema: z.ZodObject<{
2503
2545
  id: z.ZodString;
@@ -2572,9 +2614,7 @@ interface ListTableFieldsPluginProvides {
2572
2614
  };
2573
2615
  };
2574
2616
  }
2575
- declare const listTableFieldsPlugin: Plugin<{}, {
2576
- api: ApiClient;
2577
- } & EventEmissionContext, ListTableFieldsPluginProvides>;
2617
+ declare const listTableFieldsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, ListTableFieldsPluginProvides>;
2578
2618
 
2579
2619
  declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
2580
2620
  table: z.ZodString & {
@@ -2676,9 +2716,7 @@ interface CreateTableFieldsPluginProvides {
2676
2716
  };
2677
2717
  };
2678
2718
  }
2679
- declare const createTableFieldsPlugin: Plugin<{}, {
2680
- api: ApiClient;
2681
- } & EventEmissionContext, CreateTableFieldsPluginProvides>;
2719
+ declare const createTableFieldsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, CreateTableFieldsPluginProvides>;
2682
2720
 
2683
2721
  declare const DeleteTableFieldsOptionsSchema: z.ZodObject<{
2684
2722
  table: z.ZodString & {
@@ -2710,9 +2748,7 @@ interface DeleteTableFieldsPluginProvides {
2710
2748
  };
2711
2749
  };
2712
2750
  }
2713
- declare const deleteTableFieldsPlugin: Plugin<{}, {
2714
- api: ApiClient;
2715
- } & EventEmissionContext, DeleteTableFieldsPluginProvides>;
2751
+ declare const deleteTableFieldsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, DeleteTableFieldsPluginProvides>;
2716
2752
 
2717
2753
  declare const RecordItemSchema: z.ZodObject<{
2718
2754
  id: z.ZodString;
@@ -2761,9 +2797,7 @@ interface GetTableRecordPluginProvides {
2761
2797
  };
2762
2798
  };
2763
2799
  }
2764
- declare const getTableRecordPlugin: Plugin<{}, {
2765
- api: ApiClient;
2766
- } & EventEmissionContext, GetTableRecordPluginProvides>;
2800
+ declare const getTableRecordPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, GetTableRecordPluginProvides>;
2767
2801
 
2768
2802
  declare const ListTableRecordsOptionsSchema: z.ZodObject<{
2769
2803
  table: z.ZodString & {
@@ -2864,7 +2898,7 @@ interface ListTableRecordsPluginProvides {
2864
2898
  };
2865
2899
  };
2866
2900
  }
2867
- declare const listTableRecordsPlugin: Plugin<{}, GetContextType<ApiPluginProvides> & EventEmissionContext, ListTableRecordsPluginProvides>;
2901
+ declare const listTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, ListTableRecordsPluginProvides>;
2868
2902
 
2869
2903
  declare const CreateTableRecordsOptionsSchema: z.ZodObject<{
2870
2904
  table: z.ZodString & {
@@ -2906,9 +2940,7 @@ interface CreateTableRecordsPluginProvides {
2906
2940
  };
2907
2941
  };
2908
2942
  }
2909
- declare const createTableRecordsPlugin: Plugin<{}, {
2910
- api: ApiClient;
2911
- } & EventEmissionContext, CreateTableRecordsPluginProvides>;
2943
+ declare const createTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, CreateTableRecordsPluginProvides>;
2912
2944
 
2913
2945
  declare const DeleteTableRecordsOptionsSchema: z.ZodObject<{
2914
2946
  table: z.ZodString & {
@@ -2940,9 +2972,7 @@ interface DeleteTableRecordsPluginProvides {
2940
2972
  };
2941
2973
  };
2942
2974
  }
2943
- declare const deleteTableRecordsPlugin: Plugin<{}, {
2944
- api: ApiClient;
2945
- } & EventEmissionContext, DeleteTableRecordsPluginProvides>;
2975
+ declare const deleteTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, DeleteTableRecordsPluginProvides>;
2946
2976
 
2947
2977
  declare const UpdateTableRecordsOptionsSchema: z.ZodObject<{
2948
2978
  table: z.ZodString & {
@@ -2986,9 +3016,7 @@ interface UpdateTableRecordsPluginProvides {
2986
3016
  };
2987
3017
  };
2988
3018
  }
2989
- declare const updateTableRecordsPlugin: Plugin<{}, {
2990
- api: ApiClient;
2991
- } & EventEmissionContext, UpdateTableRecordsPluginProvides>;
3019
+ declare const updateTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, UpdateTableRecordsPluginProvides>;
2992
3020
 
2993
3021
  /**
2994
3022
  * SDK-related types and interfaces
@@ -3046,6 +3074,13 @@ declare const BaseSdkOptionsSchema: z.ZodObject<{
3046
3074
  trackingBaseUrl: z.ZodOptional<z.ZodString>;
3047
3075
  maxNetworkRetries: z.ZodOptional<z.ZodNumber>;
3048
3076
  maxNetworkRetryDelayMs: z.ZodOptional<z.ZodNumber>;
3077
+ isInteractive: z.ZodOptional<z.ZodBoolean>;
3078
+ approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
3079
+ maxApprovalRetries: z.ZodOptional<z.ZodNumber>;
3080
+ approvalMode: z.ZodOptional<z.ZodEnum<{
3081
+ poll: "poll";
3082
+ fail: "fail";
3083
+ }>>;
3049
3084
  manifestPath: z.ZodOptional<z.ZodString>;
3050
3085
  manifest: z.ZodOptional<z.ZodCustom<Manifest, Manifest>>;
3051
3086
  onEvent: z.ZodOptional<z.ZodCustom<EventCallback, EventCallback>>;
@@ -3095,9 +3130,9 @@ interface FunctionDeprecation {
3095
3130
  /** User-facing deprecation message for why/how to migrate */
3096
3131
  message: string;
3097
3132
  }
3098
- interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListConnectionsPluginProvides & GetConnectionPluginProvides & FindFirstConnectionPluginProvides & FindUniqueConnectionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListClientCredentialsPluginProvides & CreateClientCredentialsPluginProvides & DeleteClientCredentialsPluginProvides & ListInputFieldsPluginProvides & GetInputFieldsSchemaPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides & EventEmissionProvides & ApiPluginProvides & ListTablesPluginProvides & GetTablePluginProvides & DeleteTablePluginProvides & CreateTablePluginProvides & ListTableFieldsPluginProvides & CreateTableFieldsPluginProvides & DeleteTableFieldsPluginProvides & GetTableRecordPluginProvides & ListTableRecordsPluginProvides & CreateTableRecordsPluginProvides & DeleteTableRecordsPluginProvides & UpdateTableRecordsPluginProvides> {
3133
+ type ZapierSdk = RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListConnectionsPluginProvides & GetConnectionPluginProvides & FindFirstConnectionPluginProvides & FindUniqueConnectionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListClientCredentialsPluginProvides & CreateClientCredentialsPluginProvides & DeleteClientCredentialsPluginProvides & ListInputFieldsPluginProvides & GetInputFieldsSchemaPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides & EventEmissionProvides & ApiPluginProvides & ListTablesPluginProvides & GetTablePluginProvides & DeleteTablePluginProvides & CreateTablePluginProvides & ListTableFieldsPluginProvides & CreateTableFieldsPluginProvides & DeleteTableFieldsPluginProvides & GetTableRecordPluginProvides & ListTableRecordsPluginProvides & CreateTableRecordsPluginProvides & DeleteTableRecordsPluginProvides & UpdateTableRecordsPluginProvides & {
3099
3134
  apps: ActionProxy & ZapierSdkApps;
3100
- }
3135
+ };
3101
3136
 
3102
3137
  interface FormattedItem {
3103
3138
  title: string;
@@ -3279,8 +3314,8 @@ type ConnectionItem$1 = z.infer<typeof ConnectionItemSchema>;
3279
3314
 
3280
3315
  declare const ActionItemSchema: z.ZodObject<{
3281
3316
  description: z.ZodString;
3282
- id: z.ZodOptional<z.ZodString>;
3283
3317
  key: z.ZodString;
3318
+ id: z.ZodOptional<z.ZodString>;
3284
3319
  is_important: z.ZodOptional<z.ZodBoolean>;
3285
3320
  is_hidden: z.ZodOptional<z.ZodBoolean>;
3286
3321
  app_key: z.ZodString;
@@ -3801,267 +3836,65 @@ declare const DEFAULT_ACTION_TIMEOUT_MS = 180000;
3801
3836
  */
3802
3837
  declare const ZAPIER_MAX_NETWORK_RETRIES: number;
3803
3838
  declare const ZAPIER_MAX_NETWORK_RETRY_DELAY_MS: number;
3839
+ /**
3840
+ * Whether this session is interactive (user can visit approval URLs).
3841
+ *
3842
+ * Read lazily so tests can set the env var after module import.
3843
+ */
3844
+ declare function getZapierIsInteractive(): boolean;
3845
+ /**
3846
+ * Approval flow behavior from environment variable.
3847
+ * - "poll": (default) Opens the approval URL in a browser and polls until resolved.
3848
+ * - "fail": Creates the approval and throws immediately with the approval URL.
3849
+ *
3850
+ * Read lazily so tests can set the env var after module import.
3851
+ */
3852
+ declare function getZapierApprovalMode(): "poll" | "fail" | undefined;
3853
+ /**
3854
+ * Default timeout for approval polling (10 minutes)
3855
+ */
3856
+ declare const DEFAULT_APPROVAL_TIMEOUT_MS: number;
3857
+ /**
3858
+ * Default cap on chained approval retries for a single request. Multiple
3859
+ * sequential approvals can occur when more than one policy gates the same
3860
+ * action; this cap prevents a runaway loop if the server keeps returning
3861
+ * approval_required after a successful approval.
3862
+ */
3863
+ declare const DEFAULT_MAX_APPROVAL_RETRIES = 2;
3804
3864
 
3805
3865
  interface ZapierSdkOptions extends BaseSdkOptions {
3806
3866
  }
3807
- declare function createSdk<TCurrentSdk = {}, TCurrentContext extends {
3808
- meta: Record<string, PluginMeta>;
3809
- } = {
3810
- meta: Record<string, PluginMeta>;
3811
- }>(options?: ZapierSdkOptions, initialSdk?: TCurrentSdk, initialContext?: TCurrentContext): TCurrentSdk & {
3812
- getContext: () => TCurrentContext;
3813
- addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
3814
- getContext(): TCurrentContext;
3815
- }, TRequiresContext, TProvides>, addPluginOptions?: Record<string, unknown>): Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>>;
3816
- };
3817
- declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<EventEmissionProvides> & ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<CapabilitiesPluginProvides> & ExtractSdkProperties<ConnectionsPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<GetInputFieldsSchemaPluginProvides> & ExtractSdkProperties<ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<ListConnectionsPluginProvides> & ExtractSdkProperties<GetConnectionPluginProvides> & ExtractSdkProperties<FindFirstConnectionPluginProvides> & ExtractSdkProperties<FindUniqueConnectionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<ListClientCredentialsPluginProvides> & ExtractSdkProperties<CreateClientCredentialsPluginProvides> & ExtractSdkProperties<DeleteClientCredentialsPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<ListTablesPluginProvides> & ExtractSdkProperties<GetTablePluginProvides> & ExtractSdkProperties<DeleteTablePluginProvides> & ExtractSdkProperties<CreateTablePluginProvides> & ExtractSdkProperties<ListTableFieldsPluginProvides> & ExtractSdkProperties<CreateTableFieldsPluginProvides> & ExtractSdkProperties<DeleteTableFieldsPluginProvides> & ExtractSdkProperties<GetTableRecordPluginProvides> & ExtractSdkProperties<ListTableRecordsPluginProvides> & ExtractSdkProperties<CreateTableRecordsPluginProvides> & ExtractSdkProperties<DeleteTableRecordsPluginProvides> & ExtractSdkProperties<UpdateTableRecordsPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
3818
- meta: Record<string, PluginMeta>;
3819
- } & EventEmissionContext & {
3820
- api: ApiClient;
3821
- resolveCredentials: () => Promise<ResolvedCredentials | undefined>;
3822
- } & {
3823
- getResolvedManifest: () => Promise<Manifest | null>;
3824
- getVersionedImplementationId: GetVersionedImplementationId;
3825
- resolveAppKeys: ResolveAppKeys;
3826
- getManifestConnections: () => Promise<ConnectionsMap | null>;
3827
- updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
3828
- addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
3829
- findActionEntry: (options: {
3830
- name: string;
3831
- manifest: Manifest;
3832
- }) => ActionEntry | null;
3833
- listActionEntries: (options?: {
3834
- configPath?: string;
3835
- }) => Promise<Array<[string, ActionEntry]>>;
3836
- deleteActionEntry: (options: {
3837
- name: string;
3838
- configPath?: string;
3839
- skipWrite?: boolean;
3840
- }) => Promise<Manifest>;
3841
- hasActionEntry: (options: {
3842
- name: string;
3843
- manifest: Manifest;
3844
- }) => boolean;
3845
- findManifestEntry: (options: {
3846
- appKey: string;
3847
- manifest: Manifest;
3848
- }) => [string, ManifestEntry] | null;
3849
- readManifestFromFile: (filePath: string) => Promise<Manifest | null>;
3850
- } & CapabilitiesContext & {
3851
- resolveConnection: (name: string) => Promise<ConnectionEntry | undefined>;
3852
- getConnectionsMap: () => Promise<ConnectionsMap | null>;
3853
- } & {
3854
- meta: {
3855
- listApps: {
3856
- inputSchema: typeof ListAppsSchema;
3857
- };
3858
- };
3859
- } & {
3860
- meta: {
3861
- getApp: {
3862
- inputSchema: typeof GetAppSchema;
3863
- };
3864
- };
3865
- } & {
3866
- meta: {
3867
- listActions: {
3868
- inputSchema: typeof ListActionsSchema;
3869
- };
3870
- };
3871
- } & {
3872
- meta: {
3873
- getAction: {
3874
- inputSchema: typeof GetActionSchema;
3875
- };
3876
- };
3877
- } & {
3878
- meta: {
3879
- listInputFields: {
3880
- inputSchema: typeof ListInputFieldsSchema;
3881
- };
3882
- };
3883
- } & {
3884
- meta: {
3885
- getInputFieldsSchema: {
3886
- inputSchema: typeof GetInputFieldsSchemaSchema;
3887
- };
3888
- };
3889
- } & {
3890
- meta: {
3891
- listInputFieldChoices: {
3892
- inputSchema: typeof ListInputFieldChoicesSchema;
3893
- };
3894
- };
3895
- } & {
3896
- meta: {
3897
- runAction: {
3898
- inputSchema: typeof RunActionSchema;
3899
- };
3900
- };
3901
- } & {
3902
- meta: {
3903
- listConnections: {
3904
- inputSchema: typeof ListConnectionsQuerySchema;
3905
- };
3906
- };
3907
- } & {
3908
- meta: {
3909
- getConnection: {
3910
- inputSchema: typeof GetConnectionParamSchema;
3911
- };
3912
- };
3913
- } & {
3914
- meta: {
3915
- findFirstConnection: {
3916
- inputSchema: typeof FindFirstConnectionSchema;
3917
- };
3918
- };
3919
- } & {
3920
- meta: {
3921
- findUniqueConnection: {
3922
- inputSchema: typeof FindUniqueConnectionSchema;
3923
- };
3924
- };
3925
- } & {
3926
- meta: {
3927
- listAuthentications: {
3928
- inputSchema: typeof ListConnectionsQuerySchema;
3929
- };
3930
- };
3931
- } & {
3932
- meta: {
3933
- getAuthentication: {
3934
- inputSchema: typeof GetConnectionParamSchema;
3935
- };
3936
- };
3937
- } & {
3938
- meta: {
3939
- findFirstAuthentication: {
3940
- inputSchema: typeof FindFirstConnectionSchema;
3941
- };
3942
- };
3943
- } & {
3944
- meta: {
3945
- findUniqueAuthentication: {
3946
- inputSchema: typeof FindUniqueConnectionSchema;
3947
- };
3948
- };
3949
- } & {
3950
- meta: {
3951
- listClientCredentials: {
3952
- inputSchema: typeof ListClientCredentialsQuerySchema;
3953
- };
3954
- };
3955
- } & {
3956
- meta: {
3957
- createClientCredentials: {
3958
- inputSchema: typeof CreateClientCredentialsSchema;
3959
- };
3960
- };
3961
- } & {
3962
- meta: {
3963
- deleteClientCredentials: {
3964
- inputSchema: typeof DeleteClientCredentialsSchema;
3965
- };
3966
- };
3967
- } & {
3968
- meta: {
3969
- fetch: {
3970
- description: string;
3971
- packages: string[];
3972
- categories: string[];
3973
- returnType: string;
3974
- inputParameters: Array<{
3975
- name: string;
3976
- schema: zod.ZodType;
3977
- }>;
3978
- };
3979
- };
3980
- } & {
3981
- meta: {
3982
- request: {
3983
- inputSchema: typeof RelayRequestSchema;
3984
- };
3985
- };
3986
- } & {
3987
- meta: {
3988
- listTables: {
3989
- inputSchema: typeof ListTablesOptionsSchema;
3990
- };
3991
- };
3992
- } & {
3993
- meta: {
3994
- getTable: {
3995
- inputSchema: typeof GetTableOptionsSchema;
3996
- };
3997
- };
3998
- } & {
3999
- meta: {
4000
- deleteTable: {
4001
- inputSchema: typeof DeleteTableOptionsSchema;
4002
- };
4003
- };
4004
- } & {
4005
- meta: {
4006
- createTable: {
4007
- inputSchema: typeof CreateTableOptionsSchema;
4008
- };
4009
- };
4010
- } & {
4011
- meta: {
4012
- listTableFields: {
4013
- inputSchema: typeof ListTableFieldsOptionsSchema;
4014
- };
4015
- };
4016
- } & {
4017
- meta: {
4018
- createTableFields: {
4019
- inputSchema: typeof CreateTableFieldsOptionsSchema;
4020
- };
4021
- };
4022
- } & {
4023
- meta: {
4024
- deleteTableFields: {
4025
- inputSchema: typeof DeleteTableFieldsOptionsSchema;
4026
- };
4027
- };
4028
- } & {
4029
- meta: {
4030
- getTableRecord: {
4031
- inputSchema: typeof GetTableRecordOptionsSchema;
4032
- };
4033
- };
4034
- } & {
4035
- meta: {
4036
- listTableRecords: {
4037
- inputSchema: typeof ListTableRecordsOptionsSchema;
4038
- };
4039
- };
4040
- } & {
4041
- meta: {
4042
- createTableRecords: {
4043
- inputSchema: typeof CreateTableRecordsOptionsSchema;
4044
- };
3867
+ declare function createOptionsPlugin(options: ZapierSdkOptions): () => {
3868
+ context: {
3869
+ options: ZapierSdkOptions;
4045
3870
  };
4046
- } & {
4047
- meta: {
4048
- deleteTableRecords: {
4049
- inputSchema: typeof DeleteTableRecordsOptionsSchema;
3871
+ };
3872
+ declare function createSdk(): {
3873
+ readonly context: Readonly<{
3874
+ meta: Record<string, PluginMeta>;
3875
+ }>;
3876
+ getContext: () => Readonly<{
3877
+ meta: Record<string, PluginMeta>;
3878
+ }>;
3879
+ addPlugin<TProvides extends PluginProvides>(plugin: Plugin<{
3880
+ context: {
3881
+ meta: Record<string, PluginMeta>;
4050
3882
  };
4051
- };
4052
- } & {
4053
- meta: {
4054
- updateTableRecords: {
4055
- inputSchema: typeof UpdateTableRecordsOptionsSchema;
3883
+ }, TProvides>): WithAddPlugin<{
3884
+ context: {
3885
+ meta: Record<string, PluginMeta>;
4056
3886
  };
3887
+ } & TProvides>;
3888
+ };
3889
+ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): WithAddPlugin<{
3890
+ context: {
3891
+ meta: Record<string, PluginMeta>;
4057
3892
  };
4058
3893
  } & {
4059
- meta: {
4060
- getProfile: {
4061
- inputSchema: typeof GetProfileSchema;
4062
- };
3894
+ context: {
3895
+ options: ZapierSdkOptions;
4063
3896
  };
4064
- }>;
3897
+ } & EventEmissionProvides & ApiPluginProvides & ManifestPluginProvides & CapabilitiesPluginProvides & ConnectionsPluginProvides & ListAppsPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & ListInputFieldsPluginProvides & GetInputFieldsSchemaPluginProvides & ListInputFieldChoicesPluginProvides & RunActionPluginProvides & ListConnectionsPluginProvides & GetConnectionPluginProvides & FindFirstConnectionPluginProvides & FindUniqueConnectionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListClientCredentialsPluginProvides & CreateClientCredentialsPluginProvides & DeleteClientCredentialsPluginProvides & FetchPluginProvides & RequestPluginProvides & ListTablesPluginProvides & GetTablePluginProvides & DeleteTablePluginProvides & CreateTablePluginProvides & ListTableFieldsPluginProvides & CreateTableFieldsPluginProvides & DeleteTableFieldsPluginProvides & GetTableRecordPluginProvides & ListTableRecordsPluginProvides & CreateTableRecordsPluginProvides & DeleteTableRecordsPluginProvides & UpdateTableRecordsPluginProvides & AppsPluginProvides & GetProfilePluginProvides>;
4065
3898
  declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
4066
3899
 
4067
- export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionProperty, ActionPropertySchema, type ActionTimeoutMsProperty, ActionTimeoutMsPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppFactoryInput, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppProperty, AppPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AppsProperty, AppsPropertySchema, type ArrayResolver, type AuthEvent, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type BaseEvent, BaseSdkOptionsSchema, type BatchOptions, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, type Choice, type ClientCredentialsObject, ClientCredentialsObjectSchema, type Connection, type ConnectionEntry, ConnectionEntrySchema, type ConnectionIdProperty, ConnectionIdPropertySchema, type ConnectionItem, type ConnectionProperty, ConnectionPropertySchema, type ConnectionsMap, ConnectionsMapSchema, type ConnectionsPluginProvides, type ConnectionsProperty, ConnectionsPropertySchema, type ConnectionsResponse, type CreateClientCredentialsPluginProvides, type CreateTableFieldsPluginProvides, type CreateTablePluginProvides, type CreateTableRecordsPluginProvides, type Credentials, type CredentialsFunction, CredentialsFunctionSchema, type CredentialsObject, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_PAGE_SIZE, type DebugProperty, DebugPropertySchema, type DeleteClientCredentialsPluginProvides, type DeleteTableFieldsPluginProvides, type DeleteTablePluginProvides, type DeleteTableRecordsPluginProvides, type DynamicResolver, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type FetchPluginProvides, type Field, type FieldsProperty, FieldsPropertySchema, type FieldsResolver, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindFirstConnectionPluginProvides, type FindUniqueAuthenticationPluginProvides, type FindUniqueConnectionPluginProvides, type FormatMetadata, type FormattedItem, type FunctionDeprecation, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetConnectionPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type GetTablePluginProvides, type GetTableRecordPluginProvides, type InfoFieldItem, type InputFieldItem, type InputFieldProperty, InputFieldPropertySchema, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListClientCredentialsPluginProvides, type ListConnectionsPluginProvides, type ListInputFieldsPluginProvides, type ListTableFieldsPluginProvides, type ListTableRecordsPluginProvides, type ListTablesPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputFormatter, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, PkceCredentialsObjectSchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, type RateLimitInfo, type RecordProperty, RecordPropertySchema, type RecordsProperty, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, ResolvedCredentialsSchema, type Resolver, type ResolverMetadata, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type SdkPage, type StaticResolver, type TableProperty, TablePropertySchema, type TablesProperty, TablesPropertySchema, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UpdateTableRecordsPluginProvides, type UserProfile, type UserProfileItem, ZAPIER_BASE_URL, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listInputFieldsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, updateTableRecordsPlugin };
3900
+ export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionProperty, ActionPropertySchema, type ActionTimeoutMsProperty, ActionTimeoutMsPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppFactoryInput, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppProperty, AppPropertySchema, type ApplicationLifecycleEventData, type ApprovalStatus, type AppsPluginProvides, type AppsProperty, AppsPropertySchema, type ArrayResolver, type AuthEvent, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type BaseEvent, BaseSdkOptionsSchema, type BatchOptions, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, type Choice, type ClientCredentialsObject, ClientCredentialsObjectSchema, type Connection, type ConnectionEntry, ConnectionEntrySchema, type ConnectionIdProperty, ConnectionIdPropertySchema, type ConnectionItem, type ConnectionProperty, ConnectionPropertySchema, type ConnectionsMap, ConnectionsMapSchema, type ConnectionsPluginProvides, type ConnectionsProperty, ConnectionsPropertySchema, type ConnectionsResponse, type CreateClientCredentialsPluginProvides, type CreateTableFieldsPluginProvides, type CreateTablePluginProvides, type CreateTableRecordsPluginProvides, type Credentials, type CredentialsFunction, CredentialsFunctionSchema, type CredentialsObject, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, type DebugProperty, DebugPropertySchema, type DeleteClientCredentialsPluginProvides, type DeleteTableFieldsPluginProvides, type DeleteTablePluginProvides, type DeleteTableRecordsPluginProvides, type DynamicResolver, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type EventEmissionProvides, type FetchPluginProvides, type Field, type FieldsProperty, FieldsPropertySchema, type FieldsResolver, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindFirstConnectionPluginProvides, type FindUniqueAuthenticationPluginProvides, type FindUniqueConnectionPluginProvides, type FormatMetadata, type FormattedItem, type FunctionDeprecation, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetConnectionPluginProvides, type GetProfilePluginProvides, type GetTablePluginProvides, type GetTableRecordPluginProvides, type InfoFieldItem, type InputFieldItem, type InputFieldProperty, InputFieldPropertySchema, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListClientCredentialsPluginProvides, type ListConnectionsPluginProvides, type ListInputFieldsPluginProvides, type ListTableFieldsPluginProvides, type ListTableRecordsPluginProvides, type ListTablesPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputFormatter, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, PkceCredentialsObjectSchema, type Plugin, type PluginProvides, type PositionalMetadata, type RateLimitInfo, type RecordProperty, RecordPropertySchema, type RecordsProperty, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, ResolvedCredentialsSchema, type Resolver, type ResolverMetadata, type RootFieldItem, type RunActionPluginProvides, type SdkEvent, type SdkPage, type StaticResolver, type TableProperty, TablePropertySchema, type TablesProperty, TablesPropertySchema, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UpdateTableRecordsPluginProvides, type UserProfile, type UserProfileItem, type WithAddPlugin, ZAPIER_BASE_URL, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createOptionsPlugin, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierIsInteractive, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listInputFieldsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, updateTableRecordsPlugin };