@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/mpg.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
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 * as API from "@distilled.cloud/core/api";
|
|
5
|
-
import * as T from "../traits.ts";
|
|
6
|
-
import {
|
|
7
|
-
FlyApiProtocol,
|
|
8
|
-
type FlyIoOpError,
|
|
9
|
-
type FlyIoOpContext,
|
|
10
|
-
} from "../protocol.ts";
|
|
11
5
|
import { Conflict, Forbidden, NotFound } from "../errors.ts";
|
|
6
|
+
import { FlyApiProtocol, type FlyIoOpError, type FlyIoOpContext } from "../protocol.ts";
|
|
12
7
|
import * as Retry from "../retry.ts";
|
|
8
|
+
import * as T from "../traits.ts";
|
|
13
9
|
|
|
14
10
|
export type { FlyIoOpError, FlyIoOpContext };
|
|
15
11
|
|
|
@@ -21,16 +17,8 @@ export const CreateAttachmentRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
21
17
|
S.Struct({
|
|
22
18
|
id: S.String.pipe(T.Label()),
|
|
23
19
|
app_name: S.String,
|
|
24
|
-
}).pipe(
|
|
25
|
-
|
|
26
|
-
method: "POST",
|
|
27
|
-
uri: "/api/v1/postgresv2/{id}/attachments",
|
|
28
|
-
code: 200,
|
|
29
|
-
}),
|
|
30
|
-
),
|
|
31
|
-
).annotate({
|
|
32
|
-
identifier: "CreateAttachmentRequest",
|
|
33
|
-
}) as any as S.Schema<CreateAttachmentRequest>;
|
|
20
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/postgresv2/{id}/attachments", code: 200 })),
|
|
21
|
+
).annotate({ identifier: "CreateAttachmentRequest" }) as any as S.Schema<CreateAttachmentRequest>;
|
|
34
22
|
|
|
35
23
|
export interface CreateAttachmentResponseData {
|
|
36
24
|
id?: number;
|
|
@@ -56,9 +44,7 @@ export const CreateAttachmentResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
56
44
|
S.Struct({
|
|
57
45
|
data: S.optional(CreateAttachmentResponseData),
|
|
58
46
|
}),
|
|
59
|
-
).annotate({
|
|
60
|
-
identifier: "CreateAttachmentResponse",
|
|
61
|
-
}) as any as S.Schema<CreateAttachmentResponse>;
|
|
47
|
+
).annotate({ identifier: "CreateAttachmentResponse" }) as any as S.Schema<CreateAttachmentResponse>;
|
|
62
48
|
|
|
63
49
|
export interface CreateBackupRequest {
|
|
64
50
|
id: string;
|
|
@@ -68,21 +54,11 @@ export const CreateBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
68
54
|
S.Struct({
|
|
69
55
|
id: S.String.pipe(T.Label()),
|
|
70
56
|
type: S.optional(S.String),
|
|
71
|
-
}).pipe(
|
|
72
|
-
|
|
73
|
-
method: "POST",
|
|
74
|
-
uri: "/api/v1/postgresv2/{id}/backups",
|
|
75
|
-
code: 200,
|
|
76
|
-
}),
|
|
77
|
-
),
|
|
78
|
-
).annotate({
|
|
79
|
-
identifier: "CreateBackupRequest",
|
|
80
|
-
}) as any as S.Schema<CreateBackupRequest>;
|
|
57
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/postgresv2/{id}/backups", code: 200 })),
|
|
58
|
+
).annotate({ identifier: "CreateBackupRequest" }) as any as S.Schema<CreateBackupRequest>;
|
|
81
59
|
|
|
82
60
|
export interface CreateBackupResponse {}
|
|
83
|
-
export const CreateBackupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
84
|
-
S.Struct({}),
|
|
85
|
-
).annotate({
|
|
61
|
+
export const CreateBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
86
62
|
identifier: "CreateBackupResponse",
|
|
87
63
|
}) as any as S.Schema<CreateBackupResponse>;
|
|
88
64
|
|
|
@@ -105,15 +81,9 @@ export const CreateClusterRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
105
81
|
storage_in_gb: S.optional(S.Number),
|
|
106
82
|
postgis_enabled: S.optional(S.Boolean),
|
|
107
83
|
}).pipe(
|
|
108
|
-
T.Http({
|
|
109
|
-
method: "POST",
|
|
110
|
-
uri: "/api/v1/organizations/{org_slug}/postgresv2",
|
|
111
|
-
code: 200,
|
|
112
|
-
}),
|
|
84
|
+
T.Http({ method: "POST", uri: "/api/v1/organizations/{org_slug}/postgresv2", code: 200 }),
|
|
113
85
|
),
|
|
114
|
-
).annotate({
|
|
115
|
-
identifier: "CreateClusterRequest",
|
|
116
|
-
}) as any as S.Schema<CreateClusterRequest>;
|
|
86
|
+
).annotate({ identifier: "CreateClusterRequest" }) as any as S.Schema<CreateClusterRequest>;
|
|
117
87
|
|
|
118
88
|
export interface Organization {
|
|
119
89
|
id?: string;
|
|
@@ -187,9 +157,7 @@ export const ManagedCluster = /*@__PURE__*/ S.suspend(() =>
|
|
|
187
157
|
}),
|
|
188
158
|
).annotate({ identifier: "ManagedCluster" }) as any as S.Schema<ManagedCluster>;
|
|
189
159
|
|
|
190
|
-
export type CreateClusterResponseErrorsMap = {
|
|
191
|
-
[key: string]: unknown | undefined;
|
|
192
|
-
};
|
|
160
|
+
export type CreateClusterResponseErrorsMap = { [key: string]: unknown | undefined };
|
|
193
161
|
export const CreateClusterResponseErrorsMap = /*@__PURE__*/ S.Record(
|
|
194
162
|
S.String,
|
|
195
163
|
S.Unknown,
|
|
@@ -206,9 +174,7 @@ export const CreateClusterResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
206
174
|
data: S.optional(ManagedCluster),
|
|
207
175
|
errors: S.optional(CreateClusterResponseErrorsMap),
|
|
208
176
|
}),
|
|
209
|
-
).annotate({
|
|
210
|
-
identifier: "CreateClusterResponse",
|
|
211
|
-
}) as any as S.Schema<CreateClusterResponse>;
|
|
177
|
+
).annotate({ identifier: "CreateClusterResponse" }) as any as S.Schema<CreateClusterResponse>;
|
|
212
178
|
|
|
213
179
|
export interface CreateDatabaseRequest {
|
|
214
180
|
id: string;
|
|
@@ -218,21 +184,11 @@ export const CreateDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
218
184
|
S.Struct({
|
|
219
185
|
id: S.String.pipe(T.Label()),
|
|
220
186
|
name: S.String,
|
|
221
|
-
}).pipe(
|
|
222
|
-
|
|
223
|
-
method: "POST",
|
|
224
|
-
uri: "/api/v1/postgresv2/{id}/databases",
|
|
225
|
-
code: 200,
|
|
226
|
-
}),
|
|
227
|
-
),
|
|
228
|
-
).annotate({
|
|
229
|
-
identifier: "CreateDatabaseRequest",
|
|
230
|
-
}) as any as S.Schema<CreateDatabaseRequest>;
|
|
187
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/postgresv2/{id}/databases", code: 200 })),
|
|
188
|
+
).annotate({ identifier: "CreateDatabaseRequest" }) as any as S.Schema<CreateDatabaseRequest>;
|
|
231
189
|
|
|
232
190
|
export interface CreateDatabaseResponse {}
|
|
233
|
-
export const CreateDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
|
|
234
|
-
S.Struct({}),
|
|
235
|
-
).annotate({
|
|
191
|
+
export const CreateDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
236
192
|
identifier: "CreateDatabaseResponse",
|
|
237
193
|
}) as any as S.Schema<CreateDatabaseResponse>;
|
|
238
194
|
|
|
@@ -249,12 +205,8 @@ export const CreateUserRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
249
205
|
id: S.String.pipe(T.Label()),
|
|
250
206
|
username: S.String,
|
|
251
207
|
role: CreateUserRequestRole,
|
|
252
|
-
}).pipe(
|
|
253
|
-
|
|
254
|
-
),
|
|
255
|
-
).annotate({
|
|
256
|
-
identifier: "CreateUserRequest",
|
|
257
|
-
}) as any as S.Schema<CreateUserRequest>;
|
|
208
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/postgresv2/{id}/users", code: 200 })),
|
|
209
|
+
).annotate({ identifier: "CreateUserRequest" }) as any as S.Schema<CreateUserRequest>;
|
|
258
210
|
|
|
259
211
|
export interface User {
|
|
260
212
|
name?: string;
|
|
@@ -276,9 +228,7 @@ export const CreateUserResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
276
228
|
S.Struct({
|
|
277
229
|
data: S.optional(User),
|
|
278
230
|
}),
|
|
279
|
-
).annotate({
|
|
280
|
-
identifier: "CreateUserResponse",
|
|
281
|
-
}) as any as S.Schema<CreateUserResponse>;
|
|
231
|
+
).annotate({ identifier: "CreateUserResponse" }) as any as S.Schema<CreateUserResponse>;
|
|
282
232
|
|
|
283
233
|
export interface DeleteAttachmentRequest {
|
|
284
234
|
id: string;
|
|
@@ -289,15 +239,9 @@ export const DeleteAttachmentRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
289
239
|
id: S.String.pipe(T.Label()),
|
|
290
240
|
app_name: S.String.pipe(T.Label()),
|
|
291
241
|
}).pipe(
|
|
292
|
-
T.Http({
|
|
293
|
-
method: "DELETE",
|
|
294
|
-
uri: "/api/v1/postgresv2/{id}/attachments/{app_name}",
|
|
295
|
-
code: 200,
|
|
296
|
-
}),
|
|
242
|
+
T.Http({ method: "DELETE", uri: "/api/v1/postgresv2/{id}/attachments/{app_name}", code: 200 }),
|
|
297
243
|
),
|
|
298
|
-
).annotate({
|
|
299
|
-
identifier: "DeleteAttachmentRequest",
|
|
300
|
-
}) as any as S.Schema<DeleteAttachmentRequest>;
|
|
244
|
+
).annotate({ identifier: "DeleteAttachmentRequest" }) as any as S.Schema<DeleteAttachmentRequest>;
|
|
301
245
|
|
|
302
246
|
export interface DeleteAttachmentResponseData {
|
|
303
247
|
message?: string;
|
|
@@ -317,9 +261,7 @@ export const DeleteAttachmentResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
317
261
|
S.Struct({
|
|
318
262
|
data: S.optional(DeleteAttachmentResponseData),
|
|
319
263
|
}),
|
|
320
|
-
).annotate({
|
|
321
|
-
identifier: "DeleteAttachmentResponse",
|
|
322
|
-
}) as any as S.Schema<DeleteAttachmentResponse>;
|
|
264
|
+
).annotate({ identifier: "DeleteAttachmentResponse" }) as any as S.Schema<DeleteAttachmentResponse>;
|
|
323
265
|
|
|
324
266
|
export interface DeleteUserRequest {
|
|
325
267
|
id: string;
|
|
@@ -329,21 +271,11 @@ export const DeleteUserRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
329
271
|
S.Struct({
|
|
330
272
|
id: S.String.pipe(T.Label()),
|
|
331
273
|
username: S.String.pipe(T.Label()),
|
|
332
|
-
}).pipe(
|
|
333
|
-
|
|
334
|
-
method: "DELETE",
|
|
335
|
-
uri: "/api/v1/postgresv2/{id}/users/{username}",
|
|
336
|
-
code: 200,
|
|
337
|
-
}),
|
|
338
|
-
),
|
|
339
|
-
).annotate({
|
|
340
|
-
identifier: "DeleteUserRequest",
|
|
341
|
-
}) as any as S.Schema<DeleteUserRequest>;
|
|
274
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/api/v1/postgresv2/{id}/users/{username}", code: 200 })),
|
|
275
|
+
).annotate({ identifier: "DeleteUserRequest" }) as any as S.Schema<DeleteUserRequest>;
|
|
342
276
|
|
|
343
277
|
export interface DeleteUserResponse {}
|
|
344
|
-
export const DeleteUserResponse = /*@__PURE__*/ S.suspend(() =>
|
|
345
|
-
S.Struct({}),
|
|
346
|
-
).annotate({
|
|
278
|
+
export const DeleteUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
347
279
|
identifier: "DeleteUserResponse",
|
|
348
280
|
}) as any as S.Schema<DeleteUserResponse>;
|
|
349
281
|
|
|
@@ -362,14 +294,10 @@ export const DestroyClusterRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
362
294
|
code: 200,
|
|
363
295
|
}),
|
|
364
296
|
),
|
|
365
|
-
).annotate({
|
|
366
|
-
identifier: "DestroyClusterRequest",
|
|
367
|
-
}) as any as S.Schema<DestroyClusterRequest>;
|
|
297
|
+
).annotate({ identifier: "DestroyClusterRequest" }) as any as S.Schema<DestroyClusterRequest>;
|
|
368
298
|
|
|
369
299
|
export interface DestroyClusterResponse {}
|
|
370
|
-
export const DestroyClusterResponse = /*@__PURE__*/ S.suspend(() =>
|
|
371
|
-
S.Struct({}),
|
|
372
|
-
).annotate({
|
|
300
|
+
export const DestroyClusterResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
373
301
|
identifier: "DestroyClusterResponse",
|
|
374
302
|
}) as any as S.Schema<DestroyClusterResponse>;
|
|
375
303
|
|
|
@@ -392,14 +320,10 @@ export const DisableExtensionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
392
320
|
code: 200,
|
|
393
321
|
}),
|
|
394
322
|
),
|
|
395
|
-
).annotate({
|
|
396
|
-
identifier: "DisableExtensionRequest",
|
|
397
|
-
}) as any as S.Schema<DisableExtensionRequest>;
|
|
323
|
+
).annotate({ identifier: "DisableExtensionRequest" }) as any as S.Schema<DisableExtensionRequest>;
|
|
398
324
|
|
|
399
325
|
export interface DisableExtensionResponse {}
|
|
400
|
-
export const DisableExtensionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
401
|
-
S.Struct({}),
|
|
402
|
-
).annotate({
|
|
326
|
+
export const DisableExtensionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
403
327
|
identifier: "DisableExtensionResponse",
|
|
404
328
|
}) as any as S.Schema<DisableExtensionResponse>;
|
|
405
329
|
|
|
@@ -424,14 +348,10 @@ export const EnableExtensionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
424
348
|
code: 200,
|
|
425
349
|
}),
|
|
426
350
|
),
|
|
427
|
-
).annotate({
|
|
428
|
-
identifier: "EnableExtensionRequest",
|
|
429
|
-
}) as any as S.Schema<EnableExtensionRequest>;
|
|
351
|
+
).annotate({ identifier: "EnableExtensionRequest" }) as any as S.Schema<EnableExtensionRequest>;
|
|
430
352
|
|
|
431
353
|
export interface EnableExtensionResponse {}
|
|
432
|
-
export const EnableExtensionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
433
|
-
S.Struct({}),
|
|
434
|
-
).annotate({
|
|
354
|
+
export const EnableExtensionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
435
355
|
identifier: "EnableExtensionResponse",
|
|
436
356
|
}) as any as S.Schema<EnableExtensionResponse>;
|
|
437
357
|
|
|
@@ -444,15 +364,9 @@ export const GetClusterRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
444
364
|
org_slug: S.String.pipe(T.Label()),
|
|
445
365
|
id: S.String.pipe(T.Label()),
|
|
446
366
|
}).pipe(
|
|
447
|
-
T.Http({
|
|
448
|
-
method: "GET",
|
|
449
|
-
uri: "/api/v1/organizations/{org_slug}/postgresv2/{id}",
|
|
450
|
-
code: 200,
|
|
451
|
-
}),
|
|
367
|
+
T.Http({ method: "GET", uri: "/api/v1/organizations/{org_slug}/postgresv2/{id}", code: 200 }),
|
|
452
368
|
),
|
|
453
|
-
).annotate({
|
|
454
|
-
identifier: "GetClusterRequest",
|
|
455
|
-
}) as any as S.Schema<GetClusterRequest>;
|
|
369
|
+
).annotate({ identifier: "GetClusterRequest" }) as any as S.Schema<GetClusterRequest>;
|
|
456
370
|
|
|
457
371
|
export interface ClusterCredentials {
|
|
458
372
|
status?: string;
|
|
@@ -469,9 +383,7 @@ export const ClusterCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
|
469
383
|
dbname: S.optional(S.String),
|
|
470
384
|
pgbouncer_uri: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
471
385
|
}),
|
|
472
|
-
).annotate({
|
|
473
|
-
identifier: "ClusterCredentials",
|
|
474
|
-
}) as any as S.Schema<ClusterCredentials>;
|
|
386
|
+
).annotate({ identifier: "ClusterCredentials" }) as any as S.Schema<ClusterCredentials>;
|
|
475
387
|
|
|
476
388
|
export interface GetClusterResponse {
|
|
477
389
|
data?: ManagedCluster;
|
|
@@ -482,9 +394,7 @@ export const GetClusterResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
482
394
|
data: S.optional(ManagedCluster),
|
|
483
395
|
credentials: S.optional(ClusterCredentials),
|
|
484
396
|
}),
|
|
485
|
-
).annotate({
|
|
486
|
-
identifier: "GetClusterResponse",
|
|
487
|
-
}) as any as S.Schema<GetClusterResponse>;
|
|
397
|
+
).annotate({ identifier: "GetClusterResponse" }) as any as S.Schema<GetClusterResponse>;
|
|
488
398
|
|
|
489
399
|
export interface GetClusterByIdRequest {
|
|
490
400
|
id: string;
|
|
@@ -493,9 +403,7 @@ export const GetClusterByIdRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
493
403
|
S.Struct({
|
|
494
404
|
id: S.String.pipe(T.Label()),
|
|
495
405
|
}).pipe(T.Http({ method: "GET", uri: "/api/v1/postgresv2/{id}", code: 200 })),
|
|
496
|
-
).annotate({
|
|
497
|
-
identifier: "GetClusterByIdRequest",
|
|
498
|
-
}) as any as S.Schema<GetClusterByIdRequest>;
|
|
406
|
+
).annotate({ identifier: "GetClusterByIdRequest" }) as any as S.Schema<GetClusterByIdRequest>;
|
|
499
407
|
|
|
500
408
|
export interface GetUserCredentialsRequest {
|
|
501
409
|
id: string;
|
|
@@ -548,16 +456,8 @@ export interface ListBackupsRequest {
|
|
|
548
456
|
export const ListBackupsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
549
457
|
S.Struct({
|
|
550
458
|
id: S.String.pipe(T.Label()),
|
|
551
|
-
}).pipe(
|
|
552
|
-
|
|
553
|
-
method: "GET",
|
|
554
|
-
uri: "/api/v1/postgresv2/{id}/backups",
|
|
555
|
-
code: 200,
|
|
556
|
-
}),
|
|
557
|
-
),
|
|
558
|
-
).annotate({
|
|
559
|
-
identifier: "ListBackupsRequest",
|
|
560
|
-
}) as any as S.Schema<ListBackupsRequest>;
|
|
459
|
+
}).pipe(T.Http({ method: "GET", uri: "/api/v1/postgresv2/{id}/backups", code: 200 })),
|
|
460
|
+
).annotate({ identifier: "ListBackupsRequest" }) as any as S.Schema<ListBackupsRequest>;
|
|
561
461
|
|
|
562
462
|
export interface ClusterBackup {
|
|
563
463
|
id?: string;
|
|
@@ -588,9 +488,7 @@ export const ListBackupsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
588
488
|
S.Struct({
|
|
589
489
|
data: S.optional(ListBackupsResponseDataList),
|
|
590
490
|
}),
|
|
591
|
-
).annotate({
|
|
592
|
-
identifier: "ListBackupsResponse",
|
|
593
|
-
}) as any as S.Schema<ListBackupsResponse>;
|
|
491
|
+
).annotate({ identifier: "ListBackupsResponse" }) as any as S.Schema<ListBackupsResponse>;
|
|
594
492
|
|
|
595
493
|
export interface ListClustersRequest {
|
|
596
494
|
org_slug: string;
|
|
@@ -598,16 +496,8 @@ export interface ListClustersRequest {
|
|
|
598
496
|
export const ListClustersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
599
497
|
S.Struct({
|
|
600
498
|
org_slug: S.String.pipe(T.Label()),
|
|
601
|
-
}).pipe(
|
|
602
|
-
|
|
603
|
-
method: "GET",
|
|
604
|
-
uri: "/api/v1/organizations/{org_slug}/postgresv2",
|
|
605
|
-
code: 200,
|
|
606
|
-
}),
|
|
607
|
-
),
|
|
608
|
-
).annotate({
|
|
609
|
-
identifier: "ListClustersRequest",
|
|
610
|
-
}) as any as S.Schema<ListClustersRequest>;
|
|
499
|
+
}).pipe(T.Http({ method: "GET", uri: "/api/v1/organizations/{org_slug}/postgresv2", code: 200 })),
|
|
500
|
+
).annotate({ identifier: "ListClustersRequest" }) as any as S.Schema<ListClustersRequest>;
|
|
611
501
|
|
|
612
502
|
export type ListClustersResponseDataList = Array<ManagedCluster>;
|
|
613
503
|
export const ListClustersResponseDataList = /*@__PURE__*/ S.Array(
|
|
@@ -621,9 +511,7 @@ export const ListClustersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
621
511
|
S.Struct({
|
|
622
512
|
data: S.optional(ListClustersResponseDataList),
|
|
623
513
|
}),
|
|
624
|
-
).annotate({
|
|
625
|
-
identifier: "ListClustersResponse",
|
|
626
|
-
}) as any as S.Schema<ListClustersResponse>;
|
|
514
|
+
).annotate({ identifier: "ListClustersResponse" }) as any as S.Schema<ListClustersResponse>;
|
|
627
515
|
|
|
628
516
|
export interface ListDatabasesRequest {
|
|
629
517
|
id: string;
|
|
@@ -631,16 +519,8 @@ export interface ListDatabasesRequest {
|
|
|
631
519
|
export const ListDatabasesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
632
520
|
S.Struct({
|
|
633
521
|
id: S.String.pipe(T.Label()),
|
|
634
|
-
}).pipe(
|
|
635
|
-
|
|
636
|
-
method: "GET",
|
|
637
|
-
uri: "/api/v1/postgresv2/{id}/databases",
|
|
638
|
-
code: 200,
|
|
639
|
-
}),
|
|
640
|
-
),
|
|
641
|
-
).annotate({
|
|
642
|
-
identifier: "ListDatabasesRequest",
|
|
643
|
-
}) as any as S.Schema<ListDatabasesRequest>;
|
|
522
|
+
}).pipe(T.Http({ method: "GET", uri: "/api/v1/postgresv2/{id}/databases", code: 200 })),
|
|
523
|
+
).annotate({ identifier: "ListDatabasesRequest" }) as any as S.Schema<ListDatabasesRequest>;
|
|
644
524
|
|
|
645
525
|
export interface Database {
|
|
646
526
|
name?: string;
|
|
@@ -663,9 +543,7 @@ export const ListDatabasesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
663
543
|
S.Struct({
|
|
664
544
|
data: S.optional(ListDatabasesResponseDataList),
|
|
665
545
|
}),
|
|
666
|
-
).annotate({
|
|
667
|
-
identifier: "ListDatabasesResponse",
|
|
668
|
-
}) as any as S.Schema<ListDatabasesResponse>;
|
|
546
|
+
).annotate({ identifier: "ListDatabasesResponse" }) as any as S.Schema<ListDatabasesResponse>;
|
|
669
547
|
|
|
670
548
|
export interface ListExtensionsRequest {
|
|
671
549
|
id: string;
|
|
@@ -682,9 +560,7 @@ export const ListExtensionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
682
560
|
code: 200,
|
|
683
561
|
}),
|
|
684
562
|
),
|
|
685
|
-
).annotate({
|
|
686
|
-
identifier: "ListExtensionsRequest",
|
|
687
|
-
}) as any as S.Schema<ListExtensionsRequest>;
|
|
563
|
+
).annotate({ identifier: "ListExtensionsRequest" }) as any as S.Schema<ListExtensionsRequest>;
|
|
688
564
|
|
|
689
565
|
export interface InstalledExtension {
|
|
690
566
|
version?: string;
|
|
@@ -695,9 +571,7 @@ export const InstalledExtension = /*@__PURE__*/ S.suspend(() =>
|
|
|
695
571
|
version: S.optional(S.String),
|
|
696
572
|
schema: S.optional(S.String),
|
|
697
573
|
}),
|
|
698
|
-
).annotate({
|
|
699
|
-
identifier: "InstalledExtension",
|
|
700
|
-
}) as any as S.Schema<InstalledExtension>;
|
|
574
|
+
).annotate({ identifier: "InstalledExtension" }) as any as S.Schema<InstalledExtension>;
|
|
701
575
|
|
|
702
576
|
export interface Extension {
|
|
703
577
|
name?: string;
|
|
@@ -730,9 +604,7 @@ export const ListExtensionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
730
604
|
S.Struct({
|
|
731
605
|
data: S.optional(ListExtensionsResponseDataList),
|
|
732
606
|
}),
|
|
733
|
-
).annotate({
|
|
734
|
-
identifier: "ListExtensionsResponse",
|
|
735
|
-
}) as any as S.Schema<ListExtensionsResponse>;
|
|
607
|
+
).annotate({ identifier: "ListExtensionsResponse" }) as any as S.Schema<ListExtensionsResponse>;
|
|
736
608
|
|
|
737
609
|
export interface ListRegionsRequest {
|
|
738
610
|
org_slug: string;
|
|
@@ -747,9 +619,7 @@ export const ListRegionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
747
619
|
code: 200,
|
|
748
620
|
}),
|
|
749
621
|
),
|
|
750
|
-
).annotate({
|
|
751
|
-
identifier: "ListRegionsRequest",
|
|
752
|
-
}) as any as S.Schema<ListRegionsRequest>;
|
|
622
|
+
).annotate({ identifier: "ListRegionsRequest" }) as any as S.Schema<ListRegionsRequest>;
|
|
753
623
|
|
|
754
624
|
export interface Region {
|
|
755
625
|
code?: string;
|
|
@@ -774,9 +644,7 @@ export const ListRegionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
774
644
|
S.Struct({
|
|
775
645
|
data: S.optional(ListRegionsResponseDataList),
|
|
776
646
|
}),
|
|
777
|
-
).annotate({
|
|
778
|
-
identifier: "ListRegionsResponse",
|
|
779
|
-
}) as any as S.Schema<ListRegionsResponse>;
|
|
647
|
+
).annotate({ identifier: "ListRegionsResponse" }) as any as S.Schema<ListRegionsResponse>;
|
|
780
648
|
|
|
781
649
|
export interface ListUsersRequest {
|
|
782
650
|
id: string;
|
|
@@ -784,12 +652,8 @@ export interface ListUsersRequest {
|
|
|
784
652
|
export const ListUsersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
785
653
|
S.Struct({
|
|
786
654
|
id: S.String.pipe(T.Label()),
|
|
787
|
-
}).pipe(
|
|
788
|
-
|
|
789
|
-
),
|
|
790
|
-
).annotate({
|
|
791
|
-
identifier: "ListUsersRequest",
|
|
792
|
-
}) as any as S.Schema<ListUsersRequest>;
|
|
655
|
+
}).pipe(T.Http({ method: "GET", uri: "/api/v1/postgresv2/{id}/users", code: 200 })),
|
|
656
|
+
).annotate({ identifier: "ListUsersRequest" }) as any as S.Schema<ListUsersRequest>;
|
|
793
657
|
|
|
794
658
|
export type ListUsersResponseDataList = Array<User>;
|
|
795
659
|
export const ListUsersResponseDataList = /*@__PURE__*/ S.Array(
|
|
@@ -803,9 +667,7 @@ export const ListUsersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
803
667
|
S.Struct({
|
|
804
668
|
data: S.optional(ListUsersResponseDataList),
|
|
805
669
|
}),
|
|
806
|
-
).annotate({
|
|
807
|
-
identifier: "ListUsersResponse",
|
|
808
|
-
}) as any as S.Schema<ListUsersResponse>;
|
|
670
|
+
).annotate({ identifier: "ListUsersResponse" }) as any as S.Schema<ListUsersResponse>;
|
|
809
671
|
|
|
810
672
|
export interface RestoreBackupRequest {
|
|
811
673
|
id: string;
|
|
@@ -819,16 +681,8 @@ export const RestoreBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
819
681
|
backup_id: S.optional(S.String),
|
|
820
682
|
name: S.optional(S.String),
|
|
821
683
|
pitr_time: S.optional(S.String),
|
|
822
|
-
}).pipe(
|
|
823
|
-
|
|
824
|
-
method: "POST",
|
|
825
|
-
uri: "/api/v1/postgresv2/{id}/restore",
|
|
826
|
-
code: 200,
|
|
827
|
-
}),
|
|
828
|
-
),
|
|
829
|
-
).annotate({
|
|
830
|
-
identifier: "RestoreBackupRequest",
|
|
831
|
-
}) as any as S.Schema<RestoreBackupRequest>;
|
|
684
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/postgresv2/{id}/restore", code: 200 })),
|
|
685
|
+
).annotate({ identifier: "RestoreBackupRequest" }) as any as S.Schema<RestoreBackupRequest>;
|
|
832
686
|
|
|
833
687
|
export interface RestoreBackupResponse {
|
|
834
688
|
data?: ManagedCluster;
|
|
@@ -837,9 +691,7 @@ export const RestoreBackupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
837
691
|
S.Struct({
|
|
838
692
|
data: S.optional(ManagedCluster),
|
|
839
693
|
}),
|
|
840
|
-
).annotate({
|
|
841
|
-
identifier: "RestoreBackupResponse",
|
|
842
|
-
}) as any as S.Schema<RestoreBackupResponse>;
|
|
694
|
+
).annotate({ identifier: "RestoreBackupResponse" }) as any as S.Schema<RestoreBackupResponse>;
|
|
843
695
|
|
|
844
696
|
export type UpdateUserRoleRequestRole = "schema_admin" | "writer" | "reader";
|
|
845
697
|
export const UpdateUserRoleRequestRole = S.String;
|
|
@@ -854,21 +706,11 @@ export const UpdateUserRoleRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
854
706
|
id: S.String.pipe(T.Label()),
|
|
855
707
|
username: S.String.pipe(T.Label()),
|
|
856
708
|
role: UpdateUserRoleRequestRole,
|
|
857
|
-
}).pipe(
|
|
858
|
-
|
|
859
|
-
method: "PATCH",
|
|
860
|
-
uri: "/api/v1/postgresv2/{id}/users/{username}",
|
|
861
|
-
code: 200,
|
|
862
|
-
}),
|
|
863
|
-
),
|
|
864
|
-
).annotate({
|
|
865
|
-
identifier: "UpdateUserRoleRequest",
|
|
866
|
-
}) as any as S.Schema<UpdateUserRoleRequest>;
|
|
709
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/api/v1/postgresv2/{id}/users/{username}", code: 200 })),
|
|
710
|
+
).annotate({ identifier: "UpdateUserRoleRequest" }) as any as S.Schema<UpdateUserRoleRequest>;
|
|
867
711
|
|
|
868
712
|
export interface UpdateUserRoleResponse {}
|
|
869
|
-
export const UpdateUserRoleResponse = /*@__PURE__*/ S.suspend(() =>
|
|
870
|
-
S.Struct({}),
|
|
871
|
-
).annotate({
|
|
713
|
+
export const UpdateUserRoleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
872
714
|
identifier: "UpdateUserRoleResponse",
|
|
873
715
|
}) as any as S.Schema<UpdateUserRoleResponse>;
|
|
874
716
|
|