@onkernel/sdk 0.99.0 → 0.101.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 +23 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/lib/browser-routing.d.mts.map +1 -1
- package/lib/browser-routing.d.ts.map +1 -1
- package/lib/browser-routing.js +23 -6
- package/lib/browser-routing.js.map +1 -1
- package/lib/browser-routing.mjs +23 -6
- package/lib/browser-routing.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browsers/telemetry.d.mts +4 -3
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +4 -3
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.d.mts +14 -7
- package/resources/config-registry/config-registry.d.mts.map +1 -1
- package/resources/config-registry/config-registry.d.ts +14 -7
- package/resources/config-registry/config-registry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.js.map +1 -1
- package/resources/config-registry/config-registry.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +44 -15
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +44 -15
- package/resources/invocations.d.ts.map +1 -1
- package/resources/organization/entitlements.d.mts +20 -0
- package/resources/organization/entitlements.d.mts.map +1 -1
- package/resources/organization/entitlements.d.ts +20 -0
- package/resources/organization/entitlements.d.ts.map +1 -1
- package/resources/organization/limits.d.mts +10 -1
- package/resources/organization/limits.d.mts.map +1 -1
- package/resources/organization/limits.d.ts +10 -1
- package/resources/organization/limits.d.ts.map +1 -1
- package/resources/organization/limits.js +1 -1
- package/resources/organization/limits.mjs +1 -1
- package/resources/proxies.d.mts +36 -18
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +36 -18
- package/resources/proxies.d.ts.map +1 -1
- package/resources/vault-provider-configs.d.mts +179 -0
- package/resources/vault-provider-configs.d.mts.map +1 -0
- package/resources/vault-provider-configs.d.ts +179 -0
- package/resources/vault-provider-configs.d.ts.map +1 -0
- package/resources/vault-provider-configs.js +99 -0
- package/resources/vault-provider-configs.js.map +1 -0
- package/resources/vault-provider-configs.mjs +95 -0
- package/resources/vault-provider-configs.mjs.map +1 -0
- package/resources/vaults/items.d.mts +296 -38
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +296 -38
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +86 -4
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +86 -4
- package/resources/vaults/items.mjs.map +1 -1
- package/resources/vaults/vaults.d.mts +31 -2
- package/resources/vaults/vaults.d.mts.map +1 -1
- package/resources/vaults/vaults.d.ts +31 -2
- package/resources/vaults/vaults.d.ts.map +1 -1
- package/resources/vaults/vaults.js +31 -2
- package/resources/vaults/vaults.js.map +1 -1
- package/resources/vaults/vaults.mjs +31 -2
- package/resources/vaults/vaults.mjs.map +1 -1
- package/src/client.ts +19 -0
- package/src/lib/browser-routing.ts +27 -6
- package/src/resources/browsers/telemetry.ts +5 -2
- package/src/resources/config-registry/config-registry.ts +15 -7
- package/src/resources/index.ts +8 -0
- package/src/resources/invocations.ts +44 -15
- package/src/resources/organization/entitlements.ts +23 -0
- package/src/resources/organization/limits.ts +12 -1
- package/src/resources/proxies.ts +36 -18
- package/src/resources/vault-provider-configs.ts +250 -0
- package/src/resources/vaults/items.ts +333 -39
- package/src/resources/vaults/vaults.ts +31 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -197,8 +197,8 @@ export namespace InvocationStateEvent {
|
|
|
197
197
|
finished_at?: string | null;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
200
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
201
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
202
202
|
*/
|
|
203
203
|
output?: string;
|
|
204
204
|
|
|
@@ -208,7 +208,13 @@ export namespace InvocationStateEvent {
|
|
|
208
208
|
payload?: string;
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
|
-
*
|
|
211
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
212
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
213
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
214
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
215
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
216
|
+
* action output or internal error details. Available for historical invocations as
|
|
217
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
212
218
|
*/
|
|
213
219
|
status_reason?: string;
|
|
214
220
|
}
|
|
@@ -231,13 +237,18 @@ export interface InvocationCreateResponse {
|
|
|
231
237
|
status: 'queued' | 'running' | 'succeeded' | 'failed';
|
|
232
238
|
|
|
233
239
|
/**
|
|
234
|
-
* The
|
|
235
|
-
*
|
|
240
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
241
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
236
242
|
*/
|
|
237
243
|
output?: string;
|
|
238
244
|
|
|
239
245
|
/**
|
|
240
|
-
*
|
|
246
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
247
|
+
* when status is failed and omitted otherwise. Recognized messages receive a
|
|
248
|
+
* specific summary; other failures receive a generic summary. Message matching
|
|
249
|
+
* does not establish whether the failure originated in the platform or action
|
|
250
|
+
* code. Does not include raw action output or internal error details.
|
|
251
|
+
* Human-readable text, not a stable identifier for retry logic.
|
|
241
252
|
*/
|
|
242
253
|
status_reason?: string;
|
|
243
254
|
}
|
|
@@ -280,8 +291,8 @@ export interface InvocationRetrieveResponse {
|
|
|
280
291
|
finished_at?: string | null;
|
|
281
292
|
|
|
282
293
|
/**
|
|
283
|
-
*
|
|
284
|
-
*
|
|
294
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
295
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
285
296
|
*/
|
|
286
297
|
output?: string;
|
|
287
298
|
|
|
@@ -291,7 +302,13 @@ export interface InvocationRetrieveResponse {
|
|
|
291
302
|
payload?: string;
|
|
292
303
|
|
|
293
304
|
/**
|
|
294
|
-
*
|
|
305
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
306
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
307
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
308
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
309
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
310
|
+
* action output or internal error details. Available for historical invocations as
|
|
311
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
295
312
|
*/
|
|
296
313
|
status_reason?: string;
|
|
297
314
|
}
|
|
@@ -334,8 +351,8 @@ export interface InvocationUpdateResponse {
|
|
|
334
351
|
finished_at?: string | null;
|
|
335
352
|
|
|
336
353
|
/**
|
|
337
|
-
*
|
|
338
|
-
*
|
|
354
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
355
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
339
356
|
*/
|
|
340
357
|
output?: string;
|
|
341
358
|
|
|
@@ -345,7 +362,13 @@ export interface InvocationUpdateResponse {
|
|
|
345
362
|
payload?: string;
|
|
346
363
|
|
|
347
364
|
/**
|
|
348
|
-
*
|
|
365
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
366
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
367
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
368
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
369
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
370
|
+
* action output or internal error details. Available for historical invocations as
|
|
371
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
349
372
|
*/
|
|
350
373
|
status_reason?: string;
|
|
351
374
|
}
|
|
@@ -388,8 +411,8 @@ export interface InvocationListResponse {
|
|
|
388
411
|
finished_at?: string | null;
|
|
389
412
|
|
|
390
413
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
414
|
+
* The action result or detailed failure output. Often a JSON-encoded value, but
|
|
415
|
+
* failures may contain plain text. May contain sensitive application data.
|
|
393
416
|
*/
|
|
394
417
|
output?: string;
|
|
395
418
|
|
|
@@ -399,7 +422,13 @@ export interface InvocationListResponse {
|
|
|
399
422
|
payload?: string;
|
|
400
423
|
|
|
401
424
|
/**
|
|
402
|
-
*
|
|
425
|
+
* A nonempty, customer-safe summary of the recorded failure output, always present
|
|
426
|
+
* when status is failed and omitted otherwise, including in the first failed
|
|
427
|
+
* invocation_state event. Recognized messages receive a specific summary; other
|
|
428
|
+
* failures receive a generic summary. Message matching does not establish whether
|
|
429
|
+
* the failure originated in the platform or action code. Does not include raw
|
|
430
|
+
* action output or internal error details. Available for historical invocations as
|
|
431
|
+
* well. Human-readable text, not a stable identifier for retry logic.
|
|
403
432
|
*/
|
|
404
433
|
status_reason?: string;
|
|
405
434
|
}
|
|
@@ -57,6 +57,12 @@ export namespace OrgEntitlements {
|
|
|
57
57
|
profiles: Features.Profiles;
|
|
58
58
|
|
|
59
59
|
proxy_bypass_hosts: Features.ProxyBypassHosts;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Whether the organization can access vaults, using the same access check as vault
|
|
63
|
+
* API routes.
|
|
64
|
+
*/
|
|
65
|
+
vaults: Features.Vaults;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
export namespace Features {
|
|
@@ -176,6 +182,17 @@ export namespace OrgEntitlements {
|
|
|
176
182
|
*/
|
|
177
183
|
enabled: boolean;
|
|
178
184
|
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Whether the organization can access vaults, using the same access check as vault
|
|
188
|
+
* API routes.
|
|
189
|
+
*/
|
|
190
|
+
export interface Vaults {
|
|
191
|
+
/**
|
|
192
|
+
* Whether the organization is entitled to use this feature.
|
|
193
|
+
*/
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
}
|
|
179
196
|
}
|
|
180
197
|
|
|
181
198
|
export interface Limits {
|
|
@@ -195,6 +212,12 @@ export namespace OrgEntitlements {
|
|
|
195
212
|
* Effective organization-wide concurrent app invocation ceiling.
|
|
196
213
|
*/
|
|
197
214
|
max_concurrent_invocations: number;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
|
|
218
|
+
* unlimited. The vaults feature flag still controls access.
|
|
219
|
+
*/
|
|
220
|
+
max_vaults: number | null;
|
|
198
221
|
}
|
|
199
222
|
|
|
200
223
|
export interface Plan {
|
|
@@ -9,7 +9,7 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
9
9
|
*/
|
|
10
10
|
export class Limits extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Get the organization's effective limits and managed auth usage.
|
|
12
|
+
* Get the organization's effective limits and managed auth and vault usage.
|
|
13
13
|
*/
|
|
14
14
|
retrieve(options?: RequestOptions): APIPromise<OrgLimits> {
|
|
15
15
|
return this._client.get('/org/limits', options);
|
|
@@ -39,6 +39,12 @@ export interface OrgLimits {
|
|
|
39
39
|
*/
|
|
40
40
|
max_auth_connections: number | null;
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
|
|
44
|
+
* unlimited.
|
|
45
|
+
*/
|
|
46
|
+
max_vaults: number | null;
|
|
47
|
+
|
|
42
48
|
/**
|
|
43
49
|
* Smallest health_check_interval the organization's plan accepts on a managed auth
|
|
44
50
|
* connection. Requests below this are rejected with 400. Existing connections
|
|
@@ -46,6 +52,11 @@ export interface OrgLimits {
|
|
|
46
52
|
*/
|
|
47
53
|
min_health_check_interval_seconds: number;
|
|
48
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Current non-deleted vault count across all projects in the organization.
|
|
57
|
+
*/
|
|
58
|
+
vaults_used: number;
|
|
59
|
+
|
|
49
60
|
/**
|
|
50
61
|
* Default maximum concurrent browsers applied to every project that has no
|
|
51
62
|
* explicit per-project override. Null means no org-level default, so such projects
|
package/src/resources/proxies.ts
CHANGED
|
@@ -183,7 +183,8 @@ export namespace ProxyCreateResponse {
|
|
|
183
183
|
*/
|
|
184
184
|
export interface IspProxyConfig {
|
|
185
185
|
/**
|
|
186
|
-
* ISO 3166 country code.
|
|
186
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
187
|
+
* to US if not provided.
|
|
187
188
|
*/
|
|
188
189
|
country?: string;
|
|
189
190
|
}
|
|
@@ -204,7 +205,8 @@ export namespace ProxyCreateResponse {
|
|
|
204
205
|
city?: string;
|
|
205
206
|
|
|
206
207
|
/**
|
|
207
|
-
* ISO 3166 country code.
|
|
208
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
209
|
+
* country targeting.
|
|
208
210
|
*/
|
|
209
211
|
country?: string;
|
|
210
212
|
|
|
@@ -234,7 +236,8 @@ export namespace ProxyCreateResponse {
|
|
|
234
236
|
city?: string;
|
|
235
237
|
|
|
236
238
|
/**
|
|
237
|
-
* ISO 3166 country code
|
|
239
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
240
|
+
* country targeting.
|
|
238
241
|
*/
|
|
239
242
|
country?: string;
|
|
240
243
|
|
|
@@ -344,7 +347,8 @@ export namespace ProxyRetrieveResponse {
|
|
|
344
347
|
*/
|
|
345
348
|
export interface IspProxyConfig {
|
|
346
349
|
/**
|
|
347
|
-
* ISO 3166 country code.
|
|
350
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
351
|
+
* to US if not provided.
|
|
348
352
|
*/
|
|
349
353
|
country?: string;
|
|
350
354
|
}
|
|
@@ -365,7 +369,8 @@ export namespace ProxyRetrieveResponse {
|
|
|
365
369
|
city?: string;
|
|
366
370
|
|
|
367
371
|
/**
|
|
368
|
-
* ISO 3166 country code.
|
|
372
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
373
|
+
* country targeting.
|
|
369
374
|
*/
|
|
370
375
|
country?: string;
|
|
371
376
|
|
|
@@ -395,7 +400,8 @@ export namespace ProxyRetrieveResponse {
|
|
|
395
400
|
city?: string;
|
|
396
401
|
|
|
397
402
|
/**
|
|
398
|
-
* ISO 3166 country code
|
|
403
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
404
|
+
* country targeting.
|
|
399
405
|
*/
|
|
400
406
|
country?: string;
|
|
401
407
|
|
|
@@ -505,7 +511,8 @@ export namespace ProxyUpdateResponse {
|
|
|
505
511
|
*/
|
|
506
512
|
export interface IspProxyConfig {
|
|
507
513
|
/**
|
|
508
|
-
* ISO 3166 country code.
|
|
514
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
515
|
+
* to US if not provided.
|
|
509
516
|
*/
|
|
510
517
|
country?: string;
|
|
511
518
|
}
|
|
@@ -526,7 +533,8 @@ export namespace ProxyUpdateResponse {
|
|
|
526
533
|
city?: string;
|
|
527
534
|
|
|
528
535
|
/**
|
|
529
|
-
* ISO 3166 country code.
|
|
536
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
537
|
+
* country targeting.
|
|
530
538
|
*/
|
|
531
539
|
country?: string;
|
|
532
540
|
|
|
@@ -556,7 +564,8 @@ export namespace ProxyUpdateResponse {
|
|
|
556
564
|
city?: string;
|
|
557
565
|
|
|
558
566
|
/**
|
|
559
|
-
* ISO 3166 country code
|
|
567
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
568
|
+
* country targeting.
|
|
560
569
|
*/
|
|
561
570
|
country?: string;
|
|
562
571
|
|
|
@@ -666,7 +675,8 @@ export namespace ProxyListResponse {
|
|
|
666
675
|
*/
|
|
667
676
|
export interface IspProxyConfig {
|
|
668
677
|
/**
|
|
669
|
-
* ISO 3166 country code.
|
|
678
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
679
|
+
* to US if not provided.
|
|
670
680
|
*/
|
|
671
681
|
country?: string;
|
|
672
682
|
}
|
|
@@ -687,7 +697,8 @@ export namespace ProxyListResponse {
|
|
|
687
697
|
city?: string;
|
|
688
698
|
|
|
689
699
|
/**
|
|
690
|
-
* ISO 3166 country code.
|
|
700
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
701
|
+
* country targeting.
|
|
691
702
|
*/
|
|
692
703
|
country?: string;
|
|
693
704
|
|
|
@@ -717,7 +728,8 @@ export namespace ProxyListResponse {
|
|
|
717
728
|
city?: string;
|
|
718
729
|
|
|
719
730
|
/**
|
|
720
|
-
* ISO 3166 country code
|
|
731
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
732
|
+
* country targeting.
|
|
721
733
|
*/
|
|
722
734
|
country?: string;
|
|
723
735
|
|
|
@@ -827,7 +839,8 @@ export namespace ProxyCheckResponse {
|
|
|
827
839
|
*/
|
|
828
840
|
export interface IspProxyConfig {
|
|
829
841
|
/**
|
|
830
|
-
* ISO 3166 country code.
|
|
842
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
843
|
+
* to US if not provided.
|
|
831
844
|
*/
|
|
832
845
|
country?: string;
|
|
833
846
|
}
|
|
@@ -848,7 +861,8 @@ export namespace ProxyCheckResponse {
|
|
|
848
861
|
city?: string;
|
|
849
862
|
|
|
850
863
|
/**
|
|
851
|
-
* ISO 3166 country code.
|
|
864
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
865
|
+
* country targeting.
|
|
852
866
|
*/
|
|
853
867
|
country?: string;
|
|
854
868
|
|
|
@@ -878,7 +892,8 @@ export namespace ProxyCheckResponse {
|
|
|
878
892
|
city?: string;
|
|
879
893
|
|
|
880
894
|
/**
|
|
881
|
-
* ISO 3166 country code
|
|
895
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
896
|
+
* country targeting.
|
|
882
897
|
*/
|
|
883
898
|
country?: string;
|
|
884
899
|
|
|
@@ -968,7 +983,8 @@ export namespace ProxyCreateParams {
|
|
|
968
983
|
*/
|
|
969
984
|
export interface IspProxyConfig {
|
|
970
985
|
/**
|
|
971
|
-
* ISO 3166 country code.
|
|
986
|
+
* ISO 3166 country code. Supported countries are US, GB, FR, DE, and SG. Defaults
|
|
987
|
+
* to US if not provided.
|
|
972
988
|
*/
|
|
973
989
|
country?: string;
|
|
974
990
|
}
|
|
@@ -989,7 +1005,8 @@ export namespace ProxyCreateParams {
|
|
|
989
1005
|
city?: string;
|
|
990
1006
|
|
|
991
1007
|
/**
|
|
992
|
-
* ISO 3166 country code.
|
|
1008
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
1009
|
+
* country targeting.
|
|
993
1010
|
*/
|
|
994
1011
|
country?: string;
|
|
995
1012
|
|
|
@@ -1019,7 +1036,8 @@ export namespace ProxyCreateParams {
|
|
|
1019
1036
|
city?: string;
|
|
1020
1037
|
|
|
1021
1038
|
/**
|
|
1022
|
-
* ISO 3166 country code
|
|
1039
|
+
* ISO 3166 country code. If omitted, the proxy uses the global pool without
|
|
1040
|
+
* country targeting.
|
|
1023
1041
|
*/
|
|
1024
1042
|
country?: string;
|
|
1025
1043
|
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class VaultProviderConfigs extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Register a configuration shared across the organization's projects. Names are
|
|
13
|
+
* unique within the organization; duplicate names return 409 without replacing
|
|
14
|
+
* credentials. A configuration serves many wallets. Secret credentials are never
|
|
15
|
+
* returned. Requires an organization-scoped credential or dashboard
|
|
16
|
+
* authentication; project-scoped credentials receive 403.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const vaultProviderConfig =
|
|
21
|
+
* await client.vaultProviderConfigs.create({
|
|
22
|
+
* credentials: {
|
|
23
|
+
* client_id: 'example-client-id',
|
|
24
|
+
* client_secret: 'example-client-secret',
|
|
25
|
+
* },
|
|
26
|
+
* name: 'my-link-client',
|
|
27
|
+
* provider: 'link',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
create(body: VaultProviderConfigCreateParams, options?: RequestOptions): APIPromise<VaultProviderConfig> {
|
|
32
|
+
return this._client.post('/vault-provider-configs', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Look up a configuration by ID or name. Returns 404 when it does not exist in the
|
|
37
|
+
* organization.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const vaultProviderConfig =
|
|
42
|
+
* await client.vaultProviderConfigs.retrieve('id_or_name');
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
retrieve(idOrName: string, options?: RequestOptions): APIPromise<VaultProviderConfig> {
|
|
46
|
+
return this._client.get(path`/vault-provider-configs/${idOrName}`, options);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Update the supplied fields; omitted fields remain unchanged. Names must remain
|
|
51
|
+
* unique within the organization. Requires an organization-scoped credential or
|
|
52
|
+
* dashboard authentication; project-scoped credentials receive 403.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const vaultProviderConfig =
|
|
57
|
+
* await client.vaultProviderConfigs.update('id_or_name', {
|
|
58
|
+
* name: 'renamed-link-client',
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
update(
|
|
63
|
+
idOrName: string,
|
|
64
|
+
body: VaultProviderConfigUpdateParams,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): APIPromise<VaultProviderConfig> {
|
|
67
|
+
return this._client.patch(path`/vault-provider-configs/${idOrName}`, { body, ...options });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Secret credentials are never returned.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* // Automatically fetches more pages as needed.
|
|
76
|
+
* for await (const vaultProviderConfig of client.vaultProviderConfigs.list()) {
|
|
77
|
+
* // ...
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
list(
|
|
82
|
+
query: VaultProviderConfigListParams | null | undefined = {},
|
|
83
|
+
options?: RequestOptions,
|
|
84
|
+
): PagePromise<VaultProviderConfigsOffsetPagination, VaultProviderConfig> {
|
|
85
|
+
return this._client.getAPIList('/vault-provider-configs', OffsetPagination<VaultProviderConfig>, {
|
|
86
|
+
query,
|
|
87
|
+
...options,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Delete a configuration in the organization. Returns 409 while any non-deleted
|
|
93
|
+
* vault item references the configuration, regardless of connection status. Does
|
|
94
|
+
* not delete the external OAuth client or revoke unrelated grants. Requires an
|
|
95
|
+
* organization-scoped credential or dashboard authentication; project-scoped
|
|
96
|
+
* credentials receive 403.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* await client.vaultProviderConfigs.delete('id_or_name');
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
delete(idOrName: string, options?: RequestOptions): APIPromise<void> {
|
|
104
|
+
return this._client.delete(path`/vault-provider-configs/${idOrName}`, {
|
|
105
|
+
...options,
|
|
106
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type VaultProviderConfigsOffsetPagination = OffsetPagination<VaultProviderConfig>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Response schema for a Link configuration, without secret credentials. Kernel
|
|
115
|
+
* generates the ID and timestamps. Configuration creation uses
|
|
116
|
+
* VaultLinkProviderConfigRequest.
|
|
117
|
+
*/
|
|
118
|
+
export type VaultProviderConfig =
|
|
119
|
+
| VaultProviderConfig.VaultLinkProviderConfig
|
|
120
|
+
| VaultProviderConfig.VaultAgentCardProviderConfig;
|
|
121
|
+
|
|
122
|
+
export namespace VaultProviderConfig {
|
|
123
|
+
/**
|
|
124
|
+
* Response schema for a Link configuration, without secret credentials. Kernel
|
|
125
|
+
* generates the ID and timestamps. Configuration creation uses
|
|
126
|
+
* VaultLinkProviderConfigRequest.
|
|
127
|
+
*/
|
|
128
|
+
export interface VaultLinkProviderConfig {
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* OAuth client identity; immutable. Secret credentials are never returned.
|
|
133
|
+
*/
|
|
134
|
+
client_id: string;
|
|
135
|
+
|
|
136
|
+
created_at: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Unique within the organization.
|
|
140
|
+
*/
|
|
141
|
+
name: string;
|
|
142
|
+
|
|
143
|
+
provider: 'link';
|
|
144
|
+
|
|
145
|
+
updated_at: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Response schema for an AgentCard configuration, without secret credentials.
|
|
150
|
+
* Kernel generates the ID and timestamps and introspects test_mode from the
|
|
151
|
+
* credentials. Configuration creation uses VaultAgentCardProviderConfigRequest.
|
|
152
|
+
*/
|
|
153
|
+
export interface VaultAgentCardProviderConfig {
|
|
154
|
+
id: string;
|
|
155
|
+
|
|
156
|
+
client_id: string;
|
|
157
|
+
|
|
158
|
+
created_at: string;
|
|
159
|
+
|
|
160
|
+
name: string;
|
|
161
|
+
|
|
162
|
+
provider: 'agentcard';
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Introspected mode of the selected credential; true means sandbox objects.
|
|
166
|
+
*/
|
|
167
|
+
test_mode: boolean;
|
|
168
|
+
|
|
169
|
+
updated_at: string;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export type VaultProviderConfigCreateParams =
|
|
174
|
+
| VaultProviderConfigCreateParams.VaultLinkProviderConfigRequest
|
|
175
|
+
| VaultProviderConfigCreateParams.VaultAgentCardProviderConfigRequest;
|
|
176
|
+
|
|
177
|
+
export declare namespace VaultProviderConfigCreateParams {
|
|
178
|
+
export interface VaultLinkProviderConfigRequest {
|
|
179
|
+
credentials: VaultLinkProviderConfigRequest.Credentials;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Unique within the organization.
|
|
183
|
+
*/
|
|
184
|
+
name: string;
|
|
185
|
+
|
|
186
|
+
provider: 'link';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export namespace VaultLinkProviderConfigRequest {
|
|
190
|
+
export interface Credentials {
|
|
191
|
+
client_id: string;
|
|
192
|
+
|
|
193
|
+
client_secret: string;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface VaultAgentCardProviderConfigRequest {
|
|
198
|
+
credentials: VaultAgentCardProviderConfigRequest.Credentials;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Unique within the organization.
|
|
202
|
+
*/
|
|
203
|
+
name: string;
|
|
204
|
+
|
|
205
|
+
provider: 'agentcard';
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export namespace VaultAgentCardProviderConfigRequest {
|
|
209
|
+
export interface Credentials {
|
|
210
|
+
client_id: string;
|
|
211
|
+
|
|
212
|
+
client_secret: string;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface VaultProviderConfigUpdateParams {
|
|
218
|
+
/**
|
|
219
|
+
* Fields to update. Omitted credentials are left unchanged. A rejected update
|
|
220
|
+
* leaves existing credentials unchanged.
|
|
221
|
+
*/
|
|
222
|
+
credentials?: VaultProviderConfigUpdateParams.Credentials;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Unique within the organization.
|
|
226
|
+
*/
|
|
227
|
+
name?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export namespace VaultProviderConfigUpdateParams {
|
|
231
|
+
/**
|
|
232
|
+
* Fields to update. Omitted credentials are left unchanged. A rejected update
|
|
233
|
+
* leaves existing credentials unchanged.
|
|
234
|
+
*/
|
|
235
|
+
export interface Credentials {
|
|
236
|
+
client_secret?: string;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface VaultProviderConfigListParams extends OffsetPaginationParams {}
|
|
241
|
+
|
|
242
|
+
export declare namespace VaultProviderConfigs {
|
|
243
|
+
export {
|
|
244
|
+
type VaultProviderConfig as VaultProviderConfig,
|
|
245
|
+
type VaultProviderConfigsOffsetPagination as VaultProviderConfigsOffsetPagination,
|
|
246
|
+
type VaultProviderConfigCreateParams as VaultProviderConfigCreateParams,
|
|
247
|
+
type VaultProviderConfigUpdateParams as VaultProviderConfigUpdateParams,
|
|
248
|
+
type VaultProviderConfigListParams as VaultProviderConfigListParams,
|
|
249
|
+
};
|
|
250
|
+
}
|