@bctrl/sdk 1.0.9 → 1.0.11
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/README.md +43 -72
- package/dist/account.d.ts +4 -1
- package/dist/account.js +12 -0
- package/dist/aiTypes.d.ts +0 -3
- package/dist/bctrl.d.ts +9 -3
- package/dist/bctrl.js +18 -6
- package/dist/browserExtensionTypes.d.ts +2 -2
- package/dist/browserExtensions.js +6 -6
- package/dist/conversations.d.ts +27 -0
- package/dist/conversations.js +63 -0
- package/dist/generated/openapi-types.d.ts +7404 -6023
- package/dist/generated/tool-types.d.ts +60 -0
- package/dist/http.d.ts +5 -0
- package/dist/http.js +44 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.js +7 -6
- package/dist/node.d.ts +43 -101
- package/dist/node.js +6 -8
- package/dist/proxies.d.ts +15 -1
- package/dist/proxies.js +28 -0
- package/dist/proxyTypes.d.ts +8 -2
- package/dist/runs.d.ts +13 -102
- package/dist/runs.js +21 -114
- package/dist/runtimes.d.ts +11 -53
- package/dist/runtimes.js +18 -221
- package/dist/spaces.d.ts +1 -17
- package/dist/spaces.js +0 -75
- package/dist/toolCallTypes.d.ts +2 -2
- package/dist/toolCalls.d.ts +4 -1
- package/dist/toolCalls.js +14 -0
- package/dist/tools.d.ts +13 -15
- package/dist/tools.js +24 -19
- package/dist/toolsetTypes.d.ts +1 -1
- package/dist/types.d.ts +64 -183
- package/dist/views.d.ts +12 -0
- package/dist/views.js +34 -0
- package/dist/webhooks.d.ts +30 -0
- package/dist/webhooks.js +71 -0
- package/package.json +14 -12
- package/dist/invocations.d.ts +0 -125
- package/dist/invocations.js +0 -199
- package/dist/vault.d.ts +0 -14
- package/dist/vault.js +0 -37
- package/dist/vaultTypes.d.ts +0 -9
- /package/dist/{vaultTypes.js → generated/tool-types.js} +0 -0
package/dist/invocations.d.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { type V1HttpClient, type V1IdempotencyOptions } from './http.js';
|
|
2
|
-
import { type JsonSchemaLike } from './schemas.js';
|
|
3
|
-
import type { JsonObject, V1Invocation, V1RuntimeInvocationCreateRequest, V1RuntimeInvocationFileInput, V1RuntimeInvocationManagedTools, V1RuntimeTargetSelector, V1InvocationWaitRequest, V1InvocationWaitResponse, V1AiModelSelection } from './types.js';
|
|
4
|
-
export type StagehandVariablePrimitive = string | number | boolean;
|
|
5
|
-
export type StagehandVariableValue = StagehandVariablePrimitive | {
|
|
6
|
-
value: StagehandVariablePrimitive;
|
|
7
|
-
description?: string;
|
|
8
|
-
};
|
|
9
|
-
export type StagehandVariables = Record<string, StagehandVariableValue>;
|
|
10
|
-
interface RuntimeInvocationCommonOptions {
|
|
11
|
-
target?: V1RuntimeTargetSelector;
|
|
12
|
-
metadata?: JsonObject;
|
|
13
|
-
}
|
|
14
|
-
interface RuntimeAgentCommonOptions extends RuntimeInvocationCommonOptions {
|
|
15
|
-
toolsetId?: string;
|
|
16
|
-
toolIds?: string[];
|
|
17
|
-
tools?: V1RuntimeInvocationManagedTools;
|
|
18
|
-
files?: V1RuntimeInvocationFileInput[];
|
|
19
|
-
schema?: JsonSchemaLike;
|
|
20
|
-
timeoutSeconds?: number;
|
|
21
|
-
}
|
|
22
|
-
interface AiSelectionOptions {
|
|
23
|
-
model?: V1AiModelSelection;
|
|
24
|
-
temperature?: number;
|
|
25
|
-
}
|
|
26
|
-
type StagehandActionInput = Extract<V1RuntimeInvocationCreateRequest, {
|
|
27
|
-
action: 'act';
|
|
28
|
-
}>['stagehandAction'];
|
|
29
|
-
export interface StagehandActOptions extends RuntimeInvocationCommonOptions, AiSelectionOptions {
|
|
30
|
-
instruction: string;
|
|
31
|
-
stagehandAction?: StagehandActionInput;
|
|
32
|
-
timeoutSeconds?: number;
|
|
33
|
-
}
|
|
34
|
-
export interface StagehandObserveOptions extends RuntimeInvocationCommonOptions, AiSelectionOptions {
|
|
35
|
-
instruction: string;
|
|
36
|
-
selector?: string;
|
|
37
|
-
timeoutSeconds?: number;
|
|
38
|
-
}
|
|
39
|
-
export type StagehandExtractOptions<TSchema extends JsonSchemaLike | undefined = undefined> = RuntimeInvocationCommonOptions & AiSelectionOptions & {
|
|
40
|
-
instruction?: string;
|
|
41
|
-
selector?: string;
|
|
42
|
-
schema?: TSchema;
|
|
43
|
-
timeoutSeconds?: number;
|
|
44
|
-
};
|
|
45
|
-
export interface StagehandAgentOptions extends RuntimeAgentCommonOptions, AiSelectionOptions {
|
|
46
|
-
instruction: string;
|
|
47
|
-
maxSteps?: number;
|
|
48
|
-
variables?: StagehandVariables;
|
|
49
|
-
executionModel?: V1AiModelSelection;
|
|
50
|
-
systemPrompt?: string;
|
|
51
|
-
highlightCursor?: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface BrowserUseAgentOptions extends RuntimeAgentCommonOptions, AiSelectionOptions {
|
|
54
|
-
instruction: string;
|
|
55
|
-
maxSteps?: number;
|
|
56
|
-
extractionModel?: V1AiModelSelection;
|
|
57
|
-
fallbackModel?: V1AiModelSelection;
|
|
58
|
-
useVision?: boolean | 'auto';
|
|
59
|
-
visionDetailLevel?: 'low' | 'high' | 'auto';
|
|
60
|
-
flashMode?: boolean;
|
|
61
|
-
enablePlanning?: boolean;
|
|
62
|
-
maxFailures?: number;
|
|
63
|
-
stepTimeoutSeconds?: number;
|
|
64
|
-
maxActionsPerStep?: number;
|
|
65
|
-
maxHistoryItems?: number | null;
|
|
66
|
-
useThinking?: boolean;
|
|
67
|
-
directlyOpenUrl?: boolean;
|
|
68
|
-
includeAttributes?: string[];
|
|
69
|
-
overrideSystemMessage?: string;
|
|
70
|
-
extendSystemMessage?: string;
|
|
71
|
-
sensitiveData?: Record<string, string | Record<string, string>>;
|
|
72
|
-
}
|
|
73
|
-
type InvocationCreateWithSchema<T extends V1RuntimeInvocationCreateRequest> = Omit<T, 'outputSchema'> & {
|
|
74
|
-
schema?: JsonSchemaLike;
|
|
75
|
-
};
|
|
76
|
-
type ExtractInvocationCreateRequest = Extract<V1RuntimeInvocationCreateRequest, {
|
|
77
|
-
action: 'extract';
|
|
78
|
-
}>;
|
|
79
|
-
type StagehandAgentInvocationCreateRequest = Extract<V1RuntimeInvocationCreateRequest, {
|
|
80
|
-
action: 'stagehandAgent';
|
|
81
|
-
}>;
|
|
82
|
-
type BrowserUseInvocationCreateRequest = Extract<V1RuntimeInvocationCreateRequest, {
|
|
83
|
-
action: 'browserUse';
|
|
84
|
-
}>;
|
|
85
|
-
type InvocationCreateSchemaInput = InvocationCreateWithSchema<ExtractInvocationCreateRequest> | InvocationCreateWithSchema<StagehandAgentInvocationCreateRequest> | InvocationCreateWithSchema<BrowserUseInvocationCreateRequest>;
|
|
86
|
-
export type V1RuntimeInvocationCreateInput = Exclude<V1RuntimeInvocationCreateRequest, ExtractInvocationCreateRequest | StagehandAgentInvocationCreateRequest | BrowserUseInvocationCreateRequest> | InvocationCreateSchemaInput;
|
|
87
|
-
export interface V1InvocationWaitOptions extends V1InvocationWaitRequest {
|
|
88
|
-
signal?: AbortSignal;
|
|
89
|
-
}
|
|
90
|
-
export interface V1InvocationCreateAndWaitOptions extends V1IdempotencyOptions {
|
|
91
|
-
/**
|
|
92
|
-
* Overall client-side wait budget across repeated long-poll requests.
|
|
93
|
-
* The server-side invocation timeout still belongs in the invocation body.
|
|
94
|
-
*/
|
|
95
|
-
timeoutSeconds?: number;
|
|
96
|
-
/**
|
|
97
|
-
* Per-request long-poll timeout sent to the wait endpoint.
|
|
98
|
-
*/
|
|
99
|
-
pollTimeoutSeconds?: number;
|
|
100
|
-
signal?: AbortSignal;
|
|
101
|
-
}
|
|
102
|
-
export declare class V1RuntimeInvocationsNamespaceClient {
|
|
103
|
-
private readonly http;
|
|
104
|
-
readonly stagehand: V1RuntimeStagehandInvocationsNamespaceClient;
|
|
105
|
-
readonly browserUse: V1RuntimeBrowserUseInvocationsNamespaceClient;
|
|
106
|
-
constructor(http: V1HttpClient);
|
|
107
|
-
create(runtimeId: string, request: V1RuntimeInvocationCreateInput, options?: V1IdempotencyOptions): Promise<V1Invocation>;
|
|
108
|
-
wait(runtimeId: string, invocationId: string, request?: V1InvocationWaitOptions): Promise<V1InvocationWaitResponse>;
|
|
109
|
-
cancel(runtimeId: string, invocationId: string): Promise<V1Invocation>;
|
|
110
|
-
createAndWait(runtimeId: string, request: V1RuntimeInvocationCreateInput, options?: V1InvocationCreateAndWaitOptions): Promise<V1Invocation>;
|
|
111
|
-
}
|
|
112
|
-
export declare class V1RuntimeStagehandInvocationsNamespaceClient {
|
|
113
|
-
private readonly invocations;
|
|
114
|
-
constructor(invocations: V1RuntimeInvocationsNamespaceClient);
|
|
115
|
-
act(runtimeId: string, options: StagehandActOptions): Promise<V1Invocation>;
|
|
116
|
-
observe(runtimeId: string, options: StagehandObserveOptions): Promise<V1Invocation>;
|
|
117
|
-
extract<TSchema extends JsonSchemaLike | undefined = undefined>(runtimeId: string, options: StagehandExtractOptions<TSchema>): Promise<V1Invocation>;
|
|
118
|
-
agent(runtimeId: string, options: StagehandAgentOptions): Promise<V1Invocation>;
|
|
119
|
-
}
|
|
120
|
-
export declare class V1RuntimeBrowserUseInvocationsNamespaceClient {
|
|
121
|
-
private readonly invocations;
|
|
122
|
-
constructor(invocations: V1RuntimeInvocationsNamespaceClient);
|
|
123
|
-
agent(runtimeId: string, options: BrowserUseAgentOptions): Promise<V1Invocation>;
|
|
124
|
-
}
|
|
125
|
-
export {};
|
package/dist/invocations.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { v1IdempotencyHeaders } from './http.js';
|
|
2
|
-
import { toOutputSchema } from './schemas.js';
|
|
3
|
-
import { abortableSleep } from './utils.js';
|
|
4
|
-
// Live control is runtime-scoped; observability reads are run-scoped.
|
|
5
|
-
function runtimeInvocationActionPath(runtimeId, invocationId, action) {
|
|
6
|
-
return `/runtimes/${encodeURIComponent(runtimeId)}/invocations/${encodeURIComponent(invocationId)}/${action}`;
|
|
7
|
-
}
|
|
8
|
-
function createRuntimeInvocation(http, runtimeId, request, options) {
|
|
9
|
-
return http.request(`/runtimes/${encodeURIComponent(runtimeId)}/invocations`, {
|
|
10
|
-
method: 'POST',
|
|
11
|
-
body: prepareInvocationCreateRequest(request),
|
|
12
|
-
headers: v1IdempotencyHeaders(options),
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export class V1RuntimeInvocationsNamespaceClient {
|
|
16
|
-
http;
|
|
17
|
-
stagehand;
|
|
18
|
-
browserUse;
|
|
19
|
-
constructor(http) {
|
|
20
|
-
this.http = http;
|
|
21
|
-
this.stagehand = new V1RuntimeStagehandInvocationsNamespaceClient(this);
|
|
22
|
-
this.browserUse = new V1RuntimeBrowserUseInvocationsNamespaceClient(this);
|
|
23
|
-
}
|
|
24
|
-
create(runtimeId, request, options) {
|
|
25
|
-
return createRuntimeInvocation(this.http, runtimeId, request, options);
|
|
26
|
-
}
|
|
27
|
-
wait(runtimeId, invocationId, request = {}) {
|
|
28
|
-
return new V1RuntimeInvocationsClient(this.http, runtimeId).wait(invocationId, request);
|
|
29
|
-
}
|
|
30
|
-
cancel(runtimeId, invocationId) {
|
|
31
|
-
return new V1RuntimeInvocationsClient(this.http, runtimeId).cancel(invocationId);
|
|
32
|
-
}
|
|
33
|
-
createAndWait(runtimeId, request, options = {}) {
|
|
34
|
-
return new V1RuntimeInvocationsClient(this.http, runtimeId).createAndWait(request, options);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
class V1RuntimeInvocationsClient {
|
|
38
|
-
http;
|
|
39
|
-
runtimeId;
|
|
40
|
-
stagehand;
|
|
41
|
-
browserUse;
|
|
42
|
-
constructor(http, runtimeId) {
|
|
43
|
-
this.http = http;
|
|
44
|
-
this.runtimeId = runtimeId;
|
|
45
|
-
this.stagehand = new V1RuntimeStagehandInvocationsClient(this);
|
|
46
|
-
this.browserUse = new V1RuntimeBrowserUseInvocationsClient(this);
|
|
47
|
-
}
|
|
48
|
-
async create(request, options) {
|
|
49
|
-
return createRuntimeInvocation(this.http, this.runtimeId, request, options);
|
|
50
|
-
}
|
|
51
|
-
wait(invocationId, request = {}) {
|
|
52
|
-
const { signal, ...body } = request;
|
|
53
|
-
return this.http.request(runtimeInvocationActionPath(this.runtimeId, invocationId, 'wait'), {
|
|
54
|
-
method: 'POST',
|
|
55
|
-
body,
|
|
56
|
-
signal,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
cancel(invocationId) {
|
|
60
|
-
return this.http.request(runtimeInvocationActionPath(this.runtimeId, invocationId, 'cancel'), {
|
|
61
|
-
method: 'POST',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
async createAndWait(request, options = {}) {
|
|
65
|
-
const invocation = await this.create(request, options);
|
|
66
|
-
return waitForInvocation(this, invocation.id, options);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
class V1RuntimeStagehandInvocationsClient {
|
|
70
|
-
invocations;
|
|
71
|
-
constructor(invocations) {
|
|
72
|
-
this.invocations = invocations;
|
|
73
|
-
}
|
|
74
|
-
act(options) {
|
|
75
|
-
return this.invocations.create({
|
|
76
|
-
action: 'act',
|
|
77
|
-
...options,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
observe(options) {
|
|
81
|
-
return this.invocations.create({
|
|
82
|
-
action: 'observe',
|
|
83
|
-
...options,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
extract(options) {
|
|
87
|
-
const { schema, ...common } = options;
|
|
88
|
-
return this.invocations.create({
|
|
89
|
-
action: 'extract',
|
|
90
|
-
...common,
|
|
91
|
-
...(schema !== undefined
|
|
92
|
-
? { outputSchema: toOutputSchema(schema, 'Stagehand extract schema') }
|
|
93
|
-
: {}),
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
agent(options) {
|
|
97
|
-
return this.invocations.create({
|
|
98
|
-
action: 'stagehandAgent',
|
|
99
|
-
...options,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
class V1RuntimeBrowserUseInvocationsClient {
|
|
104
|
-
invocations;
|
|
105
|
-
constructor(invocations) {
|
|
106
|
-
this.invocations = invocations;
|
|
107
|
-
}
|
|
108
|
-
agent(options) {
|
|
109
|
-
return this.invocations.create({
|
|
110
|
-
action: 'browserUse',
|
|
111
|
-
...options,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
export class V1RuntimeStagehandInvocationsNamespaceClient {
|
|
116
|
-
invocations;
|
|
117
|
-
constructor(invocations) {
|
|
118
|
-
this.invocations = invocations;
|
|
119
|
-
}
|
|
120
|
-
act(runtimeId, options) {
|
|
121
|
-
return this.invocations.create(runtimeId, {
|
|
122
|
-
action: 'act',
|
|
123
|
-
...options,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
observe(runtimeId, options) {
|
|
127
|
-
return this.invocations.create(runtimeId, {
|
|
128
|
-
action: 'observe',
|
|
129
|
-
...options,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
extract(runtimeId, options) {
|
|
133
|
-
const { schema, ...common } = options;
|
|
134
|
-
return this.invocations.create(runtimeId, {
|
|
135
|
-
action: 'extract',
|
|
136
|
-
...common,
|
|
137
|
-
...(schema !== undefined
|
|
138
|
-
? { outputSchema: toOutputSchema(schema, 'Stagehand extract schema') }
|
|
139
|
-
: {}),
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
agent(runtimeId, options) {
|
|
143
|
-
return this.invocations.create(runtimeId, {
|
|
144
|
-
action: 'stagehandAgent',
|
|
145
|
-
...options,
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
export class V1RuntimeBrowserUseInvocationsNamespaceClient {
|
|
150
|
-
invocations;
|
|
151
|
-
constructor(invocations) {
|
|
152
|
-
this.invocations = invocations;
|
|
153
|
-
}
|
|
154
|
-
agent(runtimeId, options) {
|
|
155
|
-
return this.invocations.create(runtimeId, {
|
|
156
|
-
action: 'browserUse',
|
|
157
|
-
...options,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function prepareInvocationCreateRequest(request) {
|
|
162
|
-
if (!hasInvocationSchema(request)) {
|
|
163
|
-
return request;
|
|
164
|
-
}
|
|
165
|
-
const { schema, ...body } = request;
|
|
166
|
-
return {
|
|
167
|
-
...body,
|
|
168
|
-
outputSchema: toOutputSchema(schema, 'Invocation schema'),
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function hasInvocationSchema(request) {
|
|
172
|
-
return 'schema' in request && request.schema !== undefined;
|
|
173
|
-
}
|
|
174
|
-
async function waitForInvocation(client, invocationId, options) {
|
|
175
|
-
const deadline = options.timeoutSeconds === undefined ? undefined : Date.now() + options.timeoutSeconds * 1000;
|
|
176
|
-
for (;;) {
|
|
177
|
-
if (deadline !== undefined && Date.now() >= deadline) {
|
|
178
|
-
throw new Error(`Invocation ${invocationId} did not finish before timeout`);
|
|
179
|
-
}
|
|
180
|
-
const remainingMs = deadline === undefined ? undefined : Math.max(1, deadline - Date.now());
|
|
181
|
-
const remainingSeconds = remainingMs === undefined ? undefined : Math.max(1, Math.ceil(remainingMs / 1000));
|
|
182
|
-
const timeoutSeconds = options.pollTimeoutSeconds === undefined
|
|
183
|
-
? remainingSeconds
|
|
184
|
-
: remainingSeconds === undefined
|
|
185
|
-
? options.pollTimeoutSeconds
|
|
186
|
-
: Math.min(options.pollTimeoutSeconds, remainingSeconds);
|
|
187
|
-
const result = await client.wait(invocationId, {
|
|
188
|
-
...(timeoutSeconds === undefined ? {} : { timeoutSeconds }),
|
|
189
|
-
signal: options.signal,
|
|
190
|
-
});
|
|
191
|
-
if (result.waitStatus === 'completed') {
|
|
192
|
-
return result;
|
|
193
|
-
}
|
|
194
|
-
const sleepMs = deadline === undefined
|
|
195
|
-
? (result.retryAfterSeconds ?? 1) * 1000
|
|
196
|
-
: Math.min((result.retryAfterSeconds ?? 1) * 1000, Math.max(0, deadline - Date.now()));
|
|
197
|
-
await abortableSleep(sleepMs, options.signal);
|
|
198
|
-
}
|
|
199
|
-
}
|
package/dist/vault.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { V1HttpClient } from './http.js';
|
|
2
|
-
import type { V1ListEnvelope, V1VaultSecret, V1VaultSecretDeleteResponse, V1VaultSecretListQuery, V1VaultSecretPatchRequest, V1VaultSecretUpsertRequest, V1VaultSecretValue, V1VaultTotpResponse } from './types.js';
|
|
3
|
-
export declare class V1VaultClient {
|
|
4
|
-
private readonly http;
|
|
5
|
-
constructor(http: V1HttpClient);
|
|
6
|
-
list(query?: V1VaultSecretListQuery): Promise<V1ListEnvelope<V1VaultSecret>>;
|
|
7
|
-
iter(query?: V1VaultSecretListQuery): AsyncGenerator<V1VaultSecret, void, undefined>;
|
|
8
|
-
get(key: string): Promise<V1VaultSecret>;
|
|
9
|
-
value(key: string): Promise<V1VaultSecretValue>;
|
|
10
|
-
upsert(key: string, request: V1VaultSecretUpsertRequest): Promise<V1VaultSecret>;
|
|
11
|
-
update(key: string, request: V1VaultSecretPatchRequest): Promise<V1VaultSecret>;
|
|
12
|
-
totp(key: string): Promise<V1VaultTotpResponse>;
|
|
13
|
-
delete(key: string): Promise<V1VaultSecretDeleteResponse>;
|
|
14
|
-
}
|
package/dist/vault.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { iterateV1Pages } from './pagination.js';
|
|
2
|
-
export class V1VaultClient {
|
|
3
|
-
http;
|
|
4
|
-
constructor(http) {
|
|
5
|
-
this.http = http;
|
|
6
|
-
}
|
|
7
|
-
list(query = {}) {
|
|
8
|
-
return this.http.request('/vault/secrets', { query });
|
|
9
|
-
}
|
|
10
|
-
iter(query = {}) {
|
|
11
|
-
return iterateV1Pages(query, (pageQuery) => this.list(pageQuery));
|
|
12
|
-
}
|
|
13
|
-
get(key) {
|
|
14
|
-
return this.http.request(`/vault/secrets/${encodeURIComponent(key)}`);
|
|
15
|
-
}
|
|
16
|
-
value(key) {
|
|
17
|
-
return this.http.request(`/vault/secrets/${encodeURIComponent(key)}/value`);
|
|
18
|
-
}
|
|
19
|
-
upsert(key, request) {
|
|
20
|
-
return this.http.request(`/vault/secrets/${encodeURIComponent(key)}`, {
|
|
21
|
-
method: 'PUT',
|
|
22
|
-
body: request,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
update(key, request) {
|
|
26
|
-
return this.http.request(`/vault/secrets/${encodeURIComponent(key)}`, {
|
|
27
|
-
method: 'PATCH',
|
|
28
|
-
body: request,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
totp(key) {
|
|
32
|
-
return this.http.request(`/vault/secrets/${encodeURIComponent(key)}/totp`);
|
|
33
|
-
}
|
|
34
|
-
delete(key) {
|
|
35
|
-
return this.http.request(`/vault/secrets/${encodeURIComponent(key)}`, { method: 'DELETE' });
|
|
36
|
-
}
|
|
37
|
-
}
|
package/dist/vaultTypes.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { OpenApiQuery, OpenApiSchemas } from './openapi.js';
|
|
2
|
-
export type V1VaultSecretType = OpenApiSchemas['VaultSecret']['type'];
|
|
3
|
-
export type V1VaultSecret = OpenApiSchemas['VaultSecret'];
|
|
4
|
-
export type V1VaultSecretListQuery = OpenApiQuery<'vault.secrets.list'>;
|
|
5
|
-
export type V1VaultSecretUpsertRequest = OpenApiSchemas['VaultSecretUpsertRequest'];
|
|
6
|
-
export type V1VaultSecretPatchRequest = OpenApiSchemas['VaultSecretPatchRequest'];
|
|
7
|
-
export type V1VaultSecretValue = OpenApiSchemas['VaultSecretValue'];
|
|
8
|
-
export type V1VaultTotpResponse = OpenApiSchemas['VaultTotpResponse'];
|
|
9
|
-
export type V1VaultSecretDeleteResponse = OpenApiSchemas['VaultSecretDeleteResponse'];
|
|
File without changes
|