@boatdev/sdk 1.0.1 → 1.1.0
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/.openapi-generator/FILES +2 -0
- package/README.md +8 -26
- package/dist/apis/BoatApi.d.ts +99 -80
- package/dist/apis/BoatApi.js +103 -28
- package/dist/esm/apis/BoatApi.d.ts +99 -80
- package/dist/esm/apis/BoatApi.js +103 -28
- package/dist/esm/models/DeletionOperation.d.ts +24 -0
- package/dist/esm/models/DeletionOperation.js +15 -0
- package/dist/esm/models/DeletionOperationListResponse.d.ts +52 -0
- package/dist/esm/models/DeletionOperationListResponse.js +58 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/runtime.d.ts +8 -0
- package/dist/esm/runtime.js +18 -0
- package/dist/models/DeletionOperation.d.ts +24 -0
- package/dist/models/DeletionOperation.js +16 -1
- package/dist/models/DeletionOperationListResponse.d.ts +52 -0
- package/dist/models/DeletionOperationListResponse.js +66 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/runtime.d.ts +8 -0
- package/dist/runtime.js +19 -0
- package/docs/BoatApi.md +80 -1
- package/docs/DeletionOperation.md +4 -0
- package/docs/DeletionOperationListResponse.md +36 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +182 -80
- package/src/models/DeletionOperation.ts +29 -0
- package/src/models/DeletionOperationListResponse.ts +102 -0
- package/src/models/index.ts +1 -0
- package/src/runtime.ts +23 -0
|
@@ -49,6 +49,18 @@ export interface DeletionOperation {
|
|
|
49
49
|
* @memberof DeletionOperation
|
|
50
50
|
*/
|
|
51
51
|
status: DeletionOperationStatusEnum;
|
|
52
|
+
/**
|
|
53
|
+
* What the background purge is doing. The target is already gone from every list, restore and fork once the operation exists. `waiting_for_uploads`: stored data is erased once the last upload URL issued for it expires (`expectedBy`). `kept_for_newer_snapshots`: a newer snapshot you kept is built on this one; its data goes when they go. `waiting_for_restore`: a sandbox is still restoring from it. `retrying`: a transient fault, retried automatically.
|
|
54
|
+
* @type {DeletionOperationStageEnum}
|
|
55
|
+
* @memberof DeletionOperation
|
|
56
|
+
*/
|
|
57
|
+
stage?: DeletionOperationStageEnum;
|
|
58
|
+
/**
|
|
59
|
+
* When `waiting_for_uploads` ends.
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof DeletionOperation
|
|
62
|
+
*/
|
|
63
|
+
expectedBy?: Date | null;
|
|
52
64
|
/**
|
|
53
65
|
*
|
|
54
66
|
* @type {number}
|
|
@@ -100,6 +112,19 @@ export const DeletionOperationStatusEnum = {
|
|
|
100
112
|
} as const;
|
|
101
113
|
export type DeletionOperationStatusEnum = typeof DeletionOperationStatusEnum[keyof typeof DeletionOperationStatusEnum];
|
|
102
114
|
|
|
115
|
+
/**
|
|
116
|
+
* @export
|
|
117
|
+
*/
|
|
118
|
+
export const DeletionOperationStageEnum = {
|
|
119
|
+
Removing: 'removing',
|
|
120
|
+
WaitingForUploads: 'waiting_for_uploads',
|
|
121
|
+
KeptForNewerSnapshots: 'kept_for_newer_snapshots',
|
|
122
|
+
WaitingForRestore: 'waiting_for_restore',
|
|
123
|
+
Retrying: 'retrying',
|
|
124
|
+
Completed: 'completed'
|
|
125
|
+
} as const;
|
|
126
|
+
export type DeletionOperationStageEnum = typeof DeletionOperationStageEnum[keyof typeof DeletionOperationStageEnum];
|
|
127
|
+
|
|
103
128
|
|
|
104
129
|
/**
|
|
105
130
|
* Check if a given object implements the DeletionOperation interface.
|
|
@@ -131,6 +156,8 @@ export function DeletionOperationFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
131
156
|
'targetId': json['targetId'],
|
|
132
157
|
'reason': json['reason'],
|
|
133
158
|
'status': json['status'],
|
|
159
|
+
'stage': json['stage'] == null ? undefined : json['stage'],
|
|
160
|
+
'expectedBy': json['expectedBy'] == null ? undefined : (new Date(json['expectedBy'])),
|
|
134
161
|
'attemptCount': json['attemptCount'],
|
|
135
162
|
'requestedAt': (new Date(json['requestedAt'])),
|
|
136
163
|
'completedAt': (json['completedAt'] == null ? null : new Date(json['completedAt'])),
|
|
@@ -153,6 +180,8 @@ export function DeletionOperationToJSONTyped(value?: DeletionOperation | null, i
|
|
|
153
180
|
'targetId': value['targetId'],
|
|
154
181
|
'reason': value['reason'],
|
|
155
182
|
'status': value['status'],
|
|
183
|
+
'stage': value['stage'],
|
|
184
|
+
'expectedBy': value['expectedBy'] == null ? value['expectedBy'] : value['expectedBy'].toISOString(),
|
|
156
185
|
'attemptCount': value['attemptCount'],
|
|
157
186
|
'requestedAt': value['requestedAt'].toISOString(),
|
|
158
187
|
'completedAt': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Boat Public API v1
|
|
5
|
+
* Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DeletionOperation } from './DeletionOperation';
|
|
17
|
+
import {
|
|
18
|
+
DeletionOperationFromJSON,
|
|
19
|
+
DeletionOperationFromJSONTyped,
|
|
20
|
+
DeletionOperationToJSON,
|
|
21
|
+
DeletionOperationToJSONTyped,
|
|
22
|
+
} from './DeletionOperation';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface DeletionOperationListResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface DeletionOperationListResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof DeletionOperationListResponse
|
|
34
|
+
*/
|
|
35
|
+
ok: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {DeletionOperationListResponseTypeEnum}
|
|
39
|
+
* @memberof DeletionOperationListResponse
|
|
40
|
+
*/
|
|
41
|
+
type: DeletionOperationListResponseTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Array<DeletionOperation>}
|
|
45
|
+
* @memberof DeletionOperationListResponse
|
|
46
|
+
*/
|
|
47
|
+
operations: Array<DeletionOperation>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export const DeletionOperationListResponseTypeEnum = {
|
|
55
|
+
SnapshotDeleting: 'snapshot.deleting'
|
|
56
|
+
} as const;
|
|
57
|
+
export type DeletionOperationListResponseTypeEnum = typeof DeletionOperationListResponseTypeEnum[keyof typeof DeletionOperationListResponseTypeEnum];
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the DeletionOperationListResponse interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfDeletionOperationListResponse(value: object): value is DeletionOperationListResponse {
|
|
64
|
+
if (!('ok' in value) || value['ok'] === undefined) return false;
|
|
65
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
66
|
+
if (!('operations' in value) || value['operations'] === undefined) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function DeletionOperationListResponseFromJSON(json: any): DeletionOperationListResponse {
|
|
71
|
+
return DeletionOperationListResponseFromJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function DeletionOperationListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeletionOperationListResponse {
|
|
75
|
+
if (json == null) {
|
|
76
|
+
return json;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'ok': json['ok'],
|
|
81
|
+
'type': json['type'],
|
|
82
|
+
'operations': ((json['operations'] as Array<any>).map(DeletionOperationFromJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function DeletionOperationListResponseToJSON(json: any): DeletionOperationListResponse {
|
|
87
|
+
return DeletionOperationListResponseToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function DeletionOperationListResponseToJSONTyped(value?: DeletionOperationListResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'ok': value['ok'],
|
|
98
|
+
'type': value['type'],
|
|
99
|
+
'operations': ((value['operations'] as Array<any>).map(DeletionOperationToJSON)),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from './CreateScopedApiKeyRequest';
|
|
|
33
33
|
export * from './DataRetentionPolicyResponse';
|
|
34
34
|
export * from './DataRetentionUpdateRequest';
|
|
35
35
|
export * from './DeletionOperation';
|
|
36
|
+
export * from './DeletionOperationListResponse';
|
|
36
37
|
export * from './DeletionOperationResponse';
|
|
37
38
|
export * from './DesktopRequest';
|
|
38
39
|
export * from './DesktopResponse';
|
package/src/runtime.ts
CHANGED
|
@@ -447,3 +447,26 @@ export class TextApiResponse {
|
|
|
447
447
|
return await this.raw.text();
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* A body-taking call's parameters with the body's fields inline, next to the
|
|
454
|
+
* path/query/header parameters: `fork({ sandboxId, type: 'small' })` is
|
|
455
|
+
* `fork({ sandboxId, forkRequest: { type: 'small' } })`. Both shapes are accepted.
|
|
456
|
+
*/
|
|
457
|
+
export type FlatBody<R, K extends keyof R> = Omit<R, K> & NonNullable<R[K]>;
|
|
458
|
+
|
|
459
|
+
/** Turns either call shape into the wrapped one the generated code sends. */
|
|
460
|
+
export function unflattenBody<R>(input: object, bodyKey: string, paramKeys: string[], sharedKeys: string[]): R {
|
|
461
|
+
if (input == null || bodyKey in input) return input as R;
|
|
462
|
+
const params: any = {};
|
|
463
|
+
const body: any = {};
|
|
464
|
+
for (const [k, v] of Object.entries(input)) {
|
|
465
|
+
const isParam = paramKeys.indexOf(k) !== -1;
|
|
466
|
+
if (isParam) params[k] = v;
|
|
467
|
+
if (!isParam || sharedKeys.indexOf(k) !== -1) body[k] = v;
|
|
468
|
+
}
|
|
469
|
+
// No body field given: send no body, exactly like the wrapped call with the key omitted.
|
|
470
|
+
if (Object.keys(body).length > 0) params[bodyKey] = body;
|
|
471
|
+
return params as R;
|
|
472
|
+
}
|