@amigo-ai/platform-sdk 0.27.0 → 0.29.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/api.md CHANGED
@@ -66,7 +66,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
66
66
 
67
67
  ### `workspaces`
68
68
 
69
- - `createSelfService`
70
69
  - `list`
71
70
  - `listAutoPaging`
72
71
  - `get`
@@ -78,6 +77,10 @@ All workspace-scoped resources also expose `withOptions(options)`.
78
77
  - `testCallerNumbers.get`
79
78
  - `testCallerNumbers.update`
80
79
 
80
+ ### `me`
81
+
82
+ - `createWorkspace`
83
+
81
84
  ### `apiKeys`
82
85
 
83
86
  - `me`
package/dist/index.cjs CHANGED
@@ -993,16 +993,27 @@ function resolveScopedPlatformClient(client) {
993
993
  };
994
994
  }
995
995
 
996
- // src/resources/workspaces.ts
997
- var WorkspacesResource = class extends WorkspaceScopedResource {
998
- /** Create a workspace for the authenticated user and attach owner access */
999
- async createSelfService(body) {
996
+ // src/resources/me.ts
997
+ var MeResource = class extends WorkspaceScopedResource {
998
+ /**
999
+ * Create a workspace owned by the authenticated identity.
1000
+ *
1001
+ * The caller is bootstrapped as the workspace's owner. Use this
1002
+ * method anywhere that previously called
1003
+ * ``client.workspaces.createSelfService(body)`` — the request body
1004
+ * shape and response are unchanged; only the URL moved.
1005
+ */
1006
+ async createWorkspace(body) {
1000
1007
  return extractData(
1001
- await this.client.POST("/v1/workspaces/self-service", {
1008
+ await this.client.POST("/v1/me/workspaces", {
1002
1009
  body
1003
1010
  })
1004
1011
  );
1005
1012
  }
1013
+ };
1014
+
1015
+ // src/resources/workspaces.ts
1016
+ var WorkspacesResource = class extends WorkspaceScopedResource {
1006
1017
  /** List workspaces accessible to the current API key */
1007
1018
  async list(params) {
1008
1019
  return extractData(
@@ -6042,6 +6053,7 @@ var AmigoClient = class _AmigoClient {
6042
6053
  baseUrl;
6043
6054
  agentBaseUrl;
6044
6055
  workspaces;
6056
+ me;
6045
6057
  apiKeys;
6046
6058
  agents;
6047
6059
  /** @deprecated Use `actions` instead */
@@ -6183,6 +6195,7 @@ var AmigoClient = class _AmigoClient {
6183
6195
  mutable.agentBaseUrl = agentBaseUrl;
6184
6196
  target.api = client;
6185
6197
  mutable.workspaces = new WorkspacesResource(client, workspaceId2);
6198
+ mutable.me = new MeResource(client, "_account");
6186
6199
  mutable.apiKeys = new ApiKeysResource(client, workspaceId2);
6187
6200
  mutable.agents = new AgentsResource(client, workspaceId2);
6188
6201
  mutable.skills = new SkillsResource(client, workspaceId2);