@boatdev/sdk 1.9.7 → 1.9.9
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 +4 -0
- package/README.md +2 -2
- package/dist/apis/BoatApi.d.ts +2 -2
- package/dist/apis/BoatApi.js +2 -2
- package/dist/boat-helpers.d.ts +23 -0
- package/dist/boat-helpers.js +97 -0
- package/dist/esm/apis/BoatApi.d.ts +2 -2
- package/dist/esm/apis/BoatApi.js +2 -2
- package/dist/esm/boat-helpers.d.ts +23 -0
- package/dist/esm/boat-helpers.js +95 -0
- package/dist/esm/http2-fetch.js +17 -9
- package/dist/esm/models/CredentialProfile.d.ts +1 -1
- 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/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/http2-fetch.js +17 -9
- package/dist/models/CredentialProfile.d.ts +1 -1
- 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/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/BoatApi.md +1 -1
- 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/package.json +2 -2
- package/src/apis/BoatApi.ts +2 -2
- package/src/boat-helpers.ts +109 -0
- package/src/http2-fetch.ts +14 -4
- package/src/models/CredentialProfile.ts +1 -1
- 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/index.ts +2 -0
|
@@ -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
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -74,6 +74,7 @@ export * from './HostPortResponse';
|
|
|
74
74
|
export * from './LimitsFields';
|
|
75
75
|
export * from './LimitsFieldsCurrentLimits';
|
|
76
76
|
export * from './LimitsFieldsGiftLimit';
|
|
77
|
+
export * from './LimitsFieldsMachineTypesInner';
|
|
77
78
|
export * from './LimitsFieldsSandboxPlanTiersInner';
|
|
78
79
|
export * from './LimitsFieldsStartLimits';
|
|
79
80
|
export * from './LimitsFieldsStarts';
|
|
@@ -123,6 +124,7 @@ export * from './SandboxEnvironmentListResponse';
|
|
|
123
124
|
export * from './SandboxEnvironmentResponse';
|
|
124
125
|
export * from './SandboxEnvironmentVersionSummary';
|
|
125
126
|
export * from './SandboxEvent';
|
|
127
|
+
export * from './SandboxHydration';
|
|
126
128
|
export * from './SandboxInfoResponse';
|
|
127
129
|
export * from './SandboxListResponse';
|
|
128
130
|
export * from './SandboxProcess';
|