@cadenya/cadenya 0.79.0 → 0.81.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/CHANGELOG.md +16 -0
- package/README.md +8 -8
- package/client.d.mts +17 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -11
- package/client.d.ts.map +1 -1
- package/client.js +16 -10
- package/client.js.map +1 -1
- package/client.mjs +16 -10
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +1 -3
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +1 -3
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js.map +1 -1
- package/resources/account.mjs.map +1 -1
- package/resources/api-keys/access.d.mts +2 -2
- package/resources/api-keys/access.d.mts.map +1 -1
- package/resources/api-keys/access.d.ts +2 -2
- package/resources/api-keys/access.d.ts.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/workspace-admin/index.d.mts +3 -0
- package/resources/workspace-admin/index.d.mts.map +1 -0
- package/resources/workspace-admin/index.d.ts +3 -0
- package/resources/workspace-admin/index.d.ts.map +1 -0
- package/resources/{workspaces → workspace-admin}/index.js +3 -3
- package/resources/workspace-admin/index.js.map +1 -0
- package/resources/{workspaces → workspace-admin}/index.mjs +1 -1
- package/resources/workspace-admin/index.mjs.map +1 -0
- package/resources/workspace-admin/members.d.mts +55 -0
- package/resources/workspace-admin/members.d.mts.map +1 -0
- package/resources/workspace-admin/members.d.ts +55 -0
- package/resources/workspace-admin/members.d.ts.map +1 -0
- package/resources/workspace-admin/members.js +46 -0
- package/resources/workspace-admin/members.js.map +1 -0
- package/resources/workspace-admin/members.mjs +42 -0
- package/resources/workspace-admin/members.mjs.map +1 -0
- package/resources/workspace-admin/workspace-admin.d.mts +113 -0
- package/resources/workspace-admin/workspace-admin.d.mts.map +1 -0
- package/resources/workspace-admin/workspace-admin.d.ts +113 -0
- package/resources/workspace-admin/workspace-admin.d.ts.map +1 -0
- package/resources/workspace-admin/workspace-admin.js +62 -0
- package/resources/workspace-admin/workspace-admin.js.map +1 -0
- package/resources/workspace-admin/workspace-admin.mjs +57 -0
- package/resources/workspace-admin/workspace-admin.mjs.map +1 -0
- package/resources/workspace-admin.d.mts +2 -0
- package/resources/workspace-admin.d.mts.map +1 -0
- package/resources/workspace-admin.d.ts +2 -0
- package/resources/workspace-admin.d.ts.map +1 -0
- package/resources/workspace-admin.js +6 -0
- package/resources/workspace-admin.js.map +1 -0
- package/resources/workspace-admin.mjs +3 -0
- package/resources/workspace-admin.mjs.map +1 -0
- package/resources/workspaces.d.mts +54 -1
- package/resources/workspaces.d.mts.map +1 -1
- package/resources/workspaces.d.ts +54 -1
- package/resources/workspaces.d.ts.map +1 -1
- package/resources/workspaces.js +27 -2
- package/resources/workspaces.js.map +1 -1
- package/resources/workspaces.mjs +25 -1
- package/resources/workspaces.mjs.map +1 -1
- package/src/client.ts +32 -20
- package/src/resources/account.ts +1 -4
- package/src/resources/api-keys/access.ts +2 -2
- package/src/resources/index.ts +8 -6
- package/src/resources/{workspaces → workspace-admin}/index.ts +4 -7
- package/src/resources/workspace-admin/members.ts +92 -0
- package/src/resources/workspace-admin/workspace-admin.ts +162 -0
- package/src/resources/workspace-admin.ts +3 -0
- package/src/resources/workspaces.ts +76 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/profiles.d.mts +0 -33
- package/resources/profiles.d.mts.map +0 -1
- package/resources/profiles.d.ts +0 -33
- package/resources/profiles.d.ts.map +0 -1
- package/resources/profiles.js +0 -25
- package/resources/profiles.js.map +0 -1
- package/resources/profiles.mjs +0 -21
- package/resources/profiles.mjs.map +0 -1
- package/resources/workspaces/index.d.mts +0 -3
- package/resources/workspaces/index.d.mts.map +0 -1
- package/resources/workspaces/index.d.ts +0 -3
- package/resources/workspaces/index.d.ts.map +0 -1
- package/resources/workspaces/index.js.map +0 -1
- package/resources/workspaces/index.mjs.map +0 -1
- package/resources/workspaces/members.d.mts +0 -49
- package/resources/workspaces/members.d.mts.map +0 -1
- package/resources/workspaces/members.d.ts +0 -49
- package/resources/workspaces/members.d.ts.map +0 -1
- package/resources/workspaces/members.js +0 -44
- package/resources/workspaces/members.js.map +0 -1
- package/resources/workspaces/members.mjs +0 -40
- package/resources/workspaces/members.mjs.map +0 -1
- package/resources/workspaces/workspaces.d.mts +0 -133
- package/resources/workspaces/workspaces.d.mts.map +0 -1
- package/resources/workspaces/workspaces.d.ts +0 -133
- package/resources/workspaces/workspaces.d.ts.map +0 -1
- package/resources/workspaces/workspaces.js +0 -62
- package/resources/workspaces/workspaces.js.map +0 -1
- package/resources/workspaces/workspaces.mjs +0 -57
- package/resources/workspaces/workspaces.mjs.map +0 -1
- package/src/resources/profiles.ts +0 -47
- package/src/resources/workspaces/members.ts +0 -85
- package/src/resources/workspaces/workspaces.ts +0 -190
package/resources/profiles.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as AccountAPI from "./account.js";
|
|
3
|
-
import { ProfilesCursorPagination } from "./account.js";
|
|
4
|
-
import { type CursorPaginationParams, PagePromise } from "../core/pagination.js";
|
|
5
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
6
|
-
/**
|
|
7
|
-
* Read account profiles. Profiles are the account-level principals (users and
|
|
8
|
-
* API keys) that can be granted access to workspaces.
|
|
9
|
-
*/
|
|
10
|
-
export declare class Profiles extends APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Lists the profiles in the current account. Supports free-form search and a type
|
|
13
|
-
* filter, intended for member-picker UIs (e.g. choosing a profile to add to a
|
|
14
|
-
* workspace).
|
|
15
|
-
*/
|
|
16
|
-
list(query?: ProfileListParams | null | undefined, options?: RequestOptions): PagePromise<ProfilesCursorPagination, AccountAPI.Profile>;
|
|
17
|
-
}
|
|
18
|
-
export interface ProfileListParams extends CursorPaginationParams {
|
|
19
|
-
/**
|
|
20
|
-
* Free-form search over profile name and email, for member-picker UIs.
|
|
21
|
-
*/
|
|
22
|
-
query?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Filter by profile type. Defaults to all types when unset; pass PROFILE_TYPE_USER
|
|
25
|
-
* to list only human users (e.g. for a member picker).
|
|
26
|
-
*/
|
|
27
|
-
type?: 'PROFILE_TYPE_USER' | 'PROFILE_TYPE_API_KEY' | 'PROFILE_TYPE_SYSTEM';
|
|
28
|
-
}
|
|
29
|
-
export declare namespace Profiles {
|
|
30
|
-
export { type ProfileListParams as ProfileListParams };
|
|
31
|
-
}
|
|
32
|
-
export { type ProfilesCursorPagination };
|
|
33
|
-
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../src/resources/profiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,wBAAwB,EAAE,qBAAkB;AACrD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,8BAA2B;AAChG,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;GAGG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wBAAwB,EAAE,UAAU,CAAC,OAAO,CAAC;CAM7D;AAED,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,mBAAmB,GAAG,sBAAsB,GAAG,qBAAqB,CAAC;CAC7E;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,wBAAwB,EAAE,CAAC"}
|
package/resources/profiles.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
exports.Profiles = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const pagination_1 = require("../core/pagination.js");
|
|
7
|
-
/**
|
|
8
|
-
* Read account profiles. Profiles are the account-level principals (users and
|
|
9
|
-
* API keys) that can be granted access to workspaces.
|
|
10
|
-
*/
|
|
11
|
-
class Profiles extends resource_1.APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Lists the profiles in the current account. Supports free-form search and a type
|
|
14
|
-
* filter, intended for member-picker UIs (e.g. choosing a profile to add to a
|
|
15
|
-
* workspace).
|
|
16
|
-
*/
|
|
17
|
-
list(query = {}, options) {
|
|
18
|
-
return this._client.getAPIList('/v1/profiles', (pagination_1.CursorPagination), {
|
|
19
|
-
query,
|
|
20
|
-
...options,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Profiles = Profiles;
|
|
25
|
-
//# sourceMappingURL=profiles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../src/resources/profiles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAgG;AAGhG;;;GAGG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,6BAAoC,CAAA,EAAE;YACnF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAfD,4BAeC"}
|
package/resources/profiles.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { CursorPagination } from "../core/pagination.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Read account profiles. Profiles are the account-level principals (users and
|
|
6
|
-
* API keys) that can be granted access to workspaces.
|
|
7
|
-
*/
|
|
8
|
-
export class Profiles extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Lists the profiles in the current account. Supports free-form search and a type
|
|
11
|
-
* filter, intended for member-picker UIs (e.g. choosing a profile to add to a
|
|
12
|
-
* workspace).
|
|
13
|
-
*/
|
|
14
|
-
list(query = {}, options) {
|
|
15
|
-
return this._client.getAPIList('/v1/profiles', (CursorPagination), {
|
|
16
|
-
query,
|
|
17
|
-
...options,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=profiles.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../src/resources/profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,gBAAgB,EAA4C,+BAA2B;AAGhG;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,gBAAoC,CAAA,EAAE;YACnF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Members, type MemberListParams, type MemberAddParams, type MemberRemoveParams } from "./members.mjs";
|
|
2
|
-
export { Workspaces, type Workspace, type WorkspaceMember, type WorkspaceSpec, type WorkspaceCreateParams, type WorkspaceListParams, type WorkspacesCursorPagination, type WorkspaceMembersCursorPagination, } from "./workspaces.mjs";
|
|
3
|
-
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/workspaces/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,sBAAkB;AAC1G,OAAO,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,GACtC,yBAAqB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Members, type MemberListParams, type MemberAddParams, type MemberRemoveParams } from "./members.js";
|
|
2
|
-
export { Workspaces, type Workspace, type WorkspaceMember, type WorkspaceSpec, type WorkspaceCreateParams, type WorkspaceListParams, type WorkspacesCursorPagination, type WorkspaceMembersCursorPagination, } from "./workspaces.js";
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/workspaces/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,qBAAkB;AAC1G,OAAO,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,GACtC,wBAAqB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/workspaces/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA0G;AAAjG,kGAAA,OAAO,OAAA;AAChB,8CASsB;AARpB,wGAAA,UAAU,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/workspaces/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAAwE,sBAAkB;AAC1G,OAAO,EACL,UAAU,GAQX,yBAAqB"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as WorkspacesAPI from "./workspaces.mjs";
|
|
3
|
-
import { WorkspaceMembersCursorPagination } from "./workspaces.mjs";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
-
import { type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
-
/**
|
|
8
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
9
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
10
|
-
* Workspace creation, archival, and membership management require an account
|
|
11
|
-
* administrator (a token whose profile holds the admin role).
|
|
12
|
-
*/
|
|
13
|
-
export declare class Members extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Lists the members (actors) of a workspace. Requires the admin role.
|
|
16
|
-
*/
|
|
17
|
-
list(workspaceID: string, query?: MemberListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspaceMembersCursorPagination, WorkspacesAPI.WorkspaceMember>;
|
|
18
|
-
/**
|
|
19
|
-
* Grants a profile access to the workspace by creating an actor that links the
|
|
20
|
-
* profile to the workspace. Idempotent — re-adding an active member is a no-op.
|
|
21
|
-
* Requires the admin role.
|
|
22
|
-
*/
|
|
23
|
-
add(workspaceID: string, body: MemberAddParams, options?: RequestOptions): APIPromise<WorkspacesAPI.WorkspaceMember>;
|
|
24
|
-
/**
|
|
25
|
-
* Revokes a member's access to the workspace by deactivating their actor. The
|
|
26
|
-
* member is immediately cut off; the underlying profile is not deleted. Requires
|
|
27
|
-
* the admin role.
|
|
28
|
-
*/
|
|
29
|
-
remove(id: string, params: MemberRemoveParams, options?: RequestOptions): APIPromise<void>;
|
|
30
|
-
}
|
|
31
|
-
export interface MemberListParams extends CursorPaginationParams {
|
|
32
|
-
}
|
|
33
|
-
export interface MemberAddParams {
|
|
34
|
-
/**
|
|
35
|
-
* The existing account profile to add to the workspace.
|
|
36
|
-
*/
|
|
37
|
-
profileId?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface MemberRemoveParams {
|
|
40
|
-
/**
|
|
41
|
-
* The workspace to remove the member from (path).
|
|
42
|
-
*/
|
|
43
|
-
workspaceId: string;
|
|
44
|
-
}
|
|
45
|
-
export declare namespace Members {
|
|
46
|
-
export { type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
|
|
47
|
-
}
|
|
48
|
-
export { type WorkspaceMembersCursorPagination };
|
|
49
|
-
//# sourceMappingURL=members.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"members.d.mts","sourceRoot":"","sources":["../../src/resources/workspaces/members.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EAAE,gCAAgC,EAAE,yBAAqB;AAChE,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,kCAA8B;AAEnG,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,IAAI,CACF,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gCAAgC,EAAE,aAAa,CAAC,eAAe,CAAC;IAQ/E;;;;OAIG;IACH,GAAG,CACD,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC;IAI5C;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO3F;AAED,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;CAAG;AAEnE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,gCAAgC,EAAE,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as WorkspacesAPI from "./workspaces.js";
|
|
3
|
-
import { WorkspaceMembersCursorPagination } from "./workspaces.js";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
-
import { type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
6
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
-
/**
|
|
8
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
9
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
10
|
-
* Workspace creation, archival, and membership management require an account
|
|
11
|
-
* administrator (a token whose profile holds the admin role).
|
|
12
|
-
*/
|
|
13
|
-
export declare class Members extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Lists the members (actors) of a workspace. Requires the admin role.
|
|
16
|
-
*/
|
|
17
|
-
list(workspaceID: string, query?: MemberListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspaceMembersCursorPagination, WorkspacesAPI.WorkspaceMember>;
|
|
18
|
-
/**
|
|
19
|
-
* Grants a profile access to the workspace by creating an actor that links the
|
|
20
|
-
* profile to the workspace. Idempotent — re-adding an active member is a no-op.
|
|
21
|
-
* Requires the admin role.
|
|
22
|
-
*/
|
|
23
|
-
add(workspaceID: string, body: MemberAddParams, options?: RequestOptions): APIPromise<WorkspacesAPI.WorkspaceMember>;
|
|
24
|
-
/**
|
|
25
|
-
* Revokes a member's access to the workspace by deactivating their actor. The
|
|
26
|
-
* member is immediately cut off; the underlying profile is not deleted. Requires
|
|
27
|
-
* the admin role.
|
|
28
|
-
*/
|
|
29
|
-
remove(id: string, params: MemberRemoveParams, options?: RequestOptions): APIPromise<void>;
|
|
30
|
-
}
|
|
31
|
-
export interface MemberListParams extends CursorPaginationParams {
|
|
32
|
-
}
|
|
33
|
-
export interface MemberAddParams {
|
|
34
|
-
/**
|
|
35
|
-
* The existing account profile to add to the workspace.
|
|
36
|
-
*/
|
|
37
|
-
profileId?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface MemberRemoveParams {
|
|
40
|
-
/**
|
|
41
|
-
* The workspace to remove the member from (path).
|
|
42
|
-
*/
|
|
43
|
-
workspaceId: string;
|
|
44
|
-
}
|
|
45
|
-
export declare namespace Members {
|
|
46
|
-
export { type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
|
|
47
|
-
}
|
|
48
|
-
export { type WorkspaceMembersCursorPagination };
|
|
49
|
-
//# sourceMappingURL=members.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../src/resources/workspaces/members.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,aAAa,wBAAqB;AAC9C,OAAO,EAAE,gCAAgC,EAAE,wBAAqB;AAChE,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAoB,KAAK,sBAAsB,EAAE,WAAW,EAAE,iCAA8B;AAEnG,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,IAAI,CACF,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gCAAgC,EAAE,aAAa,CAAC,eAAe,CAAC;IAQ/E;;;;OAIG;IACH,GAAG,CACD,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC;IAI5C;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO3F;AAED,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;CAAG;AAEnE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,gCAAgC,EAAE,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
exports.Members = void 0;
|
|
5
|
-
const resource_1 = require("../../core/resource.js");
|
|
6
|
-
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
-
const headers_1 = require("../../internal/headers.js");
|
|
8
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
9
|
-
/**
|
|
10
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
11
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
12
|
-
* Workspace creation, archival, and membership management require an account
|
|
13
|
-
* administrator (a token whose profile holds the admin role).
|
|
14
|
-
*/
|
|
15
|
-
class Members extends resource_1.APIResource {
|
|
16
|
-
/**
|
|
17
|
-
* Lists the members (actors) of a workspace. Requires the admin role.
|
|
18
|
-
*/
|
|
19
|
-
list(workspaceID, query = {}, options) {
|
|
20
|
-
return this._client.getAPIList((0, path_1.path) `/v1/workspaces/${workspaceID}/members`, (pagination_1.CursorPagination), { query, ...options });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Grants a profile access to the workspace by creating an actor that links the
|
|
24
|
-
* profile to the workspace. Idempotent — re-adding an active member is a no-op.
|
|
25
|
-
* Requires the admin role.
|
|
26
|
-
*/
|
|
27
|
-
add(workspaceID, body, options) {
|
|
28
|
-
return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceID}/members`, { body, ...options });
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Revokes a member's access to the workspace by deactivating their actor. The
|
|
32
|
-
* member is immediately cut off; the underlying profile is not deleted. Requires
|
|
33
|
-
* the admin role.
|
|
34
|
-
*/
|
|
35
|
-
remove(id, params, options) {
|
|
36
|
-
const { workspaceId } = params;
|
|
37
|
-
return this._client.delete((0, path_1.path) `/v1/workspaces/${workspaceId}/members/${id}`, {
|
|
38
|
-
...options,
|
|
39
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.Members = Members;
|
|
44
|
-
//# sourceMappingURL=members.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../src/resources/workspaces/members.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;GAKG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,kBAAkB,WAAW,UAAU,EAC3C,CAAA,6BAA+C,CAAA,EAC/C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,WAAmB,EACnB,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACrE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,0BAyCC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import { CursorPagination } from "../../core/pagination.mjs";
|
|
4
|
-
import { buildHeaders } from "../../internal/headers.mjs";
|
|
5
|
-
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
-
/**
|
|
7
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
8
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
9
|
-
* Workspace creation, archival, and membership management require an account
|
|
10
|
-
* administrator (a token whose profile holds the admin role).
|
|
11
|
-
*/
|
|
12
|
-
export class Members extends APIResource {
|
|
13
|
-
/**
|
|
14
|
-
* Lists the members (actors) of a workspace. Requires the admin role.
|
|
15
|
-
*/
|
|
16
|
-
list(workspaceID, query = {}, options) {
|
|
17
|
-
return this._client.getAPIList(path `/v1/workspaces/${workspaceID}/members`, (CursorPagination), { query, ...options });
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Grants a profile access to the workspace by creating an actor that links the
|
|
21
|
-
* profile to the workspace. Idempotent — re-adding an active member is a no-op.
|
|
22
|
-
* Requires the admin role.
|
|
23
|
-
*/
|
|
24
|
-
add(workspaceID, body, options) {
|
|
25
|
-
return this._client.post(path `/v1/workspaces/${workspaceID}/members`, { body, ...options });
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Revokes a member's access to the workspace by deactivating their actor. The
|
|
29
|
-
* member is immediately cut off; the underlying profile is not deleted. Requires
|
|
30
|
-
* the admin role.
|
|
31
|
-
*/
|
|
32
|
-
remove(id, params, options) {
|
|
33
|
-
const { workspaceId } = params;
|
|
34
|
-
return this._client.delete(path `/v1/workspaces/${workspaceId}/members/${id}`, {
|
|
35
|
-
...options,
|
|
36
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=members.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"members.mjs","sourceRoot":"","sources":["../../src/resources/workspaces/members.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AACnG,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;GAKG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,kBAAkB,WAAW,UAAU,EAC3C,CAAA,gBAA+C,CAAA,EAC/C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,WAAmB,EACnB,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,WAAW,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACrE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as Shared from "../shared.mjs";
|
|
3
|
-
import * as MembersAPI from "./members.mjs";
|
|
4
|
-
import { MemberAddParams, MemberListParams, MemberRemoveParams, Members } from "./members.mjs";
|
|
5
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
|
-
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
7
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
8
|
-
/**
|
|
9
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
10
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
11
|
-
* Workspace creation, archival, and membership management require an account
|
|
12
|
-
* administrator (a token whose profile holds the admin role).
|
|
13
|
-
*/
|
|
14
|
-
export declare class Workspaces extends APIResource {
|
|
15
|
-
members: MembersAPI.Members;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a new workspace in the current account. Requires the admin role.
|
|
18
|
-
*/
|
|
19
|
-
create(body: WorkspaceCreateParams, options?: RequestOptions): APIPromise<Workspace>;
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves a workspace by ID from the current account.
|
|
22
|
-
*/
|
|
23
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Workspace>;
|
|
24
|
-
/**
|
|
25
|
-
* Lists all workspaces for the current account
|
|
26
|
-
*/
|
|
27
|
-
list(query?: WorkspaceListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspacesCursorPagination, Workspace>;
|
|
28
|
-
/**
|
|
29
|
-
* Archives a workspace. This is a soft delete: the workspace is retained but any
|
|
30
|
-
* subsequent request scoped to it returns a permission error. Requires the admin
|
|
31
|
-
* role.
|
|
32
|
-
*/
|
|
33
|
-
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Retrieves the workspace associated with the current API token. Useful for
|
|
36
|
-
* workspace-scoped tokens to identify which workspace they belong to.
|
|
37
|
-
*/
|
|
38
|
-
getCurrent(options?: RequestOptions): APIPromise<Workspace>;
|
|
39
|
-
}
|
|
40
|
-
export type WorkspacesCursorPagination = CursorPagination<Workspace>;
|
|
41
|
-
export type WorkspaceMembersCursorPagination = CursorPagination<WorkspaceMember>;
|
|
42
|
-
export interface Workspace {
|
|
43
|
-
/**
|
|
44
|
-
* AccountResourceMetadata is used to represent a resource that is associated to an
|
|
45
|
-
* account but not to a workspace.
|
|
46
|
-
*/
|
|
47
|
-
metadata: Shared.AccountResourceMetadata;
|
|
48
|
-
spec: WorkspaceSpec;
|
|
49
|
-
/**
|
|
50
|
-
* Lifecycle status of the workspace. Archived workspaces reject all requests
|
|
51
|
-
* scoped to them. Server-populated.
|
|
52
|
-
*/
|
|
53
|
-
status?: 'STATUS_ENABLED' | 'STATUS_DISABLED' | 'STATUS_ARCHIVED';
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* A member of a workspace: the profile granted access plus the actor row that
|
|
57
|
-
* links it to the workspace. Returned by member list/add operations.
|
|
58
|
-
*/
|
|
59
|
-
export interface WorkspaceMember {
|
|
60
|
-
/**
|
|
61
|
-
* The actor row linking the profile to the workspace (the junction record). This
|
|
62
|
-
* is the id used to remove the member.
|
|
63
|
-
*/
|
|
64
|
-
actorId: string;
|
|
65
|
-
/**
|
|
66
|
-
* The account profile that has access to the workspace.
|
|
67
|
-
*/
|
|
68
|
-
profileId: string;
|
|
69
|
-
/**
|
|
70
|
-
* When the member was added to the workspace.
|
|
71
|
-
*/
|
|
72
|
-
addedAt?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Email address of the member's profile.
|
|
75
|
-
*/
|
|
76
|
-
email?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Display name of the member's profile.
|
|
79
|
-
*/
|
|
80
|
-
name?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface WorkspaceSpec {
|
|
83
|
-
description?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface WorkspaceCreateParams {
|
|
86
|
-
/**
|
|
87
|
-
* CreateAccountResourceMetadata contains the user-provided fields for creating an
|
|
88
|
-
* account-scoped resource. Read-only fields (id, account_id, profile_id) are
|
|
89
|
-
* excluded since they are set by the server.
|
|
90
|
-
*/
|
|
91
|
-
metadata: WorkspaceCreateParams.Metadata;
|
|
92
|
-
spec: WorkspaceSpec;
|
|
93
|
-
}
|
|
94
|
-
export declare namespace WorkspaceCreateParams {
|
|
95
|
-
/**
|
|
96
|
-
* CreateAccountResourceMetadata contains the user-provided fields for creating an
|
|
97
|
-
* account-scoped resource. Read-only fields (id, account_id, profile_id) are
|
|
98
|
-
* excluded since they are set by the server.
|
|
99
|
-
*/
|
|
100
|
-
interface Metadata {
|
|
101
|
-
/**
|
|
102
|
-
* Human-readable name for the resource (e.g., "Production API Key", "Staging
|
|
103
|
-
* Workspace")
|
|
104
|
-
*/
|
|
105
|
-
name: string;
|
|
106
|
-
/**
|
|
107
|
-
* External ID for the resource (e.g., a workflow ID from an external system)
|
|
108
|
-
*/
|
|
109
|
-
externalId?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Arbitrary key-value pairs for categorization and filtering Examples:
|
|
112
|
-
* {"environment": "production", "team": "platform", "version": "v2"}
|
|
113
|
-
*/
|
|
114
|
-
labels?: {
|
|
115
|
-
[key: string]: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
export interface WorkspaceListParams extends CursorPaginationParams {
|
|
120
|
-
/**
|
|
121
|
-
* When set to true you may use more of your alloted API rate-limit
|
|
122
|
-
*/
|
|
123
|
-
includeInfo?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Sort order for results (asc or desc by creation time)
|
|
126
|
-
*/
|
|
127
|
-
sortOrder?: string;
|
|
128
|
-
}
|
|
129
|
-
export declare namespace Workspaces {
|
|
130
|
-
export { type Workspace as Workspace, type WorkspaceMember as WorkspaceMember, type WorkspaceSpec as WorkspaceSpec, type WorkspacesCursorPagination as WorkspacesCursorPagination, type WorkspaceCreateParams as WorkspaceCreateParams, type WorkspaceListParams as WorkspaceListParams, };
|
|
131
|
-
export { Members as Members, type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=workspaces.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.mts","sourceRoot":"","sources":["../../src/resources/workspaces/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,sBAAkB;AAC3F,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,kCAA8B;AAEnG,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG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CAAC;QAEpB;;;WAGG;QACH,MAAM,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;KACpC;CACF;AAED,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IACjE;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as Shared from "../shared.js";
|
|
3
|
-
import * as MembersAPI from "./members.js";
|
|
4
|
-
import { MemberAddParams, MemberListParams, MemberRemoveParams, Members } from "./members.js";
|
|
5
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
6
|
-
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
7
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
8
|
-
/**
|
|
9
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
10
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
11
|
-
* Workspace creation, archival, and membership management require an account
|
|
12
|
-
* administrator (a token whose profile holds the admin role).
|
|
13
|
-
*/
|
|
14
|
-
export declare class Workspaces extends APIResource {
|
|
15
|
-
members: MembersAPI.Members;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a new workspace in the current account. Requires the admin role.
|
|
18
|
-
*/
|
|
19
|
-
create(body: WorkspaceCreateParams, options?: RequestOptions): APIPromise<Workspace>;
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves a workspace by ID from the current account.
|
|
22
|
-
*/
|
|
23
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Workspace>;
|
|
24
|
-
/**
|
|
25
|
-
* Lists all workspaces for the current account
|
|
26
|
-
*/
|
|
27
|
-
list(query?: WorkspaceListParams | null | undefined, options?: RequestOptions): PagePromise<WorkspacesCursorPagination, Workspace>;
|
|
28
|
-
/**
|
|
29
|
-
* Archives a workspace. This is a soft delete: the workspace is retained but any
|
|
30
|
-
* subsequent request scoped to it returns a permission error. Requires the admin
|
|
31
|
-
* role.
|
|
32
|
-
*/
|
|
33
|
-
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Retrieves the workspace associated with the current API token. Useful for
|
|
36
|
-
* workspace-scoped tokens to identify which workspace they belong to.
|
|
37
|
-
*/
|
|
38
|
-
getCurrent(options?: RequestOptions): APIPromise<Workspace>;
|
|
39
|
-
}
|
|
40
|
-
export type WorkspacesCursorPagination = CursorPagination<Workspace>;
|
|
41
|
-
export type WorkspaceMembersCursorPagination = CursorPagination<WorkspaceMember>;
|
|
42
|
-
export interface Workspace {
|
|
43
|
-
/**
|
|
44
|
-
* AccountResourceMetadata is used to represent a resource that is associated to an
|
|
45
|
-
* account but not to a workspace.
|
|
46
|
-
*/
|
|
47
|
-
metadata: Shared.AccountResourceMetadata;
|
|
48
|
-
spec: WorkspaceSpec;
|
|
49
|
-
/**
|
|
50
|
-
* Lifecycle status of the workspace. Archived workspaces reject all requests
|
|
51
|
-
* scoped to them. Server-populated.
|
|
52
|
-
*/
|
|
53
|
-
status?: 'STATUS_ENABLED' | 'STATUS_DISABLED' | 'STATUS_ARCHIVED';
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* A member of a workspace: the profile granted access plus the actor row that
|
|
57
|
-
* links it to the workspace. Returned by member list/add operations.
|
|
58
|
-
*/
|
|
59
|
-
export interface WorkspaceMember {
|
|
60
|
-
/**
|
|
61
|
-
* The actor row linking the profile to the workspace (the junction record). This
|
|
62
|
-
* is the id used to remove the member.
|
|
63
|
-
*/
|
|
64
|
-
actorId: string;
|
|
65
|
-
/**
|
|
66
|
-
* The account profile that has access to the workspace.
|
|
67
|
-
*/
|
|
68
|
-
profileId: string;
|
|
69
|
-
/**
|
|
70
|
-
* When the member was added to the workspace.
|
|
71
|
-
*/
|
|
72
|
-
addedAt?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Email address of the member's profile.
|
|
75
|
-
*/
|
|
76
|
-
email?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Display name of the member's profile.
|
|
79
|
-
*/
|
|
80
|
-
name?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface WorkspaceSpec {
|
|
83
|
-
description?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface WorkspaceCreateParams {
|
|
86
|
-
/**
|
|
87
|
-
* CreateAccountResourceMetadata contains the user-provided fields for creating an
|
|
88
|
-
* account-scoped resource. Read-only fields (id, account_id, profile_id) are
|
|
89
|
-
* excluded since they are set by the server.
|
|
90
|
-
*/
|
|
91
|
-
metadata: WorkspaceCreateParams.Metadata;
|
|
92
|
-
spec: WorkspaceSpec;
|
|
93
|
-
}
|
|
94
|
-
export declare namespace WorkspaceCreateParams {
|
|
95
|
-
/**
|
|
96
|
-
* CreateAccountResourceMetadata contains the user-provided fields for creating an
|
|
97
|
-
* account-scoped resource. Read-only fields (id, account_id, profile_id) are
|
|
98
|
-
* excluded since they are set by the server.
|
|
99
|
-
*/
|
|
100
|
-
interface Metadata {
|
|
101
|
-
/**
|
|
102
|
-
* Human-readable name for the resource (e.g., "Production API Key", "Staging
|
|
103
|
-
* Workspace")
|
|
104
|
-
*/
|
|
105
|
-
name: string;
|
|
106
|
-
/**
|
|
107
|
-
* External ID for the resource (e.g., a workflow ID from an external system)
|
|
108
|
-
*/
|
|
109
|
-
externalId?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Arbitrary key-value pairs for categorization and filtering Examples:
|
|
112
|
-
* {"environment": "production", "team": "platform", "version": "v2"}
|
|
113
|
-
*/
|
|
114
|
-
labels?: {
|
|
115
|
-
[key: string]: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
export interface WorkspaceListParams extends CursorPaginationParams {
|
|
120
|
-
/**
|
|
121
|
-
* When set to true you may use more of your alloted API rate-limit
|
|
122
|
-
*/
|
|
123
|
-
includeInfo?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Sort order for results (asc or desc by creation time)
|
|
126
|
-
*/
|
|
127
|
-
sortOrder?: string;
|
|
128
|
-
}
|
|
129
|
-
export declare namespace Workspaces {
|
|
130
|
-
export { type Workspace as Workspace, type WorkspaceMember as WorkspaceMember, type WorkspaceSpec as WorkspaceSpec, type WorkspacesCursorPagination as WorkspacesCursorPagination, type WorkspaceCreateParams as WorkspaceCreateParams, type WorkspaceListParams as WorkspaceListParams, };
|
|
131
|
-
export { Members as Members, type MemberListParams as MemberListParams, type MemberAddParams as MemberAddParams, type MemberRemoveParams as MemberRemoveParams, };
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../src/resources/workspaces/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,qBAAkB;AAC3F,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,gBAAg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