@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
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { SandboxTeam } from './SandboxTeam';
13
13
  import type { StopOperation } from './StopOperation';
14
+ import type { SandboxHydration } from './SandboxHydration';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -71,6 +72,12 @@ export interface Sandbox {
71
72
  * @memberof Sandbox
72
73
  */
73
74
  hydratedAt?: Date | null;
75
+ /**
76
+ *
77
+ * @type {SandboxHydration}
78
+ * @memberof Sandbox
79
+ */
80
+ hydration?: SandboxHydration | null;
74
81
  /**
75
82
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
76
83
  * @type {SandboxTypeEnum}
@@ -132,11 +139,17 @@ export interface Sandbox {
132
139
  */
133
140
  updatedAt?: Date | null;
134
141
  /**
135
- * Automatic archival time, or null when auto-stop is disabled.
142
+ * 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.
136
143
  * @type {Date}
137
144
  * @memberof Sandbox
138
145
  */
139
146
  archiveAfter?: Date | null;
147
+ /**
148
+ * The auto-stop length as last set on create, resume, fork or PATCH, or null when auto-stop is disabled.
149
+ * @type {number}
150
+ * @memberof Sandbox
151
+ */
152
+ ttlSeconds?: number | null;
140
153
  /**
141
154
  *
142
155
  * @type {boolean}
@@ -198,7 +211,7 @@ export interface Sandbox {
198
211
  */
199
212
  createdById?: string | null;
200
213
  /**
201
- * 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`).
214
+ * 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`).
202
215
  * @type {SandboxAccessEnum}
203
216
  * @memberof Sandbox
204
217
  */
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { SandboxTeamFromJSON, SandboxTeamToJSON, } from './SandboxTeam';
15
15
  import { StopOperationFromJSON, StopOperationToJSON, } from './StopOperation';
16
+ import { SandboxHydrationFromJSON, SandboxHydrationToJSON, } from './SandboxHydration';
16
17
  /**
17
18
  * @export
18
19
  */
@@ -112,6 +113,7 @@ export function SandboxFromJSONTyped(json, ignoreDiscriminator) {
112
113
  'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
113
114
  'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
114
115
  'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
116
+ 'hydration': json['hydration'] == null ? undefined : SandboxHydrationFromJSON(json['hydration']),
115
117
  'type': json['type'] == null ? undefined : json['type'],
116
118
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
117
119
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -123,6 +125,7 @@ export function SandboxFromJSONTyped(json, ignoreDiscriminator) {
123
125
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
124
126
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
125
127
  'archiveAfter': json['archiveAfter'] == null ? undefined : (new Date(json['archiveAfter'])),
128
+ 'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'],
126
129
  'desktopAvailable': json['desktopAvailable'],
127
130
  'desktopUrl': json['desktopUrl'] == null ? undefined : json['desktopUrl'],
128
131
  'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
@@ -163,6 +166,7 @@ export function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
163
166
  'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
164
167
  'hydrated': value['hydrated'],
165
168
  'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
169
+ 'hydration': SandboxHydrationToJSON(value['hydration']),
166
170
  'type': value['type'],
167
171
  'vcpu': value['vcpu'],
168
172
  'memoryGB': value['memoryGB'],
@@ -174,6 +178,7 @@ export function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
174
178
  'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
175
179
  'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
176
180
  'archiveAfter': value['archiveAfter'] == null ? value['archiveAfter'] : value['archiveAfter'].toISOString(),
181
+ 'ttlSeconds': value['ttlSeconds'],
177
182
  'desktopAvailable': value['desktopAvailable'],
178
183
  'desktopUrl': value['desktopUrl'],
179
184
  'snapshots': value['snapshots'],
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * 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.
14
+ * @export
15
+ * @interface SandboxHydration
16
+ */
17
+ export interface SandboxHydration {
18
+ /**
19
+ * 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.
20
+ * @type {string}
21
+ * @memberof SandboxHydration
22
+ */
23
+ phase: string;
24
+ /**
25
+ * Files, directories and links copied in so far.
26
+ * @type {number}
27
+ * @memberof SandboxHydration
28
+ */
29
+ entriesDone: number;
30
+ /**
31
+ * Files, directories and links this restore copies in. Null for the first seconds, until the system files are counted.
32
+ * @type {number}
33
+ * @memberof SandboxHydration
34
+ */
35
+ entriesTotal: number | null;
36
+ /**
37
+ * 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.
38
+ * @type {number}
39
+ * @memberof SandboxHydration
40
+ */
41
+ percent: number | null;
42
+ }
43
+ /**
44
+ * Check if a given object implements the SandboxHydration interface.
45
+ */
46
+ export declare function instanceOfSandboxHydration(value: object): value is SandboxHydration;
47
+ export declare function SandboxHydrationFromJSON(json: any): SandboxHydration;
48
+ export declare function SandboxHydrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxHydration;
49
+ export declare function SandboxHydrationToJSON(json: any): SandboxHydration;
50
+ export declare function SandboxHydrationToJSONTyped(value?: SandboxHydration | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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
+ * Check if a given object implements the SandboxHydration interface.
16
+ */
17
+ export function instanceOfSandboxHydration(value) {
18
+ if (!('phase' in value) || value['phase'] === undefined)
19
+ return false;
20
+ if (!('entriesDone' in value) || value['entriesDone'] === undefined)
21
+ return false;
22
+ if (!('entriesTotal' in value) || value['entriesTotal'] === undefined)
23
+ return false;
24
+ if (!('percent' in value) || value['percent'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function SandboxHydrationFromJSON(json) {
29
+ return SandboxHydrationFromJSONTyped(json, false);
30
+ }
31
+ export function SandboxHydrationFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'phase': json['phase'],
37
+ 'entriesDone': json['entriesDone'],
38
+ 'entriesTotal': json['entriesTotal'],
39
+ 'percent': json['percent'],
40
+ };
41
+ }
42
+ export function SandboxHydrationToJSON(json) {
43
+ return SandboxHydrationToJSONTyped(json, false);
44
+ }
45
+ export function SandboxHydrationToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'phase': value['phase'],
51
+ 'entriesDone': value['entriesDone'],
52
+ 'entriesTotal': value['entriesTotal'],
53
+ 'percent': value['percent'],
54
+ };
55
+ }
@@ -72,6 +72,7 @@ export * from './HostPortResponse';
72
72
  export * from './LimitsFields';
73
73
  export * from './LimitsFieldsCurrentLimits';
74
74
  export * from './LimitsFieldsGiftLimit';
75
+ export * from './LimitsFieldsMachineTypesInner';
75
76
  export * from './LimitsFieldsSandboxPlanTiersInner';
76
77
  export * from './LimitsFieldsStartLimits';
77
78
  export * from './LimitsFieldsStarts';
@@ -121,6 +122,7 @@ export * from './SandboxEnvironmentListResponse';
121
122
  export * from './SandboxEnvironmentResponse';
122
123
  export * from './SandboxEnvironmentVersionSummary';
123
124
  export * from './SandboxEvent';
125
+ export * from './SandboxHydration';
124
126
  export * from './SandboxInfoResponse';
125
127
  export * from './SandboxListResponse';
126
128
  export * from './SandboxProcess';
@@ -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';
@@ -55,7 +55,7 @@ export interface CredentialProfile {
55
55
  */
56
56
  connected: Array<CredentialId>;
57
57
  /**
58
- * Credentials with several accounts, keyed by credential id. Each lists every account (labels only), the one in use marked `active`.
58
+ * 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.
59
59
  * @type {{ [key: string]: Array<CredentialAccount>; }}
60
60
  * @memberof CredentialProfile
61
61
  */
@@ -46,7 +46,7 @@ export interface DeletionOperation {
46
46
  */
47
47
  status: DeletionOperationStatusEnum;
48
48
  /**
49
- * 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, or a sandbox forked or deployed from it, still builds on this data; it goes when they go. `waiting_for_restore`: a sandbox is still restoring from it. `retrying`: a transient fault, retried automatically.
49
+ * 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.
50
50
  * @type {DeletionOperationStageEnum}
51
51
  * @memberof DeletionOperation
52
52
  */
@@ -109,8 +109,6 @@ export type DeletionOperationStatusEnum = typeof DeletionOperationStatusEnum[key
109
109
  export declare const DeletionOperationStageEnum: {
110
110
  readonly Removing: 'removing';
111
111
  readonly WaitingForUploads: 'waiting_for_uploads';
112
- readonly KeptForNewerSnapshots: 'kept_for_newer_snapshots';
113
- readonly WaitingForRestore: 'waiting_for_restore';
114
112
  readonly Retrying: 'retrying';
115
113
  readonly Completed: 'completed';
116
114
  };
@@ -49,8 +49,6 @@ exports.DeletionOperationStatusEnum = {
49
49
  exports.DeletionOperationStageEnum = {
50
50
  Removing: 'removing',
51
51
  WaitingForUploads: 'waiting_for_uploads',
52
- KeptForNewerSnapshots: 'kept_for_newer_snapshots',
53
- WaitingForRestore: 'waiting_for_restore',
54
52
  Retrying: 'retrying',
55
53
  Completed: 'completed'
56
54
  };
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { LimitsFieldsGiftLimit } from './LimitsFieldsGiftLimit';
13
13
  import type { LimitsFieldsCurrentLimits } from './LimitsFieldsCurrentLimits';
14
+ import type { LimitsFieldsMachineTypesInner } from './LimitsFieldsMachineTypesInner';
14
15
  import type { LimitsFieldsStartLimits } from './LimitsFieldsStartLimits';
15
16
  import type { LimitsFieldsStarts } from './LimitsFieldsStarts';
16
17
  import type { LimitsFieldsSandboxPlanTiersInner } from './LimitsFieldsSandboxPlanTiersInner';
@@ -271,6 +272,12 @@ export interface LimitsFields {
271
272
  * @memberof LimitsFields
272
273
  */
273
274
  trialLine?: string | null;
275
+ /**
276
+ * Each sandbox type, and whether this account can create it now. A blocked type carries the reason.
277
+ * @type {Array<LimitsFieldsMachineTypesInner>}
278
+ * @memberof LimitsFields
279
+ */
280
+ machineTypes?: Array<LimitsFieldsMachineTypesInner>;
274
281
  /**
275
282
  *
276
283
  * @type {LimitsFieldsGiftLimit}
@@ -20,6 +20,7 @@ exports.LimitsFieldsToJSON = LimitsFieldsToJSON;
20
20
  exports.LimitsFieldsToJSONTyped = LimitsFieldsToJSONTyped;
21
21
  const LimitsFieldsGiftLimit_1 = require("./LimitsFieldsGiftLimit");
22
22
  const LimitsFieldsCurrentLimits_1 = require("./LimitsFieldsCurrentLimits");
23
+ const LimitsFieldsMachineTypesInner_1 = require("./LimitsFieldsMachineTypesInner");
23
24
  const LimitsFieldsStartLimits_1 = require("./LimitsFieldsStartLimits");
24
25
  const LimitsFieldsStarts_1 = require("./LimitsFieldsStarts");
25
26
  const LimitsFieldsSandboxPlanTiersInner_1 = require("./LimitsFieldsSandboxPlanTiersInner");
@@ -87,6 +88,7 @@ function LimitsFieldsFromJSONTyped(json, ignoreDiscriminator) {
87
88
  'last24hUsageSeconds': json['last24hUsageSeconds'] == null ? undefined : json['last24hUsageSeconds'],
88
89
  'trialComputeCapSeconds': json['trialComputeCapSeconds'] == null ? undefined : json['trialComputeCapSeconds'],
89
90
  'trialLine': json['trialLine'] == null ? undefined : json['trialLine'],
91
+ 'machineTypes': json['machineTypes'] == null ? undefined : (json['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerFromJSON)),
90
92
  'giftLimit': json['giftLimit'] == null ? undefined : (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitFromJSON)(json['giftLimit']),
91
93
  'billingStatus': json['billingStatus'],
92
94
  'subscriptionStatus': json['subscriptionStatus'] == null ? undefined : json['subscriptionStatus'],
@@ -149,6 +151,7 @@ function LimitsFieldsToJSONTyped(value, ignoreDiscriminator = false) {
149
151
  'last24hUsageSeconds': value['last24hUsageSeconds'],
150
152
  'trialComputeCapSeconds': value['trialComputeCapSeconds'],
151
153
  'trialLine': value['trialLine'],
154
+ 'machineTypes': value['machineTypes'] == null ? undefined : (value['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerToJSON)),
152
155
  'giftLimit': (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitToJSON)(value['giftLimit']),
153
156
  'billingStatus': value['billingStatus'],
154
157
  'subscriptionStatus': value['subscriptionStatus'],
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface LimitsFieldsMachineTypesInner
16
+ */
17
+ export interface LimitsFieldsMachineTypesInner {
18
+ /**
19
+ *
20
+ * @type {LimitsFieldsMachineTypesInnerTypeEnum}
21
+ * @memberof LimitsFieldsMachineTypesInner
22
+ */
23
+ type: LimitsFieldsMachineTypesInnerTypeEnum;
24
+ /**
25
+ *
26
+ * @type {boolean}
27
+ * @memberof LimitsFieldsMachineTypesInner
28
+ */
29
+ available: boolean;
30
+ /**
31
+ * Why the type is blocked, for example `not during the free trial; the first payment unlocks it`. Null when available.
32
+ * @type {string}
33
+ * @memberof LimitsFieldsMachineTypesInner
34
+ */
35
+ reason: string | null;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const LimitsFieldsMachineTypesInnerTypeEnum: {
41
+ readonly Small: 'small';
42
+ readonly Default: 'default';
43
+ readonly Large: 'large';
44
+ readonly Xlarge: 'xlarge';
45
+ };
46
+ export type LimitsFieldsMachineTypesInnerTypeEnum = typeof LimitsFieldsMachineTypesInnerTypeEnum[keyof typeof LimitsFieldsMachineTypesInnerTypeEnum];
47
+ /**
48
+ * Check if a given object implements the LimitsFieldsMachineTypesInner interface.
49
+ */
50
+ export declare function instanceOfLimitsFieldsMachineTypesInner(value: object): value is LimitsFieldsMachineTypesInner;
51
+ export declare function LimitsFieldsMachineTypesInnerFromJSON(json: any): LimitsFieldsMachineTypesInner;
52
+ export declare function LimitsFieldsMachineTypesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): LimitsFieldsMachineTypesInner;
53
+ export declare function LimitsFieldsMachineTypesInnerToJSON(json: any): LimitsFieldsMachineTypesInner;
54
+ export declare function LimitsFieldsMachineTypesInnerToJSONTyped(value?: LimitsFieldsMachineTypesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Boat Public API v1
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LimitsFieldsMachineTypesInnerTypeEnum = void 0;
17
+ exports.instanceOfLimitsFieldsMachineTypesInner = instanceOfLimitsFieldsMachineTypesInner;
18
+ exports.LimitsFieldsMachineTypesInnerFromJSON = LimitsFieldsMachineTypesInnerFromJSON;
19
+ exports.LimitsFieldsMachineTypesInnerFromJSONTyped = LimitsFieldsMachineTypesInnerFromJSONTyped;
20
+ exports.LimitsFieldsMachineTypesInnerToJSON = LimitsFieldsMachineTypesInnerToJSON;
21
+ exports.LimitsFieldsMachineTypesInnerToJSONTyped = LimitsFieldsMachineTypesInnerToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.LimitsFieldsMachineTypesInnerTypeEnum = {
26
+ Small: 'small',
27
+ Default: 'default',
28
+ Large: 'large',
29
+ Xlarge: 'xlarge'
30
+ };
31
+ /**
32
+ * Check if a given object implements the LimitsFieldsMachineTypesInner interface.
33
+ */
34
+ function instanceOfLimitsFieldsMachineTypesInner(value) {
35
+ if (!('type' in value) || value['type'] === undefined)
36
+ return false;
37
+ if (!('available' in value) || value['available'] === undefined)
38
+ return false;
39
+ if (!('reason' in value) || value['reason'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function LimitsFieldsMachineTypesInnerFromJSON(json) {
44
+ return LimitsFieldsMachineTypesInnerFromJSONTyped(json, false);
45
+ }
46
+ function LimitsFieldsMachineTypesInnerFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'type': json['type'],
52
+ 'available': json['available'],
53
+ 'reason': json['reason'],
54
+ };
55
+ }
56
+ function LimitsFieldsMachineTypesInnerToJSON(json) {
57
+ return LimitsFieldsMachineTypesInnerToJSONTyped(json, false);
58
+ }
59
+ function LimitsFieldsMachineTypesInnerToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'type': value['type'],
65
+ 'available': value['available'],
66
+ 'reason': value['reason'],
67
+ };
68
+ }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { LimitsFieldsGiftLimit } from './LimitsFieldsGiftLimit';
13
13
  import type { LimitsFieldsCurrentLimits } from './LimitsFieldsCurrentLimits';
14
+ import type { LimitsFieldsMachineTypesInner } from './LimitsFieldsMachineTypesInner';
14
15
  import type { LimitsFieldsStartLimits } from './LimitsFieldsStartLimits';
15
16
  import type { LimitsFieldsStarts } from './LimitsFieldsStarts';
16
17
  import type { LimitsFieldsSandboxPlanTiersInner } from './LimitsFieldsSandboxPlanTiersInner';
@@ -282,6 +283,12 @@ export interface LimitsResponse {
282
283
  * @memberof LimitsResponse
283
284
  */
284
285
  trialLine?: string;
286
+ /**
287
+ * Each sandbox type, and whether this account can create it now. A blocked type carries the reason.
288
+ * @type {Array<LimitsFieldsMachineTypesInner>}
289
+ * @memberof LimitsResponse
290
+ */
291
+ machineTypes?: Array<LimitsFieldsMachineTypesInner>;
285
292
  /**
286
293
  *
287
294
  * @type {LimitsFieldsGiftLimit}
@@ -20,6 +20,7 @@ exports.LimitsResponseToJSON = LimitsResponseToJSON;
20
20
  exports.LimitsResponseToJSONTyped = LimitsResponseToJSONTyped;
21
21
  const LimitsFieldsGiftLimit_1 = require("./LimitsFieldsGiftLimit");
22
22
  const LimitsFieldsCurrentLimits_1 = require("./LimitsFieldsCurrentLimits");
23
+ const LimitsFieldsMachineTypesInner_1 = require("./LimitsFieldsMachineTypesInner");
23
24
  const LimitsFieldsStartLimits_1 = require("./LimitsFieldsStartLimits");
24
25
  const LimitsFieldsStarts_1 = require("./LimitsFieldsStarts");
25
26
  const LimitsFieldsSandboxPlanTiersInner_1 = require("./LimitsFieldsSandboxPlanTiersInner");
@@ -92,6 +93,7 @@ function LimitsResponseFromJSONTyped(json, ignoreDiscriminator) {
92
93
  'last24hUsageSeconds': json['last24hUsageSeconds'] == null ? undefined : json['last24hUsageSeconds'],
93
94
  'trialComputeCapSeconds': json['trialComputeCapSeconds'] == null ? undefined : json['trialComputeCapSeconds'],
94
95
  'trialLine': json['trialLine'] == null ? undefined : json['trialLine'],
96
+ 'machineTypes': json['machineTypes'] == null ? undefined : (json['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerFromJSON)),
95
97
  'giftLimit': json['giftLimit'] == null ? undefined : (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitFromJSON)(json['giftLimit']),
96
98
  'billingStatus': json['billingStatus'],
97
99
  'subscriptionStatus': json['subscriptionStatus'] == null ? undefined : json['subscriptionStatus'],
@@ -155,6 +157,7 @@ function LimitsResponseToJSONTyped(value, ignoreDiscriminator = false) {
155
157
  'last24hUsageSeconds': value['last24hUsageSeconds'],
156
158
  'trialComputeCapSeconds': value['trialComputeCapSeconds'],
157
159
  'trialLine': value['trialLine'],
160
+ 'machineTypes': value['machineTypes'] == null ? undefined : (value['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerToJSON)),
158
161
  'giftLimit': (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitToJSON)(value['giftLimit']),
159
162
  'billingStatus': value['billingStatus'],
160
163
  'subscriptionStatus': value['subscriptionStatus'],
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { SandboxTeam } from './SandboxTeam';
13
13
  import type { StopOperation } from './StopOperation';
14
+ import type { SandboxHydration } from './SandboxHydration';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -71,6 +72,12 @@ export interface Sandbox {
71
72
  * @memberof Sandbox
72
73
  */
73
74
  hydratedAt?: Date | null;
75
+ /**
76
+ *
77
+ * @type {SandboxHydration}
78
+ * @memberof Sandbox
79
+ */
80
+ hydration?: SandboxHydration | null;
74
81
  /**
75
82
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
76
83
  * @type {SandboxTypeEnum}
@@ -132,11 +139,17 @@ export interface Sandbox {
132
139
  */
133
140
  updatedAt?: Date | null;
134
141
  /**
135
- * Automatic archival time, or null when auto-stop is disabled.
142
+ * 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.
136
143
  * @type {Date}
137
144
  * @memberof Sandbox
138
145
  */
139
146
  archiveAfter?: Date | null;
147
+ /**
148
+ * The auto-stop length as last set on create, resume, fork or PATCH, or null when auto-stop is disabled.
149
+ * @type {number}
150
+ * @memberof Sandbox
151
+ */
152
+ ttlSeconds?: number | null;
140
153
  /**
141
154
  *
142
155
  * @type {boolean}
@@ -198,7 +211,7 @@ export interface Sandbox {
198
211
  */
199
212
  createdById?: string | null;
200
213
  /**
201
- * 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`).
214
+ * 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`).
202
215
  * @type {SandboxAccessEnum}
203
216
  * @memberof Sandbox
204
217
  */
@@ -21,6 +21,7 @@ exports.SandboxToJSON = SandboxToJSON;
21
21
  exports.SandboxToJSONTyped = SandboxToJSONTyped;
22
22
  const SandboxTeam_1 = require("./SandboxTeam");
23
23
  const StopOperation_1 = require("./StopOperation");
24
+ const SandboxHydration_1 = require("./SandboxHydration");
24
25
  /**
25
26
  * @export
26
27
  */
@@ -120,6 +121,7 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
120
121
  'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
121
122
  'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
122
123
  'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
124
+ 'hydration': json['hydration'] == null ? undefined : (0, SandboxHydration_1.SandboxHydrationFromJSON)(json['hydration']),
123
125
  'type': json['type'] == null ? undefined : json['type'],
124
126
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
125
127
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -131,6 +133,7 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
131
133
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
132
134
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
133
135
  'archiveAfter': json['archiveAfter'] == null ? undefined : (new Date(json['archiveAfter'])),
136
+ 'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'],
134
137
  'desktopAvailable': json['desktopAvailable'],
135
138
  'desktopUrl': json['desktopUrl'] == null ? undefined : json['desktopUrl'],
136
139
  'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
@@ -171,6 +174,7 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
171
174
  'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
172
175
  'hydrated': value['hydrated'],
173
176
  'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
177
+ 'hydration': (0, SandboxHydration_1.SandboxHydrationToJSON)(value['hydration']),
174
178
  'type': value['type'],
175
179
  'vcpu': value['vcpu'],
176
180
  'memoryGB': value['memoryGB'],
@@ -182,6 +186,7 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
182
186
  'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
183
187
  'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
184
188
  'archiveAfter': value['archiveAfter'] == null ? value['archiveAfter'] : value['archiveAfter'].toISOString(),
189
+ 'ttlSeconds': value['ttlSeconds'],
185
190
  'desktopAvailable': value['desktopAvailable'],
186
191
  'desktopUrl': value['desktopUrl'],
187
192
  'snapshots': value['snapshots'],
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * 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.
14
+ * @export
15
+ * @interface SandboxHydration
16
+ */
17
+ export interface SandboxHydration {
18
+ /**
19
+ * 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.
20
+ * @type {string}
21
+ * @memberof SandboxHydration
22
+ */
23
+ phase: string;
24
+ /**
25
+ * Files, directories and links copied in so far.
26
+ * @type {number}
27
+ * @memberof SandboxHydration
28
+ */
29
+ entriesDone: number;
30
+ /**
31
+ * Files, directories and links this restore copies in. Null for the first seconds, until the system files are counted.
32
+ * @type {number}
33
+ * @memberof SandboxHydration
34
+ */
35
+ entriesTotal: number | null;
36
+ /**
37
+ * 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.
38
+ * @type {number}
39
+ * @memberof SandboxHydration
40
+ */
41
+ percent: number | null;
42
+ }
43
+ /**
44
+ * Check if a given object implements the SandboxHydration interface.
45
+ */
46
+ export declare function instanceOfSandboxHydration(value: object): value is SandboxHydration;
47
+ export declare function SandboxHydrationFromJSON(json: any): SandboxHydration;
48
+ export declare function SandboxHydrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxHydration;
49
+ export declare function SandboxHydrationToJSON(json: any): SandboxHydration;
50
+ export declare function SandboxHydrationToJSONTyped(value?: SandboxHydration | null, ignoreDiscriminator?: boolean): any;