@distilled.cloud/steel 1.0.0-rc.19 → 1.0.0-rc.21
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 +9 -6
- package/lib/.lazy.json +1 -1
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +8 -3
- package/lib/credentials.d.ts.map +1 -1
- package/lib/errors.d.ts +12 -8
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/protocol.d.ts +9 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/services/api_keys.d.ts +38 -0
- package/lib/services/api_keys.d.ts.map +1 -1
- package/lib/services/api_keys.js +1 -1
- package/lib/services/api_keys.js.map +1 -1
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -1
- package/lib/services/auth.js.map +1 -1
- package/lib/services/browser_tools.d.ts +35 -0
- package/lib/services/browser_tools.d.ts.map +1 -1
- package/lib/services/browser_tools.js +1 -1
- package/lib/services/browser_tools.js.map +1 -1
- package/lib/services/captchas.d.ts +32 -0
- package/lib/services/captchas.d.ts.map +1 -1
- package/lib/services/captchas.js +1 -1
- package/lib/services/captchas.js.map +1 -1
- package/lib/services/credentials.d.ts +54 -0
- package/lib/services/credentials.d.ts.map +1 -1
- package/lib/services/credentials.js +1 -1
- package/lib/services/credentials.js.map +1 -1
- package/lib/services/extensions.d.ts +47 -1
- package/lib/services/extensions.d.ts.map +1 -1
- package/lib/services/extensions.js +1 -1
- package/lib/services/extensions.js.map +1 -1
- package/lib/services/files.d.ts +57 -3
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +1 -1
- package/lib/services/files.js.map +1 -1
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +2 -0
- package/lib/services/profiles.d.ts +64 -5
- package/lib/services/profiles.d.ts.map +1 -1
- package/lib/services/profiles.js +1 -1
- package/lib/services/profiles.js.map +1 -1
- package/lib/services/projects.d.ts +32 -0
- package/lib/services/projects.d.ts.map +1 -1
- package/lib/services/projects.js +1 -1
- package/lib/services/projects.js.map +1 -1
- package/lib/services/secret_connections.d.ts +233 -0
- package/lib/services/secret_connections.d.ts.map +1 -0
- package/lib/services/secret_connections.js +2 -0
- package/lib/services/secret_connections.js.map +1 -0
- package/lib/services/sessions.d.ts +526 -233
- package/lib/services/sessions.d.ts.map +1 -1
- package/lib/services/sessions.js +50 -41
- package/lib/services/sessions.js.map +1 -1
- package/lib/services/vaults.d.ts +149 -0
- package/lib/services/vaults.d.ts.map +1 -0
- package/lib/services/vaults.js +2 -0
- package/lib/services/vaults.js.map +1 -0
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/secret_connections.js +1 -0
- package/lib/services.lazy/sessions.js +2 -2
- package/lib/services.lazy/vaults.js +1 -0
- package/lib/traits.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/credentials.ts +18 -12
- package/src/errors.ts +13 -5
- package/src/index.ts +2 -3
- package/src/protocol.ts +18 -30
- package/src/services/api_keys.ts +87 -7
- package/src/services/auth.ts +3 -2
- package/src/services/browser_tools.ts +101 -28
- package/src/services/captchas.ts +85 -17
- package/src/services/credentials.ts +129 -25
- package/src/services/extensions.ts +136 -34
- package/src/services/files.ts +172 -58
- package/src/services/index.ts +2 -0
- package/src/services/profiles.ts +198 -60
- package/src/services/projects.ts +79 -12
- package/src/services/secret_connections.ts +538 -0
- package/src/services/sessions.ts +1384 -794
- package/src/services/vaults.ts +369 -0
- package/lib/index.lazy.js +0 -7
- package/lib/index.lazy.js.map +0 -1
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-steel/specs/openapi.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import type * as Redacted from "effect/Redacted";
|
|
7
|
+
import { SteelServiceErrors } from "../errors.ts";
|
|
8
|
+
import { SteelProtocol, type SteelOpError, type SteelOpContext } from "../protocol.ts";
|
|
9
|
+
import * as Retry from "../retry.ts";
|
|
10
|
+
import * as T from "../traits.ts";
|
|
11
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
12
|
+
const __s: any[] = [];
|
|
13
|
+
|
|
14
|
+
export type { SteelOpError, SteelOpContext };
|
|
15
|
+
|
|
16
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
17
|
+
const TELEMETRY = {
|
|
18
|
+
system: "steel-api",
|
|
19
|
+
responseHeaders: [
|
|
20
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
21
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
22
|
+
],
|
|
23
|
+
prefix: "Steel",
|
|
24
|
+
service: "SecretConnections",
|
|
25
|
+
labels: "steel",
|
|
26
|
+
propagate: "w3c",
|
|
27
|
+
} as const;
|
|
28
|
+
|
|
29
|
+
export class BadRequest
|
|
30
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
31
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
32
|
+
code: S.Number,
|
|
33
|
+
message: S.String,
|
|
34
|
+
body: /*@__PURE__*/ S.optional(
|
|
35
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
36
|
+
),
|
|
37
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
38
|
+
}).pipe(C.withBadRequestError),
|
|
39
|
+
[{ status: 400 }],
|
|
40
|
+
)
|
|
41
|
+
{
|
|
42
|
+
declare readonly body?: Error400Body | string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class Conflict
|
|
46
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
47
|
+
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
48
|
+
code: S.Number,
|
|
49
|
+
message: S.String,
|
|
50
|
+
body: /*@__PURE__*/ S.optional(
|
|
51
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
52
|
+
),
|
|
53
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
54
|
+
}).pipe(C.withConflictError),
|
|
55
|
+
[{ status: 409 }],
|
|
56
|
+
)
|
|
57
|
+
{
|
|
58
|
+
declare readonly body?: Error400Body | string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class Forbidden
|
|
62
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
63
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
64
|
+
code: S.Number,
|
|
65
|
+
message: S.String,
|
|
66
|
+
body: /*@__PURE__*/ S.optional(
|
|
67
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
68
|
+
),
|
|
69
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
70
|
+
}).pipe(C.withAuthError),
|
|
71
|
+
[{ status: 403 }],
|
|
72
|
+
)
|
|
73
|
+
{
|
|
74
|
+
declare readonly body?: Error400Body | string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export class NotFound
|
|
78
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
79
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
80
|
+
code: S.Number,
|
|
81
|
+
message: S.String,
|
|
82
|
+
body: /*@__PURE__*/ S.optional(
|
|
83
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
84
|
+
),
|
|
85
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
86
|
+
}).pipe(C.withBadRequestError),
|
|
87
|
+
[{ status: 404 }],
|
|
88
|
+
)
|
|
89
|
+
{
|
|
90
|
+
declare readonly body?: Error400Body | string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type CreateSecretConnectionRequestAuthType = "token" | "approle";
|
|
94
|
+
/** Write-only provider authentication. Supply a service account token for 1Password, a token for HashiCorp token auth, or a role ID and secret ID for HashiCorp AppRole. */
|
|
95
|
+
export interface CreateSecretConnectionRequestAuth {
|
|
96
|
+
mount?: string | undefined;
|
|
97
|
+
/** Write-only; never returned by the API. */
|
|
98
|
+
roleId?: string | undefined;
|
|
99
|
+
/** Write-only; never returned by the API. */
|
|
100
|
+
secretId?: string | undefined;
|
|
101
|
+
/** Write-only; never returned by the API. */
|
|
102
|
+
serviceAccountToken?: string | Redacted.Redacted<string> | undefined;
|
|
103
|
+
/** Write-only; never returned by the API. */
|
|
104
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
105
|
+
type?: CreateSecretConnectionRequestAuthType | (string & {}) | undefined;
|
|
106
|
+
}
|
|
107
|
+
export interface CreateSecretConnectionRequestConfig {
|
|
108
|
+
address: string;
|
|
109
|
+
caPem?: string | undefined;
|
|
110
|
+
namespace?: string | undefined;
|
|
111
|
+
}
|
|
112
|
+
export type CreateSecretConnectionRequestProvider = "1password" | "hashicorp_vault";
|
|
113
|
+
export interface CreateSecretConnectionRequestTokenBudget {
|
|
114
|
+
burst: number;
|
|
115
|
+
/** Tokens per second, with at most three decimal places. */
|
|
116
|
+
refillPerSecond: number;
|
|
117
|
+
}
|
|
118
|
+
export interface CreateSecretConnectionRequest {
|
|
119
|
+
/** Write-only provider authentication. Supply a service account token for 1Password, a token for HashiCorp token auth, or a role ID and secret ID for HashiCorp AppRole. */
|
|
120
|
+
auth: CreateSecretConnectionRequestAuth;
|
|
121
|
+
config?: CreateSecretConnectionRequestConfig | undefined;
|
|
122
|
+
name: string;
|
|
123
|
+
projectId?: string | undefined;
|
|
124
|
+
provider: CreateSecretConnectionRequestProvider | (string & {});
|
|
125
|
+
tokenBudget?: CreateSecretConnectionRequestTokenBudget | null | undefined;
|
|
126
|
+
}
|
|
127
|
+
export type CreateSecretConnectionResponseProvider = "1password" | "hashicorp_vault";
|
|
128
|
+
export type CreateSecretConnectionResponseTokenBudget = CreateSecretConnectionRequestTokenBudget;
|
|
129
|
+
export interface CreateSecretConnectionResponse {
|
|
130
|
+
createdAt: string;
|
|
131
|
+
enabled: boolean;
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
provider: CreateSecretConnectionResponseProvider;
|
|
135
|
+
tokenBudget: CreateSecretConnectionRequestTokenBudget | null;
|
|
136
|
+
updatedAt: string;
|
|
137
|
+
/** For 1Password, a SHA-256 diagnostic fingerprint of sorted accessible vault IDs. For HashiCorp Vault, a SHA-256 fingerprint of the normalized endpoint and namespace. Neither proves immutable account or server identity. */
|
|
138
|
+
vaultFingerprint: string;
|
|
139
|
+
version: number;
|
|
140
|
+
}
|
|
141
|
+
export interface DeleteSecretConnectionRequest {
|
|
142
|
+
id: string;
|
|
143
|
+
projectId?: string | undefined;
|
|
144
|
+
}
|
|
145
|
+
export interface DeleteSecretConnectionResponse {}
|
|
146
|
+
export interface GetSecretConnectionRequest {
|
|
147
|
+
id: string;
|
|
148
|
+
projectId?: string | undefined;
|
|
149
|
+
}
|
|
150
|
+
export type GetSecretConnectionResponseProvider = "1password" | "hashicorp_vault";
|
|
151
|
+
export type GetSecretConnectionResponseTokenBudget = CreateSecretConnectionRequestTokenBudget;
|
|
152
|
+
export interface GetSecretConnectionResponse {
|
|
153
|
+
createdAt: string;
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
provider: GetSecretConnectionResponseProvider;
|
|
158
|
+
tokenBudget: CreateSecretConnectionRequestTokenBudget | null;
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
/** For 1Password, a SHA-256 diagnostic fingerprint of sorted accessible vault IDs. For HashiCorp Vault, a SHA-256 fingerprint of the normalized endpoint and namespace. Neither proves immutable account or server identity. */
|
|
161
|
+
vaultFingerprint: string;
|
|
162
|
+
version: number;
|
|
163
|
+
}
|
|
164
|
+
export interface ListSecretConnectionsRequest {
|
|
165
|
+
projectId?: string | undefined;
|
|
166
|
+
}
|
|
167
|
+
export type ListSecretConnectionsResponseConnectionsItemProvider = "1password" | "hashicorp_vault";
|
|
168
|
+
export type ListSecretConnectionsResponseConnectionsItemTokenBudget =
|
|
169
|
+
CreateSecretConnectionRequestTokenBudget;
|
|
170
|
+
export interface ListSecretConnectionsResponseConnectionsItem {
|
|
171
|
+
createdAt: string;
|
|
172
|
+
enabled: boolean;
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
provider: ListSecretConnectionsResponseConnectionsItemProvider;
|
|
176
|
+
tokenBudget: CreateSecretConnectionRequestTokenBudget | null;
|
|
177
|
+
updatedAt: string;
|
|
178
|
+
/** For 1Password, a SHA-256 diagnostic fingerprint of sorted accessible vault IDs. For HashiCorp Vault, a SHA-256 fingerprint of the normalized endpoint and namespace. Neither proves immutable account or server identity. */
|
|
179
|
+
vaultFingerprint: string;
|
|
180
|
+
version: number;
|
|
181
|
+
}
|
|
182
|
+
export type ListSecretConnectionsResponseConnectionsList =
|
|
183
|
+
Array<ListSecretConnectionsResponseConnectionsItem>;
|
|
184
|
+
export interface ListSecretConnectionsResponse {
|
|
185
|
+
connections: ListSecretConnectionsResponseConnectionsList;
|
|
186
|
+
}
|
|
187
|
+
export interface TestSecretConnectionRequest {
|
|
188
|
+
id: string;
|
|
189
|
+
projectId?: string | undefined;
|
|
190
|
+
}
|
|
191
|
+
export interface TestSecretConnectionResponse {}
|
|
192
|
+
export type UpdateSecretConnectionRequestAuthType = "token" | "approle";
|
|
193
|
+
/** Write-only provider authentication. Supply a service account token for 1Password, a token for HashiCorp token auth, or a role ID and secret ID for HashiCorp AppRole. */
|
|
194
|
+
export interface UpdateSecretConnectionRequestAuth {
|
|
195
|
+
mount?: string | undefined;
|
|
196
|
+
/** Write-only; never returned by the API. */
|
|
197
|
+
roleId?: string | undefined;
|
|
198
|
+
/** Write-only; never returned by the API. */
|
|
199
|
+
secretId?: string | undefined;
|
|
200
|
+
/** Write-only; never returned by the API. */
|
|
201
|
+
serviceAccountToken?: string | Redacted.Redacted<string> | undefined;
|
|
202
|
+
/** Write-only; never returned by the API. */
|
|
203
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
204
|
+
type?: UpdateSecretConnectionRequestAuthType | (string & {}) | undefined;
|
|
205
|
+
}
|
|
206
|
+
export type UpdateSecretConnectionRequestConfig = CreateSecretConnectionRequestConfig;
|
|
207
|
+
export type UpdateSecretConnectionRequestTokenBudget = CreateSecretConnectionRequestTokenBudget;
|
|
208
|
+
export interface UpdateSecretConnectionRequest {
|
|
209
|
+
id: string;
|
|
210
|
+
projectId?: string | undefined;
|
|
211
|
+
/** Write-only provider authentication. Supply a service account token for 1Password, a token for HashiCorp token auth, or a role ID and secret ID for HashiCorp AppRole. */
|
|
212
|
+
auth?: UpdateSecretConnectionRequestAuth | undefined;
|
|
213
|
+
config?: CreateSecretConnectionRequestConfig | undefined;
|
|
214
|
+
enabled?: boolean | undefined;
|
|
215
|
+
name?: string | undefined;
|
|
216
|
+
tokenBudget?: CreateSecretConnectionRequestTokenBudget | null | undefined;
|
|
217
|
+
}
|
|
218
|
+
export type UpdateSecretConnectionResponseProvider = "1password" | "hashicorp_vault";
|
|
219
|
+
export type UpdateSecretConnectionResponseTokenBudget = CreateSecretConnectionRequestTokenBudget;
|
|
220
|
+
export interface UpdateSecretConnectionResponse {
|
|
221
|
+
createdAt: string;
|
|
222
|
+
enabled: boolean;
|
|
223
|
+
id: string;
|
|
224
|
+
name: string;
|
|
225
|
+
provider: UpdateSecretConnectionResponseProvider;
|
|
226
|
+
tokenBudget: CreateSecretConnectionRequestTokenBudget | null;
|
|
227
|
+
updatedAt: string;
|
|
228
|
+
/** For 1Password, a SHA-256 diagnostic fingerprint of sorted accessible vault IDs. For HashiCorp Vault, a SHA-256 fingerprint of the normalized endpoint and namespace. Neither proves immutable account or server identity. */
|
|
229
|
+
vaultFingerprint: string;
|
|
230
|
+
version: number;
|
|
231
|
+
}
|
|
232
|
+
export type Error400BodyContextItemMap = { [key: string]: unknown | undefined };
|
|
233
|
+
export type Error400BodyContextList = Array<Error400BodyContextItemMap>;
|
|
234
|
+
export type Error400BodyDetailsMap = { [key: string]: unknown | undefined };
|
|
235
|
+
export interface Error400Body {
|
|
236
|
+
code?: string | undefined;
|
|
237
|
+
context?: Error400BodyContextList | undefined;
|
|
238
|
+
details?: Error400BodyDetailsMap | undefined;
|
|
239
|
+
error?: string | undefined;
|
|
240
|
+
linkToDocs?: string | undefined;
|
|
241
|
+
message: string;
|
|
242
|
+
param?: string | undefined;
|
|
243
|
+
retryAfterSeconds?: number | undefined;
|
|
244
|
+
retryable?: boolean | undefined;
|
|
245
|
+
}
|
|
246
|
+
export type CreateSecretConnectionError =
|
|
247
|
+
| BadRequest
|
|
248
|
+
| Forbidden
|
|
249
|
+
| NotFound
|
|
250
|
+
| Conflict
|
|
251
|
+
| SteelOpError;
|
|
252
|
+
/** Create a secret connection */
|
|
253
|
+
export const createSecretConnection: API.OperationMethod<
|
|
254
|
+
CreateSecretConnectionRequest,
|
|
255
|
+
CreateSecretConnectionResponse,
|
|
256
|
+
CreateSecretConnectionError,
|
|
257
|
+
SteelOpContext
|
|
258
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
259
|
+
input: __S(4, __c1, 0) as any as S.Schema<CreateSecretConnectionRequest>,
|
|
260
|
+
output: __S(9, __c2, 1) as any as S.Schema<CreateSecretConnectionResponse>,
|
|
261
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
262
|
+
serviceErrors: SteelServiceErrors,
|
|
263
|
+
protocol: SteelProtocol,
|
|
264
|
+
retry: Retry.Retry,
|
|
265
|
+
telemetry: TELEMETRY,
|
|
266
|
+
span: "CreateSecretConnection",
|
|
267
|
+
}));
|
|
268
|
+
|
|
269
|
+
export type DeleteSecretConnectionError =
|
|
270
|
+
| BadRequest
|
|
271
|
+
| Forbidden
|
|
272
|
+
| NotFound
|
|
273
|
+
| Conflict
|
|
274
|
+
| SteelOpError;
|
|
275
|
+
/** Delete a secret connection */
|
|
276
|
+
export const deleteSecretConnection: API.OperationMethod<
|
|
277
|
+
DeleteSecretConnectionRequest,
|
|
278
|
+
DeleteSecretConnectionResponse,
|
|
279
|
+
DeleteSecretConnectionError,
|
|
280
|
+
SteelOpContext
|
|
281
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
282
|
+
input: __S(16, __c4, 0) as any as S.Schema<DeleteSecretConnectionRequest>,
|
|
283
|
+
output: __S(20, __c5, 0) as any as S.Schema<DeleteSecretConnectionResponse>,
|
|
284
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
285
|
+
serviceErrors: SteelServiceErrors,
|
|
286
|
+
protocol: SteelProtocol,
|
|
287
|
+
retry: Retry.Retry,
|
|
288
|
+
telemetry: TELEMETRY,
|
|
289
|
+
span: "DeleteSecretConnection",
|
|
290
|
+
}));
|
|
291
|
+
|
|
292
|
+
export type GetSecretConnectionError = BadRequest | Forbidden | NotFound | Conflict | SteelOpError;
|
|
293
|
+
/** Get a secret connection */
|
|
294
|
+
export const getSecretConnection: API.OperationMethod<
|
|
295
|
+
GetSecretConnectionRequest,
|
|
296
|
+
GetSecretConnectionResponse,
|
|
297
|
+
GetSecretConnectionError,
|
|
298
|
+
SteelOpContext
|
|
299
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
300
|
+
input: __S(24, __c6, 0) as any as S.Schema<GetSecretConnectionRequest>,
|
|
301
|
+
output: __S(9, __c2, 1) as any as S.Schema<GetSecretConnectionResponse>,
|
|
302
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
303
|
+
serviceErrors: SteelServiceErrors,
|
|
304
|
+
protocol: SteelProtocol,
|
|
305
|
+
retry: Retry.Retry,
|
|
306
|
+
telemetry: TELEMETRY,
|
|
307
|
+
span: "GetSecretConnection",
|
|
308
|
+
}));
|
|
309
|
+
|
|
310
|
+
export type ListSecretConnectionsError =
|
|
311
|
+
| BadRequest
|
|
312
|
+
| Forbidden
|
|
313
|
+
| NotFound
|
|
314
|
+
| Conflict
|
|
315
|
+
| SteelOpError;
|
|
316
|
+
/** List secret connections */
|
|
317
|
+
export const listSecretConnections: API.OperationMethod<
|
|
318
|
+
ListSecretConnectionsRequest,
|
|
319
|
+
ListSecretConnectionsResponse,
|
|
320
|
+
ListSecretConnectionsError,
|
|
321
|
+
SteelOpContext
|
|
322
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
323
|
+
input: __S(28, __c7, 0) as any as S.Schema<ListSecretConnectionsRequest>,
|
|
324
|
+
output: __S(30, __c7, 2) as any as S.Schema<ListSecretConnectionsResponse>,
|
|
325
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
326
|
+
serviceErrors: SteelServiceErrors,
|
|
327
|
+
protocol: SteelProtocol,
|
|
328
|
+
retry: Retry.Retry,
|
|
329
|
+
telemetry: TELEMETRY,
|
|
330
|
+
span: "ListSecretConnections",
|
|
331
|
+
}));
|
|
332
|
+
|
|
333
|
+
export type TestSecretConnectionError = BadRequest | Forbidden | NotFound | Conflict | SteelOpError;
|
|
334
|
+
/** Test a secret connection */
|
|
335
|
+
export const testSecretConnection: API.OperationMethod<
|
|
336
|
+
TestSecretConnectionRequest,
|
|
337
|
+
TestSecretConnectionResponse,
|
|
338
|
+
TestSecretConnectionError,
|
|
339
|
+
SteelOpContext
|
|
340
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
341
|
+
input: __S(32, __c8, 0) as any as S.Schema<TestSecretConnectionRequest>,
|
|
342
|
+
output: __S(20, __c5, 0) as any as S.Schema<TestSecretConnectionResponse>,
|
|
343
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
344
|
+
serviceErrors: SteelServiceErrors,
|
|
345
|
+
protocol: SteelProtocol,
|
|
346
|
+
retry: Retry.Retry,
|
|
347
|
+
telemetry: TELEMETRY,
|
|
348
|
+
span: "TestSecretConnection",
|
|
349
|
+
}));
|
|
350
|
+
|
|
351
|
+
export type UpdateSecretConnectionError =
|
|
352
|
+
| BadRequest
|
|
353
|
+
| Forbidden
|
|
354
|
+
| NotFound
|
|
355
|
+
| Conflict
|
|
356
|
+
| SteelOpError;
|
|
357
|
+
/** Update a secret connection */
|
|
358
|
+
export const updateSecretConnection: API.OperationMethod<
|
|
359
|
+
UpdateSecretConnectionRequest,
|
|
360
|
+
UpdateSecretConnectionResponse,
|
|
361
|
+
UpdateSecretConnectionError,
|
|
362
|
+
SteelOpContext
|
|
363
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
364
|
+
input: __S(36, __c9, 0) as any as S.Schema<UpdateSecretConnectionRequest>,
|
|
365
|
+
output: __S(9, __c2, 1) as any as S.Schema<UpdateSecretConnectionResponse>,
|
|
366
|
+
errors: [BadRequest, Forbidden, NotFound, Conflict],
|
|
367
|
+
serviceErrors: SteelServiceErrors,
|
|
368
|
+
protocol: SteelProtocol,
|
|
369
|
+
retry: Retry.Retry,
|
|
370
|
+
telemetry: TELEMETRY,
|
|
371
|
+
span: "UpdateSecretConnection",
|
|
372
|
+
}));
|
|
373
|
+
|
|
374
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
375
|
+
function __c0(j: number): any {
|
|
376
|
+
switch (j) {
|
|
377
|
+
case 0:
|
|
378
|
+
return S.Record(S.String, S.Unknown);
|
|
379
|
+
case 1:
|
|
380
|
+
return S.Array(__S(0, __c0, 0));
|
|
381
|
+
case 2:
|
|
382
|
+
return S.suspend(() =>
|
|
383
|
+
S.Struct({
|
|
384
|
+
code: S.optional(S.String),
|
|
385
|
+
context: S.optional(__S(1, __c0, 1)),
|
|
386
|
+
details: S.optional(__S(0, __c0, 0)),
|
|
387
|
+
error: S.optional(S.String),
|
|
388
|
+
linkToDocs: S.optional(S.String),
|
|
389
|
+
message: S.String,
|
|
390
|
+
param: S.optional(S.String),
|
|
391
|
+
retryAfterSeconds: S.optional(S.Number),
|
|
392
|
+
retryable: S.optional(S.Boolean),
|
|
393
|
+
}),
|
|
394
|
+
).annotate({ identifier: "Error400Body" });
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function __c1(j: number): any {
|
|
398
|
+
switch (j) {
|
|
399
|
+
case 0:
|
|
400
|
+
return S.suspend(() =>
|
|
401
|
+
S.Struct({
|
|
402
|
+
auth: __S(12, __c3, 0),
|
|
403
|
+
config: S.optional(__S(13, __c3, 1)),
|
|
404
|
+
name: S.String,
|
|
405
|
+
projectId: S.optional(S.String),
|
|
406
|
+
provider: S.String,
|
|
407
|
+
tokenBudget: S.optional(S.NullOr(__S(8, __c2, 0))),
|
|
408
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/secret-connections", code: 200 })),
|
|
409
|
+
).annotate({ identifier: "CreateSecretConnectionRequest" });
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function __c2(j: number): any {
|
|
413
|
+
switch (j) {
|
|
414
|
+
case 0:
|
|
415
|
+
return S.suspend(() =>
|
|
416
|
+
S.Struct({
|
|
417
|
+
burst: S.Number,
|
|
418
|
+
refillPerSecond: S.Number,
|
|
419
|
+
}),
|
|
420
|
+
).annotate({ identifier: "CreateSecretConnectionRequestTokenBudget" });
|
|
421
|
+
case 1:
|
|
422
|
+
return S.suspend(() =>
|
|
423
|
+
S.Struct({
|
|
424
|
+
createdAt: S.String,
|
|
425
|
+
enabled: S.Boolean,
|
|
426
|
+
id: S.String,
|
|
427
|
+
name: S.String,
|
|
428
|
+
provider: S.String,
|
|
429
|
+
tokenBudget: S.NullOr(__S(8, __c2, 0)),
|
|
430
|
+
updatedAt: S.String,
|
|
431
|
+
vaultFingerprint: S.String,
|
|
432
|
+
version: S.Number,
|
|
433
|
+
}),
|
|
434
|
+
).annotate({ identifier: "CreateSecretConnectionResponse" });
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function __c3(j: number): any {
|
|
438
|
+
switch (j) {
|
|
439
|
+
case 0:
|
|
440
|
+
return S.suspend(() =>
|
|
441
|
+
S.Struct({
|
|
442
|
+
mount: S.optional(S.String),
|
|
443
|
+
roleId: S.optional(S.String),
|
|
444
|
+
secretId: S.optional(S.String),
|
|
445
|
+
serviceAccountToken: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
446
|
+
token: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
447
|
+
type: S.optional(S.String),
|
|
448
|
+
}),
|
|
449
|
+
).annotate({ identifier: "CreateSecretConnectionRequestAuth" });
|
|
450
|
+
case 1:
|
|
451
|
+
return S.suspend(() =>
|
|
452
|
+
S.Struct({
|
|
453
|
+
address: S.String,
|
|
454
|
+
caPem: S.optional(S.String),
|
|
455
|
+
namespace: S.optional(S.String),
|
|
456
|
+
}),
|
|
457
|
+
).annotate({ identifier: "CreateSecretConnectionRequestConfig" });
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
function __c4(j: number): any {
|
|
461
|
+
switch (j) {
|
|
462
|
+
case 0:
|
|
463
|
+
return S.suspend(() =>
|
|
464
|
+
S.Struct({
|
|
465
|
+
id: S.String.pipe(T.Label()),
|
|
466
|
+
projectId: S.optional(S.String.pipe(T.Query())),
|
|
467
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/v1/secret-connections/{id}", code: 200 })),
|
|
468
|
+
).annotate({ identifier: "DeleteSecretConnectionRequest" });
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
function __c5(j: number): any {
|
|
472
|
+
switch (j) {
|
|
473
|
+
case 0:
|
|
474
|
+
return S.suspend(() => S.Struct({})).annotate({
|
|
475
|
+
identifier: "DeleteSecretConnectionResponse",
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
function __c6(j: number): any {
|
|
480
|
+
switch (j) {
|
|
481
|
+
case 0:
|
|
482
|
+
return S.suspend(() =>
|
|
483
|
+
S.Struct({
|
|
484
|
+
id: S.String.pipe(T.Label()),
|
|
485
|
+
projectId: S.optional(S.String.pipe(T.Query())),
|
|
486
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/secret-connections/{id}", code: 200 })),
|
|
487
|
+
).annotate({ identifier: "GetSecretConnectionRequest" });
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function __c7(j: number): any {
|
|
491
|
+
switch (j) {
|
|
492
|
+
case 0:
|
|
493
|
+
return S.suspend(() =>
|
|
494
|
+
S.Struct({
|
|
495
|
+
projectId: S.optional(S.String.pipe(T.Query())),
|
|
496
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/secret-connections", code: 200 })),
|
|
497
|
+
).annotate({ identifier: "ListSecretConnectionsRequest" });
|
|
498
|
+
case 1:
|
|
499
|
+
return S.Array(__S(9, __c2, 1));
|
|
500
|
+
case 2:
|
|
501
|
+
return S.suspend(() =>
|
|
502
|
+
S.Struct({
|
|
503
|
+
connections: __S(29, __c7, 1),
|
|
504
|
+
}),
|
|
505
|
+
).annotate({ identifier: "ListSecretConnectionsResponse" });
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
function __c8(j: number): any {
|
|
509
|
+
switch (j) {
|
|
510
|
+
case 0:
|
|
511
|
+
return S.suspend(() =>
|
|
512
|
+
S.Struct({
|
|
513
|
+
id: S.String.pipe(T.Label()),
|
|
514
|
+
projectId: S.optional(S.String.pipe(T.Query())),
|
|
515
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/secret-connections/{id}/test", code: 200 })),
|
|
516
|
+
).annotate({ identifier: "TestSecretConnectionRequest" });
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function __c9(j: number): any {
|
|
520
|
+
switch (j) {
|
|
521
|
+
case 0:
|
|
522
|
+
return S.suspend(() =>
|
|
523
|
+
S.Struct({
|
|
524
|
+
id: S.String.pipe(T.Label()),
|
|
525
|
+
projectId: S.optional(S.String.pipe(T.Query())),
|
|
526
|
+
auth: S.optional(__S(12, __c3, 0)),
|
|
527
|
+
config: S.optional(__S(13, __c3, 1)),
|
|
528
|
+
enabled: S.optional(S.Boolean),
|
|
529
|
+
name: S.optional(S.String),
|
|
530
|
+
tokenBudget: S.optional(S.NullOr(__S(8, __c2, 0))),
|
|
531
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/v1/secret-connections/{id}", code: 200 })),
|
|
532
|
+
).annotate({ identifier: "UpdateSecretConnectionRequest" });
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
536
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
537
|
+
return (__s[i] ??= __L.at(f, j));
|
|
538
|
+
}
|