@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/dist/index.mjs CHANGED
@@ -648,10 +648,38 @@ var WorkspaceScopedResource = class {
648
648
  this.client = client;
649
649
  this.workspaceId = workspaceId2;
650
650
  }
651
+ client;
652
+ workspaceId;
651
653
  withOptions(options) {
652
654
  const ResourceCtor = this.constructor;
653
655
  return new ResourceCtor(scopePlatformClient(this.client, options), this.workspaceId);
654
656
  }
657
+ async *iteratePaginatedList(fetchPage, params) {
658
+ let nextParams = params;
659
+ while (true) {
660
+ const page = await fetchPage(nextParams);
661
+ for (const item of page.items ?? []) {
662
+ yield item;
663
+ }
664
+ if (!page.has_more || page.continuation_token === null || page.continuation_token === void 0) {
665
+ break;
666
+ }
667
+ nextParams = { ...nextParams, continuation_token: page.continuation_token };
668
+ }
669
+ }
670
+ async *iterateOffsetPaginatedList(fetchPage, selectItems, params) {
671
+ let nextParams = params;
672
+ while (true) {
673
+ const page = await fetchPage(nextParams);
674
+ for (const item of selectItems(page)) {
675
+ yield item;
676
+ }
677
+ if (!page.has_more || page.next_offset === null || page.next_offset === void 0) {
678
+ break;
679
+ }
680
+ nextParams = { ...nextParams, offset: page.next_offset };
681
+ }
682
+ }
655
683
  };
656
684
  function scopePlatformClient(client, options) {
657
685
  const { baseClient, options: existingOptions } = resolveScopedPlatformClient(client);
@@ -753,6 +781,9 @@ var WorkspacesResource = class extends WorkspaceScopedResource {
753
781
  })
754
782
  );
755
783
  }
784
+ listAutoPaging(params) {
785
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
786
+ }
756
787
  /** Get a single workspace by ID */
757
788
  async get(id) {
758
789
  return extractData(
@@ -807,6 +838,9 @@ var ApiKeysResource = class extends WorkspaceScopedResource {
807
838
  })
808
839
  );
809
840
  }
841
+ listAutoPaging(params) {
842
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
843
+ }
810
844
  /** Revoke an API key */
811
845
  async revoke(keyId) {
812
846
  await this.client.DELETE("/v1/{workspace_id}/api-keys/{key_id}", {
@@ -841,6 +875,9 @@ var AgentsResource = class extends WorkspaceScopedResource {
841
875
  })
842
876
  );
843
877
  }
878
+ listAutoPaging(params) {
879
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
880
+ }
844
881
  async get(agentId2) {
845
882
  return extractData(
846
883
  await this.client.GET("/v1/{workspace_id}/agents/{agent_id}", {
@@ -868,6 +905,9 @@ var AgentsResource = class extends WorkspaceScopedResource {
868
905
  })
869
906
  );
870
907
  }
908
+ listVersionsAutoPaging(agentId2, params) {
909
+ return this.iteratePaginatedList((pageParams) => this.listVersions(agentId2, pageParams), params);
910
+ }
871
911
  async getVersion(agentId2, version) {
872
912
  return extractData(
873
913
  await this.client.GET("/v1/{workspace_id}/agents/{agent_id}/versions/{version}", {
@@ -906,6 +946,9 @@ var SkillsResource = class extends WorkspaceScopedResource {
906
946
  })
907
947
  );
908
948
  }
949
+ listAutoPaging(params) {
950
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
951
+ }
909
952
  /** Get a single skill */
910
953
  async get(skillId2) {
911
954
  return extractData(
@@ -962,6 +1005,9 @@ var ActionsResource = class extends WorkspaceScopedResource {
962
1005
  })
963
1006
  );
964
1007
  }
1008
+ listAutoPaging(params) {
1009
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1010
+ }
965
1011
  /** Get a single action */
966
1012
  async get(actionId2) {
967
1013
  return extractData(
@@ -985,6 +1031,14 @@ var ActionsResource = class extends WorkspaceScopedResource {
985
1031
  params: { path: { workspace_id: this.workspaceId, skill_id: actionId2 } }
986
1032
  });
987
1033
  }
1034
+ /** Get all context graphs and services that reference this action */
1035
+ async getReferences(actionId2) {
1036
+ return extractData(
1037
+ await this.client.GET("/v1/{workspace_id}/skills/{skill_id}/references", {
1038
+ params: { path: { workspace_id: this.workspaceId, skill_id: actionId2 } }
1039
+ })
1040
+ );
1041
+ }
988
1042
  /**
989
1043
  * Test an action with a sample input.
990
1044
  * Executes the action in a sandbox and returns the result.
@@ -1008,6 +1062,9 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1008
1062
  })
1009
1063
  );
1010
1064
  }
1065
+ listAutoPaging(params) {
1066
+ return this.iterateOffsetPaginatedList((pageParams) => this.list(pageParams), (page) => page.items, params);
1067
+ }
1011
1068
  async create(body) {
1012
1069
  return extractData(
1013
1070
  await this.client.POST("/v1/{workspace_id}/operators", {
@@ -1023,6 +1080,15 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1023
1080
  })
1024
1081
  );
1025
1082
  }
1083
+ /** Update an operator (name, role, status, etc.) */
1084
+ async update(operatorId, body) {
1085
+ return extractData(
1086
+ await this.client.PATCH("/v1/{workspace_id}/operators/{operator_id}", {
1087
+ params: { path: { workspace_id: this.workspaceId, operator_id: operatorId } },
1088
+ body
1089
+ })
1090
+ );
1091
+ }
1026
1092
  async getDashboard() {
1027
1093
  return extractData(
1028
1094
  await this.client.GET("/v1/{workspace_id}/operators/dashboard", {
@@ -1044,6 +1110,13 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1044
1110
  })
1045
1111
  );
1046
1112
  }
1113
+ getEscalationsAutoPaging(params) {
1114
+ return this.iterateOffsetPaginatedList(
1115
+ (pageParams) => this.getEscalations(pageParams),
1116
+ (page) => page.items,
1117
+ params
1118
+ );
1119
+ }
1047
1120
  async getActiveEscalations() {
1048
1121
  return extractData(
1049
1122
  await this.client.GET("/v1/{workspace_id}/operators/escalations/active", {
@@ -1135,6 +1208,13 @@ var OperatorsResource = class extends WorkspaceScopedResource {
1135
1208
  })
1136
1209
  );
1137
1210
  }
1211
+ getAuditLogAutoPaging(params) {
1212
+ return this.iterateOffsetPaginatedList(
1213
+ (pageParams) => this.getAuditLog(pageParams),
1214
+ (page) => page.items,
1215
+ params
1216
+ );
1217
+ }
1138
1218
  };
1139
1219
 
1140
1220
  // src/resources/triggers.ts
@@ -1146,6 +1226,9 @@ var TriggersResource = class extends WorkspaceScopedResource {
1146
1226
  })
1147
1227
  );
1148
1228
  }
1229
+ listAutoPaging(params) {
1230
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1231
+ }
1149
1232
  async create(body) {
1150
1233
  return extractData(
1151
1234
  await this.client.POST("/v1/{workspace_id}/triggers", {
@@ -1202,6 +1285,9 @@ var TriggersResource = class extends WorkspaceScopedResource {
1202
1285
  })
1203
1286
  );
1204
1287
  }
1288
+ listRunsAutoPaging(triggerId, params) {
1289
+ return this.iteratePaginatedList((pageParams) => this.listRuns(triggerId, pageParams), params);
1290
+ }
1205
1291
  };
1206
1292
 
1207
1293
  // src/resources/services.ts
@@ -1221,6 +1307,9 @@ var ServicesResource = class extends WorkspaceScopedResource {
1221
1307
  })
1222
1308
  );
1223
1309
  }
1310
+ listAutoPaging(params) {
1311
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1312
+ }
1224
1313
  async get(serviceId2) {
1225
1314
  return extractData(
1226
1315
  await this.client.GET("/v1/{workspace_id}/services/{service_id}", {
@@ -1260,6 +1349,9 @@ var ContextGraphsResource = class extends WorkspaceScopedResource {
1260
1349
  })
1261
1350
  );
1262
1351
  }
1352
+ listAutoPaging(params) {
1353
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1354
+ }
1263
1355
  async get(contextGraphId2) {
1264
1356
  return extractData(
1265
1357
  await this.client.GET("/v1/{workspace_id}/context-graphs/{context_graph_id}", {
@@ -1308,7 +1400,13 @@ var ContextGraphsResource = class extends WorkspaceScopedResource {
1308
1400
  })
1309
1401
  );
1310
1402
  }
1311
- /** Get a specific version */
1403
+ listVersionsAutoPaging(contextGraphId2, params) {
1404
+ return this.iteratePaginatedList(
1405
+ (pageParams) => this.listVersions(contextGraphId2, pageParams),
1406
+ params
1407
+ );
1408
+ }
1409
+ /** Get a specific version by number, or pass "latest" for the most recent */
1312
1410
  async getVersion(contextGraphId2, version) {
1313
1411
  return extractData(
1314
1412
  await this.client.GET(
@@ -1344,6 +1442,9 @@ var DataSourcesResource = class extends WorkspaceScopedResource {
1344
1442
  })
1345
1443
  );
1346
1444
  }
1445
+ listAutoPaging(params) {
1446
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1447
+ }
1347
1448
  async get(dataSourceId2) {
1348
1449
  return extractData(
1349
1450
  await this.client.GET("/v1/{workspace_id}/data-sources/{data_source_id}", {
@@ -1393,6 +1494,13 @@ var WorldResource = class extends WorkspaceScopedResource {
1393
1494
  })
1394
1495
  );
1395
1496
  }
1497
+ listEntitiesAutoPaging(params) {
1498
+ return this.iterateOffsetPaginatedList(
1499
+ (pageParams) => this.listEntities(pageParams),
1500
+ (page) => page.entities,
1501
+ params
1502
+ );
1503
+ }
1396
1504
  /** Get a single entity */
1397
1505
  async getEntity(entityId2) {
1398
1506
  return extractData(
@@ -1441,6 +1549,37 @@ var WorldResource = class extends WorkspaceScopedResource {
1441
1549
  })
1442
1550
  );
1443
1551
  }
1552
+ // ---- Connectors ----
1553
+ /** Get connected data sources overview with entity counts and sync status */
1554
+ async getConnectors() {
1555
+ return extractData(
1556
+ await this.client.GET("/v1/{workspace_id}/world/connectors", {
1557
+ params: { path: { workspace_id: this.workspaceId } }
1558
+ })
1559
+ );
1560
+ }
1561
+ /** List entities from a specific connector / data source */
1562
+ async getConnectorEntities(dataSourceId2, params) {
1563
+ return extractData(
1564
+ await this.client.GET("/v1/{workspace_id}/world/connectors/{data_source_id}/entities", {
1565
+ params: {
1566
+ path: { workspace_id: this.workspaceId, data_source_id: dataSourceId2 },
1567
+ query: params
1568
+ }
1569
+ })
1570
+ );
1571
+ }
1572
+ /** Search FHIR resources from a specific data source */
1573
+ async getConnectorResources(dataSourceId2, params) {
1574
+ return extractData(
1575
+ await this.client.GET("/v1/{workspace_id}/world/connectors/{data_source_id}/resources", {
1576
+ params: {
1577
+ path: { workspace_id: this.workspaceId, data_source_id: dataSourceId2 },
1578
+ query: params
1579
+ }
1580
+ })
1581
+ );
1582
+ }
1444
1583
  // ---- Entity Types ----
1445
1584
  /** List registered entity types with counts and schemas */
1446
1585
  async listEntityTypes() {
@@ -1480,6 +1619,13 @@ var WorldResource = class extends WorkspaceScopedResource {
1480
1619
  })
1481
1620
  );
1482
1621
  }
1622
+ getTimelineAutoPaging(entityId2, params) {
1623
+ return this.iterateOffsetPaginatedList(
1624
+ (pageParams) => this.getTimeline(entityId2, pageParams),
1625
+ (page) => page.events,
1626
+ params
1627
+ );
1628
+ }
1483
1629
  // ---- Sync ----
1484
1630
  /** Get sync status grouped by sink (Lakebase, Delta, etc.) */
1485
1631
  async getSyncStatusBySink() {
@@ -1497,6 +1643,13 @@ var WorldResource = class extends WorkspaceScopedResource {
1497
1643
  })
1498
1644
  );
1499
1645
  }
1646
+ listSyncEventsAutoPaging(params) {
1647
+ return this.iterateOffsetPaginatedList(
1648
+ (pageParams) => this.listSyncEvents(pageParams),
1649
+ (page) => page.events,
1650
+ params
1651
+ );
1652
+ }
1500
1653
  /** Get current sync queue depth */
1501
1654
  async getSyncQueueDepth() {
1502
1655
  return extractData(
@@ -1550,6 +1703,9 @@ var CallsResource = class extends WorkspaceScopedResource {
1550
1703
  })
1551
1704
  );
1552
1705
  }
1706
+ listAutoPaging(params) {
1707
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1708
+ }
1553
1709
  /** Get full call detail including turns, escalation, safety, and recording info */
1554
1710
  async get(callId2) {
1555
1711
  return extractData(
@@ -1582,6 +1738,14 @@ var CallsResource = class extends WorkspaceScopedResource {
1582
1738
  })
1583
1739
  );
1584
1740
  }
1741
+ /** Get phone number call volume breakdown */
1742
+ async getPhoneVolume(params) {
1743
+ return extractData(
1744
+ await this.client.GET("/v1/{workspace_id}/calls/phone-volume", {
1745
+ params: { path: { workspace_id: this.workspaceId }, query: params }
1746
+ })
1747
+ );
1748
+ }
1585
1749
  /** Get deep call trace analysis */
1586
1750
  async getTraceAnalysis(callId2) {
1587
1751
  return extractData(
@@ -1611,6 +1775,9 @@ var PhoneNumbersResource = class extends WorkspaceScopedResource {
1611
1775
  })
1612
1776
  );
1613
1777
  }
1778
+ listAutoPaging(params) {
1779
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1780
+ }
1614
1781
  /** Get a phone number */
1615
1782
  async get(phoneNumberId2) {
1616
1783
  return extractData(
@@ -1670,6 +1837,9 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
1670
1837
  })
1671
1838
  );
1672
1839
  }
1840
+ listAutoPaging(params) {
1841
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
1842
+ }
1673
1843
  /** Get a single integration */
1674
1844
  async get(integrationId2) {
1675
1845
  return extractData(
@@ -1798,6 +1968,30 @@ var AnalyticsResource = class extends WorkspaceScopedResource {
1798
1968
  })
1799
1969
  );
1800
1970
  }
1971
+ /** Event type breakdown — counts and trends per event type */
1972
+ async getEventBreakdown(params) {
1973
+ return extractData(
1974
+ await this.client.GET("/v1/{workspace_id}/analytics/events", {
1975
+ params: { path: { workspace_id: this.workspaceId }, query: params }
1976
+ })
1977
+ );
1978
+ }
1979
+ /** Safety and escalation trends — risk distribution and time-series data */
1980
+ async getSafetyTrends(params) {
1981
+ return extractData(
1982
+ await this.client.GET("/v1/{workspace_id}/analytics/safety-trends", {
1983
+ params: { path: { workspace_id: this.workspaceId }, query: params }
1984
+ })
1985
+ );
1986
+ }
1987
+ /** Operator escalation performance and quality comparison */
1988
+ async getOperatorPerformance(params) {
1989
+ return extractData(
1990
+ await this.client.GET("/v1/{workspace_id}/analytics/operator-performance", {
1991
+ params: { path: { workspace_id: this.workspaceId }, query: params }
1992
+ })
1993
+ );
1994
+ }
1801
1995
  /** Advanced call statistics (abandonment, transfers, silence, hour-of-day) */
1802
1996
  async getAdvancedCallStats(params) {
1803
1997
  return extractData(
@@ -1957,6 +2151,71 @@ var SettingsResource = class extends WorkspaceScopedResource {
1957
2151
  })
1958
2152
  )
1959
2153
  };
2154
+ behaviors = {
2155
+ get: async () => extractData(
2156
+ await this.client.GET("/v1/{workspace_id}/settings/behaviors", {
2157
+ params: { path: { workspace_id: this.workspaceId } }
2158
+ })
2159
+ ),
2160
+ update: async (body) => extractData(
2161
+ await this.client.PUT("/v1/{workspace_id}/settings/behaviors", {
2162
+ params: { path: { workspace_id: this.workspaceId } },
2163
+ body
2164
+ })
2165
+ )
2166
+ };
2167
+ gapScanner = {
2168
+ get: async () => extractData(
2169
+ await this.client.GET("/v1/{workspace_id}/settings/gap-scanner", {
2170
+ params: { path: { workspace_id: this.workspaceId } }
2171
+ })
2172
+ ),
2173
+ update: async (body) => extractData(
2174
+ await this.client.PUT("/v1/{workspace_id}/settings/gap-scanner", {
2175
+ params: { path: { workspace_id: this.workspaceId } },
2176
+ body
2177
+ })
2178
+ )
2179
+ };
2180
+ scribe = {
2181
+ get: async () => extractData(
2182
+ await this.client.GET("/v1/{workspace_id}/settings/scribe", {
2183
+ params: { path: { workspace_id: this.workspaceId } }
2184
+ })
2185
+ ),
2186
+ update: async (body) => extractData(
2187
+ await this.client.PUT("/v1/{workspace_id}/settings/scribe", {
2188
+ params: { path: { workspace_id: this.workspaceId } },
2189
+ body
2190
+ })
2191
+ )
2192
+ };
2193
+ metrics = {
2194
+ get: async () => extractData(
2195
+ await this.client.GET("/v1/{workspace_id}/settings/metrics", {
2196
+ params: { path: { workspace_id: this.workspaceId } }
2197
+ })
2198
+ ),
2199
+ update: async (body) => extractData(
2200
+ await this.client.PUT("/v1/{workspace_id}/settings/metrics", {
2201
+ params: { path: { workspace_id: this.workspaceId } },
2202
+ body
2203
+ })
2204
+ )
2205
+ };
2206
+ environments = {
2207
+ get: async () => extractData(
2208
+ await this.client.GET("/v1/{workspace_id}/settings/environments", {
2209
+ params: { path: { workspace_id: this.workspaceId } }
2210
+ })
2211
+ ),
2212
+ update: async (body) => extractData(
2213
+ await this.client.PUT("/v1/{workspace_id}/settings/environments", {
2214
+ params: { path: { workspace_id: this.workspaceId } },
2215
+ body
2216
+ })
2217
+ )
2218
+ };
1960
2219
  workflows = {
1961
2220
  get: async () => extractData(
1962
2221
  await this.client.GET("/v1/{workspace_id}/settings/workflows", {
@@ -2006,6 +2265,9 @@ var BillingResource = class extends WorkspaceScopedResource {
2006
2265
  })
2007
2266
  );
2008
2267
  }
2268
+ listInvoicesAutoPaging(params) {
2269
+ return this.iteratePaginatedList((pageParams) => this.listInvoices(pageParams), params);
2270
+ }
2009
2271
  /** Get invoice detail */
2010
2272
  async getInvoice(invoiceId) {
2011
2273
  return extractData(
@@ -2072,6 +2334,9 @@ var PersonasResource = class extends WorkspaceScopedResource {
2072
2334
  })
2073
2335
  );
2074
2336
  }
2337
+ listAutoPaging(params) {
2338
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
2339
+ }
2075
2340
  async create(body) {
2076
2341
  return extractData(
2077
2342
  await this.client.POST("/v1/{workspace_id}/personas", {
@@ -2111,6 +2376,9 @@ var ReviewQueueResource = class extends WorkspaceScopedResource {
2111
2376
  })
2112
2377
  );
2113
2378
  }
2379
+ listAutoPaging(params) {
2380
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
2381
+ }
2114
2382
  async get(itemId) {
2115
2383
  return extractData(
2116
2384
  await this.client.GET("/v1/{workspace_id}/review-queue/{item_id}", {
@@ -2139,6 +2407,9 @@ var ReviewQueueResource = class extends WorkspaceScopedResource {
2139
2407
  })
2140
2408
  );
2141
2409
  }
2410
+ getMyQueueAutoPaging(params) {
2411
+ return this.iteratePaginatedList((pageParams) => this.getMyQueue(pageParams), params);
2412
+ }
2142
2413
  async approve(itemId, body) {
2143
2414
  return extractData(
2144
2415
  await this.client.POST("/v1/{workspace_id}/review-queue/{item_id}/approve", {
@@ -2200,6 +2471,9 @@ var ReviewQueueResource = class extends WorkspaceScopedResource {
2200
2471
  })
2201
2472
  );
2202
2473
  }
2474
+ getHistoryAutoPaging(params) {
2475
+ return this.iteratePaginatedList((pageParams) => this.getHistory(pageParams), params);
2476
+ }
2203
2477
  async getTrends(params) {
2204
2478
  return extractData(
2205
2479
  await this.client.GET("/v1/{workspace_id}/review-queue/trends", {
@@ -2264,6 +2538,13 @@ var AuditResource = class extends WorkspaceScopedResource {
2264
2538
  })
2265
2539
  );
2266
2540
  }
2541
+ listAutoPaging(params) {
2542
+ return this.iterateOffsetPaginatedList(
2543
+ (pageParams) => this.list(pageParams),
2544
+ (page) => page.events,
2545
+ params
2546
+ );
2547
+ }
2267
2548
  async getSummary(params) {
2268
2549
  return extractData(
2269
2550
  await this.client.GET("/v1/{workspace_id}/audit/summary", {
@@ -2278,6 +2559,13 @@ var AuditResource = class extends WorkspaceScopedResource {
2278
2559
  })
2279
2560
  );
2280
2561
  }
2562
+ getPhiAccessAutoPaging(params) {
2563
+ return this.iterateOffsetPaginatedList(
2564
+ (pageParams) => this.getPhiAccess(pageParams),
2565
+ (page) => page.events,
2566
+ params
2567
+ );
2568
+ }
2281
2569
  async createExport(body) {
2282
2570
  return extractData(
2283
2571
  await this.client.POST("/v1/{workspace_id}/audit/export", {
@@ -2300,6 +2588,13 @@ var AuditResource = class extends WorkspaceScopedResource {
2300
2588
  })
2301
2589
  );
2302
2590
  }
2591
+ getEntityAccessLogAutoPaging(entityId2, params) {
2592
+ return this.iterateOffsetPaginatedList(
2593
+ (pageParams) => this.getEntityAccessLog(entityId2, pageParams),
2594
+ (page) => page.events,
2595
+ params
2596
+ );
2597
+ }
2303
2598
  };
2304
2599
 
2305
2600
  // src/resources/webhook-destinations.ts
@@ -2311,6 +2606,9 @@ var WebhookDestinationsResource = class extends WorkspaceScopedResource {
2311
2606
  })
2312
2607
  );
2313
2608
  }
2609
+ listAutoPaging(params) {
2610
+ return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
2611
+ }
2314
2612
  async create(body) {
2315
2613
  return extractData(
2316
2614
  await this.client.POST("/v1/{workspace_id}/webhook-destinations", {
@@ -2352,6 +2650,12 @@ var WebhookDestinationsResource = class extends WorkspaceScopedResource {
2352
2650
  )
2353
2651
  );
2354
2652
  }
2653
+ listDeliveriesAutoPaging(destinationId, params) {
2654
+ return this.iteratePaginatedList(
2655
+ (pageParams) => this.listDeliveries(destinationId, pageParams),
2656
+ params
2657
+ );
2658
+ }
2355
2659
  async rotateSecret(destinationId) {
2356
2660
  return extractData(
2357
2661
  await this.client.POST(