@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.
Files changed (50) hide show
  1. package/README.md +34 -0
  2. package/lib/credentials.d.ts +2 -2
  3. package/lib/credentials.d.ts.map +1 -1
  4. package/lib/credentials.js +2 -2
  5. package/lib/credentials.js.map +1 -1
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +1 -1
  8. package/lib/errors.js.map +1 -1
  9. package/lib/protocol.d.ts +4 -4
  10. package/lib/protocol.d.ts.map +1 -1
  11. package/lib/protocol.js +58 -62
  12. package/lib/protocol.js.map +1 -1
  13. package/lib/protocol.test.js +38 -7
  14. package/lib/protocol.test.js.map +1 -1
  15. package/lib/retry.d.ts +1 -1
  16. package/lib/retry.d.ts.map +1 -1
  17. package/lib/retry.js +1 -1
  18. package/lib/retry.js.map +1 -1
  19. package/lib/services/addons.d.ts +58 -8
  20. package/lib/services/addons.d.ts.map +1 -1
  21. package/lib/services/addons.js +40 -85
  22. package/lib/services/addons.js.map +1 -1
  23. package/lib/services/machines.d.ts +209 -60
  24. package/lib/services/machines.d.ts.map +1 -1
  25. package/lib/services/machines.js +316 -692
  26. package/lib/services/machines.js.map +1 -1
  27. package/lib/services/mpg.d.ts +2 -2
  28. package/lib/services/mpg.d.ts.map +1 -1
  29. package/lib/services/mpg.js +37 -153
  30. package/lib/services/mpg.js.map +1 -1
  31. package/lib/services/sprites.d.ts +687 -144
  32. package/lib/services/sprites.d.ts.map +1 -1
  33. package/lib/services/sprites.js +667 -183
  34. package/lib/services/sprites.js.map +1 -1
  35. package/lib/sprites-mint.test.js +4 -5
  36. package/lib/sprites-mint.test.js.map +1 -1
  37. package/lib/traits.d.ts.map +1 -1
  38. package/lib/traits.js.map +1 -1
  39. package/package.json +14 -12
  40. package/src/credentials.ts +8 -12
  41. package/src/errors.ts +6 -10
  42. package/src/protocol.test.ts +83 -43
  43. package/src/protocol.ts +119 -135
  44. package/src/retry.ts +2 -8
  45. package/src/services/addons.ts +135 -154
  46. package/src/services/machines.ts +694 -1222
  47. package/src/services/mpg.ts +59 -217
  48. package/src/services/sprites.ts +1573 -354
  49. package/src/sprites-mint.test.ts +25 -67
  50. package/src/traits.ts +5 -12
@@ -1,17 +1,83 @@
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
- import * as API from "@distilled.cloud/core/api";
4
- import * as T from "../traits.js";
5
- import { SpritesProtocol, } from "../protocol.js";
4
+ import { BadRequest, Conflict, NotFound, SpritesNotEnabled } from "../errors.js";
6
5
  import { paginateCursor } from "../pagination.js";
7
- import { BadRequest, Conflict, NotFound, SpritesNotEnabled, } from "../errors.js";
6
+ import { SpritesProtocol } from "../protocol.js";
8
7
  import * as Retry from "../retry.js";
8
+ import * as T from "../traits.js";
9
+ export const AuthorizeOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
+ provider: S.String.pipe(T.Label()),
11
+ scopes: S.optional(S.String.pipe(T.Query())),
12
+ add_scopes: S.optional(S.String.pipe(T.Query())),
13
+ redirect_uri: S.optional(S.String.pipe(T.Query())),
14
+ state: S.optional(S.String.pipe(T.Query())),
15
+ }).pipe(T.Http({ method: "GET", uri: "/oauth/{provider}/authorize", code: 200 }))).annotate({
16
+ identifier: "AuthorizeOAuthConnectionRequest",
17
+ });
18
+ export const OAuthAuthorizeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
19
+ authorize_url: S.String,
20
+ state: S.String,
21
+ })).annotate({ identifier: "OAuthAuthorizeResponse" });
22
+ export const ChangeFileModeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
23
+ name: S.String.pipe(T.Label()),
24
+ asRoot: S.Boolean,
25
+ mode: S.String,
26
+ path: S.String,
27
+ recursive: S.Boolean,
28
+ workingDir: S.String,
29
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/chmod", code: 200 }))).annotate({ identifier: "ChangeFileModeRequest" });
30
+ export const ChmodResult = /*@__PURE__*/ S.suspend(() => S.Struct({
31
+ mode: S.String,
32
+ path: S.String,
33
+ })).annotate({ identifier: "ChmodResult" });
34
+ export const ChmodResponseAffectedList = /*@__PURE__*/ S.Array(ChmodResult);
35
+ export const ChmodResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
36
+ affected: ChmodResponseAffectedList,
37
+ count: S.Number,
38
+ })).annotate({ identifier: "ChmodResponse" });
39
+ export const ChangeFileOwnerRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
40
+ name: S.String.pipe(T.Label()),
41
+ asRoot: S.Boolean,
42
+ gid: S.Unknown,
43
+ path: S.String,
44
+ recursive: S.Boolean,
45
+ uid: S.Unknown,
46
+ workingDir: S.String,
47
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/chown", code: 200 }))).annotate({ identifier: "ChangeFileOwnerRequest" });
48
+ export const ChownResult = /*@__PURE__*/ S.suspend(() => S.Struct({
49
+ gid: S.Number,
50
+ path: S.String,
51
+ uid: S.Number,
52
+ })).annotate({ identifier: "ChownResult" });
53
+ export const ChownResponseAffectedList = /*@__PURE__*/ S.Array(ChownResult);
54
+ export const ChownResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
55
+ affected: ChownResponseAffectedList,
56
+ count: S.Number,
57
+ })).annotate({ identifier: "ChownResponse" });
58
+ export const CopyFileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
59
+ name: S.String.pipe(T.Label()),
60
+ asRoot: S.Boolean,
61
+ dest: S.String,
62
+ preserveAttrs: S.Boolean,
63
+ recursive: S.Boolean,
64
+ source: S.String,
65
+ workingDir: S.String,
66
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/copy", code: 200 }))).annotate({ identifier: "CopyFileRequest" });
67
+ export const CopyResult = /*@__PURE__*/ S.suspend(() => S.Struct({
68
+ dest: S.String,
69
+ source: S.String,
70
+ })).annotate({ identifier: "CopyResult" });
71
+ export const CopyResponseCopiedList = /*@__PURE__*/ S.Array(CopyResult);
72
+ export const CopyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
73
+ copied: CopyResponseCopiedList,
74
+ count: S.Number,
75
+ totalBytes: S.Number,
76
+ })).annotate({ identifier: "CopyResponse" });
9
77
  export const CreateCheckpointRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
78
  name: S.String.pipe(T.Label()),
11
79
  comment: S.optional(S.String),
12
- }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/checkpoint", code: 200 }))).annotate({
13
- identifier: "CreateCheckpointRequest",
14
- });
80
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/checkpoint", code: 200 }))).annotate({ identifier: "CreateCheckpointRequest" });
15
81
  export const StreamEvent = /*@__PURE__*/ S.suspend(() => S.Struct({
16
82
  type: S.optional(S.String),
17
83
  data: S.optional(S.String),
@@ -19,9 +85,46 @@ export const StreamEvent = /*@__PURE__*/ S.suspend(() => S.Struct({
19
85
  time: S.optional(S.String),
20
86
  })).annotate({ identifier: "StreamEvent" });
21
87
  export const CreateCheckpointResponseBodyList = /*@__PURE__*/ S.Array(StreamEvent);
22
- export const CreateCheckpointResponse = /*@__PURE__*/ S.suspend(() => CreateCheckpointResponseBodyList.pipe(T.RawResponseRoot())).annotate({
23
- identifier: "CreateCheckpointResponse",
88
+ export const CreateCheckpointResponse = /*@__PURE__*/ S.suspend(() => CreateCheckpointResponseBodyList.pipe(T.RawResponseRoot())).annotate({ identifier: "CreateCheckpointResponse" });
89
+ export const AccessPolicyAllowedEndpointsList = /*@__PURE__*/ S.Array(S.String);
90
+ export const AccessPolicyBlockedEndpointsList = /*@__PURE__*/ S.Array(S.String);
91
+ export const AccessPolicySpriteLabelsList = /*@__PURE__*/ S.Array(S.String);
92
+ export const AccessPolicy = /*@__PURE__*/ S.suspend(() => S.Struct({
93
+ allow_all: S.optional(S.Boolean),
94
+ allowed_endpoints: S.optional(AccessPolicyAllowedEndpointsList),
95
+ blocked_endpoints: S.optional(AccessPolicyBlockedEndpointsList),
96
+ name_prefix: S.optional(S.String),
97
+ sprite_labels: S.optional(AccessPolicySpriteLabelsList),
98
+ })).annotate({ identifier: "AccessPolicy" });
99
+ export const CreateOAuthApiKeyConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
100
+ access_policy: S.optional(AccessPolicy),
101
+ api_key: S.String.pipe(T.SensitiveValue({})),
102
+ base_api_url: S.optional(S.String),
103
+ provider: S.String,
104
+ }).pipe(T.Http({ method: "POST", uri: "/oauth/connections/api_key", code: 200 }))).annotate({
105
+ identifier: "CreateOAuthApiKeyConnectionRequest",
24
106
  });
107
+ export const ConnectionConnectionType = S.String;
108
+ export const ConnectionNotesList = /*@__PURE__*/ S.Array(S.Unknown);
109
+ export const Connection = /*@__PURE__*/ S.suspend(() => S.Struct({
110
+ access_policy: S.optional(AccessPolicy),
111
+ connection_type: S.optional(ConnectionConnectionType),
112
+ id: S.String,
113
+ inserted_at: S.optional(S.String),
114
+ notes: S.optional(ConnectionNotesList),
115
+ provider: S.String,
116
+ provider_account_id: S.String,
117
+ provider_account_name: S.optional(S.String),
118
+ provider_info: S.optional(S.Unknown),
119
+ scopes: S.optional(S.String),
120
+ token_expires_at: S.optional(S.String),
121
+ updated_at: S.optional(S.String),
122
+ usage_snippet: S.optional(S.String),
123
+ user_id: S.optional(S.String),
124
+ })).annotate({ identifier: "Connection" });
125
+ export const ConnectionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
126
+ connection: Connection,
127
+ })).annotate({ identifier: "ConnectionResponse" });
25
128
  export const CreateOrganizationTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
26
129
  org: S.String.pipe(T.Label()),
27
130
  description: S.optional(S.String),
@@ -34,53 +137,89 @@ export const CreateOrganizationTokenResponse = /*@__PURE__*/ S.suspend(() => S.S
34
137
  })).annotate({
35
138
  identifier: "CreateOrganizationTokenResponse",
36
139
  });
37
- export const UrlAuth = S.String;
38
- export const UrlSettings = /*@__PURE__*/ S.suspend(() => S.Struct({
39
- auth: S.optional(UrlAuth),
40
- private_access: S.optional(S.String),
41
- })).annotate({ identifier: "UrlSettings" });
42
- export const CreateSpriteRequestLabelsList = /*@__PURE__*/ S.Array(S.String);
140
+ export const UrlSettingsRequestAuth = S.String;
141
+ export const UrlSettingsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
142
+ auth: S.optional(UrlSettingsRequestAuth),
143
+ })).annotate({ identifier: "UrlSettingsRequest" });
144
+ export const SpritesCreatePostRequestLabelsList = /*@__PURE__*/ S.Array(S.String);
43
145
  export const CreateSpriteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
44
146
  name: S.String,
45
- url_settings: S.optional(UrlSettings),
46
- labels: S.optional(CreateSpriteRequestLabelsList),
47
- }).pipe(T.Http({ method: "POST", uri: "/sprites", code: 200 }))).annotate({
48
- identifier: "CreateSpriteRequest",
49
- });
50
- export const SpriteStatus = S.String;
51
- export const SpriteLabelsList = /*@__PURE__*/ S.Array(S.String);
52
- export const Sprite = /*@__PURE__*/ S.suspend(() => S.Struct({
53
- id: S.optional(S.String),
54
- name: S.optional(S.String),
55
- organization: S.optional(S.String),
56
- org_slug: S.optional(S.String),
57
- url: S.optional(S.String),
58
- url_settings: S.optional(UrlSettings),
59
- status: S.optional(SpriteStatus),
60
- labels: S.optional(SpriteLabelsList),
61
- created_at: S.optional(S.String),
62
- updated_at: S.optional(S.String),
63
- last_started_at: S.optional(S.NullOr(S.String)),
64
- last_active_at: S.optional(S.NullOr(S.String)),
147
+ url_settings: S.optional(UrlSettingsRequest),
148
+ labels: S.optional(SpritesCreatePostRequestLabelsList),
149
+ }).pipe(T.Http({ method: "POST", uri: "/sprites", code: 200 }))).annotate({ identifier: "CreateSpriteRequest" });
150
+ export const SpriteResponseLabelsList = /*@__PURE__*/ S.Array(S.String);
151
+ export const SpriteResponseStatus = S.String;
152
+ export const UrlSettingsAuth = S.String;
153
+ export const UrlSettingsPrivateAccess = S.String;
154
+ export const UrlSettings = /*@__PURE__*/ S.suspend(() => S.Struct({
155
+ auth: UrlSettingsAuth,
156
+ private_access: S.optional(UrlSettingsPrivateAccess),
157
+ })).annotate({ identifier: "UrlSettings" });
158
+ export const SpriteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
159
+ created_at: S.String,
160
+ environment_version: S.optional(S.NullOr(S.String)),
161
+ id: S.String,
162
+ labels: S.optional(SpriteResponseLabelsList),
65
163
  last_running_at: S.optional(S.NullOr(S.String)),
164
+ last_warming_at: S.optional(S.NullOr(S.String)),
165
+ name: S.String,
166
+ organization: S.String,
167
+ status: SpriteResponseStatus,
168
+ updated_at: S.String,
169
+ url: S.String,
170
+ url_settings: S.optional(S.NullOr(UrlSettings)),
66
171
  version: S.optional(S.NullOr(S.String)),
67
- })).annotate({ identifier: "Sprite" });
68
- export const DeleteSpriteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
172
+ })).annotate({ identifier: "SpriteResponse" });
173
+ export const DeleteFileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
174
+ name: S.String.pipe(T.Label()),
175
+ asRoot: S.Boolean,
176
+ path: S.String,
177
+ recursive: S.Boolean,
178
+ workingDir: S.String,
179
+ }).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}/fs/delete", code: 200 }))).annotate({ identifier: "DeleteFileRequest" });
180
+ export const DeleteResponseDeletedList = /*@__PURE__*/ S.Array(S.String);
181
+ export const DeleteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
182
+ count: S.Number,
183
+ deleted: DeleteResponseDeletedList,
184
+ })).annotate({ identifier: "DeleteResponse" });
185
+ export const DeleteOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
186
+ id: S.String.pipe(T.Label()),
187
+ }).pipe(T.Http({ method: "DELETE", uri: "/oauth/connections/{id}", code: 200 }))).annotate({
188
+ identifier: "DeleteOAuthConnectionRequest",
189
+ });
190
+ export const DeleteOAuthConnectionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
191
+ identifier: "DeleteOAuthConnectionResponse",
192
+ });
193
+ export const DeletePrivilegesPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
69
194
  name: S.String.pipe(T.Label()),
70
- }).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}", code: 200 }))).annotate({
71
- identifier: "DeleteSpriteRequest",
195
+ }).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}/policy/privileges", code: 200 }))).annotate({
196
+ identifier: "DeletePrivilegesPolicyRequest",
72
197
  });
198
+ export const DeletePrivilegesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
199
+ identifier: "DeletePrivilegesPolicyResponse",
200
+ });
201
+ export const DeleteResourcesPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
202
+ name: S.String.pipe(T.Label()),
203
+ }).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}/policy/resources", code: 200 }))).annotate({
204
+ identifier: "DeleteResourcesPolicyRequest",
205
+ });
206
+ export const DeleteResourcesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
207
+ identifier: "DeleteResourcesPolicyResponse",
208
+ });
209
+ export const DeleteSpriteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
210
+ name: S.String.pipe(T.Label()),
211
+ }).pipe(T.Http({ method: "DELETE", uri: "/sprites/{name}", code: 200 }))).annotate({ identifier: "DeleteSpriteRequest" });
73
212
  export const DeleteSpriteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
74
213
  identifier: "DeleteSpriteResponse",
75
214
  });
76
- export const ExecCommandRequestCmdList = /*@__PURE__*/ S.Array(S.String);
77
- export const ExecCommandRequestEnvList = /*@__PURE__*/ S.Array(S.String);
215
+ export const SpriteEnvExecuteCommandRequestCmdList = /*@__PURE__*/ S.Array(S.String);
216
+ export const SpriteEnvExecuteCommandRequestEnvList = /*@__PURE__*/ S.Array(S.String);
78
217
  export const ExecCommandRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
79
218
  name: S.String.pipe(T.Label()),
80
- cmd: ExecCommandRequestCmdList.pipe(T.Query()),
219
+ cmd: SpriteEnvExecuteCommandRequestCmdList.pipe(T.Query()),
81
220
  path: S.optional(S.String.pipe(T.Query())),
82
221
  stdin: S.optional(S.Boolean.pipe(T.Query())),
83
- env: S.optional(ExecCommandRequestEnvList.pipe(T.Query())),
222
+ env: S.optional(SpriteEnvExecuteCommandRequestEnvList.pipe(T.Query())),
84
223
  dir: S.optional(S.String.pipe(T.Query())),
85
224
  body: S.optional(S.String.pipe(T.HttpBody())),
86
225
  }).pipe(T.Http({
@@ -88,9 +227,7 @@ export const ExecCommandRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
88
227
  uri: "/sprites/{name}/exec",
89
228
  code: 200,
90
229
  bodyMediaType: "application/octet-stream",
91
- }))).annotate({
92
- identifier: "ExecCommandRequest",
93
- });
230
+ }))).annotate({ identifier: "ExecCommandRequest" });
94
231
  export const ExecResult = /*@__PURE__*/ S.suspend(() => S.Struct({
95
232
  exit_code: S.optional(S.Number),
96
233
  stdout: S.optional(S.String),
@@ -99,133 +236,210 @@ export const ExecResult = /*@__PURE__*/ S.suspend(() => S.Struct({
99
236
  export const GetCheckpointRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
100
237
  name: S.String.pipe(T.Label()),
101
238
  checkpoint_id: S.String.pipe(T.Label()),
102
- }).pipe(T.Http({
103
- method: "GET",
104
- uri: "/sprites/{name}/checkpoints/{checkpoint_id}",
105
- code: 200,
106
- }))).annotate({
107
- identifier: "GetCheckpointRequest",
108
- });
109
- export const Checkpoint = /*@__PURE__*/ S.suspend(() => S.Struct({
110
- id: S.optional(S.String),
111
- create_time: S.optional(S.String),
112
- source_id: S.optional(S.String),
239
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/checkpoints/{checkpoint_id}", code: 200 }))).annotate({ identifier: "GetCheckpointRequest" });
240
+ export const CheckpointInfo = /*@__PURE__*/ S.suspend(() => S.Struct({
113
241
  comment: S.optional(S.String),
242
+ create_time: S.String,
114
243
  health: S.optional(S.String),
115
- })).annotate({ identifier: "Checkpoint" });
244
+ id: S.String,
245
+ source_id: S.optional(S.String),
246
+ })).annotate({ identifier: "CheckpointInfo" });
247
+ export const GetNetworkPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
248
+ name: S.String.pipe(T.Label()),
249
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/policy/network", code: 200 }))).annotate({ identifier: "GetNetworkPolicyRequest" });
250
+ export const NetworkPolicyRule = /*@__PURE__*/ S.suspend(() => S.Struct({
251
+ action: S.optional(S.String),
252
+ domain: S.optional(S.String),
253
+ include: S.optional(S.String),
254
+ })).annotate({ identifier: "NetworkPolicyRule" });
255
+ export const NetworkPolicyRequestRulesList = /*@__PURE__*/ S.Array(NetworkPolicyRule);
256
+ export const NetworkPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
257
+ rules: NetworkPolicyRequestRulesList,
258
+ })).annotate({ identifier: "NetworkPolicyRequest" });
259
+ export const GetOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
260
+ id: S.String.pipe(T.Label()),
261
+ }).pipe(T.Http({ method: "GET", uri: "/oauth/connections/{id}", code: 200 }))).annotate({
262
+ identifier: "GetOAuthConnectionRequest",
263
+ });
264
+ export const GetPrivilegesPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
265
+ name: S.String.pipe(T.Label()),
266
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/policy/privileges", code: 200 }))).annotate({
267
+ identifier: "GetPrivilegesPolicyRequest",
268
+ });
269
+ export const GetPrivilegesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
270
+ identifier: "GetPrivilegesPolicyResponse",
271
+ });
272
+ export const GetResourcesPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
273
+ name: S.String.pipe(T.Label()),
274
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/policy/resources", code: 200 }))).annotate({
275
+ identifier: "GetResourcesPolicyRequest",
276
+ });
277
+ export const GetResourcesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
278
+ identifier: "GetResourcesPolicyResponse",
279
+ });
116
280
  export const GetServiceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
117
281
  name: S.String.pipe(T.Label()),
118
282
  service_name: S.String.pipe(T.Label()),
119
- }).pipe(T.Http({
120
- method: "GET",
121
- uri: "/sprites/{name}/services/{service_name}",
122
- code: 200,
123
- }))).annotate({
124
- identifier: "GetServiceRequest",
125
- });
126
- export const SpriteServiceArgsList = /*@__PURE__*/ S.Array(S.String);
127
- export const SpriteServiceNeedsList = /*@__PURE__*/ S.Array(S.String);
128
- export const SpriteServiceState = /*@__PURE__*/ S.suspend(() => S.Struct({
129
- name: S.optional(S.String),
130
- status: S.optional(S.String),
283
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/services/{service_name}", code: 200 }))).annotate({ identifier: "GetServiceRequest" });
284
+ export const ServiceResponseArgsList = /*@__PURE__*/ S.Array(S.String);
285
+ export const ServiceResponseNeedsList = /*@__PURE__*/ S.Array(S.String);
286
+ export const ServiceState = /*@__PURE__*/ S.suspend(() => S.Struct({
287
+ error: S.optional(S.String),
288
+ name: S.String,
131
289
  pid: S.optional(S.Number),
132
290
  started_at: S.optional(S.String),
133
- error: S.optional(S.String),
134
- })).annotate({
135
- identifier: "SpriteServiceState",
136
- });
137
- export const SpriteService = /*@__PURE__*/ S.suspend(() => S.Struct({
138
- name: S.optional(S.String),
139
- cmd: S.optional(S.String),
140
- args: S.optional(SpriteServiceArgsList),
141
- needs: S.optional(SpriteServiceNeedsList),
142
- http_port: S.optional(S.Number),
143
- state: S.optional(SpriteServiceState),
144
- })).annotate({ identifier: "SpriteService" });
291
+ status: S.String,
292
+ })).annotate({ identifier: "ServiceState" });
293
+ export const ServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
294
+ args: ServiceResponseArgsList,
295
+ cmd: S.String,
296
+ http_port: S.optional(S.NullOr(S.Number)),
297
+ name: S.String,
298
+ needs: ServiceResponseNeedsList,
299
+ state: S.optional(S.NullOr(ServiceState)),
300
+ })).annotate({ identifier: "ServiceResponse" });
301
+ export const GetServiceLogsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
302
+ name: S.String.pipe(T.Label()),
303
+ service_name: S.String.pipe(T.Label()),
304
+ lines: S.optional(S.Number.pipe(T.Query())),
305
+ duration: S.optional(S.Number.pipe(T.Query())),
306
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/services/{service_name}/logs", code: 200 }))).annotate({ identifier: "GetServiceLogsRequest" });
307
+ export const GetServiceLogsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
308
+ identifier: "GetServiceLogsResponse",
309
+ });
145
310
  export const GetSpriteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
146
311
  name: S.String.pipe(T.Label()),
147
- }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}", code: 200 }))).annotate({
148
- identifier: "GetSpriteRequest",
312
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}", code: 200 }))).annotate({ identifier: "GetSpriteRequest" });
313
+ export const KillExecSessionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
314
+ name: S.String.pipe(T.Label()),
315
+ session_id: S.String.pipe(T.Label()),
316
+ signal: S.optional(S.String.pipe(T.Query())),
317
+ timeout: S.optional(S.Number.pipe(T.Query())),
318
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/exec/{session_id}/kill", code: 200 }))).annotate({ identifier: "KillExecSessionRequest" });
319
+ export const KillExecSessionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
320
+ identifier: "KillExecSessionResponse",
149
321
  });
150
322
  export const ListCheckpointsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
151
323
  name: S.String.pipe(T.Label()),
152
- }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/checkpoints", code: 200 }))).annotate({
153
- identifier: "ListCheckpointsRequest",
154
- });
155
- export const ListCheckpointsResponseBodyList = /*@__PURE__*/ S.Array(Checkpoint);
156
- export const ListCheckpointsResponse = /*@__PURE__*/ S.suspend(() => ListCheckpointsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
157
- identifier: "ListCheckpointsResponse",
158
- });
324
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/checkpoints", code: 200 }))).annotate({ identifier: "ListCheckpointsRequest" });
325
+ export const ListCheckpointsResponseBodyList = /*@__PURE__*/ S.Array(CheckpointInfo);
326
+ export const ListCheckpointsResponse = /*@__PURE__*/ S.suspend(() => ListCheckpointsResponseBodyList.pipe(T.RawResponseRoot())).annotate({ identifier: "ListCheckpointsResponse" });
327
+ export const ListDirectoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
328
+ name: S.String.pipe(T.Label()),
329
+ path: S.String.pipe(T.Query()),
330
+ workingDir: S.String.pipe(T.Query()),
331
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/fs/list", code: 200 }))).annotate({ identifier: "ListDirectoryRequest" });
332
+ export const Entry = /*@__PURE__*/ S.suspend(() => S.Struct({
333
+ isDir: S.Boolean,
334
+ modTime: S.String,
335
+ mode: S.String,
336
+ name: S.String,
337
+ path: S.String,
338
+ size: S.Number,
339
+ type: S.String,
340
+ })).annotate({ identifier: "Entry" });
341
+ export const ListResponseEntriesList = /*@__PURE__*/ S.Array(Entry);
342
+ export const ListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
343
+ count: S.Number,
344
+ entries: ListResponseEntriesList,
345
+ path: S.String,
346
+ })).annotate({ identifier: "ListResponse" });
159
347
  export const ListExecSessionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
160
348
  name: S.String.pipe(T.Label()),
161
- }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/exec", code: 200 }))).annotate({
162
- identifier: "ListExecSessionsRequest",
163
- });
164
- export const ExecSession = /*@__PURE__*/ S.suspend(() => S.Struct({
165
- id: S.optional(S.String),
166
- command: S.optional(S.String),
167
- is_active: S.optional(S.Boolean),
168
- tty: S.optional(S.Boolean),
169
- created: S.optional(S.String),
170
- last_activity: S.optional(S.String),
171
- workdir: S.optional(S.String),
172
- bytes_per_second: S.optional(S.Number),
173
- })).annotate({ identifier: "ExecSession" });
174
- export const ListExecSessionsResponseBodyList = /*@__PURE__*/ S.Array(ExecSession);
175
- export const ListExecSessionsResponse = /*@__PURE__*/ S.suspend(() => ListExecSessionsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
349
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/exec", code: 200 }))).annotate({ identifier: "ListExecSessionsRequest" });
350
+ export const ListExecSessionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
176
351
  identifier: "ListExecSessionsResponse",
177
352
  });
353
+ export const ListOAuthConnectionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
354
+ provider: S.optional(S.String.pipe(T.Query())),
355
+ }).pipe(T.Http({ method: "GET", uri: "/oauth/connections", code: 200 }))).annotate({
356
+ identifier: "ListOAuthConnectionsRequest",
357
+ });
358
+ export const ConnectionListResponseConnectionsList = /*@__PURE__*/ S.Array(Connection);
359
+ export const ConnectionListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
360
+ connections: ConnectionListResponseConnectionsList,
361
+ })).annotate({ identifier: "ConnectionListResponse" });
178
362
  export const ListServicesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
179
363
  name: S.String.pipe(T.Label()),
180
- }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/services", code: 200 }))).annotate({
181
- identifier: "ListServicesRequest",
182
- });
183
- export const ListServicesResponseBodyList = /*@__PURE__*/ S.Array(SpriteService);
184
- export const ListServicesResponse = /*@__PURE__*/ S.suspend(() => ListServicesResponseBodyList.pipe(T.RawResponseRoot())).annotate({
185
- identifier: "ListServicesResponse",
186
- });
364
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/services", code: 200 }))).annotate({ identifier: "ListServicesRequest" });
365
+ export const ListServicesResponseBodyList = /*@__PURE__*/ S.Array(ServiceResponse);
366
+ export const ListServicesResponse = /*@__PURE__*/ S.suspend(() => ListServicesResponseBodyList.pipe(T.RawResponseRoot())).annotate({ identifier: "ListServicesResponse" });
187
367
  export const ListSpritesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
188
368
  prefix: S.optional(S.String.pipe(T.Query())),
189
369
  max_results: S.optional(S.Number.pipe(T.Query())),
190
370
  continuation_token: S.optional(S.String.pipe(T.Query())),
191
- }).pipe(T.Http({ method: "GET", uri: "/sprites", code: 200 }))).annotate({
192
- identifier: "ListSpritesRequest",
193
- });
194
- export const ListSpritesResponseSpritesList = /*@__PURE__*/ S.Array(Sprite);
195
- export const ListSpritesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
196
- sprites: ListSpritesResponseSpritesList,
197
- has_more: S.optional(S.Boolean),
198
- next_continuation_token: S.optional(S.NullOr(S.String)),
199
- name: S.optional(S.String),
200
- running: S.optional(S.Number),
201
- warm: S.optional(S.Number),
202
- cold: S.optional(S.Number),
371
+ }).pipe(T.Http({ method: "GET", uri: "/sprites", code: 200 }))).annotate({ identifier: "ListSpritesRequest" });
372
+ export const SpriteListResponseSpritesList = /*@__PURE__*/ S.Array(SpriteResponse);
373
+ export const SpriteListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
374
+ cold: S.Number,
375
+ has_more: S.Boolean,
376
+ name: S.String,
377
+ next_continuation_token: S.optional(S.String),
378
+ running: S.Number,
203
379
  running_limit: S.optional(S.Number),
380
+ sprites: SpriteListResponseSpritesList,
381
+ warm: S.Number,
204
382
  warm_limit: S.optional(S.Number),
205
- })).annotate({
206
- identifier: "ListSpritesResponse",
383
+ })).annotate({ identifier: "SpriteListResponse" });
384
+ export const OauthConnectionCallbackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
385
+ provider: S.String.pipe(T.Label()),
386
+ access_policy: S.optional(AccessPolicy),
387
+ code: S.String,
388
+ redirect_uri: S.optional(S.String),
389
+ state: S.optional(S.String),
390
+ }).pipe(T.Http({ method: "POST", uri: "/oauth/{provider}/callback", code: 200 }))).annotate({
391
+ identifier: "OauthConnectionCallbackRequest",
392
+ });
393
+ export const PatchOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
394
+ id: S.String.pipe(T.Label()),
395
+ access_policy: AccessPolicy,
396
+ }).pipe(T.Http({ method: "PATCH", uri: "/oauth/connections/{id}", code: 200 }))).annotate({
397
+ identifier: "PatchOAuthConnectionRequest",
398
+ });
399
+ export const ProvisionOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
400
+ provider: S.String,
401
+ }).pipe(T.Http({ method: "POST", uri: "/oauth/connections/provision", code: 200 }))).annotate({
402
+ identifier: "ProvisionOAuthConnectionRequest",
207
403
  });
208
404
  export const PutServiceRequestArgsList = /*@__PURE__*/ S.Array(S.String);
209
405
  export const PutServiceRequestNeedsList = /*@__PURE__*/ S.Array(S.String);
210
406
  export const PutServiceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
211
407
  name: S.String.pipe(T.Label()),
212
408
  service_name: S.String.pipe(T.Label()),
213
- duration: S.optional(S.String.pipe(T.Query())),
214
- cmd: S.String,
409
+ duration: S.optional(S.Number.pipe(T.Query())),
215
410
  args: S.optional(PutServiceRequestArgsList),
411
+ cmd: S.String,
216
412
  dir: S.optional(S.String),
413
+ env: S.optional(S.Unknown),
414
+ http_port: S.optional(S.NullOr(S.Number)),
217
415
  needs: S.optional(PutServiceRequestNeedsList),
218
- http_port: S.optional(S.Number),
219
- }).pipe(T.Http({
220
- method: "PUT",
221
- uri: "/sprites/{name}/services/{service_name}",
222
- code: 200,
223
- }))).annotate({
224
- identifier: "PutServiceRequest",
416
+ }).pipe(T.Http({ method: "PUT", uri: "/sprites/{name}/services/{service_name}", code: 200 }))).annotate({ identifier: "PutServiceRequest" });
417
+ export const ReadFileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
418
+ name: S.String.pipe(T.Label()),
419
+ path: S.String.pipe(T.Query()),
420
+ workingDir: S.String.pipe(T.Query()),
421
+ }).pipe(T.Http({ method: "GET", uri: "/sprites/{name}/fs/read", code: 200 }))).annotate({ identifier: "ReadFileRequest" });
422
+ export const ReadFileResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
423
+ identifier: "ReadFileResponse",
225
424
  });
226
- export const PutServiceResponseBodyList = /*@__PURE__*/ S.Array(StreamEvent);
227
- export const PutServiceResponse = /*@__PURE__*/ S.suspend(() => PutServiceResponseBodyList.pipe(T.RawResponseRoot())).annotate({
228
- identifier: "PutServiceResponse",
425
+ export const RenameFileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
426
+ name: S.String.pipe(T.Label()),
427
+ asRoot: S.Boolean,
428
+ dest: S.String,
429
+ source: S.String,
430
+ workingDir: S.String,
431
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/fs/rename", code: 200 }))).annotate({ identifier: "RenameFileRequest" });
432
+ export const RenameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
433
+ dest: S.String,
434
+ source: S.String,
435
+ })).annotate({ identifier: "RenameResponse" });
436
+ export const RestartServiceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
437
+ name: S.String.pipe(T.Label()),
438
+ service_name: S.String.pipe(T.Label()),
439
+ duration: S.optional(S.Number.pipe(T.Query())),
440
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/services/{service_name}/restart", code: 200 }))).annotate({ identifier: "RestartServiceRequest" });
441
+ export const RestartServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
442
+ identifier: "RestartServiceResponse",
229
443
  });
230
444
  export const RestoreCheckpointRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
231
445
  name: S.String.pipe(T.Label()),
@@ -234,19 +448,61 @@ export const RestoreCheckpointRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
234
448
  method: "POST",
235
449
  uri: "/sprites/{name}/checkpoints/{checkpoint_id}/restore",
236
450
  code: 200,
237
- }))).annotate({
238
- identifier: "RestoreCheckpointRequest",
239
- });
451
+ }))).annotate({ identifier: "RestoreCheckpointRequest" });
240
452
  export const RestoreCheckpointResponseBodyList = /*@__PURE__*/ S.Array(StreamEvent);
241
453
  export const RestoreCheckpointResponse = /*@__PURE__*/ S.suspend(() => RestoreCheckpointResponseBodyList.pipe(T.RawResponseRoot())).annotate({
242
454
  identifier: "RestoreCheckpointResponse",
243
455
  });
244
- export const UpdateSpriteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
456
+ export const SetNetworkPolicyRequestRulesList = /*@__PURE__*/ S.Array(NetworkPolicyRule);
457
+ export const SetNetworkPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
245
458
  name: S.String.pipe(T.Label()),
246
- url_settings: UrlSettings,
247
- }).pipe(T.Http({ method: "PUT", uri: "/sprites/{name}", code: 200 }))).annotate({
248
- identifier: "UpdateSpriteRequest",
459
+ rules: SetNetworkPolicyRequestRulesList,
460
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/policy/network", code: 200 }))).annotate({ identifier: "SetNetworkPolicyRequest" });
461
+ export const SetNetworkPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
462
+ identifier: "SetNetworkPolicyResponse",
249
463
  });
464
+ export const SetPrivilegesPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
465
+ name: S.String.pipe(T.Label()),
466
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/policy/privileges", code: 200 }))).annotate({
467
+ identifier: "SetPrivilegesPolicyRequest",
468
+ });
469
+ export const SetPrivilegesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
470
+ identifier: "SetPrivilegesPolicyResponse",
471
+ });
472
+ export const SetResourcesPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
473
+ name: S.String.pipe(T.Label()),
474
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/policy/resources", code: 200 }))).annotate({
475
+ identifier: "SetResourcesPolicyRequest",
476
+ });
477
+ export const SetResourcesPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
478
+ identifier: "SetResourcesPolicyResponse",
479
+ });
480
+ export const StartServiceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
481
+ name: S.String.pipe(T.Label()),
482
+ service_name: S.String.pipe(T.Label()),
483
+ duration: S.optional(S.Number.pipe(T.Query())),
484
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/services/{service_name}/start", code: 200 }))).annotate({ identifier: "StartServiceRequest" });
485
+ export const StartServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
486
+ identifier: "StartServiceResponse",
487
+ });
488
+ export const StopServiceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
489
+ name: S.String.pipe(T.Label()),
490
+ service_name: S.String.pipe(T.Label()),
491
+ timeout: S.optional(S.Number.pipe(T.Query())),
492
+ }).pipe(T.Http({ method: "POST", uri: "/sprites/{name}/services/{service_name}/stop", code: 200 }))).annotate({ identifier: "StopServiceRequest" });
493
+ export const StopServiceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
494
+ identifier: "StopServiceResponse",
495
+ });
496
+ export const UpdateOAuthConnectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
497
+ id: S.String.pipe(T.Label()),
498
+ access_policy: AccessPolicy,
499
+ }).pipe(T.Http({ method: "PUT", uri: "/oauth/connections/{id}", code: 200 }))).annotate({
500
+ identifier: "UpdateOAuthConnectionRequest",
501
+ });
502
+ export const UpdateSpriteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
503
+ name: S.String.pipe(T.Label()),
504
+ url_settings: UrlSettingsRequest,
505
+ }).pipe(T.Http({ method: "PUT", uri: "/sprites/{name}", code: 200 }))).annotate({ identifier: "UpdateSpriteRequest" });
250
506
  export const WriteFileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
251
507
  name: S.String.pipe(T.Label()),
252
508
  path: S.String.pipe(T.Query()),
@@ -259,17 +515,45 @@ export const WriteFileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
259
515
  uri: "/sprites/{name}/fs/write",
260
516
  code: 200,
261
517
  bodyMediaType: "application/octet-stream",
262
- }))).annotate({
263
- identifier: "WriteFileRequest",
264
- });
265
- export const WriteFileResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
266
- path: S.optional(S.String),
267
- size: S.optional(S.Number),
268
- mode: S.optional(S.String),
269
- })).annotate({
270
- identifier: "WriteFileResponse",
271
- });
272
- /** Create a checkpoint (NDJSON progress stream) */
518
+ }))).annotate({ identifier: "WriteFileRequest" });
519
+ export const WriteResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
520
+ mode: S.String,
521
+ path: S.String,
522
+ size: S.Number,
523
+ })).annotate({ identifier: "WriteResponse" });
524
+ /** Authorize an OAuth connector Create an OAuth authorization URL for a provider. Use this to start a browser-based consent flow. */
525
+ export const authorizeOAuthConnection = /*@__PURE__*/ API.make(() => ({
526
+ input: AuthorizeOAuthConnectionRequest,
527
+ output: OAuthAuthorizeResponse,
528
+ errors: [BadRequest, SpritesNotEnabled],
529
+ protocol: SpritesProtocol,
530
+ retry: Retry.Retry,
531
+ }));
532
+ /** Change File Mode Change file or directory permissions. */
533
+ export const changeFileMode = /*@__PURE__*/ API.make(() => ({
534
+ input: ChangeFileModeRequest,
535
+ output: ChmodResponse,
536
+ errors: [BadRequest, NotFound],
537
+ protocol: SpritesProtocol,
538
+ retry: Retry.Retry,
539
+ }));
540
+ /** Change File Owner Change file or directory ownership. */
541
+ export const changeFileOwner = /*@__PURE__*/ API.make(() => ({
542
+ input: ChangeFileOwnerRequest,
543
+ output: ChownResponse,
544
+ errors: [BadRequest, NotFound],
545
+ protocol: SpritesProtocol,
546
+ retry: Retry.Retry,
547
+ }));
548
+ /** Copy File or Directory Copy a file or directory. */
549
+ export const copyFile = /*@__PURE__*/ API.make(() => ({
550
+ input: CopyFileRequest,
551
+ output: CopyResponse,
552
+ errors: [BadRequest, NotFound],
553
+ protocol: SpritesProtocol,
554
+ retry: Retry.Retry,
555
+ }));
556
+ /** Create Checkpoint Create a new checkpoint of the current sprite state. Returns streaming NDJSON progress. */
273
557
  export const createCheckpoint = /*@__PURE__*/ API.make(() => ({
274
558
  input: CreateCheckpointRequest,
275
559
  output: CreateCheckpointResponse,
@@ -277,6 +561,14 @@ export const createCheckpoint = /*@__PURE__*/ API.make(() => ({
277
561
  protocol: SpritesProtocol,
278
562
  retry: Retry.Retry,
279
563
  }));
564
+ /** Create an API-key connector Create a connector from a user-provided API key for providers that support key validation. */
565
+ export const createOAuthApiKeyConnection = /*@__PURE__*/ API.make(() => ({
566
+ input: CreateOAuthApiKeyConnectionRequest,
567
+ output: ConnectionResponse,
568
+ errors: [BadRequest, SpritesNotEnabled],
569
+ protocol: SpritesProtocol,
570
+ retry: Retry.Retry,
571
+ }));
280
572
  /** 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. */
281
573
  export const createOrganizationToken = /*@__PURE__*/ API.make(() => ({
282
574
  input: CreateOrganizationTokenRequest,
@@ -285,23 +577,55 @@ export const createOrganizationToken = /*@__PURE__*/ API.make(() => ({
285
577
  protocol: SpritesProtocol,
286
578
  retry: Retry.Retry,
287
579
  }));
288
- /** Create a sprite */
580
+ /** Create a sprite Create a new sprite with a unique name in your organization */
289
581
  export const createSprite = /*@__PURE__*/ API.make(() => ({
290
582
  input: CreateSpriteRequest,
291
- output: Sprite,
292
- errors: [BadRequest, Conflict],
583
+ output: SpriteResponse,
584
+ errors: [BadRequest, SpritesNotEnabled, Conflict],
585
+ protocol: SpritesProtocol,
586
+ retry: Retry.Retry,
587
+ }));
588
+ /** Delete File or Directory Delete a file or directory. */
589
+ export const deleteFile = /*@__PURE__*/ API.make(() => ({
590
+ input: DeleteFileRequest,
591
+ output: DeleteResponse,
592
+ errors: [BadRequest, NotFound],
593
+ protocol: SpritesProtocol,
594
+ retry: Retry.Retry,
595
+ }));
596
+ /** Delete a connector Delete a connector and its encrypted credentials. */
597
+ export const deleteOAuthConnection = /*@__PURE__*/ API.make(() => ({
598
+ input: DeleteOAuthConnectionRequest,
599
+ output: DeleteOAuthConnectionResponse,
600
+ errors: [SpritesNotEnabled, NotFound],
601
+ protocol: SpritesProtocol,
602
+ retry: Retry.Retry,
603
+ }));
604
+ /** Delete Privileges Policy Remove privileges policy to revert to default (unrestricted) behavior. */
605
+ export const deletePrivilegesPolicy = /*@__PURE__*/ API.make(() => ({
606
+ input: DeletePrivilegesPolicyRequest,
607
+ output: DeletePrivilegesPolicyResponse,
608
+ errors: [BadRequest, NotFound],
609
+ protocol: SpritesProtocol,
610
+ retry: Retry.Retry,
611
+ }));
612
+ /** Delete Resources Policy Remove resources policy to revert to default behavior. */
613
+ export const deleteResourcesPolicy = /*@__PURE__*/ API.make(() => ({
614
+ input: DeleteResourcesPolicyRequest,
615
+ output: DeleteResourcesPolicyResponse,
616
+ errors: [BadRequest, NotFound],
293
617
  protocol: SpritesProtocol,
294
618
  retry: Retry.Retry,
295
619
  }));
296
- /** Delete a sprite */
620
+ /** Delete a sprite Delete a sprite and all associated resources */
297
621
  export const deleteSprite = /*@__PURE__*/ API.make(() => ({
298
622
  input: DeleteSpriteRequest,
299
623
  output: DeleteSpriteResponse,
300
- errors: [NotFound],
624
+ errors: [SpritesNotEnabled, NotFound],
301
625
  protocol: SpritesProtocol,
302
626
  retry: Retry.Retry,
303
627
  }));
304
- /** Execute a command via HTTP POST (non-TTY). Simpler than the WebSocket exec API. */
628
+ /** Execute Command Execute a command via simple HTTP POST (non-TTY only). Simpler alternative for exec for environments that can't handle websockets. */
305
629
  export const execCommand = /*@__PURE__*/ API.make(() => ({
306
630
  input: ExecCommandRequest,
307
631
  output: ExecResult,
@@ -309,31 +633,79 @@ export const execCommand = /*@__PURE__*/ API.make(() => ({
309
633
  protocol: SpritesProtocol,
310
634
  retry: Retry.Retry,
311
635
  }));
312
- /** Get a checkpoint */
636
+ /** Get Checkpoint Get details of a specific checkpoint. */
313
637
  export const getCheckpoint = /*@__PURE__*/ API.make(() => ({
314
638
  input: GetCheckpointRequest,
315
- output: Checkpoint,
639
+ output: CheckpointInfo,
640
+ errors: [NotFound],
641
+ protocol: SpritesProtocol,
642
+ retry: Retry.Retry,
643
+ }));
644
+ /** Get Network Policy Get the current network policy configuration. */
645
+ export const getNetworkPolicy = /*@__PURE__*/ API.make(() => ({
646
+ input: GetNetworkPolicyRequest,
647
+ output: NetworkPolicyRequest,
648
+ errors: [NotFound],
649
+ protocol: SpritesProtocol,
650
+ retry: Retry.Retry,
651
+ }));
652
+ /** Get a connector Get a single connector by ID. */
653
+ export const getOAuthConnection = /*@__PURE__*/ API.make(() => ({
654
+ input: GetOAuthConnectionRequest,
655
+ output: ConnectionResponse,
656
+ errors: [SpritesNotEnabled, NotFound],
657
+ protocol: SpritesProtocol,
658
+ retry: Retry.Retry,
659
+ }));
660
+ /** Get Privileges Policy Get the current privileges policy configuration (capability and device restrictions). */
661
+ export const getPrivilegesPolicy = /*@__PURE__*/ API.make(() => ({
662
+ input: GetPrivilegesPolicyRequest,
663
+ output: GetPrivilegesPolicyResponse,
664
+ errors: [NotFound],
665
+ protocol: SpritesProtocol,
666
+ retry: Retry.Retry,
667
+ }));
668
+ /** Get Resources Policy Get the current resources policy configuration (memory limits). */
669
+ export const getResourcesPolicy = /*@__PURE__*/ API.make(() => ({
670
+ input: GetResourcesPolicyRequest,
671
+ output: GetResourcesPolicyResponse,
316
672
  errors: [NotFound],
317
673
  protocol: SpritesProtocol,
318
674
  retry: Retry.Retry,
319
675
  }));
320
- /** Get a sprite service */
676
+ /** Get Service Get details of a specific service. */
321
677
  export const getService = /*@__PURE__*/ API.make(() => ({
322
678
  input: GetServiceRequest,
323
- output: SpriteService,
679
+ output: ServiceResponse,
680
+ errors: [NotFound],
681
+ protocol: SpritesProtocol,
682
+ retry: Retry.Retry,
683
+ }));
684
+ /** Get Service Logs Stream logs for a service. */
685
+ export const getServiceLogs = /*@__PURE__*/ API.make(() => ({
686
+ input: GetServiceLogsRequest,
687
+ output: GetServiceLogsResponse,
324
688
  errors: [NotFound],
325
689
  protocol: SpritesProtocol,
326
690
  retry: Retry.Retry,
327
691
  }));
328
- /** Get a sprite */
692
+ /** Get a sprite Get details for a specific sprite */
329
693
  export const getSprite = /*@__PURE__*/ API.make(() => ({
330
694
  input: GetSpriteRequest,
331
- output: Sprite,
695
+ output: SpriteResponse,
696
+ errors: [SpritesNotEnabled, NotFound],
697
+ protocol: SpritesProtocol,
698
+ retry: Retry.Retry,
699
+ }));
700
+ /** Kill Exec Session Kill an exec session by session ID. Returns streaming NDJSON with kill progress. */
701
+ export const killExecSession = /*@__PURE__*/ API.make(() => ({
702
+ input: KillExecSessionRequest,
703
+ output: KillExecSessionResponse,
332
704
  errors: [NotFound],
333
705
  protocol: SpritesProtocol,
334
706
  retry: Retry.Retry,
335
707
  }));
336
- /** List checkpoints */
708
+ /** List Checkpoints List all checkpoints. */
337
709
  export const listCheckpoints = /*@__PURE__*/ API.make(() => ({
338
710
  input: ListCheckpointsRequest,
339
711
  output: ListCheckpointsResponse,
@@ -341,7 +713,15 @@ export const listCheckpoints = /*@__PURE__*/ API.make(() => ({
341
713
  protocol: SpritesProtocol,
342
714
  retry: Retry.Retry,
343
715
  }));
344
- /** List active exec sessions */
716
+ /** List Directory List directory contents. */
717
+ export const listDirectory = /*@__PURE__*/ API.make(() => ({
718
+ input: ListDirectoryRequest,
719
+ output: ListResponse,
720
+ errors: [NotFound],
721
+ protocol: SpritesProtocol,
722
+ retry: Retry.Retry,
723
+ }));
724
+ /** List Exec Sessions List active exec sessions. */
345
725
  export const listExecSessions = /*@__PURE__*/ API.make(() => ({
346
726
  input: ListExecSessionsRequest,
347
727
  output: ListExecSessionsResponse,
@@ -349,7 +729,15 @@ export const listExecSessions = /*@__PURE__*/ API.make(() => ({
349
729
  protocol: SpritesProtocol,
350
730
  retry: Retry.Retry,
351
731
  }));
352
- /** List configured sprite services */
732
+ /** List connectors List connectors configured for the authenticated organization. */
733
+ export const listOAuthConnections = /*@__PURE__*/ API.make(() => ({
734
+ input: ListOAuthConnectionsRequest,
735
+ output: ConnectionListResponse,
736
+ errors: [SpritesNotEnabled],
737
+ protocol: SpritesProtocol,
738
+ retry: Retry.Retry,
739
+ }));
740
+ /** List Services List all configured services and their current state. */
353
741
  export const listServices = /*@__PURE__*/ API.make(() => ({
354
742
  input: ListServicesRequest,
355
743
  output: ListServicesResponse,
@@ -357,11 +745,11 @@ export const listServices = /*@__PURE__*/ API.make(() => ({
357
745
  protocol: SpritesProtocol,
358
746
  retry: Retry.Retry,
359
747
  }));
360
- /** List sprites for the authenticated organization */
748
+ /** List sprites List all sprites for the authenticated organization */
361
749
  export const listSprites = /*@__PURE__*/ API.makePaginated(() => ({
362
750
  input: ListSpritesRequest,
363
- output: ListSpritesResponse,
364
- errors: [],
751
+ output: SpriteListResponse,
752
+ errors: [SpritesNotEnabled],
365
753
  protocol: SpritesProtocol,
366
754
  retry: Retry.Retry,
367
755
  pagination: {
@@ -372,15 +760,63 @@ export const listSprites = /*@__PURE__*/ API.makePaginated(() => ({
372
760
  mode: "cursor",
373
761
  },
374
762
  }), paginateCursor);
375
- /** Create or update a sprite service. Returns NDJSON start progress. */
763
+ /** Complete OAuth authorization Exchange an OAuth authorization code for an encrypted connector. */
764
+ export const oauthConnectionCallback = /*@__PURE__*/ API.make(() => ({
765
+ input: OauthConnectionCallbackRequest,
766
+ output: ConnectionResponse,
767
+ errors: [BadRequest, SpritesNotEnabled],
768
+ protocol: SpritesProtocol,
769
+ retry: Retry.Retry,
770
+ }));
771
+ /** Update a connector Update a connector access policy. */
772
+ export const patchOAuthConnection = /*@__PURE__*/ API.make(() => ({
773
+ input: PatchOAuthConnectionRequest,
774
+ output: ConnectionResponse,
775
+ errors: [BadRequest, SpritesNotEnabled, NotFound],
776
+ protocol: SpritesProtocol,
777
+ retry: Retry.Retry,
778
+ }));
779
+ /** Provision a connector Provision a system-managed connector for providers that support platform-managed keys. */
780
+ export const provisionOAuthConnection = /*@__PURE__*/ API.make(() => ({
781
+ input: ProvisionOAuthConnectionRequest,
782
+ output: ConnectionResponse,
783
+ errors: [BadRequest, SpritesNotEnabled],
784
+ protocol: SpritesProtocol,
785
+ retry: Retry.Retry,
786
+ }));
787
+ /** Create Service Create or update a service definition. */
376
788
  export const putService = /*@__PURE__*/ API.make(() => ({
377
789
  input: PutServiceRequest,
378
- output: PutServiceResponse,
790
+ output: ServiceResponse,
379
791
  errors: [BadRequest, NotFound],
380
792
  protocol: SpritesProtocol,
381
793
  retry: Retry.Retry,
382
794
  }));
383
- /** Restore a checkpoint (NDJSON progress stream). Destructive. */
795
+ /** Read File Read file contents from the sprite filesystem. Returns raw file bytes. */
796
+ export const readFile = /*@__PURE__*/ API.make(() => ({
797
+ input: ReadFileRequest,
798
+ output: ReadFileResponse,
799
+ errors: [NotFound],
800
+ protocol: SpritesProtocol,
801
+ retry: Retry.Retry,
802
+ }));
803
+ /** Rename File or Directory Rename or move a file or directory. */
804
+ export const renameFile = /*@__PURE__*/ API.make(() => ({
805
+ input: RenameFileRequest,
806
+ output: RenameResponse,
807
+ errors: [BadRequest, NotFound],
808
+ protocol: SpritesProtocol,
809
+ retry: Retry.Retry,
810
+ }));
811
+ /** Restart Service Restart a service (stop if running, then start). Returns streaming NDJSON with stop and start progress. */
812
+ export const restartService = /*@__PURE__*/ API.make(() => ({
813
+ input: RestartServiceRequest,
814
+ output: RestartServiceResponse,
815
+ errors: [NotFound],
816
+ protocol: SpritesProtocol,
817
+ retry: Retry.Retry,
818
+ }));
819
+ /** Restore Checkpoint Restore to a specific checkpoint. Returns streaming NDJSON progress. */
384
820
  export const restoreCheckpoint = /*@__PURE__*/ API.make(() => ({
385
821
  input: RestoreCheckpointRequest,
386
822
  output: RestoreCheckpointResponse,
@@ -388,18 +824,66 @@ export const restoreCheckpoint = /*@__PURE__*/ API.make(() => ({
388
824
  protocol: SpritesProtocol,
389
825
  retry: Retry.Retry,
390
826
  }));
391
- /** Update sprite URL auth settings */
827
+ /** Set Network Policy Update the network policy configuration. */
828
+ export const setNetworkPolicy = /*@__PURE__*/ API.make(() => ({
829
+ input: SetNetworkPolicyRequest,
830
+ output: SetNetworkPolicyResponse,
831
+ errors: [BadRequest, NotFound],
832
+ protocol: SpritesProtocol,
833
+ retry: Retry.Retry,
834
+ }));
835
+ /** Set Privileges Policy Update the privileges policy configuration to restrict capabilities or devices. */
836
+ export const setPrivilegesPolicy = /*@__PURE__*/ API.make(() => ({
837
+ input: SetPrivilegesPolicyRequest,
838
+ output: SetPrivilegesPolicyResponse,
839
+ errors: [BadRequest, NotFound],
840
+ protocol: SpritesProtocol,
841
+ retry: Retry.Retry,
842
+ }));
843
+ /** Set Resources Policy Update the resources policy configuration to set memory limits. */
844
+ export const setResourcesPolicy = /*@__PURE__*/ API.make(() => ({
845
+ input: SetResourcesPolicyRequest,
846
+ output: SetResourcesPolicyResponse,
847
+ errors: [BadRequest, NotFound],
848
+ protocol: SpritesProtocol,
849
+ retry: Retry.Retry,
850
+ }));
851
+ /** Start Service Start a service. Returns streaming NDJSON with stdout/stderr. */
852
+ export const startService = /*@__PURE__*/ API.make(() => ({
853
+ input: StartServiceRequest,
854
+ output: StartServiceResponse,
855
+ errors: [NotFound],
856
+ protocol: SpritesProtocol,
857
+ retry: Retry.Retry,
858
+ }));
859
+ /** Stop Service Stop a running service. Returns streaming NDJSON with service stop progress. */
860
+ export const stopService = /*@__PURE__*/ API.make(() => ({
861
+ input: StopServiceRequest,
862
+ output: StopServiceResponse,
863
+ errors: [NotFound],
864
+ protocol: SpritesProtocol,
865
+ retry: Retry.Retry,
866
+ }));
867
+ /** Update a connector Update a connector access policy. */
868
+ export const updateOAuthConnection = /*@__PURE__*/ API.make(() => ({
869
+ input: UpdateOAuthConnectionRequest,
870
+ output: ConnectionResponse,
871
+ errors: [BadRequest, SpritesNotEnabled, NotFound],
872
+ protocol: SpritesProtocol,
873
+ retry: Retry.Retry,
874
+ }));
875
+ /** Update a sprite Update sprite settings such as URL authentication */
392
876
  export const updateSprite = /*@__PURE__*/ API.make(() => ({
393
877
  input: UpdateSpriteRequest,
394
- output: Sprite,
395
- errors: [NotFound],
878
+ output: SpriteResponse,
879
+ errors: [BadRequest, SpritesNotEnabled, NotFound],
396
880
  protocol: SpritesProtocol,
397
881
  retry: Retry.Retry,
398
882
  }));
399
- /** Write file contents to the sprite filesystem. Request body is raw file bytes. */
883
+ /** Write File Write file contents to the sprite filesystem. Request body contains raw file bytes. */
400
884
  export const writeFile = /*@__PURE__*/ API.make(() => ({
401
885
  input: WriteFileRequest,
402
- output: WriteFileResponse,
886
+ output: WriteResponse,
403
887
  errors: [BadRequest, NotFound],
404
888
  protocol: SpritesProtocol,
405
889
  retry: Retry.Retry,