@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.
- package/CHANGELOG.md +8 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +17 -12
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +17 -12
- 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 +47 -0
- package/resources/api-keys/access.d.mts.map +1 -0
- package/resources/api-keys/access.d.ts +47 -0
- package/resources/api-keys/access.d.ts.map +1 -0
- package/resources/api-keys/access.js +41 -0
- package/resources/api-keys/access.js.map +1 -0
- package/resources/api-keys/access.mjs +37 -0
- package/resources/api-keys/access.mjs.map +1 -0
- package/resources/api-keys/api-keys.d.mts +213 -0
- package/resources/api-keys/api-keys.d.mts.map +1 -0
- package/resources/api-keys/api-keys.d.ts +213 -0
- package/resources/api-keys/api-keys.d.ts.map +1 -0
- package/resources/api-keys/api-keys.js +65 -0
- package/resources/api-keys/api-keys.js.map +1 -0
- package/resources/api-keys/api-keys.mjs +60 -0
- package/resources/api-keys/api-keys.mjs.map +1 -0
- package/resources/api-keys/index.d.mts +3 -0
- package/resources/api-keys/index.d.mts.map +1 -0
- package/resources/api-keys/index.d.ts +3 -0
- package/resources/api-keys/index.d.ts.map +1 -0
- package/resources/api-keys/index.js +9 -0
- package/resources/api-keys/index.js.map +1 -0
- package/resources/api-keys/index.mjs +4 -0
- package/resources/api-keys/index.mjs.map +1 -0
- package/resources/api-keys.d.mts +1 -151
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +1 -151
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +2 -59
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +1 -57
- package/resources/api-keys.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +14 -18
- package/src/resources/account.ts +18 -11
- package/src/resources/api-keys/access.ts +79 -0
- package/src/resources/api-keys/api-keys.ts +282 -0
- package/src/resources/api-keys/index.ts +13 -0
- package/src/resources/api-keys.ts +1 -218
- package/src/resources/index.ts +2 -4
- 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/api-keys.d.ts
CHANGED
|
@@ -1,152 +1,2 @@
|
|
|
1
|
-
|
|
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.ts","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":""}
|
package/resources/api-keys.js
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
|
package/resources/api-keys.mjs
CHANGED
|
@@ -1,59 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
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
|
|
1
|
+
{"version":3,"file":"api-keys.mjs","sourceRoot":"","sources":["../src/resources/api-keys.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./shared.mjs";
|
|
2
|
-
export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCreateParams, type
|
|
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,
|
|
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,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./shared.js";
|
|
2
|
-
export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCreateParams, type
|
|
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";
|
package/resources/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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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,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"}
|
package/resources/index.js
CHANGED
|
@@ -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; } });
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,mDAS6B;AAR3B,mGAAA,OAAO,OAAA;AAST,wCAQmB;AAPjB,0GAAA,eAAe,OAAA;AAQjB,6CAYyB;AAXvB,gGAAA,MAAM,OAAA;AAYR,mGAmB6D;AAlB3D,kIAAA,sBAAsB,OAAA;AAmBxB,kEAWuC;AAVrC,6GAAA,YAAY,OAAA;AAWd,sCAQkB;AAPhB,gGAAA,MAAM,OAAA;AAQR,yDAyCiC;AAxC/B,wGAAA,UAAU,OAAA;AAyCZ,sCAIkB;AAHhB,gGAAA,MAAM,OAAA;AAIR,sDAsB+B;AArB7B,qGAAA,QAAQ,OAAA;AAsBV,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,0CAA8F;AAArF,oGAAA,QAAQ,OAAA;AACjB,4DAW6B;AAV3B,qHAAA,gBAAgB,OAAA;AAWlB,8CAMsB;AALpB,wGAAA,UAAU,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,6 +1,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";
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,
|
|
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
|
|
979
|
-
*
|
|
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 {
|
package/src/resources/account.ts
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Server-populated information about the account.
|
|
55
|
+
*/
|
|
56
|
+
export interface AccountInfo {
|
|
53
57
|
/**
|
|
54
|
-
*
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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 };
|