@browserbasehq/sdk 2.20.0 → 2.22.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 +19 -0
- package/index.d.mts +6 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/index.mjs +6 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.ts +4 -4
- package/resources/agents/runs.d.ts +24 -8
- package/resources/agents/runs.d.ts.map +1 -1
- package/resources/functions/functions.d.ts +10 -0
- package/resources/functions/functions.d.ts.map +1 -0
- package/resources/functions/functions.js +49 -0
- package/resources/functions/functions.js.map +1 -0
- package/resources/functions/functions.mjs +12 -0
- package/resources/functions/functions.mjs.map +1 -0
- package/resources/functions/index.d.ts +3 -0
- package/resources/functions/index.d.ts.map +1 -0
- package/resources/functions/index.js +9 -0
- package/resources/functions/index.js.map +1 -0
- package/resources/functions/index.mjs +4 -0
- package/resources/functions/index.mjs.map +1 -0
- package/resources/functions/secrets.d.ts +74 -0
- package/resources/functions/secrets.d.ts.map +1 -0
- package/resources/functions/secrets.js +39 -0
- package/resources/functions/secrets.js.map +1 -0
- package/resources/functions/secrets.mjs +35 -0
- package/resources/functions/secrets.mjs.map +1 -0
- package/resources/functions.d.ts +2 -0
- package/resources/functions.d.ts.map +1 -0
- package/resources/functions.js +19 -0
- package/resources/functions.js.map +1 -0
- package/resources/functions.mjs +3 -0
- package/resources/functions.mjs.map +1 -0
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/search.d.ts +39 -10
- package/resources/search.d.ts.map +1 -1
- package/resources/secrets.d.ts +142 -0
- package/resources/secrets.d.ts.map +1 -0
- package/resources/secrets.js +50 -0
- package/resources/secrets.js.map +1 -0
- package/resources/secrets.mjs +46 -0
- package/resources/secrets.mjs.map +1 -0
- package/src/index.ts +26 -0
- package/src/resources/agents/agents.ts +4 -4
- package/src/resources/agents/runs.ts +25 -8
- package/src/resources/functions/functions.ts +20 -0
- package/src/resources/functions/index.ts +4 -0
- package/src/resources/functions/secrets.ts +117 -0
- package/src/resources/functions.ts +3 -0
- package/src/resources/index.ts +10 -0
- package/src/resources/search.ts +45 -10
- package/src/resources/secrets.ts +196 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -85,8 +85,10 @@ export interface RunCreateResponse {
|
|
|
85
85
|
* - `FAILED` - agent has failed the run
|
|
86
86
|
* - `STOPPED` - run was stopped by the user
|
|
87
87
|
* - `TIMED_OUT` - run exceeded maximum time
|
|
88
|
+
* - `PAUSED` - run is paused awaiting input from the caller; the agent's request
|
|
89
|
+
* is the trailing `pause` tool call in the run's messages
|
|
88
90
|
*/
|
|
89
|
-
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
91
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
|
|
90
92
|
|
|
91
93
|
/**
|
|
92
94
|
* The original task description.
|
|
@@ -165,8 +167,10 @@ export interface RunRetrieveResponse {
|
|
|
165
167
|
* - `FAILED` - agent has failed the run
|
|
166
168
|
* - `STOPPED` - run was stopped by the user
|
|
167
169
|
* - `TIMED_OUT` - run exceeded maximum time
|
|
170
|
+
* - `PAUSED` - run is paused awaiting input from the caller; the agent's request
|
|
171
|
+
* is the trailing `pause` tool call in the run's messages
|
|
168
172
|
*/
|
|
169
|
-
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
173
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
|
|
170
174
|
|
|
171
175
|
/**
|
|
172
176
|
* The original task description.
|
|
@@ -267,8 +271,10 @@ export namespace RunListResponse {
|
|
|
267
271
|
* - `FAILED` - agent has failed the run
|
|
268
272
|
* - `STOPPED` - run was stopped by the user
|
|
269
273
|
* - `TIMED_OUT` - run exceeded maximum time
|
|
274
|
+
* - `PAUSED` - run is paused awaiting input from the caller; the agent's request
|
|
275
|
+
* is the trailing `pause` tool call in the run's messages
|
|
270
276
|
*/
|
|
271
|
-
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
277
|
+
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
|
|
272
278
|
|
|
273
279
|
/**
|
|
274
280
|
* The original task description.
|
|
@@ -414,6 +420,15 @@ export interface RunCreateParams {
|
|
|
414
420
|
*/
|
|
415
421
|
browserSettings?: RunCreateParams.BrowserSettings;
|
|
416
422
|
|
|
423
|
+
/**
|
|
424
|
+
* Optional description of when the agent should pause and wait for input from your
|
|
425
|
+
* application (e.g. a verification code, an approval, or an answer from another
|
|
426
|
+
* system). When set, the agent is given a `pause` tool; calling it transitions the
|
|
427
|
+
* run to `PAUSED` (the agent's request is the trailing `pause` tool call in the
|
|
428
|
+
* run's messages) until it is resumed via the resume endpoint.
|
|
429
|
+
*/
|
|
430
|
+
pauseWhen?: string;
|
|
431
|
+
|
|
417
432
|
/**
|
|
418
433
|
* An optional [JSON Schema](https://json-schema.org/specification) object. If
|
|
419
434
|
* provided, the agent will aim to return a `result` that conforms to this schema
|
|
@@ -580,8 +595,8 @@ export interface RunListParams {
|
|
|
580
595
|
cursor?: string;
|
|
581
596
|
|
|
582
597
|
/**
|
|
583
|
-
* Only return runs created on or before this timestamp (inclusive).
|
|
584
|
-
*
|
|
598
|
+
* Only return runs created on or before this timestamp (inclusive). RFC 3339, e.g.
|
|
599
|
+
* 2026-01-20T00:00:00Z.
|
|
585
600
|
*/
|
|
586
601
|
endAt?: string;
|
|
587
602
|
|
|
@@ -591,8 +606,8 @@ export interface RunListParams {
|
|
|
591
606
|
limit?: number;
|
|
592
607
|
|
|
593
608
|
/**
|
|
594
|
-
* Only return runs created on or after this timestamp (inclusive).
|
|
595
|
-
*
|
|
609
|
+
* Only return runs created on or after this timestamp (inclusive). RFC 3339, e.g.
|
|
610
|
+
* 2026-01-19T00:00:00Z.
|
|
596
611
|
*/
|
|
597
612
|
startAt?: string;
|
|
598
613
|
|
|
@@ -605,8 +620,10 @@ export interface RunListParams {
|
|
|
605
620
|
* - `FAILED` - agent has failed the run
|
|
606
621
|
* - `STOPPED` - run was stopped by the user
|
|
607
622
|
* - `TIMED_OUT` - run exceeded maximum time
|
|
623
|
+
* - `PAUSED` - run is paused awaiting input from the caller; the agent's request
|
|
624
|
+
* is the trailing `pause` tool call in the run's messages
|
|
608
625
|
*/
|
|
609
|
-
status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
|
|
626
|
+
status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
|
|
610
627
|
}
|
|
611
628
|
|
|
612
629
|
export interface RunListMessagesParams {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as SecretsAPI from './secrets';
|
|
5
|
+
import { SecretAttachParams, SecretListParams, SecretListResponse, Secrets } from './secrets';
|
|
6
|
+
|
|
7
|
+
export class Functions extends APIResource {
|
|
8
|
+
secrets: SecretsAPI.Secrets = new SecretsAPI.Secrets(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Functions.Secrets = Secrets;
|
|
12
|
+
|
|
13
|
+
export declare namespace Functions {
|
|
14
|
+
export {
|
|
15
|
+
Secrets as Secrets,
|
|
16
|
+
type SecretListResponse as SecretListResponse,
|
|
17
|
+
type SecretListParams as SecretListParams,
|
|
18
|
+
type SecretAttachParams as SecretAttachParams,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as SecretsAPI from '../secrets';
|
|
7
|
+
|
|
8
|
+
export class Secrets extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List secrets attached to a function. Supports filtering by secret creation time.
|
|
11
|
+
* Returns metadata only.
|
|
12
|
+
*/
|
|
13
|
+
list(
|
|
14
|
+
id: string,
|
|
15
|
+
query?: SecretListParams,
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.APIPromise<SecretListResponse>;
|
|
18
|
+
list(id: string, options?: Core.RequestOptions): Core.APIPromise<SecretListResponse>;
|
|
19
|
+
list(
|
|
20
|
+
id: string,
|
|
21
|
+
query: SecretListParams | Core.RequestOptions = {},
|
|
22
|
+
options?: Core.RequestOptions,
|
|
23
|
+
): Core.APIPromise<SecretListResponse> {
|
|
24
|
+
if (isRequestOptions(query)) {
|
|
25
|
+
return this.list(id, {}, query);
|
|
26
|
+
}
|
|
27
|
+
return this._client.get(`/v1/functions/${id}/secrets`, { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Attach a secret to a Function, taking effect on the Function's next invocation.
|
|
32
|
+
* Note: Attaching a secret that is already attached succeeds to support
|
|
33
|
+
* idempotency.
|
|
34
|
+
*/
|
|
35
|
+
attach(id: string, body: SecretAttachParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
36
|
+
return this._client.post(`/v1/functions/${id}/secrets`, {
|
|
37
|
+
body,
|
|
38
|
+
...options,
|
|
39
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Detach a secret from a Function, taking effect on the Function's next
|
|
45
|
+
* invocation. Note: Detaching a secret that is not attached succeeds to support
|
|
46
|
+
* idempotency.
|
|
47
|
+
*/
|
|
48
|
+
detach(id: string, secretId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
49
|
+
return this._client.delete(`/v1/functions/${id}/secrets/${secretId}`, {
|
|
50
|
+
...options,
|
|
51
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A page of secrets.
|
|
58
|
+
*/
|
|
59
|
+
export interface SecretListResponse {
|
|
60
|
+
/**
|
|
61
|
+
* The page of matching secrets.
|
|
62
|
+
*/
|
|
63
|
+
data: Array<SecretsAPI.Secret>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The maximum number of results returned in this page.
|
|
67
|
+
*/
|
|
68
|
+
limit: number;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Cursor for the next page. Pass it back as `cursor` on the next request to
|
|
72
|
+
* continue paging. null when there are no more results.
|
|
73
|
+
*/
|
|
74
|
+
nextCursor: string | null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface SecretListParams {
|
|
78
|
+
/**
|
|
79
|
+
* Pagination cursor. Pass the nextCursor from the previous response to fetch the
|
|
80
|
+
* next page. Keep the same filters across pages. Omit to start from the first
|
|
81
|
+
* page.
|
|
82
|
+
*/
|
|
83
|
+
cursor?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Only return secrets created on or before this timestamp (inclusive). RFC 3339,
|
|
87
|
+
* e.g. 2026-01-20T00:00:00Z.
|
|
88
|
+
*/
|
|
89
|
+
endAt?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Maximum number of results to return.
|
|
93
|
+
*/
|
|
94
|
+
limit?: number;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Only return secrets created on or after this timestamp (inclusive). RFC 3339,
|
|
98
|
+
* e.g. 2026-01-19T00:00:00Z.
|
|
99
|
+
*/
|
|
100
|
+
startAt?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface SecretAttachParams {
|
|
104
|
+
/**
|
|
105
|
+
* The id of the project secret to attach (the `id` returned by POST /v1/secrets).
|
|
106
|
+
* Idempotent: re-attaching an already-attached secret succeeds.
|
|
107
|
+
*/
|
|
108
|
+
secretId: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare namespace Secrets {
|
|
112
|
+
export {
|
|
113
|
+
type SecretListResponse as SecretListResponse,
|
|
114
|
+
type SecretListParams as SecretListParams,
|
|
115
|
+
type SecretAttachParams as SecretAttachParams,
|
|
116
|
+
};
|
|
117
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -25,8 +25,18 @@ export {
|
|
|
25
25
|
} from './contexts';
|
|
26
26
|
export { Extensions, type Extension, type ExtensionCreateParams } from './extensions';
|
|
27
27
|
export { FetchAPI, type FetchAPICreateResponse, type FetchAPICreateParams } from './fetch-api';
|
|
28
|
+
export { Functions } from './functions/functions';
|
|
28
29
|
export { Projects, type Project, type ProjectUsage, type ProjectListResponse } from './projects';
|
|
29
30
|
export { Search, type SearchWebResponse, type SearchWebParams } from './search';
|
|
31
|
+
export {
|
|
32
|
+
Secrets,
|
|
33
|
+
type Secret,
|
|
34
|
+
type SecretsKeypair,
|
|
35
|
+
type SecretListResponse,
|
|
36
|
+
type SecretCreateParams,
|
|
37
|
+
type SecretUpdateParams,
|
|
38
|
+
type SecretListParams,
|
|
39
|
+
} from './secrets';
|
|
30
40
|
export {
|
|
31
41
|
Sessions,
|
|
32
42
|
type Session,
|
package/src/resources/search.ts
CHANGED
|
@@ -62,22 +62,57 @@ export namespace SearchWebResponse {
|
|
|
62
62
|
image?: string;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* Publication date in
|
|
65
|
+
* Publication date in RFC 3339 format
|
|
66
66
|
*/
|
|
67
67
|
publishedDate?: string;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export
|
|
72
|
-
/**
|
|
73
|
-
* The search query string
|
|
74
|
-
*/
|
|
75
|
-
query: string;
|
|
71
|
+
export type SearchWebParams = SearchWebParams.Variant0 | SearchWebParams.Variant1;
|
|
76
72
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
export declare namespace SearchWebParams {
|
|
74
|
+
export interface Variant0 {
|
|
75
|
+
/**
|
|
76
|
+
* Search provider to serve this request. Omit to use the default provider for your
|
|
77
|
+
* project.
|
|
78
|
+
*/
|
|
79
|
+
provider: 'parallel';
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The search query string
|
|
83
|
+
*/
|
|
84
|
+
query: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The search mode used by the underlying provider.
|
|
88
|
+
* [Search docs](https://docs.browserbase.com/platform/search/overview) for the
|
|
89
|
+
* available modes and defaults.
|
|
90
|
+
*/
|
|
91
|
+
mode?: 'fast' | 'advanced';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Number of results to return (1-25)
|
|
95
|
+
*/
|
|
96
|
+
numResults?: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Variant1 {
|
|
100
|
+
/**
|
|
101
|
+
* The search query string
|
|
102
|
+
*/
|
|
103
|
+
query: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Number of results to return (1-25)
|
|
107
|
+
*/
|
|
108
|
+
numResults?: number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Search provider to serve this request. Omit to use the default provider for your
|
|
112
|
+
* project.
|
|
113
|
+
*/
|
|
114
|
+
provider?: 'exa';
|
|
115
|
+
}
|
|
81
116
|
}
|
|
82
117
|
|
|
83
118
|
export declare namespace Search {
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import { isRequestOptions } from '../core';
|
|
5
|
+
import * as Core from '../core';
|
|
6
|
+
|
|
7
|
+
export class Secrets extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a Secret
|
|
10
|
+
*/
|
|
11
|
+
create(body: SecretCreateParams, options?: Core.RequestOptions): Core.APIPromise<Secret> {
|
|
12
|
+
return this._client.post('/v1/secrets', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Get a Secret
|
|
17
|
+
*/
|
|
18
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Secret> {
|
|
19
|
+
return this._client.get(`/v1/secrets/${id}`, options);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Replace a secret's value. The name cannot be changed; to rename, create a new
|
|
24
|
+
* secret and delete the old one.
|
|
25
|
+
*/
|
|
26
|
+
update(id: string, body: SecretUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Secret> {
|
|
27
|
+
return this._client.patch(`/v1/secrets/${id}`, { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List project secrets. Supports filtering by creation time.
|
|
32
|
+
*/
|
|
33
|
+
list(query?: SecretListParams, options?: Core.RequestOptions): Core.APIPromise<SecretListResponse>;
|
|
34
|
+
list(options?: Core.RequestOptions): Core.APIPromise<SecretListResponse>;
|
|
35
|
+
list(
|
|
36
|
+
query: SecretListParams | Core.RequestOptions = {},
|
|
37
|
+
options?: Core.RequestOptions,
|
|
38
|
+
): Core.APIPromise<SecretListResponse> {
|
|
39
|
+
if (isRequestOptions(query)) {
|
|
40
|
+
return this.list({}, query);
|
|
41
|
+
}
|
|
42
|
+
return this._client.get('/v1/secrets', { query, ...options });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Delete a Secret
|
|
47
|
+
*/
|
|
48
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
49
|
+
return this._client.delete(`/v1/secrets/${id}`, {
|
|
50
|
+
...options,
|
|
51
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get a Keypair
|
|
57
|
+
*/
|
|
58
|
+
getPublicKey(options?: Core.RequestOptions): Core.APIPromise<SecretsKeypair> {
|
|
59
|
+
return this._client.get('/v1/secrets/keypair', options);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface Secret {
|
|
64
|
+
/**
|
|
65
|
+
* Unique identifier of the secret.
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The name the secret value is stored under.
|
|
71
|
+
*/
|
|
72
|
+
secretKey: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface SecretsKeypair {
|
|
76
|
+
/**
|
|
77
|
+
* Identifier of the keypair the public key was minted from. Pass this back when
|
|
78
|
+
* creating a secret so the ciphertext records which keypair sealed it, which keeps
|
|
79
|
+
* decryption correct across keypair rotation.
|
|
80
|
+
*/
|
|
81
|
+
id: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The project's HPKE public encryption key, base64-encoded. Encrypt secret values
|
|
85
|
+
* with this key before creating a secret.
|
|
86
|
+
*/
|
|
87
|
+
publicKey: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A page of secrets.
|
|
92
|
+
*/
|
|
93
|
+
export interface SecretListResponse {
|
|
94
|
+
/**
|
|
95
|
+
* The page of matching secrets.
|
|
96
|
+
*/
|
|
97
|
+
data: Array<Secret>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The maximum number of results returned in this page.
|
|
101
|
+
*/
|
|
102
|
+
limit: number;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Cursor for the next page. Pass it back as `cursor` on the next request to
|
|
106
|
+
* continue paging. null when there are no more results.
|
|
107
|
+
*/
|
|
108
|
+
nextCursor: string | null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface SecretCreateParams {
|
|
112
|
+
/**
|
|
113
|
+
* The `id` returned by GET /v1/secrets/keypair, identifying the keypair whose
|
|
114
|
+
* public key encrypted the value. Recorded with the secret so decryption stays
|
|
115
|
+
* correct across keypair rotation.
|
|
116
|
+
*/
|
|
117
|
+
keypairId: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The secret value encrypted with HPKE. To seal the secret value before sending,
|
|
121
|
+
* get the project's public key from GET /v1/secrets/keypair. Decode the publicKey
|
|
122
|
+
* using base64 into the raw 32-byte public key. Then, use HPKE Base mode
|
|
123
|
+
* (RFC 9180) with the following algorithm suite: DHKEM(X25519, HKDF-SHA256),
|
|
124
|
+
* HKDF-SHA256, and AES-256-GCM. Set both info and additional authenticated data
|
|
125
|
+
* (AAD) to an empty byte string. Then, create a new sender context using the
|
|
126
|
+
* public key and these settings, and encrypt the secret value as one message. Put
|
|
127
|
+
* the 32-byte encapsulated key before the ciphertext and keep the authentication
|
|
128
|
+
* tag at the end of the ciphertext. Encode the combined bytes with standard
|
|
129
|
+
* base64. Send the result as sealedSecretValue: base64(enc || ciphertext)
|
|
130
|
+
*/
|
|
131
|
+
sealedSecretValue: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The name to store the secret value under.
|
|
135
|
+
*/
|
|
136
|
+
secretKey: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface SecretUpdateParams {
|
|
140
|
+
/**
|
|
141
|
+
* The `id` returned by GET /v1/secrets/keypair, identifying the keypair whose
|
|
142
|
+
* public key encrypted the value. Recorded with the secret so decryption stays
|
|
143
|
+
* correct across keypair rotation.
|
|
144
|
+
*/
|
|
145
|
+
keypairId: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The new secret value encrypted with HPKE. To seal the secret value before
|
|
149
|
+
* sending, get the project's public key from GET /v1/secrets/keypair. Decode the
|
|
150
|
+
* publicKey using base64 into the raw 32-byte public key. Then, use HPKE Base mode
|
|
151
|
+
* (RFC 9180) with the following algorithm suite: DHKEM(X25519, HKDF-SHA256),
|
|
152
|
+
* HKDF-SHA256, and AES-256-GCM. Set both info and additional authenticated data
|
|
153
|
+
* (AAD) to an empty byte string. Then, create a new sender context using the
|
|
154
|
+
* public key and these settings, and encrypt the secret value as one message. Put
|
|
155
|
+
* the 32-byte encapsulated key before the ciphertext and keep the authentication
|
|
156
|
+
* tag at the end of the ciphertext. Encode the combined bytes with standard
|
|
157
|
+
* base64. Send the result as sealedSecretValue: base64(enc || ciphertext)
|
|
158
|
+
*/
|
|
159
|
+
sealedSecretValue: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface SecretListParams {
|
|
163
|
+
/**
|
|
164
|
+
* Pagination cursor. Pass the nextCursor from the previous response to fetch the
|
|
165
|
+
* next page. Omit to start from the first page.
|
|
166
|
+
*/
|
|
167
|
+
cursor?: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Only return secrets created on or before this timestamp (inclusive). RFC 3339,
|
|
171
|
+
* e.g. 2026-01-20T00:00:00Z.
|
|
172
|
+
*/
|
|
173
|
+
endAt?: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Maximum number of results to return.
|
|
177
|
+
*/
|
|
178
|
+
limit?: number;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Only return secrets created on or after this timestamp (inclusive). RFC 3339,
|
|
182
|
+
* e.g. 2026-01-19T00:00:00Z.
|
|
183
|
+
*/
|
|
184
|
+
startAt?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export declare namespace Secrets {
|
|
188
|
+
export {
|
|
189
|
+
type Secret as Secret,
|
|
190
|
+
type SecretsKeypair as SecretsKeypair,
|
|
191
|
+
type SecretListResponse as SecretListResponse,
|
|
192
|
+
type SecretCreateParams as SecretCreateParams,
|
|
193
|
+
type SecretUpdateParams as SecretUpdateParams,
|
|
194
|
+
type SecretListParams as SecretListParams,
|
|
195
|
+
};
|
|
196
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.22.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.22.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.22.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|