@amigo-ai/platform-sdk 0.102.1 → 0.104.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.
Files changed (62) hide show
  1. package/api.md +3 -12
  2. package/dist/index.cjs +39 -74
  3. package/dist/index.cjs.map +3 -3
  4. package/dist/index.js +0 -5
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +39 -74
  7. package/dist/index.mjs.map +3 -3
  8. package/dist/resources/audit.js +34 -3
  9. package/dist/resources/audit.js.map +1 -1
  10. package/dist/resources/voice.js +5 -6
  11. package/dist/resources/voice.js.map +1 -1
  12. package/dist/types/generated/api.d.ts +2842 -1362
  13. package/dist/types/generated/api.d.ts.map +1 -1
  14. package/dist/types/index.d.cts +0 -5
  15. package/dist/types/index.d.cts.map +1 -1
  16. package/dist/types/index.d.ts +0 -5
  17. package/dist/types/index.d.ts.map +1 -1
  18. package/dist/types/resources/actions.d.ts +1 -2
  19. package/dist/types/resources/actions.d.ts.map +1 -1
  20. package/dist/types/resources/agents.d.ts +6 -8
  21. package/dist/types/resources/agents.d.ts.map +1 -1
  22. package/dist/types/resources/analytics.d.ts +25 -1
  23. package/dist/types/resources/analytics.d.ts.map +1 -1
  24. package/dist/types/resources/api-keys.d.ts +1 -2
  25. package/dist/types/resources/api-keys.d.ts.map +1 -1
  26. package/dist/types/resources/audit.d.ts +93 -18
  27. package/dist/types/resources/audit.d.ts.map +1 -1
  28. package/dist/types/resources/billing.d.ts +1 -2
  29. package/dist/types/resources/billing.d.ts.map +1 -1
  30. package/dist/types/resources/context-graphs.d.ts +2 -4
  31. package/dist/types/resources/context-graphs.d.ts.map +1 -1
  32. package/dist/types/resources/data-sources.d.ts +1 -2
  33. package/dist/types/resources/data-sources.d.ts.map +1 -1
  34. package/dist/types/resources/external-integrations.d.ts +1 -1
  35. package/dist/types/resources/external-integrations.d.ts.map +1 -1
  36. package/dist/types/resources/intake.d.ts.map +1 -1
  37. package/dist/types/resources/integrations.d.ts +1 -0
  38. package/dist/types/resources/integrations.d.ts.map +1 -1
  39. package/dist/types/resources/metrics.d.ts.map +1 -1
  40. package/dist/types/resources/operators.d.ts +4 -8
  41. package/dist/types/resources/operators.d.ts.map +1 -1
  42. package/dist/types/resources/pipeline.d.ts +2 -4
  43. package/dist/types/resources/pipeline.d.ts.map +1 -1
  44. package/dist/types/resources/services.d.ts +166 -12
  45. package/dist/types/resources/services.d.ts.map +1 -1
  46. package/dist/types/resources/settings.d.ts.map +1 -1
  47. package/dist/types/resources/skills.d.ts +1 -2
  48. package/dist/types/resources/skills.d.ts.map +1 -1
  49. package/dist/types/resources/surfaces.d.ts +2 -4
  50. package/dist/types/resources/surfaces.d.ts.map +1 -1
  51. package/dist/types/resources/triggers.d.ts +2 -4
  52. package/dist/types/resources/triggers.d.ts.map +1 -1
  53. package/dist/types/resources/voice.d.ts +1 -1
  54. package/dist/types/resources/voice.d.ts.map +1 -1
  55. package/dist/types/resources/workspaces.d.ts +1 -2
  56. package/dist/types/resources/workspaces.d.ts.map +1 -1
  57. package/dist/types/resources/world.d.ts.map +1 -1
  58. package/package.json +1 -1
  59. package/dist/resources/use-cases.js +0 -58
  60. package/dist/resources/use-cases.js.map +0 -1
  61. package/dist/types/resources/use-cases.d.ts +0 -33
  62. package/dist/types/resources/use-cases.d.ts.map +0 -1
package/api.md CHANGED
@@ -411,7 +411,9 @@ All workspace-scoped resources also expose `withOptions(options)`.
411
411
  - `getPhiAccess`
412
412
  - `getPhiAccessAutoPaging`
413
413
  - `createExport`
414
- - `listExports`
414
+ - `getExport`
415
+ - `listMyAuditEvents`
416
+ - `listPlatformAuditEvents`
415
417
  - `getEntityAccessLog`
416
418
  - `getEntityAccessLogAutoPaging`
417
419
 
@@ -577,15 +579,4 @@ All workspace-scoped resources also expose `withOptions(options)`.
577
579
  - `delete`
578
580
  - `invoke`
579
581
 
580
- ### `useCases`
581
-
582
- - `list`
583
- - `listOwned`
584
- - `getOwnership`
585
- - `assignOwnership`
586
- - `releaseOwnership`
587
- - `getServiceBinding`
588
- - `bindToService`
589
- - `unbindFromService`
590
-
591
582
  ### `api`
package/dist/index.cjs CHANGED
@@ -62,7 +62,6 @@ __export(index_exports, {
62
62
  TTS_PROVIDERS: () => TTS_PROVIDERS,
63
63
  TokenManager: () => TokenManager,
64
64
  TokensResource: () => TokensResource,
65
- UseCasesResource: () => UseCasesResource,
66
65
  VOICE_SESSION_PROVIDERS: () => VOICE_SESSION_PROVIDERS,
67
66
  ValidationError: () => ValidationError,
68
67
  WebhookVerificationError: () => WebhookVerificationError,
@@ -3787,10 +3786,45 @@ var AuditResource = class extends WorkspaceScopedResource {
3787
3786
  })
3788
3787
  );
3789
3788
  }
3790
- async listExports() {
3789
+ /**
3790
+ * Poll an async audit export by its statement ID.
3791
+ *
3792
+ * `createExport` returns a `statement_id`; exports run asynchronously against
3793
+ * Databricks and resolve to presigned result chunks. Poll this until
3794
+ * `status` is terminal.
3795
+ */
3796
+ async getExport(statementId) {
3791
3797
  return extractData(
3792
- await this.client.GET("/v1/{workspace_id}/audit/exports", {
3793
- params: { path: { workspace_id: this.workspaceId } }
3798
+ await this.client.GET("/v1/{workspace_id}/audit/export/{statement_id}", {
3799
+ params: { path: { workspace_id: this.workspaceId, statement_id: statementId } }
3800
+ })
3801
+ );
3802
+ }
3803
+ /**
3804
+ * List the authenticated identity's own audit events.
3805
+ *
3806
+ * Account-scoped (`GET /v1/audit-log/me`): the caller's own actions across
3807
+ * every workspace they belong to. Not workspace-scoped — the bound
3808
+ * `workspaceId` is not sent.
3809
+ */
3810
+ async listMyAuditEvents(params) {
3811
+ return extractData(
3812
+ await this.client.GET("/v1/audit-log/me", {
3813
+ params: { query: params }
3814
+ })
3815
+ );
3816
+ }
3817
+ /**
3818
+ * List audit events across all workspaces (platform-admin scope).
3819
+ *
3820
+ * Cross-workspace (`GET /v1/audit-log/platform`): omit `workspace_id` for the
3821
+ * full platform feed, or pass it to filter to one workspace. Not
3822
+ * workspace-scoped — the bound `workspaceId` is not sent.
3823
+ */
3824
+ async listPlatformAuditEvents(params) {
3825
+ return extractData(
3826
+ await this.client.GET("/v1/audit-log/platform", {
3827
+ params: { query: params }
3794
3828
  })
3795
3829
  );
3796
3830
  }
@@ -5588,71 +5622,6 @@ var WorkspaceDataQueriesResource = class extends WorkspaceScopedResource {
5588
5622
  }
5589
5623
  };
5590
5624
 
5591
- // src/resources/use-cases.ts
5592
- var UseCasesResource = class extends WorkspaceScopedResource {
5593
- /** List use cases in the workspace, optionally filtered by entity/channel/setup. */
5594
- async list(params) {
5595
- return extractData(
5596
- await this.client.GET("/v1/{workspace_id}/use-cases", {
5597
- params: { path: { workspace_id: this.workspaceId }, query: params }
5598
- })
5599
- );
5600
- }
5601
- /** List channel-manager use case IDs owned by the current workspace. */
5602
- async listOwned() {
5603
- return extractData(
5604
- await this.client.GET("/v1/{workspace_id}/use-cases/ownership", {
5605
- params: { path: { workspace_id: this.workspaceId } }
5606
- })
5607
- );
5608
- }
5609
- /** Return this workspace's ownership record for a use case. Throws NotFoundError if unowned. */
5610
- async getOwnership(useCaseId) {
5611
- return extractData(
5612
- await this.client.GET("/v1/{workspace_id}/use-cases/{use_case_id}/ownership", {
5613
- params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
5614
- })
5615
- );
5616
- }
5617
- /** Claim ownership of a channel-manager use case for this workspace. */
5618
- async assignOwnership(useCaseId) {
5619
- return extractData(
5620
- await this.client.PUT("/v1/{workspace_id}/use-cases/{use_case_id}/ownership", {
5621
- params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
5622
- })
5623
- );
5624
- }
5625
- /** Release this workspace's ownership of a use case after unbinding services. */
5626
- async releaseOwnership(useCaseId) {
5627
- await this.client.DELETE("/v1/{workspace_id}/use-cases/{use_case_id}/ownership", {
5628
- params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
5629
- });
5630
- }
5631
- /** Return the service currently bound to a use case. Throws NotFoundError if unbound. */
5632
- async getServiceBinding(useCaseId) {
5633
- return extractData(
5634
- await this.client.GET("/v1/{workspace_id}/use-cases/{use_case_id}/service-binding", {
5635
- params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
5636
- })
5637
- );
5638
- }
5639
- /** Bind or rebind a use case to the platform service that should handle its traffic. */
5640
- async bindToService(useCaseId, body) {
5641
- return extractData(
5642
- await this.client.PUT("/v1/{workspace_id}/use-cases/{use_case_id}/service-binding", {
5643
- params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } },
5644
- body
5645
- })
5646
- );
5647
- }
5648
- /** Release a use case from its currently bound platform service. */
5649
- async unbindFromService(useCaseId) {
5650
- await this.client.DELETE("/v1/{workspace_id}/use-cases/{use_case_id}/service-binding", {
5651
- params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
5652
- });
5653
- }
5654
- };
5655
-
5656
5625
  // src/core/branded-types.ts
5657
5626
  var workspaceId = (id) => id;
5658
5627
  var apiKeyId = (id) => id;
@@ -5823,8 +5792,7 @@ function toCryptoBuffer(bytes) {
5823
5792
  // src/resources/voice.ts
5824
5793
  var voiceSessionProviders = [
5825
5794
  "amigo",
5826
- "gpt_realtime",
5827
- "gpt_live"
5795
+ "gpt_realtime"
5828
5796
  ];
5829
5797
  var VOICE_SESSION_PROVIDERS = voiceSessionProviders;
5830
5798
  var sttProviders = ["deepgram", "openai", "cartesia"];
@@ -6381,8 +6349,6 @@ var AmigoClient = class _AmigoClient {
6381
6349
  workspaceDatabase;
6382
6350
  /** Workspace data queries — Lakebase-backed query tool registry */
6383
6351
  workspaceDataQueries;
6384
- /** Channel use cases and service bindings */
6385
- useCases;
6386
6352
  /** @internal — exposed for path-level type inference in GET/POST/PUT/etc. */
6387
6353
  api;
6388
6354
  constructor(config) {
@@ -6501,7 +6467,6 @@ var AmigoClient = class _AmigoClient {
6501
6467
  mutable.sessions = new SessionsResource(client, workspaceId2);
6502
6468
  mutable.workspaceDatabase = new WorkspaceDatabaseResource(client, workspaceId2);
6503
6469
  mutable.workspaceDataQueries = new WorkspaceDataQueriesResource(client, workspaceId2);
6504
- mutable.useCases = new UseCasesResource(client, workspaceId2);
6505
6470
  }
6506
6471
  async resolveApiRequest(path, method, init) {
6507
6472
  const { baseClient, options } = resolveScopedPlatformClient(this.api);