@boatdev/sdk 1.9.6 → 1.9.8
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 +8 -0
- package/README.md +2 -2
- package/dist/apis/BoatApi.d.ts +76 -0
- package/dist/apis/BoatApi.js +199 -0
- package/dist/boat-helpers.d.ts +23 -0
- package/dist/boat-helpers.js +97 -0
- package/dist/esm/apis/BoatApi.d.ts +76 -0
- package/dist/esm/apis/BoatApi.js +199 -0
- package/dist/esm/boat-helpers.d.ts +23 -0
- package/dist/esm/boat-helpers.js +95 -0
- package/dist/esm/models/CredentialAccount.d.ts +50 -0
- package/dist/esm/models/CredentialAccount.js +53 -0
- package/dist/esm/models/CredentialAccountsResponse.d.ts +64 -0
- package/dist/esm/models/CredentialAccountsResponse.js +65 -0
- package/dist/esm/models/CredentialProfile.d.ts +9 -0
- package/dist/esm/models/CredentialProfile.js +2 -0
- package/dist/esm/models/DeletionOperation.d.ts +1 -3
- package/dist/esm/models/DeletionOperation.js +0 -2
- package/dist/esm/models/LimitsFields.d.ts +7 -0
- package/dist/esm/models/LimitsFields.js +3 -0
- package/dist/esm/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
- package/dist/esm/models/LimitsFieldsMachineTypesInner.js +60 -0
- package/dist/esm/models/LimitsResponse.d.ts +7 -0
- package/dist/esm/models/LimitsResponse.js +3 -0
- package/dist/esm/models/Sandbox.d.ts +15 -2
- package/dist/esm/models/Sandbox.js +5 -0
- package/dist/esm/models/SandboxHydration.d.ts +50 -0
- package/dist/esm/models/SandboxHydration.js +55 -0
- package/dist/esm/models/SetCredentialKeyRequest.d.ts +6 -0
- package/dist/esm/models/SetCredentialKeyRequest.js +2 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/CredentialAccount.d.ts +50 -0
- package/dist/models/CredentialAccount.js +60 -0
- package/dist/models/CredentialAccountsResponse.d.ts +64 -0
- package/dist/models/CredentialAccountsResponse.js +72 -0
- package/dist/models/CredentialProfile.d.ts +9 -0
- package/dist/models/CredentialProfile.js +2 -0
- package/dist/models/DeletionOperation.d.ts +1 -3
- package/dist/models/DeletionOperation.js +0 -2
- package/dist/models/LimitsFields.d.ts +7 -0
- package/dist/models/LimitsFields.js +3 -0
- package/dist/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
- package/dist/models/LimitsFieldsMachineTypesInner.js +68 -0
- package/dist/models/LimitsResponse.d.ts +7 -0
- package/dist/models/LimitsResponse.js +3 -0
- package/dist/models/Sandbox.d.ts +15 -2
- package/dist/models/Sandbox.js +5 -0
- package/dist/models/SandboxHydration.d.ts +50 -0
- package/dist/models/SandboxHydration.js +62 -0
- package/dist/models/SetCredentialKeyRequest.d.ts +6 -0
- package/dist/models/SetCredentialKeyRequest.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/BoatApi.md +325 -0
- package/docs/CredentialAccount.md +39 -0
- package/docs/CredentialAccountsResponse.md +42 -0
- package/docs/CredentialProfile.md +2 -0
- package/docs/LimitsFields.md +2 -0
- package/docs/LimitsFieldsMachineTypesInner.md +36 -0
- package/docs/LimitsResponse.md +2 -0
- package/docs/Sandbox.md +4 -0
- package/docs/SandboxHydration.md +39 -0
- package/docs/SetCredentialKeyRequest.md +2 -0
- package/package.json +2 -2
- package/src/apis/BoatApi.ts +307 -0
- package/src/boat-helpers.ts +109 -0
- package/src/models/CredentialAccount.ts +92 -0
- package/src/models/CredentialAccountsResponse.ts +128 -0
- package/src/models/CredentialProfile.ts +15 -0
- package/src/models/DeletionOperation.ts +1 -3
- package/src/models/LimitsFields.ts +15 -0
- package/src/models/LimitsFieldsMachineTypesInner.ts +97 -0
- package/src/models/LimitsResponse.ts +15 -0
- package/src/models/Sandbox.ts +25 -2
- package/src/models/SandboxHydration.ts +93 -0
- package/src/models/SetCredentialKeyRequest.ts +8 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* One account of a credential. Never a secret.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CredentialAccount
|
|
20
|
+
*/
|
|
21
|
+
export interface CredentialAccount {
|
|
22
|
+
/**
|
|
23
|
+
* The account's id. It stays the same across switches.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CredentialAccount
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The account's email for a sign-in, or the key's last characters (…1234).
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CredentialAccount
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* True for the account every sandbox on the profile uses.
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof CredentialAccount
|
|
38
|
+
*/
|
|
39
|
+
active: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* When the account was set aside (accounts not in use).
|
|
42
|
+
* @type {Date}
|
|
43
|
+
* @memberof CredentialAccount
|
|
44
|
+
*/
|
|
45
|
+
addedAt?: Date;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the CredentialAccount interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfCredentialAccount(value: object): value is CredentialAccount {
|
|
52
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
53
|
+
if (!('label' in value) || value['label'] === undefined) return false;
|
|
54
|
+
if (!('active' in value) || value['active'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function CredentialAccountFromJSON(json: any): CredentialAccount {
|
|
59
|
+
return CredentialAccountFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CredentialAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): CredentialAccount {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'id': json['id'],
|
|
69
|
+
'label': json['label'],
|
|
70
|
+
'active': json['active'],
|
|
71
|
+
'addedAt': json['addedAt'] == null ? undefined : (new Date(json['addedAt'])),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function CredentialAccountToJSON(json: any): CredentialAccount {
|
|
76
|
+
return CredentialAccountToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function CredentialAccountToJSONTyped(value?: CredentialAccount | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'id': value['id'],
|
|
87
|
+
'label': value['label'],
|
|
88
|
+
'active': value['active'],
|
|
89
|
+
'addedAt': value['addedAt'] == null ? value['addedAt'] : value['addedAt'].toISOString(),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,128 @@
|
|
|
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 { CredentialId } from './CredentialId';
|
|
17
|
+
import {
|
|
18
|
+
CredentialIdFromJSON,
|
|
19
|
+
CredentialIdFromJSONTyped,
|
|
20
|
+
CredentialIdToJSON,
|
|
21
|
+
CredentialIdToJSONTyped,
|
|
22
|
+
} from './CredentialId';
|
|
23
|
+
import type { CredentialAccount } from './CredentialAccount';
|
|
24
|
+
import {
|
|
25
|
+
CredentialAccountFromJSON,
|
|
26
|
+
CredentialAccountFromJSONTyped,
|
|
27
|
+
CredentialAccountToJSON,
|
|
28
|
+
CredentialAccountToJSONTyped,
|
|
29
|
+
} from './CredentialAccount';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CredentialAccountsResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface CredentialAccountsResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof CredentialAccountsResponse
|
|
41
|
+
*/
|
|
42
|
+
ok: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Stable success envelope discriminator added by v1.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CredentialAccountsResponse
|
|
47
|
+
*/
|
|
48
|
+
type: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof CredentialAccountsResponse
|
|
53
|
+
*/
|
|
54
|
+
success: boolean;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof CredentialAccountsResponse
|
|
59
|
+
*/
|
|
60
|
+
profileId: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {CredentialId}
|
|
64
|
+
* @memberof CredentialAccountsResponse
|
|
65
|
+
*/
|
|
66
|
+
credential: CredentialId;
|
|
67
|
+
/**
|
|
68
|
+
* In the order the accounts were added, so their numbers stay the same across switches. The one in use is marked `active`.
|
|
69
|
+
* @type {Array<CredentialAccount>}
|
|
70
|
+
* @memberof CredentialAccountsResponse
|
|
71
|
+
*/
|
|
72
|
+
accounts: Array<CredentialAccount>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if a given object implements the CredentialAccountsResponse interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfCredentialAccountsResponse(value: object): value is CredentialAccountsResponse {
|
|
81
|
+
if (!('ok' in value) || value['ok'] === undefined) return false;
|
|
82
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
83
|
+
if (!('success' in value) || value['success'] === undefined) return false;
|
|
84
|
+
if (!('profileId' in value) || value['profileId'] === undefined) return false;
|
|
85
|
+
if (!('credential' in value) || value['credential'] === undefined) return false;
|
|
86
|
+
if (!('accounts' in value) || value['accounts'] === undefined) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function CredentialAccountsResponseFromJSON(json: any): CredentialAccountsResponse {
|
|
91
|
+
return CredentialAccountsResponseFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function CredentialAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CredentialAccountsResponse {
|
|
95
|
+
if (json == null) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'ok': json['ok'],
|
|
101
|
+
'type': json['type'],
|
|
102
|
+
'success': json['success'],
|
|
103
|
+
'profileId': json['profileId'],
|
|
104
|
+
'credential': CredentialIdFromJSON(json['credential']),
|
|
105
|
+
'accounts': ((json['accounts'] as Array<any>).map(CredentialAccountFromJSON)),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function CredentialAccountsResponseToJSON(json: any): CredentialAccountsResponse {
|
|
110
|
+
return CredentialAccountsResponseToJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function CredentialAccountsResponseToJSONTyped(value?: CredentialAccountsResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
114
|
+
if (value == null) {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'ok': value['ok'],
|
|
121
|
+
'type': value['type'],
|
|
122
|
+
'success': value['success'],
|
|
123
|
+
'profileId': value['profileId'],
|
|
124
|
+
'credential': CredentialIdToJSON(value['credential']),
|
|
125
|
+
'accounts': ((value['accounts'] as Array<any>).map(CredentialAccountToJSON)),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
CredentialProfileOwnerToJSON,
|
|
28
28
|
CredentialProfileOwnerToJSONTyped,
|
|
29
29
|
} from './CredentialProfileOwner';
|
|
30
|
+
import type { CredentialAccount } from './CredentialAccount';
|
|
31
|
+
import {
|
|
32
|
+
CredentialAccountFromJSON,
|
|
33
|
+
CredentialAccountFromJSONTyped,
|
|
34
|
+
CredentialAccountToJSON,
|
|
35
|
+
CredentialAccountToJSONTyped,
|
|
36
|
+
} from './CredentialAccount';
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
39
|
* A named set of AI credentials. Secret values are never returned.
|
|
@@ -70,6 +77,12 @@ export interface CredentialProfile {
|
|
|
70
77
|
* @memberof CredentialProfile
|
|
71
78
|
*/
|
|
72
79
|
connected: Array<CredentialId>;
|
|
80
|
+
/**
|
|
81
|
+
* Credentials with several accounts, keyed by credential id. Each lists every account (labels only), the one in use marked `active`. Empty when you cannot manage the profile.
|
|
82
|
+
* @type {{ [key: string]: Array<CredentialAccount>; }}
|
|
83
|
+
* @memberof CredentialProfile
|
|
84
|
+
*/
|
|
85
|
+
accounts?: { [key: string]: Array<CredentialAccount>; };
|
|
73
86
|
/**
|
|
74
87
|
* The names of the profile's custom APIs. Values are never returned.
|
|
75
88
|
* @type {Array<string>}
|
|
@@ -122,6 +135,7 @@ export function CredentialProfileFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
122
135
|
'owner': CredentialProfileOwnerFromJSON(json['owner']),
|
|
123
136
|
'canManage': json['canManage'],
|
|
124
137
|
'connected': ((json['connected'] as Array<any>).map(CredentialIdFromJSON)),
|
|
138
|
+
'accounts': json['accounts'] == null ? undefined : json['accounts'],
|
|
125
139
|
'customApis': json['customApis'],
|
|
126
140
|
'createdAt': (new Date(json['createdAt'])),
|
|
127
141
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
@@ -145,6 +159,7 @@ export function CredentialProfileToJSONTyped(value?: CredentialProfile | null, i
|
|
|
145
159
|
'owner': CredentialProfileOwnerToJSON(value['owner']),
|
|
146
160
|
'canManage': value['canManage'],
|
|
147
161
|
'connected': ((value['connected'] as Array<any>).map(CredentialIdToJSON)),
|
|
162
|
+
'accounts': value['accounts'],
|
|
148
163
|
'customApis': value['customApis'],
|
|
149
164
|
'createdAt': value['createdAt'].toISOString(),
|
|
150
165
|
'updatedAt': value['updatedAt'].toISOString(),
|
|
@@ -50,7 +50,7 @@ export interface DeletionOperation {
|
|
|
50
50
|
*/
|
|
51
51
|
status: DeletionOperationStatusEnum;
|
|
52
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`). `
|
|
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`). `retrying`: a transient fault, retried automatically. `completed`: a newer snapshot, a fork or a named snapshot made from it keeps the data it reads, until that is deleted too.
|
|
54
54
|
* @type {DeletionOperationStageEnum}
|
|
55
55
|
* @memberof DeletionOperation
|
|
56
56
|
*/
|
|
@@ -118,8 +118,6 @@ export type DeletionOperationStatusEnum = typeof DeletionOperationStatusEnum[key
|
|
|
118
118
|
export const DeletionOperationStageEnum = {
|
|
119
119
|
Removing: 'removing',
|
|
120
120
|
WaitingForUploads: 'waiting_for_uploads',
|
|
121
|
-
KeptForNewerSnapshots: 'kept_for_newer_snapshots',
|
|
122
|
-
WaitingForRestore: 'waiting_for_restore',
|
|
123
121
|
Retrying: 'retrying',
|
|
124
122
|
Completed: 'completed'
|
|
125
123
|
} as const;
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
LimitsFieldsCurrentLimitsToJSON,
|
|
28
28
|
LimitsFieldsCurrentLimitsToJSONTyped,
|
|
29
29
|
} from './LimitsFieldsCurrentLimits';
|
|
30
|
+
import type { LimitsFieldsMachineTypesInner } from './LimitsFieldsMachineTypesInner';
|
|
31
|
+
import {
|
|
32
|
+
LimitsFieldsMachineTypesInnerFromJSON,
|
|
33
|
+
LimitsFieldsMachineTypesInnerFromJSONTyped,
|
|
34
|
+
LimitsFieldsMachineTypesInnerToJSON,
|
|
35
|
+
LimitsFieldsMachineTypesInnerToJSONTyped,
|
|
36
|
+
} from './LimitsFieldsMachineTypesInner';
|
|
30
37
|
import type { LimitsFieldsStartLimits } from './LimitsFieldsStartLimits';
|
|
31
38
|
import {
|
|
32
39
|
LimitsFieldsStartLimitsFromJSON,
|
|
@@ -302,6 +309,12 @@ export interface LimitsFields {
|
|
|
302
309
|
* @memberof LimitsFields
|
|
303
310
|
*/
|
|
304
311
|
trialLine?: string | null;
|
|
312
|
+
/**
|
|
313
|
+
* Each sandbox type, and whether this account can create it now. A blocked type carries the reason.
|
|
314
|
+
* @type {Array<LimitsFieldsMachineTypesInner>}
|
|
315
|
+
* @memberof LimitsFields
|
|
316
|
+
*/
|
|
317
|
+
machineTypes?: Array<LimitsFieldsMachineTypesInner>;
|
|
305
318
|
/**
|
|
306
319
|
*
|
|
307
320
|
* @type {LimitsFieldsGiftLimit}
|
|
@@ -427,6 +440,7 @@ export function LimitsFieldsFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
427
440
|
'last24hUsageSeconds': json['last24hUsageSeconds'] == null ? undefined : json['last24hUsageSeconds'],
|
|
428
441
|
'trialComputeCapSeconds': json['trialComputeCapSeconds'] == null ? undefined : json['trialComputeCapSeconds'],
|
|
429
442
|
'trialLine': json['trialLine'] == null ? undefined : json['trialLine'],
|
|
443
|
+
'machineTypes': json['machineTypes'] == null ? undefined : ((json['machineTypes'] as Array<any>).map(LimitsFieldsMachineTypesInnerFromJSON)),
|
|
430
444
|
'giftLimit': json['giftLimit'] == null ? undefined : LimitsFieldsGiftLimitFromJSON(json['giftLimit']),
|
|
431
445
|
'billingStatus': json['billingStatus'],
|
|
432
446
|
'subscriptionStatus': json['subscriptionStatus'] == null ? undefined : json['subscriptionStatus'],
|
|
@@ -493,6 +507,7 @@ export function LimitsFieldsToJSONTyped(value?: LimitsFields | null, ignoreDiscr
|
|
|
493
507
|
'last24hUsageSeconds': value['last24hUsageSeconds'],
|
|
494
508
|
'trialComputeCapSeconds': value['trialComputeCapSeconds'],
|
|
495
509
|
'trialLine': value['trialLine'],
|
|
510
|
+
'machineTypes': value['machineTypes'] == null ? undefined : ((value['machineTypes'] as Array<any>).map(LimitsFieldsMachineTypesInnerToJSON)),
|
|
496
511
|
'giftLimit': LimitsFieldsGiftLimitToJSON(value['giftLimit']),
|
|
497
512
|
'billingStatus': value['billingStatus'],
|
|
498
513
|
'subscriptionStatus': value['subscriptionStatus'],
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface LimitsFieldsMachineTypesInner
|
|
20
|
+
*/
|
|
21
|
+
export interface LimitsFieldsMachineTypesInner {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {LimitsFieldsMachineTypesInnerTypeEnum}
|
|
25
|
+
* @memberof LimitsFieldsMachineTypesInner
|
|
26
|
+
*/
|
|
27
|
+
type: LimitsFieldsMachineTypesInnerTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof LimitsFieldsMachineTypesInner
|
|
32
|
+
*/
|
|
33
|
+
available: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Why the type is blocked, for example `not during the free trial; the first payment unlocks it`. Null when available.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof LimitsFieldsMachineTypesInner
|
|
38
|
+
*/
|
|
39
|
+
reason: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const LimitsFieldsMachineTypesInnerTypeEnum = {
|
|
47
|
+
Small: 'small',
|
|
48
|
+
Default: 'default',
|
|
49
|
+
Large: 'large',
|
|
50
|
+
Xlarge: 'xlarge'
|
|
51
|
+
} as const;
|
|
52
|
+
export type LimitsFieldsMachineTypesInnerTypeEnum = typeof LimitsFieldsMachineTypesInnerTypeEnum[keyof typeof LimitsFieldsMachineTypesInnerTypeEnum];
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the LimitsFieldsMachineTypesInner interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfLimitsFieldsMachineTypesInner(value: object): value is LimitsFieldsMachineTypesInner {
|
|
59
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
60
|
+
if (!('available' in value) || value['available'] === undefined) return false;
|
|
61
|
+
if (!('reason' in value) || value['reason'] === undefined) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function LimitsFieldsMachineTypesInnerFromJSON(json: any): LimitsFieldsMachineTypesInner {
|
|
66
|
+
return LimitsFieldsMachineTypesInnerFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function LimitsFieldsMachineTypesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): LimitsFieldsMachineTypesInner {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'type': json['type'],
|
|
76
|
+
'available': json['available'],
|
|
77
|
+
'reason': json['reason'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function LimitsFieldsMachineTypesInnerToJSON(json: any): LimitsFieldsMachineTypesInner {
|
|
82
|
+
return LimitsFieldsMachineTypesInnerToJSONTyped(json, false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function LimitsFieldsMachineTypesInnerToJSONTyped(value?: LimitsFieldsMachineTypesInner | null, ignoreDiscriminator: boolean = false): any {
|
|
86
|
+
if (value == null) {
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'type': value['type'],
|
|
93
|
+
'available': value['available'],
|
|
94
|
+
'reason': value['reason'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
LimitsFieldsCurrentLimitsToJSON,
|
|
28
28
|
LimitsFieldsCurrentLimitsToJSONTyped,
|
|
29
29
|
} from './LimitsFieldsCurrentLimits';
|
|
30
|
+
import type { LimitsFieldsMachineTypesInner } from './LimitsFieldsMachineTypesInner';
|
|
31
|
+
import {
|
|
32
|
+
LimitsFieldsMachineTypesInnerFromJSON,
|
|
33
|
+
LimitsFieldsMachineTypesInnerFromJSONTyped,
|
|
34
|
+
LimitsFieldsMachineTypesInnerToJSON,
|
|
35
|
+
LimitsFieldsMachineTypesInnerToJSONTyped,
|
|
36
|
+
} from './LimitsFieldsMachineTypesInner';
|
|
30
37
|
import type { LimitsFieldsStartLimits } from './LimitsFieldsStartLimits';
|
|
31
38
|
import {
|
|
32
39
|
LimitsFieldsStartLimitsFromJSON,
|
|
@@ -313,6 +320,12 @@ export interface LimitsResponse {
|
|
|
313
320
|
* @memberof LimitsResponse
|
|
314
321
|
*/
|
|
315
322
|
trialLine?: string;
|
|
323
|
+
/**
|
|
324
|
+
* Each sandbox type, and whether this account can create it now. A blocked type carries the reason.
|
|
325
|
+
* @type {Array<LimitsFieldsMachineTypesInner>}
|
|
326
|
+
* @memberof LimitsResponse
|
|
327
|
+
*/
|
|
328
|
+
machineTypes?: Array<LimitsFieldsMachineTypesInner>;
|
|
316
329
|
/**
|
|
317
330
|
*
|
|
318
331
|
* @type {LimitsFieldsGiftLimit}
|
|
@@ -441,6 +454,7 @@ export function LimitsResponseFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
441
454
|
'last24hUsageSeconds': json['last24hUsageSeconds'] == null ? undefined : json['last24hUsageSeconds'],
|
|
442
455
|
'trialComputeCapSeconds': json['trialComputeCapSeconds'] == null ? undefined : json['trialComputeCapSeconds'],
|
|
443
456
|
'trialLine': json['trialLine'] == null ? undefined : json['trialLine'],
|
|
457
|
+
'machineTypes': json['machineTypes'] == null ? undefined : ((json['machineTypes'] as Array<any>).map(LimitsFieldsMachineTypesInnerFromJSON)),
|
|
444
458
|
'giftLimit': json['giftLimit'] == null ? undefined : LimitsFieldsGiftLimitFromJSON(json['giftLimit']),
|
|
445
459
|
'billingStatus': json['billingStatus'],
|
|
446
460
|
'subscriptionStatus': json['subscriptionStatus'] == null ? undefined : json['subscriptionStatus'],
|
|
@@ -508,6 +522,7 @@ export function LimitsResponseToJSONTyped(value?: LimitsResponse | null, ignoreD
|
|
|
508
522
|
'last24hUsageSeconds': value['last24hUsageSeconds'],
|
|
509
523
|
'trialComputeCapSeconds': value['trialComputeCapSeconds'],
|
|
510
524
|
'trialLine': value['trialLine'],
|
|
525
|
+
'machineTypes': value['machineTypes'] == null ? undefined : ((value['machineTypes'] as Array<any>).map(LimitsFieldsMachineTypesInnerToJSON)),
|
|
511
526
|
'giftLimit': LimitsFieldsGiftLimitToJSON(value['giftLimit']),
|
|
512
527
|
'billingStatus': value['billingStatus'],
|
|
513
528
|
'subscriptionStatus': value['subscriptionStatus'],
|
package/src/models/Sandbox.ts
CHANGED
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
StopOperationToJSON,
|
|
28
28
|
StopOperationToJSONTyped,
|
|
29
29
|
} from './StopOperation';
|
|
30
|
+
import type { SandboxHydration } from './SandboxHydration';
|
|
31
|
+
import {
|
|
32
|
+
SandboxHydrationFromJSON,
|
|
33
|
+
SandboxHydrationFromJSONTyped,
|
|
34
|
+
SandboxHydrationToJSON,
|
|
35
|
+
SandboxHydrationToJSONTyped,
|
|
36
|
+
} from './SandboxHydration';
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
39
|
*
|
|
@@ -88,6 +95,12 @@ export interface Sandbox {
|
|
|
88
95
|
* @memberof Sandbox
|
|
89
96
|
*/
|
|
90
97
|
hydratedAt?: Date | null;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {SandboxHydration}
|
|
101
|
+
* @memberof Sandbox
|
|
102
|
+
*/
|
|
103
|
+
hydration?: SandboxHydration | null;
|
|
91
104
|
/**
|
|
92
105
|
* Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
|
|
93
106
|
* @type {SandboxTypeEnum}
|
|
@@ -149,11 +162,17 @@ export interface Sandbox {
|
|
|
149
162
|
*/
|
|
150
163
|
updatedAt?: Date | null;
|
|
151
164
|
/**
|
|
152
|
-
*
|
|
165
|
+
* When the sandbox stops by itself (the stop starts within about 5 seconds), or null when auto-stop is disabled. A sandbox whose agent is working gets a fresh full TTL, and this time moves forward.
|
|
153
166
|
* @type {Date}
|
|
154
167
|
* @memberof Sandbox
|
|
155
168
|
*/
|
|
156
169
|
archiveAfter?: Date | null;
|
|
170
|
+
/**
|
|
171
|
+
* The auto-stop length as last set on create, resume, fork or PATCH, or null when auto-stop is disabled.
|
|
172
|
+
* @type {number}
|
|
173
|
+
* @memberof Sandbox
|
|
174
|
+
*/
|
|
175
|
+
ttlSeconds?: number | null;
|
|
157
176
|
/**
|
|
158
177
|
*
|
|
159
178
|
* @type {boolean}
|
|
@@ -215,7 +234,7 @@ export interface Sandbox {
|
|
|
215
234
|
*/
|
|
216
235
|
createdById?: string | null;
|
|
217
236
|
/**
|
|
218
|
-
* What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that
|
|
237
|
+
* What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that never received their personal logins (`noEnv`, shared and restarted, or created on an environment that passes nothing), so you can open, run commands in, prompt, resume and stop it. `view`: a teammate's organization sandbox that still holds their personal logins, so you can see it and stop it until they share it (`POST /sandboxes/{sandboxId}/share`).
|
|
219
238
|
* @type {SandboxAccessEnum}
|
|
220
239
|
* @memberof Sandbox
|
|
221
240
|
*/
|
|
@@ -395,6 +414,7 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
395
414
|
'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
|
|
396
415
|
'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
|
|
397
416
|
'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
|
|
417
|
+
'hydration': json['hydration'] == null ? undefined : SandboxHydrationFromJSON(json['hydration']),
|
|
398
418
|
'type': json['type'] == null ? undefined : json['type'],
|
|
399
419
|
'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
|
|
400
420
|
'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
|
|
@@ -406,6 +426,7 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
406
426
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
407
427
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
408
428
|
'archiveAfter': json['archiveAfter'] == null ? undefined : (new Date(json['archiveAfter'])),
|
|
429
|
+
'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'],
|
|
409
430
|
'desktopAvailable': json['desktopAvailable'],
|
|
410
431
|
'desktopUrl': json['desktopUrl'] == null ? undefined : json['desktopUrl'],
|
|
411
432
|
'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
|
|
@@ -450,6 +471,7 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
450
471
|
'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
|
|
451
472
|
'hydrated': value['hydrated'],
|
|
452
473
|
'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
|
|
474
|
+
'hydration': SandboxHydrationToJSON(value['hydration']),
|
|
453
475
|
'type': value['type'],
|
|
454
476
|
'vcpu': value['vcpu'],
|
|
455
477
|
'memoryGB': value['memoryGB'],
|
|
@@ -461,6 +483,7 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
461
483
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
462
484
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
463
485
|
'archiveAfter': value['archiveAfter'] == null ? value['archiveAfter'] : value['archiveAfter'].toISOString(),
|
|
486
|
+
'ttlSeconds': value['ttlSeconds'],
|
|
464
487
|
'desktopAvailable': value['desktopAvailable'],
|
|
465
488
|
'desktopUrl': value['desktopUrl'],
|
|
466
489
|
'snapshots': value['snapshots'],
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Restore progress while `hydrated` is false, on GET /sandboxes/{id} only. Null in lists, after hydration, or when the sandbox does not answer within 1.5 s.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SandboxHydration
|
|
20
|
+
*/
|
|
21
|
+
export interface SandboxHydration {
|
|
22
|
+
/**
|
|
23
|
+
* Restore step: `dvol` (docker volumes), `sysdelta` (system files), `images` (saved docker images), `hydrating` (the home directory), `reconciling` (the last check). `degraded` and `stuck` mean a step failed and is retried.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SandboxHydration
|
|
26
|
+
*/
|
|
27
|
+
phase: string;
|
|
28
|
+
/**
|
|
29
|
+
* Files, directories and links copied in so far.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SandboxHydration
|
|
32
|
+
*/
|
|
33
|
+
entriesDone: number;
|
|
34
|
+
/**
|
|
35
|
+
* Files, directories and links this restore copies in. Null for the first seconds, until the system files are counted.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SandboxHydration
|
|
38
|
+
*/
|
|
39
|
+
entriesTotal: number | null;
|
|
40
|
+
/**
|
|
41
|
+
* entriesDone of entriesTotal, 0-99. Files you change during the restore are yours, not copied, so it can stop short of 99; `hydrated` is the end signal.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SandboxHydration
|
|
44
|
+
*/
|
|
45
|
+
percent: number | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the SandboxHydration interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfSandboxHydration(value: object): value is SandboxHydration {
|
|
52
|
+
if (!('phase' in value) || value['phase'] === undefined) return false;
|
|
53
|
+
if (!('entriesDone' in value) || value['entriesDone'] === undefined) return false;
|
|
54
|
+
if (!('entriesTotal' in value) || value['entriesTotal'] === undefined) return false;
|
|
55
|
+
if (!('percent' in value) || value['percent'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function SandboxHydrationFromJSON(json: any): SandboxHydration {
|
|
60
|
+
return SandboxHydrationFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function SandboxHydrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxHydration {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'phase': json['phase'],
|
|
70
|
+
'entriesDone': json['entriesDone'],
|
|
71
|
+
'entriesTotal': json['entriesTotal'],
|
|
72
|
+
'percent': json['percent'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function SandboxHydrationToJSON(json: any): SandboxHydration {
|
|
77
|
+
return SandboxHydrationToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SandboxHydrationToJSONTyped(value?: SandboxHydration | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'phase': value['phase'],
|
|
88
|
+
'entriesDone': value['entriesDone'],
|
|
89
|
+
'entriesTotal': value['entriesTotal'],
|
|
90
|
+
'percent': value['percent'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -25,6 +25,12 @@ export interface SetCredentialKeyRequest {
|
|
|
25
25
|
* @memberof SetCredentialKeyRequest
|
|
26
26
|
*/
|
|
27
27
|
value: string;
|
|
28
|
+
/**
|
|
29
|
+
* Keep the key this one replaces as another account of the credential, ready to switch back to.
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof SetCredentialKeyRequest
|
|
32
|
+
*/
|
|
33
|
+
keepCurrent?: boolean;
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
/**
|
|
@@ -46,6 +52,7 @@ export function SetCredentialKeyRequestFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
46
52
|
return {
|
|
47
53
|
|
|
48
54
|
'value': json['value'],
|
|
55
|
+
'keepCurrent': json['keepCurrent'] == null ? undefined : json['keepCurrent'],
|
|
49
56
|
};
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -61,6 +68,7 @@ export function SetCredentialKeyRequestToJSONTyped(value?: SetCredentialKeyReque
|
|
|
61
68
|
return {
|
|
62
69
|
|
|
63
70
|
'value': value['value'],
|
|
71
|
+
'keepCurrent': value['keepCurrent'],
|
|
64
72
|
};
|
|
65
73
|
}
|
|
66
74
|
|