@distilled.cloud/fly-io 1.0.0-rc.12 → 1.0.0-rc.14
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 +34 -0
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +2 -2
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/protocol.d.ts +4 -4
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +58 -62
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.test.js +38 -7
- package/lib/protocol.test.js.map +1 -1
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/addons.d.ts +58 -8
- package/lib/services/addons.d.ts.map +1 -1
- package/lib/services/addons.js +40 -85
- package/lib/services/addons.js.map +1 -1
- package/lib/services/machines.d.ts +209 -60
- package/lib/services/machines.d.ts.map +1 -1
- package/lib/services/machines.js +316 -692
- package/lib/services/machines.js.map +1 -1
- package/lib/services/mpg.d.ts +2 -2
- package/lib/services/mpg.d.ts.map +1 -1
- package/lib/services/mpg.js +37 -153
- package/lib/services/mpg.js.map +1 -1
- package/lib/services/sprites.d.ts +687 -144
- package/lib/services/sprites.d.ts.map +1 -1
- package/lib/services/sprites.js +667 -183
- package/lib/services/sprites.js.map +1 -1
- package/lib/sprites-mint.test.js +4 -5
- package/lib/sprites-mint.test.js.map +1 -1
- package/lib/traits.d.ts.map +1 -1
- package/lib/traits.js.map +1 -1
- package/package.json +14 -12
- package/src/credentials.ts +8 -12
- package/src/errors.ts +6 -10
- package/src/protocol.test.ts +83 -43
- package/src/protocol.ts +119 -135
- package/src/retry.ts +2 -8
- package/src/services/addons.ts +135 -154
- package/src/services/machines.ts +694 -1222
- package/src/services/mpg.ts +59 -217
- package/src/services/sprites.ts +1573 -354
- package/src/sprites-mint.test.ts +25 -67
- package/src/traits.ts +5 -12
package/src/services/sprites.ts
CHANGED
|
@@ -1,24 +1,198 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit.
|
|
2
3
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
4
|
import type * as Redacted from "effect/Redacted";
|
|
4
|
-
import
|
|
5
|
-
import * as T from "../traits.ts";
|
|
6
|
-
import {
|
|
7
|
-
SpritesProtocol,
|
|
8
|
-
type SpritesOpError,
|
|
9
|
-
type SpritesOpContext,
|
|
10
|
-
} from "../protocol.ts";
|
|
5
|
+
import { BadRequest, Conflict, NotFound, SpritesNotEnabled } from "../errors.ts";
|
|
11
6
|
import { paginateCursor } from "../pagination.ts";
|
|
12
|
-
import {
|
|
13
|
-
BadRequest,
|
|
14
|
-
Conflict,
|
|
15
|
-
NotFound,
|
|
16
|
-
SpritesNotEnabled,
|
|
17
|
-
} from "../errors.ts";
|
|
7
|
+
import { SpritesProtocol, type SpritesOpError, type SpritesOpContext } from "../protocol.ts";
|
|
18
8
|
import * as Retry from "../retry.ts";
|
|
9
|
+
import * as T from "../traits.ts";
|
|
19
10
|
|
|
20
11
|
export type { SpritesOpError, SpritesOpContext };
|
|
21
12
|
|
|
13
|
+
export interface AuthorizeOAuthConnectionRequest {
|
|
14
|
+
provider: string;
|
|
15
|
+
/** Comma-separated scopes to request. Replaces the default scope set for this authorization URL. */
|
|
16
|
+
scopes?: string;
|
|
17
|
+
/** Comma-separated scopes to add to any scopes already granted for this provider. */
|
|
18
|
+
add_scopes?: string;
|
|
19
|
+
/** OAuth callback URI. Defaults to the Sprites API callback for the provider. */
|
|
20
|
+
redirect_uri?: string;
|
|
21
|
+
/** Optional state value. If omitted, Sprites generates one that ties the callback to the organization. */
|
|
22
|
+
state?: string;
|
|
23
|
+
}
|
|
24
|
+
export const AuthorizeOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
25
|
+
S.Struct({
|
|
26
|
+
provider: S.String.pipe(T.Label()),
|
|
27
|
+
scopes: S.optional(S.String.pipe(T.Query())),
|
|
28
|
+
add_scopes: S.optional(S.String.pipe(T.Query())),
|
|
29
|
+
redirect_uri: S.optional(S.String.pipe(T.Query())),
|
|
30
|
+
state: S.optional(S.String.pipe(T.Query())),
|
|
31
|
+
}).pipe(T.Http({ method: "GET", uri: "/oauth/{provider}/authorize", code: 200 })),
|
|
32
|
+
).annotate({
|
|
33
|
+
identifier: "AuthorizeOAuthConnectionRequest",
|
|
34
|
+
}) as any as S.Schema<AuthorizeOAuthConnectionRequest>;
|
|
35
|
+
|
|
36
|
+
/** OAuth authorization response */
|
|
37
|
+
export interface OAuthAuthorizeResponse {
|
|
38
|
+
/** Provider URL where the user grants access. */
|
|
39
|
+
authorize_url: string;
|
|
40
|
+
/** State value that must be sent back to the callback. */
|
|
41
|
+
state: string;
|
|
42
|
+
}
|
|
43
|
+
export const OAuthAuthorizeResponse = /*@__PURE__*/ S.suspend(() =>
|
|
44
|
+
S.Struct({
|
|
45
|
+
authorize_url: S.String,
|
|
46
|
+
state: S.String,
|
|
47
|
+
}),
|
|
48
|
+
).annotate({ identifier: "OAuthAuthorizeResponse" }) as any as S.Schema<OAuthAuthorizeResponse>;
|
|
49
|
+
|
|
50
|
+
export interface ChangeFileModeRequest {
|
|
51
|
+
name: string;
|
|
52
|
+
asRoot: boolean;
|
|
53
|
+
mode: string;
|
|
54
|
+
path: string;
|
|
55
|
+
recursive: boolean;
|
|
56
|
+
workingDir: string;
|
|
57
|
+
}
|
|
58
|
+
export const ChangeFileModeRequest = /*@__PURE__*/ S.suspend(() =>
|
|
59
|
+
S.Struct({
|
|
60
|
+
name: S.String.pipe(T.Label()),
|
|
61
|
+
asRoot: S.Boolean,
|
|
62
|
+
mode: S.String,
|
|
63
|
+
path: S.String,
|
|
64
|
+
recursive: S.Boolean,
|
|
65
|
+
workingDir: S.String,
|
|
66
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/chmod", code: 200 })),
|
|
67
|
+
).annotate({ identifier: "ChangeFileModeRequest" }) as any as S.Schema<ChangeFileModeRequest>;
|
|
68
|
+
|
|
69
|
+
export interface ChmodResult {
|
|
70
|
+
mode: string;
|
|
71
|
+
path: string;
|
|
72
|
+
}
|
|
73
|
+
export const ChmodResult = /*@__PURE__*/ S.suspend(() =>
|
|
74
|
+
S.Struct({
|
|
75
|
+
mode: S.String,
|
|
76
|
+
path: S.String,
|
|
77
|
+
}),
|
|
78
|
+
).annotate({ identifier: "ChmodResult" }) as any as S.Schema<ChmodResult>;
|
|
79
|
+
|
|
80
|
+
export type ChmodResponseAffectedList = Array<ChmodResult>;
|
|
81
|
+
export const ChmodResponseAffectedList = /*@__PURE__*/ S.Array(
|
|
82
|
+
ChmodResult,
|
|
83
|
+
) as any as S.Schema<ChmodResponseAffectedList>;
|
|
84
|
+
|
|
85
|
+
export interface ChmodResponse {
|
|
86
|
+
affected: ChmodResponseAffectedList;
|
|
87
|
+
count: number;
|
|
88
|
+
}
|
|
89
|
+
export const ChmodResponse = /*@__PURE__*/ S.suspend(() =>
|
|
90
|
+
S.Struct({
|
|
91
|
+
affected: ChmodResponseAffectedList,
|
|
92
|
+
count: S.Number,
|
|
93
|
+
}),
|
|
94
|
+
).annotate({ identifier: "ChmodResponse" }) as any as S.Schema<ChmodResponse>;
|
|
95
|
+
|
|
96
|
+
export interface ChangeFileOwnerRequest {
|
|
97
|
+
name: string;
|
|
98
|
+
asRoot: boolean;
|
|
99
|
+
gid: unknown;
|
|
100
|
+
path: string;
|
|
101
|
+
recursive: boolean;
|
|
102
|
+
uid: unknown;
|
|
103
|
+
workingDir: string;
|
|
104
|
+
}
|
|
105
|
+
export const ChangeFileOwnerRequest = /*@__PURE__*/ S.suspend(() =>
|
|
106
|
+
S.Struct({
|
|
107
|
+
name: S.String.pipe(T.Label()),
|
|
108
|
+
asRoot: S.Boolean,
|
|
109
|
+
gid: S.Unknown,
|
|
110
|
+
path: S.String,
|
|
111
|
+
recursive: S.Boolean,
|
|
112
|
+
uid: S.Unknown,
|
|
113
|
+
workingDir: S.String,
|
|
114
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/chown", code: 200 })),
|
|
115
|
+
).annotate({ identifier: "ChangeFileOwnerRequest" }) as any as S.Schema<ChangeFileOwnerRequest>;
|
|
116
|
+
|
|
117
|
+
export interface ChownResult {
|
|
118
|
+
gid: number;
|
|
119
|
+
path: string;
|
|
120
|
+
uid: number;
|
|
121
|
+
}
|
|
122
|
+
export const ChownResult = /*@__PURE__*/ S.suspend(() =>
|
|
123
|
+
S.Struct({
|
|
124
|
+
gid: S.Number,
|
|
125
|
+
path: S.String,
|
|
126
|
+
uid: S.Number,
|
|
127
|
+
}),
|
|
128
|
+
).annotate({ identifier: "ChownResult" }) as any as S.Schema<ChownResult>;
|
|
129
|
+
|
|
130
|
+
export type ChownResponseAffectedList = Array<ChownResult>;
|
|
131
|
+
export const ChownResponseAffectedList = /*@__PURE__*/ S.Array(
|
|
132
|
+
ChownResult,
|
|
133
|
+
) as any as S.Schema<ChownResponseAffectedList>;
|
|
134
|
+
|
|
135
|
+
export interface ChownResponse {
|
|
136
|
+
affected: ChownResponseAffectedList;
|
|
137
|
+
count: number;
|
|
138
|
+
}
|
|
139
|
+
export const ChownResponse = /*@__PURE__*/ S.suspend(() =>
|
|
140
|
+
S.Struct({
|
|
141
|
+
affected: ChownResponseAffectedList,
|
|
142
|
+
count: S.Number,
|
|
143
|
+
}),
|
|
144
|
+
).annotate({ identifier: "ChownResponse" }) as any as S.Schema<ChownResponse>;
|
|
145
|
+
|
|
146
|
+
export interface CopyFileRequest {
|
|
147
|
+
name: string;
|
|
148
|
+
asRoot: boolean;
|
|
149
|
+
dest: string;
|
|
150
|
+
preserveAttrs: boolean;
|
|
151
|
+
recursive: boolean;
|
|
152
|
+
source: string;
|
|
153
|
+
workingDir: string;
|
|
154
|
+
}
|
|
155
|
+
export const CopyFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
156
|
+
S.Struct({
|
|
157
|
+
name: S.String.pipe(T.Label()),
|
|
158
|
+
asRoot: S.Boolean,
|
|
159
|
+
dest: S.String,
|
|
160
|
+
preserveAttrs: S.Boolean,
|
|
161
|
+
recursive: S.Boolean,
|
|
162
|
+
source: S.String,
|
|
163
|
+
workingDir: S.String,
|
|
164
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/copy", code: 200 })),
|
|
165
|
+
).annotate({ identifier: "CopyFileRequest" }) as any as S.Schema<CopyFileRequest>;
|
|
166
|
+
|
|
167
|
+
export interface CopyResult {
|
|
168
|
+
dest: string;
|
|
169
|
+
source: string;
|
|
170
|
+
}
|
|
171
|
+
export const CopyResult = /*@__PURE__*/ S.suspend(() =>
|
|
172
|
+
S.Struct({
|
|
173
|
+
dest: S.String,
|
|
174
|
+
source: S.String,
|
|
175
|
+
}),
|
|
176
|
+
).annotate({ identifier: "CopyResult" }) as any as S.Schema<CopyResult>;
|
|
177
|
+
|
|
178
|
+
export type CopyResponseCopiedList = Array<CopyResult>;
|
|
179
|
+
export const CopyResponseCopiedList = /*@__PURE__*/ S.Array(
|
|
180
|
+
CopyResult,
|
|
181
|
+
) as any as S.Schema<CopyResponseCopiedList>;
|
|
182
|
+
|
|
183
|
+
export interface CopyResponse {
|
|
184
|
+
copied: CopyResponseCopiedList;
|
|
185
|
+
count: number;
|
|
186
|
+
totalBytes: number;
|
|
187
|
+
}
|
|
188
|
+
export const CopyResponse = /*@__PURE__*/ S.suspend(() =>
|
|
189
|
+
S.Struct({
|
|
190
|
+
copied: CopyResponseCopiedList,
|
|
191
|
+
count: S.Number,
|
|
192
|
+
totalBytes: S.Number,
|
|
193
|
+
}),
|
|
194
|
+
).annotate({ identifier: "CopyResponse" }) as any as S.Schema<CopyResponse>;
|
|
195
|
+
|
|
22
196
|
export interface CreateCheckpointRequest {
|
|
23
197
|
name: string;
|
|
24
198
|
comment?: string;
|
|
@@ -27,12 +201,8 @@ export const CreateCheckpointRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
27
201
|
S.Struct({
|
|
28
202
|
name: S.String.pipe(T.Label()),
|
|
29
203
|
comment: S.optional(S.String),
|
|
30
|
-
}).pipe(
|
|
31
|
-
|
|
32
|
-
),
|
|
33
|
-
).annotate({
|
|
34
|
-
identifier: "CreateCheckpointRequest",
|
|
35
|
-
}) as any as S.Schema<CreateCheckpointRequest>;
|
|
204
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/checkpoint", code: 200 })),
|
|
205
|
+
).annotate({ identifier: "CreateCheckpointRequest" }) as any as S.Schema<CreateCheckpointRequest>;
|
|
36
206
|
|
|
37
207
|
export interface StreamEvent {
|
|
38
208
|
type?: string;
|
|
@@ -57,9 +227,140 @@ export const CreateCheckpointResponseBodyList = /*@__PURE__*/ S.Array(
|
|
|
57
227
|
export type CreateCheckpointResponse = CreateCheckpointResponseBodyList;
|
|
58
228
|
export const CreateCheckpointResponse = /*@__PURE__*/ S.suspend(() =>
|
|
59
229
|
CreateCheckpointResponseBodyList.pipe(T.RawResponseRoot()),
|
|
230
|
+
).annotate({ identifier: "CreateCheckpointResponse" }) as any as S.Schema<CreateCheckpointResponse>;
|
|
231
|
+
|
|
232
|
+
/** Provider API paths the connector may call. Supports exact paths and trailing `*` prefix wildcards. */
|
|
233
|
+
export type AccessPolicyAllowedEndpointsList = Array<string>;
|
|
234
|
+
export const AccessPolicyAllowedEndpointsList = /*@__PURE__*/ S.Array(
|
|
235
|
+
S.String,
|
|
236
|
+
) as any as S.Schema<AccessPolicyAllowedEndpointsList>;
|
|
237
|
+
|
|
238
|
+
/** Provider API paths the connector may not call. Block rules are checked before allow rules. */
|
|
239
|
+
export type AccessPolicyBlockedEndpointsList = Array<string>;
|
|
240
|
+
export const AccessPolicyBlockedEndpointsList = /*@__PURE__*/ S.Array(
|
|
241
|
+
S.String,
|
|
242
|
+
) as any as S.Schema<AccessPolicyBlockedEndpointsList>;
|
|
243
|
+
|
|
244
|
+
/** Labels the calling sprite must have. All listed labels are required. */
|
|
245
|
+
export type AccessPolicySpriteLabelsList = Array<string>;
|
|
246
|
+
export const AccessPolicySpriteLabelsList = /*@__PURE__*/ S.Array(
|
|
247
|
+
S.String,
|
|
248
|
+
) as any as S.Schema<AccessPolicySpriteLabelsList>;
|
|
249
|
+
|
|
250
|
+
/** Connector access policy */
|
|
251
|
+
export interface AccessPolicy {
|
|
252
|
+
/** When true, all sprites in the organization may use this connector. */
|
|
253
|
+
allow_all?: boolean;
|
|
254
|
+
/** Provider API paths the connector may call. Supports exact paths and trailing `*` prefix wildcards. */
|
|
255
|
+
allowed_endpoints?: AccessPolicyAllowedEndpointsList;
|
|
256
|
+
/** Provider API paths the connector may not call. Block rules are checked before allow rules. */
|
|
257
|
+
blocked_endpoints?: AccessPolicyBlockedEndpointsList;
|
|
258
|
+
/** Sprite name prefix required to use this connector. */
|
|
259
|
+
name_prefix?: string;
|
|
260
|
+
/** Labels the calling sprite must have. All listed labels are required. */
|
|
261
|
+
sprite_labels?: AccessPolicySpriteLabelsList;
|
|
262
|
+
}
|
|
263
|
+
export const AccessPolicy = /*@__PURE__*/ S.suspend(() =>
|
|
264
|
+
S.Struct({
|
|
265
|
+
allow_all: S.optional(S.Boolean),
|
|
266
|
+
allowed_endpoints: S.optional(AccessPolicyAllowedEndpointsList),
|
|
267
|
+
blocked_endpoints: S.optional(AccessPolicyBlockedEndpointsList),
|
|
268
|
+
name_prefix: S.optional(S.String),
|
|
269
|
+
sprite_labels: S.optional(AccessPolicySpriteLabelsList),
|
|
270
|
+
}),
|
|
271
|
+
).annotate({ identifier: "AccessPolicy" }) as any as S.Schema<AccessPolicy>;
|
|
272
|
+
|
|
273
|
+
export interface CreateOAuthApiKeyConnectionRequest {
|
|
274
|
+
/** Initial access policy. Empty or missing policies deny sprite use until updated. */
|
|
275
|
+
access_policy?: AccessPolicy;
|
|
276
|
+
/** Provider API key. Stored encrypted and never returned by the API. */
|
|
277
|
+
api_key: string | Redacted.Redacted<string>;
|
|
278
|
+
/** Required for Upstash Redis: immutable HTTPS database REST URL. Not used by fixed-host providers. */
|
|
279
|
+
base_api_url?: string;
|
|
280
|
+
/** API-key provider. */
|
|
281
|
+
provider: string;
|
|
282
|
+
}
|
|
283
|
+
export const CreateOAuthApiKeyConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
284
|
+
S.Struct({
|
|
285
|
+
access_policy: S.optional(AccessPolicy),
|
|
286
|
+
api_key: S.String.pipe(T.SensitiveValue({})),
|
|
287
|
+
base_api_url: S.optional(S.String),
|
|
288
|
+
provider: S.String,
|
|
289
|
+
}).pipe(T.Http({ method: "POST", uri: "/oauth/connections/api_key", code: 200 })),
|
|
60
290
|
).annotate({
|
|
61
|
-
identifier: "
|
|
62
|
-
}) as any as S.Schema<
|
|
291
|
+
identifier: "CreateOAuthApiKeyConnectionRequest",
|
|
292
|
+
}) as any as S.Schema<CreateOAuthApiKeyConnectionRequest>;
|
|
293
|
+
|
|
294
|
+
/** How the connector was created. */
|
|
295
|
+
export type ConnectionConnectionType = "oauth" | "api_key" | "provisioned" | "internal";
|
|
296
|
+
export const ConnectionConnectionType = S.String;
|
|
297
|
+
|
|
298
|
+
/** Provider notes about this connection, derived from its saved settings. Each has a nullable `title` and a `body`; backticks mark inline code. */
|
|
299
|
+
export type ConnectionNotesList = Array<unknown>;
|
|
300
|
+
export const ConnectionNotesList = /*@__PURE__*/ S.Array(
|
|
301
|
+
S.Unknown,
|
|
302
|
+
) as any as S.Schema<ConnectionNotesList>;
|
|
303
|
+
|
|
304
|
+
/** Connector */
|
|
305
|
+
export interface Connection {
|
|
306
|
+
/** Policy controlling which sprites and provider endpoints may use this connector. */
|
|
307
|
+
access_policy?: AccessPolicy;
|
|
308
|
+
/** How the connector was created. */
|
|
309
|
+
connection_type?: ConnectionConnectionType;
|
|
310
|
+
/** Connector ID used in gateway URLs. */
|
|
311
|
+
id: string;
|
|
312
|
+
/** When the connector was created. */
|
|
313
|
+
inserted_at?: string;
|
|
314
|
+
/** Provider notes about this connection, derived from its saved settings. Each has a nullable `title` and a `body`; backticks mark inline code. */
|
|
315
|
+
notes?: ConnectionNotesList;
|
|
316
|
+
/** Provider key. See https://fly.io/sprites/ecosystem/ for current connectors. */
|
|
317
|
+
provider: string;
|
|
318
|
+
/** Provider account, workspace, or key identifier. */
|
|
319
|
+
provider_account_id: string;
|
|
320
|
+
/** Human-readable provider account name. */
|
|
321
|
+
provider_account_name?: string;
|
|
322
|
+
/** Provider-specific metadata such as workspace URLs, custom API base URLs, or icon references. */
|
|
323
|
+
provider_info?: unknown;
|
|
324
|
+
/** Comma-separated OAuth scopes granted to the connector. */
|
|
325
|
+
scopes?: string;
|
|
326
|
+
/** When the stored token expires, if the provider issues expiring tokens. */
|
|
327
|
+
token_expires_at?: string;
|
|
328
|
+
/** When the connector was last updated. */
|
|
329
|
+
updated_at?: string;
|
|
330
|
+
/** Provider-specific curl snippet showing how to call the connector through the gateway. */
|
|
331
|
+
usage_snippet?: string;
|
|
332
|
+
/** Sprites user ID that created or owns the connector. */
|
|
333
|
+
user_id?: string;
|
|
334
|
+
}
|
|
335
|
+
export const Connection = /*@__PURE__*/ S.suspend(() =>
|
|
336
|
+
S.Struct({
|
|
337
|
+
access_policy: S.optional(AccessPolicy),
|
|
338
|
+
connection_type: S.optional(ConnectionConnectionType),
|
|
339
|
+
id: S.String,
|
|
340
|
+
inserted_at: S.optional(S.String),
|
|
341
|
+
notes: S.optional(ConnectionNotesList),
|
|
342
|
+
provider: S.String,
|
|
343
|
+
provider_account_id: S.String,
|
|
344
|
+
provider_account_name: S.optional(S.String),
|
|
345
|
+
provider_info: S.optional(S.Unknown),
|
|
346
|
+
scopes: S.optional(S.String),
|
|
347
|
+
token_expires_at: S.optional(S.String),
|
|
348
|
+
updated_at: S.optional(S.String),
|
|
349
|
+
usage_snippet: S.optional(S.String),
|
|
350
|
+
user_id: S.optional(S.String),
|
|
351
|
+
}),
|
|
352
|
+
).annotate({ identifier: "Connection" }) as any as S.Schema<Connection>;
|
|
353
|
+
|
|
354
|
+
/** Connector response */
|
|
355
|
+
export interface ConnectionResponse {
|
|
356
|
+
/** Sanitized connector. Secrets and encrypted token fields are never returned. */
|
|
357
|
+
connection: Connection;
|
|
358
|
+
}
|
|
359
|
+
export const ConnectionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
360
|
+
S.Struct({
|
|
361
|
+
connection: Connection,
|
|
362
|
+
}),
|
|
363
|
+
).annotate({ identifier: "ConnectionResponse" }) as any as S.Schema<ConnectionResponse>;
|
|
63
364
|
|
|
64
365
|
export interface CreateOrganizationTokenRequest {
|
|
65
366
|
/** Fly organization slug */
|
|
@@ -74,9 +375,7 @@ export const CreateOrganizationTokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
74
375
|
org: S.String.pipe(T.Label()),
|
|
75
376
|
description: S.optional(S.String),
|
|
76
377
|
invite_code: S.optional(S.String),
|
|
77
|
-
}).pipe(
|
|
78
|
-
T.Http({ method: "POST", uri: "/organizations/{org}/tokens", code: 200 }),
|
|
79
|
-
),
|
|
378
|
+
}).pipe(T.Http({ method: "POST", uri: "/organizations/{org}/tokens", code: 200 })),
|
|
80
379
|
).annotate({
|
|
81
380
|
identifier: "CreateOrganizationTokenRequest",
|
|
82
381
|
}) as any as S.Schema<CreateOrganizationTokenRequest>;
|
|
@@ -93,136 +392,247 @@ export const CreateOrganizationTokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
93
392
|
identifier: "CreateOrganizationTokenResponse",
|
|
94
393
|
}) as any as S.Schema<CreateOrganizationTokenResponse>;
|
|
95
394
|
|
|
96
|
-
|
|
97
|
-
export
|
|
395
|
+
/** Authentication type (default: sprite) */
|
|
396
|
+
export type UrlSettingsRequestAuth = "sprite" | "public";
|
|
397
|
+
export const UrlSettingsRequestAuth = S.String;
|
|
98
398
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
399
|
+
/** URL settings request */
|
|
400
|
+
export interface UrlSettingsRequest {
|
|
401
|
+
/** Authentication type (default: sprite) */
|
|
402
|
+
auth?: UrlSettingsRequestAuth | (string & {});
|
|
102
403
|
}
|
|
103
|
-
export const
|
|
404
|
+
export const UrlSettingsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
104
405
|
S.Struct({
|
|
105
|
-
auth: S.optional(
|
|
106
|
-
private_access: S.optional(S.String),
|
|
406
|
+
auth: S.optional(UrlSettingsRequestAuth),
|
|
107
407
|
}),
|
|
108
|
-
).annotate({ identifier: "
|
|
408
|
+
).annotate({ identifier: "UrlSettingsRequest" }) as any as S.Schema<UrlSettingsRequest>;
|
|
109
409
|
|
|
110
|
-
|
|
111
|
-
export
|
|
112
|
-
export const CreateSpriteRequestLabelsList = /*@__PURE__*/ S.Array(
|
|
410
|
+
export type SpritesCreatePostRequestLabelsList = Array<string>;
|
|
411
|
+
export const SpritesCreatePostRequestLabelsList = /*@__PURE__*/ S.Array(
|
|
113
412
|
S.String,
|
|
114
|
-
) as any as S.Schema<
|
|
413
|
+
) as any as S.Schema<SpritesCreatePostRequestLabelsList>;
|
|
115
414
|
|
|
116
415
|
export interface CreateSpriteRequest {
|
|
117
416
|
/** Unique name for the sprite within the organization */
|
|
118
417
|
name: string;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
418
|
+
/** URL access configuration */
|
|
419
|
+
url_settings?: UrlSettingsRequest;
|
|
420
|
+
/** Labels stamped on the sprite */
|
|
421
|
+
labels?: SpritesCreatePostRequestLabelsList;
|
|
122
422
|
}
|
|
123
423
|
export const CreateSpriteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
124
424
|
S.Struct({
|
|
125
425
|
name: S.String,
|
|
126
|
-
url_settings: S.optional(
|
|
127
|
-
labels: S.optional(
|
|
426
|
+
url_settings: S.optional(UrlSettingsRequest),
|
|
427
|
+
labels: S.optional(SpritesCreatePostRequestLabelsList),
|
|
128
428
|
}).pipe(T.Http({ method: "POST", uri: "/sprites", code: 200 })),
|
|
129
|
-
).annotate({
|
|
130
|
-
identifier: "CreateSpriteRequest",
|
|
131
|
-
}) as any as S.Schema<CreateSpriteRequest>;
|
|
132
|
-
|
|
133
|
-
export type SpriteStatus = "cold" | "warm" | "running";
|
|
134
|
-
export const SpriteStatus = S.String;
|
|
429
|
+
).annotate({ identifier: "CreateSpriteRequest" }) as any as S.Schema<CreateSpriteRequest>;
|
|
135
430
|
|
|
136
|
-
|
|
137
|
-
export
|
|
431
|
+
/** Labels assigned to the sprite. Omitted when empty. */
|
|
432
|
+
export type SpriteResponseLabelsList = Array<string>;
|
|
433
|
+
export const SpriteResponseLabelsList = /*@__PURE__*/ S.Array(
|
|
138
434
|
S.String,
|
|
139
|
-
) as any as S.Schema<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
435
|
+
) as any as S.Schema<SpriteResponseLabelsList>;
|
|
436
|
+
|
|
437
|
+
/** Runtime status */
|
|
438
|
+
export type SpriteResponseStatus = "cold" | "warm" | "running";
|
|
439
|
+
export const SpriteResponseStatus = S.String;
|
|
440
|
+
|
|
441
|
+
/** Authentication type */
|
|
442
|
+
export type UrlSettingsAuth = "sprite" | "public";
|
|
443
|
+
export const UrlSettingsAuth = S.String;
|
|
444
|
+
|
|
445
|
+
/** Who may access a sprite-authenticated URL. */
|
|
446
|
+
export type UrlSettingsPrivateAccess = "admins" | "organization";
|
|
447
|
+
export const UrlSettingsPrivateAccess = S.String;
|
|
448
|
+
|
|
449
|
+
/** URL access settings */
|
|
450
|
+
export interface UrlSettings {
|
|
451
|
+
/** Authentication type */
|
|
452
|
+
auth: UrlSettingsAuth;
|
|
453
|
+
/** Who may access a sprite-authenticated URL. */
|
|
454
|
+
private_access?: UrlSettingsPrivateAccess;
|
|
455
|
+
}
|
|
456
|
+
export const UrlSettings = /*@__PURE__*/ S.suspend(() =>
|
|
457
|
+
S.Struct({
|
|
458
|
+
auth: UrlSettingsAuth,
|
|
459
|
+
private_access: S.optional(UrlSettingsPrivateAccess),
|
|
460
|
+
}),
|
|
461
|
+
).annotate({ identifier: "UrlSettings" }) as any as S.Schema<UrlSettings>;
|
|
462
|
+
|
|
463
|
+
/** Sprite resource */
|
|
464
|
+
export interface SpriteResponse {
|
|
465
|
+
/** Creation timestamp (ISO 8601) */
|
|
466
|
+
created_at: string;
|
|
467
|
+
/** Version of the sprite environment image. */
|
|
468
|
+
environment_version?: string | null;
|
|
469
|
+
/** Unique sprite identifier */
|
|
470
|
+
id: string;
|
|
471
|
+
/** Labels assigned to the sprite. Omitted when empty. */
|
|
472
|
+
labels?: SpriteResponseLabelsList;
|
|
473
|
+
/** When the sprite was last observed running (ISO 8601), null if not tracked */
|
|
154
474
|
last_running_at?: string | null;
|
|
475
|
+
/** When the sprite was last observed warming (ISO 8601), null if not tracked */
|
|
476
|
+
last_warming_at?: string | null;
|
|
477
|
+
/** Sprite name within the organization */
|
|
478
|
+
name: string;
|
|
479
|
+
/** Organization slug */
|
|
480
|
+
organization: string;
|
|
481
|
+
/** Runtime status */
|
|
482
|
+
status: SpriteResponseStatus;
|
|
483
|
+
/** Last update timestamp (ISO 8601) */
|
|
484
|
+
updated_at: string;
|
|
485
|
+
/** Sprite HTTP endpoint URL */
|
|
486
|
+
url: string;
|
|
487
|
+
/** URL access configuration */
|
|
488
|
+
url_settings?: UrlSettings | null;
|
|
489
|
+
/** Version configured for or currently running on the sprite. */
|
|
155
490
|
version?: string | null;
|
|
156
491
|
}
|
|
157
|
-
export const
|
|
158
|
-
S.Struct({
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
url: S.optional(S.String),
|
|
164
|
-
url_settings: S.optional(UrlSettings),
|
|
165
|
-
status: S.optional(SpriteStatus),
|
|
166
|
-
labels: S.optional(SpriteLabelsList),
|
|
167
|
-
created_at: S.optional(S.String),
|
|
168
|
-
updated_at: S.optional(S.String),
|
|
169
|
-
last_started_at: S.optional(S.NullOr(S.String)),
|
|
170
|
-
last_active_at: S.optional(S.NullOr(S.String)),
|
|
492
|
+
export const SpriteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
493
|
+
S.Struct({
|
|
494
|
+
created_at: S.String,
|
|
495
|
+
environment_version: S.optional(S.NullOr(S.String)),
|
|
496
|
+
id: S.String,
|
|
497
|
+
labels: S.optional(SpriteResponseLabelsList),
|
|
171
498
|
last_running_at: S.optional(S.NullOr(S.String)),
|
|
499
|
+
last_warming_at: S.optional(S.NullOr(S.String)),
|
|
500
|
+
name: S.String,
|
|
501
|
+
organization: S.String,
|
|
502
|
+
status: SpriteResponseStatus,
|
|
503
|
+
updated_at: S.String,
|
|
504
|
+
url: S.String,
|
|
505
|
+
url_settings: S.optional(S.NullOr(UrlSettings)),
|
|
172
506
|
version: S.optional(S.NullOr(S.String)),
|
|
173
507
|
}),
|
|
174
|
-
).annotate({ identifier: "
|
|
508
|
+
).annotate({ identifier: "SpriteResponse" }) as any as S.Schema<SpriteResponse>;
|
|
509
|
+
|
|
510
|
+
export interface DeleteFileRequest {
|
|
511
|
+
name: string;
|
|
512
|
+
asRoot: boolean;
|
|
513
|
+
path: string;
|
|
514
|
+
recursive: boolean;
|
|
515
|
+
workingDir: string;
|
|
516
|
+
}
|
|
517
|
+
export const DeleteFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
518
|
+
S.Struct({
|
|
519
|
+
name: S.String.pipe(T.Label()),
|
|
520
|
+
asRoot: S.Boolean,
|
|
521
|
+
path: S.String,
|
|
522
|
+
recursive: S.Boolean,
|
|
523
|
+
workingDir: S.String,
|
|
524
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}/fs/delete", code: 200 })),
|
|
525
|
+
).annotate({ identifier: "DeleteFileRequest" }) as any as S.Schema<DeleteFileRequest>;
|
|
526
|
+
|
|
527
|
+
export type DeleteResponseDeletedList = Array<string>;
|
|
528
|
+
export const DeleteResponseDeletedList = /*@__PURE__*/ S.Array(
|
|
529
|
+
S.String,
|
|
530
|
+
) as any as S.Schema<DeleteResponseDeletedList>;
|
|
531
|
+
|
|
532
|
+
export interface DeleteResponse {
|
|
533
|
+
count: number;
|
|
534
|
+
deleted: DeleteResponseDeletedList;
|
|
535
|
+
}
|
|
536
|
+
export const DeleteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
537
|
+
S.Struct({
|
|
538
|
+
count: S.Number,
|
|
539
|
+
deleted: DeleteResponseDeletedList,
|
|
540
|
+
}),
|
|
541
|
+
).annotate({ identifier: "DeleteResponse" }) as any as S.Schema<DeleteResponse>;
|
|
542
|
+
|
|
543
|
+
export interface DeleteOAuthConnectionRequest {
|
|
544
|
+
id: string;
|
|
545
|
+
}
|
|
546
|
+
export const DeleteOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
547
|
+
S.Struct({
|
|
548
|
+
id: S.String.pipe(T.Label()),
|
|
549
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/oauth/connections/{id}", code: 200 })),
|
|
550
|
+
).annotate({
|
|
551
|
+
identifier: "DeleteOAuthConnectionRequest",
|
|
552
|
+
}) as any as S.Schema<DeleteOAuthConnectionRequest>;
|
|
553
|
+
|
|
554
|
+
export interface DeleteOAuthConnectionResponse {}
|
|
555
|
+
export const DeleteOAuthConnectionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
556
|
+
identifier: "DeleteOAuthConnectionResponse",
|
|
557
|
+
}) as any as S.Schema<DeleteOAuthConnectionResponse>;
|
|
558
|
+
|
|
559
|
+
export interface DeletePrivilegesPolicyRequest {
|
|
560
|
+
name: string;
|
|
561
|
+
}
|
|
562
|
+
export const DeletePrivilegesPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
563
|
+
S.Struct({
|
|
564
|
+
name: S.String.pipe(T.Label()),
|
|
565
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}/policy/privileges", code: 200 })),
|
|
566
|
+
).annotate({
|
|
567
|
+
identifier: "DeletePrivilegesPolicyRequest",
|
|
568
|
+
}) as any as S.Schema<DeletePrivilegesPolicyRequest>;
|
|
569
|
+
|
|
570
|
+
export interface DeletePrivilegesPolicyResponse {}
|
|
571
|
+
export const DeletePrivilegesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
572
|
+
identifier: "DeletePrivilegesPolicyResponse",
|
|
573
|
+
}) as any as S.Schema<DeletePrivilegesPolicyResponse>;
|
|
574
|
+
|
|
575
|
+
export interface DeleteResourcesPolicyRequest {
|
|
576
|
+
name: string;
|
|
577
|
+
}
|
|
578
|
+
export const DeleteResourcesPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
579
|
+
S.Struct({
|
|
580
|
+
name: S.String.pipe(T.Label()),
|
|
581
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}/policy/resources", code: 200 })),
|
|
582
|
+
).annotate({
|
|
583
|
+
identifier: "DeleteResourcesPolicyRequest",
|
|
584
|
+
}) as any as S.Schema<DeleteResourcesPolicyRequest>;
|
|
585
|
+
|
|
586
|
+
export interface DeleteResourcesPolicyResponse {}
|
|
587
|
+
export const DeleteResourcesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
588
|
+
identifier: "DeleteResourcesPolicyResponse",
|
|
589
|
+
}) as any as S.Schema<DeleteResourcesPolicyResponse>;
|
|
175
590
|
|
|
176
591
|
export interface DeleteSpriteRequest {
|
|
177
|
-
/** Unique sprite name */
|
|
178
592
|
name: string;
|
|
179
593
|
}
|
|
180
594
|
export const DeleteSpriteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
181
595
|
S.Struct({
|
|
182
596
|
name: S.String.pipe(T.Label()),
|
|
183
597
|
}).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}", code: 200 })),
|
|
184
|
-
).annotate({
|
|
185
|
-
identifier: "DeleteSpriteRequest",
|
|
186
|
-
}) as any as S.Schema<DeleteSpriteRequest>;
|
|
598
|
+
).annotate({ identifier: "DeleteSpriteRequest" }) as any as S.Schema<DeleteSpriteRequest>;
|
|
187
599
|
|
|
188
600
|
export interface DeleteSpriteResponse {}
|
|
189
|
-
export const DeleteSpriteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
190
|
-
S.Struct({}),
|
|
191
|
-
).annotate({
|
|
601
|
+
export const DeleteSpriteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
192
602
|
identifier: "DeleteSpriteResponse",
|
|
193
603
|
}) as any as S.Schema<DeleteSpriteResponse>;
|
|
194
604
|
|
|
195
|
-
export type
|
|
196
|
-
export const
|
|
605
|
+
export type SpriteEnvExecuteCommandRequestCmdList = Array<string>;
|
|
606
|
+
export const SpriteEnvExecuteCommandRequestCmdList = /*@__PURE__*/ S.Array(
|
|
197
607
|
S.String,
|
|
198
|
-
) as any as S.Schema<
|
|
608
|
+
) as any as S.Schema<SpriteEnvExecuteCommandRequestCmdList>;
|
|
199
609
|
|
|
200
|
-
export type
|
|
201
|
-
export const
|
|
610
|
+
export type SpriteEnvExecuteCommandRequestEnvList = Array<string>;
|
|
611
|
+
export const SpriteEnvExecuteCommandRequestEnvList = /*@__PURE__*/ S.Array(
|
|
202
612
|
S.String,
|
|
203
|
-
) as any as S.Schema<
|
|
613
|
+
) as any as S.Schema<SpriteEnvExecuteCommandRequestEnvList>;
|
|
204
614
|
|
|
205
615
|
export interface ExecCommandRequest {
|
|
206
616
|
name: string;
|
|
207
|
-
/** Command
|
|
208
|
-
cmd:
|
|
209
|
-
/** Explicit path to
|
|
617
|
+
/** Command to execute (can be repeated for command + args) */
|
|
618
|
+
cmd: SpriteEnvExecuteCommandRequestCmdList;
|
|
619
|
+
/** Explicit path to executable (defaults to first `cmd` value or `bash`) */
|
|
210
620
|
path?: string;
|
|
211
|
-
/**
|
|
621
|
+
/** Enable stdin from request body (default: `false`) */
|
|
212
622
|
stdin?: boolean;
|
|
213
|
-
/** Environment variables
|
|
214
|
-
env?:
|
|
215
|
-
/** Working directory */
|
|
623
|
+
/** Environment variables in `KEY=VALUE` format (can be repeated) */
|
|
624
|
+
env?: SpriteEnvExecuteCommandRequestEnvList;
|
|
625
|
+
/** Working directory for the command */
|
|
216
626
|
dir?: string;
|
|
217
627
|
body?: Uint8Array | string;
|
|
218
628
|
}
|
|
219
629
|
export const ExecCommandRequest = /*@__PURE__*/ S.suspend(() =>
|
|
220
630
|
S.Struct({
|
|
221
631
|
name: S.String.pipe(T.Label()),
|
|
222
|
-
cmd:
|
|
632
|
+
cmd: SpriteEnvExecuteCommandRequestCmdList.pipe(T.Query()),
|
|
223
633
|
path: S.optional(S.String.pipe(T.Query())),
|
|
224
634
|
stdin: S.optional(S.Boolean.pipe(T.Query())),
|
|
225
|
-
env: S.optional(
|
|
635
|
+
env: S.optional(SpriteEnvExecuteCommandRequestEnvList.pipe(T.Query())),
|
|
226
636
|
dir: S.optional(S.String.pipe(T.Query())),
|
|
227
637
|
body: S.optional(S.String.pipe(T.HttpBody())),
|
|
228
638
|
}).pipe(
|
|
@@ -233,9 +643,7 @@ export const ExecCommandRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
233
643
|
bodyMediaType: "application/octet-stream",
|
|
234
644
|
}),
|
|
235
645
|
),
|
|
236
|
-
).annotate({
|
|
237
|
-
identifier: "ExecCommandRequest",
|
|
238
|
-
}) as any as S.Schema<ExecCommandRequest>;
|
|
646
|
+
).annotate({ identifier: "ExecCommandRequest" }) as any as S.Schema<ExecCommandRequest>;
|
|
239
647
|
|
|
240
648
|
export interface ExecResult {
|
|
241
649
|
exit_code?: number;
|
|
@@ -252,40 +660,120 @@ export const ExecResult = /*@__PURE__*/ S.suspend(() =>
|
|
|
252
660
|
|
|
253
661
|
export interface GetCheckpointRequest {
|
|
254
662
|
name: string;
|
|
255
|
-
/** Checkpoint identifier (e.g. v7) */
|
|
256
663
|
checkpoint_id: string;
|
|
257
664
|
}
|
|
258
665
|
export const GetCheckpointRequest = /*@__PURE__*/ S.suspend(() =>
|
|
259
666
|
S.Struct({
|
|
260
667
|
name: S.String.pipe(T.Label()),
|
|
261
668
|
checkpoint_id: S.String.pipe(T.Label()),
|
|
262
|
-
}).pipe(
|
|
263
|
-
|
|
264
|
-
method: "GET",
|
|
265
|
-
uri: "/sprites/{name}/checkpoints/{checkpoint_id}",
|
|
266
|
-
code: 200,
|
|
267
|
-
}),
|
|
268
|
-
),
|
|
269
|
-
).annotate({
|
|
270
|
-
identifier: "GetCheckpointRequest",
|
|
271
|
-
}) as any as S.Schema<GetCheckpointRequest>;
|
|
669
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/checkpoints/{checkpoint_id}", code: 200 })),
|
|
670
|
+
).annotate({ identifier: "GetCheckpointRequest" }) as any as S.Schema<GetCheckpointRequest>;
|
|
272
671
|
|
|
273
|
-
export interface
|
|
274
|
-
|
|
275
|
-
create_time?: string;
|
|
276
|
-
source_id?: string;
|
|
672
|
+
export interface CheckpointInfo {
|
|
673
|
+
/** User-provided description */
|
|
277
674
|
comment?: string;
|
|
675
|
+
/** When the checkpoint was created */
|
|
676
|
+
create_time: string;
|
|
677
|
+
/** Health status (empty = healthy, "mount_failed" = unhealthy) */
|
|
278
678
|
health?: string;
|
|
679
|
+
/** Checkpoint identifier (e.g., `v7`) */
|
|
680
|
+
id: string;
|
|
681
|
+
/** Parent checkpoint ID */
|
|
682
|
+
source_id?: string;
|
|
279
683
|
}
|
|
280
|
-
export const
|
|
684
|
+
export const CheckpointInfo = /*@__PURE__*/ S.suspend(() =>
|
|
281
685
|
S.Struct({
|
|
282
|
-
id: S.optional(S.String),
|
|
283
|
-
create_time: S.optional(S.String),
|
|
284
|
-
source_id: S.optional(S.String),
|
|
285
686
|
comment: S.optional(S.String),
|
|
687
|
+
create_time: S.String,
|
|
286
688
|
health: S.optional(S.String),
|
|
689
|
+
id: S.String,
|
|
690
|
+
source_id: S.optional(S.String),
|
|
691
|
+
}),
|
|
692
|
+
).annotate({ identifier: "CheckpointInfo" }) as any as S.Schema<CheckpointInfo>;
|
|
693
|
+
|
|
694
|
+
export interface GetNetworkPolicyRequest {
|
|
695
|
+
name: string;
|
|
696
|
+
}
|
|
697
|
+
export const GetNetworkPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
698
|
+
S.Struct({
|
|
699
|
+
name: S.String.pipe(T.Label()),
|
|
700
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/policy/network", code: 200 })),
|
|
701
|
+
).annotate({ identifier: "GetNetworkPolicyRequest" }) as any as S.Schema<GetNetworkPolicyRequest>;
|
|
702
|
+
|
|
703
|
+
export interface NetworkPolicyRule {
|
|
704
|
+
/** `allow` or `deny` */
|
|
705
|
+
action?: string;
|
|
706
|
+
/** Domain pattern (e.g., `*.github.com`) */
|
|
707
|
+
domain?: string;
|
|
708
|
+
/** Include rules from preset */
|
|
709
|
+
include?: string;
|
|
710
|
+
}
|
|
711
|
+
export const NetworkPolicyRule = /*@__PURE__*/ S.suspend(() =>
|
|
712
|
+
S.Struct({
|
|
713
|
+
action: S.optional(S.String),
|
|
714
|
+
domain: S.optional(S.String),
|
|
715
|
+
include: S.optional(S.String),
|
|
716
|
+
}),
|
|
717
|
+
).annotate({ identifier: "NetworkPolicyRule" }) as any as S.Schema<NetworkPolicyRule>;
|
|
718
|
+
|
|
719
|
+
/** List of network policy rules */
|
|
720
|
+
export type NetworkPolicyRequestRulesList = Array<NetworkPolicyRule>;
|
|
721
|
+
export const NetworkPolicyRequestRulesList = /*@__PURE__*/ S.Array(
|
|
722
|
+
NetworkPolicyRule,
|
|
723
|
+
) as any as S.Schema<NetworkPolicyRequestRulesList>;
|
|
724
|
+
|
|
725
|
+
export interface NetworkPolicyRequest {
|
|
726
|
+
/** List of network policy rules */
|
|
727
|
+
rules: NetworkPolicyRequestRulesList;
|
|
728
|
+
}
|
|
729
|
+
export const NetworkPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
730
|
+
S.Struct({
|
|
731
|
+
rules: NetworkPolicyRequestRulesList,
|
|
287
732
|
}),
|
|
288
|
-
).annotate({ identifier: "
|
|
733
|
+
).annotate({ identifier: "NetworkPolicyRequest" }) as any as S.Schema<NetworkPolicyRequest>;
|
|
734
|
+
|
|
735
|
+
export interface GetOAuthConnectionRequest {
|
|
736
|
+
id: string;
|
|
737
|
+
}
|
|
738
|
+
export const GetOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
739
|
+
S.Struct({
|
|
740
|
+
id: S.String.pipe(T.Label()),
|
|
741
|
+
}).pipe(T.Http({ method: "GET", uri: "/oauth/connections/{id}", code: 200 })),
|
|
742
|
+
).annotate({
|
|
743
|
+
identifier: "GetOAuthConnectionRequest",
|
|
744
|
+
}) as any as S.Schema<GetOAuthConnectionRequest>;
|
|
745
|
+
|
|
746
|
+
export interface GetPrivilegesPolicyRequest {
|
|
747
|
+
name: string;
|
|
748
|
+
}
|
|
749
|
+
export const GetPrivilegesPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
750
|
+
S.Struct({
|
|
751
|
+
name: S.String.pipe(T.Label()),
|
|
752
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/policy/privileges", code: 200 })),
|
|
753
|
+
).annotate({
|
|
754
|
+
identifier: "GetPrivilegesPolicyRequest",
|
|
755
|
+
}) as any as S.Schema<GetPrivilegesPolicyRequest>;
|
|
756
|
+
|
|
757
|
+
export interface GetPrivilegesPolicyResponse {}
|
|
758
|
+
export const GetPrivilegesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
759
|
+
identifier: "GetPrivilegesPolicyResponse",
|
|
760
|
+
}) as any as S.Schema<GetPrivilegesPolicyResponse>;
|
|
761
|
+
|
|
762
|
+
export interface GetResourcesPolicyRequest {
|
|
763
|
+
name: string;
|
|
764
|
+
}
|
|
765
|
+
export const GetResourcesPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
766
|
+
S.Struct({
|
|
767
|
+
name: S.String.pipe(T.Label()),
|
|
768
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/policy/resources", code: 200 })),
|
|
769
|
+
).annotate({
|
|
770
|
+
identifier: "GetResourcesPolicyRequest",
|
|
771
|
+
}) as any as S.Schema<GetResourcesPolicyRequest>;
|
|
772
|
+
|
|
773
|
+
export interface GetResourcesPolicyResponse {}
|
|
774
|
+
export const GetResourcesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
775
|
+
identifier: "GetResourcesPolicyResponse",
|
|
776
|
+
}) as any as S.Schema<GetResourcesPolicyResponse>;
|
|
289
777
|
|
|
290
778
|
export interface GetServiceRequest {
|
|
291
779
|
name: string;
|
|
@@ -295,76 +783,122 @@ export const GetServiceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
295
783
|
S.Struct({
|
|
296
784
|
name: S.String.pipe(T.Label()),
|
|
297
785
|
service_name: S.String.pipe(T.Label()),
|
|
298
|
-
}).pipe(
|
|
299
|
-
|
|
300
|
-
method: "GET",
|
|
301
|
-
uri: "/sprites/{name}/services/{service_name}",
|
|
302
|
-
code: 200,
|
|
303
|
-
}),
|
|
304
|
-
),
|
|
305
|
-
).annotate({
|
|
306
|
-
identifier: "GetServiceRequest",
|
|
307
|
-
}) as any as S.Schema<GetServiceRequest>;
|
|
786
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/services/{service_name}", code: 200 })),
|
|
787
|
+
).annotate({ identifier: "GetServiceRequest" }) as any as S.Schema<GetServiceRequest>;
|
|
308
788
|
|
|
309
|
-
|
|
310
|
-
export
|
|
789
|
+
/** Command arguments */
|
|
790
|
+
export type ServiceResponseArgsList = Array<string>;
|
|
791
|
+
export const ServiceResponseArgsList = /*@__PURE__*/ S.Array(
|
|
311
792
|
S.String,
|
|
312
|
-
) as any as S.Schema<
|
|
793
|
+
) as any as S.Schema<ServiceResponseArgsList>;
|
|
313
794
|
|
|
314
|
-
|
|
315
|
-
export
|
|
795
|
+
/** Service dependencies */
|
|
796
|
+
export type ServiceResponseNeedsList = Array<string>;
|
|
797
|
+
export const ServiceResponseNeedsList = /*@__PURE__*/ S.Array(
|
|
316
798
|
S.String,
|
|
317
|
-
) as any as S.Schema<
|
|
799
|
+
) as any as S.Schema<ServiceResponseNeedsList>;
|
|
318
800
|
|
|
319
|
-
export interface
|
|
320
|
-
|
|
321
|
-
|
|
801
|
+
export interface ServiceState {
|
|
802
|
+
/** Error message if failed */
|
|
803
|
+
error?: string;
|
|
804
|
+
/** Service name */
|
|
805
|
+
name: string;
|
|
806
|
+
/** Process ID when running */
|
|
322
807
|
pid?: number;
|
|
808
|
+
/** ISO 8601 timestamp */
|
|
323
809
|
started_at?: string;
|
|
324
|
-
|
|
810
|
+
/** `stopped`, `starting`, `running`, `stopping`, or `failed` */
|
|
811
|
+
status: string;
|
|
325
812
|
}
|
|
326
|
-
export const
|
|
813
|
+
export const ServiceState = /*@__PURE__*/ S.suspend(() =>
|
|
327
814
|
S.Struct({
|
|
328
|
-
|
|
329
|
-
|
|
815
|
+
error: S.optional(S.String),
|
|
816
|
+
name: S.String,
|
|
330
817
|
pid: S.optional(S.Number),
|
|
331
818
|
started_at: S.optional(S.String),
|
|
332
|
-
|
|
819
|
+
status: S.String,
|
|
333
820
|
}),
|
|
334
|
-
).annotate({
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
cmd
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
821
|
+
).annotate({ identifier: "ServiceState" }) as any as S.Schema<ServiceState>;
|
|
822
|
+
|
|
823
|
+
export interface ServiceResponse {
|
|
824
|
+
/** Command arguments */
|
|
825
|
+
args: ServiceResponseArgsList;
|
|
826
|
+
/** Command to execute */
|
|
827
|
+
cmd: string;
|
|
828
|
+
/** HTTP port for proxy routing */
|
|
829
|
+
http_port?: number | null;
|
|
830
|
+
/** Service name */
|
|
831
|
+
name: string;
|
|
832
|
+
/** Service dependencies */
|
|
833
|
+
needs: ServiceResponseNeedsList;
|
|
834
|
+
/** Current runtime state */
|
|
835
|
+
state?: ServiceState | null;
|
|
836
|
+
}
|
|
837
|
+
export const ServiceResponse = /*@__PURE__*/ S.suspend(() =>
|
|
838
|
+
S.Struct({
|
|
839
|
+
args: ServiceResponseArgsList,
|
|
840
|
+
cmd: S.String,
|
|
841
|
+
http_port: S.optional(S.NullOr(S.Number)),
|
|
842
|
+
name: S.String,
|
|
843
|
+
needs: ServiceResponseNeedsList,
|
|
844
|
+
state: S.optional(S.NullOr(ServiceState)),
|
|
354
845
|
}),
|
|
355
|
-
).annotate({ identifier: "
|
|
846
|
+
).annotate({ identifier: "ServiceResponse" }) as any as S.Schema<ServiceResponse>;
|
|
847
|
+
|
|
848
|
+
export interface GetServiceLogsRequest {
|
|
849
|
+
name: string;
|
|
850
|
+
service_name: string;
|
|
851
|
+
/** Number of lines to return from log buffer (default: all) */
|
|
852
|
+
lines?: number;
|
|
853
|
+
/** Time to follow new logs (default: `0`, no follow) */
|
|
854
|
+
duration?: number;
|
|
855
|
+
}
|
|
856
|
+
export const GetServiceLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
857
|
+
S.Struct({
|
|
858
|
+
name: S.String.pipe(T.Label()),
|
|
859
|
+
service_name: S.String.pipe(T.Label()),
|
|
860
|
+
lines: S.optional(S.Number.pipe(T.Query())),
|
|
861
|
+
duration: S.optional(S.Number.pipe(T.Query())),
|
|
862
|
+
}).pipe(
|
|
863
|
+
T.Http({ method: "GET", uri: "/sprites/{name}/services/{service_name}/logs", code: 200 }),
|
|
864
|
+
),
|
|
865
|
+
).annotate({ identifier: "GetServiceLogsRequest" }) as any as S.Schema<GetServiceLogsRequest>;
|
|
866
|
+
|
|
867
|
+
export interface GetServiceLogsResponse {}
|
|
868
|
+
export const GetServiceLogsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
869
|
+
identifier: "GetServiceLogsResponse",
|
|
870
|
+
}) as any as S.Schema<GetServiceLogsResponse>;
|
|
356
871
|
|
|
357
872
|
export interface GetSpriteRequest {
|
|
358
|
-
/** Unique sprite name */
|
|
359
873
|
name: string;
|
|
360
874
|
}
|
|
361
875
|
export const GetSpriteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
362
876
|
S.Struct({
|
|
363
877
|
name: S.String.pipe(T.Label()),
|
|
364
878
|
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}", code: 200 })),
|
|
365
|
-
).annotate({
|
|
366
|
-
|
|
367
|
-
|
|
879
|
+
).annotate({ identifier: "GetSpriteRequest" }) as any as S.Schema<GetSpriteRequest>;
|
|
880
|
+
|
|
881
|
+
export interface KillExecSessionRequest {
|
|
882
|
+
name: string;
|
|
883
|
+
session_id: string;
|
|
884
|
+
/** Signal to send (default: `SIGTERM`) */
|
|
885
|
+
signal?: string;
|
|
886
|
+
/** Timeout waiting for process to exit (default: `10s`) */
|
|
887
|
+
timeout?: number;
|
|
888
|
+
}
|
|
889
|
+
export const KillExecSessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
890
|
+
S.Struct({
|
|
891
|
+
name: S.String.pipe(T.Label()),
|
|
892
|
+
session_id: S.String.pipe(T.Label()),
|
|
893
|
+
signal: S.optional(S.String.pipe(T.Query())),
|
|
894
|
+
timeout: S.optional(S.Number.pipe(T.Query())),
|
|
895
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/exec/{session_id}/kill", code: 200 })),
|
|
896
|
+
).annotate({ identifier: "KillExecSessionRequest" }) as any as S.Schema<KillExecSessionRequest>;
|
|
897
|
+
|
|
898
|
+
export interface KillExecSessionResponse {}
|
|
899
|
+
export const KillExecSessionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
900
|
+
identifier: "KillExecSessionResponse",
|
|
901
|
+
}) as any as S.Schema<KillExecSessionResponse>;
|
|
368
902
|
|
|
369
903
|
export interface ListCheckpointsRequest {
|
|
370
904
|
name: string;
|
|
@@ -372,24 +906,72 @@ export interface ListCheckpointsRequest {
|
|
|
372
906
|
export const ListCheckpointsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
373
907
|
S.Struct({
|
|
374
908
|
name: S.String.pipe(T.Label()),
|
|
375
|
-
}).pipe(
|
|
376
|
-
|
|
377
|
-
),
|
|
378
|
-
).annotate({
|
|
379
|
-
identifier: "ListCheckpointsRequest",
|
|
380
|
-
}) as any as S.Schema<ListCheckpointsRequest>;
|
|
909
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/checkpoints", code: 200 })),
|
|
910
|
+
).annotate({ identifier: "ListCheckpointsRequest" }) as any as S.Schema<ListCheckpointsRequest>;
|
|
381
911
|
|
|
382
|
-
export type ListCheckpointsResponseBodyList = Array<
|
|
912
|
+
export type ListCheckpointsResponseBodyList = Array<CheckpointInfo>;
|
|
383
913
|
export const ListCheckpointsResponseBodyList = /*@__PURE__*/ S.Array(
|
|
384
|
-
|
|
914
|
+
CheckpointInfo,
|
|
385
915
|
) as any as S.Schema<ListCheckpointsResponseBodyList>;
|
|
386
916
|
|
|
387
917
|
export type ListCheckpointsResponse = ListCheckpointsResponseBodyList;
|
|
388
918
|
export const ListCheckpointsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
389
919
|
ListCheckpointsResponseBodyList.pipe(T.RawResponseRoot()),
|
|
390
|
-
).annotate({
|
|
391
|
-
|
|
392
|
-
|
|
920
|
+
).annotate({ identifier: "ListCheckpointsResponse" }) as any as S.Schema<ListCheckpointsResponse>;
|
|
921
|
+
|
|
922
|
+
export interface ListDirectoryRequest {
|
|
923
|
+
name: string;
|
|
924
|
+
/** Path to the directory to list */
|
|
925
|
+
path: string;
|
|
926
|
+
/** Working directory for resolving relative paths */
|
|
927
|
+
workingDir: string;
|
|
928
|
+
}
|
|
929
|
+
export const ListDirectoryRequest = /*@__PURE__*/ S.suspend(() =>
|
|
930
|
+
S.Struct({
|
|
931
|
+
name: S.String.pipe(T.Label()),
|
|
932
|
+
path: S.String.pipe(T.Query()),
|
|
933
|
+
workingDir: S.String.pipe(T.Query()),
|
|
934
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/fs/list", code: 200 })),
|
|
935
|
+
).annotate({ identifier: "ListDirectoryRequest" }) as any as S.Schema<ListDirectoryRequest>;
|
|
936
|
+
|
|
937
|
+
export interface Entry {
|
|
938
|
+
isDir: boolean;
|
|
939
|
+
modTime: string;
|
|
940
|
+
mode: string;
|
|
941
|
+
name: string;
|
|
942
|
+
path: string;
|
|
943
|
+
size: number;
|
|
944
|
+
type: string;
|
|
945
|
+
}
|
|
946
|
+
export const Entry = /*@__PURE__*/ S.suspend(() =>
|
|
947
|
+
S.Struct({
|
|
948
|
+
isDir: S.Boolean,
|
|
949
|
+
modTime: S.String,
|
|
950
|
+
mode: S.String,
|
|
951
|
+
name: S.String,
|
|
952
|
+
path: S.String,
|
|
953
|
+
size: S.Number,
|
|
954
|
+
type: S.String,
|
|
955
|
+
}),
|
|
956
|
+
).annotate({ identifier: "Entry" }) as any as S.Schema<Entry>;
|
|
957
|
+
|
|
958
|
+
export type ListResponseEntriesList = Array<Entry>;
|
|
959
|
+
export const ListResponseEntriesList = /*@__PURE__*/ S.Array(
|
|
960
|
+
Entry,
|
|
961
|
+
) as any as S.Schema<ListResponseEntriesList>;
|
|
962
|
+
|
|
963
|
+
export interface ListResponse {
|
|
964
|
+
count: number;
|
|
965
|
+
entries: ListResponseEntriesList;
|
|
966
|
+
path: string;
|
|
967
|
+
}
|
|
968
|
+
export const ListResponse = /*@__PURE__*/ S.suspend(() =>
|
|
969
|
+
S.Struct({
|
|
970
|
+
count: S.Number,
|
|
971
|
+
entries: ListResponseEntriesList,
|
|
972
|
+
path: S.String,
|
|
973
|
+
}),
|
|
974
|
+
).annotate({ identifier: "ListResponse" }) as any as S.Schema<ListResponse>;
|
|
393
975
|
|
|
394
976
|
export interface ListExecSessionsRequest {
|
|
395
977
|
name: string;
|
|
@@ -398,76 +980,67 @@ export const ListExecSessionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
398
980
|
S.Struct({
|
|
399
981
|
name: S.String.pipe(T.Label()),
|
|
400
982
|
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/exec", code: 200 })),
|
|
401
|
-
).annotate({
|
|
402
|
-
identifier: "ListExecSessionsRequest",
|
|
403
|
-
}) as any as S.Schema<ListExecSessionsRequest>;
|
|
404
|
-
|
|
405
|
-
export interface ExecSession {
|
|
406
|
-
id?: string;
|
|
407
|
-
command?: string;
|
|
408
|
-
is_active?: boolean;
|
|
409
|
-
tty?: boolean;
|
|
410
|
-
created?: string;
|
|
411
|
-
last_activity?: string;
|
|
412
|
-
workdir?: string;
|
|
413
|
-
bytes_per_second?: number;
|
|
414
|
-
}
|
|
415
|
-
export const ExecSession = /*@__PURE__*/ S.suspend(() =>
|
|
416
|
-
S.Struct({
|
|
417
|
-
id: S.optional(S.String),
|
|
418
|
-
command: S.optional(S.String),
|
|
419
|
-
is_active: S.optional(S.Boolean),
|
|
420
|
-
tty: S.optional(S.Boolean),
|
|
421
|
-
created: S.optional(S.String),
|
|
422
|
-
last_activity: S.optional(S.String),
|
|
423
|
-
workdir: S.optional(S.String),
|
|
424
|
-
bytes_per_second: S.optional(S.Number),
|
|
425
|
-
}),
|
|
426
|
-
).annotate({ identifier: "ExecSession" }) as any as S.Schema<ExecSession>;
|
|
427
|
-
|
|
428
|
-
export type ListExecSessionsResponseBodyList = Array<ExecSession>;
|
|
429
|
-
export const ListExecSessionsResponseBodyList = /*@__PURE__*/ S.Array(
|
|
430
|
-
ExecSession,
|
|
431
|
-
) as any as S.Schema<ListExecSessionsResponseBodyList>;
|
|
983
|
+
).annotate({ identifier: "ListExecSessionsRequest" }) as any as S.Schema<ListExecSessionsRequest>;
|
|
432
984
|
|
|
433
|
-
export
|
|
434
|
-
export const ListExecSessionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
435
|
-
ListExecSessionsResponseBodyList.pipe(T.RawResponseRoot()),
|
|
436
|
-
).annotate({
|
|
985
|
+
export interface ListExecSessionsResponse {}
|
|
986
|
+
export const ListExecSessionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
437
987
|
identifier: "ListExecSessionsResponse",
|
|
438
988
|
}) as any as S.Schema<ListExecSessionsResponse>;
|
|
439
989
|
|
|
990
|
+
export interface ListOAuthConnectionsRequest {
|
|
991
|
+
/** Optional provider filter. */
|
|
992
|
+
provider?: string;
|
|
993
|
+
}
|
|
994
|
+
export const ListOAuthConnectionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
995
|
+
S.Struct({
|
|
996
|
+
provider: S.optional(S.String.pipe(T.Query())),
|
|
997
|
+
}).pipe(T.Http({ method: "GET", uri: "/oauth/connections", code: 200 })),
|
|
998
|
+
).annotate({
|
|
999
|
+
identifier: "ListOAuthConnectionsRequest",
|
|
1000
|
+
}) as any as S.Schema<ListOAuthConnectionsRequest>;
|
|
1001
|
+
|
|
1002
|
+
/** Connectors configured for the organization. */
|
|
1003
|
+
export type ConnectionListResponseConnectionsList = Array<Connection>;
|
|
1004
|
+
export const ConnectionListResponseConnectionsList = /*@__PURE__*/ S.Array(
|
|
1005
|
+
Connection,
|
|
1006
|
+
) as any as S.Schema<ConnectionListResponseConnectionsList>;
|
|
1007
|
+
|
|
1008
|
+
/** Connector list response */
|
|
1009
|
+
export interface ConnectionListResponse {
|
|
1010
|
+
/** Connectors configured for the organization. */
|
|
1011
|
+
connections: ConnectionListResponseConnectionsList;
|
|
1012
|
+
}
|
|
1013
|
+
export const ConnectionListResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1014
|
+
S.Struct({
|
|
1015
|
+
connections: ConnectionListResponseConnectionsList,
|
|
1016
|
+
}),
|
|
1017
|
+
).annotate({ identifier: "ConnectionListResponse" }) as any as S.Schema<ConnectionListResponse>;
|
|
1018
|
+
|
|
440
1019
|
export interface ListServicesRequest {
|
|
441
1020
|
name: string;
|
|
442
1021
|
}
|
|
443
1022
|
export const ListServicesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
444
1023
|
S.Struct({
|
|
445
1024
|
name: S.String.pipe(T.Label()),
|
|
446
|
-
}).pipe(
|
|
447
|
-
|
|
448
|
-
),
|
|
449
|
-
).annotate({
|
|
450
|
-
identifier: "ListServicesRequest",
|
|
451
|
-
}) as any as S.Schema<ListServicesRequest>;
|
|
1025
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/services", code: 200 })),
|
|
1026
|
+
).annotate({ identifier: "ListServicesRequest" }) as any as S.Schema<ListServicesRequest>;
|
|
452
1027
|
|
|
453
|
-
export type ListServicesResponseBodyList = Array<
|
|
1028
|
+
export type ListServicesResponseBodyList = Array<ServiceResponse>;
|
|
454
1029
|
export const ListServicesResponseBodyList = /*@__PURE__*/ S.Array(
|
|
455
|
-
|
|
1030
|
+
ServiceResponse,
|
|
456
1031
|
) as any as S.Schema<ListServicesResponseBodyList>;
|
|
457
1032
|
|
|
458
1033
|
export type ListServicesResponse = ListServicesResponseBodyList;
|
|
459
1034
|
export const ListServicesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
460
1035
|
ListServicesResponseBodyList.pipe(T.RawResponseRoot()),
|
|
461
|
-
).annotate({
|
|
462
|
-
identifier: "ListServicesResponse",
|
|
463
|
-
}) as any as S.Schema<ListServicesResponse>;
|
|
1036
|
+
).annotate({ identifier: "ListServicesResponse" }) as any as S.Schema<ListServicesResponse>;
|
|
464
1037
|
|
|
465
1038
|
export interface ListSpritesRequest {
|
|
466
1039
|
/** Filter sprites by name prefix */
|
|
467
1040
|
prefix?: string;
|
|
468
|
-
/** Maximum number of results (1-
|
|
1041
|
+
/** Maximum number of results (1-500, default: 50) */
|
|
469
1042
|
max_results?: number;
|
|
470
|
-
/** Token from
|
|
1043
|
+
/** Token from previous response for pagination */
|
|
471
1044
|
continuation_token?: string;
|
|
472
1045
|
}
|
|
473
1046
|
export const ListSpritesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
@@ -476,41 +1049,97 @@ export const ListSpritesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
476
1049
|
max_results: S.optional(S.Number.pipe(T.Query())),
|
|
477
1050
|
continuation_token: S.optional(S.String.pipe(T.Query())),
|
|
478
1051
|
}).pipe(T.Http({ method: "GET", uri: "/sprites", code: 200 })),
|
|
479
|
-
).annotate({
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
export
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
export interface
|
|
489
|
-
sprites
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
1052
|
+
).annotate({ identifier: "ListSpritesRequest" }) as any as S.Schema<ListSpritesRequest>;
|
|
1053
|
+
|
|
1054
|
+
/** List of sprite resources */
|
|
1055
|
+
export type SpriteListResponseSpritesList = Array<SpriteResponse>;
|
|
1056
|
+
export const SpriteListResponseSpritesList = /*@__PURE__*/ S.Array(
|
|
1057
|
+
SpriteResponse,
|
|
1058
|
+
) as any as S.Schema<SpriteListResponseSpritesList>;
|
|
1059
|
+
|
|
1060
|
+
/** Paginated sprite list */
|
|
1061
|
+
export interface SpriteListResponse {
|
|
1062
|
+
/** Number of returned sprites currently cold. */
|
|
1063
|
+
cold: number;
|
|
1064
|
+
/** Whether more results are available */
|
|
1065
|
+
has_more: boolean;
|
|
1066
|
+
/** Organization slug. */
|
|
1067
|
+
name: string;
|
|
1068
|
+
/** Token for fetching the next page of results */
|
|
1069
|
+
next_continuation_token?: string;
|
|
1070
|
+
/** Number of returned sprites currently running. */
|
|
1071
|
+
running: number;
|
|
1072
|
+
/** Organization-wide active sprite limit. */
|
|
496
1073
|
running_limit?: number;
|
|
1074
|
+
/** List of sprite resources */
|
|
1075
|
+
sprites: SpriteListResponseSpritesList;
|
|
1076
|
+
/** Number of returned sprites currently warm. */
|
|
1077
|
+
warm: number;
|
|
1078
|
+
/** Organization-wide warm sprite limit. */
|
|
497
1079
|
warm_limit?: number;
|
|
498
1080
|
}
|
|
499
|
-
export const
|
|
1081
|
+
export const SpriteListResponse = /*@__PURE__*/ S.suspend(() =>
|
|
500
1082
|
S.Struct({
|
|
501
|
-
|
|
502
|
-
has_more: S.
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
running: S.
|
|
506
|
-
warm: S.optional(S.Number),
|
|
507
|
-
cold: S.optional(S.Number),
|
|
1083
|
+
cold: S.Number,
|
|
1084
|
+
has_more: S.Boolean,
|
|
1085
|
+
name: S.String,
|
|
1086
|
+
next_continuation_token: S.optional(S.String),
|
|
1087
|
+
running: S.Number,
|
|
508
1088
|
running_limit: S.optional(S.Number),
|
|
1089
|
+
sprites: SpriteListResponseSpritesList,
|
|
1090
|
+
warm: S.Number,
|
|
509
1091
|
warm_limit: S.optional(S.Number),
|
|
510
1092
|
}),
|
|
1093
|
+
).annotate({ identifier: "SpriteListResponse" }) as any as S.Schema<SpriteListResponse>;
|
|
1094
|
+
|
|
1095
|
+
export interface OauthConnectionCallbackRequest {
|
|
1096
|
+
provider: string;
|
|
1097
|
+
/** Initial access policy. Empty or missing policies deny sprite use until updated. */
|
|
1098
|
+
access_policy?: AccessPolicy;
|
|
1099
|
+
/** Authorization code returned by the provider. */
|
|
1100
|
+
code: string;
|
|
1101
|
+
/** Redirect URI used to create the authorization URL. */
|
|
1102
|
+
redirect_uri?: string;
|
|
1103
|
+
/** State value from the authorize response. */
|
|
1104
|
+
state?: string;
|
|
1105
|
+
}
|
|
1106
|
+
export const OauthConnectionCallbackRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1107
|
+
S.Struct({
|
|
1108
|
+
provider: S.String.pipe(T.Label()),
|
|
1109
|
+
access_policy: S.optional(AccessPolicy),
|
|
1110
|
+
code: S.String,
|
|
1111
|
+
redirect_uri: S.optional(S.String),
|
|
1112
|
+
state: S.optional(S.String),
|
|
1113
|
+
}).pipe(T.Http({ method: "POST", uri: "/oauth/{provider}/callback", code: 200 })),
|
|
1114
|
+
).annotate({
|
|
1115
|
+
identifier: "OauthConnectionCallbackRequest",
|
|
1116
|
+
}) as any as S.Schema<OauthConnectionCallbackRequest>;
|
|
1117
|
+
|
|
1118
|
+
export interface PatchOAuthConnectionRequest {
|
|
1119
|
+
id: string;
|
|
1120
|
+
/** Replacement access policy. */
|
|
1121
|
+
access_policy: AccessPolicy;
|
|
1122
|
+
}
|
|
1123
|
+
export const PatchOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1124
|
+
S.Struct({
|
|
1125
|
+
id: S.String.pipe(T.Label()),
|
|
1126
|
+
access_policy: AccessPolicy,
|
|
1127
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/oauth/connections/{id}", code: 200 })),
|
|
511
1128
|
).annotate({
|
|
512
|
-
identifier: "
|
|
513
|
-
}) as any as S.Schema<
|
|
1129
|
+
identifier: "PatchOAuthConnectionRequest",
|
|
1130
|
+
}) as any as S.Schema<PatchOAuthConnectionRequest>;
|
|
1131
|
+
|
|
1132
|
+
export interface ProvisionOAuthConnectionRequest {
|
|
1133
|
+
/** Provider to provision. */
|
|
1134
|
+
provider: string;
|
|
1135
|
+
}
|
|
1136
|
+
export const ProvisionOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1137
|
+
S.Struct({
|
|
1138
|
+
provider: S.String,
|
|
1139
|
+
}).pipe(T.Http({ method: "POST", uri: "/oauth/connections/provision", code: 200 })),
|
|
1140
|
+
).annotate({
|
|
1141
|
+
identifier: "ProvisionOAuthConnectionRequest",
|
|
1142
|
+
}) as any as S.Schema<ProvisionOAuthConnectionRequest>;
|
|
514
1143
|
|
|
515
1144
|
/** Command arguments */
|
|
516
1145
|
export type PutServiceRequestArgsList = Array<string>;
|
|
@@ -527,51 +1156,103 @@ export const PutServiceRequestNeedsList = /*@__PURE__*/ S.Array(
|
|
|
527
1156
|
export interface PutServiceRequest {
|
|
528
1157
|
name: string;
|
|
529
1158
|
service_name: string;
|
|
530
|
-
/** Time to monitor logs after starting (default 5s) */
|
|
531
|
-
duration?:
|
|
532
|
-
/** Command to execute */
|
|
533
|
-
cmd: string;
|
|
1159
|
+
/** Time to monitor logs after starting (default: `5s`) */
|
|
1160
|
+
duration?: number;
|
|
534
1161
|
/** Command arguments */
|
|
535
1162
|
args?: PutServiceRequestArgsList;
|
|
1163
|
+
/** Command to execute */
|
|
1164
|
+
cmd: string;
|
|
536
1165
|
/** Working directory for the service */
|
|
537
1166
|
dir?: string;
|
|
1167
|
+
/** Environment variables to add to the base service environment */
|
|
1168
|
+
env?: unknown;
|
|
1169
|
+
/** HTTP port for proxy routing */
|
|
1170
|
+
http_port?: number | null;
|
|
538
1171
|
/** Service dependencies (started first) */
|
|
539
1172
|
needs?: PutServiceRequestNeedsList;
|
|
540
|
-
/** HTTP port for proxy routing */
|
|
541
|
-
http_port?: number;
|
|
542
1173
|
}
|
|
543
1174
|
export const PutServiceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
544
1175
|
S.Struct({
|
|
545
1176
|
name: S.String.pipe(T.Label()),
|
|
546
1177
|
service_name: S.String.pipe(T.Label()),
|
|
547
|
-
duration: S.optional(S.
|
|
548
|
-
cmd: S.String,
|
|
1178
|
+
duration: S.optional(S.Number.pipe(T.Query())),
|
|
549
1179
|
args: S.optional(PutServiceRequestArgsList),
|
|
1180
|
+
cmd: S.String,
|
|
550
1181
|
dir: S.optional(S.String),
|
|
1182
|
+
env: S.optional(S.Unknown),
|
|
1183
|
+
http_port: S.optional(S.NullOr(S.Number)),
|
|
551
1184
|
needs: S.optional(PutServiceRequestNeedsList),
|
|
552
|
-
|
|
1185
|
+
}).pipe(T.Http({ method: "PUT", uri: "/sprites/{name}/services/{service_name}", code: 200 })),
|
|
1186
|
+
).annotate({ identifier: "PutServiceRequest" }) as any as S.Schema<PutServiceRequest>;
|
|
1187
|
+
|
|
1188
|
+
export interface ReadFileRequest {
|
|
1189
|
+
name: string;
|
|
1190
|
+
/** Path to the file to read */
|
|
1191
|
+
path: string;
|
|
1192
|
+
/** Working directory for resolving relative paths */
|
|
1193
|
+
workingDir: string;
|
|
1194
|
+
}
|
|
1195
|
+
export const ReadFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1196
|
+
S.Struct({
|
|
1197
|
+
name: S.String.pipe(T.Label()),
|
|
1198
|
+
path: S.String.pipe(T.Query()),
|
|
1199
|
+
workingDir: S.String.pipe(T.Query()),
|
|
1200
|
+
}).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/fs/read", code: 200 })),
|
|
1201
|
+
).annotate({ identifier: "ReadFileRequest" }) as any as S.Schema<ReadFileRequest>;
|
|
1202
|
+
|
|
1203
|
+
export interface ReadFileResponse {}
|
|
1204
|
+
export const ReadFileResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1205
|
+
identifier: "ReadFileResponse",
|
|
1206
|
+
}) as any as S.Schema<ReadFileResponse>;
|
|
1207
|
+
|
|
1208
|
+
export interface RenameFileRequest {
|
|
1209
|
+
name: string;
|
|
1210
|
+
asRoot: boolean;
|
|
1211
|
+
dest: string;
|
|
1212
|
+
source: string;
|
|
1213
|
+
workingDir: string;
|
|
1214
|
+
}
|
|
1215
|
+
export const RenameFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1216
|
+
S.Struct({
|
|
1217
|
+
name: S.String.pipe(T.Label()),
|
|
1218
|
+
asRoot: S.Boolean,
|
|
1219
|
+
dest: S.String,
|
|
1220
|
+
source: S.String,
|
|
1221
|
+
workingDir: S.String,
|
|
1222
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/rename", code: 200 })),
|
|
1223
|
+
).annotate({ identifier: "RenameFileRequest" }) as any as S.Schema<RenameFileRequest>;
|
|
1224
|
+
|
|
1225
|
+
export interface RenameResponse {
|
|
1226
|
+
dest: string;
|
|
1227
|
+
source: string;
|
|
1228
|
+
}
|
|
1229
|
+
export const RenameResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1230
|
+
S.Struct({
|
|
1231
|
+
dest: S.String,
|
|
1232
|
+
source: S.String,
|
|
1233
|
+
}),
|
|
1234
|
+
).annotate({ identifier: "RenameResponse" }) as any as S.Schema<RenameResponse>;
|
|
1235
|
+
|
|
1236
|
+
export interface RestartServiceRequest {
|
|
1237
|
+
name: string;
|
|
1238
|
+
service_name: string;
|
|
1239
|
+
/** Time to monitor logs after starting (default: `5s`) */
|
|
1240
|
+
duration?: number;
|
|
1241
|
+
}
|
|
1242
|
+
export const RestartServiceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1243
|
+
S.Struct({
|
|
1244
|
+
name: S.String.pipe(T.Label()),
|
|
1245
|
+
service_name: S.String.pipe(T.Label()),
|
|
1246
|
+
duration: S.optional(S.Number.pipe(T.Query())),
|
|
553
1247
|
}).pipe(
|
|
554
|
-
T.Http({
|
|
555
|
-
method: "PUT",
|
|
556
|
-
uri: "/sprites/{name}/services/{service_name}",
|
|
557
|
-
code: 200,
|
|
558
|
-
}),
|
|
1248
|
+
T.Http({ method: "POST", uri: "/sprites/{name}/services/{service_name}/restart", code: 200 }),
|
|
559
1249
|
),
|
|
560
|
-
).annotate({
|
|
561
|
-
identifier: "PutServiceRequest",
|
|
562
|
-
}) as any as S.Schema<PutServiceRequest>;
|
|
563
|
-
|
|
564
|
-
export type PutServiceResponseBodyList = Array<StreamEvent>;
|
|
565
|
-
export const PutServiceResponseBodyList = /*@__PURE__*/ S.Array(
|
|
566
|
-
StreamEvent,
|
|
567
|
-
) as any as S.Schema<PutServiceResponseBodyList>;
|
|
1250
|
+
).annotate({ identifier: "RestartServiceRequest" }) as any as S.Schema<RestartServiceRequest>;
|
|
568
1251
|
|
|
569
|
-
export
|
|
570
|
-
export const
|
|
571
|
-
|
|
572
|
-
).
|
|
573
|
-
identifier: "PutServiceResponse",
|
|
574
|
-
}) as any as S.Schema<PutServiceResponse>;
|
|
1252
|
+
export interface RestartServiceResponse {}
|
|
1253
|
+
export const RestartServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1254
|
+
identifier: "RestartServiceResponse",
|
|
1255
|
+
}) as any as S.Schema<RestartServiceResponse>;
|
|
575
1256
|
|
|
576
1257
|
export interface RestoreCheckpointRequest {
|
|
577
1258
|
name: string;
|
|
@@ -588,9 +1269,7 @@ export const RestoreCheckpointRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
588
1269
|
code: 200,
|
|
589
1270
|
}),
|
|
590
1271
|
),
|
|
591
|
-
).annotate({
|
|
592
|
-
identifier: "RestoreCheckpointRequest",
|
|
593
|
-
}) as any as S.Schema<RestoreCheckpointRequest>;
|
|
1272
|
+
).annotate({ identifier: "RestoreCheckpointRequest" }) as any as S.Schema<RestoreCheckpointRequest>;
|
|
594
1273
|
|
|
595
1274
|
export type RestoreCheckpointResponseBodyList = Array<StreamEvent>;
|
|
596
1275
|
export const RestoreCheckpointResponseBodyList = /*@__PURE__*/ S.Array(
|
|
@@ -604,19 +1283,128 @@ export const RestoreCheckpointResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
604
1283
|
identifier: "RestoreCheckpointResponse",
|
|
605
1284
|
}) as any as S.Schema<RestoreCheckpointResponse>;
|
|
606
1285
|
|
|
1286
|
+
/** List of network policy rules */
|
|
1287
|
+
export type SetNetworkPolicyRequestRulesList = Array<NetworkPolicyRule>;
|
|
1288
|
+
export const SetNetworkPolicyRequestRulesList = /*@__PURE__*/ S.Array(
|
|
1289
|
+
NetworkPolicyRule,
|
|
1290
|
+
) as any as S.Schema<SetNetworkPolicyRequestRulesList>;
|
|
1291
|
+
|
|
1292
|
+
export interface SetNetworkPolicyRequest {
|
|
1293
|
+
name: string;
|
|
1294
|
+
/** List of network policy rules */
|
|
1295
|
+
rules: SetNetworkPolicyRequestRulesList;
|
|
1296
|
+
}
|
|
1297
|
+
export const SetNetworkPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1298
|
+
S.Struct({
|
|
1299
|
+
name: S.String.pipe(T.Label()),
|
|
1300
|
+
rules: SetNetworkPolicyRequestRulesList,
|
|
1301
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/policy/network", code: 200 })),
|
|
1302
|
+
).annotate({ identifier: "SetNetworkPolicyRequest" }) as any as S.Schema<SetNetworkPolicyRequest>;
|
|
1303
|
+
|
|
1304
|
+
export interface SetNetworkPolicyResponse {}
|
|
1305
|
+
export const SetNetworkPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1306
|
+
identifier: "SetNetworkPolicyResponse",
|
|
1307
|
+
}) as any as S.Schema<SetNetworkPolicyResponse>;
|
|
1308
|
+
|
|
1309
|
+
export interface SetPrivilegesPolicyRequest {
|
|
1310
|
+
name: string;
|
|
1311
|
+
}
|
|
1312
|
+
export const SetPrivilegesPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1313
|
+
S.Struct({
|
|
1314
|
+
name: S.String.pipe(T.Label()),
|
|
1315
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/policy/privileges", code: 200 })),
|
|
1316
|
+
).annotate({
|
|
1317
|
+
identifier: "SetPrivilegesPolicyRequest",
|
|
1318
|
+
}) as any as S.Schema<SetPrivilegesPolicyRequest>;
|
|
1319
|
+
|
|
1320
|
+
export interface SetPrivilegesPolicyResponse {}
|
|
1321
|
+
export const SetPrivilegesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1322
|
+
identifier: "SetPrivilegesPolicyResponse",
|
|
1323
|
+
}) as any as S.Schema<SetPrivilegesPolicyResponse>;
|
|
1324
|
+
|
|
1325
|
+
export interface SetResourcesPolicyRequest {
|
|
1326
|
+
name: string;
|
|
1327
|
+
}
|
|
1328
|
+
export const SetResourcesPolicyRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1329
|
+
S.Struct({
|
|
1330
|
+
name: S.String.pipe(T.Label()),
|
|
1331
|
+
}).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/policy/resources", code: 200 })),
|
|
1332
|
+
).annotate({
|
|
1333
|
+
identifier: "SetResourcesPolicyRequest",
|
|
1334
|
+
}) as any as S.Schema<SetResourcesPolicyRequest>;
|
|
1335
|
+
|
|
1336
|
+
export interface SetResourcesPolicyResponse {}
|
|
1337
|
+
export const SetResourcesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1338
|
+
identifier: "SetResourcesPolicyResponse",
|
|
1339
|
+
}) as any as S.Schema<SetResourcesPolicyResponse>;
|
|
1340
|
+
|
|
1341
|
+
export interface StartServiceRequest {
|
|
1342
|
+
name: string;
|
|
1343
|
+
service_name: string;
|
|
1344
|
+
/** Time to monitor logs after starting (default: `5s`) */
|
|
1345
|
+
duration?: number;
|
|
1346
|
+
}
|
|
1347
|
+
export const StartServiceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1348
|
+
S.Struct({
|
|
1349
|
+
name: S.String.pipe(T.Label()),
|
|
1350
|
+
service_name: S.String.pipe(T.Label()),
|
|
1351
|
+
duration: S.optional(S.Number.pipe(T.Query())),
|
|
1352
|
+
}).pipe(
|
|
1353
|
+
T.Http({ method: "POST", uri: "/sprites/{name}/services/{service_name}/start", code: 200 }),
|
|
1354
|
+
),
|
|
1355
|
+
).annotate({ identifier: "StartServiceRequest" }) as any as S.Schema<StartServiceRequest>;
|
|
1356
|
+
|
|
1357
|
+
export interface StartServiceResponse {}
|
|
1358
|
+
export const StartServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1359
|
+
identifier: "StartServiceResponse",
|
|
1360
|
+
}) as any as S.Schema<StartServiceResponse>;
|
|
1361
|
+
|
|
1362
|
+
export interface StopServiceRequest {
|
|
1363
|
+
name: string;
|
|
1364
|
+
service_name: string;
|
|
1365
|
+
/** Timeout waiting for service to stop (default: `10s`) */
|
|
1366
|
+
timeout?: number;
|
|
1367
|
+
}
|
|
1368
|
+
export const StopServiceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1369
|
+
S.Struct({
|
|
1370
|
+
name: S.String.pipe(T.Label()),
|
|
1371
|
+
service_name: S.String.pipe(T.Label()),
|
|
1372
|
+
timeout: S.optional(S.Number.pipe(T.Query())),
|
|
1373
|
+
}).pipe(
|
|
1374
|
+
T.Http({ method: "POST", uri: "/sprites/{name}/services/{service_name}/stop", code: 200 }),
|
|
1375
|
+
),
|
|
1376
|
+
).annotate({ identifier: "StopServiceRequest" }) as any as S.Schema<StopServiceRequest>;
|
|
1377
|
+
|
|
1378
|
+
export interface StopServiceResponse {}
|
|
1379
|
+
export const StopServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1380
|
+
identifier: "StopServiceResponse",
|
|
1381
|
+
}) as any as S.Schema<StopServiceResponse>;
|
|
1382
|
+
|
|
1383
|
+
export interface UpdateOAuthConnectionRequest {
|
|
1384
|
+
id: string;
|
|
1385
|
+
/** Replacement access policy. */
|
|
1386
|
+
access_policy: AccessPolicy;
|
|
1387
|
+
}
|
|
1388
|
+
export const UpdateOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1389
|
+
S.Struct({
|
|
1390
|
+
id: S.String.pipe(T.Label()),
|
|
1391
|
+
access_policy: AccessPolicy,
|
|
1392
|
+
}).pipe(T.Http({ method: "PUT", uri: "/oauth/connections/{id}", code: 200 })),
|
|
1393
|
+
).annotate({
|
|
1394
|
+
identifier: "UpdateOAuthConnectionRequest",
|
|
1395
|
+
}) as any as S.Schema<UpdateOAuthConnectionRequest>;
|
|
1396
|
+
|
|
607
1397
|
export interface UpdateSpriteRequest {
|
|
608
|
-
/** Unique sprite name */
|
|
609
1398
|
name: string;
|
|
610
|
-
|
|
1399
|
+
/** URL access configuration to update */
|
|
1400
|
+
url_settings: UrlSettingsRequest;
|
|
611
1401
|
}
|
|
612
1402
|
export const UpdateSpriteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
613
1403
|
S.Struct({
|
|
614
1404
|
name: S.String.pipe(T.Label()),
|
|
615
|
-
url_settings:
|
|
1405
|
+
url_settings: UrlSettingsRequest,
|
|
616
1406
|
}).pipe(T.Http({ method: "PUT", uri: "/sprites/{name}", code: 200 })),
|
|
617
|
-
).annotate({
|
|
618
|
-
identifier: "UpdateSpriteRequest",
|
|
619
|
-
}) as any as S.Schema<UpdateSpriteRequest>;
|
|
1407
|
+
).annotate({ identifier: "UpdateSpriteRequest" }) as any as S.Schema<UpdateSpriteRequest>;
|
|
620
1408
|
|
|
621
1409
|
export interface WriteFileRequest {
|
|
622
1410
|
name: string;
|
|
@@ -624,9 +1412,9 @@ export interface WriteFileRequest {
|
|
|
624
1412
|
path: string;
|
|
625
1413
|
/** Working directory for resolving relative paths */
|
|
626
1414
|
workingDir: string;
|
|
627
|
-
/** File permissions in octal (e.g
|
|
1415
|
+
/** File permissions in octal (e.g., '0644') */
|
|
628
1416
|
mode?: string;
|
|
629
|
-
/** Create parent directories if they
|
|
1417
|
+
/** Create parent directories if they don't exist */
|
|
630
1418
|
mkdir?: boolean;
|
|
631
1419
|
body: Uint8Array | string;
|
|
632
1420
|
}
|
|
@@ -646,27 +1434,83 @@ export const WriteFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
646
1434
|
bodyMediaType: "application/octet-stream",
|
|
647
1435
|
}),
|
|
648
1436
|
),
|
|
649
|
-
).annotate({
|
|
650
|
-
identifier: "WriteFileRequest",
|
|
651
|
-
}) as any as S.Schema<WriteFileRequest>;
|
|
1437
|
+
).annotate({ identifier: "WriteFileRequest" }) as any as S.Schema<WriteFileRequest>;
|
|
652
1438
|
|
|
653
|
-
export interface
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
1439
|
+
export interface WriteResponse {
|
|
1440
|
+
mode: string;
|
|
1441
|
+
path: string;
|
|
1442
|
+
size: number;
|
|
657
1443
|
}
|
|
658
|
-
export const
|
|
1444
|
+
export const WriteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
659
1445
|
S.Struct({
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
1446
|
+
mode: S.String,
|
|
1447
|
+
path: S.String,
|
|
1448
|
+
size: S.Number,
|
|
663
1449
|
}),
|
|
664
|
-
).annotate({
|
|
665
|
-
|
|
666
|
-
|
|
1450
|
+
).annotate({ identifier: "WriteResponse" }) as any as S.Schema<WriteResponse>;
|
|
1451
|
+
|
|
1452
|
+
export type AuthorizeOAuthConnectionError = BadRequest | SpritesNotEnabled | SpritesOpError;
|
|
1453
|
+
/** Authorize an OAuth connector Create an OAuth authorization URL for a provider. Use this to start a browser-based consent flow. */
|
|
1454
|
+
export const authorizeOAuthConnection: API.OperationMethod<
|
|
1455
|
+
AuthorizeOAuthConnectionRequest,
|
|
1456
|
+
OAuthAuthorizeResponse,
|
|
1457
|
+
AuthorizeOAuthConnectionError,
|
|
1458
|
+
SpritesOpContext
|
|
1459
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1460
|
+
input: AuthorizeOAuthConnectionRequest,
|
|
1461
|
+
output: OAuthAuthorizeResponse,
|
|
1462
|
+
errors: [BadRequest, SpritesNotEnabled],
|
|
1463
|
+
protocol: SpritesProtocol,
|
|
1464
|
+
retry: Retry.Retry,
|
|
1465
|
+
}));
|
|
1466
|
+
|
|
1467
|
+
export type ChangeFileModeError = BadRequest | NotFound | SpritesOpError;
|
|
1468
|
+
/** Change File Mode Change file or directory permissions. */
|
|
1469
|
+
export const changeFileMode: API.OperationMethod<
|
|
1470
|
+
ChangeFileModeRequest,
|
|
1471
|
+
ChmodResponse,
|
|
1472
|
+
ChangeFileModeError,
|
|
1473
|
+
SpritesOpContext
|
|
1474
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1475
|
+
input: ChangeFileModeRequest,
|
|
1476
|
+
output: ChmodResponse,
|
|
1477
|
+
errors: [BadRequest, NotFound],
|
|
1478
|
+
protocol: SpritesProtocol,
|
|
1479
|
+
retry: Retry.Retry,
|
|
1480
|
+
}));
|
|
1481
|
+
|
|
1482
|
+
export type ChangeFileOwnerError = BadRequest | NotFound | SpritesOpError;
|
|
1483
|
+
/** Change File Owner Change file or directory ownership. */
|
|
1484
|
+
export const changeFileOwner: API.OperationMethod<
|
|
1485
|
+
ChangeFileOwnerRequest,
|
|
1486
|
+
ChownResponse,
|
|
1487
|
+
ChangeFileOwnerError,
|
|
1488
|
+
SpritesOpContext
|
|
1489
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1490
|
+
input: ChangeFileOwnerRequest,
|
|
1491
|
+
output: ChownResponse,
|
|
1492
|
+
errors: [BadRequest, NotFound],
|
|
1493
|
+
protocol: SpritesProtocol,
|
|
1494
|
+
retry: Retry.Retry,
|
|
1495
|
+
}));
|
|
1496
|
+
|
|
1497
|
+
export type CopyFileError = BadRequest | NotFound | SpritesOpError;
|
|
1498
|
+
/** Copy File or Directory Copy a file or directory. */
|
|
1499
|
+
export const copyFile: API.OperationMethod<
|
|
1500
|
+
CopyFileRequest,
|
|
1501
|
+
CopyResponse,
|
|
1502
|
+
CopyFileError,
|
|
1503
|
+
SpritesOpContext
|
|
1504
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1505
|
+
input: CopyFileRequest,
|
|
1506
|
+
output: CopyResponse,
|
|
1507
|
+
errors: [BadRequest, NotFound],
|
|
1508
|
+
protocol: SpritesProtocol,
|
|
1509
|
+
retry: Retry.Retry,
|
|
1510
|
+
}));
|
|
667
1511
|
|
|
668
1512
|
export type CreateCheckpointError = NotFound | SpritesOpError;
|
|
669
|
-
/** Create a checkpoint
|
|
1513
|
+
/** Create Checkpoint Create a new checkpoint of the current sprite state. Returns streaming NDJSON progress. */
|
|
670
1514
|
export const createCheckpoint: API.OperationMethod<
|
|
671
1515
|
CreateCheckpointRequest,
|
|
672
1516
|
CreateCheckpointResponse,
|
|
@@ -680,6 +1524,21 @@ export const createCheckpoint: API.OperationMethod<
|
|
|
680
1524
|
retry: Retry.Retry,
|
|
681
1525
|
}));
|
|
682
1526
|
|
|
1527
|
+
export type CreateOAuthApiKeyConnectionError = BadRequest | SpritesNotEnabled | SpritesOpError;
|
|
1528
|
+
/** Create an API-key connector Create a connector from a user-provided API key for providers that support key validation. */
|
|
1529
|
+
export const createOAuthApiKeyConnection: API.OperationMethod<
|
|
1530
|
+
CreateOAuthApiKeyConnectionRequest,
|
|
1531
|
+
ConnectionResponse,
|
|
1532
|
+
CreateOAuthApiKeyConnectionError,
|
|
1533
|
+
SpritesOpContext
|
|
1534
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1535
|
+
input: CreateOAuthApiKeyConnectionRequest,
|
|
1536
|
+
output: ConnectionResponse,
|
|
1537
|
+
errors: [BadRequest, SpritesNotEnabled],
|
|
1538
|
+
protocol: SpritesProtocol,
|
|
1539
|
+
retry: Retry.Retry,
|
|
1540
|
+
}));
|
|
1541
|
+
|
|
683
1542
|
export type CreateOrganizationTokenError = SpritesNotEnabled | SpritesOpError;
|
|
684
1543
|
/** Mint a Sprites bearer token from a Fly.io macaroon POST with Authorization: FlyV1 {FLY_API_TOKEN}. Sprite CRUD rejects Bearer FLY_API_TOKEN (401); callers mint once, cache, then Bearer the returned token. 401 with 'sprites not enabled' means the org has not enabled Sprites. */
|
|
685
1544
|
export const createOrganizationToken: API.OperationMethod<
|
|
@@ -695,23 +1554,83 @@ export const createOrganizationToken: API.OperationMethod<
|
|
|
695
1554
|
retry: Retry.Retry,
|
|
696
1555
|
}));
|
|
697
1556
|
|
|
698
|
-
export type CreateSpriteError = BadRequest | Conflict | SpritesOpError;
|
|
699
|
-
/** Create a sprite */
|
|
1557
|
+
export type CreateSpriteError = BadRequest | SpritesNotEnabled | Conflict | SpritesOpError;
|
|
1558
|
+
/** Create a sprite Create a new sprite with a unique name in your organization */
|
|
700
1559
|
export const createSprite: API.OperationMethod<
|
|
701
1560
|
CreateSpriteRequest,
|
|
702
|
-
|
|
1561
|
+
SpriteResponse,
|
|
703
1562
|
CreateSpriteError,
|
|
704
1563
|
SpritesOpContext
|
|
705
1564
|
> = /*@__PURE__*/ API.make(() => ({
|
|
706
1565
|
input: CreateSpriteRequest,
|
|
707
|
-
output:
|
|
708
|
-
errors: [BadRequest, Conflict],
|
|
1566
|
+
output: SpriteResponse,
|
|
1567
|
+
errors: [BadRequest, SpritesNotEnabled, Conflict],
|
|
1568
|
+
protocol: SpritesProtocol,
|
|
1569
|
+
retry: Retry.Retry,
|
|
1570
|
+
}));
|
|
1571
|
+
|
|
1572
|
+
export type DeleteFileError = BadRequest | NotFound | SpritesOpError;
|
|
1573
|
+
/** Delete File or Directory Delete a file or directory. */
|
|
1574
|
+
export const deleteFile: API.OperationMethod<
|
|
1575
|
+
DeleteFileRequest,
|
|
1576
|
+
DeleteResponse,
|
|
1577
|
+
DeleteFileError,
|
|
1578
|
+
SpritesOpContext
|
|
1579
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1580
|
+
input: DeleteFileRequest,
|
|
1581
|
+
output: DeleteResponse,
|
|
1582
|
+
errors: [BadRequest, NotFound],
|
|
1583
|
+
protocol: SpritesProtocol,
|
|
1584
|
+
retry: Retry.Retry,
|
|
1585
|
+
}));
|
|
1586
|
+
|
|
1587
|
+
export type DeleteOAuthConnectionError = SpritesNotEnabled | NotFound | SpritesOpError;
|
|
1588
|
+
/** Delete a connector Delete a connector and its encrypted credentials. */
|
|
1589
|
+
export const deleteOAuthConnection: API.OperationMethod<
|
|
1590
|
+
DeleteOAuthConnectionRequest,
|
|
1591
|
+
DeleteOAuthConnectionResponse,
|
|
1592
|
+
DeleteOAuthConnectionError,
|
|
1593
|
+
SpritesOpContext
|
|
1594
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1595
|
+
input: DeleteOAuthConnectionRequest,
|
|
1596
|
+
output: DeleteOAuthConnectionResponse,
|
|
1597
|
+
errors: [SpritesNotEnabled, NotFound],
|
|
1598
|
+
protocol: SpritesProtocol,
|
|
1599
|
+
retry: Retry.Retry,
|
|
1600
|
+
}));
|
|
1601
|
+
|
|
1602
|
+
export type DeletePrivilegesPolicyError = BadRequest | NotFound | SpritesOpError;
|
|
1603
|
+
/** Delete Privileges Policy Remove privileges policy to revert to default (unrestricted) behavior. */
|
|
1604
|
+
export const deletePrivilegesPolicy: API.OperationMethod<
|
|
1605
|
+
DeletePrivilegesPolicyRequest,
|
|
1606
|
+
DeletePrivilegesPolicyResponse,
|
|
1607
|
+
DeletePrivilegesPolicyError,
|
|
1608
|
+
SpritesOpContext
|
|
1609
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1610
|
+
input: DeletePrivilegesPolicyRequest,
|
|
1611
|
+
output: DeletePrivilegesPolicyResponse,
|
|
1612
|
+
errors: [BadRequest, NotFound],
|
|
1613
|
+
protocol: SpritesProtocol,
|
|
1614
|
+
retry: Retry.Retry,
|
|
1615
|
+
}));
|
|
1616
|
+
|
|
1617
|
+
export type DeleteResourcesPolicyError = BadRequest | NotFound | SpritesOpError;
|
|
1618
|
+
/** Delete Resources Policy Remove resources policy to revert to default behavior. */
|
|
1619
|
+
export const deleteResourcesPolicy: API.OperationMethod<
|
|
1620
|
+
DeleteResourcesPolicyRequest,
|
|
1621
|
+
DeleteResourcesPolicyResponse,
|
|
1622
|
+
DeleteResourcesPolicyError,
|
|
1623
|
+
SpritesOpContext
|
|
1624
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1625
|
+
input: DeleteResourcesPolicyRequest,
|
|
1626
|
+
output: DeleteResourcesPolicyResponse,
|
|
1627
|
+
errors: [BadRequest, NotFound],
|
|
709
1628
|
protocol: SpritesProtocol,
|
|
710
1629
|
retry: Retry.Retry,
|
|
711
1630
|
}));
|
|
712
1631
|
|
|
713
|
-
export type DeleteSpriteError = NotFound | SpritesOpError;
|
|
714
|
-
/** Delete a sprite */
|
|
1632
|
+
export type DeleteSpriteError = SpritesNotEnabled | NotFound | SpritesOpError;
|
|
1633
|
+
/** Delete a sprite Delete a sprite and all associated resources */
|
|
715
1634
|
export const deleteSprite: API.OperationMethod<
|
|
716
1635
|
DeleteSpriteRequest,
|
|
717
1636
|
DeleteSpriteResponse,
|
|
@@ -720,13 +1639,13 @@ export const deleteSprite: API.OperationMethod<
|
|
|
720
1639
|
> = /*@__PURE__*/ API.make(() => ({
|
|
721
1640
|
input: DeleteSpriteRequest,
|
|
722
1641
|
output: DeleteSpriteResponse,
|
|
723
|
-
errors: [NotFound],
|
|
1642
|
+
errors: [SpritesNotEnabled, NotFound],
|
|
724
1643
|
protocol: SpritesProtocol,
|
|
725
1644
|
retry: Retry.Retry,
|
|
726
1645
|
}));
|
|
727
1646
|
|
|
728
1647
|
export type ExecCommandError = BadRequest | NotFound | SpritesOpError;
|
|
729
|
-
/** Execute a command via HTTP POST (non-TTY). Simpler
|
|
1648
|
+
/** Execute Command Execute a command via simple HTTP POST (non-TTY only). Simpler alternative for exec for environments that can't handle websockets. */
|
|
730
1649
|
export const execCommand: API.OperationMethod<
|
|
731
1650
|
ExecCommandRequest,
|
|
732
1651
|
ExecResult,
|
|
@@ -741,52 +1660,142 @@ export const execCommand: API.OperationMethod<
|
|
|
741
1660
|
}));
|
|
742
1661
|
|
|
743
1662
|
export type GetCheckpointError = NotFound | SpritesOpError;
|
|
744
|
-
/** Get a checkpoint */
|
|
1663
|
+
/** Get Checkpoint Get details of a specific checkpoint. */
|
|
745
1664
|
export const getCheckpoint: API.OperationMethod<
|
|
746
1665
|
GetCheckpointRequest,
|
|
747
|
-
|
|
1666
|
+
CheckpointInfo,
|
|
748
1667
|
GetCheckpointError,
|
|
749
1668
|
SpritesOpContext
|
|
750
1669
|
> = /*@__PURE__*/ API.make(() => ({
|
|
751
1670
|
input: GetCheckpointRequest,
|
|
752
|
-
output:
|
|
1671
|
+
output: CheckpointInfo,
|
|
1672
|
+
errors: [NotFound],
|
|
1673
|
+
protocol: SpritesProtocol,
|
|
1674
|
+
retry: Retry.Retry,
|
|
1675
|
+
}));
|
|
1676
|
+
|
|
1677
|
+
export type GetNetworkPolicyError = NotFound | SpritesOpError;
|
|
1678
|
+
/** Get Network Policy Get the current network policy configuration. */
|
|
1679
|
+
export const getNetworkPolicy: API.OperationMethod<
|
|
1680
|
+
GetNetworkPolicyRequest,
|
|
1681
|
+
NetworkPolicyRequest,
|
|
1682
|
+
GetNetworkPolicyError,
|
|
1683
|
+
SpritesOpContext
|
|
1684
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1685
|
+
input: GetNetworkPolicyRequest,
|
|
1686
|
+
output: NetworkPolicyRequest,
|
|
1687
|
+
errors: [NotFound],
|
|
1688
|
+
protocol: SpritesProtocol,
|
|
1689
|
+
retry: Retry.Retry,
|
|
1690
|
+
}));
|
|
1691
|
+
|
|
1692
|
+
export type GetOAuthConnectionError = SpritesNotEnabled | NotFound | SpritesOpError;
|
|
1693
|
+
/** Get a connector Get a single connector by ID. */
|
|
1694
|
+
export const getOAuthConnection: API.OperationMethod<
|
|
1695
|
+
GetOAuthConnectionRequest,
|
|
1696
|
+
ConnectionResponse,
|
|
1697
|
+
GetOAuthConnectionError,
|
|
1698
|
+
SpritesOpContext
|
|
1699
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1700
|
+
input: GetOAuthConnectionRequest,
|
|
1701
|
+
output: ConnectionResponse,
|
|
1702
|
+
errors: [SpritesNotEnabled, NotFound],
|
|
1703
|
+
protocol: SpritesProtocol,
|
|
1704
|
+
retry: Retry.Retry,
|
|
1705
|
+
}));
|
|
1706
|
+
|
|
1707
|
+
export type GetPrivilegesPolicyError = NotFound | SpritesOpError;
|
|
1708
|
+
/** Get Privileges Policy Get the current privileges policy configuration (capability and device restrictions). */
|
|
1709
|
+
export const getPrivilegesPolicy: API.OperationMethod<
|
|
1710
|
+
GetPrivilegesPolicyRequest,
|
|
1711
|
+
GetPrivilegesPolicyResponse,
|
|
1712
|
+
GetPrivilegesPolicyError,
|
|
1713
|
+
SpritesOpContext
|
|
1714
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1715
|
+
input: GetPrivilegesPolicyRequest,
|
|
1716
|
+
output: GetPrivilegesPolicyResponse,
|
|
1717
|
+
errors: [NotFound],
|
|
1718
|
+
protocol: SpritesProtocol,
|
|
1719
|
+
retry: Retry.Retry,
|
|
1720
|
+
}));
|
|
1721
|
+
|
|
1722
|
+
export type GetResourcesPolicyError = NotFound | SpritesOpError;
|
|
1723
|
+
/** Get Resources Policy Get the current resources policy configuration (memory limits). */
|
|
1724
|
+
export const getResourcesPolicy: API.OperationMethod<
|
|
1725
|
+
GetResourcesPolicyRequest,
|
|
1726
|
+
GetResourcesPolicyResponse,
|
|
1727
|
+
GetResourcesPolicyError,
|
|
1728
|
+
SpritesOpContext
|
|
1729
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1730
|
+
input: GetResourcesPolicyRequest,
|
|
1731
|
+
output: GetResourcesPolicyResponse,
|
|
753
1732
|
errors: [NotFound],
|
|
754
1733
|
protocol: SpritesProtocol,
|
|
755
1734
|
retry: Retry.Retry,
|
|
756
1735
|
}));
|
|
757
1736
|
|
|
758
1737
|
export type GetServiceError = NotFound | SpritesOpError;
|
|
759
|
-
/** Get a
|
|
1738
|
+
/** Get Service Get details of a specific service. */
|
|
760
1739
|
export const getService: API.OperationMethod<
|
|
761
1740
|
GetServiceRequest,
|
|
762
|
-
|
|
1741
|
+
ServiceResponse,
|
|
763
1742
|
GetServiceError,
|
|
764
1743
|
SpritesOpContext
|
|
765
1744
|
> = /*@__PURE__*/ API.make(() => ({
|
|
766
1745
|
input: GetServiceRequest,
|
|
767
|
-
output:
|
|
1746
|
+
output: ServiceResponse,
|
|
1747
|
+
errors: [NotFound],
|
|
1748
|
+
protocol: SpritesProtocol,
|
|
1749
|
+
retry: Retry.Retry,
|
|
1750
|
+
}));
|
|
1751
|
+
|
|
1752
|
+
export type GetServiceLogsError = NotFound | SpritesOpError;
|
|
1753
|
+
/** Get Service Logs Stream logs for a service. */
|
|
1754
|
+
export const getServiceLogs: API.OperationMethod<
|
|
1755
|
+
GetServiceLogsRequest,
|
|
1756
|
+
GetServiceLogsResponse,
|
|
1757
|
+
GetServiceLogsError,
|
|
1758
|
+
SpritesOpContext
|
|
1759
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1760
|
+
input: GetServiceLogsRequest,
|
|
1761
|
+
output: GetServiceLogsResponse,
|
|
768
1762
|
errors: [NotFound],
|
|
769
1763
|
protocol: SpritesProtocol,
|
|
770
1764
|
retry: Retry.Retry,
|
|
771
1765
|
}));
|
|
772
1766
|
|
|
773
|
-
export type GetSpriteError = NotFound | SpritesOpError;
|
|
774
|
-
/** Get a sprite */
|
|
1767
|
+
export type GetSpriteError = SpritesNotEnabled | NotFound | SpritesOpError;
|
|
1768
|
+
/** Get a sprite Get details for a specific sprite */
|
|
775
1769
|
export const getSprite: API.OperationMethod<
|
|
776
1770
|
GetSpriteRequest,
|
|
777
|
-
|
|
1771
|
+
SpriteResponse,
|
|
778
1772
|
GetSpriteError,
|
|
779
1773
|
SpritesOpContext
|
|
780
1774
|
> = /*@__PURE__*/ API.make(() => ({
|
|
781
1775
|
input: GetSpriteRequest,
|
|
782
|
-
output:
|
|
1776
|
+
output: SpriteResponse,
|
|
1777
|
+
errors: [SpritesNotEnabled, NotFound],
|
|
1778
|
+
protocol: SpritesProtocol,
|
|
1779
|
+
retry: Retry.Retry,
|
|
1780
|
+
}));
|
|
1781
|
+
|
|
1782
|
+
export type KillExecSessionError = NotFound | SpritesOpError;
|
|
1783
|
+
/** Kill Exec Session Kill an exec session by session ID. Returns streaming NDJSON with kill progress. */
|
|
1784
|
+
export const killExecSession: API.OperationMethod<
|
|
1785
|
+
KillExecSessionRequest,
|
|
1786
|
+
KillExecSessionResponse,
|
|
1787
|
+
KillExecSessionError,
|
|
1788
|
+
SpritesOpContext
|
|
1789
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1790
|
+
input: KillExecSessionRequest,
|
|
1791
|
+
output: KillExecSessionResponse,
|
|
783
1792
|
errors: [NotFound],
|
|
784
1793
|
protocol: SpritesProtocol,
|
|
785
1794
|
retry: Retry.Retry,
|
|
786
1795
|
}));
|
|
787
1796
|
|
|
788
1797
|
export type ListCheckpointsError = NotFound | SpritesOpError;
|
|
789
|
-
/** List checkpoints */
|
|
1798
|
+
/** List Checkpoints List all checkpoints. */
|
|
790
1799
|
export const listCheckpoints: API.OperationMethod<
|
|
791
1800
|
ListCheckpointsRequest,
|
|
792
1801
|
ListCheckpointsResponse,
|
|
@@ -800,8 +1809,23 @@ export const listCheckpoints: API.OperationMethod<
|
|
|
800
1809
|
retry: Retry.Retry,
|
|
801
1810
|
}));
|
|
802
1811
|
|
|
1812
|
+
export type ListDirectoryError = NotFound | SpritesOpError;
|
|
1813
|
+
/** List Directory List directory contents. */
|
|
1814
|
+
export const listDirectory: API.OperationMethod<
|
|
1815
|
+
ListDirectoryRequest,
|
|
1816
|
+
ListResponse,
|
|
1817
|
+
ListDirectoryError,
|
|
1818
|
+
SpritesOpContext
|
|
1819
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1820
|
+
input: ListDirectoryRequest,
|
|
1821
|
+
output: ListResponse,
|
|
1822
|
+
errors: [NotFound],
|
|
1823
|
+
protocol: SpritesProtocol,
|
|
1824
|
+
retry: Retry.Retry,
|
|
1825
|
+
}));
|
|
1826
|
+
|
|
803
1827
|
export type ListExecSessionsError = NotFound | SpritesOpError;
|
|
804
|
-
/** List active exec sessions */
|
|
1828
|
+
/** List Exec Sessions List active exec sessions. */
|
|
805
1829
|
export const listExecSessions: API.OperationMethod<
|
|
806
1830
|
ListExecSessionsRequest,
|
|
807
1831
|
ListExecSessionsResponse,
|
|
@@ -815,8 +1839,23 @@ export const listExecSessions: API.OperationMethod<
|
|
|
815
1839
|
retry: Retry.Retry,
|
|
816
1840
|
}));
|
|
817
1841
|
|
|
1842
|
+
export type ListOAuthConnectionsError = SpritesNotEnabled | SpritesOpError;
|
|
1843
|
+
/** List connectors List connectors configured for the authenticated organization. */
|
|
1844
|
+
export const listOAuthConnections: API.OperationMethod<
|
|
1845
|
+
ListOAuthConnectionsRequest,
|
|
1846
|
+
ConnectionListResponse,
|
|
1847
|
+
ListOAuthConnectionsError,
|
|
1848
|
+
SpritesOpContext
|
|
1849
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1850
|
+
input: ListOAuthConnectionsRequest,
|
|
1851
|
+
output: ConnectionListResponse,
|
|
1852
|
+
errors: [SpritesNotEnabled],
|
|
1853
|
+
protocol: SpritesProtocol,
|
|
1854
|
+
retry: Retry.Retry,
|
|
1855
|
+
}));
|
|
1856
|
+
|
|
818
1857
|
export type ListServicesError = NotFound | SpritesOpError;
|
|
819
|
-
/** List configured
|
|
1858
|
+
/** List Services List all configured services and their current state. */
|
|
820
1859
|
export const listServices: API.OperationMethod<
|
|
821
1860
|
ListServicesRequest,
|
|
822
1861
|
ListServicesResponse,
|
|
@@ -830,19 +1869,19 @@ export const listServices: API.OperationMethod<
|
|
|
830
1869
|
retry: Retry.Retry,
|
|
831
1870
|
}));
|
|
832
1871
|
|
|
833
|
-
export type ListSpritesError = SpritesOpError;
|
|
834
|
-
/** List sprites for the authenticated organization */
|
|
1872
|
+
export type ListSpritesError = SpritesNotEnabled | SpritesOpError;
|
|
1873
|
+
/** List sprites List all sprites for the authenticated organization */
|
|
835
1874
|
export const listSprites: API.PaginatedOperationMethod<
|
|
836
1875
|
ListSpritesRequest,
|
|
837
|
-
|
|
1876
|
+
SpriteListResponse,
|
|
838
1877
|
ListSpritesError,
|
|
839
1878
|
SpritesOpContext,
|
|
840
|
-
|
|
1879
|
+
SpriteResponse
|
|
841
1880
|
> = /*@__PURE__*/ API.makePaginated(
|
|
842
1881
|
() => ({
|
|
843
1882
|
input: ListSpritesRequest,
|
|
844
|
-
output:
|
|
845
|
-
errors: [],
|
|
1883
|
+
output: SpriteListResponse,
|
|
1884
|
+
errors: [SpritesNotEnabled],
|
|
846
1885
|
protocol: SpritesProtocol,
|
|
847
1886
|
retry: Retry.Retry,
|
|
848
1887
|
pagination: {
|
|
@@ -856,23 +1895,113 @@ export const listSprites: API.PaginatedOperationMethod<
|
|
|
856
1895
|
paginateCursor,
|
|
857
1896
|
) as any;
|
|
858
1897
|
|
|
1898
|
+
export type OauthConnectionCallbackError = BadRequest | SpritesNotEnabled | SpritesOpError;
|
|
1899
|
+
/** Complete OAuth authorization Exchange an OAuth authorization code for an encrypted connector. */
|
|
1900
|
+
export const oauthConnectionCallback: API.OperationMethod<
|
|
1901
|
+
OauthConnectionCallbackRequest,
|
|
1902
|
+
ConnectionResponse,
|
|
1903
|
+
OauthConnectionCallbackError,
|
|
1904
|
+
SpritesOpContext
|
|
1905
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1906
|
+
input: OauthConnectionCallbackRequest,
|
|
1907
|
+
output: ConnectionResponse,
|
|
1908
|
+
errors: [BadRequest, SpritesNotEnabled],
|
|
1909
|
+
protocol: SpritesProtocol,
|
|
1910
|
+
retry: Retry.Retry,
|
|
1911
|
+
}));
|
|
1912
|
+
|
|
1913
|
+
export type PatchOAuthConnectionError = BadRequest | SpritesNotEnabled | NotFound | SpritesOpError;
|
|
1914
|
+
/** Update a connector Update a connector access policy. */
|
|
1915
|
+
export const patchOAuthConnection: API.OperationMethod<
|
|
1916
|
+
PatchOAuthConnectionRequest,
|
|
1917
|
+
ConnectionResponse,
|
|
1918
|
+
PatchOAuthConnectionError,
|
|
1919
|
+
SpritesOpContext
|
|
1920
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1921
|
+
input: PatchOAuthConnectionRequest,
|
|
1922
|
+
output: ConnectionResponse,
|
|
1923
|
+
errors: [BadRequest, SpritesNotEnabled, NotFound],
|
|
1924
|
+
protocol: SpritesProtocol,
|
|
1925
|
+
retry: Retry.Retry,
|
|
1926
|
+
}));
|
|
1927
|
+
|
|
1928
|
+
export type ProvisionOAuthConnectionError = BadRequest | SpritesNotEnabled | SpritesOpError;
|
|
1929
|
+
/** Provision a connector Provision a system-managed connector for providers that support platform-managed keys. */
|
|
1930
|
+
export const provisionOAuthConnection: API.OperationMethod<
|
|
1931
|
+
ProvisionOAuthConnectionRequest,
|
|
1932
|
+
ConnectionResponse,
|
|
1933
|
+
ProvisionOAuthConnectionError,
|
|
1934
|
+
SpritesOpContext
|
|
1935
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1936
|
+
input: ProvisionOAuthConnectionRequest,
|
|
1937
|
+
output: ConnectionResponse,
|
|
1938
|
+
errors: [BadRequest, SpritesNotEnabled],
|
|
1939
|
+
protocol: SpritesProtocol,
|
|
1940
|
+
retry: Retry.Retry,
|
|
1941
|
+
}));
|
|
1942
|
+
|
|
859
1943
|
export type PutServiceError = BadRequest | NotFound | SpritesOpError;
|
|
860
|
-
/** Create or update a
|
|
1944
|
+
/** Create Service Create or update a service definition. */
|
|
861
1945
|
export const putService: API.OperationMethod<
|
|
862
1946
|
PutServiceRequest,
|
|
863
|
-
|
|
1947
|
+
ServiceResponse,
|
|
864
1948
|
PutServiceError,
|
|
865
1949
|
SpritesOpContext
|
|
866
1950
|
> = /*@__PURE__*/ API.make(() => ({
|
|
867
1951
|
input: PutServiceRequest,
|
|
868
|
-
output:
|
|
1952
|
+
output: ServiceResponse,
|
|
1953
|
+
errors: [BadRequest, NotFound],
|
|
1954
|
+
protocol: SpritesProtocol,
|
|
1955
|
+
retry: Retry.Retry,
|
|
1956
|
+
}));
|
|
1957
|
+
|
|
1958
|
+
export type ReadFileError = NotFound | SpritesOpError;
|
|
1959
|
+
/** Read File Read file contents from the sprite filesystem. Returns raw file bytes. */
|
|
1960
|
+
export const readFile: API.OperationMethod<
|
|
1961
|
+
ReadFileRequest,
|
|
1962
|
+
ReadFileResponse,
|
|
1963
|
+
ReadFileError,
|
|
1964
|
+
SpritesOpContext
|
|
1965
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1966
|
+
input: ReadFileRequest,
|
|
1967
|
+
output: ReadFileResponse,
|
|
1968
|
+
errors: [NotFound],
|
|
1969
|
+
protocol: SpritesProtocol,
|
|
1970
|
+
retry: Retry.Retry,
|
|
1971
|
+
}));
|
|
1972
|
+
|
|
1973
|
+
export type RenameFileError = BadRequest | NotFound | SpritesOpError;
|
|
1974
|
+
/** Rename File or Directory Rename or move a file or directory. */
|
|
1975
|
+
export const renameFile: API.OperationMethod<
|
|
1976
|
+
RenameFileRequest,
|
|
1977
|
+
RenameResponse,
|
|
1978
|
+
RenameFileError,
|
|
1979
|
+
SpritesOpContext
|
|
1980
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1981
|
+
input: RenameFileRequest,
|
|
1982
|
+
output: RenameResponse,
|
|
869
1983
|
errors: [BadRequest, NotFound],
|
|
870
1984
|
protocol: SpritesProtocol,
|
|
871
1985
|
retry: Retry.Retry,
|
|
872
1986
|
}));
|
|
873
1987
|
|
|
1988
|
+
export type RestartServiceError = NotFound | SpritesOpError;
|
|
1989
|
+
/** Restart Service Restart a service (stop if running, then start). Returns streaming NDJSON with stop and start progress. */
|
|
1990
|
+
export const restartService: API.OperationMethod<
|
|
1991
|
+
RestartServiceRequest,
|
|
1992
|
+
RestartServiceResponse,
|
|
1993
|
+
RestartServiceError,
|
|
1994
|
+
SpritesOpContext
|
|
1995
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1996
|
+
input: RestartServiceRequest,
|
|
1997
|
+
output: RestartServiceResponse,
|
|
1998
|
+
errors: [NotFound],
|
|
1999
|
+
protocol: SpritesProtocol,
|
|
2000
|
+
retry: Retry.Retry,
|
|
2001
|
+
}));
|
|
2002
|
+
|
|
874
2003
|
export type RestoreCheckpointError = NotFound | SpritesOpError;
|
|
875
|
-
/** Restore a checkpoint
|
|
2004
|
+
/** Restore Checkpoint Restore to a specific checkpoint. Returns streaming NDJSON progress. */
|
|
876
2005
|
export const restoreCheckpoint: API.OperationMethod<
|
|
877
2006
|
RestoreCheckpointRequest,
|
|
878
2007
|
RestoreCheckpointResponse,
|
|
@@ -886,31 +2015,121 @@ export const restoreCheckpoint: API.OperationMethod<
|
|
|
886
2015
|
retry: Retry.Retry,
|
|
887
2016
|
}));
|
|
888
2017
|
|
|
889
|
-
export type
|
|
890
|
-
/** Update
|
|
2018
|
+
export type SetNetworkPolicyError = BadRequest | NotFound | SpritesOpError;
|
|
2019
|
+
/** Set Network Policy Update the network policy configuration. */
|
|
2020
|
+
export const setNetworkPolicy: API.OperationMethod<
|
|
2021
|
+
SetNetworkPolicyRequest,
|
|
2022
|
+
SetNetworkPolicyResponse,
|
|
2023
|
+
SetNetworkPolicyError,
|
|
2024
|
+
SpritesOpContext
|
|
2025
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2026
|
+
input: SetNetworkPolicyRequest,
|
|
2027
|
+
output: SetNetworkPolicyResponse,
|
|
2028
|
+
errors: [BadRequest, NotFound],
|
|
2029
|
+
protocol: SpritesProtocol,
|
|
2030
|
+
retry: Retry.Retry,
|
|
2031
|
+
}));
|
|
2032
|
+
|
|
2033
|
+
export type SetPrivilegesPolicyError = BadRequest | NotFound | SpritesOpError;
|
|
2034
|
+
/** Set Privileges Policy Update the privileges policy configuration to restrict capabilities or devices. */
|
|
2035
|
+
export const setPrivilegesPolicy: API.OperationMethod<
|
|
2036
|
+
SetPrivilegesPolicyRequest,
|
|
2037
|
+
SetPrivilegesPolicyResponse,
|
|
2038
|
+
SetPrivilegesPolicyError,
|
|
2039
|
+
SpritesOpContext
|
|
2040
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2041
|
+
input: SetPrivilegesPolicyRequest,
|
|
2042
|
+
output: SetPrivilegesPolicyResponse,
|
|
2043
|
+
errors: [BadRequest, NotFound],
|
|
2044
|
+
protocol: SpritesProtocol,
|
|
2045
|
+
retry: Retry.Retry,
|
|
2046
|
+
}));
|
|
2047
|
+
|
|
2048
|
+
export type SetResourcesPolicyError = BadRequest | NotFound | SpritesOpError;
|
|
2049
|
+
/** Set Resources Policy Update the resources policy configuration to set memory limits. */
|
|
2050
|
+
export const setResourcesPolicy: API.OperationMethod<
|
|
2051
|
+
SetResourcesPolicyRequest,
|
|
2052
|
+
SetResourcesPolicyResponse,
|
|
2053
|
+
SetResourcesPolicyError,
|
|
2054
|
+
SpritesOpContext
|
|
2055
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2056
|
+
input: SetResourcesPolicyRequest,
|
|
2057
|
+
output: SetResourcesPolicyResponse,
|
|
2058
|
+
errors: [BadRequest, NotFound],
|
|
2059
|
+
protocol: SpritesProtocol,
|
|
2060
|
+
retry: Retry.Retry,
|
|
2061
|
+
}));
|
|
2062
|
+
|
|
2063
|
+
export type StartServiceError = NotFound | SpritesOpError;
|
|
2064
|
+
/** Start Service Start a service. Returns streaming NDJSON with stdout/stderr. */
|
|
2065
|
+
export const startService: API.OperationMethod<
|
|
2066
|
+
StartServiceRequest,
|
|
2067
|
+
StartServiceResponse,
|
|
2068
|
+
StartServiceError,
|
|
2069
|
+
SpritesOpContext
|
|
2070
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2071
|
+
input: StartServiceRequest,
|
|
2072
|
+
output: StartServiceResponse,
|
|
2073
|
+
errors: [NotFound],
|
|
2074
|
+
protocol: SpritesProtocol,
|
|
2075
|
+
retry: Retry.Retry,
|
|
2076
|
+
}));
|
|
2077
|
+
|
|
2078
|
+
export type StopServiceError = NotFound | SpritesOpError;
|
|
2079
|
+
/** Stop Service Stop a running service. Returns streaming NDJSON with service stop progress. */
|
|
2080
|
+
export const stopService: API.OperationMethod<
|
|
2081
|
+
StopServiceRequest,
|
|
2082
|
+
StopServiceResponse,
|
|
2083
|
+
StopServiceError,
|
|
2084
|
+
SpritesOpContext
|
|
2085
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2086
|
+
input: StopServiceRequest,
|
|
2087
|
+
output: StopServiceResponse,
|
|
2088
|
+
errors: [NotFound],
|
|
2089
|
+
protocol: SpritesProtocol,
|
|
2090
|
+
retry: Retry.Retry,
|
|
2091
|
+
}));
|
|
2092
|
+
|
|
2093
|
+
export type UpdateOAuthConnectionError = BadRequest | SpritesNotEnabled | NotFound | SpritesOpError;
|
|
2094
|
+
/** Update a connector Update a connector access policy. */
|
|
2095
|
+
export const updateOAuthConnection: API.OperationMethod<
|
|
2096
|
+
UpdateOAuthConnectionRequest,
|
|
2097
|
+
ConnectionResponse,
|
|
2098
|
+
UpdateOAuthConnectionError,
|
|
2099
|
+
SpritesOpContext
|
|
2100
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2101
|
+
input: UpdateOAuthConnectionRequest,
|
|
2102
|
+
output: ConnectionResponse,
|
|
2103
|
+
errors: [BadRequest, SpritesNotEnabled, NotFound],
|
|
2104
|
+
protocol: SpritesProtocol,
|
|
2105
|
+
retry: Retry.Retry,
|
|
2106
|
+
}));
|
|
2107
|
+
|
|
2108
|
+
export type UpdateSpriteError = BadRequest | SpritesNotEnabled | NotFound | SpritesOpError;
|
|
2109
|
+
/** Update a sprite Update sprite settings such as URL authentication */
|
|
891
2110
|
export const updateSprite: API.OperationMethod<
|
|
892
2111
|
UpdateSpriteRequest,
|
|
893
|
-
|
|
2112
|
+
SpriteResponse,
|
|
894
2113
|
UpdateSpriteError,
|
|
895
2114
|
SpritesOpContext
|
|
896
2115
|
> = /*@__PURE__*/ API.make(() => ({
|
|
897
2116
|
input: UpdateSpriteRequest,
|
|
898
|
-
output:
|
|
899
|
-
errors: [NotFound],
|
|
2117
|
+
output: SpriteResponse,
|
|
2118
|
+
errors: [BadRequest, SpritesNotEnabled, NotFound],
|
|
900
2119
|
protocol: SpritesProtocol,
|
|
901
2120
|
retry: Retry.Retry,
|
|
902
2121
|
}));
|
|
903
2122
|
|
|
904
2123
|
export type WriteFileError = BadRequest | NotFound | SpritesOpError;
|
|
905
|
-
/** Write file contents to the sprite filesystem. Request body
|
|
2124
|
+
/** Write File Write file contents to the sprite filesystem. Request body contains raw file bytes. */
|
|
906
2125
|
export const writeFile: API.OperationMethod<
|
|
907
2126
|
WriteFileRequest,
|
|
908
|
-
|
|
2127
|
+
WriteResponse,
|
|
909
2128
|
WriteFileError,
|
|
910
2129
|
SpritesOpContext
|
|
911
2130
|
> = /*@__PURE__*/ API.make(() => ({
|
|
912
2131
|
input: WriteFileRequest,
|
|
913
|
-
output:
|
|
2132
|
+
output: WriteResponse,
|
|
914
2133
|
errors: [BadRequest, NotFound],
|
|
915
2134
|
protocol: SpritesProtocol,
|
|
916
2135
|
retry: Retry.Retry,
|