@amigo-ai/platform-sdk 0.4.4 → 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 (102) hide show
  1. package/README.md +12 -8
  2. package/api.md +50 -0
  3. package/assets/readme/platform-architecture.svg +75 -89
  4. package/dist/index.cjs +305 -1
  5. package/dist/index.cjs.map +3 -3
  6. package/dist/index.mjs +305 -1
  7. package/dist/index.mjs.map +3 -3
  8. package/dist/resources/actions.js +9 -0
  9. package/dist/resources/actions.js.map +1 -1
  10. package/dist/resources/agents.js +6 -0
  11. package/dist/resources/agents.js.map +1 -1
  12. package/dist/resources/analytics.js +18 -0
  13. package/dist/resources/analytics.js.map +1 -1
  14. package/dist/resources/api-keys.js +3 -0
  15. package/dist/resources/api-keys.js.map +1 -1
  16. package/dist/resources/audit.js +9 -0
  17. package/dist/resources/audit.js.map +1 -1
  18. package/dist/resources/base.js +26 -0
  19. package/dist/resources/base.js.map +1 -1
  20. package/dist/resources/billing.js +3 -0
  21. package/dist/resources/billing.js.map +1 -1
  22. package/dist/resources/calls.js +9 -0
  23. package/dist/resources/calls.js.map +1 -1
  24. package/dist/resources/context-graphs.js +7 -1
  25. package/dist/resources/context-graphs.js.map +1 -1
  26. package/dist/resources/data-sources.js +3 -0
  27. package/dist/resources/data-sources.js.map +1 -1
  28. package/dist/resources/integrations.js +3 -0
  29. package/dist/resources/integrations.js.map +1 -1
  30. package/dist/resources/operators.js +16 -0
  31. package/dist/resources/operators.js.map +1 -1
  32. package/dist/resources/personas.js +3 -0
  33. package/dist/resources/personas.js.map +1 -1
  34. package/dist/resources/phone-numbers.js +3 -0
  35. package/dist/resources/phone-numbers.js.map +1 -1
  36. package/dist/resources/review-queue.js +9 -0
  37. package/dist/resources/review-queue.js.map +1 -1
  38. package/dist/resources/services.js +3 -0
  39. package/dist/resources/services.js.map +1 -1
  40. package/dist/resources/settings.js +45 -0
  41. package/dist/resources/settings.js.map +1 -1
  42. package/dist/resources/skills.js +3 -0
  43. package/dist/resources/skills.js.map +1 -1
  44. package/dist/resources/triggers.js +6 -0
  45. package/dist/resources/triggers.js.map +1 -1
  46. package/dist/resources/webhook-destinations.js +6 -0
  47. package/dist/resources/webhook-destinations.js.map +1 -1
  48. package/dist/resources/workspaces.js +3 -0
  49. package/dist/resources/workspaces.js.map +1 -1
  50. package/dist/resources/world.js +34 -0
  51. package/dist/resources/world.js.map +1 -1
  52. package/dist/types/generated/api.d.ts +183 -9
  53. package/dist/types/generated/api.d.ts.map +1 -1
  54. package/dist/types/resources/actions.d.ts +45 -0
  55. package/dist/types/resources/actions.d.ts.map +1 -1
  56. package/dist/types/resources/agents.d.ts +24 -0
  57. package/dist/types/resources/agents.d.ts.map +1 -1
  58. package/dist/types/resources/analytics.d.ts +36 -0
  59. package/dist/types/resources/analytics.d.ts.map +1 -1
  60. package/dist/types/resources/api-keys.d.ts +16 -0
  61. package/dist/types/resources/api-keys.d.ts.map +1 -1
  62. package/dist/types/resources/audit.d.ts +54 -0
  63. package/dist/types/resources/audit.d.ts.map +1 -1
  64. package/dist/types/resources/base.d.ts +11 -0
  65. package/dist/types/resources/base.d.ts.map +1 -1
  66. package/dist/types/resources/billing.d.ts +17 -0
  67. package/dist/types/resources/billing.d.ts.map +1 -1
  68. package/dist/types/resources/calls.d.ts +34 -0
  69. package/dist/types/resources/calls.d.ts.map +1 -1
  70. package/dist/types/resources/context-graphs.d.ts +29 -2
  71. package/dist/types/resources/context-graphs.d.ts.map +1 -1
  72. package/dist/types/resources/data-sources.d.ts +26 -0
  73. package/dist/types/resources/data-sources.d.ts.map +1 -1
  74. package/dist/types/resources/functions.d.ts.map +1 -1
  75. package/dist/types/resources/integrations.d.ts +21 -0
  76. package/dist/types/resources/integrations.d.ts.map +1 -1
  77. package/dist/types/resources/memory.d.ts.map +1 -1
  78. package/dist/types/resources/operators.d.ts +73 -0
  79. package/dist/types/resources/operators.d.ts.map +1 -1
  80. package/dist/types/resources/personas.d.ts +14 -0
  81. package/dist/types/resources/personas.d.ts.map +1 -1
  82. package/dist/types/resources/phone-numbers.d.ts +15 -0
  83. package/dist/types/resources/phone-numbers.d.ts.map +1 -1
  84. package/dist/types/resources/review-queue.d.ts +60 -0
  85. package/dist/types/resources/review-queue.d.ts.map +1 -1
  86. package/dist/types/resources/safety.d.ts.map +1 -1
  87. package/dist/types/resources/services.d.ts +26 -0
  88. package/dist/types/resources/services.d.ts.map +1 -1
  89. package/dist/types/resources/settings.d.ts +74 -0
  90. package/dist/types/resources/settings.d.ts.map +1 -1
  91. package/dist/types/resources/simulations.d.ts.map +1 -1
  92. package/dist/types/resources/skills.d.ts +38 -0
  93. package/dist/types/resources/skills.d.ts.map +1 -1
  94. package/dist/types/resources/triggers.d.ts +30 -0
  95. package/dist/types/resources/triggers.d.ts.map +1 -1
  96. package/dist/types/resources/webhook-destinations.d.ts +26 -0
  97. package/dist/types/resources/webhook-destinations.d.ts.map +1 -1
  98. package/dist/types/resources/workspaces.d.ts +12 -0
  99. package/dist/types/resources/workspaces.d.ts.map +1 -1
  100. package/dist/types/resources/world.d.ts +132 -0
  101. package/dist/types/resources/world.d.ts.map +1 -1
  102. package/package.json +7 -7
package/dist/index.cjs CHANGED
@@ -728,10 +728,38 @@ var WorkspaceScopedResource = class {
728
728
  this.client = client;
729
729
  this.workspaceId = workspaceId2;
730
730
  }
731
+ client;
732
+ workspaceId;
731
733
  withOptions(options) {
732
734
  const ResourceCtor = this.constructor;
733
735
  return new ResourceCtor(scopePlatformClient(this.client, options), this.workspaceId);
734
736
  }
737
+ async *iteratePaginatedList(fetchPage, params) {
738
+ let nextParams = params;
739
+ while (true) {
740
+ const page = await fetchPage(nextParams);
741
+ for (const item of page.items ?? []) {
742
+ yield item;
743
+ }
744
+ if (!page.has_more || page.continuation_token === null || page.continuation_token === void 0) {
745
+ break;
746
+ }
747
+ nextParams = { ...nextParams, continuation_token: page.continuation_token };
748
+ }
749
+ }
750
+ async *iterateOffsetPaginatedList(fetchPage, selectItems, params) {
751
+ let nextParams = params;
752
+ while (true) {
753
+ const page = await fetchPage(nextParams);
754
+ for (const item of selectItems(page)) {
755
+ yield item;
756
+ }
757
+ if (!page.has_more || page.next_offset === null || page.next_offset === void 0) {
758
+ break;
759
+ }
760
+ nextParams = { ...nextParams, offset: page.next_offset };
761
+ }
762
+ }
735
763
  };
736
764
  function scopePlatformClient(client, options) {
737
765
  const { baseClient, options: existingOptions } = resolveScopedPlatformClient(client);
@@ -833,6 +861,9 @@ var WorkspacesResource = class extends WorkspaceScopedResource {
833
861
  })
834
862
  );
835
863
  }
864
+ listAutoPaging(params) {
865
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
866
+ }
836
867
  /** Get a single workspace by ID */
837
868
  async get(id) {
838
869
  return extractData(
@@ -887,6 +918,9 @@ var ApiKeysResource = class extends WorkspaceScopedResource {
887
918
  })
888
919
  );
889
920
  }
921
+ listAutoPaging(params) {
922
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
923
+ }
890
924
  /** Revoke an API key */
891
925
  async revoke(keyId) {
892
926
  await this.client.DELETE("/v1/{workspace_id}/api-keys/{key_id}", {
@@ -921,6 +955,9 @@ var AgentsResource = class extends WorkspaceScopedResource {
921
955
  })
922
956
  );
923
957
  }
958
+ listAutoPaging(params) {
959
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
960
+ }
924
961
  async get(agentId2) {
925
962
  return extractData(
926
963
  await this.client.GET("/v1/{workspace_id}/agents/{agent_id}", {
@@ -948,6 +985,9 @@ var AgentsResource = class extends WorkspaceScopedResource {
948
985
  })
949
986
  );
950
987
  }
988
+ listVersionsAutoPaging(agentId2, params) {
989
+ return this.iteratePaginatedList((pageParams) => this.listVersions(agentId2, pageParams), params);
990
+ }
951
991
  async getVersion(agentId2, version) {
952
992
  return extractData(
953
993
  await this.client.GET("/v1/{workspace_id}/agents/{agent_id}/versions/{version}", {
@@ -986,6 +1026,9 @@ var SkillsResource = class extends WorkspaceScopedResource {
986
1026
  })
987
1027
  );
988
1028
  }
1029
+ listAutoPaging(params) {
1030
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1031
+ }
989
1032
  /** Get a single skill */
990
1033
  async get(skillId2) {
991
1034
  return extractData(
@@ -1042,6 +1085,9 @@ var ActionsResource = class extends WorkspaceScopedResource {
1042
1085
  })
1043
1086
  );
1044
1087
  }
1088
+ listAutoPaging(params) {
1089
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1090
+ }
1045
1091
  /** Get a single action */
1046
1092
  async get(actionId2) {
1047
1093
  return extractData(
@@ -1065,6 +1111,14 @@ var ActionsResource = class extends WorkspaceScopedResource {
1065
1111
  params: { path: { workspace_id: this.workspaceId, skill_id: actionId2 } }
1066
1112
  });
1067
1113
  }
1114
+ /** Get all context graphs and services that reference this action */
1115
+ async getReferences(actionId2) {
1116
+ return extractData(
1117
+ await this.client.GET("/v1/{workspace_id}/skills/{skill_id}/references", {
1118
+ params: { path: { workspace_id: this.workspaceId, skill_id: actionId2 } }
1119
+ })
1120
+ );
1121
+ }
1068
1122
  /**
1069
1123
  * Test an action with a sample input.
1070
1124
  * Executes the action in a sandbox and returns the result.
@@ -1088,6 +1142,9 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1088
1142
  })
1089
1143
  );
1090
1144
  }
1145
+ listAutoPaging(params) {
1146
+ return this.iterateOffsetPaginatedList((pageParams) => this.list(pageParams), (page) => page.items, params);
1147
+ }
1091
1148
  async create(body) {
1092
1149
  return extractData(
1093
1150
  await this.client.POST("/v1/{workspace_id}/operators", {
@@ -1103,6 +1160,15 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1103
1160
  })
1104
1161
  );
1105
1162
  }
1163
+ /** Update an operator (name, role, status, etc.) */
1164
+ async update(operatorId, body) {
1165
+ return extractData(
1166
+ await this.client.PATCH("/v1/{workspace_id}/operators/{operator_id}", {
1167
+ params: { path: { workspace_id: this.workspaceId, operator_id: operatorId } },
1168
+ body
1169
+ })
1170
+ );
1171
+ }
1106
1172
  async getDashboard() {
1107
1173
  return extractData(
1108
1174
  await this.client.GET("/v1/{workspace_id}/operators/dashboard", {
@@ -1124,6 +1190,13 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1124
1190
  })
1125
1191
  );
1126
1192
  }
1193
+ getEscalationsAutoPaging(params) {
1194
+ return this.iterateOffsetPaginatedList(
1195
+ (pageParams) => this.getEscalations(pageParams),
1196
+ (page) => page.items,
1197
+ params
1198
+ );
1199
+ }
1127
1200
  async getActiveEscalations() {
1128
1201
  return extractData(
1129
1202
  await this.client.GET("/v1/{workspace_id}/operators/escalations/active", {
@@ -1215,6 +1288,13 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1215
1288
  })
1216
1289
  );
1217
1290
  }
1291
+ getAuditLogAutoPaging(params) {
1292
+ return this.iterateOffsetPaginatedList(
1293
+ (pageParams) => this.getAuditLog(pageParams),
1294
+ (page) => page.items,
1295
+ params
1296
+ );
1297
+ }
1218
1298
  };
1219
1299
 
1220
1300
  // src/resources/triggers.ts
@@ -1226,6 +1306,9 @@ var TriggersResource = class extends WorkspaceScopedResource {
1226
1306
  })
1227
1307
  );
1228
1308
  }
1309
+ listAutoPaging(params) {
1310
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1311
+ }
1229
1312
  async create(body) {
1230
1313
  return extractData(
1231
1314
  await this.client.POST("/v1/{workspace_id}/triggers", {
@@ -1282,6 +1365,9 @@ var TriggersResource = class extends WorkspaceScopedResource {
1282
1365
  })
1283
1366
  );
1284
1367
  }
1368
+ listRunsAutoPaging(triggerId, params) {
1369
+ return this.iteratePaginatedList((pageParams) => this.listRuns(triggerId, pageParams), params);
1370
+ }
1285
1371
  };
1286
1372
 
1287
1373
  // src/resources/services.ts
@@ -1301,6 +1387,9 @@ var ServicesResource = class extends WorkspaceScopedResource {
1301
1387
  })
1302
1388
  );
1303
1389
  }
1390
+ listAutoPaging(params) {
1391
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1392
+ }
1304
1393
  async get(serviceId2) {
1305
1394
  return extractData(
1306
1395
  await this.client.GET("/v1/{workspace_id}/services/{service_id}", {
@@ -1340,6 +1429,9 @@ var ContextGraphsResource = class extends WorkspaceScopedResource {
1340
1429
  })
1341
1430
  );
1342
1431
  }
1432
+ listAutoPaging(params) {
1433
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1434
+ }
1343
1435
  async get(contextGraphId2) {
1344
1436
  return extractData(
1345
1437
  await this.client.GET("/v1/{workspace_id}/context-graphs/{context_graph_id}", {
@@ -1388,7 +1480,13 @@ var ContextGraphsResource = class extends WorkspaceScopedResource {
1388
1480
  })
1389
1481
  );
1390
1482
  }
1391
- /** Get a specific version */
1483
+ listVersionsAutoPaging(contextGraphId2, params) {
1484
+ return this.iteratePaginatedList(
1485
+ (pageParams) => this.listVersions(contextGraphId2, pageParams),
1486
+ params
1487
+ );
1488
+ }
1489
+ /** Get a specific version by number, or pass "latest" for the most recent */
1392
1490
  async getVersion(contextGraphId2, version) {
1393
1491
  return extractData(
1394
1492
  await this.client.GET(
@@ -1424,6 +1522,9 @@ var DataSourcesResource = class extends WorkspaceScopedResource {
1424
1522
  })
1425
1523
  );
1426
1524
  }
1525
+ listAutoPaging(params) {
1526
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1527
+ }
1427
1528
  async get(dataSourceId2) {
1428
1529
  return extractData(
1429
1530
  await this.client.GET("/v1/{workspace_id}/data-sources/{data_source_id}", {
@@ -1473,6 +1574,13 @@ var WorldResource = class extends WorkspaceScopedResource {
1473
1574
  })
1474
1575
  );
1475
1576
  }
1577
+ listEntitiesAutoPaging(params) {
1578
+ return this.iterateOffsetPaginatedList(
1579
+ (pageParams) => this.listEntities(pageParams),
1580
+ (page) => page.entities,
1581
+ params
1582
+ );
1583
+ }
1476
1584
  /** Get a single entity */
1477
1585
  async getEntity(entityId2) {
1478
1586
  return extractData(
@@ -1521,6 +1629,37 @@ var WorldResource = class extends WorkspaceScopedResource {
1521
1629
  })
1522
1630
  );
1523
1631
  }
1632
+ // ---- Connectors ----
1633
+ /** Get connected data sources overview with entity counts and sync status */
1634
+ async getConnectors() {
1635
+ return extractData(
1636
+ await this.client.GET("/v1/{workspace_id}/world/connectors", {
1637
+ params: { path: { workspace_id: this.workspaceId } }
1638
+ })
1639
+ );
1640
+ }
1641
+ /** List entities from a specific connector / data source */
1642
+ async getConnectorEntities(dataSourceId2, params) {
1643
+ return extractData(
1644
+ await this.client.GET("/v1/{workspace_id}/world/connectors/{data_source_id}/entities", {
1645
+ params: {
1646
+ path: { workspace_id: this.workspaceId, data_source_id: dataSourceId2 },
1647
+ query: params
1648
+ }
1649
+ })
1650
+ );
1651
+ }
1652
+ /** Search FHIR resources from a specific data source */
1653
+ async getConnectorResources(dataSourceId2, params) {
1654
+ return extractData(
1655
+ await this.client.GET("/v1/{workspace_id}/world/connectors/{data_source_id}/resources", {
1656
+ params: {
1657
+ path: { workspace_id: this.workspaceId, data_source_id: dataSourceId2 },
1658
+ query: params
1659
+ }
1660
+ })
1661
+ );
1662
+ }
1524
1663
  // ---- Entity Types ----
1525
1664
  /** List registered entity types with counts and schemas */
1526
1665
  async listEntityTypes() {
@@ -1560,6 +1699,13 @@ var WorldResource = class extends WorkspaceScopedResource {
1560
1699
  })
1561
1700
  );
1562
1701
  }
1702
+ getTimelineAutoPaging(entityId2, params) {
1703
+ return this.iterateOffsetPaginatedList(
1704
+ (pageParams) => this.getTimeline(entityId2, pageParams),
1705
+ (page) => page.events,
1706
+ params
1707
+ );
1708
+ }
1563
1709
  // ---- Sync ----
1564
1710
  /** Get sync status grouped by sink (Lakebase, Delta, etc.) */
1565
1711
  async getSyncStatusBySink() {
@@ -1577,6 +1723,13 @@ var WorldResource = class extends WorkspaceScopedResource {
1577
1723
  })
1578
1724
  );
1579
1725
  }
1726
+ listSyncEventsAutoPaging(params) {
1727
+ return this.iterateOffsetPaginatedList(
1728
+ (pageParams) => this.listSyncEvents(pageParams),
1729
+ (page) => page.events,
1730
+ params
1731
+ );
1732
+ }
1580
1733
  /** Get current sync queue depth */
1581
1734
  async getSyncQueueDepth() {
1582
1735
  return extractData(
@@ -1630,6 +1783,9 @@ var CallsResource = class extends WorkspaceScopedResource {
1630
1783
  })
1631
1784
  );
1632
1785
  }
1786
+ listAutoPaging(params) {
1787
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1788
+ }
1633
1789
  /** Get full call detail including turns, escalation, safety, and recording info */
1634
1790
  async get(callId2) {
1635
1791
  return extractData(
@@ -1662,6 +1818,14 @@ var CallsResource = class extends WorkspaceScopedResource {
1662
1818
  })
1663
1819
  );
1664
1820
  }
1821
+ /** Get phone number call volume breakdown */
1822
+ async getPhoneVolume(params) {
1823
+ return extractData(
1824
+ await this.client.GET("/v1/{workspace_id}/calls/phone-volume", {
1825
+ params: { path: { workspace_id: this.workspaceId }, query: params }
1826
+ })
1827
+ );
1828
+ }
1665
1829
  /** Get deep call trace analysis */
1666
1830
  async getTraceAnalysis(callId2) {
1667
1831
  return extractData(
@@ -1691,6 +1855,9 @@ var PhoneNumbersResource = class extends WorkspaceScopedResource {
1691
1855
  })
1692
1856
  );
1693
1857
  }
1858
+ listAutoPaging(params) {
1859
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1860
+ }
1694
1861
  /** Get a phone number */
1695
1862
  async get(phoneNumberId2) {
1696
1863
  return extractData(
@@ -1750,6 +1917,9 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
1750
1917
  })
1751
1918
  );
1752
1919
  }
1920
+ listAutoPaging(params) {
1921
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1922
+ }
1753
1923
  /** Get a single integration */
1754
1924
  async get(integrationId2) {
1755
1925
  return extractData(
@@ -1878,6 +2048,30 @@ var AnalyticsResource = class extends WorkspaceScopedResource {
1878
2048
  })
1879
2049
  );
1880
2050
  }
2051
+ /** Event type breakdown — counts and trends per event type */
2052
+ async getEventBreakdown(params) {
2053
+ return extractData(
2054
+ await this.client.GET("/v1/{workspace_id}/analytics/events", {
2055
+ params: { path: { workspace_id: this.workspaceId }, query: params }
2056
+ })
2057
+ );
2058
+ }
2059
+ /** Safety and escalation trends — risk distribution and time-series data */
2060
+ async getSafetyTrends(params) {
2061
+ return extractData(
2062
+ await this.client.GET("/v1/{workspace_id}/analytics/safety-trends", {
2063
+ params: { path: { workspace_id: this.workspaceId }, query: params }
2064
+ })
2065
+ );
2066
+ }
2067
+ /** Operator escalation performance and quality comparison */
2068
+ async getOperatorPerformance(params) {
2069
+ return extractData(
2070
+ await this.client.GET("/v1/{workspace_id}/analytics/operator-performance", {
2071
+ params: { path: { workspace_id: this.workspaceId }, query: params }
2072
+ })
2073
+ );
2074
+ }
1881
2075
  /** Advanced call statistics (abandonment, transfers, silence, hour-of-day) */
1882
2076
  async getAdvancedCallStats(params) {
1883
2077
  return extractData(
@@ -2037,6 +2231,71 @@ var SettingsResource = class extends WorkspaceScopedResource {
2037
2231
  })
2038
2232
  )
2039
2233
  };
2234
+ behaviors = {
2235
+ get: async () => extractData(
2236
+ await this.client.GET("/v1/{workspace_id}/settings/behaviors", {
2237
+ params: { path: { workspace_id: this.workspaceId } }
2238
+ })
2239
+ ),
2240
+ update: async (body) => extractData(
2241
+ await this.client.PUT("/v1/{workspace_id}/settings/behaviors", {
2242
+ params: { path: { workspace_id: this.workspaceId } },
2243
+ body
2244
+ })
2245
+ )
2246
+ };
2247
+ gapScanner = {
2248
+ get: async () => extractData(
2249
+ await this.client.GET("/v1/{workspace_id}/settings/gap-scanner", {
2250
+ params: { path: { workspace_id: this.workspaceId } }
2251
+ })
2252
+ ),
2253
+ update: async (body) => extractData(
2254
+ await this.client.PUT("/v1/{workspace_id}/settings/gap-scanner", {
2255
+ params: { path: { workspace_id: this.workspaceId } },
2256
+ body
2257
+ })
2258
+ )
2259
+ };
2260
+ scribe = {
2261
+ get: async () => extractData(
2262
+ await this.client.GET("/v1/{workspace_id}/settings/scribe", {
2263
+ params: { path: { workspace_id: this.workspaceId } }
2264
+ })
2265
+ ),
2266
+ update: async (body) => extractData(
2267
+ await this.client.PUT("/v1/{workspace_id}/settings/scribe", {
2268
+ params: { path: { workspace_id: this.workspaceId } },
2269
+ body
2270
+ })
2271
+ )
2272
+ };
2273
+ metrics = {
2274
+ get: async () => extractData(
2275
+ await this.client.GET("/v1/{workspace_id}/settings/metrics", {
2276
+ params: { path: { workspace_id: this.workspaceId } }
2277
+ })
2278
+ ),
2279
+ update: async (body) => extractData(
2280
+ await this.client.PUT("/v1/{workspace_id}/settings/metrics", {
2281
+ params: { path: { workspace_id: this.workspaceId } },
2282
+ body
2283
+ })
2284
+ )
2285
+ };
2286
+ environments = {
2287
+ get: async () => extractData(
2288
+ await this.client.GET("/v1/{workspace_id}/settings/environments", {
2289
+ params: { path: { workspace_id: this.workspaceId } }
2290
+ })
2291
+ ),
2292
+ update: async (body) => extractData(
2293
+ await this.client.PUT("/v1/{workspace_id}/settings/environments", {
2294
+ params: { path: { workspace_id: this.workspaceId } },
2295
+ body
2296
+ })
2297
+ )
2298
+ };
2040
2299
  workflows = {
2041
2300
  get: async () => extractData(
2042
2301
  await this.client.GET("/v1/{workspace_id}/settings/workflows", {
@@ -2086,6 +2345,9 @@ var BillingResource = class extends WorkspaceScopedResource {
2086
2345
  })
2087
2346
  );
2088
2347
  }
2348
+ listInvoicesAutoPaging(params) {
2349
+ return this.iteratePaginatedList((pageParams) => this.listInvoices(pageParams), params);
2350
+ }
2089
2351
  /** Get invoice detail */
2090
2352
  async getInvoice(invoiceId) {
2091
2353
  return extractData(
@@ -2152,6 +2414,9 @@ var PersonasResource = class extends WorkspaceScopedResource {
2152
2414
  })
2153
2415
  );
2154
2416
  }
2417
+ listAutoPaging(params) {
2418
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
2419
+ }
2155
2420
  async create(body) {
2156
2421
  return extractData(
2157
2422
  await this.client.POST("/v1/{workspace_id}/personas", {
@@ -2191,6 +2456,9 @@ var ReviewQueueResource = class extends WorkspaceScopedResource {
2191
2456
  })
2192
2457
  );
2193
2458
  }
2459
+ listAutoPaging(params) {
2460
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
2461
+ }
2194
2462
  async get(itemId) {
2195
2463
  return extractData(
2196
2464
  await this.client.GET("/v1/{workspace_id}/review-queue/{item_id}", {
@@ -2219,6 +2487,9 @@ var ReviewQueueResource = class extends WorkspaceScopedResource {
2219
2487
  })
2220
2488
  );
2221
2489
  }
2490
+ getMyQueueAutoPaging(params) {
2491
+ return this.iteratePaginatedList((pageParams) => this.getMyQueue(pageParams), params);
2492
+ }
2222
2493
  async approve(itemId, body) {
2223
2494
  return extractData(
2224
2495
  await this.client.POST("/v1/{workspace_id}/review-queue/{item_id}/approve", {
@@ -2280,6 +2551,9 @@ var ReviewQueueResource = class extends WorkspaceScopedResource {
2280
2551
  })
2281
2552
  );
2282
2553
  }
2554
+ getHistoryAutoPaging(params) {
2555
+ return this.iteratePaginatedList((pageParams) => this.getHistory(pageParams), params);
2556
+ }
2283
2557
  async getTrends(params) {
2284
2558
  return extractData(
2285
2559
  await this.client.GET("/v1/{workspace_id}/review-queue/trends", {
@@ -2344,6 +2618,13 @@ var AuditResource = class extends WorkspaceScopedResource {
2344
2618
  })
2345
2619
  );
2346
2620
  }
2621
+ listAutoPaging(params) {
2622
+ return this.iterateOffsetPaginatedList(
2623
+ (pageParams) => this.list(pageParams),
2624
+ (page) => page.events,
2625
+ params
2626
+ );
2627
+ }
2347
2628
  async getSummary(params) {
2348
2629
  return extractData(
2349
2630
  await this.client.GET("/v1/{workspace_id}/audit/summary", {
@@ -2358,6 +2639,13 @@ var AuditResource = class extends WorkspaceScopedResource {
2358
2639
  })
2359
2640
  );
2360
2641
  }
2642
+ getPhiAccessAutoPaging(params) {
2643
+ return this.iterateOffsetPaginatedList(
2644
+ (pageParams) => this.getPhiAccess(pageParams),
2645
+ (page) => page.events,
2646
+ params
2647
+ );
2648
+ }
2361
2649
  async createExport(body) {
2362
2650
  return extractData(
2363
2651
  await this.client.POST("/v1/{workspace_id}/audit/export", {
@@ -2380,6 +2668,13 @@ var AuditResource = class extends WorkspaceScopedResource {
2380
2668
  })
2381
2669
  );
2382
2670
  }
2671
+ getEntityAccessLogAutoPaging(entityId2, params) {
2672
+ return this.iterateOffsetPaginatedList(
2673
+ (pageParams) => this.getEntityAccessLog(entityId2, pageParams),
2674
+ (page) => page.events,
2675
+ params
2676
+ );
2677
+ }
2383
2678
  };
2384
2679
 
2385
2680
  // src/resources/webhook-destinations.ts
@@ -2391,6 +2686,9 @@ var WebhookDestinationsResource = class extends WorkspaceScopedResource {
2391
2686
  })
2392
2687
  );
2393
2688
  }
2689
+ listAutoPaging(params) {
2690
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
2691
+ }
2394
2692
  async create(body) {
2395
2693
  return extractData(
2396
2694
  await this.client.POST("/v1/{workspace_id}/webhook-destinations", {
@@ -2432,6 +2730,12 @@ var WebhookDestinationsResource = class extends WorkspaceScopedResource {
2432
2730
  )
2433
2731
  );
2434
2732
  }
2733
+ listDeliveriesAutoPaging(destinationId, params) {
2734
+ return this.iteratePaginatedList(
2735
+ (pageParams) => this.listDeliveries(destinationId, pageParams),
2736
+ params
2737
+ );
2738
+ }
2435
2739
  async rotateSecret(destinationId) {
2436
2740
  return extractData(
2437
2741
  await this.client.POST(