@boatdev/sdk 1.9.7 → 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.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +2 -2
  3. package/dist/apis/BoatApi.d.ts +2 -2
  4. package/dist/apis/BoatApi.js +2 -2
  5. package/dist/boat-helpers.d.ts +23 -0
  6. package/dist/boat-helpers.js +97 -0
  7. package/dist/esm/apis/BoatApi.d.ts +2 -2
  8. package/dist/esm/apis/BoatApi.js +2 -2
  9. package/dist/esm/boat-helpers.d.ts +23 -0
  10. package/dist/esm/boat-helpers.js +95 -0
  11. package/dist/esm/models/CredentialProfile.d.ts +1 -1
  12. package/dist/esm/models/DeletionOperation.d.ts +1 -3
  13. package/dist/esm/models/DeletionOperation.js +0 -2
  14. package/dist/esm/models/LimitsFields.d.ts +7 -0
  15. package/dist/esm/models/LimitsFields.js +3 -0
  16. package/dist/esm/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
  17. package/dist/esm/models/LimitsFieldsMachineTypesInner.js +60 -0
  18. package/dist/esm/models/LimitsResponse.d.ts +7 -0
  19. package/dist/esm/models/LimitsResponse.js +3 -0
  20. package/dist/esm/models/Sandbox.d.ts +15 -2
  21. package/dist/esm/models/Sandbox.js +5 -0
  22. package/dist/esm/models/SandboxHydration.d.ts +50 -0
  23. package/dist/esm/models/SandboxHydration.js +55 -0
  24. package/dist/esm/models/index.d.ts +2 -0
  25. package/dist/esm/models/index.js +2 -0
  26. package/dist/models/CredentialProfile.d.ts +1 -1
  27. package/dist/models/DeletionOperation.d.ts +1 -3
  28. package/dist/models/DeletionOperation.js +0 -2
  29. package/dist/models/LimitsFields.d.ts +7 -0
  30. package/dist/models/LimitsFields.js +3 -0
  31. package/dist/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
  32. package/dist/models/LimitsFieldsMachineTypesInner.js +68 -0
  33. package/dist/models/LimitsResponse.d.ts +7 -0
  34. package/dist/models/LimitsResponse.js +3 -0
  35. package/dist/models/Sandbox.d.ts +15 -2
  36. package/dist/models/Sandbox.js +5 -0
  37. package/dist/models/SandboxHydration.d.ts +50 -0
  38. package/dist/models/SandboxHydration.js +62 -0
  39. package/dist/models/index.d.ts +2 -0
  40. package/dist/models/index.js +2 -0
  41. package/docs/BoatApi.md +1 -1
  42. package/docs/LimitsFields.md +2 -0
  43. package/docs/LimitsFieldsMachineTypesInner.md +36 -0
  44. package/docs/LimitsResponse.md +2 -0
  45. package/docs/Sandbox.md +4 -0
  46. package/docs/SandboxHydration.md +39 -0
  47. package/package.json +2 -2
  48. package/src/apis/BoatApi.ts +2 -2
  49. package/src/boat-helpers.ts +109 -0
  50. package/src/models/CredentialProfile.ts +1 -1
  51. package/src/models/DeletionOperation.ts +1 -3
  52. package/src/models/LimitsFields.ts +15 -0
  53. package/src/models/LimitsFieldsMachineTypesInner.ts +97 -0
  54. package/src/models/LimitsResponse.ts +15 -0
  55. package/src/models/Sandbox.ts +25 -2
  56. package/src/models/SandboxHydration.ts +93 -0
  57. package/src/models/index.ts +2 -0
@@ -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
- * Automatic archival time, or null when auto-stop is disabled.
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 is `noEnv` (created with it, or shared and restarted), 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`).
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
+
@@ -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';