@cadenya/cadenya 0.68.0 → 0.69.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 (68) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account.d.mts +17 -12
  12. package/resources/account.d.mts.map +1 -1
  13. package/resources/account.d.ts +17 -12
  14. package/resources/account.d.ts.map +1 -1
  15. package/resources/account.js.map +1 -1
  16. package/resources/account.mjs.map +1 -1
  17. package/resources/api-keys/access.d.mts +47 -0
  18. package/resources/api-keys/access.d.mts.map +1 -0
  19. package/resources/api-keys/access.d.ts +47 -0
  20. package/resources/api-keys/access.d.ts.map +1 -0
  21. package/resources/api-keys/access.js +41 -0
  22. package/resources/api-keys/access.js.map +1 -0
  23. package/resources/api-keys/access.mjs +37 -0
  24. package/resources/api-keys/access.mjs.map +1 -0
  25. package/resources/api-keys/api-keys.d.mts +213 -0
  26. package/resources/api-keys/api-keys.d.mts.map +1 -0
  27. package/resources/api-keys/api-keys.d.ts +213 -0
  28. package/resources/api-keys/api-keys.d.ts.map +1 -0
  29. package/resources/api-keys/api-keys.js +65 -0
  30. package/resources/api-keys/api-keys.js.map +1 -0
  31. package/resources/api-keys/api-keys.mjs +60 -0
  32. package/resources/api-keys/api-keys.mjs.map +1 -0
  33. package/resources/api-keys/index.d.mts +3 -0
  34. package/resources/api-keys/index.d.mts.map +1 -0
  35. package/resources/api-keys/index.d.ts +3 -0
  36. package/resources/api-keys/index.d.ts.map +1 -0
  37. package/resources/api-keys/index.js +9 -0
  38. package/resources/api-keys/index.js.map +1 -0
  39. package/resources/api-keys/index.mjs +4 -0
  40. package/resources/api-keys/index.mjs.map +1 -0
  41. package/resources/api-keys.d.mts +1 -151
  42. package/resources/api-keys.d.mts.map +1 -1
  43. package/resources/api-keys.d.ts +1 -151
  44. package/resources/api-keys.d.ts.map +1 -1
  45. package/resources/api-keys.js +2 -59
  46. package/resources/api-keys.js.map +1 -1
  47. package/resources/api-keys.mjs +1 -57
  48. package/resources/api-keys.mjs.map +1 -1
  49. package/resources/index.d.mts +2 -2
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +2 -2
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +1 -1
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +1 -1
  56. package/resources/index.mjs.map +1 -1
  57. package/src/client.ts +14 -18
  58. package/src/resources/account.ts +18 -11
  59. package/src/resources/api-keys/access.ts +79 -0
  60. package/src/resources/api-keys/api-keys.ts +282 -0
  61. package/src/resources/api-keys/index.ts +13 -0
  62. package/src/resources/api-keys.ts +1 -218
  63. package/src/resources/index.ts +2 -4
  64. package/src/version.ts +1 -1
  65. package/version.d.mts +1 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
  68. package/version.mjs +1 -1
@@ -1,152 +1,2 @@
1
- import { APIResource } from "../core/resource.js";
2
- import * as AccountAPI from "./account.js";
3
- import * as Shared from "./shared.js";
4
- import { APIPromise } from "../core/api-promise.js";
5
- import { CursorPagination, type CursorPaginationParams, PagePromise } from "../core/pagination.js";
6
- import { RequestOptions } from "../internal/request-options.js";
7
- /**
8
- * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
9
- * exactly one workspace, ensuring isolation between environments.
10
- */
11
- export declare class APIKeys extends APIResource {
12
- /**
13
- * Creates a new API key in the workspace.
14
- */
15
- create(workspaceID: string, body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKey>;
16
- /**
17
- * Retrieves an API key by ID from the workspace
18
- */
19
- retrieve(id: string, params: APIKeyRetrieveParams, options?: RequestOptions): APIPromise<APIKey>;
20
- /**
21
- * Updates an API key in the workspace
22
- */
23
- update(id: string, params: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey>;
24
- /**
25
- * Lists all API keys in the workspace
26
- */
27
- list(workspaceID: string, query?: APIKeyListParams | null | undefined, options?: RequestOptions): PagePromise<APIKeysCursorPagination, APIKey>;
28
- /**
29
- * Deletes an API key from the workspace
30
- */
31
- delete(id: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<void>;
32
- /**
33
- * Rotates an API Key and returns a new token. All previous API Key tokens in use
34
- * will be invalidated.
35
- */
36
- rotate(id: string, params: APIKeyRotateParams, options?: RequestOptions): APIPromise<APIKey>;
37
- }
38
- export type APIKeysCursorPagination = CursorPagination<APIKey>;
39
- /**
40
- * An API key scoped to a single workspace. The key's token is used to authenticate
41
- * requests against that workspace's resources.
42
- */
43
- export interface APIKey {
44
- /**
45
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
46
- */
47
- metadata: Shared.ResourceMetadata;
48
- /**
49
- * Configuration for an API key.
50
- */
51
- spec: APIKeySpec;
52
- info?: APIKeyInfo;
53
- }
54
- export interface APIKeyInfo {
55
- /**
56
- * A profile identifies a user or non-human principal (such as an API key) at the
57
- * account level. Profiles are account-scoped and can be granted access to multiple
58
- * workspaces.
59
- */
60
- createdBy?: AccountAPI.Profile;
61
- }
62
- /**
63
- * Configuration for an API key.
64
- */
65
- export interface APIKeySpec {
66
- /**
67
- * The bearer token used to authenticate as this API key. Returned only on creation
68
- * and rotation; subsequent reads omit this field.
69
- */
70
- token?: string;
71
- /**
72
- * Free-form description of what this API key is used for.
73
- */
74
- description?: string;
75
- }
76
- export interface APIKeyCreateParams {
77
- /**
78
- * CreateResourceMetadata contains the user-provided fields for creating a
79
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
80
- * profile_id, created_at) are excluded since they are set by the server.
81
- */
82
- metadata: Shared.CreateResourceMetadata;
83
- /**
84
- * Configuration for an API key.
85
- */
86
- spec: APIKeySpec;
87
- }
88
- export interface APIKeyRetrieveParams {
89
- /**
90
- * The workspace the API key belongs to.
91
- */
92
- workspaceId: string;
93
- }
94
- export interface APIKeyUpdateParams {
95
- /**
96
- * Path param: The workspace the API key belongs to.
97
- */
98
- workspaceId: string;
99
- /**
100
- * Body param: UpdateResourceMetadata contains the user-provided fields for
101
- * updating a workspace-scoped resource. Read-only fields (id, account_id,
102
- * workspace_id, profile_id, created_at) are excluded since they are set by the
103
- * server.
104
- */
105
- metadata?: Shared.UpdateResourceMetadata;
106
- /**
107
- * Body param: Configuration for an API key.
108
- */
109
- spec?: APIKeySpec;
110
- /**
111
- * Body param: Fields to update.
112
- */
113
- updateMask?: string;
114
- }
115
- export interface APIKeyListParams extends CursorPaginationParams {
116
- /**
117
- * Filter by bundle_key — return only resources owned by this bundle.
118
- */
119
- bundleKey?: string;
120
- /**
121
- * When set to true you may use more of your alloted API rate-limit
122
- */
123
- includeInfo?: boolean;
124
- /**
125
- * Filter expression (query param: prefix)
126
- */
127
- prefix?: string;
128
- /**
129
- * Free-form search query
130
- */
131
- query?: string;
132
- /**
133
- * Sort order for results (asc or desc by creation time)
134
- */
135
- sortOrder?: string;
136
- }
137
- export interface APIKeyDeleteParams {
138
- /**
139
- * The workspace the API key belongs to.
140
- */
141
- workspaceId: string;
142
- }
143
- export interface APIKeyRotateParams {
144
- /**
145
- * The workspace the API key belongs to.
146
- */
147
- workspaceId: string;
148
- }
149
- export declare namespace APIKeys {
150
- export { type APIKey as APIKey, type APIKeyInfo as APIKeyInfo, type APIKeySpec as APIKeySpec, type APIKeysCursorPagination as APIKeysCursorPagination, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyRetrieveParams as APIKeyRetrieveParams, type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, type APIKeyDeleteParams as APIKeyDeleteParams, type APIKeyRotateParams as APIKeyRotateParams, };
151
- }
1
+ export * from "./api-keys/index.js";
152
2
  //# sourceMappingURL=api-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.d.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AE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":""}
@@ -1,63 +1,6 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.APIKeys = 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
- * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
11
- * exactly one workspace, ensuring isolation between environments.
12
- */
13
- class APIKeys extends resource_1.APIResource {
14
- /**
15
- * Creates a new API key in the workspace.
16
- */
17
- create(workspaceID, body, options) {
18
- return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceID}/api_keys`, { body, ...options });
19
- }
20
- /**
21
- * Retrieves an API key by ID from the workspace
22
- */
23
- retrieve(id, params, options) {
24
- const { workspaceId } = params;
25
- return this._client.get((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}`, options);
26
- }
27
- /**
28
- * Updates an API key in the workspace
29
- */
30
- update(id, params, options) {
31
- const { workspaceId, ...body } = params;
32
- return this._client.patch((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}`, { body, ...options });
33
- }
34
- /**
35
- * Lists all API keys in the workspace
36
- */
37
- list(workspaceID, query = {}, options) {
38
- return this._client.getAPIList((0, path_1.path) `/v1/workspaces/${workspaceID}/api_keys`, (pagination_1.CursorPagination), {
39
- query,
40
- ...options,
41
- });
42
- }
43
- /**
44
- * Deletes an API key from the workspace
45
- */
46
- delete(id, params, options) {
47
- const { workspaceId } = params;
48
- return this._client.delete((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}`, {
49
- ...options,
50
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
51
- });
52
- }
53
- /**
54
- * Rotates an API Key and returns a new token. All previous API Key tokens in use
55
- * will be invalidated.
56
- */
57
- rotate(id, params, options) {
58
- const { workspaceId } = params;
59
- return this._client.put((0, path_1.path) `/v1/workspaces/${workspaceId}/api_keys/${id}/rotate`, options);
60
- }
61
- }
62
- exports.APIKeys = APIKeys;
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./api-keys/index.js"), exports);
63
6
  //# sourceMappingURL=api-keys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAgG;AAChG,oDAAmD;AAEnD,oDAA8C;AAE9C;;;GAGG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAwB,EAAE,OAAwB;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,WAAW,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA4B,EAAE,OAAwB;QACzE,MAAM,EAAE,WAAW,EAAE,GAAG,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AA,kBAAkB,WAAW,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;CACF;AAzDD,0BAyDC"}
1
+ {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
@@ -1,59 +1,3 @@
1
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
- * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
8
- * exactly one workspace, ensuring isolation between environments.
9
- */
10
- export class APIKeys extends APIResource {
11
- /**
12
- * Creates a new API key in the workspace.
13
- */
14
- create(workspaceID, body, options) {
15
- return this._client.post(path `/v1/workspaces/${workspaceID}/api_keys`, { body, ...options });
16
- }
17
- /**
18
- * Retrieves an API key by ID from the workspace
19
- */
20
- retrieve(id, params, options) {
21
- const { workspaceId } = params;
22
- return this._client.get(path `/v1/workspaces/${workspaceId}/api_keys/${id}`, options);
23
- }
24
- /**
25
- * Updates an API key in the workspace
26
- */
27
- update(id, params, options) {
28
- const { workspaceId, ...body } = params;
29
- return this._client.patch(path `/v1/workspaces/${workspaceId}/api_keys/${id}`, { body, ...options });
30
- }
31
- /**
32
- * Lists all API keys in the workspace
33
- */
34
- list(workspaceID, query = {}, options) {
35
- return this._client.getAPIList(path `/v1/workspaces/${workspaceID}/api_keys`, (CursorPagination), {
36
- query,
37
- ...options,
38
- });
39
- }
40
- /**
41
- * Deletes an API key from the workspace
42
- */
43
- delete(id, params, options) {
44
- const { workspaceId } = params;
45
- return this._client.delete(path `/v1/workspaces/${workspaceId}/api_keys/${id}`, {
46
- ...options,
47
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
48
- });
49
- }
50
- /**
51
- * Rotates an API Key and returns a new token. All previous API Key tokens in use
52
- * will be invalidated.
53
- */
54
- rotate(id, params, options) {
55
- const { workspaceId } = params;
56
- return this._client.put(path `/v1/workspaces/${workspaceId}/api_keys/${id}/rotate`, options);
57
- }
58
- }
2
+ export * from "./api-keys/index.mjs";
59
3
  //# sourceMappingURL=api-keys.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.mjs","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,gBAAgB,EAA4C;OAC9D,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAwB,EAAE,OAAwB;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,WAAW,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA4B,EAAE,OAAwB;QACzE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,WAAW,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACrE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,kBAAkB,WAAW,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,kBAAkB,WAAW,WAAW,EAAE,CAAA,gBAAwB,CAAA,EAAE;YACrG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;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,aAAa,EAAE,EAAE,EAAE;YAC7E,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,MAA0B,EAAE,OAAwB;QACrE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,WAAW,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;CACF"}
1
+ {"version":3,"file":"api-keys.mjs","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -1,6 +1,6 @@
1
1
  export * from "./shared.mjs";
2
- export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCreateParams, type APIKeyRetrieveParams, type APIKeyUpdateParams, type APIKeyListParams, type APIKeyDeleteParams, type APIKeyRotateParams, type APIKeysCursorPagination, } from "./api-keys.mjs";
3
- export { AccountResource, type Account, type AccountSpec, type Profile, type ProfileSpec, type RotateWebhookSigningKeyResponse, } from "./account.mjs";
2
+ export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCreateParams, type APIKeyUpdateParams, type APIKeyListParams, type APIKeysCursorPagination, } from "./api-keys/api-keys.mjs";
3
+ export { AccountResource, type Account, type AccountInfo, type AccountSpec, type Profile, type ProfileSpec, type RotateWebhookSigningKeyResponse, } from "./account.mjs";
4
4
  export { Agents, type Agent, type AgentInfo, type AgentSpec, type Page, type AgentCreateParams, type AgentRetrieveParams, type AgentUpdateParams, type AgentListParams, type AgentDeleteParams, type AgentsCursorPagination, } from "./agents/agents.mjs";
5
5
  export { BulkWorkspaceResources, type AgentEntry, type AgentScheduleEntry, type AgentVariationEntry, type BulkWorkspaceApply, type BulkWorkspaceApplyData, type BulkWorkspaceApplyInfo, type BulkWorkspaceApplyStatus, type MemoryEntryItem, type MemoryLayerEntry, type ToolEntry, type ToolSetEntry, type VariationAssignmentEntry, type VariationMemoryLayerEntry, type BulkWorkspaceResourceRetrieveParams, type BulkWorkspaceResourceListParams, type BulkWorkspaceResourceApplyParams, type BulkWorkspaceAppliesCursorPagination, } from "./bulk-workspace-resources/bulk-workspace-resources.mjs";
6
6
  export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerRetrieveParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayerDeleteParams, type MemoryLayersCursorPagination, } from "./memory-layers/memory-layers.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,GAC7B;OACM,EACL,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EACh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ACxB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,GACtC;OACM,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B;OACM,EACL,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,+BAA+B,GACrC;OACM,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B;OACM,EACL,sBAAsB,EACtB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,oCAAoC,GAC1C;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACp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,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACnC;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B;OACM,EAAE,QAAQ,EAAE,KAAK,wBAAwB,EAAE,KAAK,kBAAkB,EAAE;OACpE,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,GACtC;OACM,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC"}
@@ -1,6 +1,6 @@
1
1
  export * from "./shared.js";
2
- export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCreateParams, type APIKeyRetrieveParams, type APIKeyUpdateParams, type APIKeyListParams, type APIKeyDeleteParams, type APIKeyRotateParams, type APIKeysCursorPagination, } from "./api-keys.js";
3
- export { AccountResource, type Account, type AccountSpec, type Profile, type ProfileSpec, type RotateWebhookSigningKeyResponse, } from "./account.js";
2
+ export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCreateParams, type APIKeyUpdateParams, type APIKeyListParams, type APIKeysCursorPagination, } from "./api-keys/api-keys.js";
3
+ export { AccountResource, type Account, type AccountInfo, type AccountSpec, type Profile, type ProfileSpec, type RotateWebhookSigningKeyResponse, } from "./account.js";
4
4
  export { Agents, type Agent, type AgentInfo, type AgentSpec, type Page, type AgentCreateParams, type AgentRetrieveParams, type AgentUpdateParams, type AgentListParams, type AgentDeleteParams, type AgentsCursorPagination, } from "./agents/agents.js";
5
5
  export { BulkWorkspaceResources, type AgentEntry, type AgentScheduleEntry, type AgentVariationEntry, type BulkWorkspaceApply, type BulkWorkspaceApplyData, type BulkWorkspaceApplyInfo, type BulkWorkspaceApplyStatus, type MemoryEntryItem, type MemoryLayerEntry, type ToolEntry, type ToolSetEntry, type VariationAssignmentEntry, type VariationMemoryLayerEntry, type BulkWorkspaceResourceRetrieveParams, type BulkWorkspaceResourceListParams, type BulkWorkspaceResourceApplyParams, type BulkWorkspaceAppliesCursorPagination, } from "./bulk-workspace-resources/bulk-workspace-resources.js";
6
6
  export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerRetrieveParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayerDeleteParams, type MemoryLayersCursorPagination, } from "./memory-layers/memory-layers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,GAC7B;OACM,EACL,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,+BAA+B,GACrC;OACM,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,iBAAiB,EACtB,K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,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B;OACM,EACL,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,+BAA+B,GACrC;OACM,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B;OACM,EACL,sBAAsB,EACtB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,oCAAoC,GAC1C;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,GAClC;O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B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACnC;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B;OACM,EAAE,QAAQ,EAAE,KAAK,wBAAwB,EAAE,KAAK,kBAAkB,EAAE;OACpE,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,GACtC;OACM,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Workspaces = exports.WorkspaceSecrets = exports.Webhooks = exports.Uploads = exports.ToolSets = exports.Search = exports.Objectives = exports.Models = exports.MemoryLayers = exports.BulkWorkspaceResources = exports.Agents = exports.AccountResource = exports.APIKeys = void 0;
5
5
  const tslib_1 = require("../internal/tslib.js");
6
6
  tslib_1.__exportStar(require("./shared.js"), exports);
7
- var api_keys_1 = require("./api-keys.js");
7
+ var api_keys_1 = require("./api-keys/api-keys.js");
8
8
  Object.defineProperty(exports, "APIKeys", { enumerable: true, get: function () { return api_keys_1.APIKeys; } });
9
9
  var account_1 = require("./account.js");
10
10
  Object.defineProperty(exports, "AccountResource", { enumerable: true, get: function () { return account_1.AccountResource; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;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6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export * from "./shared.mjs";
3
- export { APIKeys, } from "./api-keys.mjs";
3
+ export { APIKeys, } from "./api-keys/api-keys.mjs";
4
4
  export { AccountResource, } from "./account.mjs";
5
5
  export { Agents, } from "./agents/agents.mjs";
6
6
  export { BulkWorkspaceResources, } from "./bulk-workspace-resources/bulk-workspace-resources.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAWR;OACM,EACL,eAAe,GAMhB;OACM,EACL,MAAM,GAWP;OACM,EACL,sBAAsB,GAkBvB;OACM,EACL,YAAY,GAUb;OACM,EACL,MAAM,GAOP;OACM,EACL,UAAU,GAwCX;OACM,EACL,MAAM,GAGP;OACM,EACL,QAAQ,GAqBT;OACM,EACL,OAAO,GAMR;OACM,EAAE,QAAQ,EAA0D;OACpE,EACL,gBAAgB,GAUjB;OACM,EACL,UAAU,GAKX"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAQR;OACM,EACL,eAAe,GAOhB;OACM,EACL,MAAM,GAWP;OACM,EACL,sBAAsB,GAkBvB;OACM,EACL,YAAY,GAUb;OACM,EACL,MAAM,GAOP;OACM,EACL,UAAU,GAwCX;OACM,EACL,MAAM,GAGP;OACM,EACL,QAAQ,GAqBT;OACM,EACL,OAAO,GAMR;OACM,EAAE,QAAQ,EAA0D;OACpE,EACL,gBAAgB,GAUjB;OACM,EACL,UAAU,GAKX"}
package/src/client.ts CHANGED
@@ -21,25 +21,13 @@ import * as API from './resources/index';
21
21
  import { APIPromise } from './core/api-promise';
22
22
  import {
23
23
  Account,
24
+ AccountInfo,
24
25
  AccountResource,
25
26
  AccountSpec,
26
27
  Profile,
27
28
  ProfileSpec,
28
29
  RotateWebhookSigningKeyResponse,
29
30
  } from './resources/account';
30
- import {
31
- APIKey,
32
- APIKeyCreateParams,
33
- APIKeyDeleteParams,
34
- APIKeyInfo,
35
- APIKeyListParams,
36
- APIKeyRetrieveParams,
37
- APIKeyRotateParams,
38
- APIKeySpec,
39
- APIKeyUpdateParams,
40
- APIKeys,
41
- APIKeysCursorPagination,
42
- } from './resources/api-keys';
43
31
  import {
44
32
  Model,
45
33
  ModelListParams,
@@ -95,6 +83,16 @@ import {
95
83
  AgentsCursorPagination,
96
84
  Page,
97
85
  } from './resources/agents/agents';
86
+ import {
87
+ APIKey,
88
+ APIKeyCreateParams,
89
+ APIKeyInfo,
90
+ APIKeyListParams,
91
+ APIKeySpec,
92
+ APIKeyUpdateParams,
93
+ APIKeys,
94
+ APIKeysCursorPagination,
95
+ } from './resources/api-keys/api-keys';
98
96
  import {
99
97
  AgentEntry,
100
98
  AgentScheduleEntry,
@@ -975,8 +973,8 @@ export class Cadenya {
975
973
  */
976
974
  toolSets: API.ToolSets = new API.ToolSets(this);
977
975
  /**
978
- * Issue, rotate, and revoke API keys for a workspace. Each API key belongs to
979
- * exactly one workspace, ensuring isolation between environments.
976
+ * Issue, rotate, and revoke API keys for the account, and grant or revoke
977
+ * each key's access to individual workspaces.
980
978
  */
981
979
  apiKeys: API.APIKeys = new API.APIKeys(this);
982
980
  workspaceSecrets: API.WorkspaceSecrets = new API.WorkspaceSecrets(this);
@@ -1020,6 +1018,7 @@ export declare namespace Cadenya {
1020
1018
  export {
1021
1019
  AccountResource as AccountResource,
1022
1020
  type Account as Account,
1021
+ type AccountInfo as AccountInfo,
1023
1022
  type AccountSpec as AccountSpec,
1024
1023
  type Profile as Profile,
1025
1024
  type ProfileSpec as ProfileSpec,
@@ -1152,11 +1151,8 @@ export declare namespace Cadenya {
1152
1151
  type APIKeySpec as APIKeySpec,
1153
1152
  type APIKeysCursorPagination as APIKeysCursorPagination,
1154
1153
  type APIKeyCreateParams as APIKeyCreateParams,
1155
- type APIKeyRetrieveParams as APIKeyRetrieveParams,
1156
1154
  type APIKeyUpdateParams as APIKeyUpdateParams,
1157
1155
  type APIKeyListParams as APIKeyListParams,
1158
- type APIKeyDeleteParams as APIKeyDeleteParams,
1159
- type APIKeyRotateParams as APIKeyRotateParams,
1160
1156
  };
1161
1157
 
1162
1158
  export {
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as Shared from './shared';
5
5
  import * as WorkspacesAPI from './workspaces';
6
+ import * as APIKeysAPI from './api-keys/api-keys';
6
7
  import { APIPromise } from '../core/api-promise';
7
8
  import { RequestOptions } from '../internal/request-options';
8
9
 
@@ -35,7 +36,7 @@ export interface Account {
35
36
  /**
36
37
  * Server-populated information about the account.
37
38
  */
38
- info: Account.Info;
39
+ info: AccountInfo;
39
40
 
40
41
  /**
41
42
  * AccountResourceMetadata is used to represent a resource that is associated to an
@@ -49,18 +50,23 @@ export interface Account {
49
50
  spec: AccountSpec;
50
51
  }
51
52
 
52
- export namespace Account {
53
+ /**
54
+ * Server-populated information about the account.
55
+ */
56
+ export interface AccountInfo {
53
57
  /**
54
- * Server-populated information about the account.
58
+ * An API key for the account. Use workspace-association RPCs to grant the key
59
+ * access to specific workspaces; a key with zero workspaces is valid but cannot
60
+ * access workspace-scoped resources.
55
61
  */
56
- export interface Info {
57
- /**
58
- * The generated secret that will sign all webhooks that are sent to your
59
- * configured Webhook URL. Formatted as "wh_asdf1234" per the
60
- * https://www.standardwebhooks.com/ format.
61
- */
62
- webhookEventsHmacSecret?: string;
63
- }
62
+ globalApiKey?: APIKeysAPI.APIKey;
63
+
64
+ /**
65
+ * The generated secret that will sign all webhooks that are sent to your
66
+ * configured Webhook URL. Formatted as "wh_asdf1234" per the
67
+ * https://www.standardwebhooks.com/ format.
68
+ */
69
+ webhookEventsHmacSecret?: string;
64
70
  }
65
71
 
66
72
  /**
@@ -125,6 +131,7 @@ export interface RotateWebhookSigningKeyResponse {
125
131
  export declare namespace AccountResource {
126
132
  export {
127
133
  type Account as Account,
134
+ type AccountInfo as AccountInfo,
128
135
  type AccountSpec as AccountSpec,
129
136
  type Profile as Profile,
130
137
  type ProfileSpec as ProfileSpec,
@@ -0,0 +1,79 @@
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 APIKeysAPI from './api-keys';
7
+ import { APIPromise } from '../../core/api-promise';
8
+ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
9
+ import { buildHeaders } from '../../internal/headers';
10
+ import { RequestOptions } from '../../internal/request-options';
11
+ import { path } from '../../internal/utils/path';
12
+
13
+ /**
14
+ * Issue, rotate, and revoke API keys for the account, and grant or revoke
15
+ * each key's access to individual workspaces.
16
+ */
17
+ export class Access extends APIResource {
18
+ /**
19
+ * Lists the workspaces this API key has access to. Cursor-paginated.
20
+ */
21
+ list(
22
+ id: string,
23
+ query: AccessListParams | null | undefined = {},
24
+ options?: RequestOptions,
25
+ ): PagePromise<WorkspacesCursorPagination, WorkspacesAPI.Workspace> {
26
+ return this._client.getAPIList(
27
+ path`/v1/account/api_keys/${id}/workspaces`,
28
+ CursorPagination<WorkspacesAPI.Workspace>,
29
+ { query, ...options },
30
+ );
31
+ }
32
+
33
+ /**
34
+ * Grants this API key access to the specified workspace. Idempotent — adding an
35
+ * already-associated workspace is a no-op. Returns the updated API key with
36
+ * refreshed workspace preview and total.
37
+ */
38
+ add(id: string, body: AccessAddParams, options?: RequestOptions): APIPromise<APIKeysAPI.APIKey> {
39
+ return this._client.post(path`/v1/account/api_keys/${id}/workspaces`, { body, ...options });
40
+ }
41
+
42
+ /**
43
+ * Revokes this API key's access to the specified workspace. Idempotent. A key may
44
+ * have zero workspaces and remains valid.
45
+ */
46
+ remove(workspaceID: string, params: AccessRemoveParams, options?: RequestOptions): APIPromise<void> {
47
+ const { id } = params;
48
+ return this._client.delete(path`/v1/account/api_keys/${id}/workspaces/${workspaceID}`, {
49
+ ...options,
50
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
51
+ });
52
+ }
53
+ }
54
+
55
+ export interface AccessListParams extends CursorPaginationParams {}
56
+
57
+ export interface AccessAddParams {
58
+ /**
59
+ * The workspace to grant access to.
60
+ */
61
+ workspaceId?: string;
62
+ }
63
+
64
+ export interface AccessRemoveParams {
65
+ /**
66
+ * The API key losing workspace access (path).
67
+ */
68
+ id: string;
69
+ }
70
+
71
+ export declare namespace Access {
72
+ export {
73
+ type AccessListParams as AccessListParams,
74
+ type AccessAddParams as AccessAddParams,
75
+ type AccessRemoveParams as AccessRemoveParams,
76
+ };
77
+ }
78
+
79
+ export { type WorkspacesCursorPagination };