@zapier/zapier-sdk 0.84.4 → 0.86.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.
package/AGENTS.md CHANGED
@@ -105,11 +105,13 @@ const { data: moreApps } = await zapier.listApps({ cursor: nextCursor });
105
105
 
106
106
  ```typescript
107
107
  // Iterate over pages (each page has { data, nextCursor })
108
- for await (const page of zapier.listApps()) {
108
+ for await (const page of zapier.listApps().pages()) {
109
109
  console.log(`Got ${page.data.length} apps`);
110
110
  }
111
111
  ```
112
112
 
113
+ Iterating the result directly (`for await (const page of zapier.listApps())`) still works but is deprecated: the result is also a promise, so returning it from an `async` function silently collapses it to the first page. `.pages()` returns a plain iterable that survives that boundary.
114
+
113
115
  ### Iterate Individual Items
114
116
 
115
117
  ```typescript
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.86.0
4
+
5
+ ### Minor Changes
6
+
7
+ - afa9c95: The experimental `publishWorkflowVersion` and `runDurable` methods can now have their `sourceFiles` map filled interactively, one file at a time (name, then contents), when resolved through the CLI or MCP. Calling the methods directly with a `sourceFiles` object is unchanged.
8
+
9
+ ## 0.85.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 769751e: Paginated list results now expose `.pages()`, a plain async iterable over pages. Unlike iterating the result directly (which still works but is deprecated), `.pages()` is not also a promise, so returning it from an `async` function no longer silently collapses it to the first page. `.items()` is unchanged and remains the way to iterate individual items across pages. The `toIterable()` helper is deprecated in favor of `.pages()` and now logs a deprecation warning.
14
+
3
15
  ## 0.84.4
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -215,9 +215,9 @@ console.log({
215
215
  secondPageApps,
216
216
  });
217
217
 
218
- // List methods also return an iterable for all pages.
218
+ // Use `.pages()` to iterate over all pages.
219
219
  // Be careful with lots of pages, note the `search` to filter.
220
- for await (const page of zapier.listApps({ search: "slack" })) {
220
+ for await (const page of zapier.listApps({ search: "slack" }).pages()) {
221
221
  const { data: apps } = page;
222
222
  console.log({
223
223
  apps,
@@ -569,12 +569,14 @@ const { data: inputFieldChoices, nextCursor } =
569
569
  });
570
570
 
571
571
  // Or iterate over all pages
572
- for await (const page of zapier.listActionInputFieldChoices({
573
- app: "example-app",
574
- actionType: "read",
575
- action: "example-action",
576
- inputField: "example-input-field",
577
- })) {
572
+ for await (const page of zapier
573
+ .listActionInputFieldChoices({
574
+ app: "example-app",
575
+ actionType: "read",
576
+ action: "example-action",
577
+ inputField: "example-input-field",
578
+ })
579
+ .pages()) {
578
580
  // Do something with each page
579
581
  }
580
582
 
@@ -663,11 +665,13 @@ const { data: rootFields, nextCursor } = await zapier.listActionInputFields({
663
665
  });
664
666
 
665
667
  // Or iterate over all pages
666
- for await (const page of zapier.listActionInputFields({
667
- app: "example-app",
668
- actionType: "read",
669
- action: "example-action",
670
- })) {
668
+ for await (const page of zapier
669
+ .listActionInputFields({
670
+ app: "example-app",
671
+ actionType: "read",
672
+ action: "example-action",
673
+ })
674
+ .pages()) {
671
675
  // Do something with each page
672
676
  }
673
677
 
@@ -724,9 +728,11 @@ const { data: actions, nextCursor } = await zapier.listActions({
724
728
  });
725
729
 
726
730
  // Or iterate over all pages
727
- for await (const page of zapier.listActions({
728
- app: "example-app",
729
- })) {
731
+ for await (const page of zapier
732
+ .listActions({
733
+ app: "example-app",
734
+ })
735
+ .pages()) {
730
736
  // Do something with each page
731
737
  }
732
738
 
@@ -772,11 +778,13 @@ const { data: actionResults, nextCursor } = await zapier.runAction({
772
778
  });
773
779
 
774
780
  // Or iterate over all pages
775
- for await (const page of zapier.runAction({
776
- app: "example-app",
777
- actionType: "read",
778
- action: "example-action",
779
- })) {
781
+ for await (const page of zapier
782
+ .runAction({
783
+ app: "example-app",
784
+ actionType: "read",
785
+ action: "example-action",
786
+ })
787
+ .pages()) {
780
788
  // Do something with each page
781
789
  }
782
790
 
@@ -836,7 +844,7 @@ const { data: actionResults, nextCursor } =
836
844
  await zapier.apps.appKey.actionType.actionKey();
837
845
 
838
846
  // Or iterate over all pages
839
- for await (const page of zapier.apps.appKey.actionType.actionKey()) {
847
+ for await (const page of zapier.apps.appKey.actionType.actionKey().pages()) {
840
848
  // Do something with each page
841
849
  }
842
850
 
@@ -998,7 +1006,7 @@ List all available apps with optional filtering
998
1006
  const { data: apps, nextCursor } = await zapier.listApps();
999
1007
 
1000
1008
  // Or iterate over all pages
1001
- for await (const page of zapier.listApps()) {
1009
+ for await (const page of zapier.listApps().pages()) {
1002
1010
  // Do something with each page
1003
1011
  }
1004
1012
 
@@ -1093,7 +1101,7 @@ const { data: clientCredentials, nextCursor } =
1093
1101
  await zapier.listClientCredentials();
1094
1102
 
1095
1103
  // Or iterate over all pages
1096
- for await (const page of zapier.listClientCredentials()) {
1104
+ for await (const page of zapier.listClientCredentials().pages()) {
1097
1105
  // Do something with each page
1098
1106
  }
1099
1107
 
@@ -1480,7 +1488,7 @@ List run-once durable runs for the authenticated account, newest first
1480
1488
  const { data: durableRuns, nextCursor } = await zapier.listDurableRuns();
1481
1489
 
1482
1490
  // Or iterate over all pages
1483
- for await (const page of zapier.listDurableRuns()) {
1491
+ for await (const page of zapier.listDurableRuns().pages()) {
1484
1492
  // Do something with each page
1485
1493
  }
1486
1494
 
@@ -1529,9 +1537,11 @@ const { data: workflowRuns, nextCursor } = await zapier.listWorkflowRuns({
1529
1537
  });
1530
1538
 
1531
1539
  // Or iterate over all pages
1532
- for await (const page of zapier.listWorkflowRuns({
1533
- workflow: "example-workflow",
1534
- })) {
1540
+ for await (const page of zapier
1541
+ .listWorkflowRuns({
1542
+ workflow: "example-workflow",
1543
+ })
1544
+ .pages()) {
1535
1545
  // Do something with each page
1536
1546
  }
1537
1547
 
@@ -1585,9 +1595,11 @@ const { data: workflowVersions, nextCursor } =
1585
1595
  });
1586
1596
 
1587
1597
  // Or iterate over all pages
1588
- for await (const page of zapier.listWorkflowVersions({
1589
- workflow: "example-workflow",
1590
- })) {
1598
+ for await (const page of zapier
1599
+ .listWorkflowVersions({
1600
+ workflow: "example-workflow",
1601
+ })
1602
+ .pages()) {
1591
1603
  // Do something with each page
1592
1604
  }
1593
1605
 
@@ -1647,7 +1659,7 @@ List all active durable workflows for the authenticated account
1647
1659
  const { data: workflows, nextCursor } = await zapier.listWorkflows();
1648
1660
 
1649
1661
  // Or iterate over all pages
1650
- for await (const page of zapier.listWorkflows()) {
1662
+ for await (const page of zapier.listWorkflows().pages()) {
1651
1663
  // Do something with each page
1652
1664
  }
1653
1665
 
@@ -2115,7 +2127,7 @@ List available connections with optional filtering
2115
2127
  const { data: connections, nextCursor } = await zapier.listConnections();
2116
2128
 
2117
2129
  // Or iterate over all pages
2118
- for await (const page of zapier.listConnections()) {
2130
+ for await (const page of zapier.listConnections().pages()) {
2119
2131
  // Do something with each page
2120
2132
  }
2121
2133
 
@@ -2482,9 +2494,11 @@ const { data: fields, nextCursor } = await zapier.listTableFields({
2482
2494
  });
2483
2495
 
2484
2496
  // Or iterate over all pages
2485
- for await (const page of zapier.listTableFields({
2486
- table: "example-table",
2487
- })) {
2497
+ for await (const page of zapier
2498
+ .listTableFields({
2499
+ table: "example-table",
2500
+ })
2501
+ .pages()) {
2488
2502
  // Do something with each page
2489
2503
  }
2490
2504
 
@@ -2542,9 +2556,11 @@ const { data: records, nextCursor } = await zapier.listTableRecords({
2542
2556
  });
2543
2557
 
2544
2558
  // Or iterate over all pages
2545
- for await (const page of zapier.listTableRecords({
2546
- table: "example-table",
2547
- })) {
2559
+ for await (const page of zapier
2560
+ .listTableRecords({
2561
+ table: "example-table",
2562
+ })
2563
+ .pages()) {
2548
2564
  // Do something with each page
2549
2565
  }
2550
2566
 
@@ -2599,7 +2615,7 @@ List tables available to the authenticated user
2599
2615
  const { data: tables, nextCursor } = await zapier.listTables();
2600
2616
 
2601
2617
  // Or iterate over all pages
2602
- for await (const page of zapier.listTables()) {
2618
+ for await (const page of zapier.listTables().pages()) {
2603
2619
  // Do something with each page
2604
2620
  }
2605
2621
 
@@ -2987,9 +3003,11 @@ const { data: triggerMessages, nextCursor } =
2987
3003
  });
2988
3004
 
2989
3005
  // Or iterate over all pages
2990
- for await (const page of zapier.listTriggerInboxMessages({
2991
- inbox: "example-inbox",
2992
- })) {
3006
+ for await (const page of zapier
3007
+ .listTriggerInboxMessages({
3008
+ inbox: "example-inbox",
3009
+ })
3010
+ .pages()) {
2993
3011
  // Do something with each page
2994
3012
  }
2995
3013
 
@@ -3044,7 +3062,7 @@ List all trigger inboxes for the authenticated user
3044
3062
  const { data: triggerInboxs, nextCursor } = await zapier.listTriggerInboxes();
3045
3063
 
3046
3064
  // Or iterate over all pages
3047
- for await (const page of zapier.listTriggerInboxes()) {
3065
+ for await (const page of zapier.listTriggerInboxes().pages()) {
3048
3066
  // Do something with each page
3049
3067
  }
3050
3068
 
@@ -3096,11 +3114,13 @@ const { data: inputFieldChoices, nextCursor } =
3096
3114
  });
3097
3115
 
3098
3116
  // Or iterate over all pages
3099
- for await (const page of zapier.listTriggerInputFieldChoices({
3100
- app: "example-app",
3101
- action: "example-action",
3102
- inputField: "example-input-field",
3103
- })) {
3117
+ for await (const page of zapier
3118
+ .listTriggerInputFieldChoices({
3119
+ app: "example-app",
3120
+ action: "example-action",
3121
+ inputField: "example-input-field",
3122
+ })
3123
+ .pages()) {
3104
3124
  // Do something with each page
3105
3125
  }
3106
3126
 
@@ -3186,10 +3206,12 @@ const { data: rootFields, nextCursor } = await zapier.listTriggerInputFields({
3186
3206
  });
3187
3207
 
3188
3208
  // Or iterate over all pages
3189
- for await (const page of zapier.listTriggerInputFields({
3190
- app: "example-app",
3191
- action: "example-action",
3192
- })) {
3209
+ for await (const page of zapier
3210
+ .listTriggerInputFields({
3211
+ app: "example-app",
3212
+ action: "example-action",
3213
+ })
3214
+ .pages()) {
3193
3215
  // Do something with each page
3194
3216
  }
3195
3217
 
@@ -3244,9 +3266,11 @@ const { data: actions, nextCursor } = await zapier.listTriggers({
3244
3266
  });
3245
3267
 
3246
3268
  // Or iterate over all pages
3247
- for await (const page of zapier.listTriggers({
3248
- app: "example-app",
3249
- })) {
3269
+ for await (const page of zapier
3270
+ .listTriggers({
3271
+ app: "example-app",
3272
+ })
3273
+ .pages()) {
3250
3274
  // Do something with each page
3251
3275
  }
3252
3276