@cadenya/cadenya 0.124.0 → 0.126.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 +17 -0
- package/README.md +18 -7
- 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 +7 -3
- package/client.js.map +1 -1
- package/client.mjs +7 -3
- package/client.mjs.map +1 -1
- package/internal/request-options.d.mts +1 -1
- package/internal/request-options.d.ts +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +115 -28
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +115 -28
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +93 -13
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +93 -13
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/feedback.d.mts +13 -2
- package/resources/agents/feedback.d.mts.map +1 -1
- package/resources/agents/feedback.d.ts +13 -2
- package/resources/agents/feedback.d.ts.map +1 -1
- package/resources/agents/feedback.js +13 -2
- package/resources/agents/feedback.js.map +1 -1
- package/resources/agents/feedback.mjs +13 -2
- package/resources/agents/feedback.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/schedules.d.mts +100 -52
- package/resources/agents/schedules.d.mts.map +1 -1
- package/resources/agents/schedules.d.ts +100 -52
- package/resources/agents/schedules.d.ts.map +1 -1
- package/resources/agents/schedules.js +99 -21
- package/resources/agents/schedules.js.map +1 -1
- package/resources/agents/schedules.mjs +99 -21
- package/resources/agents/schedules.mjs.map +1 -1
- package/resources/agents/variations.d.mts +252 -105
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +252 -105
- package/resources/agents/variations.d.ts.map +1 -1
- package/resources/agents/variations.js +138 -27
- package/resources/agents/variations.js.map +1 -1
- package/resources/agents/variations.mjs +138 -27
- package/resources/agents/variations.mjs.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +13 -2
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +13 -2
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/agents/webhook-deliveries.js +13 -2
- package/resources/agents/webhook-deliveries.js.map +1 -1
- package/resources/agents/webhook-deliveries.mjs +13 -2
- package/resources/agents/webhook-deliveries.mjs.map +1 -1
- package/resources/ai-provider-keys.d.mts +125 -110
- package/resources/ai-provider-keys.d.mts.map +1 -1
- package/resources/ai-provider-keys.d.ts +125 -110
- package/resources/ai-provider-keys.d.ts.map +1 -1
- package/resources/ai-provider-keys.js +11 -9
- package/resources/ai-provider-keys.js.map +1 -1
- package/resources/ai-provider-keys.mjs +11 -9
- package/resources/ai-provider-keys.mjs.map +1 -1
- package/resources/api-keys.d.mts +28 -20
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +28 -20
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +14 -12
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +14 -12
- package/resources/api-keys.mjs.map +1 -1
- package/resources/index.d.mts +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/memory-layers/entries.d.mts +27 -30
- package/resources/memory-layers/entries.d.mts.map +1 -1
- package/resources/memory-layers/entries.d.ts +27 -30
- package/resources/memory-layers/entries.d.ts.map +1 -1
- package/resources/memory-layers/entries.js +12 -12
- package/resources/memory-layers/entries.js.map +1 -1
- package/resources/memory-layers/entries.mjs +12 -12
- package/resources/memory-layers/entries.mjs.map +1 -1
- package/resources/memory-layers/index.d.mts +1 -1
- package/resources/memory-layers/index.d.mts.map +1 -1
- package/resources/memory-layers/index.d.ts +1 -1
- package/resources/memory-layers/index.d.ts.map +1 -1
- package/resources/memory-layers/index.js.map +1 -1
- package/resources/memory-layers/index.mjs.map +1 -1
- package/resources/memory-layers/memory-layers.d.mts +34 -22
- package/resources/memory-layers/memory-layers.d.mts.map +1 -1
- package/resources/memory-layers/memory-layers.d.ts +34 -22
- package/resources/memory-layers/memory-layers.d.ts.map +1 -1
- package/resources/memory-layers/memory-layers.js +11 -9
- package/resources/memory-layers/memory-layers.js.map +1 -1
- package/resources/memory-layers/memory-layers.mjs +11 -9
- package/resources/memory-layers/memory-layers.mjs.map +1 -1
- package/resources/models.d.mts +32 -24
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +32 -24
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +10 -8
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +10 -8
- package/resources/models.mjs.map +1 -1
- package/resources/objectives/feedback.d.mts +27 -3
- package/resources/objectives/feedback.d.mts.map +1 -1
- package/resources/objectives/feedback.d.ts +27 -3
- package/resources/objectives/feedback.d.ts.map +1 -1
- package/resources/objectives/feedback.js +27 -3
- package/resources/objectives/feedback.js.map +1 -1
- package/resources/objectives/feedback.mjs +27 -3
- package/resources/objectives/feedback.mjs.map +1 -1
- package/resources/objectives/index.d.mts +2 -2
- package/resources/objectives/index.d.mts.map +1 -1
- package/resources/objectives/index.d.ts +2 -2
- package/resources/objectives/index.d.ts.map +1 -1
- package/resources/objectives/index.js.map +1 -1
- package/resources/objectives/index.mjs.map +1 -1
- package/resources/objectives/objectives.d.mts +273 -102
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +273 -102
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +112 -17
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +112 -17
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tasks.d.mts +25 -8
- package/resources/objectives/tasks.d.mts.map +1 -1
- package/resources/objectives/tasks.d.ts +25 -8
- package/resources/objectives/tasks.d.ts.map +1 -1
- package/resources/objectives/tasks.js +26 -5
- package/resources/objectives/tasks.js.map +1 -1
- package/resources/objectives/tasks.mjs +26 -5
- package/resources/objectives/tasks.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +99 -42
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +99 -42
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tool-calls.js +73 -14
- package/resources/objectives/tool-calls.js.map +1 -1
- package/resources/objectives/tool-calls.mjs +73 -14
- package/resources/objectives/tool-calls.mjs.map +1 -1
- package/resources/objectives/tools.d.mts +13 -2
- package/resources/objectives/tools.d.mts.map +1 -1
- package/resources/objectives/tools.d.ts +13 -2
- package/resources/objectives/tools.d.ts.map +1 -1
- package/resources/objectives/tools.js +13 -2
- package/resources/objectives/tools.js.map +1 -1
- package/resources/objectives/tools.mjs +13 -2
- package/resources/objectives/tools.mjs.map +1 -1
- package/resources/search.d.mts +11 -2
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +11 -2
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +3 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +3 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tool-sets/index.d.mts +2 -2
- package/resources/tool-sets/index.d.mts.map +1 -1
- package/resources/tool-sets/index.d.ts +2 -2
- package/resources/tool-sets/index.d.ts.map +1 -1
- package/resources/tool-sets/index.js.map +1 -1
- package/resources/tool-sets/index.mjs.map +1 -1
- package/resources/tool-sets/secrets.d.mts +9 -24
- package/resources/tool-sets/secrets.d.mts.map +1 -1
- package/resources/tool-sets/secrets.d.ts +9 -24
- package/resources/tool-sets/secrets.d.ts.map +1 -1
- package/resources/tool-sets/secrets.js +12 -12
- package/resources/tool-sets/secrets.js.map +1 -1
- package/resources/tool-sets/secrets.mjs +12 -12
- package/resources/tool-sets/secrets.mjs.map +1 -1
- package/resources/tool-sets/tool-sets.d.mts +149 -64
- package/resources/tool-sets/tool-sets.d.mts.map +1 -1
- package/resources/tool-sets/tool-sets.d.ts +149 -64
- package/resources/tool-sets/tool-sets.d.ts.map +1 -1
- package/resources/tool-sets/tool-sets.js +17 -15
- package/resources/tool-sets/tool-sets.js.map +1 -1
- package/resources/tool-sets/tool-sets.mjs +17 -15
- package/resources/tool-sets/tool-sets.mjs.map +1 -1
- package/resources/tool-sets/tools.d.mts +33 -43
- package/resources/tool-sets/tools.d.mts.map +1 -1
- package/resources/tool-sets/tools.d.ts +33 -43
- package/resources/tool-sets/tools.d.ts.map +1 -1
- package/resources/tool-sets/tools.js +18 -18
- package/resources/tool-sets/tools.js.map +1 -1
- package/resources/tool-sets/tools.mjs +18 -18
- package/resources/tool-sets/tools.mjs.map +1 -1
- package/resources/uploads.d.mts +14 -6
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +14 -6
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +5 -4
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +5 -4
- package/resources/uploads.mjs.map +1 -1
- package/resources/workspace-admin/index.d.mts +1 -1
- package/resources/workspace-admin/index.d.mts.map +1 -1
- package/resources/workspace-admin/index.d.ts +1 -1
- package/resources/workspace-admin/index.d.ts.map +1 -1
- package/resources/workspace-admin/index.js.map +1 -1
- package/resources/workspace-admin/index.mjs.map +1 -1
- package/resources/workspace-admin/members.d.mts +41 -6
- package/resources/workspace-admin/members.d.mts.map +1 -1
- package/resources/workspace-admin/members.d.ts +41 -6
- package/resources/workspace-admin/members.d.ts.map +1 -1
- package/resources/workspace-admin/members.js +34 -6
- package/resources/workspace-admin/members.js.map +1 -1
- package/resources/workspace-admin/members.mjs +34 -6
- package/resources/workspace-admin/members.mjs.map +1 -1
- package/resources/workspace-admin/profiles.d.mts +8 -0
- package/resources/workspace-admin/profiles.d.mts.map +1 -1
- package/resources/workspace-admin/profiles.d.ts +8 -0
- package/resources/workspace-admin/profiles.d.ts.map +1 -1
- package/resources/workspace-admin/profiles.js +8 -0
- package/resources/workspace-admin/profiles.js.map +1 -1
- package/resources/workspace-admin/profiles.mjs +8 -0
- package/resources/workspace-admin/profiles.mjs.map +1 -1
- package/resources/workspace-admin/workspace-admin.d.mts +65 -9
- package/resources/workspace-admin/workspace-admin.d.mts.map +1 -1
- package/resources/workspace-admin/workspace-admin.d.ts +65 -9
- package/resources/workspace-admin/workspace-admin.d.ts.map +1 -1
- package/resources/workspace-admin/workspace-admin.js +46 -6
- package/resources/workspace-admin/workspace-admin.js.map +1 -1
- package/resources/workspace-admin/workspace-admin.mjs +46 -6
- package/resources/workspace-admin/workspace-admin.mjs.map +1 -1
- package/resources/workspace-secrets.d.mts +27 -15
- package/resources/workspace-secrets.d.mts.map +1 -1
- package/resources/workspace-secrets.d.ts +27 -15
- package/resources/workspace-secrets.d.ts.map +1 -1
- package/resources/workspace-secrets.js +11 -9
- package/resources/workspace-secrets.js.map +1 -1
- package/resources/workspace-secrets.mjs +11 -9
- package/resources/workspace-secrets.mjs.map +1 -1
- package/src/client.ts +102 -5
- package/src/internal/request-options.ts +1 -1
- package/src/resources/agents/agents.ts +147 -37
- package/src/resources/agents/feedback.ts +14 -3
- package/src/resources/agents/index.ts +6 -0
- package/src/resources/agents/schedules.ts +143 -71
- package/src/resources/agents/variations.ts +319 -125
- package/src/resources/agents/webhook-deliveries.ts +14 -3
- package/src/resources/ai-provider-keys.ts +155 -127
- package/src/resources/api-keys.ts +48 -29
- package/src/resources/index.ts +44 -1
- package/src/resources/memory-layers/entries.ts +56 -40
- package/src/resources/memory-layers/index.ts +2 -0
- package/src/resources/memory-layers/memory-layers.ts +53 -30
- package/src/resources/models.ts +46 -31
- package/src/resources/objectives/feedback.ts +29 -5
- package/src/resources/objectives/index.ts +26 -0
- package/src/resources/objectives/objectives.ts +373 -125
- package/src/resources/objectives/tasks.ts +33 -12
- package/src/resources/objectives/tool-calls.ts +123 -46
- package/src/resources/objectives/tools.ts +14 -3
- package/src/resources/search.ts +14 -4
- package/src/resources/tool-sets/index.ts +23 -3
- package/src/resources/tool-sets/secrets.ts +32 -35
- package/src/resources/tool-sets/tool-sets.ts +239 -79
- package/src/resources/tool-sets/tools.ts +79 -61
- package/src/resources/uploads.ts +22 -8
- package/src/resources/workspace-admin/index.ts +2 -0
- package/src/resources/workspace-admin/members.ts +53 -12
- package/src/resources/workspace-admin/profiles.ts +8 -0
- package/src/resources/workspace-admin/workspace-admin.ts +80 -11
- package/src/resources/workspace-secrets.ts +40 -25
- 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
|
@@ -7,11 +7,11 @@ export declare class AIProviderKeys extends APIResource {
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates a new customer-provided AI provider key in the workspace
|
|
9
9
|
*/
|
|
10
|
-
create(
|
|
10
|
+
create(params: AIProviderKeyCreateParams, options?: RequestOptions): APIPromise<AIProviderKey>;
|
|
11
11
|
/**
|
|
12
12
|
* Retrieves an AI provider key by ID from the workspace
|
|
13
13
|
*/
|
|
14
|
-
retrieve(id: string, params
|
|
14
|
+
retrieve(id: string, params?: AIProviderKeyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<AIProviderKey>;
|
|
15
15
|
/**
|
|
16
16
|
* Updates an AI provider key's name or key value in the workspace
|
|
17
17
|
*/
|
|
@@ -19,13 +19,106 @@ export declare class AIProviderKeys extends APIResource {
|
|
|
19
19
|
/**
|
|
20
20
|
* Lists all customer-provided AI provider keys in the workspace
|
|
21
21
|
*/
|
|
22
|
-
list(
|
|
22
|
+
list(params?: AIProviderKeyListParams | null | undefined, options?: RequestOptions): PagePromise<AIProviderKeysCursorPagination, AIProviderKey>;
|
|
23
23
|
/**
|
|
24
24
|
* Deletes an AI provider key from the workspace
|
|
25
25
|
*/
|
|
26
|
-
delete(id: string, params
|
|
26
|
+
delete(id: string, params?: AIProviderKeyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
27
27
|
}
|
|
28
28
|
export type AIProviderKeysCursorPagination = CursorPagination<AIProviderKey>;
|
|
29
|
+
export interface AIProviderConfigOpenAI {
|
|
30
|
+
/**
|
|
31
|
+
* OpenAIConfig holds OpenAI-specific settings.
|
|
32
|
+
*/
|
|
33
|
+
openai: AIProviderConfigOpenAI.OpenAI;
|
|
34
|
+
type: 'openai';
|
|
35
|
+
}
|
|
36
|
+
export declare namespace AIProviderConfigOpenAI {
|
|
37
|
+
/**
|
|
38
|
+
* OpenAIConfig holds OpenAI-specific settings.
|
|
39
|
+
*/
|
|
40
|
+
interface OpenAI {
|
|
41
|
+
/**
|
|
42
|
+
* Sent as the OpenAI-Organization header when set.
|
|
43
|
+
*/
|
|
44
|
+
organizationId?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Sent as the OpenAI-Project header when set.
|
|
47
|
+
*/
|
|
48
|
+
projectId?: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export interface AIProviderConfigOpenAICompatible {
|
|
52
|
+
/**
|
|
53
|
+
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
54
|
+
* Completions API. The base URL is required and its model catalog is discovered
|
|
55
|
+
* live via GET {base_url}/models.
|
|
56
|
+
*/
|
|
57
|
+
openaiCompatible: AIProviderConfigOpenAICompatible.OpenAICompatible;
|
|
58
|
+
type: 'openaiCompatible';
|
|
59
|
+
}
|
|
60
|
+
export declare namespace AIProviderConfigOpenAICompatible {
|
|
61
|
+
/**
|
|
62
|
+
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
63
|
+
* Completions API. The base URL is required and its model catalog is discovered
|
|
64
|
+
* live via GET {base_url}/models.
|
|
65
|
+
*/
|
|
66
|
+
interface OpenAICompatible {
|
|
67
|
+
baseUrl: string;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export interface AIProviderConfigOpenrouter {
|
|
71
|
+
/**
|
|
72
|
+
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
73
|
+
*/
|
|
74
|
+
openrouter: AIProviderConfigOpenrouter.Openrouter;
|
|
75
|
+
type: 'openrouter';
|
|
76
|
+
}
|
|
77
|
+
export declare namespace AIProviderConfigOpenrouter {
|
|
78
|
+
/**
|
|
79
|
+
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
80
|
+
*/
|
|
81
|
+
interface Openrouter {
|
|
82
|
+
/**
|
|
83
|
+
* Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
|
|
84
|
+
*/
|
|
85
|
+
region?: string;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export interface AIProviderCredentialAPIKey {
|
|
89
|
+
/**
|
|
90
|
+
* CredentialAPIKey carries a single bearer/header API key.
|
|
91
|
+
*/
|
|
92
|
+
apiKey: AIProviderCredentialAPIKey.APIKey;
|
|
93
|
+
type: 'apiKey';
|
|
94
|
+
}
|
|
95
|
+
export declare namespace AIProviderCredentialAPIKey {
|
|
96
|
+
/**
|
|
97
|
+
* CredentialAPIKey carries a single bearer/header API key.
|
|
98
|
+
*/
|
|
99
|
+
interface APIKey {
|
|
100
|
+
apiKey?: string;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export interface AIProviderCredentialHeaders {
|
|
104
|
+
/**
|
|
105
|
+
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
106
|
+
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
107
|
+
*/
|
|
108
|
+
headers: AIProviderCredentialHeaders.Headers;
|
|
109
|
+
type: 'headers';
|
|
110
|
+
}
|
|
111
|
+
export declare namespace AIProviderCredentialHeaders {
|
|
112
|
+
/**
|
|
113
|
+
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
114
|
+
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
115
|
+
*/
|
|
116
|
+
interface Headers {
|
|
117
|
+
headers?: {
|
|
118
|
+
[key: string]: string;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
29
122
|
/**
|
|
30
123
|
* AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
|
|
31
124
|
* keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
|
|
@@ -73,128 +166,46 @@ export interface AIProviderKeySpec {
|
|
|
73
166
|
* intentionally not overridable here; use the OpenAI-compatible provider to target
|
|
74
167
|
* a custom endpoint.
|
|
75
168
|
*/
|
|
76
|
-
config?:
|
|
169
|
+
config?: AIProviderConfigOpenrouter | AIProviderConfigOpenAI | AIProviderConfigOpenAICompatible;
|
|
77
170
|
/**
|
|
78
171
|
* AIProviderCredential is the secret material used to authenticate with a
|
|
79
172
|
* provider. The set case must correspond to AIProviderKeySpec.provider. The server
|
|
80
173
|
* encrypts the serialized message at rest and never returns it on reads.
|
|
81
174
|
*/
|
|
82
|
-
credentials?:
|
|
175
|
+
credentials?: AIProviderCredentialAPIKey | AIProviderCredentialHeaders;
|
|
83
176
|
/**
|
|
84
177
|
* The AI provider this key authenticates against.
|
|
85
178
|
*/
|
|
86
179
|
provider?: 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE';
|
|
87
180
|
}
|
|
88
|
-
export
|
|
181
|
+
export interface AIProviderKeyCreateParams {
|
|
89
182
|
/**
|
|
90
|
-
*
|
|
91
|
-
* correspond to AIProviderKeySpec.provider. Providers with no settings (Anthropic,
|
|
92
|
-
* Gemini) simply leave this unset. The endpoint of a named provider is fixed and
|
|
93
|
-
* intentionally not overridable here; use the OpenAI-compatible provider to target
|
|
94
|
-
* a custom endpoint.
|
|
183
|
+
* Path param: The workspace that will own this key.
|
|
95
184
|
*/
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* OpenAIConfig holds OpenAI-specific settings.
|
|
99
|
-
*/
|
|
100
|
-
openai?: Config.OpenAI;
|
|
101
|
-
/**
|
|
102
|
-
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
103
|
-
* Completions API. The base URL is required and its model catalog is discovered
|
|
104
|
-
* live via GET {base_url}/models.
|
|
105
|
-
*/
|
|
106
|
-
openaiCompatible?: Config.OpenAICompatible;
|
|
107
|
-
/**
|
|
108
|
-
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
109
|
-
*/
|
|
110
|
-
openrouter?: Config.Openrouter;
|
|
111
|
-
}
|
|
112
|
-
namespace Config {
|
|
113
|
-
/**
|
|
114
|
-
* OpenAIConfig holds OpenAI-specific settings.
|
|
115
|
-
*/
|
|
116
|
-
interface OpenAI {
|
|
117
|
-
/**
|
|
118
|
-
* Sent as the OpenAI-Organization header when set.
|
|
119
|
-
*/
|
|
120
|
-
organizationId?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Sent as the OpenAI-Project header when set.
|
|
123
|
-
*/
|
|
124
|
-
projectId?: string;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
128
|
-
* Completions API. The base URL is required and its model catalog is discovered
|
|
129
|
-
* live via GET {base_url}/models.
|
|
130
|
-
*/
|
|
131
|
-
interface OpenAICompatible {
|
|
132
|
-
baseUrl?: string;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
136
|
-
*/
|
|
137
|
-
interface Openrouter {
|
|
138
|
-
/**
|
|
139
|
-
* Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
|
|
140
|
-
*/
|
|
141
|
-
region?: string;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
185
|
+
workspaceId?: string;
|
|
144
186
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
187
|
+
* Body param: CreateResourceMetadata contains the user-provided fields for
|
|
188
|
+
* creating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
189
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
190
|
+
* server.
|
|
148
191
|
*/
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* CredentialAPIKey carries a single bearer/header API key.
|
|
152
|
-
*/
|
|
153
|
-
apiKey?: Credentials.APIKey;
|
|
154
|
-
/**
|
|
155
|
-
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
156
|
-
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
157
|
-
*/
|
|
158
|
-
headers?: Credentials.Headers;
|
|
159
|
-
}
|
|
160
|
-
namespace Credentials {
|
|
161
|
-
/**
|
|
162
|
-
* CredentialAPIKey carries a single bearer/header API key.
|
|
163
|
-
*/
|
|
164
|
-
interface APIKey {
|
|
165
|
-
apiKey?: string;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
169
|
-
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
170
|
-
*/
|
|
171
|
-
interface Headers {
|
|
172
|
-
headers?: {
|
|
173
|
-
[key: string]: string;
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
export interface AIProviderKeyCreateParams {
|
|
192
|
+
metadata: Shared.CreateResourceMetadata;
|
|
179
193
|
/**
|
|
180
|
-
*
|
|
181
|
-
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
182
|
-
* profile_id, created_at) are excluded since they are set by the server.
|
|
194
|
+
* Body param
|
|
183
195
|
*/
|
|
184
|
-
metadata: Shared.CreateResourceMetadata;
|
|
185
196
|
spec: AIProviderKeySpec;
|
|
186
197
|
}
|
|
187
198
|
export interface AIProviderKeyRetrieveParams {
|
|
188
199
|
/**
|
|
189
200
|
* The workspace the key belongs to.
|
|
190
201
|
*/
|
|
191
|
-
workspaceId
|
|
202
|
+
workspaceId?: string;
|
|
192
203
|
}
|
|
193
204
|
export interface AIProviderKeyUpdateParams {
|
|
194
205
|
/**
|
|
195
206
|
* Path param: The workspace the key belongs to.
|
|
196
207
|
*/
|
|
197
|
-
workspaceId
|
|
208
|
+
workspaceId?: string;
|
|
198
209
|
/**
|
|
199
210
|
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
200
211
|
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
@@ -213,32 +224,36 @@ export interface AIProviderKeyUpdateParams {
|
|
|
213
224
|
}
|
|
214
225
|
export interface AIProviderKeyListParams extends CursorPaginationParams {
|
|
215
226
|
/**
|
|
216
|
-
*
|
|
217
|
-
|
|
227
|
+
* Path param: The workspace whose keys will be listed.
|
|
228
|
+
*/
|
|
229
|
+
workspaceId?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Query param: When true, populate each item's info (model counts), at the cost of
|
|
232
|
+
* extra lookups.
|
|
218
233
|
*/
|
|
219
234
|
includeInfo?: boolean;
|
|
220
235
|
/**
|
|
221
|
-
* Filters by metadata labels. Comma-separated key=value pairs, e.g.
|
|
236
|
+
* Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
|
|
222
237
|
* "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
|
|
223
238
|
* semantics).
|
|
224
239
|
*/
|
|
225
240
|
labels?: string;
|
|
226
241
|
/**
|
|
227
|
-
* Filter expression (query param: prefix)
|
|
242
|
+
* Query param: Filter expression (query param: prefix)
|
|
228
243
|
*/
|
|
229
244
|
prefix?: string;
|
|
230
245
|
/**
|
|
231
|
-
* When true, return only promotional keys (provided by Cadenya, e.g.
|
|
232
|
-
* onboarding). Defaults to returning all keys, customer-provided and
|
|
233
|
-
* alike.
|
|
246
|
+
* Query param: When true, return only promotional keys (provided by Cadenya, e.g.
|
|
247
|
+
* for onboarding). Defaults to returning all keys, customer-provided and
|
|
248
|
+
* promotional alike.
|
|
234
249
|
*/
|
|
235
250
|
promotional?: boolean;
|
|
236
251
|
/**
|
|
237
|
-
* Free-form search query
|
|
252
|
+
* Query param: Free-form search query
|
|
238
253
|
*/
|
|
239
254
|
query?: string;
|
|
240
255
|
/**
|
|
241
|
-
* Sort order for results (asc or desc by creation time)
|
|
256
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
242
257
|
*/
|
|
243
258
|
sortOrder?: string;
|
|
244
259
|
}
|
|
@@ -246,9 +261,9 @@ export interface AIProviderKeyDeleteParams {
|
|
|
246
261
|
/**
|
|
247
262
|
* The workspace the key belongs to.
|
|
248
263
|
*/
|
|
249
|
-
workspaceId
|
|
264
|
+
workspaceId?: string;
|
|
250
265
|
}
|
|
251
266
|
export declare namespace AIProviderKeys {
|
|
252
|
-
export { type AIProviderKey as AIProviderKey, type AIProviderKeySpec as AIProviderKeySpec, type AIProviderKeysCursorPagination as AIProviderKeysCursorPagination, type AIProviderKeyCreateParams as AIProviderKeyCreateParams, type AIProviderKeyRetrieveParams as AIProviderKeyRetrieveParams, type AIProviderKeyUpdateParams as AIProviderKeyUpdateParams, type AIProviderKeyListParams as AIProviderKeyListParams, type AIProviderKeyDeleteParams as AIProviderKeyDeleteParams, };
|
|
267
|
+
export { type AIProviderConfigOpenAI as AIProviderConfigOpenAI, type AIProviderConfigOpenAICompatible as AIProviderConfigOpenAICompatible, type AIProviderConfigOpenrouter as AIProviderConfigOpenrouter, type AIProviderCredentialAPIKey as AIProviderCredentialAPIKey, type AIProviderCredentialHeaders as AIProviderCredentialHeaders, type AIProviderKey as AIProviderKey, type AIProviderKeySpec as AIProviderKeySpec, type AIProviderKeysCursorPagination as AIProviderKeysCursorPagination, type AIProviderKeyCreateParams as AIProviderKeyCreateParams, type AIProviderKeyRetrieveParams as AIProviderKeyRetrieveParams, type AIProviderKeyUpdateParams as AIProviderKeyUpdateParams, type AIProviderKeyListParams as AIProviderKeyListParams, type AIProviderKeyDeleteParams as AIProviderKeyDeleteParams, };
|
|
253
268
|
}
|
|
254
269
|
//# sourceMappingURL=ai-provider-keys.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-provider-keys.d.mts","sourceRoot":"","sources":["../src/resources/ai-provider-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,+BAA2B;AAEhG,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,
|
|
1
|
+
{"version":3,"file":"ai-provider-keys.d.mts","sourceRoot":"","sources":["../src/resources/ai-provider-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE,+BAA2B;AAEhG,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAK9F;;OAEG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,2BAA2B,GAAG,IAAI,GAAG,SAAc,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAK5B;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,yB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,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -7,11 +7,11 @@ export declare class AIProviderKeys extends APIResource {
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates a new customer-provided AI provider key in the workspace
|
|
9
9
|
*/
|
|
10
|
-
create(
|
|
10
|
+
create(params: AIProviderKeyCreateParams, options?: RequestOptions): APIPromise<AIProviderKey>;
|
|
11
11
|
/**
|
|
12
12
|
* Retrieves an AI provider key by ID from the workspace
|
|
13
13
|
*/
|
|
14
|
-
retrieve(id: string, params
|
|
14
|
+
retrieve(id: string, params?: AIProviderKeyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<AIProviderKey>;
|
|
15
15
|
/**
|
|
16
16
|
* Updates an AI provider key's name or key value in the workspace
|
|
17
17
|
*/
|
|
@@ -19,13 +19,106 @@ export declare class AIProviderKeys extends APIResource {
|
|
|
19
19
|
/**
|
|
20
20
|
* Lists all customer-provided AI provider keys in the workspace
|
|
21
21
|
*/
|
|
22
|
-
list(
|
|
22
|
+
list(params?: AIProviderKeyListParams | null | undefined, options?: RequestOptions): PagePromise<AIProviderKeysCursorPagination, AIProviderKey>;
|
|
23
23
|
/**
|
|
24
24
|
* Deletes an AI provider key from the workspace
|
|
25
25
|
*/
|
|
26
|
-
delete(id: string, params
|
|
26
|
+
delete(id: string, params?: AIProviderKeyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
27
27
|
}
|
|
28
28
|
export type AIProviderKeysCursorPagination = CursorPagination<AIProviderKey>;
|
|
29
|
+
export interface AIProviderConfigOpenAI {
|
|
30
|
+
/**
|
|
31
|
+
* OpenAIConfig holds OpenAI-specific settings.
|
|
32
|
+
*/
|
|
33
|
+
openai: AIProviderConfigOpenAI.OpenAI;
|
|
34
|
+
type: 'openai';
|
|
35
|
+
}
|
|
36
|
+
export declare namespace AIProviderConfigOpenAI {
|
|
37
|
+
/**
|
|
38
|
+
* OpenAIConfig holds OpenAI-specific settings.
|
|
39
|
+
*/
|
|
40
|
+
interface OpenAI {
|
|
41
|
+
/**
|
|
42
|
+
* Sent as the OpenAI-Organization header when set.
|
|
43
|
+
*/
|
|
44
|
+
organizationId?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Sent as the OpenAI-Project header when set.
|
|
47
|
+
*/
|
|
48
|
+
projectId?: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export interface AIProviderConfigOpenAICompatible {
|
|
52
|
+
/**
|
|
53
|
+
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
54
|
+
* Completions API. The base URL is required and its model catalog is discovered
|
|
55
|
+
* live via GET {base_url}/models.
|
|
56
|
+
*/
|
|
57
|
+
openaiCompatible: AIProviderConfigOpenAICompatible.OpenAICompatible;
|
|
58
|
+
type: 'openaiCompatible';
|
|
59
|
+
}
|
|
60
|
+
export declare namespace AIProviderConfigOpenAICompatible {
|
|
61
|
+
/**
|
|
62
|
+
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
63
|
+
* Completions API. The base URL is required and its model catalog is discovered
|
|
64
|
+
* live via GET {base_url}/models.
|
|
65
|
+
*/
|
|
66
|
+
interface OpenAICompatible {
|
|
67
|
+
baseUrl: string;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export interface AIProviderConfigOpenrouter {
|
|
71
|
+
/**
|
|
72
|
+
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
73
|
+
*/
|
|
74
|
+
openrouter: AIProviderConfigOpenrouter.Openrouter;
|
|
75
|
+
type: 'openrouter';
|
|
76
|
+
}
|
|
77
|
+
export declare namespace AIProviderConfigOpenrouter {
|
|
78
|
+
/**
|
|
79
|
+
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
80
|
+
*/
|
|
81
|
+
interface Openrouter {
|
|
82
|
+
/**
|
|
83
|
+
* Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
|
|
84
|
+
*/
|
|
85
|
+
region?: string;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export interface AIProviderCredentialAPIKey {
|
|
89
|
+
/**
|
|
90
|
+
* CredentialAPIKey carries a single bearer/header API key.
|
|
91
|
+
*/
|
|
92
|
+
apiKey: AIProviderCredentialAPIKey.APIKey;
|
|
93
|
+
type: 'apiKey';
|
|
94
|
+
}
|
|
95
|
+
export declare namespace AIProviderCredentialAPIKey {
|
|
96
|
+
/**
|
|
97
|
+
* CredentialAPIKey carries a single bearer/header API key.
|
|
98
|
+
*/
|
|
99
|
+
interface APIKey {
|
|
100
|
+
apiKey?: string;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export interface AIProviderCredentialHeaders {
|
|
104
|
+
/**
|
|
105
|
+
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
106
|
+
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
107
|
+
*/
|
|
108
|
+
headers: AIProviderCredentialHeaders.Headers;
|
|
109
|
+
type: 'headers';
|
|
110
|
+
}
|
|
111
|
+
export declare namespace AIProviderCredentialHeaders {
|
|
112
|
+
/**
|
|
113
|
+
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
114
|
+
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
115
|
+
*/
|
|
116
|
+
interface Headers {
|
|
117
|
+
headers?: {
|
|
118
|
+
[key: string]: string;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
29
122
|
/**
|
|
30
123
|
* AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
|
|
31
124
|
* keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
|
|
@@ -73,128 +166,46 @@ export interface AIProviderKeySpec {
|
|
|
73
166
|
* intentionally not overridable here; use the OpenAI-compatible provider to target
|
|
74
167
|
* a custom endpoint.
|
|
75
168
|
*/
|
|
76
|
-
config?:
|
|
169
|
+
config?: AIProviderConfigOpenrouter | AIProviderConfigOpenAI | AIProviderConfigOpenAICompatible;
|
|
77
170
|
/**
|
|
78
171
|
* AIProviderCredential is the secret material used to authenticate with a
|
|
79
172
|
* provider. The set case must correspond to AIProviderKeySpec.provider. The server
|
|
80
173
|
* encrypts the serialized message at rest and never returns it on reads.
|
|
81
174
|
*/
|
|
82
|
-
credentials?:
|
|
175
|
+
credentials?: AIProviderCredentialAPIKey | AIProviderCredentialHeaders;
|
|
83
176
|
/**
|
|
84
177
|
* The AI provider this key authenticates against.
|
|
85
178
|
*/
|
|
86
179
|
provider?: 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE';
|
|
87
180
|
}
|
|
88
|
-
export
|
|
181
|
+
export interface AIProviderKeyCreateParams {
|
|
89
182
|
/**
|
|
90
|
-
*
|
|
91
|
-
* correspond to AIProviderKeySpec.provider. Providers with no settings (Anthropic,
|
|
92
|
-
* Gemini) simply leave this unset. The endpoint of a named provider is fixed and
|
|
93
|
-
* intentionally not overridable here; use the OpenAI-compatible provider to target
|
|
94
|
-
* a custom endpoint.
|
|
183
|
+
* Path param: The workspace that will own this key.
|
|
95
184
|
*/
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* OpenAIConfig holds OpenAI-specific settings.
|
|
99
|
-
*/
|
|
100
|
-
openai?: Config.OpenAI;
|
|
101
|
-
/**
|
|
102
|
-
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
103
|
-
* Completions API. The base URL is required and its model catalog is discovered
|
|
104
|
-
* live via GET {base_url}/models.
|
|
105
|
-
*/
|
|
106
|
-
openaiCompatible?: Config.OpenAICompatible;
|
|
107
|
-
/**
|
|
108
|
-
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
109
|
-
*/
|
|
110
|
-
openrouter?: Config.Openrouter;
|
|
111
|
-
}
|
|
112
|
-
namespace Config {
|
|
113
|
-
/**
|
|
114
|
-
* OpenAIConfig holds OpenAI-specific settings.
|
|
115
|
-
*/
|
|
116
|
-
interface OpenAI {
|
|
117
|
-
/**
|
|
118
|
-
* Sent as the OpenAI-Organization header when set.
|
|
119
|
-
*/
|
|
120
|
-
organizationId?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Sent as the OpenAI-Project header when set.
|
|
123
|
-
*/
|
|
124
|
-
projectId?: string;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
|
|
128
|
-
* Completions API. The base URL is required and its model catalog is discovered
|
|
129
|
-
* live via GET {base_url}/models.
|
|
130
|
-
*/
|
|
131
|
-
interface OpenAICompatible {
|
|
132
|
-
baseUrl?: string;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* OpenRouterConfig holds OpenRouter-specific settings.
|
|
136
|
-
*/
|
|
137
|
-
interface Openrouter {
|
|
138
|
-
/**
|
|
139
|
-
* Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
|
|
140
|
-
*/
|
|
141
|
-
region?: string;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
185
|
+
workspaceId?: string;
|
|
144
186
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
187
|
+
* Body param: CreateResourceMetadata contains the user-provided fields for
|
|
188
|
+
* creating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
189
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
190
|
+
* server.
|
|
148
191
|
*/
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* CredentialAPIKey carries a single bearer/header API key.
|
|
152
|
-
*/
|
|
153
|
-
apiKey?: Credentials.APIKey;
|
|
154
|
-
/**
|
|
155
|
-
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
156
|
-
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
157
|
-
*/
|
|
158
|
-
headers?: Credentials.Headers;
|
|
159
|
-
}
|
|
160
|
-
namespace Credentials {
|
|
161
|
-
/**
|
|
162
|
-
* CredentialAPIKey carries a single bearer/header API key.
|
|
163
|
-
*/
|
|
164
|
-
interface APIKey {
|
|
165
|
-
apiKey?: string;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* CredentialHeaders carries arbitrary HTTP headers sent with every request to the
|
|
169
|
-
* provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
170
|
-
*/
|
|
171
|
-
interface Headers {
|
|
172
|
-
headers?: {
|
|
173
|
-
[key: string]: string;
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
export interface AIProviderKeyCreateParams {
|
|
192
|
+
metadata: Shared.CreateResourceMetadata;
|
|
179
193
|
/**
|
|
180
|
-
*
|
|
181
|
-
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
182
|
-
* profile_id, created_at) are excluded since they are set by the server.
|
|
194
|
+
* Body param
|
|
183
195
|
*/
|
|
184
|
-
metadata: Shared.CreateResourceMetadata;
|
|
185
196
|
spec: AIProviderKeySpec;
|
|
186
197
|
}
|
|
187
198
|
export interface AIProviderKeyRetrieveParams {
|
|
188
199
|
/**
|
|
189
200
|
* The workspace the key belongs to.
|
|
190
201
|
*/
|
|
191
|
-
workspaceId
|
|
202
|
+
workspaceId?: string;
|
|
192
203
|
}
|
|
193
204
|
export interface AIProviderKeyUpdateParams {
|
|
194
205
|
/**
|
|
195
206
|
* Path param: The workspace the key belongs to.
|
|
196
207
|
*/
|
|
197
|
-
workspaceId
|
|
208
|
+
workspaceId?: string;
|
|
198
209
|
/**
|
|
199
210
|
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
200
211
|
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
@@ -213,32 +224,36 @@ export interface AIProviderKeyUpdateParams {
|
|
|
213
224
|
}
|
|
214
225
|
export interface AIProviderKeyListParams extends CursorPaginationParams {
|
|
215
226
|
/**
|
|
216
|
-
*
|
|
217
|
-
|
|
227
|
+
* Path param: The workspace whose keys will be listed.
|
|
228
|
+
*/
|
|
229
|
+
workspaceId?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Query param: When true, populate each item's info (model counts), at the cost of
|
|
232
|
+
* extra lookups.
|
|
218
233
|
*/
|
|
219
234
|
includeInfo?: boolean;
|
|
220
235
|
/**
|
|
221
|
-
* Filters by metadata labels. Comma-separated key=value pairs, e.g.
|
|
236
|
+
* Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
|
|
222
237
|
* "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
|
|
223
238
|
* semantics).
|
|
224
239
|
*/
|
|
225
240
|
labels?: string;
|
|
226
241
|
/**
|
|
227
|
-
* Filter expression (query param: prefix)
|
|
242
|
+
* Query param: Filter expression (query param: prefix)
|
|
228
243
|
*/
|
|
229
244
|
prefix?: string;
|
|
230
245
|
/**
|
|
231
|
-
* When true, return only promotional keys (provided by Cadenya, e.g.
|
|
232
|
-
* onboarding). Defaults to returning all keys, customer-provided and
|
|
233
|
-
* alike.
|
|
246
|
+
* Query param: When true, return only promotional keys (provided by Cadenya, e.g.
|
|
247
|
+
* for onboarding). Defaults to returning all keys, customer-provided and
|
|
248
|
+
* promotional alike.
|
|
234
249
|
*/
|
|
235
250
|
promotional?: boolean;
|
|
236
251
|
/**
|
|
237
|
-
* Free-form search query
|
|
252
|
+
* Query param: Free-form search query
|
|
238
253
|
*/
|
|
239
254
|
query?: string;
|
|
240
255
|
/**
|
|
241
|
-
* Sort order for results (asc or desc by creation time)
|
|
256
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
242
257
|
*/
|
|
243
258
|
sortOrder?: string;
|
|
244
259
|
}
|
|
@@ -246,9 +261,9 @@ export interface AIProviderKeyDeleteParams {
|
|
|
246
261
|
/**
|
|
247
262
|
* The workspace the key belongs to.
|
|
248
263
|
*/
|
|
249
|
-
workspaceId
|
|
264
|
+
workspaceId?: string;
|
|
250
265
|
}
|
|
251
266
|
export declare namespace AIProviderKeys {
|
|
252
|
-
export { type AIProviderKey as AIProviderKey, type AIProviderKeySpec as AIProviderKeySpec, type AIProviderKeysCursorPagination as AIProviderKeysCursorPagination, type AIProviderKeyCreateParams as AIProviderKeyCreateParams, type AIProviderKeyRetrieveParams as AIProviderKeyRetrieveParams, type AIProviderKeyUpdateParams as AIProviderKeyUpdateParams, type AIProviderKeyListParams as AIProviderKeyListParams, type AIProviderKeyDeleteParams as AIProviderKeyDeleteParams, };
|
|
267
|
+
export { type AIProviderConfigOpenAI as AIProviderConfigOpenAI, type AIProviderConfigOpenAICompatible as AIProviderConfigOpenAICompatible, type AIProviderConfigOpenrouter as AIProviderConfigOpenrouter, type AIProviderCredentialAPIKey as AIProviderCredentialAPIKey, type AIProviderCredentialHeaders as AIProviderCredentialHeaders, type AIProviderKey as AIProviderKey, type AIProviderKeySpec as AIProviderKeySpec, type AIProviderKeysCursorPagination as AIProviderKeysCursorPagination, type AIProviderKeyCreateParams as AIProviderKeyCreateParams, type AIProviderKeyRetrieveParams as AIProviderKeyRetrieveParams, type AIProviderKeyUpdateParams as AIProviderKeyUpdateParams, type AIProviderKeyListParams as AIProviderKeyListParams, type AIProviderKeyDeleteParams as AIProviderKeyDeleteParams, };
|
|
253
268
|
}
|
|
254
269
|
//# sourceMappingURL=ai-provider-keys.d.ts.map
|