@amigo-ai/platform-sdk 0.56.0 → 0.58.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 (67) hide show
  1. package/README.md +72 -6
  2. package/api.md +19 -24
  3. package/dist/core/branded-types.js +1 -0
  4. package/dist/core/branded-types.js.map +1 -1
  5. package/dist/index.cjs +180 -204
  6. package/dist/index.cjs.map +4 -4
  7. package/dist/index.js +9 -4
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +180 -204
  10. package/dist/index.mjs.map +4 -4
  11. package/dist/resources/fhir.js +1 -7
  12. package/dist/resources/fhir.js.map +1 -1
  13. package/dist/resources/integrations.js +66 -34
  14. package/dist/resources/integrations.js.map +1 -1
  15. package/dist/resources/settings.js +1 -19
  16. package/dist/resources/settings.js.map +1 -1
  17. package/dist/resources/tokens.js +31 -0
  18. package/dist/resources/tokens.js.map +1 -0
  19. package/dist/resources/workspace-data-queries.js +41 -0
  20. package/dist/resources/workspace-data-queries.js.map +1 -0
  21. package/dist/resources/world.js +0 -27
  22. package/dist/resources/world.js.map +1 -1
  23. package/dist/types/core/branded-types.d.ts +2 -0
  24. package/dist/types/core/branded-types.d.ts.map +1 -1
  25. package/dist/types/generated/api.d.ts +2825 -3993
  26. package/dist/types/generated/api.d.ts.map +1 -1
  27. package/dist/types/index.d.cts +10 -4
  28. package/dist/types/index.d.cts.map +1 -1
  29. package/dist/types/index.d.ts +10 -4
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/resources/actions.d.ts +5 -25
  32. package/dist/types/resources/actions.d.ts.map +1 -1
  33. package/dist/types/resources/base.d.ts +1 -1
  34. package/dist/types/resources/base.d.ts.map +1 -1
  35. package/dist/types/resources/calls.d.ts +17 -5
  36. package/dist/types/resources/calls.d.ts.map +1 -1
  37. package/dist/types/resources/context-graphs.d.ts +16 -0
  38. package/dist/types/resources/context-graphs.d.ts.map +1 -1
  39. package/dist/types/resources/fhir.d.ts +1 -22
  40. package/dist/types/resources/fhir.d.ts.map +1 -1
  41. package/dist/types/resources/intake.d.ts.map +1 -1
  42. package/dist/types/resources/integrations.d.ts +457 -599
  43. package/dist/types/resources/integrations.d.ts.map +1 -1
  44. package/dist/types/resources/metrics.d.ts +7 -3
  45. package/dist/types/resources/metrics.d.ts.map +1 -1
  46. package/dist/types/resources/operators.d.ts +2 -2
  47. package/dist/types/resources/operators.d.ts.map +1 -1
  48. package/dist/types/resources/review-queue.d.ts +11 -11
  49. package/dist/types/resources/services.d.ts +135 -0
  50. package/dist/types/resources/services.d.ts.map +1 -1
  51. package/dist/types/resources/settings.d.ts +7 -145
  52. package/dist/types/resources/settings.d.ts.map +1 -1
  53. package/dist/types/resources/skills.d.ts +5 -25
  54. package/dist/types/resources/skills.d.ts.map +1 -1
  55. package/dist/types/resources/surfaces.d.ts.map +1 -1
  56. package/dist/types/resources/tasks.d.ts +2 -2
  57. package/dist/types/resources/tokens.d.ts +20 -0
  58. package/dist/types/resources/tokens.d.ts.map +1 -0
  59. package/dist/types/resources/workspace-data-queries.d.ts +22 -0
  60. package/dist/types/resources/workspace-data-queries.d.ts.map +1 -0
  61. package/dist/types/resources/world.d.ts +25 -82
  62. package/dist/types/resources/world.d.ts.map +1 -1
  63. package/package.json +1 -1
  64. package/dist/resources/webhook-destinations.js +0 -50
  65. package/dist/resources/webhook-destinations.js.map +0 -1
  66. package/dist/types/resources/webhook-destinations.d.ts +0 -125
  67. package/dist/types/resources/webhook-destinations.d.ts.map +0 -1
package/dist/index.cjs CHANGED
@@ -56,6 +56,7 @@ __export(index_exports, {
56
56
  ServiceUnavailableError: () => ServiceUnavailableError,
57
57
  SesSetupResource: () => SesSetupResource,
58
58
  TokenManager: () => TokenManager,
59
+ TokensResource: () => TokensResource,
59
60
  ValidationError: () => ValidationError,
60
61
  WebhookVerificationError: () => WebhookVerificationError,
61
62
  WorkspaceEventStreamError: () => WorkspaceEventStreamError,
@@ -74,6 +75,7 @@ __export(index_exports, {
74
75
  formatDeviceCodeLink: () => formatDeviceCodeLink,
75
76
  formatWorkspaceList: () => formatWorkspaceList,
76
77
  functionId: () => functionId,
78
+ integrationEndpointId: () => integrationEndpointId,
77
79
  integrationId: () => integrationId,
78
80
  isAmigoError: () => isAmigoError,
79
81
  isAuthenticationError: () => isAuthenticationError,
@@ -1157,6 +1159,36 @@ var ApiKeysResource = class extends WorkspaceScopedResource {
1157
1159
  }
1158
1160
  };
1159
1161
 
1162
+ // src/resources/tokens.ts
1163
+ var omitAuthorizationHeader = {
1164
+ onRequest({ request }) {
1165
+ request.headers.delete("Authorization");
1166
+ return request;
1167
+ }
1168
+ };
1169
+ var TokensResource = class extends WorkspaceScopedResource {
1170
+ /** Exchange an API key for an identity-issued JWT access token. */
1171
+ async exchangeApiKey(request) {
1172
+ const body = {
1173
+ grant_type: "api_key",
1174
+ api_key: request.apiKey
1175
+ };
1176
+ if (request.scope) {
1177
+ body.scope = request.scope;
1178
+ }
1179
+ return extractData(
1180
+ await this.client.POST(
1181
+ "/token",
1182
+ {
1183
+ body,
1184
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
1185
+ middleware: [omitAuthorizationHeader]
1186
+ }
1187
+ )
1188
+ );
1189
+ }
1190
+ };
1191
+
1160
1192
  // src/resources/agents.ts
1161
1193
  var AgentsResource = class extends WorkspaceScopedResource {
1162
1194
  async create(body) {
@@ -2005,45 +2037,6 @@ var WorldResource = class extends WorkspaceScopedResource {
2005
2037
  })
2006
2038
  );
2007
2039
  }
2008
- /** List sync events with status filtering */
2009
- async listSyncEvents(params) {
2010
- return extractData(
2011
- await this.client.GET("/v1/{workspace_id}/world/sync/events", {
2012
- params: { path: { workspace_id: this.workspaceId }, query: params }
2013
- })
2014
- );
2015
- }
2016
- listSyncEventsAutoPaging(params) {
2017
- return this.iterateOffsetPaginatedList(
2018
- (pageParams) => this.listSyncEvents(pageParams),
2019
- (page) => page.events,
2020
- params
2021
- );
2022
- }
2023
- /** Get current sync queue depth */
2024
- async getSyncQueueDepth() {
2025
- return extractData(
2026
- await this.client.GET("/v1/{workspace_id}/world/sync/queue", {
2027
- params: { path: { workspace_id: this.workspaceId } }
2028
- })
2029
- );
2030
- }
2031
- /** Retry a single failed sync event */
2032
- async retrySyncEvent(eventId2) {
2033
- return extractData(
2034
- await this.client.POST("/v1/{workspace_id}/world/sync/retry/{event_id}", {
2035
- params: { path: { workspace_id: this.workspaceId, event_id: eventId2 } }
2036
- })
2037
- );
2038
- }
2039
- /** Retry all failed sync events */
2040
- async retryAllSyncEvents() {
2041
- return extractData(
2042
- await this.client.POST("/v1/{workspace_id}/world/sync/retry-all", {
2043
- params: { path: { workspace_id: this.workspaceId } }
2044
- })
2045
- );
2046
- }
2047
2040
  // ---- Statistics ----
2048
2041
  /** Get aggregate entity and event statistics */
2049
2042
  async getStats() {
@@ -2650,7 +2643,8 @@ var ChannelsResource = class extends WorkspaceScopedResource {
2650
2643
 
2651
2644
  // src/resources/integrations.ts
2652
2645
  var IntegrationsResource = class extends WorkspaceScopedResource {
2653
- /** Create a new integration */
2646
+ // ─── Integrations ─────────────────────────────────────────────────────────
2647
+ /** Create a new REST integration */
2654
2648
  async create(body) {
2655
2649
  return extractData(
2656
2650
  await this.client.POST("/v1/{workspace_id}/integrations", {
@@ -2659,7 +2653,7 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
2659
2653
  })
2660
2654
  );
2661
2655
  }
2662
- /** List integrations */
2656
+ /** List integrations (REST + desktop) */
2663
2657
  async list(params) {
2664
2658
  return extractData(
2665
2659
  await this.client.GET("/v1/{workspace_id}/integrations", {
@@ -2678,35 +2672,76 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
2678
2672
  })
2679
2673
  );
2680
2674
  }
2681
- /** Update integration configuration */
2675
+ /** Patch a REST integration. Pass `auth: null` to clear auth. */
2682
2676
  async update(integrationId2, body) {
2683
2677
  return extractData(
2684
- await this.client.PUT("/v1/{workspace_id}/integrations/{integration_id}", {
2678
+ await this.client.PATCH("/v1/{workspace_id}/integrations/{integration_id}", {
2685
2679
  params: { path: { workspace_id: this.workspaceId, integration_id: integrationId2 } },
2686
2680
  body
2687
2681
  })
2688
2682
  );
2689
2683
  }
2690
- /** Delete an integration */
2684
+ /** Delete a REST integration */
2691
2685
  async delete(integrationId2) {
2692
2686
  await this.client.DELETE("/v1/{workspace_id}/integrations/{integration_id}", {
2693
2687
  params: { path: { workspace_id: this.workspaceId, integration_id: integrationId2 } }
2694
2688
  });
2695
2689
  }
2696
- /**
2697
- * Test a specific endpoint on an integration with given params.
2698
- * Used in the developer console to validate integration config.
2699
- */
2700
- async testEndpoint(integrationId2, endpointName, body) {
2690
+ // ─── Endpoints ────────────────────────────────────────────────────────────
2691
+ /** List endpoints on a REST integration */
2692
+ async listEndpoints(integrationId2, params) {
2701
2693
  return extractData(
2702
- await this.client.POST(
2703
- "/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_name}/test",
2694
+ await this.client.GET("/v1/{workspace_id}/integrations/{integration_id}/endpoints", {
2695
+ params: {
2696
+ path: { workspace_id: this.workspaceId, integration_id: integrationId2 },
2697
+ query: params
2698
+ }
2699
+ })
2700
+ );
2701
+ }
2702
+ listEndpointsAutoPaging(integrationId2, params) {
2703
+ return this.iteratePaginatedList(
2704
+ (pageParams) => this.listEndpoints(integrationId2, pageParams),
2705
+ params
2706
+ );
2707
+ }
2708
+ /** Get a single endpoint */
2709
+ async getEndpoint(integrationId2, endpointId) {
2710
+ return extractData(
2711
+ await this.client.GET(
2712
+ "/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}",
2704
2713
  {
2705
2714
  params: {
2706
2715
  path: {
2707
2716
  workspace_id: this.workspaceId,
2708
2717
  integration_id: integrationId2,
2709
- endpoint_name: endpointName
2718
+ endpoint_id: endpointId
2719
+ }
2720
+ }
2721
+ }
2722
+ )
2723
+ );
2724
+ }
2725
+ /** Add an endpoint to a REST integration */
2726
+ async createEndpoint(integrationId2, body) {
2727
+ return extractData(
2728
+ await this.client.POST("/v1/{workspace_id}/integrations/{integration_id}/endpoints", {
2729
+ params: { path: { workspace_id: this.workspaceId, integration_id: integrationId2 } },
2730
+ body
2731
+ })
2732
+ );
2733
+ }
2734
+ /** Patch an endpoint. The endpoint `name` is immutable. */
2735
+ async updateEndpoint(integrationId2, endpointId, body) {
2736
+ return extractData(
2737
+ await this.client.PATCH(
2738
+ "/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}",
2739
+ {
2740
+ params: {
2741
+ path: {
2742
+ workspace_id: this.workspaceId,
2743
+ integration_id: integrationId2,
2744
+ endpoint_id: endpointId
2710
2745
  }
2711
2746
  },
2712
2747
  body
@@ -2714,44 +2749,42 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
2714
2749
  )
2715
2750
  );
2716
2751
  }
2752
+ /** Delete an endpoint from a REST integration */
2753
+ async deleteEndpoint(integrationId2, endpointId) {
2754
+ await this.client.DELETE(
2755
+ "/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}",
2756
+ {
2757
+ params: {
2758
+ path: {
2759
+ workspace_id: this.workspaceId,
2760
+ integration_id: integrationId2,
2761
+ endpoint_id: endpointId
2762
+ }
2763
+ }
2764
+ }
2765
+ );
2766
+ }
2717
2767
  /**
2718
- * Probe an integration's connection + auth without invoking any specific
2719
- * endpoint. Exercises auth resolution end-to-end (SSM lookups, OAuth2 token
2720
- * mints, JWT signing) and sends a HEAD request to ``base_url`` (REST/FHIR)
2721
- * or ``mcp_url`` (MCP). Safe on production integrations — HEAD carries no
2722
- * side effects.
2723
- *
2724
- * The most recent probe outcome is persisted on the integration so
2725
- * subsequent ``get`` / ``list`` responses surface ``last_tested_at`` +
2726
- * ``last_test_status`` without re-probing.
2727
- *
2728
- * @returns ``status`` is one of ``healthy`` / ``auth_failed`` /
2729
- * ``unreachable`` / ``timeout`` / ``ssl_error`` / ``misconfigured``,
2730
- * each mapping to a distinct, actionable user message.
2768
+ * Execute an endpoint with test parameters and return the full response
2769
+ * pipeline breakdown. Used by the developer console to validate config.
2731
2770
  */
2732
- async testConnection(integrationId2) {
2771
+ async testEndpoint(integrationId2, endpointId, body) {
2733
2772
  return extractData(
2734
2773
  await this.client.POST(
2735
- "/v1/{workspace_id}/integrations/{integration_id}/test-connection",
2774
+ "/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}/test",
2736
2775
  {
2737
2776
  params: {
2738
2777
  path: {
2739
2778
  workspace_id: this.workspaceId,
2740
- integration_id: integrationId2
2779
+ integration_id: integrationId2,
2780
+ endpoint_id: endpointId
2741
2781
  }
2742
- }
2782
+ },
2783
+ body
2743
2784
  }
2744
2785
  )
2745
2786
  );
2746
2787
  }
2747
- /** Check health of all integrations in the workspace */
2748
- async getHealthCheck() {
2749
- return extractData(
2750
- await this.client.GET("/v1/{workspace_id}/integrations/health-check", {
2751
- params: { path: { workspace_id: this.workspaceId } }
2752
- })
2753
- );
2754
- }
2755
2788
  };
2756
2789
 
2757
2790
  // src/resources/analytics.ts
@@ -3162,19 +3195,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
3162
3195
  })
3163
3196
  )
3164
3197
  };
3165
- behaviors = {
3166
- get: async () => extractData(
3167
- await this.client.GET("/v1/{workspace_id}/settings/behaviors", {
3168
- params: { path: { workspace_id: this.workspaceId } }
3169
- })
3170
- ),
3171
- update: async (body) => extractData(
3172
- await this.client.PUT("/v1/{workspace_id}/settings/behaviors", {
3173
- params: { path: { workspace_id: this.workspaceId } },
3174
- body
3175
- })
3176
- )
3177
- };
3178
3198
  gapScanner = {
3179
3199
  get: async () => extractData(
3180
3200
  await this.client.GET("/v1/{workspace_id}/settings/gap-scanner", {
@@ -3235,19 +3255,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
3235
3255
  })
3236
3256
  )
3237
3257
  };
3238
- workflows = {
3239
- get: async () => extractData(
3240
- await this.client.GET("/v1/{workspace_id}/settings/workflows", {
3241
- params: { path: { workspace_id: this.workspaceId } }
3242
- })
3243
- ),
3244
- update: async (body) => extractData(
3245
- await this.client.PUT("/v1/{workspace_id}/settings/workflows", {
3246
- params: { path: { workspace_id: this.workspaceId } },
3247
- body
3248
- })
3249
- )
3250
- };
3251
3258
  };
3252
3259
 
3253
3260
  // src/resources/billing.ts
@@ -3574,74 +3581,6 @@ var AuditResource = class extends WorkspaceScopedResource {
3574
3581
  }
3575
3582
  };
3576
3583
 
3577
- // src/resources/webhook-destinations.ts
3578
- var WebhookDestinationsResource = class extends WorkspaceScopedResource {
3579
- async list(params) {
3580
- return extractData(
3581
- await this.client.GET("/v1/{workspace_id}/webhook-destinations", {
3582
- params: { path: { workspace_id: this.workspaceId }, query: params }
3583
- })
3584
- );
3585
- }
3586
- listAutoPaging(params) {
3587
- return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
3588
- }
3589
- async create(body) {
3590
- return extractData(
3591
- await this.client.POST("/v1/{workspace_id}/webhook-destinations", {
3592
- params: { path: { workspace_id: this.workspaceId } },
3593
- body
3594
- })
3595
- );
3596
- }
3597
- async get(destinationId) {
3598
- return extractData(
3599
- await this.client.GET("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
3600
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
3601
- })
3602
- );
3603
- }
3604
- async update(destinationId, body) {
3605
- return extractData(
3606
- await this.client.PUT("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
3607
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } },
3608
- body
3609
- })
3610
- );
3611
- }
3612
- async delete(destinationId) {
3613
- await this.client.DELETE("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
3614
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
3615
- });
3616
- }
3617
- async listDeliveries(destinationId, params) {
3618
- return extractData(
3619
- await this.client.GET("/v1/{workspace_id}/webhook-destinations/{destination_id}/deliveries", {
3620
- params: {
3621
- path: { workspace_id: this.workspaceId, destination_id: destinationId },
3622
- query: params
3623
- }
3624
- })
3625
- );
3626
- }
3627
- listDeliveriesAutoPaging(destinationId, params) {
3628
- return this.iteratePaginatedList(
3629
- (pageParams) => this.listDeliveries(destinationId, pageParams),
3630
- params
3631
- );
3632
- }
3633
- async rotateSecret(destinationId) {
3634
- return extractData(
3635
- await this.client.POST(
3636
- "/v1/{workspace_id}/webhook-destinations/{destination_id}/rotate-secret",
3637
- {
3638
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
3639
- }
3640
- )
3641
- );
3642
- }
3643
- };
3644
-
3645
3584
  // src/resources/compliance.ts
3646
3585
  var ComplianceResource = class extends WorkspaceScopedResource {
3647
3586
  async getDashboard() {
@@ -4580,14 +4519,6 @@ var FhirResource = class extends WorkspaceScopedResource {
4580
4519
  })
4581
4520
  );
4582
4521
  }
4583
- /** List recent FHIR sync failures (for triage) */
4584
- async getSyncFailures(params) {
4585
- return extractData(
4586
- await this.client.GET("/v1/{workspace_id}/fhir/sync-failures", {
4587
- params: { path: { workspace_id: this.workspaceId }, query: params }
4588
- })
4589
- );
4590
- }
4591
4522
  /** Trigger a FHIR import (full or partial, depending on request) */
4592
4523
  async import(body) {
4593
4524
  return extractData(
@@ -4640,34 +4571,28 @@ var FhirResource = class extends WorkspaceScopedResource {
4640
4571
  ),
4641
4572
  /** Get a single FHIR resource by type + id */
4642
4573
  get: async (resourceType, resourceId) => extractData(
4643
- await this.client.GET(
4644
- "/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}",
4645
- {
4646
- params: {
4647
- path: {
4648
- workspace_id: this.workspaceId,
4649
- resource_type: resourceType,
4650
- resource_id: resourceId
4651
- }
4574
+ await this.client.GET("/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}", {
4575
+ params: {
4576
+ path: {
4577
+ workspace_id: this.workspaceId,
4578
+ resource_type: resourceType,
4579
+ resource_id: resourceId
4652
4580
  }
4653
4581
  }
4654
- )
4582
+ })
4655
4583
  ),
4656
4584
  /** Update a FHIR resource by type + id */
4657
4585
  update: async (resourceType, resourceId, body) => extractData(
4658
- await this.client.PUT(
4659
- "/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}",
4660
- {
4661
- params: {
4662
- path: {
4663
- workspace_id: this.workspaceId,
4664
- resource_type: resourceType,
4665
- resource_id: resourceId
4666
- }
4667
- },
4668
- body
4669
- }
4670
- )
4586
+ await this.client.PUT("/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}", {
4587
+ params: {
4588
+ path: {
4589
+ workspace_id: this.workspaceId,
4590
+ resource_type: resourceType,
4591
+ resource_id: resourceId
4592
+ }
4593
+ },
4594
+ body
4595
+ })
4671
4596
  ),
4672
4597
  /** Get the version history for a FHIR resource */
4673
4598
  getHistory: async (resourceType, resourceId) => extractData(
@@ -5302,6 +5227,53 @@ var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
5302
5227
  }
5303
5228
  };
5304
5229
 
5230
+ // src/resources/workspace-data-queries.ts
5231
+ var WorkspaceDataQueriesResource = class extends WorkspaceScopedResource {
5232
+ async list() {
5233
+ return extractData(
5234
+ await this.client.GET("/v1/{workspace_id}/data_queries", {
5235
+ params: { path: { workspace_id: this.workspaceId } }
5236
+ })
5237
+ );
5238
+ }
5239
+ async create(body) {
5240
+ return extractData(
5241
+ await this.client.POST("/v1/{workspace_id}/data_queries", {
5242
+ params: { path: { workspace_id: this.workspaceId } },
5243
+ body
5244
+ })
5245
+ );
5246
+ }
5247
+ async get(queryId) {
5248
+ return extractData(
5249
+ await this.client.GET("/v1/{workspace_id}/data_queries/{query_id}", {
5250
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } }
5251
+ })
5252
+ );
5253
+ }
5254
+ async update(queryId, body) {
5255
+ return extractData(
5256
+ await this.client.PATCH("/v1/{workspace_id}/data_queries/{query_id}", {
5257
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } },
5258
+ body
5259
+ })
5260
+ );
5261
+ }
5262
+ async delete(queryId) {
5263
+ await this.client.DELETE("/v1/{workspace_id}/data_queries/{query_id}", {
5264
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } }
5265
+ });
5266
+ }
5267
+ async invoke(queryId, body = {}) {
5268
+ return extractData(
5269
+ await this.client.POST("/v1/{workspace_id}/data_queries/{query_id}/invoke", {
5270
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } },
5271
+ body
5272
+ })
5273
+ );
5274
+ }
5275
+ };
5276
+
5305
5277
  // src/core/branded-types.ts
5306
5278
  var workspaceId = (id) => id;
5307
5279
  var apiKeyId = (id) => id;
@@ -5313,6 +5285,7 @@ var contextGraphId = (id) => id;
5313
5285
  var callId = (id) => id;
5314
5286
  var phoneNumberId = (id) => id;
5315
5287
  var integrationId = (id) => id;
5288
+ var integrationEndpointId = (id) => id;
5316
5289
  var entityId = (id) => id;
5317
5290
  var eventId = (id) => id;
5318
5291
  var simulationRunId = (id) => id;
@@ -5936,6 +5909,7 @@ var AmigoClient = class _AmigoClient {
5936
5909
  workspaces;
5937
5910
  me;
5938
5911
  apiKeys;
5912
+ tokens;
5939
5913
  agents;
5940
5914
  /** @deprecated Use `actions` instead */
5941
5915
  skills;
@@ -5960,7 +5934,6 @@ var AmigoClient = class _AmigoClient {
5960
5934
  reviewQueue;
5961
5935
  recordings;
5962
5936
  audit;
5963
- webhookDestinations;
5964
5937
  compliance;
5965
5938
  events;
5966
5939
  functions;
@@ -6000,6 +5973,8 @@ var AmigoClient = class _AmigoClient {
6000
5973
  sessions;
6001
5974
  /** Workspace database — Lakebase fork lifecycle, SQL query execution, query tool CRUD */
6002
5975
  workspaceDatabase;
5976
+ /** Workspace data queries — Lakebase-backed query tool registry */
5977
+ workspaceDataQueries;
6003
5978
  /** @internal — exposed for path-level type inference in GET/POST/PUT/etc. */
6004
5979
  api;
6005
5980
  constructor(config) {
@@ -6073,6 +6048,7 @@ var AmigoClient = class _AmigoClient {
6073
6048
  mutable.workspaces = new WorkspacesResource(client, workspaceId2);
6074
6049
  mutable.me = new MeResource(client, "_account");
6075
6050
  mutable.apiKeys = new ApiKeysResource(client, workspaceId2);
6051
+ mutable.tokens = new TokensResource(client, "_identity");
6076
6052
  mutable.agents = new AgentsResource(client, workspaceId2);
6077
6053
  mutable.skills = new SkillsResource(client, workspaceId2);
6078
6054
  mutable.actions = new ActionsResource(client, workspaceId2);
@@ -6096,7 +6072,6 @@ var AmigoClient = class _AmigoClient {
6096
6072
  mutable.reviewQueue = new ReviewQueueResource(client, workspaceId2);
6097
6073
  mutable.recordings = new RecordingsResource(client, workspaceId2);
6098
6074
  mutable.audit = new AuditResource(client, workspaceId2);
6099
- mutable.webhookDestinations = new WebhookDestinationsResource(client, workspaceId2);
6100
6075
  mutable.compliance = new ComplianceResource(client, workspaceId2);
6101
6076
  mutable.events = new EventsResource(client, workspaceId2);
6102
6077
  mutable.functions = new FunctionsResource(client, workspaceId2);
@@ -6116,6 +6091,7 @@ var AmigoClient = class _AmigoClient {
6116
6091
  mutable.surfaces = new SurfacesResource(client, workspaceId2);
6117
6092
  mutable.sessions = new SessionsResource(client, workspaceId2);
6118
6093
  mutable.workspaceDatabase = new WorkspaceDatabaseResource(client, workspaceId2);
6094
+ mutable.workspaceDataQueries = new WorkspaceDataQueriesResource(client, workspaceId2);
6119
6095
  }
6120
6096
  async resolveApiRequest(path, method, init) {
6121
6097
  const { baseClient, options } = resolveScopedPlatformClient(this.api);