@amigo-ai/platform-sdk 0.50.0 → 0.52.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.
package/dist/index.mjs CHANGED
@@ -1418,7 +1418,7 @@ var PromptLogsResource = class extends WorkspaceScopedResource {
1418
1418
  *
1419
1419
  * When ``params.conversation_id`` is supplied, the response surfaces
1420
1420
  * ``resolved_call_sid`` (the call_sid the lookup mapped to) and
1421
- * ``resolved_conversation_kind`` (``"call"`` for voice/sim/scribe,
1421
+ * ``resolved_conversation_kind`` (``"call"`` for voice/sim,
1422
1422
  * ``"conversation"`` for text/sms/whatsapp/email) so you can drill
1423
1423
  * into per-call surfaces afterward without re-querying
1424
1424
  * ``world.entities``.
@@ -3110,19 +3110,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
3110
3110
  })
3111
3111
  )
3112
3112
  };
3113
- security = {
3114
- get: async () => extractData(
3115
- await this.client.GET("/v1/{workspace_id}/settings/security", {
3116
- params: { path: { workspace_id: this.workspaceId } }
3117
- })
3118
- ),
3119
- update: async (body) => extractData(
3120
- await this.client.PUT("/v1/{workspace_id}/settings/security", {
3121
- params: { path: { workspace_id: this.workspaceId } },
3122
- body
3123
- })
3124
- )
3125
- };
3126
3113
  retention = {
3127
3114
  get: async () => extractData(
3128
3115
  await this.client.GET("/v1/{workspace_id}/settings/retention", {
@@ -3183,19 +3170,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
3183
3170
  })
3184
3171
  )
3185
3172
  };
3186
- scribe = {
3187
- get: async () => extractData(
3188
- await this.client.GET("/v1/{workspace_id}/settings/scribe", {
3189
- params: { path: { workspace_id: this.workspaceId } }
3190
- })
3191
- ),
3192
- update: async (body) => extractData(
3193
- await this.client.PUT("/v1/{workspace_id}/settings/scribe", {
3194
- params: { path: { workspace_id: this.workspaceId } },
3195
- body
3196
- })
3197
- )
3198
- };
3199
3173
  metrics = {
3200
3174
  get: async () => extractData(
3201
3175
  await this.client.GET("/v1/{workspace_id}/settings/metrics", {
@@ -5572,31 +5546,43 @@ var SessionsResource = class extends WorkspaceScopedResource {
5572
5546
 
5573
5547
  // src/resources/workspace-database.ts
5574
5548
  var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
5549
+ get(path, init) {
5550
+ return this.client.GET(path, init);
5551
+ }
5552
+ post(path, init) {
5553
+ return this.client.POST(path, init);
5554
+ }
5555
+ patch(path, init) {
5556
+ return this.client.PATCH(path, init);
5557
+ }
5558
+ delete(path, init) {
5559
+ return this.client.DELETE(path, init);
5560
+ }
5575
5561
  // -- Fork lifecycle -------------------------------------------------------
5576
5562
  async getFork() {
5577
5563
  return extractData(
5578
- await this.client.GET("/v1/{workspace_id}/fork", {
5564
+ await this.get("/v1/{workspace_id}/fork", {
5579
5565
  params: { path: { workspace_id: this.workspaceId } }
5580
5566
  })
5581
5567
  );
5582
5568
  }
5583
5569
  async createFork(body) {
5584
5570
  return extractData(
5585
- await this.client.POST("/v1/{workspace_id}/fork", {
5571
+ await this.post("/v1/{workspace_id}/fork", {
5586
5572
  params: { path: { workspace_id: this.workspaceId } },
5587
5573
  body
5588
5574
  })
5589
5575
  );
5590
5576
  }
5591
5577
  async deleteFork() {
5592
- await this.client.DELETE("/v1/{workspace_id}/fork", {
5578
+ await this.delete("/v1/{workspace_id}/fork", {
5593
5579
  params: { path: { workspace_id: this.workspaceId } }
5594
5580
  });
5595
5581
  }
5596
5582
  // -- Query execution ------------------------------------------------------
5597
5583
  async executeQuery(body) {
5598
5584
  return extractData(
5599
- await this.client.POST("/v1/{workspace_id}/lakebase/query", {
5585
+ await this.post("/v1/{workspace_id}/lakebase/query", {
5600
5586
  params: { path: { workspace_id: this.workspaceId } },
5601
5587
  body
5602
5588
  })
@@ -5605,7 +5591,7 @@ var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
5605
5591
  // -- Query tool CRUD ------------------------------------------------------
5606
5592
  async listQueryTools(params) {
5607
5593
  return extractData(
5608
- await this.client.GET("/v1/{workspace_id}/query-tools", {
5594
+ await this.get("/v1/{workspace_id}/query-tools", {
5609
5595
  params: { path: { workspace_id: this.workspaceId }, query: params }
5610
5596
  })
5611
5597
  );
@@ -5615,7 +5601,7 @@ var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
5615
5601
  }
5616
5602
  async createQueryTool(body) {
5617
5603
  return extractData(
5618
- await this.client.POST("/v1/{workspace_id}/query-tools", {
5604
+ await this.post("/v1/{workspace_id}/query-tools", {
5619
5605
  params: { path: { workspace_id: this.workspaceId } },
5620
5606
  body
5621
5607
  })
@@ -5623,20 +5609,20 @@ var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
5623
5609
  }
5624
5610
  async updateQueryTool(toolId, body) {
5625
5611
  return extractData(
5626
- await this.client.PATCH("/v1/{workspace_id}/query-tools/{tool_id}", {
5612
+ await this.patch("/v1/{workspace_id}/query-tools/{tool_id}", {
5627
5613
  params: { path: { workspace_id: this.workspaceId, tool_id: toolId } },
5628
5614
  body
5629
5615
  })
5630
5616
  );
5631
5617
  }
5632
5618
  async deleteQueryTool(toolId) {
5633
- await this.client.DELETE("/v1/{workspace_id}/query-tools/{tool_id}", {
5619
+ await this.delete("/v1/{workspace_id}/query-tools/{tool_id}", {
5634
5620
  params: { path: { workspace_id: this.workspaceId, tool_id: toolId } }
5635
5621
  });
5636
5622
  }
5637
5623
  async testQueryTool(toolId, body) {
5638
5624
  return extractData(
5639
- await this.client.POST("/v1/{workspace_id}/query-tools/{tool_id}/test", {
5625
+ await this.post("/v1/{workspace_id}/query-tools/{tool_id}/test", {
5640
5626
  params: { path: { workspace_id: this.workspaceId, tool_id: toolId } },
5641
5627
  body
5642
5628
  })