@cadenya/cadenya 0.78.1 → 0.80.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 (70) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +15 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +15 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +1 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/workspace-admin/index.d.mts +3 -0
  20. package/resources/workspace-admin/index.d.mts.map +1 -0
  21. package/resources/workspace-admin/index.d.ts +3 -0
  22. package/resources/workspace-admin/index.d.ts.map +1 -0
  23. package/resources/workspace-admin/index.js +9 -0
  24. package/resources/workspace-admin/index.js.map +1 -0
  25. package/resources/workspace-admin/index.mjs +4 -0
  26. package/resources/workspace-admin/index.mjs.map +1 -0
  27. package/resources/workspace-admin/members.d.mts +55 -0
  28. package/resources/workspace-admin/members.d.mts.map +1 -0
  29. package/resources/workspace-admin/members.d.ts +55 -0
  30. package/resources/workspace-admin/members.d.ts.map +1 -0
  31. package/resources/workspace-admin/members.js +46 -0
  32. package/resources/workspace-admin/members.js.map +1 -0
  33. package/resources/workspace-admin/members.mjs +42 -0
  34. package/resources/workspace-admin/members.mjs.map +1 -0
  35. package/resources/workspace-admin/workspace-admin.d.mts +111 -0
  36. package/resources/workspace-admin/workspace-admin.d.mts.map +1 -0
  37. package/resources/workspace-admin/workspace-admin.d.ts +111 -0
  38. package/resources/workspace-admin/workspace-admin.d.ts.map +1 -0
  39. package/resources/workspace-admin/workspace-admin.js +60 -0
  40. package/resources/workspace-admin/workspace-admin.js.map +1 -0
  41. package/resources/workspace-admin/workspace-admin.mjs +55 -0
  42. package/resources/workspace-admin/workspace-admin.mjs.map +1 -0
  43. package/resources/workspace-admin.d.mts +2 -0
  44. package/resources/workspace-admin.d.mts.map +1 -0
  45. package/resources/workspace-admin.d.ts +2 -0
  46. package/resources/workspace-admin.d.ts.map +1 -0
  47. package/resources/workspace-admin.js +6 -0
  48. package/resources/workspace-admin.js.map +1 -0
  49. package/resources/workspace-admin.mjs +3 -0
  50. package/resources/workspace-admin.mjs.map +1 -0
  51. package/resources/workspaces.d.mts +9 -0
  52. package/resources/workspaces.d.mts.map +1 -1
  53. package/resources/workspaces.d.ts +9 -0
  54. package/resources/workspaces.d.ts.map +1 -1
  55. package/resources/workspaces.js +4 -0
  56. package/resources/workspaces.js.map +1 -1
  57. package/resources/workspaces.mjs +4 -0
  58. package/resources/workspaces.mjs.map +1 -1
  59. package/src/client.ts +27 -0
  60. package/src/resources/index.ts +7 -0
  61. package/src/resources/workspace-admin/index.ts +10 -0
  62. package/src/resources/workspace-admin/members.ts +92 -0
  63. package/src/resources/workspace-admin/workspace-admin.ts +160 -0
  64. package/src/resources/workspace-admin.ts +3 -0
  65. package/src/resources/workspaces.ts +10 -0
  66. package/src/version.ts +1 -1
  67. package/version.d.mts +1 -1
  68. package/version.d.ts +1 -1
  69. package/version.js +1 -1
  70. package/version.mjs +1 -1
@@ -0,0 +1,2 @@
1
+ export * from "./workspace-admin/index.mjs";
2
+ //# sourceMappingURL=workspace-admin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-admin.d.mts","sourceRoot":"","sources":["../src/resources/workspace-admin.ts"],"names":[],"mappings":"AAEA,4CAAwC"}
@@ -0,0 +1,2 @@
1
+ export * from "./workspace-admin/index.js";
2
+ //# sourceMappingURL=workspace-admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-admin.d.ts","sourceRoot":"","sources":["../src/resources/workspace-admin.ts"],"names":[],"mappings":"AAEA,2CAAwC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./workspace-admin/index.js"), exports);
6
+ //# sourceMappingURL=workspace-admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-admin.js","sourceRoot":"","sources":["../src/resources/workspace-admin.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qEAAwC"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./workspace-admin/index.mjs";
3
+ //# sourceMappingURL=workspace-admin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-admin.mjs","sourceRoot":"","sources":["../src/resources/workspace-admin.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,4CAAwC"}
@@ -6,6 +6,10 @@ import { RequestOptions } from "../internal/request-options.mjs";
6
6
  /**
7
7
  * Manage workspaces within an account. Workspaces provide organizational
8
8
  * grouping and isolation for resources such as agents, tools, and API keys.
9
+ *
10
+ * This is the workspace-scoped, end-user surface. Administrative operations
11
+ * (create / archive workspaces, manage members) live in WorkspaceAdminService
12
+ * under /v1/account/workspaces and require the admin role.
9
13
  */
10
14
  export declare class Workspaces extends APIResource {
11
15
  /**
@@ -26,6 +30,11 @@ export interface Workspace {
26
30
  */
27
31
  metadata: Shared.AccountResourceMetadata;
28
32
  spec: WorkspaceSpec;
33
+ /**
34
+ * Lifecycle status of the workspace. Archived workspaces reject all requests
35
+ * scoped to them. Server-populated.
36
+ */
37
+ status?: 'STATUS_ENABLED' | 'STATUS_DISABLED' | 'STATUS_ARCHIVED';
29
38
  }
30
39
  export interface WorkspaceSpec {
31
40
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.mts","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,+BAA2B;AAChG,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;GAGG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,SAAS,CAAC;IAIrD;;;OAGG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;CAGrD;AAED,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAErE,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC,uBAAuB,CAAC;IAEzC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
1
+ {"version":3,"file":"workspaces.d.mts","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[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ions } from "../internal/request-options.js";
6
6
  /**
7
7
  * Manage workspaces within an account. Workspaces provide organizational
8
8
  * grouping and isolation for resources such as agents, tools, and API keys.
9
+ *
10
+ * This is the workspace-scoped, end-user surface. Administrative operations
11
+ * (create / archive workspaces, manage members) live in WorkspaceAdminService
12
+ * under /v1/account/workspaces and require the admin role.
9
13
  */
10
14
  export declare class Workspaces extends APIResource {
11
15
  /**
@@ -26,6 +30,11 @@ export interface Workspace {
26
30
  */
27
31
  metadata: Shared.AccountResourceMetadata;
28
32
  spec: WorkspaceSpec;
33
+ /**
34
+ * Lifecycle status of the workspace. Archived workspaces reject all requests
35
+ * scoped to them. Server-populated.
36
+ */
37
+ status?: 'STATUS_ENABLED' | 'STATUS_DISABLED' | 'STATUS_ARCHIVED';
29
38
  }
30
39
  export interface WorkspaceSpec {
31
40
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,8BAA2B;AAChG,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;GAGG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,SAAS,CAAC;IAIrD;;;OAGG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;CAGrD;AAED,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAErE,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,Q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zC,IAAI,EAAE,aAAa,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;CACnE;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -7,6 +7,10 @@ const pagination_1 = require("../core/pagination.js");
7
7
  /**
8
8
  * Manage workspaces within an account. Workspaces provide organizational
9
9
  * grouping and isolation for resources such as agents, tools, and API keys.
10
+ *
11
+ * This is the workspace-scoped, end-user surface. Administrative operations
12
+ * (create / archive workspaces, manage members) live in WorkspaceAdminService
13
+ * under /v1/account/workspaces and require the admin role.
10
14
  */
11
15
  class Workspaces extends resource_1.APIResource {
12
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAgG;AAGhG;;;GAGG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,6BAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAwB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;AAlBD,gCAkBC"}
1
+ {"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAgG;AAGhG;;;;;;;GAOG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,6BAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAwB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;AAlBD,gCAkBC"}
@@ -4,6 +4,10 @@ import { CursorPagination } from "../core/pagination.mjs";
4
4
  /**
5
5
  * Manage workspaces within an account. Workspaces provide organizational
6
6
  * grouping and isolation for resources such as agents, tools, and API keys.
7
+ *
8
+ * This is the workspace-scoped, end-user surface. Administrative operations
9
+ * (create / archive workspaces, manage members) live in WorkspaceAdminService
10
+ * under /v1/account/workspaces and require the admin role.
7
11
  */
8
12
  export class Workspaces extends APIResource {
9
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.mjs","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,gBAAgB,EAA4C,+BAA2B;AAGhG;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,gBAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAwB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF"}
1
+ {"version":3,"file":"workspaces.mjs","sourceRoot":"","sources":["../src/resources/workspaces.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,gBAAgB,EAA4C,+BAA2B;AAGhG;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,gBAA2B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAwB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -197,6 +197,12 @@ import {
197
197
  ToolSets,
198
198
  ToolSetsCursorPagination,
199
199
  } from './resources/tool-sets/tool-sets';
200
+ import {
201
+ WorkspaceAdmin,
202
+ WorkspaceAdminCreateParams,
203
+ WorkspaceAdminListParams,
204
+ WorkspaceMember,
205
+ } from './resources/workspace-admin/workspace-admin';
200
206
  import { type Fetch } from './internal/builtin-types';
201
207
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
202
208
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -988,8 +994,21 @@ export class Cadenya {
988
994
  /**
989
995
  * Manage workspaces within an account. Workspaces provide organizational
990
996
  * grouping and isolation for resources such as agents, tools, and API keys.
997
+ *
998
+ * This is the workspace-scoped, end-user surface. Administrative operations
999
+ * (create / archive workspaces, manage members) live in WorkspaceAdminService
1000
+ * under /v1/account/workspaces and require the admin role.
991
1001
  */
992
1002
  workspaces: API.Workspaces = new API.Workspaces(this);
1003
+ /**
1004
+ * Administer workspaces across the account: create and archive workspaces and
1005
+ * manage their membership. These operations are account-scoped and require the
1006
+ * admin role (a token whose profile holds the WorkOS admin role); they live
1007
+ * under /v1/account/workspaces rather than the workspace-scoped /v1/workspaces
1008
+ * tree so an admin can manage any workspace in the account, including ones they
1009
+ * are not themselves a member of.
1010
+ */
1011
+ workspaceAdmin: API.WorkspaceAdmin = new API.WorkspaceAdmin(this);
993
1012
  webhooks: API.Webhooks = new API.Webhooks(this);
994
1013
  /**
995
1014
  * Apply a declarative bundle of workspace resources — tool sets, memory
@@ -1010,6 +1029,7 @@ Cadenya.ToolSets = ToolSets;
1010
1029
  Cadenya.APIKeys = APIKeys;
1011
1030
  Cadenya.WorkspaceSecrets = WorkspaceSecrets;
1012
1031
  Cadenya.Workspaces = Workspaces;
1032
+ Cadenya.WorkspaceAdmin = WorkspaceAdmin;
1013
1033
  Cadenya.Webhooks = Webhooks;
1014
1034
  Cadenya.BulkWorkspaceResources = BulkWorkspaceResources;
1015
1035
 
@@ -1190,6 +1210,13 @@ export declare namespace Cadenya {
1190
1210
  type WorkspaceListParams as WorkspaceListParams,
1191
1211
  };
1192
1212
 
1213
+ export {
1214
+ WorkspaceAdmin as WorkspaceAdmin,
1215
+ type WorkspaceMember as WorkspaceMember,
1216
+ type WorkspaceAdminCreateParams as WorkspaceAdminCreateParams,
1217
+ type WorkspaceAdminListParams as WorkspaceAdminListParams,
1218
+ };
1219
+
1193
1220
  export {
1194
1221
  Webhooks as Webhooks,
1195
1222
  type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent,
@@ -160,6 +160,13 @@ export {
160
160
  type UploadRetrieveParams,
161
161
  } from './uploads';
162
162
  export { Webhooks, type UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent } from './webhooks';
163
+ export {
164
+ WorkspaceAdmin,
165
+ type WorkspaceMember,
166
+ type WorkspaceAdminCreateParams,
167
+ type WorkspaceAdminListParams,
168
+ type WorkspaceMembersCursorPagination,
169
+ } from './workspace-admin/workspace-admin';
163
170
  export {
164
171
  WorkspaceSecrets,
165
172
  type WorkspaceSecret,
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Members, type MemberListParams, type MemberAddParams, type MemberRemoveParams } from './members';
4
+ export {
5
+ WorkspaceAdmin,
6
+ type WorkspaceMember,
7
+ type WorkspaceAdminCreateParams,
8
+ type WorkspaceAdminListParams,
9
+ type WorkspaceMembersCursorPagination,
10
+ } from './workspace-admin';
@@ -0,0 +1,92 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as WorkspaceAdminAPI from './workspace-admin';
5
+ import { WorkspaceMembersCursorPagination } from './workspace-admin';
6
+ import { APIPromise } from '../../core/api-promise';
7
+ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
8
+ import { buildHeaders } from '../../internal/headers';
9
+ import { RequestOptions } from '../../internal/request-options';
10
+ import { path } from '../../internal/utils/path';
11
+
12
+ /**
13
+ * Administer workspaces across the account: create and archive workspaces and
14
+ * manage their membership. These operations are account-scoped and require the
15
+ * admin role (a token whose profile holds the WorkOS admin role); they live
16
+ * under /v1/account/workspaces rather than the workspace-scoped /v1/workspaces
17
+ * tree so an admin can manage any workspace in the account, including ones they
18
+ * are not themselves a member of.
19
+ */
20
+ export class Members extends APIResource {
21
+ /**
22
+ * Lists the members of a workspace. Admin only.
23
+ */
24
+ list(
25
+ workspaceID: string,
26
+ query: MemberListParams | null | undefined = {},
27
+ options?: RequestOptions,
28
+ ): PagePromise<WorkspaceMembersCursorPagination, WorkspaceAdminAPI.WorkspaceMember> {
29
+ return this._client.getAPIList(
30
+ path`/v1/account/workspaces/${workspaceID}/members`,
31
+ CursorPagination<WorkspaceAdminAPI.WorkspaceMember>,
32
+ { query, ...options },
33
+ );
34
+ }
35
+
36
+ /**
37
+ * Grants a profile access to the workspace by creating (or reactivating) the actor
38
+ * that links the profile to the workspace. Accepts either an existing profile_id
39
+ * or an email to resolve-or-invite. Idempotent for an already-active member. Admin
40
+ * only.
41
+ */
42
+ add(
43
+ workspaceID: string,
44
+ body: MemberAddParams,
45
+ options?: RequestOptions,
46
+ ): APIPromise<WorkspaceAdminAPI.WorkspaceMember> {
47
+ return this._client.post(path`/v1/account/workspaces/${workspaceID}/members`, { body, ...options });
48
+ }
49
+
50
+ /**
51
+ * Revokes a member's access by deactivating their actor; the member is immediately
52
+ * cut off. The underlying profile is not deleted. Admin only.
53
+ */
54
+ remove(profileID: string, params: MemberRemoveParams, options?: RequestOptions): APIPromise<void> {
55
+ const { workspaceId } = params;
56
+ return this._client.delete(path`/v1/account/workspaces/${workspaceId}/members/${profileID}`, {
57
+ ...options,
58
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
59
+ });
60
+ }
61
+ }
62
+
63
+ export interface MemberListParams extends CursorPaginationParams {}
64
+
65
+ export interface MemberAddParams {
66
+ /**
67
+ * Email address to add (resolve-or-invite). Mutually exclusive with profile_id.
68
+ */
69
+ email?: string;
70
+
71
+ /**
72
+ * An existing account profile to add. Mutually exclusive with email.
73
+ */
74
+ profileId?: string;
75
+ }
76
+
77
+ export interface MemberRemoveParams {
78
+ /**
79
+ * The workspace to remove the member from (path).
80
+ */
81
+ workspaceId: string;
82
+ }
83
+
84
+ export declare namespace Members {
85
+ export {
86
+ type MemberListParams as MemberListParams,
87
+ type MemberAddParams as MemberAddParams,
88
+ type MemberRemoveParams as MemberRemoveParams,
89
+ };
90
+ }
91
+
92
+ export { type WorkspaceMembersCursorPagination };
@@ -0,0 +1,160 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as WorkspacesAPI from '../workspaces';
5
+ import { WorkspacesCursorPagination } from '../workspaces';
6
+ import * as MembersAPI from './members';
7
+ import { MemberAddParams, MemberListParams, MemberRemoveParams, Members } from './members';
8
+ import { APIPromise } from '../../core/api-promise';
9
+ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
10
+ import { buildHeaders } from '../../internal/headers';
11
+ import { RequestOptions } from '../../internal/request-options';
12
+ import { path } from '../../internal/utils/path';
13
+
14
+ /**
15
+ * Administer workspaces across the account: create and archive workspaces and
16
+ * manage their membership. These operations are account-scoped and require the
17
+ * admin role (a token whose profile holds the WorkOS admin role); they live
18
+ * under /v1/account/workspaces rather than the workspace-scoped /v1/workspaces
19
+ * tree so an admin can manage any workspace in the account, including ones they
20
+ * are not themselves a member of.
21
+ */
22
+ export class WorkspaceAdmin extends APIResource {
23
+ members: MembersAPI.Members = new MembersAPI.Members(this._client);
24
+
25
+ /**
26
+ * Creates a new workspace in the account. Admin only.
27
+ */
28
+ create(body: WorkspaceAdminCreateParams, options?: RequestOptions): APIPromise<WorkspacesAPI.Workspace> {
29
+ return this._client.post('/v1/account/workspaces', { body, ...options });
30
+ }
31
+
32
+ /**
33
+ * Retrieves a workspace in the account by ID. Admin only.
34
+ */
35
+ retrieve(workspaceID: string, options?: RequestOptions): APIPromise<WorkspacesAPI.Workspace> {
36
+ return this._client.get(path`/v1/account/workspaces/${workspaceID}`, options);
37
+ }
38
+
39
+ /**
40
+ * Lists every workspace in the account, optionally including archived ones. Admin
41
+ * only.
42
+ */
43
+ list(
44
+ query: WorkspaceAdminListParams | null | undefined = {},
45
+ options?: RequestOptions,
46
+ ): PagePromise<WorkspacesCursorPagination, WorkspacesAPI.Workspace> {
47
+ return this._client.getAPIList('/v1/account/workspaces', CursorPagination<WorkspacesAPI.Workspace>, {
48
+ query,
49
+ ...options,
50
+ });
51
+ }
52
+
53
+ /**
54
+ * Archives a workspace (soft delete). The workspace is retained, but any
55
+ * subsequent request scoped to it returns a permission error. Admin only.
56
+ */
57
+ archive(workspaceID: string, options?: RequestOptions): APIPromise<void> {
58
+ return this._client.delete(path`/v1/account/workspaces/${workspaceID}`, {
59
+ ...options,
60
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
61
+ });
62
+ }
63
+ }
64
+
65
+ export type WorkspaceMembersCursorPagination = CursorPagination<WorkspaceMember>;
66
+
67
+ /**
68
+ * A member of a workspace: the profile granted access plus the actor row that
69
+ * links it to the workspace. Returned by member list/add operations.
70
+ */
71
+ export interface WorkspaceMember {
72
+ /**
73
+ * The actor row linking the profile to the workspace (the junction record).
74
+ */
75
+ actorId: string;
76
+
77
+ /**
78
+ * The account profile that has access to the workspace.
79
+ */
80
+ profileId: string;
81
+
82
+ /**
83
+ * When the member was added to the workspace.
84
+ */
85
+ addedAt?: string;
86
+
87
+ /**
88
+ * Email address of the member's profile.
89
+ */
90
+ email?: string;
91
+
92
+ /**
93
+ * Display name of the member's profile.
94
+ */
95
+ name?: string;
96
+ }
97
+
98
+ export interface WorkspaceAdminCreateParams {
99
+ /**
100
+ * CreateAccountResourceMetadata contains the user-provided fields for creating an
101
+ * account-scoped resource. Read-only fields (id, account_id, profile_id) are
102
+ * excluded since they are set by the server.
103
+ */
104
+ metadata: WorkspaceAdminCreateParams.Metadata;
105
+
106
+ spec: WorkspacesAPI.WorkspaceSpec;
107
+ }
108
+
109
+ export namespace WorkspaceAdminCreateParams {
110
+ /**
111
+ * CreateAccountResourceMetadata contains the user-provided fields for creating an
112
+ * account-scoped resource. Read-only fields (id, account_id, profile_id) are
113
+ * excluded since they are set by the server.
114
+ */
115
+ export interface Metadata {
116
+ /**
117
+ * Human-readable name for the resource (e.g., "Production API Key", "Staging
118
+ * Workspace")
119
+ */
120
+ name: string;
121
+
122
+ /**
123
+ * External ID for the resource (e.g., a workflow ID from an external system)
124
+ */
125
+ externalId?: string;
126
+
127
+ /**
128
+ * Arbitrary key-value pairs for categorization and filtering Examples:
129
+ * {"environment": "production", "team": "platform", "version": "v2"}
130
+ */
131
+ labels?: { [key: string]: string };
132
+ }
133
+ }
134
+
135
+ export interface WorkspaceAdminListParams extends CursorPaginationParams {
136
+ /**
137
+ * When true, archived workspaces are included in the results. Defaults to false
138
+ * (active workspaces only).
139
+ */
140
+ includeArchived?: boolean;
141
+ }
142
+
143
+ WorkspaceAdmin.Members = Members;
144
+
145
+ export declare namespace WorkspaceAdmin {
146
+ export {
147
+ type WorkspaceMember as WorkspaceMember,
148
+ type WorkspaceAdminCreateParams as WorkspaceAdminCreateParams,
149
+ type WorkspaceAdminListParams as WorkspaceAdminListParams,
150
+ };
151
+
152
+ export {
153
+ Members as Members,
154
+ type MemberListParams as MemberListParams,
155
+ type MemberAddParams as MemberAddParams,
156
+ type MemberRemoveParams as MemberRemoveParams,
157
+ };
158
+ }
159
+
160
+ export { type WorkspacesCursorPagination };
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './workspace-admin/index';
@@ -9,6 +9,10 @@ import { RequestOptions } from '../internal/request-options';
9
9
  /**
10
10
  * Manage workspaces within an account. Workspaces provide organizational
11
11
  * grouping and isolation for resources such as agents, tools, and API keys.
12
+ *
13
+ * This is the workspace-scoped, end-user surface. Administrative operations
14
+ * (create / archive workspaces, manage members) live in WorkspaceAdminService
15
+ * under /v1/account/workspaces and require the admin role.
12
16
  */
13
17
  export class Workspaces extends APIResource {
14
18
  /**
@@ -40,6 +44,12 @@ export interface Workspace {
40
44
  metadata: Shared.AccountResourceMetadata;
41
45
 
42
46
  spec: WorkspaceSpec;
47
+
48
+ /**
49
+ * Lifecycle status of the workspace. Archived workspaces reject all requests
50
+ * scoped to them. Server-populated.
51
+ */
52
+ status?: 'STATUS_ENABLED' | 'STATUS_DISABLED' | 'STATUS_ARCHIVED';
43
53
  }
44
54
 
45
55
  export interface WorkspaceSpec {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.78.1'; // x-release-please-version
1
+ export const VERSION = '0.80.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.78.1";
1
+ export declare const VERSION = "0.80.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.78.1";
1
+ export declare const VERSION = "0.80.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.78.1'; // x-release-please-version
4
+ exports.VERSION = '0.80.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.78.1'; // x-release-please-version
1
+ export const VERSION = '0.80.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map