@amigo-ai/platform-sdk 0.4.5 → 0.4.6

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 (101) hide show
  1. package/README.md +12 -8
  2. package/api.md +50 -0
  3. package/dist/index.cjs +305 -1
  4. package/dist/index.cjs.map +3 -3
  5. package/dist/index.mjs +305 -1
  6. package/dist/index.mjs.map +3 -3
  7. package/dist/resources/actions.js +9 -0
  8. package/dist/resources/actions.js.map +1 -1
  9. package/dist/resources/agents.js +6 -0
  10. package/dist/resources/agents.js.map +1 -1
  11. package/dist/resources/analytics.js +18 -0
  12. package/dist/resources/analytics.js.map +1 -1
  13. package/dist/resources/api-keys.js +3 -0
  14. package/dist/resources/api-keys.js.map +1 -1
  15. package/dist/resources/audit.js +9 -0
  16. package/dist/resources/audit.js.map +1 -1
  17. package/dist/resources/base.js +26 -0
  18. package/dist/resources/base.js.map +1 -1
  19. package/dist/resources/billing.js +3 -0
  20. package/dist/resources/billing.js.map +1 -1
  21. package/dist/resources/calls.js +9 -0
  22. package/dist/resources/calls.js.map +1 -1
  23. package/dist/resources/context-graphs.js +7 -1
  24. package/dist/resources/context-graphs.js.map +1 -1
  25. package/dist/resources/data-sources.js +3 -0
  26. package/dist/resources/data-sources.js.map +1 -1
  27. package/dist/resources/integrations.js +3 -0
  28. package/dist/resources/integrations.js.map +1 -1
  29. package/dist/resources/operators.js +16 -0
  30. package/dist/resources/operators.js.map +1 -1
  31. package/dist/resources/personas.js +3 -0
  32. package/dist/resources/personas.js.map +1 -1
  33. package/dist/resources/phone-numbers.js +3 -0
  34. package/dist/resources/phone-numbers.js.map +1 -1
  35. package/dist/resources/review-queue.js +9 -0
  36. package/dist/resources/review-queue.js.map +1 -1
  37. package/dist/resources/services.js +3 -0
  38. package/dist/resources/services.js.map +1 -1
  39. package/dist/resources/settings.js +45 -0
  40. package/dist/resources/settings.js.map +1 -1
  41. package/dist/resources/skills.js +3 -0
  42. package/dist/resources/skills.js.map +1 -1
  43. package/dist/resources/triggers.js +6 -0
  44. package/dist/resources/triggers.js.map +1 -1
  45. package/dist/resources/webhook-destinations.js +6 -0
  46. package/dist/resources/webhook-destinations.js.map +1 -1
  47. package/dist/resources/workspaces.js +3 -0
  48. package/dist/resources/workspaces.js.map +1 -1
  49. package/dist/resources/world.js +34 -0
  50. package/dist/resources/world.js.map +1 -1
  51. package/dist/types/generated/api.d.ts +183 -9
  52. package/dist/types/generated/api.d.ts.map +1 -1
  53. package/dist/types/resources/actions.d.ts +45 -0
  54. package/dist/types/resources/actions.d.ts.map +1 -1
  55. package/dist/types/resources/agents.d.ts +24 -0
  56. package/dist/types/resources/agents.d.ts.map +1 -1
  57. package/dist/types/resources/analytics.d.ts +36 -0
  58. package/dist/types/resources/analytics.d.ts.map +1 -1
  59. package/dist/types/resources/api-keys.d.ts +16 -0
  60. package/dist/types/resources/api-keys.d.ts.map +1 -1
  61. package/dist/types/resources/audit.d.ts +54 -0
  62. package/dist/types/resources/audit.d.ts.map +1 -1
  63. package/dist/types/resources/base.d.ts +11 -0
  64. package/dist/types/resources/base.d.ts.map +1 -1
  65. package/dist/types/resources/billing.d.ts +17 -0
  66. package/dist/types/resources/billing.d.ts.map +1 -1
  67. package/dist/types/resources/calls.d.ts +34 -0
  68. package/dist/types/resources/calls.d.ts.map +1 -1
  69. package/dist/types/resources/context-graphs.d.ts +29 -2
  70. package/dist/types/resources/context-graphs.d.ts.map +1 -1
  71. package/dist/types/resources/data-sources.d.ts +26 -0
  72. package/dist/types/resources/data-sources.d.ts.map +1 -1
  73. package/dist/types/resources/functions.d.ts.map +1 -1
  74. package/dist/types/resources/integrations.d.ts +21 -0
  75. package/dist/types/resources/integrations.d.ts.map +1 -1
  76. package/dist/types/resources/memory.d.ts.map +1 -1
  77. package/dist/types/resources/operators.d.ts +73 -0
  78. package/dist/types/resources/operators.d.ts.map +1 -1
  79. package/dist/types/resources/personas.d.ts +14 -0
  80. package/dist/types/resources/personas.d.ts.map +1 -1
  81. package/dist/types/resources/phone-numbers.d.ts +15 -0
  82. package/dist/types/resources/phone-numbers.d.ts.map +1 -1
  83. package/dist/types/resources/review-queue.d.ts +60 -0
  84. package/dist/types/resources/review-queue.d.ts.map +1 -1
  85. package/dist/types/resources/safety.d.ts.map +1 -1
  86. package/dist/types/resources/services.d.ts +26 -0
  87. package/dist/types/resources/services.d.ts.map +1 -1
  88. package/dist/types/resources/settings.d.ts +74 -0
  89. package/dist/types/resources/settings.d.ts.map +1 -1
  90. package/dist/types/resources/simulations.d.ts.map +1 -1
  91. package/dist/types/resources/skills.d.ts +38 -0
  92. package/dist/types/resources/skills.d.ts.map +1 -1
  93. package/dist/types/resources/triggers.d.ts +30 -0
  94. package/dist/types/resources/triggers.d.ts.map +1 -1
  95. package/dist/types/resources/webhook-destinations.d.ts +26 -0
  96. package/dist/types/resources/webhook-destinations.d.ts.map +1 -1
  97. package/dist/types/resources/workspaces.d.ts +12 -0
  98. package/dist/types/resources/workspaces.d.ts.map +1 -1
  99. package/dist/types/resources/world.d.ts +132 -0
  100. package/dist/types/resources/world.d.ts.map +1 -1
  101. package/package.json +7 -7
package/README.md CHANGED
@@ -26,7 +26,7 @@
26
26
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License" /></a>
27
27
  </p>
28
28
 
29
- Typed from the committed `openapi.json` snapshot, validated on Node 18, 20, and 22, and tested as packaged ESM and CommonJS tarballs before release.
29
+ Typed from the committed `openapi.json` snapshot, validated on active LTS Node releases (20, 22, and 24), and tested as packaged ESM and CommonJS tarballs before release.
30
30
 
31
31
  ## Platform context
32
32
 
@@ -119,7 +119,7 @@ The SDK is built around web-standard primitives. Use it in runtimes that provide
119
119
  - `TextEncoder` / `TextDecoder`
120
120
  - `crypto.subtle` for webhook signature verification
121
121
 
122
- CI currently validates Node-based packaging and runtime behavior. Standards-based edge/server runtimes with the same APIs work well with the low-level request wrappers.
122
+ CI currently validates active LTS Node releases. Standards-based edge/server runtimes with the same APIs work well with the low-level request wrappers.
123
123
 
124
124
  ## Generated Types
125
125
 
@@ -586,18 +586,22 @@ const client = new AmigoClient({
586
586
 
587
587
  ## Pagination
588
588
 
589
- All list methods return `{ items, has_more, continuation_token }`. Use the `paginate` utility to iterate all pages automatically:
589
+ The SDK now exposes first-class async auto-pagination helpers on collection resources:
590
590
 
591
591
  ```typescript
592
- import { AmigoClient, paginate } from '@amigo-ai/platform-sdk'
592
+ import { AmigoClient } from '@amigo-ai/platform-sdk'
593
+
594
+ for await (const agent of client.agents.listAutoPaging({ limit: 100 })) {
595
+ console.log(agent.name)
596
+ }
593
597
 
594
- for await (const entity of paginate((token) =>
595
- client.world.listEntities({ continuation_token: token, limit: 100 }),
596
- )) {
597
- // process entity
598
+ for await (const entity of client.world.listEntitiesAutoPaging({ limit: 100 })) {
599
+ console.log(entity.display_name)
598
600
  }
599
601
  ```
600
602
 
603
+ For custom pagination flows, the lower-level `paginate(...)` utility remains available.
604
+
601
605
  ## Error handling
602
606
 
603
607
  All SDK errors extend `AmigoError`. Use type guards for specific handling:
package/api.md CHANGED
@@ -61,6 +61,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
61
61
 
62
62
  - `create`
63
63
  - `list`
64
+ - `listAutoPaging`
64
65
  - `get`
65
66
  - `update`
66
67
  - `archive`
@@ -70,6 +71,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
70
71
  - `me`
71
72
  - `create`
72
73
  - `list`
74
+ - `listAutoPaging`
73
75
  - `revoke`
74
76
  - `rotate`
75
77
 
@@ -77,10 +79,12 @@ All workspace-scoped resources also expose `withOptions(options)`.
77
79
 
78
80
  - `create`
79
81
  - `list`
82
+ - `listAutoPaging`
80
83
  - `get`
81
84
  - `update`
82
85
  - `delete`
83
86
  - `listVersions`
87
+ - `listVersionsAutoPaging`
84
88
  - `getVersion`
85
89
  - `createVersion`
86
90
 
@@ -88,6 +92,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
88
92
 
89
93
  - `create`
90
94
  - `list`
95
+ - `listAutoPaging`
91
96
  - `get`
92
97
  - `update`
93
98
  - `delete`
@@ -97,19 +102,24 @@ All workspace-scoped resources also expose `withOptions(options)`.
97
102
 
98
103
  - `create`
99
104
  - `list`
105
+ - `listAutoPaging`
100
106
  - `get`
101
107
  - `update`
102
108
  - `delete`
109
+ - `getReferences`
103
110
  - `test`
104
111
 
105
112
  ### `operators`
106
113
 
107
114
  - `list`
115
+ - `listAutoPaging`
108
116
  - `create`
109
117
  - `get`
118
+ - `update`
110
119
  - `getDashboard`
111
120
  - `getQueue`
112
121
  - `getEscalations`
122
+ - `getEscalationsAutoPaging`
113
123
  - `getActiveEscalations`
114
124
  - `getEscalationStats`
115
125
  - `getPerformance`
@@ -122,10 +132,12 @@ All workspace-scoped resources also expose `withOptions(options)`.
122
132
  - `wrapUp`
123
133
  - `getCallTranscript`
124
134
  - `getAuditLog`
135
+ - `getAuditLogAutoPaging`
125
136
 
126
137
  ### `triggers`
127
138
 
128
139
  - `list`
140
+ - `listAutoPaging`
129
141
  - `create`
130
142
  - `get`
131
143
  - `update`
@@ -134,11 +146,13 @@ All workspace-scoped resources also expose `withOptions(options)`.
134
146
  - `pause`
135
147
  - `resume`
136
148
  - `listRuns`
149
+ - `listRunsAutoPaging`
137
150
 
138
151
  ### `services`
139
152
 
140
153
  - `create`
141
154
  - `list`
155
+ - `listAutoPaging`
142
156
  - `get`
143
157
  - `update`
144
158
  - `delete`
@@ -147,17 +161,20 @@ All workspace-scoped resources also expose `withOptions(options)`.
147
161
 
148
162
  - `create`
149
163
  - `list`
164
+ - `listAutoPaging`
150
165
  - `get`
151
166
  - `update`
152
167
  - `delete`
153
168
  - `createVersion`
154
169
  - `listVersions`
170
+ - `listVersionsAutoPaging`
155
171
  - `getVersion`
156
172
 
157
173
  ### `dataSources`
158
174
 
159
175
  - `create`
160
176
  - `list`
177
+ - `listAutoPaging`
161
178
  - `get`
162
179
  - `update`
163
180
  - `delete`
@@ -167,18 +184,24 @@ All workspace-scoped resources also expose `withOptions(options)`.
167
184
  ### `world`
168
185
 
169
186
  - `listEntities`
187
+ - `listEntitiesAutoPaging`
170
188
  - `getEntity`
171
189
  - `getRelationships`
172
190
  - `getGraph`
173
191
  - `getProvenance`
174
192
  - `getLineage`
175
193
  - `getMerged`
194
+ - `getConnectors`
195
+ - `getConnectorEntities`
196
+ - `getConnectorResources`
176
197
  - `listEntityTypes`
177
198
  - `listDuplicates`
178
199
  - `search`
179
200
  - `getTimeline`
201
+ - `getTimelineAutoPaging`
180
202
  - `getSyncStatusBySink`
181
203
  - `listSyncEvents`
204
+ - `listSyncEventsAutoPaging`
182
205
  - `getSyncQueueDepth`
183
206
  - `retrySyncEvent`
184
207
  - `retryAllSyncEvents`
@@ -188,16 +211,19 @@ All workspace-scoped resources also expose `withOptions(options)`.
188
211
  ### `calls`
189
212
 
190
213
  - `list`
214
+ - `listAutoPaging`
191
215
  - `get`
192
216
  - `getIntelligence`
193
217
  - `getActiveIntelligence`
194
218
  - `getBenchmarks`
219
+ - `getPhoneVolume`
195
220
  - `getTraceAnalysis`
196
221
 
197
222
  ### `phoneNumbers`
198
223
 
199
224
  - `provision`
200
225
  - `list`
226
+ - `listAutoPaging`
201
227
  - `get`
202
228
  - `update`
203
229
  - `release`
@@ -208,6 +234,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
208
234
 
209
235
  - `create`
210
236
  - `list`
237
+ - `listAutoPaging`
211
238
  - `get`
212
239
  - `update`
213
240
  - `delete`
@@ -225,6 +252,9 @@ All workspace-scoped resources also expose `withOptions(options)`.
225
252
  - `getToolPerformance`
226
253
  - `getDataQuality`
227
254
  - `getUsage`
255
+ - `getEventBreakdown`
256
+ - `getSafetyTrends`
257
+ - `getOperatorPerformance`
228
258
  - `getAdvancedCallStats`
229
259
  - `compareCallPeriods`
230
260
 
@@ -251,6 +281,16 @@ All workspace-scoped resources also expose `withOptions(options)`.
251
281
  - `security.update`
252
282
  - `retention.get`
253
283
  - `retention.update`
284
+ - `behaviors.get`
285
+ - `behaviors.update`
286
+ - `gapScanner.get`
287
+ - `gapScanner.update`
288
+ - `scribe.get`
289
+ - `scribe.update`
290
+ - `metrics.get`
291
+ - `metrics.update`
292
+ - `environments.get`
293
+ - `environments.update`
254
294
  - `workflows.get`
255
295
  - `workflows.update`
256
296
 
@@ -260,6 +300,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
260
300
  - `getUsage`
261
301
  - `getUsageTrends`
262
302
  - `listInvoices`
303
+ - `listInvoicesAutoPaging`
263
304
  - `getInvoice`
264
305
  - `getInvoicePdf`
265
306
 
@@ -272,6 +313,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
272
313
  ### `personas`
273
314
 
274
315
  - `list`
316
+ - `listAutoPaging`
275
317
  - `create`
276
318
  - `get`
277
319
  - `update`
@@ -280,10 +322,12 @@ All workspace-scoped resources also expose `withOptions(options)`.
280
322
  ### `reviewQueue`
281
323
 
282
324
  - `list`
325
+ - `listAutoPaging`
283
326
  - `get`
284
327
  - `getStats`
285
328
  - `getDashboard`
286
329
  - `getMyQueue`
330
+ - `getMyQueueAutoPaging`
287
331
  - `approve`
288
332
  - `reject`
289
333
  - `claim`
@@ -292,6 +336,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
292
336
  - `batchApprove`
293
337
  - `batchReject`
294
338
  - `getHistory`
339
+ - `getHistoryAutoPaging`
295
340
  - `getTrends`
296
341
  - `getPerformance`
297
342
  - `getCorrectionSchema`
@@ -306,20 +351,25 @@ All workspace-scoped resources also expose `withOptions(options)`.
306
351
  ### `audit`
307
352
 
308
353
  - `list`
354
+ - `listAutoPaging`
309
355
  - `getSummary`
310
356
  - `getPhiAccess`
357
+ - `getPhiAccessAutoPaging`
311
358
  - `createExport`
312
359
  - `listExports`
313
360
  - `getEntityAccessLog`
361
+ - `getEntityAccessLogAutoPaging`
314
362
 
315
363
  ### `webhookDestinations`
316
364
 
317
365
  - `list`
366
+ - `listAutoPaging`
318
367
  - `create`
319
368
  - `get`
320
369
  - `update`
321
370
  - `delete`
322
371
  - `listDeliveries`
372
+ - `listDeliveriesAutoPaging`
323
373
  - `rotateSecret`
324
374
 
325
375
  ### `safety`