@zapier/zapier-sdk 0.50.0 → 0.52.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 (63) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -1
  3. package/dist/api/auth.d.ts +1 -6
  4. package/dist/api/auth.d.ts.map +1 -1
  5. package/dist/api/auth.js +34 -27
  6. package/dist/api/client.d.ts.map +1 -1
  7. package/dist/api/client.js +87 -9
  8. package/dist/api/concurrency.d.ts +28 -0
  9. package/dist/api/concurrency.d.ts.map +1 -0
  10. package/dist/api/concurrency.js +90 -0
  11. package/dist/api/index.d.ts +1 -1
  12. package/dist/api/index.d.ts.map +1 -1
  13. package/dist/api/index.js +1 -1
  14. package/dist/api/schemas.d.ts +3 -3
  15. package/dist/api/types.d.ts +6 -0
  16. package/dist/api/types.d.ts.map +1 -1
  17. package/dist/auth.d.ts +13 -2
  18. package/dist/auth.d.ts.map +1 -1
  19. package/dist/auth.js +95 -11
  20. package/dist/constants.d.ts +16 -0
  21. package/dist/constants.d.ts.map +1 -1
  22. package/dist/constants.js +29 -0
  23. package/dist/experimental.cjs +357 -34
  24. package/dist/experimental.d.mts +28 -28
  25. package/dist/experimental.d.ts +26 -26
  26. package/dist/experimental.mjs +353 -35
  27. package/dist/{index-BQ2ii0Bs.d.mts → index-DcdtPei-.d.mts} +132 -2
  28. package/dist/{index-BQ2ii0Bs.d.ts → index-DcdtPei-.d.ts} +132 -2
  29. package/dist/index.cjs +357 -34
  30. package/dist/index.d.mts +1 -1
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +1 -0
  34. package/dist/index.mjs +353 -35
  35. package/dist/plugins/api/index.d.ts.map +1 -1
  36. package/dist/plugins/api/index.js +3 -2
  37. package/dist/plugins/apps/index.d.ts +2 -2
  38. package/dist/plugins/deprecated/inputFields.d.ts +18 -18
  39. package/dist/plugins/getAction/index.d.ts +6 -6
  40. package/dist/plugins/getAction/schemas.d.ts +4 -4
  41. package/dist/plugins/getActionInputFieldsSchema/index.d.ts +5 -5
  42. package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts +4 -4
  43. package/dist/plugins/listActionInputFieldChoices/index.d.ts +5 -5
  44. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts +4 -4
  45. package/dist/plugins/listActionInputFields/index.d.ts +5 -5
  46. package/dist/plugins/listActionInputFields/schemas.d.ts +4 -4
  47. package/dist/plugins/listActions/index.d.ts +3 -3
  48. package/dist/plugins/listActions/schemas.d.ts +4 -4
  49. package/dist/plugins/runAction/index.d.ts +5 -5
  50. package/dist/plugins/runAction/schemas.d.ts +4 -4
  51. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +2 -2
  52. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +2 -2
  53. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +2 -2
  54. package/dist/schemas/Action.d.ts +1 -1
  55. package/dist/sdk.d.ts +52 -52
  56. package/dist/types/properties.d.ts +1 -1
  57. package/dist/types/sdk.d.ts +1 -0
  58. package/dist/types/sdk.d.ts.map +1 -1
  59. package/dist/types/sdk.js +25 -0
  60. package/dist/utils/telemetry.d.ts +11 -0
  61. package/dist/utils/telemetry.d.ts.map +1 -0
  62. package/dist/utils/telemetry.js +19 -0
  63. package/package.json +1 -1
package/dist/sdk.d.ts CHANGED
@@ -243,13 +243,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
243
243
  } & {
244
244
  listActions: (options?: (({
245
245
  app: string;
246
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
246
+ actionType?: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | undefined;
247
247
  pageSize?: number | undefined;
248
248
  maxItems?: number | undefined;
249
249
  cursor?: string | undefined;
250
250
  } | {
251
251
  appKey: string;
252
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
252
+ actionType?: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | undefined;
253
253
  pageSize?: number | undefined;
254
254
  maxItems?: number | undefined;
255
255
  cursor?: string | undefined;
@@ -261,7 +261,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
261
261
  description: string;
262
262
  key: string;
263
263
  app_key: string;
264
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
264
+ action_type: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
265
265
  title: string;
266
266
  type: "action";
267
267
  id?: string | undefined;
@@ -278,18 +278,18 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
278
278
  } & {
279
279
  getAction: (options?: {
280
280
  app: string;
281
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
281
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
282
282
  action: string;
283
283
  } | {
284
284
  appKey: string;
285
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
285
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
286
286
  actionKey: string;
287
287
  } | undefined) => Promise<{
288
288
  data: {
289
289
  description: string;
290
290
  key: string;
291
291
  app_key: string;
292
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
292
+ action_type: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
293
293
  title: string;
294
294
  type: "action";
295
295
  id?: string | undefined;
@@ -307,7 +307,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
307
307
  } & {
308
308
  listActionInputFields: (options?: (({
309
309
  app: string;
310
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
310
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
311
311
  action: string;
312
312
  connection?: string | number | undefined;
313
313
  connectionId?: string | number | null | undefined;
@@ -318,7 +318,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
318
318
  cursor?: string | undefined;
319
319
  } | {
320
320
  appKey: string;
321
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
321
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
322
322
  actionKey: string;
323
323
  connection?: string | number | undefined;
324
324
  connectionId?: string | number | null | undefined;
@@ -361,7 +361,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
361
361
  } & {
362
362
  getActionInputFieldsSchema: (options?: {
363
363
  app: string;
364
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
364
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
365
365
  action: string;
366
366
  connection?: string | number | undefined;
367
367
  connectionId?: string | number | null | undefined;
@@ -369,7 +369,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
369
369
  inputs?: Record<string, unknown> | undefined;
370
370
  } | {
371
371
  appKey: string;
372
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
372
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
373
373
  actionKey: string;
374
374
  connection?: string | number | undefined;
375
375
  connectionId?: string | number | null | undefined;
@@ -387,7 +387,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
387
387
  } & {
388
388
  listActionInputFieldChoices: (options?: (({
389
389
  app: string;
390
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
390
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
391
391
  action: string;
392
392
  inputField: string;
393
393
  connection?: string | number | undefined;
@@ -400,7 +400,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
400
400
  cursor?: string | undefined;
401
401
  } | {
402
402
  appKey: string;
403
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
403
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
404
404
  actionKey: string;
405
405
  inputFieldKey: string;
406
406
  connection?: string | number | undefined;
@@ -430,7 +430,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
430
430
  } & {
431
431
  listInputFields: (options?: (({
432
432
  app: string;
433
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
433
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
434
434
  action: string;
435
435
  connection?: string | number | undefined;
436
436
  connectionId?: string | number | null | undefined;
@@ -441,7 +441,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
441
441
  cursor?: string | undefined;
442
442
  } | {
443
443
  appKey: string;
444
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
444
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
445
445
  actionKey: string;
446
446
  connection?: string | number | undefined;
447
447
  connectionId?: string | number | null | undefined;
@@ -487,13 +487,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
487
487
  };
488
488
  actionType: import("zod").ZodEnum<{
489
489
  filter: "filter";
490
+ write: "write";
490
491
  read: "read";
491
492
  read_bulk: "read_bulk";
492
493
  run: "run";
493
494
  search: "search";
494
495
  search_and_write: "search_and_write";
495
496
  search_or_write: "search_or_write";
496
- write: "write";
497
497
  }>;
498
498
  action: import("zod").ZodString & {
499
499
  _def: import("zod/v4/core").$ZodStringDef & import(".").PositionalMetadata;
@@ -511,13 +511,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
511
511
  };
512
512
  actionType: import("zod").ZodEnum<{
513
513
  filter: "filter";
514
+ write: "write";
514
515
  read: "read";
515
516
  read_bulk: "read_bulk";
516
517
  run: "run";
517
518
  search: "search";
518
519
  search_and_write: "search_and_write";
519
520
  search_or_write: "search_or_write";
520
- write: "write";
521
521
  }>;
522
522
  actionKey: import("zod").ZodString;
523
523
  connection: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
@@ -556,7 +556,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
556
556
  } & {
557
557
  getInputFieldsSchema: (options?: {
558
558
  app: string;
559
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
559
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
560
560
  action: string;
561
561
  connection?: string | number | undefined;
562
562
  connectionId?: string | number | null | undefined;
@@ -564,7 +564,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
564
564
  inputs?: Record<string, unknown> | undefined;
565
565
  } | {
566
566
  appKey: string;
567
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
567
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
568
568
  actionKey: string;
569
569
  connection?: string | number | undefined;
570
570
  connectionId?: string | number | null | undefined;
@@ -584,13 +584,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
584
584
  };
585
585
  actionType: import("zod").ZodEnum<{
586
586
  filter: "filter";
587
+ write: "write";
587
588
  read: "read";
588
589
  read_bulk: "read_bulk";
589
590
  run: "run";
590
591
  search: "search";
591
592
  search_and_write: "search_and_write";
592
593
  search_or_write: "search_or_write";
593
- write: "write";
594
594
  }>;
595
595
  action: import("zod").ZodString & {
596
596
  _def: import("zod/v4/core").$ZodStringDef & import(".").PositionalMetadata;
@@ -605,13 +605,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
605
605
  };
606
606
  actionType: import("zod").ZodEnum<{
607
607
  filter: "filter";
608
+ write: "write";
608
609
  read: "read";
609
610
  read_bulk: "read_bulk";
610
611
  run: "run";
611
612
  search: "search";
612
613
  search_and_write: "search_and_write";
613
614
  search_or_write: "search_or_write";
614
- write: "write";
615
615
  }>;
616
616
  actionKey: import("zod").ZodString;
617
617
  connection: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
@@ -625,7 +625,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
625
625
  } & {
626
626
  listInputFieldChoices: (options?: (({
627
627
  app: string;
628
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
628
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
629
629
  action: string;
630
630
  inputField: string;
631
631
  connection?: string | number | undefined;
@@ -638,7 +638,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
638
638
  cursor?: string | undefined;
639
639
  } | {
640
640
  appKey: string;
641
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
641
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
642
642
  actionKey: string;
643
643
  inputFieldKey: string;
644
644
  connection?: string | number | undefined;
@@ -671,13 +671,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
671
671
  };
672
672
  actionType: import("zod").ZodEnum<{
673
673
  filter: "filter";
674
+ write: "write";
674
675
  read: "read";
675
676
  read_bulk: "read_bulk";
676
677
  run: "run";
677
678
  search: "search";
678
679
  search_and_write: "search_and_write";
679
680
  search_or_write: "search_or_write";
680
- write: "write";
681
681
  }>;
682
682
  action: import("zod").ZodString & {
683
683
  _def: import("zod/v4/core").$ZodStringDef & import(".").PositionalMetadata;
@@ -699,13 +699,13 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
699
699
  };
700
700
  actionType: import("zod").ZodEnum<{
701
701
  filter: "filter";
702
+ write: "write";
702
703
  read: "read";
703
704
  read_bulk: "read_bulk";
704
705
  run: "run";
705
706
  search: "search";
706
707
  search_and_write: "search_and_write";
707
708
  search_or_write: "search_or_write";
708
- write: "write";
709
709
  }>;
710
710
  actionKey: import("zod").ZodString;
711
711
  inputFieldKey: import("zod").ZodString;
@@ -731,7 +731,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
731
731
  } & {
732
732
  runAction: (options?: (({
733
733
  app: string;
734
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
734
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
735
735
  action: string;
736
736
  connection?: string | number | undefined;
737
737
  connectionId?: string | number | null | undefined;
@@ -743,7 +743,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
743
743
  cursor?: string | undefined;
744
744
  } | {
745
745
  appKey: string;
746
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
746
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
747
747
  actionKey: string;
748
748
  connection?: string | number | undefined;
749
749
  connectionId?: string | number | null | undefined;
@@ -2023,13 +2023,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2023
2023
  } & {
2024
2024
  listActions: (options?: (({
2025
2025
  app: string;
2026
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
2026
+ actionType?: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | undefined;
2027
2027
  pageSize?: number | undefined;
2028
2028
  maxItems?: number | undefined;
2029
2029
  cursor?: string | undefined;
2030
2030
  } | {
2031
2031
  appKey: string;
2032
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
2032
+ actionType?: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | undefined;
2033
2033
  pageSize?: number | undefined;
2034
2034
  maxItems?: number | undefined;
2035
2035
  cursor?: string | undefined;
@@ -2041,7 +2041,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2041
2041
  description: string;
2042
2042
  key: string;
2043
2043
  app_key: string;
2044
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2044
+ action_type: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2045
2045
  title: string;
2046
2046
  type: "action";
2047
2047
  id?: string | undefined;
@@ -2058,18 +2058,18 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2058
2058
  } & {
2059
2059
  getAction: (options?: {
2060
2060
  app: string;
2061
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2061
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2062
2062
  action: string;
2063
2063
  } | {
2064
2064
  appKey: string;
2065
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2065
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2066
2066
  actionKey: string;
2067
2067
  } | undefined) => Promise<{
2068
2068
  data: {
2069
2069
  description: string;
2070
2070
  key: string;
2071
2071
  app_key: string;
2072
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2072
+ action_type: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2073
2073
  title: string;
2074
2074
  type: "action";
2075
2075
  id?: string | undefined;
@@ -2087,7 +2087,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2087
2087
  } & {
2088
2088
  listActionInputFields: (options?: (({
2089
2089
  app: string;
2090
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2090
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2091
2091
  action: string;
2092
2092
  connection?: string | number | undefined;
2093
2093
  connectionId?: string | number | null | undefined;
@@ -2098,7 +2098,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2098
2098
  cursor?: string | undefined;
2099
2099
  } | {
2100
2100
  appKey: string;
2101
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2101
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2102
2102
  actionKey: string;
2103
2103
  connection?: string | number | undefined;
2104
2104
  connectionId?: string | number | null | undefined;
@@ -2141,7 +2141,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2141
2141
  } & {
2142
2142
  getActionInputFieldsSchema: (options?: {
2143
2143
  app: string;
2144
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2144
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2145
2145
  action: string;
2146
2146
  connection?: string | number | undefined;
2147
2147
  connectionId?: string | number | null | undefined;
@@ -2149,7 +2149,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2149
2149
  inputs?: Record<string, unknown> | undefined;
2150
2150
  } | {
2151
2151
  appKey: string;
2152
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2152
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2153
2153
  actionKey: string;
2154
2154
  connection?: string | number | undefined;
2155
2155
  connectionId?: string | number | null | undefined;
@@ -2167,7 +2167,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2167
2167
  } & {
2168
2168
  listActionInputFieldChoices: (options?: (({
2169
2169
  app: string;
2170
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2170
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2171
2171
  action: string;
2172
2172
  inputField: string;
2173
2173
  connection?: string | number | undefined;
@@ -2180,7 +2180,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2180
2180
  cursor?: string | undefined;
2181
2181
  } | {
2182
2182
  appKey: string;
2183
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2183
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2184
2184
  actionKey: string;
2185
2185
  inputFieldKey: string;
2186
2186
  connection?: string | number | undefined;
@@ -2210,7 +2210,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2210
2210
  } & {
2211
2211
  listInputFields: (options?: (({
2212
2212
  app: string;
2213
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2213
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2214
2214
  action: string;
2215
2215
  connection?: string | number | undefined;
2216
2216
  connectionId?: string | number | null | undefined;
@@ -2221,7 +2221,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2221
2221
  cursor?: string | undefined;
2222
2222
  } | {
2223
2223
  appKey: string;
2224
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2224
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2225
2225
  actionKey: string;
2226
2226
  connection?: string | number | undefined;
2227
2227
  connectionId?: string | number | null | undefined;
@@ -2267,13 +2267,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2267
2267
  };
2268
2268
  actionType: import("zod").ZodEnum<{
2269
2269
  filter: "filter";
2270
+ write: "write";
2270
2271
  read: "read";
2271
2272
  read_bulk: "read_bulk";
2272
2273
  run: "run";
2273
2274
  search: "search";
2274
2275
  search_and_write: "search_and_write";
2275
2276
  search_or_write: "search_or_write";
2276
- write: "write";
2277
2277
  }>;
2278
2278
  action: import("zod").ZodString & {
2279
2279
  _def: import("zod/v4/core").$ZodStringDef & import(".").PositionalMetadata;
@@ -2291,13 +2291,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2291
2291
  };
2292
2292
  actionType: import("zod").ZodEnum<{
2293
2293
  filter: "filter";
2294
+ write: "write";
2294
2295
  read: "read";
2295
2296
  read_bulk: "read_bulk";
2296
2297
  run: "run";
2297
2298
  search: "search";
2298
2299
  search_and_write: "search_and_write";
2299
2300
  search_or_write: "search_or_write";
2300
- write: "write";
2301
2301
  }>;
2302
2302
  actionKey: import("zod").ZodString;
2303
2303
  connection: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
@@ -2336,7 +2336,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2336
2336
  } & {
2337
2337
  getInputFieldsSchema: (options?: {
2338
2338
  app: string;
2339
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2339
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2340
2340
  action: string;
2341
2341
  connection?: string | number | undefined;
2342
2342
  connectionId?: string | number | null | undefined;
@@ -2344,7 +2344,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2344
2344
  inputs?: Record<string, unknown> | undefined;
2345
2345
  } | {
2346
2346
  appKey: string;
2347
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2347
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2348
2348
  actionKey: string;
2349
2349
  connection?: string | number | undefined;
2350
2350
  connectionId?: string | number | null | undefined;
@@ -2364,13 +2364,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2364
2364
  };
2365
2365
  actionType: import("zod").ZodEnum<{
2366
2366
  filter: "filter";
2367
+ write: "write";
2367
2368
  read: "read";
2368
2369
  read_bulk: "read_bulk";
2369
2370
  run: "run";
2370
2371
  search: "search";
2371
2372
  search_and_write: "search_and_write";
2372
2373
  search_or_write: "search_or_write";
2373
- write: "write";
2374
2374
  }>;
2375
2375
  action: import("zod").ZodString & {
2376
2376
  _def: import("zod/v4/core").$ZodStringDef & import(".").PositionalMetadata;
@@ -2385,13 +2385,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2385
2385
  };
2386
2386
  actionType: import("zod").ZodEnum<{
2387
2387
  filter: "filter";
2388
+ write: "write";
2388
2389
  read: "read";
2389
2390
  read_bulk: "read_bulk";
2390
2391
  run: "run";
2391
2392
  search: "search";
2392
2393
  search_and_write: "search_and_write";
2393
2394
  search_or_write: "search_or_write";
2394
- write: "write";
2395
2395
  }>;
2396
2396
  actionKey: import("zod").ZodString;
2397
2397
  connection: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
@@ -2405,7 +2405,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2405
2405
  } & {
2406
2406
  listInputFieldChoices: (options?: (({
2407
2407
  app: string;
2408
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2408
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2409
2409
  action: string;
2410
2410
  inputField: string;
2411
2411
  connection?: string | number | undefined;
@@ -2418,7 +2418,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2418
2418
  cursor?: string | undefined;
2419
2419
  } | {
2420
2420
  appKey: string;
2421
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2421
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2422
2422
  actionKey: string;
2423
2423
  inputFieldKey: string;
2424
2424
  connection?: string | number | undefined;
@@ -2451,13 +2451,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2451
2451
  };
2452
2452
  actionType: import("zod").ZodEnum<{
2453
2453
  filter: "filter";
2454
+ write: "write";
2454
2455
  read: "read";
2455
2456
  read_bulk: "read_bulk";
2456
2457
  run: "run";
2457
2458
  search: "search";
2458
2459
  search_and_write: "search_and_write";
2459
2460
  search_or_write: "search_or_write";
2460
- write: "write";
2461
2461
  }>;
2462
2462
  action: import("zod").ZodString & {
2463
2463
  _def: import("zod/v4/core").$ZodStringDef & import(".").PositionalMetadata;
@@ -2479,13 +2479,13 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2479
2479
  };
2480
2480
  actionType: import("zod").ZodEnum<{
2481
2481
  filter: "filter";
2482
+ write: "write";
2482
2483
  read: "read";
2483
2484
  read_bulk: "read_bulk";
2484
2485
  run: "run";
2485
2486
  search: "search";
2486
2487
  search_and_write: "search_and_write";
2487
2488
  search_or_write: "search_or_write";
2488
- write: "write";
2489
2489
  }>;
2490
2490
  actionKey: import("zod").ZodString;
2491
2491
  inputFieldKey: import("zod").ZodString;
@@ -2511,7 +2511,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2511
2511
  } & {
2512
2512
  runAction: (options?: (({
2513
2513
  app: string;
2514
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2514
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2515
2515
  action: string;
2516
2516
  connection?: string | number | undefined;
2517
2517
  connectionId?: string | number | null | undefined;
@@ -2523,7 +2523,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlug
2523
2523
  cursor?: string | undefined;
2524
2524
  } | {
2525
2525
  appKey: string;
2526
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2526
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
2527
2527
  actionKey: string;
2528
2528
  connection?: string | number | undefined;
2529
2529
  connectionId?: string | number | null | undefined;
@@ -7,13 +7,13 @@ export declare const AppPropertySchema: z.ZodString & {
7
7
  };
8
8
  export declare const ActionTypePropertySchema: z.ZodEnum<{
9
9
  filter: "filter";
10
+ write: "write";
10
11
  read: "read";
11
12
  read_bulk: "read_bulk";
12
13
  run: "run";
13
14
  search: "search";
14
15
  search_and_write: "search_and_write";
15
16
  search_or_write: "search_or_write";
16
- write: "write";
17
17
  }>;
18
18
  export declare const ActionKeyPropertySchema: z.ZodString;
19
19
  export declare const ActionPropertySchema: z.ZodString & {
@@ -58,6 +58,7 @@ export declare const BaseSdkOptionsSchema: z.ZodObject<{
58
58
  trackingBaseUrl: z.ZodOptional<z.ZodString>;
59
59
  maxNetworkRetries: z.ZodOptional<z.ZodNumber>;
60
60
  maxNetworkRetryDelayMs: z.ZodOptional<z.ZodNumber>;
61
+ maxConcurrentRequests: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<number>]>>;
61
62
  approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
62
63
  maxApprovalRetries: z.ZodOptional<z.ZodNumber>;
63
64
  approvalMode: z.ZodOptional<z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuEb,MAAM;iBAAW,MAAM;;cAAvB,MAAM;iBAAW,MAAM;;;;;;;iBAiBzC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG7E,MAAM,WAAW,kBACf,SAAQ,gCAAgC,EACtC,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB;CAAG"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmGb,MAAM;iBAAW,MAAM;;cAAvB,MAAM;iBAAW,MAAM;;;;;;;iBAiBzC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG7E,MAAM,WAAW,kBACf,SAAQ,gCAAgC,EACtC,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB;CAAG"}
package/dist/types/sdk.js CHANGED
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { z } from "zod";
5
5
  import { CredentialsSchema } from "./credentials";
6
+ import { MAX_CONCURRENCY_LIMIT } from "../constants";
6
7
  // SDK Configuration Types
7
8
  export const BaseSdkOptionsSchema = z.object({
8
9
  credentials: CredentialsSchema.optional().describe("Authentication credentials. Can be a string (token or API key), a client credentials object ({ clientId, clientSecret }), a PKCE object ({ clientId }), or a function returning any of those."),
@@ -36,6 +37,30 @@ export const BaseSdkOptionsSchema = z.object({
36
37
  .optional()
37
38
  .describe("Max delay in ms to wait for retry (default: 60000).")
38
39
  .meta({ valueHint: "ms" }),
40
+ /**
41
+ * Maximum number of concurrent in-flight HTTP requests per client.
42
+ * Requests beyond this limit queue in FIFO order until a slot frees.
43
+ * Pass `Infinity` to disable. Default: 200.
44
+ *
45
+ * The description and meta are duplicated across the outer wrapper and
46
+ * the inner numeric branch because the SDK and CLI doc generators walk
47
+ * the schema differently — the SDK reader looks at wrappers only, while
48
+ * the CLI reader recurses into union branches.
49
+ */
50
+ maxConcurrentRequests: z
51
+ .union([
52
+ z
53
+ .number()
54
+ .int()
55
+ .min(1)
56
+ .max(MAX_CONCURRENCY_LIMIT)
57
+ .describe(`Max concurrent in-flight HTTP requests (default: 200, max: ${MAX_CONCURRENCY_LIMIT}).`)
58
+ .meta({ valueHint: "count" }),
59
+ z.literal(Infinity),
60
+ ])
61
+ .optional()
62
+ .describe(`Max concurrent in-flight HTTP requests (default: 200, max: ${MAX_CONCURRENCY_LIMIT}).`)
63
+ .meta({ valueHint: "count" }),
39
64
  approvalTimeoutMs: z
40
65
  .number()
41
66
  .optional()
@@ -0,0 +1,11 @@
1
+ import type { SdkEvent, EventCallback } from "../types/events";
2
+ /**
3
+ * Emit an event exactly once per (handler, event type) pair for the
4
+ * lifetime of the process. Safe to call on every request — subsequent
5
+ * calls for the same handler+type are silently dropped.
6
+ *
7
+ * Test isolation is free: each test's fresh vi.fn() is a new function
8
+ * reference the WeakMap has never seen.
9
+ */
10
+ export declare function emitOnce(onEvent: EventCallback, event: SdkEvent): void;
11
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/utils/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAI/D;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAStE"}
@@ -0,0 +1,19 @@
1
+ const emittedOnce = new WeakMap();
2
+ /**
3
+ * Emit an event exactly once per (handler, event type) pair for the
4
+ * lifetime of the process. Safe to call on every request — subsequent
5
+ * calls for the same handler+type are silently dropped.
6
+ *
7
+ * Test isolation is free: each test's fresh vi.fn() is a new function
8
+ * reference the WeakMap has never seen.
9
+ */
10
+ export function emitOnce(onEvent, event) {
11
+ if (!emittedOnce.has(onEvent)) {
12
+ emittedOnce.set(onEvent, new Set());
13
+ }
14
+ const fired = emittedOnce.get(onEvent);
15
+ if (!fired.has(event.type)) {
16
+ fired.add(event.type);
17
+ onEvent(event);
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",