@project-ajax/create 0.0.32 → 0.0.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@project-ajax/create",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "Initialize a new Notion Project Ajax extensions repo.",
5
5
  "bin": {
6
6
  "create-ajax": "dist/index.js"
@@ -55,7 +55,6 @@ Syncs run in a "sync cycle": a back-to-back chain of `execute` calls that starts
55
55
  - `mode=replace` is simpler, and fine for smaller syncs (<10k)
56
56
  - Use `mode=incremental` when the sync could return a lot of data (>10k), eg for SaaS tools like Salesforce or Stripe
57
57
  - When using `mode=incremental`, emit delete markers as needed if easy to do (below)
58
- - Use `Pacer.wait` to respect upstream rate limits during `execute` calls; pick a stable key per API or endpoint.
59
58
 
60
59
  **Sync strategy (`mode`):**
61
60
  - `replace`: each sync cycle must return the full dataset. After the final `hasMore: false`, any records not seen during that cycle are deleted.
@@ -55,7 +55,6 @@ Syncs run in a "sync cycle": a back-to-back chain of `execute` calls that starts
55
55
  - `mode=replace` is simpler, and fine for smaller syncs (<10k)
56
56
  - Use `mode=incremental` when the sync could return a lot of data (>10k), eg for SaaS tools like Salesforce or Stripe
57
57
  - When using `mode=incremental`, emit delete markers as needed if easy to do (below)
58
- - Use `Pacer.wait` to respect upstream rate limits during `execute` calls; pick a stable key per API or endpoint.
59
58
 
60
59
  **Sync strategy (`mode`):**
61
60
  - `replace`: each sync cycle must return the full dataset. After the final `hasMore: false`, any records not seen during that cycle are deleted.
@@ -171,33 +171,6 @@ changes: [
171
171
  ]
172
172
  ```
173
173
 
174
- #### Respect rate limits
175
-
176
-
177
- If the source API has a rate limit, call `Pacer.wait` inside `execute` to pace requests (for example, 10 requests per minute):
178
-
179
- ```ts
180
- import { Pacer } from "@project-ajax/sdk/pacer";
181
-
182
- worker.sync("tasksSync", {
183
- primaryKeyProperty: "ID",
184
- schema: { defaultName: "Tasks", properties: { Name: Schema.title(), ID: Schema.richText() } },
185
- execute: async () => {
186
- const oneMinute = 60 * 1000;
187
- await Pacer.wait("tasks-api", { requests: 10, intervalMs: oneMinute });
188
- const items = await fetchTasks();
189
- return {
190
- changes: items.map((item) => ({
191
- type: "upsert",
192
- key: item.id,
193
- properties: { Name: Builder.title(item.name), ID: Builder.richText(item.id) },
194
- })),
195
- hasMore: false,
196
- };
197
- },
198
- });
199
- ```
200
-
201
174
  ### Tool
202
175
 
203
176
  Tools are callable by Notion custom agents.