@zapier/zapier-sdk 0.13.3 → 0.13.5

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 (81) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/schemas.d.ts +174 -174
  3. package/dist/constants.d.ts +4 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +4 -0
  6. package/dist/index.cjs +457 -11
  7. package/dist/index.d.mts +389 -158
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1 -0
  11. package/dist/index.mjs +428 -15
  12. package/dist/plugins/api/index.d.ts +1 -3
  13. package/dist/plugins/api/index.d.ts.map +1 -1
  14. package/dist/plugins/eventEmission/builders.d.ts +13 -0
  15. package/dist/plugins/eventEmission/builders.d.ts.map +1 -0
  16. package/dist/plugins/eventEmission/builders.js +78 -0
  17. package/dist/plugins/eventEmission/index.d.ts +34 -0
  18. package/dist/plugins/eventEmission/index.d.ts.map +1 -0
  19. package/dist/plugins/eventEmission/index.js +216 -0
  20. package/dist/plugins/eventEmission/index.test.d.ts +5 -0
  21. package/dist/plugins/eventEmission/index.test.d.ts.map +1 -0
  22. package/dist/plugins/eventEmission/index.test.js +143 -0
  23. package/dist/plugins/eventEmission/transport.d.ts +37 -0
  24. package/dist/plugins/eventEmission/transport.d.ts.map +1 -0
  25. package/dist/plugins/eventEmission/transport.js +96 -0
  26. package/dist/plugins/eventEmission/transport.test.d.ts +5 -0
  27. package/dist/plugins/eventEmission/transport.test.d.ts.map +1 -0
  28. package/dist/plugins/eventEmission/transport.test.js +153 -0
  29. package/dist/plugins/eventEmission/types.d.ts +53 -0
  30. package/dist/plugins/eventEmission/types.d.ts.map +1 -0
  31. package/dist/plugins/eventEmission/types.js +1 -0
  32. package/dist/plugins/eventEmission/utils.d.ts +45 -0
  33. package/dist/plugins/eventEmission/utils.d.ts.map +1 -0
  34. package/dist/plugins/eventEmission/utils.js +114 -0
  35. package/dist/plugins/fetch/schemas.d.ts +4 -4
  36. package/dist/plugins/getAction/schemas.d.ts +2 -2
  37. package/dist/plugins/listActions/index.test.js +3 -1
  38. package/dist/plugins/listActions/schemas.d.ts +2 -2
  39. package/dist/plugins/listAuthentications/index.test.js +3 -1
  40. package/dist/plugins/listInputFieldChoices/schemas.d.ts +4 -4
  41. package/dist/plugins/listInputFields/schemas.d.ts +2 -2
  42. package/dist/plugins/manifest/index.d.ts +9 -1
  43. package/dist/plugins/manifest/index.d.ts.map +1 -1
  44. package/dist/plugins/manifest/index.js +19 -7
  45. package/dist/plugins/manifest/index.test.js +4 -2
  46. package/dist/plugins/request/schemas.d.ts +4 -4
  47. package/dist/plugins/runAction/schemas.d.ts +2 -2
  48. package/dist/resolvers/actionType.d.ts.map +1 -1
  49. package/dist/resolvers/actionType.js +2 -3
  50. package/dist/resolvers/authenticationId.d.ts.map +1 -1
  51. package/dist/schemas/Action.d.ts +2 -2
  52. package/dist/schemas/App.d.ts +30 -30
  53. package/dist/sdk.d.ts +3 -3
  54. package/dist/sdk.d.ts.map +1 -1
  55. package/dist/sdk.js +4 -1
  56. package/dist/types/sdk.d.ts +5 -1
  57. package/dist/types/sdk.d.ts.map +1 -1
  58. package/dist/types/telemetry-events.d.ts +76 -0
  59. package/dist/types/telemetry-events.d.ts.map +1 -0
  60. package/dist/types/telemetry-events.js +8 -0
  61. package/package.json +1 -1
  62. package/src/constants.ts +6 -0
  63. package/src/index.ts +24 -0
  64. package/src/plugins/api/index.ts +1 -5
  65. package/src/plugins/eventEmission/builders.ts +115 -0
  66. package/src/plugins/eventEmission/index.test.ts +169 -0
  67. package/src/plugins/eventEmission/index.ts +294 -0
  68. package/src/plugins/eventEmission/transport.test.ts +214 -0
  69. package/src/plugins/eventEmission/transport.ts +135 -0
  70. package/src/plugins/eventEmission/types.ts +58 -0
  71. package/src/plugins/eventEmission/utils.ts +121 -0
  72. package/src/plugins/listActions/index.test.ts +3 -1
  73. package/src/plugins/listAuthentications/index.test.ts +3 -1
  74. package/src/plugins/manifest/index.test.ts +4 -4
  75. package/src/plugins/manifest/index.ts +39 -14
  76. package/src/resolvers/actionType.ts +4 -3
  77. package/src/resolvers/authenticationId.ts +2 -1
  78. package/src/sdk.ts +5 -1
  79. package/src/types/sdk.ts +7 -1
  80. package/src/types/telemetry-events.ts +85 -0
  81. package/tsconfig.tsbuildinfo +1 -1
package/dist/index.d.mts CHANGED
@@ -39,6 +39,304 @@ interface LoadingEvent extends SdkEvent {
39
39
  }
40
40
  type EventCallback = (event: SdkEvent) => void;
41
41
 
42
+ /**
43
+ * ------------------------------
44
+ * Plugin Type System with Explicit Context Dependencies
45
+ * ------------------------------
46
+ *
47
+ * This system makes context dependencies explicit to restore TypeScript's
48
+ * ability to catch missing context at compile time.
49
+ */
50
+
51
+ interface PluginDependencies<TSdk = {}, TContext = {}> {
52
+ sdk: TSdk;
53
+ context: TContext;
54
+ }
55
+ interface PluginProvides extends Record<string, any> {
56
+ context?: Record<string, any>;
57
+ }
58
+ interface PluginMeta {
59
+ categories: string[];
60
+ type?: "list" | "item";
61
+ itemType?: string;
62
+ returnType?: string;
63
+ inputSchema: z.ZodSchema;
64
+ outputSchema?: z.ZodSchema;
65
+ resolvers?: Record<string, any>;
66
+ [key: string]: any;
67
+ }
68
+ type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
69
+ type ExtractContextProperties<T extends PluginProvides> = T["context"];
70
+ type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
71
+ getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
72
+ };
73
+ type GetContextType<TPluginProvides extends PluginProvides> = NonNullable<ExtractContextProperties<TPluginProvides>>;
74
+ type PluginOptions<TSdk = {}, TContext = {}> = {
75
+ sdk: TSdk;
76
+ context: TContext & {
77
+ meta: Record<string, any>;
78
+ };
79
+ };
80
+ /**
81
+ * Plugin interface — now has 3 type params:
82
+ *
83
+ * TRequiresContext = what this plugin *needs* in context
84
+ * TProvides = what this plugin *returns* (sdk + context)
85
+ * TSdk = current sdk shape when plugin runs
86
+ */
87
+ interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
88
+ (params: {
89
+ sdk: TSdk;
90
+ context: TRequiresContext & {
91
+ meta: Record<string, PluginMeta>;
92
+ options: BaseSdkOptions;
93
+ };
94
+ }): TProvides;
95
+ }
96
+ type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
97
+ [K in keyof TRequired]: K extends keyof TCurrent ? never : K;
98
+ }[keyof TRequired] : keyof TRequired : never;
99
+ 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";
100
+ /**
101
+ * SDK interface — result of createSdk()
102
+ *
103
+ * addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
104
+ * If not, TypeScript will emit a detailed error showing missing properties.
105
+ */
106
+ type Sdk<TCurrentSdk = {}, TCurrentContext = {
107
+ meta: Record<string, PluginMeta>;
108
+ }> = TCurrentSdk & {
109
+ addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
110
+ getContext(): TCurrentContext;
111
+ }, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
112
+ getContext(): TCurrentContext;
113
+ };
114
+
115
+ /**
116
+ * Event emission types matching Avro schemas for SDK telemetry
117
+ *
118
+ * These interfaces correspond to the Avro schemas:
119
+ * - application_lifecycle_event.avsc
120
+ * - error_occurred_event.avsc
121
+ */
122
+ interface BaseEvent {
123
+ event_id: string;
124
+ timestamp_ms: number;
125
+ release_id: string;
126
+ customuser_id?: number | null;
127
+ account_id?: number | null;
128
+ identity_id?: number | null;
129
+ visitor_id?: string | null;
130
+ correlation_id?: string | null;
131
+ }
132
+ interface ErrorOccurredEvent extends BaseEvent {
133
+ zap_id?: number | null;
134
+ node_id?: number | null;
135
+ selected_api?: string | null;
136
+ app_id?: number | null;
137
+ app_version_id?: number | null;
138
+ error_message: string;
139
+ error_type?: string | null;
140
+ error_status_code?: number | null;
141
+ error_stack_trace?: string | null;
142
+ error_source_method?: string | null;
143
+ error_source_file?: string | null;
144
+ error_line_number?: number | null;
145
+ operation_type?: string | null;
146
+ operation_key?: string | null;
147
+ error_severity?: string | null;
148
+ is_user_facing: boolean;
149
+ is_recoverable?: boolean | null;
150
+ sdk_version?: string | null;
151
+ error_metadata?: Record<string, string | null> | null;
152
+ parent_error_id?: string | null;
153
+ error_occurred_timestamp_ms?: number | null;
154
+ error_code?: string | null;
155
+ recovery_attempted?: boolean | null;
156
+ recovery_action?: string | null;
157
+ recovery_successful?: boolean | null;
158
+ environment?: string | null;
159
+ execution_time_before_error_ms?: number | null;
160
+ }
161
+ interface ApplicationLifecycleEvent extends BaseEvent {
162
+ lifecycle_event_type: "startup" | "exit" | "signal_termination";
163
+ selected_api?: string | null;
164
+ app_id?: number | null;
165
+ app_version_id?: number | null;
166
+ sdk_version?: string | null;
167
+ cli_version?: string | null;
168
+ exit_code?: number | null;
169
+ signal_name?: string | null;
170
+ uptime_ms?: number | null;
171
+ memory_usage_bytes?: number | null;
172
+ peak_memory_usage_bytes?: number | null;
173
+ cpu_time_ms?: number | null;
174
+ os_platform?: string | null;
175
+ os_release?: string | null;
176
+ os_architecture?: string | null;
177
+ platform_versions?: Record<string, string | null> | null;
178
+ environment?: string | null;
179
+ is_ci_environment?: boolean | null;
180
+ ci_platform?: string | null;
181
+ session_id?: string | null;
182
+ metadata?: Record<string, string | null> | null;
183
+ process_argv?: (string | null)[] | null;
184
+ is_graceful_shutdown?: boolean | null;
185
+ shutdown_duration_ms?: number | null;
186
+ active_requests_count?: number | null;
187
+ }
188
+
189
+ /**
190
+ * Transport abstraction layer for event emission
191
+ *
192
+ * Provides configurable transport mechanisms for emitting telemetry events.
193
+ * All transports implement silent failure to prevent SDK disruption.
194
+ */
195
+ interface EventTransport {
196
+ emit<T extends any>(subject: string, event: T): Promise<void>;
197
+ close?(): Promise<void>;
198
+ }
199
+ interface TransportConfig {
200
+ type: "http" | "console" | "noop";
201
+ endpoint?: string;
202
+ headers?: Record<string, string>;
203
+ retryAttempts?: number;
204
+ retryDelayMs?: number;
205
+ }
206
+
207
+ interface EventContext {
208
+ customuser_id?: number | null;
209
+ account_id?: number | null;
210
+ identity_id?: number | null;
211
+ visitor_id?: string | null;
212
+ correlation_id?: string | null;
213
+ selected_api?: string | null;
214
+ app_id?: number | null;
215
+ app_version_id?: number | null;
216
+ zap_id?: number | null;
217
+ node_id?: number | null;
218
+ environment?: string | null;
219
+ sdk_version?: string | null;
220
+ operation_type?: string | null;
221
+ }
222
+ interface ErrorEventData {
223
+ error_message: string;
224
+ is_user_facing: boolean;
225
+ error_type?: string | null;
226
+ error_status_code?: number | null;
227
+ error_stack_trace?: string | null;
228
+ error_source_method?: string | null;
229
+ error_source_file?: string | null;
230
+ error_line_number?: number | null;
231
+ operation_type?: string | null;
232
+ operation_key?: string | null;
233
+ error_severity?: string | null;
234
+ is_recoverable?: boolean | null;
235
+ error_metadata?: Record<string, string | null> | null;
236
+ parent_error_id?: string | null;
237
+ error_occurred_timestamp_ms?: number | null;
238
+ error_code?: string | null;
239
+ recovery_attempted?: boolean | null;
240
+ recovery_action?: string | null;
241
+ recovery_successful?: boolean | null;
242
+ execution_time_before_error_ms?: number | null;
243
+ }
244
+ interface EnhancedErrorEventData extends ErrorEventData {
245
+ execution_start_time?: number | null;
246
+ }
247
+ interface ApplicationLifecycleEventData {
248
+ lifecycle_event_type: "startup" | "exit" | "signal_termination";
249
+ exit_code?: number | null;
250
+ signal_name?: string | null;
251
+ uptime_ms?: number | null;
252
+ is_graceful_shutdown?: boolean | null;
253
+ shutdown_duration_ms?: number | null;
254
+ memory_usage_bytes?: number | null;
255
+ peak_memory_usage_bytes?: number | null;
256
+ cpu_time_ms?: number | null;
257
+ active_requests_count?: number | null;
258
+ }
259
+
260
+ /**
261
+ * Event builder utilities for creating telemetry events
262
+ *
263
+ * Provides builder functions that auto-populate common fields and ensure
264
+ * schema compliance for all event types.
265
+ */
266
+
267
+ declare function createBaseEvent(context?: EventContext): BaseEvent;
268
+ declare function buildErrorEvent(data: ErrorEventData, context?: EventContext): ErrorOccurredEvent;
269
+ declare function buildApplicationLifecycleEvent(data: ApplicationLifecycleEventData, context?: EventContext): ApplicationLifecycleEvent;
270
+ declare function buildErrorEventWithContext(data: EnhancedErrorEventData, context?: EventContext): ErrorOccurredEvent;
271
+
272
+ /**
273
+ * Simple utility functions for event emission
274
+ * These are pure functions that can be used to populate common event fields
275
+ */
276
+ /**
277
+ * Generate a unique event ID
278
+ */
279
+ declare function generateEventId(): string;
280
+ /**
281
+ * Get current timestamp in milliseconds since epoch
282
+ */
283
+ declare function getCurrentTimestamp(): number;
284
+ /**
285
+ * Get release ID (git SHA) - in production this would come from build process
286
+ */
287
+ declare function getReleaseId(): string;
288
+ /**
289
+ * Get operating system information
290
+ */
291
+ declare function getOsInfo(): {
292
+ platform: string | null;
293
+ release: string | null;
294
+ architecture: string | null;
295
+ };
296
+ /**
297
+ * Get platform versions (Node.js, npm, etc.)
298
+ */
299
+ declare function getPlatformVersions(): Record<string, string | null>;
300
+ /**
301
+ * Check if running in CI environment
302
+ */
303
+ declare function isCi(): boolean;
304
+ /**
305
+ * Get CI platform name if running in CI
306
+ */
307
+ declare function getCiPlatform(): string | null;
308
+ /**
309
+ * Get memory usage in bytes
310
+ */
311
+ declare function getMemoryUsage(): number | null;
312
+ /**
313
+ * Get CPU time in milliseconds
314
+ */
315
+ declare function getCpuTime(): number | null;
316
+
317
+ /**
318
+ * Event Emission Plugin for Zapier SDK
319
+ *
320
+ * Provides silent telemetry event emission capability to the SDK.
321
+ * All events are emitted asynchronously and failures are silently handled.
322
+ */
323
+
324
+ interface EventEmissionConfig {
325
+ enabled?: boolean;
326
+ transport?: TransportConfig;
327
+ }
328
+ interface EventEmissionContext {
329
+ eventEmission: {
330
+ transport: EventTransport;
331
+ config: EventEmissionConfig;
332
+ emit<T extends any>(subject: string, event: T): void;
333
+ createBaseEvent(): BaseEvent;
334
+ };
335
+ }
336
+ interface EventEmissionProvides {
337
+ context: EventEmissionContext;
338
+ }
339
+
42
340
  declare const NeedSchema: z.ZodObject<{
43
341
  key: z.ZodString;
44
342
  alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -49,13 +347,13 @@ declare const NeedSchema: z.ZodObject<{
49
347
  sample: z.ZodOptional<z.ZodString>;
50
348
  value: z.ZodOptional<z.ZodString>;
51
349
  }, "strip", z.ZodTypeAny, {
52
- value?: string | undefined;
53
350
  key?: string | undefined;
351
+ value?: string | undefined;
54
352
  label?: string | undefined;
55
353
  sample?: string | undefined;
56
354
  }, {
57
- value?: string | undefined;
58
355
  key?: string | undefined;
356
+ value?: string | undefined;
59
357
  label?: string | undefined;
60
358
  sample?: string | undefined;
61
359
  }>, "many">>;
@@ -83,12 +381,13 @@ declare const NeedSchema: z.ZodObject<{
83
381
  }, "strip", z.ZodTypeAny, {
84
382
  key: string;
85
383
  type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
384
+ list?: boolean | undefined;
86
385
  label?: string | undefined;
87
386
  alters_custom_fields?: boolean | null | undefined;
88
387
  capabilities?: string[] | undefined;
89
388
  choices?: {
90
- value?: string | undefined;
91
389
  key?: string | undefined;
390
+ value?: string | undefined;
92
391
  label?: string | undefined;
93
392
  sample?: string | undefined;
94
393
  }[] | undefined;
@@ -110,16 +409,16 @@ declare const NeedSchema: z.ZodObject<{
110
409
  searchfill?: string | undefined;
111
410
  send_in_json?: boolean | undefined;
112
411
  regex?: string | undefined;
113
- list?: boolean | undefined;
114
412
  }, {
115
413
  key: string;
116
414
  type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
415
+ list?: boolean | undefined;
117
416
  label?: string | undefined;
118
417
  alters_custom_fields?: boolean | null | undefined;
119
418
  capabilities?: string[] | undefined;
120
419
  choices?: {
121
- value?: string | undefined;
122
420
  key?: string | undefined;
421
+ value?: string | undefined;
123
422
  label?: string | undefined;
124
423
  sample?: string | undefined;
125
424
  }[] | undefined;
@@ -141,7 +440,6 @@ declare const NeedSchema: z.ZodObject<{
141
440
  searchfill?: string | undefined;
142
441
  send_in_json?: boolean | undefined;
143
442
  regex?: string | undefined;
144
- list?: boolean | undefined;
145
443
  }>;
146
444
  declare const ActionSchema: z.ZodObject<{
147
445
  id: z.ZodOptional<z.ZodString>;
@@ -153,7 +451,7 @@ declare const ActionSchema: z.ZodObject<{
153
451
  is_hidden: z.ZodOptional<z.ZodBoolean>;
154
452
  selected_api: z.ZodOptional<z.ZodString>;
155
453
  }, "strip", z.ZodTypeAny, {
156
- type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
454
+ type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
157
455
  key: string;
158
456
  name: string;
159
457
  description: string;
@@ -162,7 +460,7 @@ declare const ActionSchema: z.ZodObject<{
162
460
  is_hidden?: boolean | undefined;
163
461
  selected_api?: string | undefined;
164
462
  }, {
165
- type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
463
+ type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
166
464
  key: string;
167
465
  name: string;
168
466
  description: string;
@@ -680,11 +978,11 @@ declare const AppSchema: z.ZodObject<{
680
978
  popularity: number;
681
979
  primary_color: string;
682
980
  slug: string;
981
+ categories?: string[] | undefined;
683
982
  id?: number | undefined;
684
983
  age_in_days?: string | undefined;
685
984
  api_docs_url?: string | null | undefined;
686
985
  banner?: string | undefined;
687
- categories?: string[] | undefined;
688
986
  canonical_id?: string | undefined;
689
987
  days_since_last_update?: string | undefined;
690
988
  hashtag?: string | undefined;
@@ -711,11 +1009,11 @@ declare const AppSchema: z.ZodObject<{
711
1009
  popularity: number;
712
1010
  primary_color: string;
713
1011
  slug: string;
1012
+ categories?: string[] | undefined;
714
1013
  id?: number | undefined;
715
1014
  age_in_days?: string | undefined;
716
1015
  api_docs_url?: string | null | undefined;
717
1016
  banner?: string | undefined;
718
- categories?: string[] | undefined;
719
1017
  canonical_id?: string | undefined;
720
1018
  days_since_last_update?: string | undefined;
721
1019
  hashtag?: string | undefined;
@@ -763,13 +1061,13 @@ declare const NeedsResponseSchema: z.ZodObject<{
763
1061
  sample: z.ZodOptional<z.ZodString>;
764
1062
  value: z.ZodOptional<z.ZodString>;
765
1063
  }, "strip", z.ZodTypeAny, {
766
- value?: string | undefined;
767
1064
  key?: string | undefined;
1065
+ value?: string | undefined;
768
1066
  label?: string | undefined;
769
1067
  sample?: string | undefined;
770
1068
  }, {
771
- value?: string | undefined;
772
1069
  key?: string | undefined;
1070
+ value?: string | undefined;
773
1071
  label?: string | undefined;
774
1072
  sample?: string | undefined;
775
1073
  }>, "many">>;
@@ -797,12 +1095,13 @@ declare const NeedsResponseSchema: z.ZodObject<{
797
1095
  }, "strip", z.ZodTypeAny, {
798
1096
  key: string;
799
1097
  type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
1098
+ list?: boolean | undefined;
800
1099
  label?: string | undefined;
801
1100
  alters_custom_fields?: boolean | null | undefined;
802
1101
  capabilities?: string[] | undefined;
803
1102
  choices?: {
804
- value?: string | undefined;
805
1103
  key?: string | undefined;
1104
+ value?: string | undefined;
806
1105
  label?: string | undefined;
807
1106
  sample?: string | undefined;
808
1107
  }[] | undefined;
@@ -824,16 +1123,16 @@ declare const NeedsResponseSchema: z.ZodObject<{
824
1123
  searchfill?: string | undefined;
825
1124
  send_in_json?: boolean | undefined;
826
1125
  regex?: string | undefined;
827
- list?: boolean | undefined;
828
1126
  }, {
829
1127
  key: string;
830
1128
  type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
1129
+ list?: boolean | undefined;
831
1130
  label?: string | undefined;
832
1131
  alters_custom_fields?: boolean | null | undefined;
833
1132
  capabilities?: string[] | undefined;
834
1133
  choices?: {
835
- value?: string | undefined;
836
1134
  key?: string | undefined;
1135
+ value?: string | undefined;
837
1136
  label?: string | undefined;
838
1137
  sample?: string | undefined;
839
1138
  }[] | undefined;
@@ -855,7 +1154,6 @@ declare const NeedsResponseSchema: z.ZodObject<{
855
1154
  searchfill?: string | undefined;
856
1155
  send_in_json?: boolean | undefined;
857
1156
  regex?: string | undefined;
858
- list?: boolean | undefined;
859
1157
  }>, "many">>;
860
1158
  errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
861
1159
  last_fetched_at: z.ZodOptional<z.ZodString>;
@@ -864,12 +1162,13 @@ declare const NeedsResponseSchema: z.ZodObject<{
864
1162
  needs?: {
865
1163
  key: string;
866
1164
  type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
1165
+ list?: boolean | undefined;
867
1166
  label?: string | undefined;
868
1167
  alters_custom_fields?: boolean | null | undefined;
869
1168
  capabilities?: string[] | undefined;
870
1169
  choices?: {
871
- value?: string | undefined;
872
1170
  key?: string | undefined;
1171
+ value?: string | undefined;
873
1172
  label?: string | undefined;
874
1173
  sample?: string | undefined;
875
1174
  }[] | undefined;
@@ -891,7 +1190,6 @@ declare const NeedsResponseSchema: z.ZodObject<{
891
1190
  searchfill?: string | undefined;
892
1191
  send_in_json?: boolean | undefined;
893
1192
  regex?: string | undefined;
894
- list?: boolean | undefined;
895
1193
  }[] | undefined;
896
1194
  errors?: string[] | undefined;
897
1195
  last_fetched_at?: string | undefined;
@@ -900,12 +1198,13 @@ declare const NeedsResponseSchema: z.ZodObject<{
900
1198
  needs?: {
901
1199
  key: string;
902
1200
  type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
1201
+ list?: boolean | undefined;
903
1202
  label?: string | undefined;
904
1203
  alters_custom_fields?: boolean | null | undefined;
905
1204
  capabilities?: string[] | undefined;
906
1205
  choices?: {
907
- value?: string | undefined;
908
1206
  key?: string | undefined;
1207
+ value?: string | undefined;
909
1208
  label?: string | undefined;
910
1209
  sample?: string | undefined;
911
1210
  }[] | undefined;
@@ -927,7 +1226,6 @@ declare const NeedsResponseSchema: z.ZodObject<{
927
1226
  searchfill?: string | undefined;
928
1227
  send_in_json?: boolean | undefined;
929
1228
  regex?: string | undefined;
930
- list?: boolean | undefined;
931
1229
  }[] | undefined;
932
1230
  errors?: string[] | undefined;
933
1231
  last_fetched_at?: string | undefined;
@@ -1168,7 +1466,7 @@ declare const ListInputFieldsSchema: z.ZodObject<{
1168
1466
  cursor: z.ZodOptional<z.ZodString>;
1169
1467
  }, "strip", z.ZodTypeAny, {
1170
1468
  appKey: string;
1171
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
1469
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1172
1470
  actionKey: string;
1173
1471
  authenticationId?: number | null | undefined;
1174
1472
  inputs?: Record<string, unknown> | undefined;
@@ -1177,7 +1475,7 @@ declare const ListInputFieldsSchema: z.ZodObject<{
1177
1475
  cursor?: string | undefined;
1178
1476
  }, {
1179
1477
  appKey: string;
1180
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
1478
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1181
1479
  actionKey: string;
1182
1480
  authenticationId?: number | null | undefined;
1183
1481
  inputs?: Record<string, unknown> | undefined;
@@ -1254,7 +1552,7 @@ declare const RelayRequestSchema: z.ZodObject<{
1254
1552
  relayBaseUrl: z.ZodOptional<z.ZodString>;
1255
1553
  }, "strip", z.ZodTypeAny, {
1256
1554
  url: string;
1257
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1555
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1258
1556
  authenticationId?: number | undefined;
1259
1557
  body?: any;
1260
1558
  callbackUrl?: string | undefined;
@@ -1263,7 +1561,7 @@ declare const RelayRequestSchema: z.ZodObject<{
1263
1561
  relayBaseUrl?: string | undefined;
1264
1562
  }, {
1265
1563
  url: string;
1266
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1564
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1267
1565
  authenticationId?: number | undefined;
1268
1566
  body?: any;
1269
1567
  callbackUrl?: string | undefined;
@@ -1284,7 +1582,7 @@ declare const RelayFetchSchema: z.ZodObject<{
1284
1582
  relayBaseUrl: z.ZodOptional<z.ZodString>;
1285
1583
  }, "strip", z.ZodTypeAny, {
1286
1584
  url: string;
1287
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1585
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1288
1586
  authenticationId?: number | undefined;
1289
1587
  body?: any;
1290
1588
  callbackUrl?: string | undefined;
@@ -1293,7 +1591,7 @@ declare const RelayFetchSchema: z.ZodObject<{
1293
1591
  relayBaseUrl?: string | undefined;
1294
1592
  }, {
1295
1593
  url: string;
1296
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1594
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
1297
1595
  authenticationId?: number | undefined;
1298
1596
  body?: any;
1299
1597
  callbackUrl?: string | undefined;
@@ -1302,79 +1600,6 @@ declare const RelayFetchSchema: z.ZodObject<{
1302
1600
  relayBaseUrl?: string | undefined;
1303
1601
  }>;
1304
1602
 
1305
- /**
1306
- * ------------------------------
1307
- * Plugin Type System with Explicit Context Dependencies
1308
- * ------------------------------
1309
- *
1310
- * This system makes context dependencies explicit to restore TypeScript's
1311
- * ability to catch missing context at compile time.
1312
- */
1313
-
1314
- interface PluginDependencies<TSdk = {}, TContext = {}> {
1315
- sdk: TSdk;
1316
- context: TContext;
1317
- }
1318
- interface PluginProvides extends Record<string, any> {
1319
- context?: Record<string, any>;
1320
- }
1321
- interface PluginMeta {
1322
- categories: string[];
1323
- type?: "list" | "item";
1324
- itemType?: string;
1325
- returnType?: string;
1326
- inputSchema: z.ZodSchema;
1327
- outputSchema?: z.ZodSchema;
1328
- resolvers?: Record<string, any>;
1329
- [key: string]: any;
1330
- }
1331
- type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
1332
- type ExtractContextProperties<T extends PluginProvides> = T["context"];
1333
- type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
1334
- getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
1335
- };
1336
- type GetContextType<TPluginProvides extends PluginProvides> = NonNullable<ExtractContextProperties<TPluginProvides>>;
1337
- type PluginOptions<TSdk = {}, TContext = {}> = {
1338
- sdk: TSdk;
1339
- context: TContext & {
1340
- meta: Record<string, any>;
1341
- };
1342
- };
1343
- /**
1344
- * Plugin interface — now has 3 type params:
1345
- *
1346
- * TRequiresContext = what this plugin *needs* in context
1347
- * TProvides = what this plugin *returns* (sdk + context)
1348
- * TSdk = current sdk shape when plugin runs
1349
- */
1350
- interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
1351
- (params: {
1352
- sdk: TSdk;
1353
- context: TRequiresContext & {
1354
- meta: Record<string, PluginMeta>;
1355
- options: BaseSdkOptions;
1356
- };
1357
- }): TProvides;
1358
- }
1359
- type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
1360
- [K in keyof TRequired]: K extends keyof TCurrent ? never : K;
1361
- }[keyof TRequired] : keyof TRequired : never;
1362
- 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";
1363
- /**
1364
- * SDK interface — result of createSdk()
1365
- *
1366
- * addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
1367
- * If not, TypeScript will emit a detailed error showing missing properties.
1368
- */
1369
- type Sdk<TCurrentSdk = {}, TCurrentContext = {
1370
- meta: Record<string, PluginMeta>;
1371
- }> = TCurrentSdk & {
1372
- addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
1373
- getContext(): TCurrentContext;
1374
- }, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
1375
- getContext(): TCurrentContext;
1376
- };
1377
-
1378
1603
  interface RegistryPluginProvides {
1379
1604
  getRegistry: (options?: {
1380
1605
  package?: string;
@@ -1413,6 +1638,15 @@ declare const getProfilePlugin: Plugin<{}, // no SDK dependencies
1413
1638
  }, // requires api in context
1414
1639
  GetProfilePluginProvides>;
1415
1640
 
1641
+ interface ApiPluginOptions extends BaseSdkOptions {
1642
+ }
1643
+ interface ApiPluginProvides {
1644
+ context: {
1645
+ api: ApiClient;
1646
+ };
1647
+ }
1648
+ declare const apiPlugin: Plugin<{}, {}, ApiPluginProvides>;
1649
+
1416
1650
  declare const ActionExecutionInputSchema: z.ZodObject<{
1417
1651
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1418
1652
  authenticationId: z.ZodOptional<z.ZodNumber>;
@@ -1523,7 +1757,7 @@ declare const RunActionSchema: z.ZodObject<{
1523
1757
  cursor: z.ZodOptional<z.ZodString>;
1524
1758
  }, "strip", z.ZodTypeAny, {
1525
1759
  appKey: string;
1526
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
1760
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1527
1761
  actionKey: string;
1528
1762
  authenticationId?: number | null | undefined;
1529
1763
  inputs?: Record<string, unknown> | undefined;
@@ -1532,7 +1766,7 @@ declare const RunActionSchema: z.ZodObject<{
1532
1766
  cursor?: string | undefined;
1533
1767
  }, {
1534
1768
  appKey: string;
1535
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
1769
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1536
1770
  actionKey: string;
1537
1771
  authenticationId?: number | null | undefined;
1538
1772
  inputs?: Record<string, unknown> | undefined;
@@ -1550,11 +1784,11 @@ declare const GetActionSchema: z.ZodObject<{
1550
1784
  actionKey: z.ZodString;
1551
1785
  }, "strip", z.ZodTypeAny, {
1552
1786
  appKey: string;
1553
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
1787
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1554
1788
  actionKey: string;
1555
1789
  }, {
1556
1790
  appKey: string;
1557
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
1791
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1558
1792
  actionKey: string;
1559
1793
  }>;
1560
1794
  type GetActionOptions = z.infer<typeof GetActionSchema>;
@@ -1569,13 +1803,13 @@ declare const ListActionsSchema: z.ZodObject<{
1569
1803
  cursor: z.ZodOptional<z.ZodString>;
1570
1804
  }, "strip", z.ZodTypeAny, {
1571
1805
  appKey: string;
1572
- actionType?: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | undefined;
1806
+ actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
1573
1807
  pageSize?: number | undefined;
1574
1808
  maxItems?: number | undefined;
1575
1809
  cursor?: string | undefined;
1576
1810
  }, {
1577
1811
  appKey: string;
1578
- actionType?: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | undefined;
1812
+ actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
1579
1813
  pageSize?: number | undefined;
1580
1814
  maxItems?: number | undefined;
1581
1815
  cursor?: string | undefined;
@@ -1635,11 +1869,18 @@ declare const ManifestPluginOptionsSchema: z.ZodObject<{
1635
1869
  }>;
1636
1870
 
1637
1871
  type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
1872
+ interface UpdateManifestEntryOptions {
1873
+ appKey: string;
1874
+ entry: ManifestEntry;
1875
+ configPath?: string;
1876
+ skipWrite?: boolean;
1877
+ manifest?: Manifest;
1878
+ }
1638
1879
  interface ManifestPluginProvides {
1639
1880
  context: {
1640
1881
  getVersionedImplementationId: GetVersionedImplementationId;
1641
1882
  resolveAppKeys: ResolveAppKeys;
1642
- updateManifestEntry: (appKey: string, entry: ManifestEntry, configPath?: string) => Promise<[string, ManifestEntry]>;
1883
+ updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<[string, ManifestEntry, Manifest]>;
1643
1884
  };
1644
1885
  }
1645
1886
  /**
@@ -1741,17 +1982,6 @@ declare const ListAppsSchema: z.ZodObject<{
1741
1982
  }>;
1742
1983
  type ListAppsOptions = z.infer<typeof ListAppsSchema>;
1743
1984
 
1744
- interface ApiPluginOptions extends BaseSdkOptions {
1745
- }
1746
- interface ApiPluginProvides {
1747
- context: {
1748
- api: ApiClient;
1749
- };
1750
- }
1751
- declare const apiPlugin: Plugin<{}, // no SDK dependencies
1752
- {}, // requires no context
1753
- ApiPluginProvides>;
1754
-
1755
1985
  interface ListAppsPluginProvides {
1756
1986
  listApps: (options?: ListAppsOptions) => Promise<{
1757
1987
  data: AppItem[];
@@ -1960,13 +2190,13 @@ declare const InputFieldChoiceItemSchema: z.ZodObject<{
1960
2190
  sample: z.ZodOptional<z.ZodString>;
1961
2191
  value: z.ZodOptional<z.ZodString>;
1962
2192
  }, "strip", z.ZodTypeAny, {
1963
- value?: string | undefined;
1964
2193
  key?: string | undefined;
2194
+ value?: string | undefined;
1965
2195
  label?: string | undefined;
1966
2196
  sample?: string | undefined;
1967
2197
  }, {
1968
- value?: string | undefined;
1969
2198
  key?: string | undefined;
2199
+ value?: string | undefined;
1970
2200
  label?: string | undefined;
1971
2201
  sample?: string | undefined;
1972
2202
  }>;
@@ -1986,7 +2216,7 @@ declare const ListInputFieldChoicesSchema: z.ZodObject<{
1986
2216
  cursor: z.ZodOptional<z.ZodString>;
1987
2217
  }, "strip", z.ZodTypeAny, {
1988
2218
  appKey: string;
1989
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
2219
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
1990
2220
  actionKey: string;
1991
2221
  inputFieldKey: string;
1992
2222
  page?: number | undefined;
@@ -1997,7 +2227,7 @@ declare const ListInputFieldChoicesSchema: z.ZodObject<{
1997
2227
  cursor?: string | undefined;
1998
2228
  }, {
1999
2229
  appKey: string;
2000
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
2230
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
2001
2231
  actionKey: string;
2002
2232
  inputFieldKey: string;
2003
2233
  page?: number | undefined;
@@ -2048,6 +2278,7 @@ interface BaseSdkOptions {
2048
2278
  };
2049
2279
  };
2050
2280
  };
2281
+ eventEmission?: EventEmissionConfig;
2051
2282
  }
2052
2283
 
2053
2284
  interface FunctionRegistryEntry {
@@ -2065,7 +2296,7 @@ interface FunctionRegistryEntry {
2065
2296
  resolvers?: Record<string, any>;
2066
2297
  packages?: string[];
2067
2298
  }
2068
- interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides> {
2299
+ interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides & EventEmissionProvides & ApiPluginProvides> {
2069
2300
  apps: ActionProxy & ZapierSdkApps;
2070
2301
  }
2071
2302
 
@@ -2321,19 +2552,19 @@ declare const AppItemSchema: z.ZodObject<Omit<{
2321
2552
  search_and_write: z.ZodOptional<z.ZodNumber>;
2322
2553
  filter: z.ZodOptional<z.ZodNumber>;
2323
2554
  }, "strip", z.ZodTypeAny, {
2555
+ search?: number | undefined;
2324
2556
  filter?: number | undefined;
2325
2557
  read?: number | undefined;
2326
2558
  read_bulk?: number | undefined;
2327
2559
  write?: number | undefined;
2328
- search?: number | undefined;
2329
2560
  search_or_write?: number | undefined;
2330
2561
  search_and_write?: number | undefined;
2331
2562
  }, {
2563
+ search?: number | undefined;
2332
2564
  filter?: number | undefined;
2333
2565
  read?: number | undefined;
2334
2566
  read_bulk?: number | undefined;
2335
2567
  write?: number | undefined;
2336
- search?: number | undefined;
2337
2568
  search_or_write?: number | undefined;
2338
2569
  search_and_write?: number | undefined;
2339
2570
  }>>;
@@ -2352,16 +2583,25 @@ declare const AppItemSchema: z.ZodObject<Omit<{
2352
2583
  title: string;
2353
2584
  slug: string;
2354
2585
  implementation_id: string;
2355
- description?: string | undefined;
2356
- is_hidden?: boolean | undefined;
2357
- age_in_days?: number | undefined;
2358
- api_docs_url?: string | undefined;
2359
- banner?: string | undefined;
2360
2586
  categories?: {
2361
2587
  id: number;
2362
2588
  name: string;
2363
2589
  slug: string;
2364
2590
  }[] | undefined;
2591
+ actions?: {
2592
+ search?: number | undefined;
2593
+ filter?: number | undefined;
2594
+ read?: number | undefined;
2595
+ read_bulk?: number | undefined;
2596
+ write?: number | undefined;
2597
+ search_or_write?: number | undefined;
2598
+ search_and_write?: number | undefined;
2599
+ } | undefined;
2600
+ description?: string | undefined;
2601
+ is_hidden?: boolean | undefined;
2602
+ age_in_days?: number | undefined;
2603
+ api_docs_url?: string | undefined;
2604
+ banner?: string | undefined;
2365
2605
  image?: string | undefined;
2366
2606
  images?: {
2367
2607
  url_16x16?: string | undefined;
@@ -2378,15 +2618,6 @@ declare const AppItemSchema: z.ZodObject<Omit<{
2378
2618
  popularity?: number | undefined;
2379
2619
  primary_color?: string | undefined;
2380
2620
  auth_type?: string | undefined;
2381
- actions?: {
2382
- filter?: number | undefined;
2383
- read?: number | undefined;
2384
- read_bulk?: number | undefined;
2385
- write?: number | undefined;
2386
- search?: number | undefined;
2387
- search_or_write?: number | undefined;
2388
- search_and_write?: number | undefined;
2389
- } | undefined;
2390
2621
  is_deprecated?: boolean | undefined;
2391
2622
  secondary_color?: string | undefined;
2392
2623
  has_filters?: boolean | undefined;
@@ -2404,16 +2635,25 @@ declare const AppItemSchema: z.ZodObject<Omit<{
2404
2635
  title: string;
2405
2636
  slug: string;
2406
2637
  implementation_id: string;
2407
- description?: string | undefined;
2408
- is_hidden?: boolean | undefined;
2409
- age_in_days?: number | undefined;
2410
- api_docs_url?: string | undefined;
2411
- banner?: string | undefined;
2412
2638
  categories?: {
2413
2639
  id: number;
2414
2640
  name: string;
2415
2641
  slug: string;
2416
2642
  }[] | undefined;
2643
+ actions?: {
2644
+ search?: number | undefined;
2645
+ filter?: number | undefined;
2646
+ read?: number | undefined;
2647
+ read_bulk?: number | undefined;
2648
+ write?: number | undefined;
2649
+ search_or_write?: number | undefined;
2650
+ search_and_write?: number | undefined;
2651
+ } | undefined;
2652
+ description?: string | undefined;
2653
+ is_hidden?: boolean | undefined;
2654
+ age_in_days?: number | undefined;
2655
+ api_docs_url?: string | undefined;
2656
+ banner?: string | undefined;
2417
2657
  image?: string | undefined;
2418
2658
  images?: {
2419
2659
  url_16x16?: string | undefined;
@@ -2430,15 +2670,6 @@ declare const AppItemSchema: z.ZodObject<Omit<{
2430
2670
  popularity?: number | undefined;
2431
2671
  primary_color?: string | undefined;
2432
2672
  auth_type?: string | undefined;
2433
- actions?: {
2434
- filter?: number | undefined;
2435
- read?: number | undefined;
2436
- read_bulk?: number | undefined;
2437
- write?: number | undefined;
2438
- search?: number | undefined;
2439
- search_or_write?: number | undefined;
2440
- search_and_write?: number | undefined;
2441
- } | undefined;
2442
2673
  is_deprecated?: boolean | undefined;
2443
2674
  secondary_color?: string | undefined;
2444
2675
  has_filters?: boolean | undefined;
@@ -2634,7 +2865,7 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
2634
2865
  description: string;
2635
2866
  title: string;
2636
2867
  app_key: string;
2637
- action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
2868
+ action_type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
2638
2869
  id?: string | undefined;
2639
2870
  is_important?: boolean | undefined;
2640
2871
  is_hidden?: boolean | undefined;
@@ -2645,7 +2876,7 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
2645
2876
  description: string;
2646
2877
  title: string;
2647
2878
  app_key: string;
2648
- action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
2879
+ action_type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
2649
2880
  id?: string | undefined;
2650
2881
  is_important?: boolean | undefined;
2651
2882
  is_hidden?: boolean | undefined;
@@ -3001,14 +3232,14 @@ declare function createSdk<TCurrentSdk = {}, TCurrentContext extends {
3001
3232
  getContext(): TCurrentContext;
3002
3233
  }, TRequiresContext, TProvides>, addPluginOptions?: Record<string, unknown>): Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>>;
3003
3234
  };
3004
- declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
3235
+ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<EventEmissionProvides> & ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
3005
3236
  meta: Record<string, PluginMeta>;
3006
- } & {
3237
+ } & EventEmissionContext & {
3007
3238
  api: ApiClient;
3008
3239
  } & {
3009
3240
  getVersionedImplementationId: GetVersionedImplementationId;
3010
3241
  resolveAppKeys: ResolveAppKeys;
3011
- updateManifestEntry: (appKey: string, entry: ManifestEntry, configPath?: string) => Promise<[string, ManifestEntry]>;
3242
+ updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<[string, ManifestEntry, Manifest]>;
3012
3243
  } & {
3013
3244
  meta: {
3014
3245
  listApps: {
@@ -3102,4 +3333,4 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
3102
3333
  }>;
3103
3334
  declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
3104
3335
 
3105
- export { type Action, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type Choice, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type ErrorOptions, type EventCallback, type FetchPluginProvides, type Field, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FormatMetadata, type FormattedItem, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InfoFieldItem, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, type ManifestPluginOptions, type ManifestPluginProvides, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type UserProfile, type UserProfileItem, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, authenticationIdGenericResolver, authenticationIdResolver, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, fetchPlugin, findFirstAuthenticationPlugin, findManifestEntry, findUniqueAuthenticationPlugin, formatErrorMessage, getActionPlugin, getAppPlugin, getAuthenticationPlugin, getPreferredManifestEntryKey, getProfilePlugin, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, isPositional, listActionsPlugin, listAppsPlugin, listAuthenticationsPlugin, listInputFieldsPlugin, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, runActionPlugin, toSnakeCase, toTitleCase };
3336
+ export { type Action, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type BaseEvent, type Choice, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type FetchPluginProvides, type Field, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FormatMetadata, type FormattedItem, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InfoFieldItem, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type UpdateManifestEntryOptions, type UserProfile, type UserProfileItem, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, authenticationIdGenericResolver, authenticationIdResolver, buildApplicationLifecycleEvent, buildErrorEvent, buildErrorEventWithContext, createBaseEvent, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, fetchPlugin, findFirstAuthenticationPlugin, findManifestEntry, findUniqueAuthenticationPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getAuthenticationPlugin, getCiPlatform, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, isCi, isPositional, listActionsPlugin, listAppsPlugin, listAuthenticationsPlugin, listInputFieldsPlugin, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, runActionPlugin, toSnakeCase, toTitleCase };