@amigo-ai/platform-sdk 0.55.0 → 0.57.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 (56) hide show
  1. package/README.md +9 -16
  2. package/api.md +9 -31
  3. package/dist/core/branded-types.js +0 -1
  4. package/dist/core/branded-types.js.map +1 -1
  5. package/dist/index.cjs +67 -212
  6. package/dist/index.cjs.map +4 -4
  7. package/dist/index.js +5 -7
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +67 -212
  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/settings.js +1 -19
  14. package/dist/resources/settings.js.map +1 -1
  15. package/dist/resources/workspace-data-queries.js +41 -0
  16. package/dist/resources/workspace-data-queries.js.map +1 -0
  17. package/dist/resources/world.js +0 -27
  18. package/dist/resources/world.js.map +1 -1
  19. package/dist/types/core/branded-types.d.ts +0 -2
  20. package/dist/types/core/branded-types.d.ts.map +1 -1
  21. package/dist/types/generated/api.d.ts +839 -2593
  22. package/dist/types/generated/api.d.ts.map +1 -1
  23. package/dist/types/index.d.cts +6 -6
  24. package/dist/types/index.d.cts.map +1 -1
  25. package/dist/types/index.d.ts +6 -6
  26. package/dist/types/index.d.ts.map +1 -1
  27. package/dist/types/resources/actions.d.ts +0 -5
  28. package/dist/types/resources/actions.d.ts.map +1 -1
  29. package/dist/types/resources/calls.d.ts +12 -0
  30. package/dist/types/resources/calls.d.ts.map +1 -1
  31. package/dist/types/resources/fhir.d.ts +1 -22
  32. package/dist/types/resources/fhir.d.ts.map +1 -1
  33. package/dist/types/resources/intake.d.ts.map +1 -1
  34. package/dist/types/resources/metrics.d.ts +6 -2
  35. package/dist/types/resources/metrics.d.ts.map +1 -1
  36. package/dist/types/resources/operators.d.ts.map +1 -1
  37. package/dist/types/resources/services.d.ts +135 -10
  38. package/dist/types/resources/services.d.ts.map +1 -1
  39. package/dist/types/resources/settings.d.ts +5 -143
  40. package/dist/types/resources/settings.d.ts.map +1 -1
  41. package/dist/types/resources/skills.d.ts +0 -5
  42. package/dist/types/resources/skills.d.ts.map +1 -1
  43. package/dist/types/resources/surfaces.d.ts.map +1 -1
  44. package/dist/types/resources/workspace-data-queries.d.ts +22 -0
  45. package/dist/types/resources/workspace-data-queries.d.ts.map +1 -0
  46. package/dist/types/resources/world.d.ts +25 -82
  47. package/dist/types/resources/world.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/resources/personas.js +0 -34
  50. package/dist/resources/personas.js.map +0 -1
  51. package/dist/resources/webhook-destinations.js +0 -50
  52. package/dist/resources/webhook-destinations.js.map +0 -1
  53. package/dist/types/resources/personas.d.ts +0 -87
  54. package/dist/types/resources/personas.d.ts.map +0 -1
  55. package/dist/types/resources/webhook-destinations.d.ts +0 -125
  56. package/dist/types/resources/webhook-destinations.d.ts.map +0 -1
package/README.md CHANGED
@@ -686,16 +686,6 @@ await client.reviewQueue.reject('item-id', { reason: 'Data mismatch' })
686
686
  await client.reviewQueue.batchApprove({ item_ids: ['id1', 'id2'] })
687
687
  ```
688
688
 
689
- ### Personas
690
-
691
- ```typescript
692
- const persona = await client.personas.create({
693
- name: 'Friendly Scheduler',
694
- voice_style: 'warm and professional',
695
- })
696
- const { items: personas } = await client.personas.list()
697
- ```
698
-
699
689
  ### Compliance
700
690
 
701
691
  ```typescript
@@ -725,15 +715,18 @@ const fn = await client.functions.get('my-function')
725
715
  const result = await client.functions.test('my-function', { input: { query: 'test' } })
726
716
  ```
727
717
 
728
- ### Webhook Destinations
718
+ ### Workspace Data Queries
729
719
 
730
720
  ```typescript
731
- const dest = await client.webhookDestinations.create({
732
- name: 'My Webhook',
733
- url: 'https://example.com/webhook',
734
- events: ['call.completed'],
721
+ const query = await client.workspaceDataQueries.create({
722
+ name: 'recent_orders',
723
+ description: 'Recent orders by status',
724
+ sql_template: 'select * from custom.orders where status = :status',
725
+ parameters: [{ name: 'status', type: 'string', description: 'Order status' }],
726
+ })
727
+ const result = await client.workspaceDataQueries.invoke(query.id, {
728
+ input: { status: 'open' },
735
729
  })
736
- const deliveries = await client.webhookDestinations.listDeliveries(dest.id)
737
730
  ```
738
731
 
739
732
  ## Webhook Verification
package/api.md CHANGED
@@ -221,11 +221,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
221
221
  - `getTimeline`
222
222
  - `getTimelineAutoPaging`
223
223
  - `getSyncStatusBySink`
224
- - `listSyncEvents`
225
- - `listSyncEventsAutoPaging`
226
- - `getSyncQueueDepth`
227
- - `retrySyncEvent`
228
- - `retryAllSyncEvents`
229
224
  - `getStats`
230
225
  - `getSourceBreakdown`
231
226
 
@@ -339,8 +334,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
339
334
  - `memory.update`
340
335
  - `retention.get`
341
336
  - `retention.update`
342
- - `behaviors.get`
343
- - `behaviors.update`
344
337
  - `gapScanner.get`
345
338
  - `gapScanner.update`
346
339
  - `gapScanner.preview`
@@ -349,8 +342,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
349
342
  - `metrics.update`
350
343
  - `environments.get`
351
344
  - `environments.update`
352
- - `workflows.get`
353
- - `workflows.update`
354
345
 
355
346
  ### `billing`
356
347
 
@@ -368,15 +359,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
368
359
  - `getEntityFacts`
369
360
  - `getAnalytics`
370
361
 
371
- ### `personas`
372
-
373
- - `list`
374
- - `listAutoPaging`
375
- - `create`
376
- - `get`
377
- - `update`
378
- - `delete`
379
-
380
362
  ### `reviewQueue`
381
363
 
382
364
  - `list`
@@ -418,18 +400,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
418
400
  - `getEntityAccessLog`
419
401
  - `getEntityAccessLogAutoPaging`
420
402
 
421
- ### `webhookDestinations`
422
-
423
- - `list`
424
- - `listAutoPaging`
425
- - `create`
426
- - `get`
427
- - `update`
428
- - `delete`
429
- - `listDeliveries`
430
- - `listDeliveriesAutoPaging`
431
- - `rotateSecret`
432
-
433
403
  ### `compliance`
434
404
 
435
405
  - `getDashboard`
@@ -456,7 +426,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
456
426
  ### `fhir`
457
427
 
458
428
  - `getStatus`
459
- - `getSyncFailures`
460
429
  - `import`
461
430
  - `searchPatients`
462
431
  - `getPatientSummary`
@@ -583,4 +552,13 @@ All workspace-scoped resources also expose `withOptions(options)`.
583
552
  - `deleteQueryTool`
584
553
  - `testQueryTool`
585
554
 
555
+ ### `workspaceDataQueries`
556
+
557
+ - `list`
558
+ - `create`
559
+ - `get`
560
+ - `update`
561
+ - `delete`
562
+ - `invoke`
563
+
586
564
  ### `api`
@@ -2,7 +2,6 @@
2
2
  export const workspaceId = (id) => id;
3
3
  export const apiKeyId = (id) => id;
4
4
  export const agentId = (id) => id;
5
- export const personaId = (id) => id;
6
5
  export const skillId = (id) => id;
7
6
  export const actionId = (id) => id;
8
7
  export const serviceId = (id) => id;
@@ -1 +1 @@
1
- {"version":3,"file":"branded-types.js","sourceRoot":"","sources":["../../src/core/branded-types.ts"],"names":[],"mappings":"AAgCA,uBAAuB;AACvB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAU,EAAe,EAAE,CAAC,EAAiB,CAAA;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAY,EAAE,CAAC,EAAc,CAAA;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,EAAa,CAAA;AAC7D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAU,EAAa,EAAE,CAAC,EAAe,CAAA;AACnE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,EAAa,CAAA;AAC7D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAY,EAAE,CAAC,EAAc,CAAA;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAU,EAAa,EAAE,CAAC,EAAe,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mB,EAAE,CAAC,EAAqB,CAAA;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAU,EAAuB,EAAE,CAAC,EAAyB,CAAA;AACjG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAU,EAAmB,EAAE,CAAC,EAAqB,CAAA;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAU,EAAc,EAAE,CAAC,EAAgB,CAAA;AACtE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAgB,EAAE,CAAC,EAAkB,CAAA"}
package/dist/index.cjs CHANGED
@@ -95,7 +95,6 @@ __export(index_exports, {
95
95
  paginate: () => paginate,
96
96
  parseRateLimitHeaders: () => parseRateLimitHeaders,
97
97
  parseWebhookEvent: () => parseWebhookEvent,
98
- personaId: () => personaId,
99
98
  phoneNumberId: () => phoneNumberId,
100
99
  serviceId: () => serviceId,
101
100
  sessionConnectAuthProtocols: () => sessionConnectAuthProtocols,
@@ -2006,45 +2005,6 @@ var WorldResource = class extends WorkspaceScopedResource {
2006
2005
  })
2007
2006
  );
2008
2007
  }
2009
- /** List sync events with status filtering */
2010
- async listSyncEvents(params) {
2011
- return extractData(
2012
- await this.client.GET("/v1/{workspace_id}/world/sync/events", {
2013
- params: { path: { workspace_id: this.workspaceId }, query: params }
2014
- })
2015
- );
2016
- }
2017
- listSyncEventsAutoPaging(params) {
2018
- return this.iterateOffsetPaginatedList(
2019
- (pageParams) => this.listSyncEvents(pageParams),
2020
- (page) => page.events,
2021
- params
2022
- );
2023
- }
2024
- /** Get current sync queue depth */
2025
- async getSyncQueueDepth() {
2026
- return extractData(
2027
- await this.client.GET("/v1/{workspace_id}/world/sync/queue", {
2028
- params: { path: { workspace_id: this.workspaceId } }
2029
- })
2030
- );
2031
- }
2032
- /** Retry a single failed sync event */
2033
- async retrySyncEvent(eventId2) {
2034
- return extractData(
2035
- await this.client.POST("/v1/{workspace_id}/world/sync/retry/{event_id}", {
2036
- params: { path: { workspace_id: this.workspaceId, event_id: eventId2 } }
2037
- })
2038
- );
2039
- }
2040
- /** Retry all failed sync events */
2041
- async retryAllSyncEvents() {
2042
- return extractData(
2043
- await this.client.POST("/v1/{workspace_id}/world/sync/retry-all", {
2044
- params: { path: { workspace_id: this.workspaceId } }
2045
- })
2046
- );
2047
- }
2048
2008
  // ---- Statistics ----
2049
2009
  /** Get aggregate entity and event statistics */
2050
2010
  async getStats() {
@@ -3163,19 +3123,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
3163
3123
  })
3164
3124
  )
3165
3125
  };
3166
- behaviors = {
3167
- get: async () => extractData(
3168
- await this.client.GET("/v1/{workspace_id}/settings/behaviors", {
3169
- params: { path: { workspace_id: this.workspaceId } }
3170
- })
3171
- ),
3172
- update: async (body) => extractData(
3173
- await this.client.PUT("/v1/{workspace_id}/settings/behaviors", {
3174
- params: { path: { workspace_id: this.workspaceId } },
3175
- body
3176
- })
3177
- )
3178
- };
3179
3126
  gapScanner = {
3180
3127
  get: async () => extractData(
3181
3128
  await this.client.GET("/v1/{workspace_id}/settings/gap-scanner", {
@@ -3236,19 +3183,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
3236
3183
  })
3237
3184
  )
3238
3185
  };
3239
- workflows = {
3240
- get: async () => extractData(
3241
- await this.client.GET("/v1/{workspace_id}/settings/workflows", {
3242
- params: { path: { workspace_id: this.workspaceId } }
3243
- })
3244
- ),
3245
- update: async (body) => extractData(
3246
- await this.client.PUT("/v1/{workspace_id}/settings/workflows", {
3247
- params: { path: { workspace_id: this.workspaceId } },
3248
- body
3249
- })
3250
- )
3251
- };
3252
3186
  };
3253
3187
 
3254
3188
  // src/resources/billing.ts
@@ -3345,48 +3279,6 @@ var MemoryResource = class extends WorkspaceScopedResource {
3345
3279
  }
3346
3280
  };
3347
3281
 
3348
- // src/resources/personas.ts
3349
- var PersonasResource = class extends WorkspaceScopedResource {
3350
- async list(params) {
3351
- return extractData(
3352
- await this.client.GET("/v1/{workspace_id}/personas", {
3353
- params: { path: { workspace_id: this.workspaceId }, query: params }
3354
- })
3355
- );
3356
- }
3357
- listAutoPaging(params) {
3358
- return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
3359
- }
3360
- async create(body) {
3361
- return extractData(
3362
- await this.client.POST("/v1/{workspace_id}/personas", {
3363
- params: { path: { workspace_id: this.workspaceId } },
3364
- body
3365
- })
3366
- );
3367
- }
3368
- async get(personaId2) {
3369
- return extractData(
3370
- await this.client.GET("/v1/{workspace_id}/personas/{persona_id}", {
3371
- params: { path: { workspace_id: this.workspaceId, persona_id: personaId2 } }
3372
- })
3373
- );
3374
- }
3375
- async update(personaId2, body) {
3376
- return extractData(
3377
- await this.client.PATCH("/v1/{workspace_id}/personas/{persona_id}", {
3378
- params: { path: { workspace_id: this.workspaceId, persona_id: personaId2 } },
3379
- body
3380
- })
3381
- );
3382
- }
3383
- async delete(personaId2) {
3384
- await this.client.DELETE("/v1/{workspace_id}/personas/{persona_id}", {
3385
- params: { path: { workspace_id: this.workspaceId, persona_id: personaId2 } }
3386
- });
3387
- }
3388
- };
3389
-
3390
3282
  // src/resources/review-queue.ts
3391
3283
  var ReviewQueueResource = class extends WorkspaceScopedResource {
3392
3284
  async list(params) {
@@ -3617,74 +3509,6 @@ var AuditResource = class extends WorkspaceScopedResource {
3617
3509
  }
3618
3510
  };
3619
3511
 
3620
- // src/resources/webhook-destinations.ts
3621
- var WebhookDestinationsResource = class extends WorkspaceScopedResource {
3622
- async list(params) {
3623
- return extractData(
3624
- await this.client.GET("/v1/{workspace_id}/webhook-destinations", {
3625
- params: { path: { workspace_id: this.workspaceId }, query: params }
3626
- })
3627
- );
3628
- }
3629
- listAutoPaging(params) {
3630
- return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
3631
- }
3632
- async create(body) {
3633
- return extractData(
3634
- await this.client.POST("/v1/{workspace_id}/webhook-destinations", {
3635
- params: { path: { workspace_id: this.workspaceId } },
3636
- body
3637
- })
3638
- );
3639
- }
3640
- async get(destinationId) {
3641
- return extractData(
3642
- await this.client.GET("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
3643
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
3644
- })
3645
- );
3646
- }
3647
- async update(destinationId, body) {
3648
- return extractData(
3649
- await this.client.PUT("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
3650
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } },
3651
- body
3652
- })
3653
- );
3654
- }
3655
- async delete(destinationId) {
3656
- await this.client.DELETE("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
3657
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
3658
- });
3659
- }
3660
- async listDeliveries(destinationId, params) {
3661
- return extractData(
3662
- await this.client.GET("/v1/{workspace_id}/webhook-destinations/{destination_id}/deliveries", {
3663
- params: {
3664
- path: { workspace_id: this.workspaceId, destination_id: destinationId },
3665
- query: params
3666
- }
3667
- })
3668
- );
3669
- }
3670
- listDeliveriesAutoPaging(destinationId, params) {
3671
- return this.iteratePaginatedList(
3672
- (pageParams) => this.listDeliveries(destinationId, pageParams),
3673
- params
3674
- );
3675
- }
3676
- async rotateSecret(destinationId) {
3677
- return extractData(
3678
- await this.client.POST(
3679
- "/v1/{workspace_id}/webhook-destinations/{destination_id}/rotate-secret",
3680
- {
3681
- params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
3682
- }
3683
- )
3684
- );
3685
- }
3686
- };
3687
-
3688
3512
  // src/resources/compliance.ts
3689
3513
  var ComplianceResource = class extends WorkspaceScopedResource {
3690
3514
  async getDashboard() {
@@ -4623,14 +4447,6 @@ var FhirResource = class extends WorkspaceScopedResource {
4623
4447
  })
4624
4448
  );
4625
4449
  }
4626
- /** List recent FHIR sync failures (for triage) */
4627
- async getSyncFailures(params) {
4628
- return extractData(
4629
- await this.client.GET("/v1/{workspace_id}/fhir/sync-failures", {
4630
- params: { path: { workspace_id: this.workspaceId }, query: params }
4631
- })
4632
- );
4633
- }
4634
4450
  /** Trigger a FHIR import (full or partial, depending on request) */
4635
4451
  async import(body) {
4636
4452
  return extractData(
@@ -4683,34 +4499,28 @@ var FhirResource = class extends WorkspaceScopedResource {
4683
4499
  ),
4684
4500
  /** Get a single FHIR resource by type + id */
4685
4501
  get: async (resourceType, resourceId) => extractData(
4686
- await this.client.GET(
4687
- "/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}",
4688
- {
4689
- params: {
4690
- path: {
4691
- workspace_id: this.workspaceId,
4692
- resource_type: resourceType,
4693
- resource_id: resourceId
4694
- }
4502
+ await this.client.GET("/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}", {
4503
+ params: {
4504
+ path: {
4505
+ workspace_id: this.workspaceId,
4506
+ resource_type: resourceType,
4507
+ resource_id: resourceId
4695
4508
  }
4696
4509
  }
4697
- )
4510
+ })
4698
4511
  ),
4699
4512
  /** Update a FHIR resource by type + id */
4700
4513
  update: async (resourceType, resourceId, body) => extractData(
4701
- await this.client.PUT(
4702
- "/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}",
4703
- {
4704
- params: {
4705
- path: {
4706
- workspace_id: this.workspaceId,
4707
- resource_type: resourceType,
4708
- resource_id: resourceId
4709
- }
4710
- },
4711
- body
4712
- }
4713
- )
4514
+ await this.client.PUT("/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}", {
4515
+ params: {
4516
+ path: {
4517
+ workspace_id: this.workspaceId,
4518
+ resource_type: resourceType,
4519
+ resource_id: resourceId
4520
+ }
4521
+ },
4522
+ body
4523
+ })
4714
4524
  ),
4715
4525
  /** Get the version history for a FHIR resource */
4716
4526
  getHistory: async (resourceType, resourceId) => extractData(
@@ -5345,11 +5155,57 @@ var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
5345
5155
  }
5346
5156
  };
5347
5157
 
5158
+ // src/resources/workspace-data-queries.ts
5159
+ var WorkspaceDataQueriesResource = class extends WorkspaceScopedResource {
5160
+ async list() {
5161
+ return extractData(
5162
+ await this.client.GET("/v1/{workspace_id}/data_queries", {
5163
+ params: { path: { workspace_id: this.workspaceId } }
5164
+ })
5165
+ );
5166
+ }
5167
+ async create(body) {
5168
+ return extractData(
5169
+ await this.client.POST("/v1/{workspace_id}/data_queries", {
5170
+ params: { path: { workspace_id: this.workspaceId } },
5171
+ body
5172
+ })
5173
+ );
5174
+ }
5175
+ async get(queryId) {
5176
+ return extractData(
5177
+ await this.client.GET("/v1/{workspace_id}/data_queries/{query_id}", {
5178
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } }
5179
+ })
5180
+ );
5181
+ }
5182
+ async update(queryId, body) {
5183
+ return extractData(
5184
+ await this.client.PATCH("/v1/{workspace_id}/data_queries/{query_id}", {
5185
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } },
5186
+ body
5187
+ })
5188
+ );
5189
+ }
5190
+ async delete(queryId) {
5191
+ await this.client.DELETE("/v1/{workspace_id}/data_queries/{query_id}", {
5192
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } }
5193
+ });
5194
+ }
5195
+ async invoke(queryId, body = {}) {
5196
+ return extractData(
5197
+ await this.client.POST("/v1/{workspace_id}/data_queries/{query_id}/invoke", {
5198
+ params: { path: { workspace_id: this.workspaceId, query_id: queryId } },
5199
+ body
5200
+ })
5201
+ );
5202
+ }
5203
+ };
5204
+
5348
5205
  // src/core/branded-types.ts
5349
5206
  var workspaceId = (id) => id;
5350
5207
  var apiKeyId = (id) => id;
5351
5208
  var agentId = (id) => id;
5352
- var personaId = (id) => id;
5353
5209
  var skillId = (id) => id;
5354
5210
  var actionId = (id) => id;
5355
5211
  var serviceId = (id) => id;
@@ -6001,11 +5857,9 @@ var AmigoClient = class _AmigoClient {
6001
5857
  settings;
6002
5858
  billing;
6003
5859
  memory;
6004
- personas;
6005
5860
  reviewQueue;
6006
5861
  recordings;
6007
5862
  audit;
6008
- webhookDestinations;
6009
5863
  compliance;
6010
5864
  events;
6011
5865
  functions;
@@ -6045,6 +5899,8 @@ var AmigoClient = class _AmigoClient {
6045
5899
  sessions;
6046
5900
  /** Workspace database — Lakebase fork lifecycle, SQL query execution, query tool CRUD */
6047
5901
  workspaceDatabase;
5902
+ /** Workspace data queries — Lakebase-backed query tool registry */
5903
+ workspaceDataQueries;
6048
5904
  /** @internal — exposed for path-level type inference in GET/POST/PUT/etc. */
6049
5905
  api;
6050
5906
  constructor(config) {
@@ -6138,11 +5994,9 @@ var AmigoClient = class _AmigoClient {
6138
5994
  mutable.settings = new SettingsResource(client, workspaceId2);
6139
5995
  mutable.billing = new BillingResource(client, workspaceId2);
6140
5996
  mutable.memory = new MemoryResource(client, workspaceId2);
6141
- mutable.personas = new PersonasResource(client, workspaceId2);
6142
5997
  mutable.reviewQueue = new ReviewQueueResource(client, workspaceId2);
6143
5998
  mutable.recordings = new RecordingsResource(client, workspaceId2);
6144
5999
  mutable.audit = new AuditResource(client, workspaceId2);
6145
- mutable.webhookDestinations = new WebhookDestinationsResource(client, workspaceId2);
6146
6000
  mutable.compliance = new ComplianceResource(client, workspaceId2);
6147
6001
  mutable.events = new EventsResource(client, workspaceId2);
6148
6002
  mutable.functions = new FunctionsResource(client, workspaceId2);
@@ -6162,6 +6016,7 @@ var AmigoClient = class _AmigoClient {
6162
6016
  mutable.surfaces = new SurfacesResource(client, workspaceId2);
6163
6017
  mutable.sessions = new SessionsResource(client, workspaceId2);
6164
6018
  mutable.workspaceDatabase = new WorkspaceDatabaseResource(client, workspaceId2);
6019
+ mutable.workspaceDataQueries = new WorkspaceDataQueriesResource(client, workspaceId2);
6165
6020
  }
6166
6021
  async resolveApiRequest(path, method, init) {
6167
6022
  const { baseClient, options } = resolveScopedPlatformClient(this.api);