@boatdev/sdk 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/dist/apis/BoatApi.d.ts +47 -4
- package/dist/apis/BoatApi.js +100 -4
- package/dist/esm/apis/BoatApi.d.ts +47 -4
- package/dist/esm/apis/BoatApi.js +100 -4
- package/dist/esm/http2-fetch.d.ts +1 -0
- package/dist/esm/http2-fetch.js +203 -0
- package/dist/esm/models/Conversation.d.ts +1 -1
- package/dist/esm/models/CreateSandboxRequest.d.ts +3 -2
- package/dist/esm/models/CreateSandboxRequest.js +2 -1
- package/dist/esm/models/ForkRequest.d.ts +2 -1
- package/dist/esm/models/ForkRequest.js +2 -1
- package/dist/esm/models/PromptRequest.d.ts +2 -1
- package/dist/esm/models/PromptRequest.js +2 -1
- package/dist/esm/models/Recover200Response.d.ts +57 -0
- package/dist/esm/models/Recover200Response.js +53 -0
- package/dist/esm/models/ResumeRequest.d.ts +2 -1
- package/dist/esm/models/ResumeRequest.js +2 -1
- package/dist/esm/models/Sandbox.d.ts +21 -1
- package/dist/esm/models/Sandbox.js +9 -1
- package/dist/esm/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/esm/models/SandboxUsageResponse.js +2 -1
- package/dist/esm/models/StopOperation.d.ts +72 -0
- package/dist/esm/models/StopOperation.js +72 -0
- package/dist/esm/models/StopOperationResponse.d.ts +58 -0
- package/dist/esm/models/StopOperationResponse.js +62 -0
- package/dist/esm/models/StopRequest.d.ts +1 -1
- package/dist/esm/models/UpdateSandboxRequest.d.ts +1 -1
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/esm/runtime.js +2 -1
- package/dist/http2-fetch.d.ts +1 -0
- package/dist/http2-fetch.js +239 -0
- package/dist/models/Conversation.d.ts +1 -1
- package/dist/models/CreateSandboxRequest.d.ts +3 -2
- package/dist/models/CreateSandboxRequest.js +2 -1
- package/dist/models/ForkRequest.d.ts +2 -1
- package/dist/models/ForkRequest.js +2 -1
- package/dist/models/PromptRequest.d.ts +2 -1
- package/dist/models/PromptRequest.js +2 -1
- package/dist/models/Recover200Response.d.ts +57 -0
- package/dist/models/Recover200Response.js +61 -0
- package/dist/models/ResumeRequest.d.ts +2 -1
- package/dist/models/ResumeRequest.js +2 -1
- package/dist/models/Sandbox.d.ts +21 -1
- package/dist/models/Sandbox.js +9 -1
- package/dist/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/models/SandboxUsageResponse.js +2 -1
- package/dist/models/StopOperation.d.ts +72 -0
- package/dist/models/StopOperation.js +80 -0
- package/dist/models/StopOperationResponse.d.ts +58 -0
- package/dist/models/StopOperationResponse.js +70 -0
- package/dist/models/StopRequest.d.ts +1 -1
- package/dist/models/UpdateSandboxRequest.d.ts +1 -1
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/runtime.js +9 -8
- package/docs/BoatApi.md +160 -2
- package/docs/PromptRequest.md +1 -1
- package/docs/Recover200Response.md +38 -0
- package/docs/Sandbox.md +6 -0
- package/docs/StopOperation.md +42 -0
- package/docs/StopOperationResponse.md +38 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +147 -4
- package/src/http2-fetch.ts +179 -0
- package/src/models/Conversation.ts +1 -1
- package/src/models/CreateSandboxRequest.ts +4 -3
- package/src/models/ForkRequest.ts +3 -2
- package/src/models/PromptRequest.ts +3 -2
- package/src/models/Recover200Response.ts +99 -0
- package/src/models/ResumeRequest.ts +3 -2
- package/src/models/Sandbox.ts +34 -2
- package/src/models/SandboxUsageResponse.ts +3 -2
- package/src/models/StopOperation.ts +124 -0
- package/src/models/StopOperationResponse.ts +111 -0
- package/src/models/StopRequest.ts +1 -1
- package/src/models/UpdateSandboxRequest.ts +1 -1
- package/src/models/index.ts +3 -0
- package/src/runtime.ts +2 -1
|
@@ -0,0 +1,99 @@
|
|
|
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 Recover200Response
|
|
20
|
+
*/
|
|
21
|
+
export interface Recover200Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof Recover200Response
|
|
26
|
+
*/
|
|
27
|
+
ok?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Recover200Response
|
|
32
|
+
*/
|
|
33
|
+
type?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Recover200ResponseStatusEnum}
|
|
37
|
+
* @memberof Recover200Response
|
|
38
|
+
*/
|
|
39
|
+
status?: Recover200ResponseStatusEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Recover200Response
|
|
44
|
+
*/
|
|
45
|
+
message?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const Recover200ResponseStatusEnum = {
|
|
53
|
+
Recovering: 'recovering'
|
|
54
|
+
} as const;
|
|
55
|
+
export type Recover200ResponseStatusEnum = typeof Recover200ResponseStatusEnum[keyof typeof Recover200ResponseStatusEnum];
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the Recover200Response interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfRecover200Response(value: object): value is Recover200Response {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function Recover200ResponseFromJSON(json: any): Recover200Response {
|
|
66
|
+
return Recover200ResponseFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function Recover200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Recover200Response {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'ok': json['ok'] == null ? undefined : json['ok'],
|
|
76
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
77
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
78
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function Recover200ResponseToJSON(json: any): Recover200Response {
|
|
83
|
+
return Recover200ResponseToJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function Recover200ResponseToJSONTyped(value?: Recover200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
87
|
+
if (value == null) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'ok': value['ok'],
|
|
94
|
+
'type': value['type'],
|
|
95
|
+
'status': value['status'],
|
|
96
|
+
'message': value['message'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -26,7 +26,7 @@ export interface ResumeRequest {
|
|
|
26
26
|
*/
|
|
27
27
|
failFast?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Resume onto a different machine size. Omit to keep the sandbox's current type. A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
|
|
29
|
+
* Resume onto a different machine size. Omit to keep the sandbox's current type. `xlarge` needs the $100/month plan or higher (403 `machine_class_plan_required`). A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
|
|
30
30
|
* @type {ResumeRequestTypeEnum}
|
|
31
31
|
* @memberof ResumeRequest
|
|
32
32
|
*/
|
|
@@ -64,7 +64,8 @@ export interface ResumeRequest {
|
|
|
64
64
|
export const ResumeRequestTypeEnum = {
|
|
65
65
|
Small: 'small',
|
|
66
66
|
Default: 'default',
|
|
67
|
-
Large: 'large'
|
|
67
|
+
Large: 'large',
|
|
68
|
+
Xlarge: 'xlarge'
|
|
68
69
|
} as const;
|
|
69
70
|
export type ResumeRequestTypeEnum = typeof ResumeRequestTypeEnum[keyof typeof ResumeRequestTypeEnum];
|
|
70
71
|
|
package/src/models/Sandbox.ts
CHANGED
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
SandboxTeamToJSON,
|
|
21
21
|
SandboxTeamToJSONTyped,
|
|
22
22
|
} from './SandboxTeam';
|
|
23
|
+
import type { StopOperation } from './StopOperation';
|
|
24
|
+
import {
|
|
25
|
+
StopOperationFromJSON,
|
|
26
|
+
StopOperationFromJSONTyped,
|
|
27
|
+
StopOperationToJSON,
|
|
28
|
+
StopOperationToJSONTyped,
|
|
29
|
+
} from './StopOperation';
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
*
|
|
@@ -69,6 +76,18 @@ export interface Sandbox {
|
|
|
69
76
|
* @memberof Sandbox
|
|
70
77
|
*/
|
|
71
78
|
degradedSince?: Date | null;
|
|
79
|
+
/**
|
|
80
|
+
* True once every file of the sandbox's snapshot is on its disk. A resumed or forked sandbox is usable before that: its files keep copying in the background, and its docker volumes move onto the real disk near the end. Its docker containers start earlier; at that point their volume mounts move onto the real disk in place, without a restart. The `sandbox.hydrated` webhook fires at the same moment this turns true. A sandbox that restored nothing is hydrated from the start.
|
|
81
|
+
* @type {boolean}
|
|
82
|
+
* @memberof Sandbox
|
|
83
|
+
*/
|
|
84
|
+
hydrated?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* When the last resume or fork finished copying files in, or null.
|
|
87
|
+
* @type {Date}
|
|
88
|
+
* @memberof Sandbox
|
|
89
|
+
*/
|
|
90
|
+
hydratedAt?: Date | null;
|
|
72
91
|
/**
|
|
73
92
|
* Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
|
|
74
93
|
* @type {SandboxTypeEnum}
|
|
@@ -88,7 +107,7 @@ export interface Sandbox {
|
|
|
88
107
|
*/
|
|
89
108
|
memoryGB?: number;
|
|
90
109
|
/**
|
|
91
|
-
* Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, and
|
|
110
|
+
* Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, 2 for `large`, and 50/9 (about 5.56) for `xlarge`.
|
|
92
111
|
* @type {number}
|
|
93
112
|
* @memberof Sandbox
|
|
94
113
|
*/
|
|
@@ -249,6 +268,12 @@ export interface Sandbox {
|
|
|
249
268
|
* @memberof Sandbox
|
|
250
269
|
*/
|
|
251
270
|
environmentVersion?: number | null;
|
|
271
|
+
/**
|
|
272
|
+
* The last stop you requested (`POST /sandboxes/{sandboxId}/stop`), or null if you never stopped this sandbox.
|
|
273
|
+
* @type {StopOperation}
|
|
274
|
+
* @memberof Sandbox
|
|
275
|
+
*/
|
|
276
|
+
stop?: StopOperation | null;
|
|
252
277
|
}
|
|
253
278
|
|
|
254
279
|
|
|
@@ -285,7 +310,8 @@ export type SandboxHealthEnum = typeof SandboxHealthEnum[keyof typeof SandboxHea
|
|
|
285
310
|
export const SandboxTypeEnum = {
|
|
286
311
|
Small: 'small',
|
|
287
312
|
Default: 'default',
|
|
288
|
-
Large: 'large'
|
|
313
|
+
Large: 'large',
|
|
314
|
+
Xlarge: 'xlarge'
|
|
289
315
|
} as const;
|
|
290
316
|
export type SandboxTypeEnum = typeof SandboxTypeEnum[keyof typeof SandboxTypeEnum];
|
|
291
317
|
|
|
@@ -361,6 +387,8 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
361
387
|
'health': json['health'] == null ? undefined : json['health'],
|
|
362
388
|
'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
|
|
363
389
|
'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
|
|
390
|
+
'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
|
|
391
|
+
'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
|
|
364
392
|
'type': json['type'] == null ? undefined : json['type'],
|
|
365
393
|
'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
|
|
366
394
|
'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
|
|
@@ -391,6 +419,7 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
391
419
|
'setupError': json['setupError'] == null ? undefined : json['setupError'],
|
|
392
420
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
393
421
|
'environmentVersion': json['environmentVersion'] == null ? undefined : json['environmentVersion'],
|
|
422
|
+
'stop': json['stop'] == null ? undefined : StopOperationFromJSON(json['stop']),
|
|
394
423
|
};
|
|
395
424
|
}
|
|
396
425
|
|
|
@@ -412,6 +441,8 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
412
441
|
'health': value['health'],
|
|
413
442
|
'healthReason': value['healthReason'],
|
|
414
443
|
'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
|
|
444
|
+
'hydrated': value['hydrated'],
|
|
445
|
+
'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
|
|
415
446
|
'type': value['type'],
|
|
416
447
|
'vcpu': value['vcpu'],
|
|
417
448
|
'memoryGB': value['memoryGB'],
|
|
@@ -442,6 +473,7 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
442
473
|
'setupError': value['setupError'],
|
|
443
474
|
'environment': value['environment'],
|
|
444
475
|
'environmentVersion': value['environmentVersion'],
|
|
476
|
+
'stop': StopOperationToJSON(value['stop']),
|
|
445
477
|
};
|
|
446
478
|
}
|
|
447
479
|
|
|
@@ -44,7 +44,7 @@ export interface SandboxUsageResponse {
|
|
|
44
44
|
*/
|
|
45
45
|
sandboxType: SandboxUsageResponseSandboxTypeEnum;
|
|
46
46
|
/**
|
|
47
|
-
* Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, and
|
|
47
|
+
* Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, 2 for `large`, and 50/9 (about 5.56) for `xlarge`.
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof SandboxUsageResponse
|
|
50
50
|
*/
|
|
@@ -94,7 +94,8 @@ export interface SandboxUsageResponse {
|
|
|
94
94
|
export const SandboxUsageResponseSandboxTypeEnum = {
|
|
95
95
|
Small: 'small',
|
|
96
96
|
Default: 'default',
|
|
97
|
-
Large: 'large'
|
|
97
|
+
Large: 'large',
|
|
98
|
+
Xlarge: 'xlarge'
|
|
98
99
|
} as const;
|
|
99
100
|
export type SandboxUsageResponseSandboxTypeEnum = typeof SandboxUsageResponseSandboxTypeEnum[keyof typeof SandboxUsageResponseSandboxTypeEnum];
|
|
100
101
|
|
|
@@ -0,0 +1,124 @@
|
|
|
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 StopOperation
|
|
20
|
+
*/
|
|
21
|
+
export interface StopOperation {
|
|
22
|
+
/**
|
|
23
|
+
* Stable id of this stop. Calling stop again while it is pending returns the same id.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof StopOperation
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* `pending`: accepted, the sandbox is archiving. `failing`: the last attempt failed (see `error`); it is retried automatically until the sandbox archives. Running commands or prompts does not cancel it. `completed`: the sandbox is archived. `superseded`: a resume ended it before it completed.
|
|
30
|
+
* @type {StopOperationStatusEnum}
|
|
31
|
+
* @memberof StopOperation
|
|
32
|
+
*/
|
|
33
|
+
status: StopOperationStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
* When the stop was accepted. On the sandbox, null once it has ended. Read by id (`GET /sandboxes/{sandboxId}/stops/{stopId}`), it is kept.
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof StopOperation
|
|
38
|
+
*/
|
|
39
|
+
requestedAt: Date | null;
|
|
40
|
+
/**
|
|
41
|
+
* When the last archival attempt ended.
|
|
42
|
+
* @type {Date}
|
|
43
|
+
* @memberof StopOperation
|
|
44
|
+
*/
|
|
45
|
+
lastAttemptAt: Date | null;
|
|
46
|
+
/**
|
|
47
|
+
* Why the last attempt failed, while `status` is `failing`. Otherwise null.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof StopOperation
|
|
50
|
+
*/
|
|
51
|
+
error: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* When the stop completed or was superseded.
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof StopOperation
|
|
56
|
+
*/
|
|
57
|
+
endedAt: Date | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const StopOperationStatusEnum = {
|
|
65
|
+
Pending: 'pending',
|
|
66
|
+
Failing: 'failing',
|
|
67
|
+
Completed: 'completed',
|
|
68
|
+
Superseded: 'superseded'
|
|
69
|
+
} as const;
|
|
70
|
+
export type StopOperationStatusEnum = typeof StopOperationStatusEnum[keyof typeof StopOperationStatusEnum];
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Check if a given object implements the StopOperation interface.
|
|
75
|
+
*/
|
|
76
|
+
export function instanceOfStopOperation(value: object): value is StopOperation {
|
|
77
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
78
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
79
|
+
if (!('requestedAt' in value) || value['requestedAt'] === undefined) return false;
|
|
80
|
+
if (!('lastAttemptAt' in value) || value['lastAttemptAt'] === undefined) return false;
|
|
81
|
+
if (!('error' in value) || value['error'] === undefined) return false;
|
|
82
|
+
if (!('endedAt' in value) || value['endedAt'] === undefined) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function StopOperationFromJSON(json: any): StopOperation {
|
|
87
|
+
return StopOperationFromJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function StopOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): StopOperation {
|
|
91
|
+
if (json == null) {
|
|
92
|
+
return json;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'id': json['id'],
|
|
97
|
+
'status': json['status'],
|
|
98
|
+
'requestedAt': (json['requestedAt'] == null ? null : new Date(json['requestedAt'])),
|
|
99
|
+
'lastAttemptAt': (json['lastAttemptAt'] == null ? null : new Date(json['lastAttemptAt'])),
|
|
100
|
+
'error': json['error'],
|
|
101
|
+
'endedAt': (json['endedAt'] == null ? null : new Date(json['endedAt'])),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function StopOperationToJSON(json: any): StopOperation {
|
|
106
|
+
return StopOperationToJSONTyped(json, false);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function StopOperationToJSONTyped(value?: StopOperation | null, ignoreDiscriminator: boolean = false): any {
|
|
110
|
+
if (value == null) {
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
|
|
116
|
+
'id': value['id'],
|
|
117
|
+
'status': value['status'],
|
|
118
|
+
'requestedAt': value['requestedAt'] == null ? value['requestedAt'] : value['requestedAt'].toISOString(),
|
|
119
|
+
'lastAttemptAt': value['lastAttemptAt'] == null ? value['lastAttemptAt'] : value['lastAttemptAt'].toISOString(),
|
|
120
|
+
'error': value['error'],
|
|
121
|
+
'endedAt': value['endedAt'] == null ? value['endedAt'] : value['endedAt'].toISOString(),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
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 { StopOperation } from './StopOperation';
|
|
17
|
+
import {
|
|
18
|
+
StopOperationFromJSON,
|
|
19
|
+
StopOperationFromJSONTyped,
|
|
20
|
+
StopOperationToJSON,
|
|
21
|
+
StopOperationToJSONTyped,
|
|
22
|
+
} from './StopOperation';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface StopOperationResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface StopOperationResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof StopOperationResponse
|
|
34
|
+
*/
|
|
35
|
+
ok: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {StopOperationResponseTypeEnum}
|
|
39
|
+
* @memberof StopOperationResponse
|
|
40
|
+
*/
|
|
41
|
+
type: StopOperationResponseTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof StopOperationResponse
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {StopOperation}
|
|
51
|
+
* @memberof StopOperationResponse
|
|
52
|
+
*/
|
|
53
|
+
stop: StopOperation;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export const StopOperationResponseTypeEnum = {
|
|
61
|
+
StopStatus: 'stop.status'
|
|
62
|
+
} as const;
|
|
63
|
+
export type StopOperationResponseTypeEnum = typeof StopOperationResponseTypeEnum[keyof typeof StopOperationResponseTypeEnum];
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the StopOperationResponse interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfStopOperationResponse(value: object): value is StopOperationResponse {
|
|
70
|
+
if (!('ok' in value) || value['ok'] === undefined) return false;
|
|
71
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
72
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
73
|
+
if (!('stop' in value) || value['stop'] === undefined) return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function StopOperationResponseFromJSON(json: any): StopOperationResponse {
|
|
78
|
+
return StopOperationResponseFromJSONTyped(json, false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function StopOperationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StopOperationResponse {
|
|
82
|
+
if (json == null) {
|
|
83
|
+
return json;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'ok': json['ok'],
|
|
88
|
+
'type': json['type'],
|
|
89
|
+
'id': json['id'],
|
|
90
|
+
'stop': StopOperationFromJSON(json['stop']),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function StopOperationResponseToJSON(json: any): StopOperationResponse {
|
|
95
|
+
return StopOperationResponseToJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function StopOperationResponseToJSONTyped(value?: StopOperationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
99
|
+
if (value == null) {
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'ok': value['ok'],
|
|
106
|
+
'type': value['type'],
|
|
107
|
+
'id': value['id'],
|
|
108
|
+
'stop': StopOperationToJSON(value['stop']),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface StopRequest {
|
|
22
22
|
/**
|
|
23
|
-
* Stop the sandbox even if its disk cannot be snapshotted.
|
|
23
|
+
* Stop the sandbox even if its disk cannot be snapshotted. It keeps its last successful snapshot and everything written since then is permanently LOST. Without this, a sandbox whose snapshot pipeline is failing is left running rather than discarding your work, and you are not billed for that time. Only use this after a stop has already been refused.
|
|
24
24
|
* @type {boolean}
|
|
25
25
|
* @memberof StopRequest
|
|
26
26
|
*/
|
|
@@ -26,7 +26,7 @@ export interface UpdateSandboxRequest {
|
|
|
26
26
|
*/
|
|
27
27
|
name?: string;
|
|
28
28
|
/**
|
|
29
|
-
* New
|
|
29
|
+
* New auto-stop TTL. The deadline becomes now + `ttlSeconds`, so calling this again extends a running sandbox's life. `null` disables auto-stop.
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof UpdateSandboxRequest
|
|
32
32
|
*/
|
package/src/models/index.ts
CHANGED
|
@@ -76,6 +76,7 @@ export * from './PromptRequest';
|
|
|
76
76
|
export * from './PromptResponse';
|
|
77
77
|
export * from './PromptRun';
|
|
78
78
|
export * from './PromptRunResponse';
|
|
79
|
+
export * from './Recover200Response';
|
|
79
80
|
export * from './RepoSelectionRequest';
|
|
80
81
|
export * from './RepoSelectionResponse';
|
|
81
82
|
export * from './ReposResponse';
|
|
@@ -118,6 +119,8 @@ export * from './SteerEvent';
|
|
|
118
119
|
export * from './SteerEventData';
|
|
119
120
|
export * from './SteerRequest';
|
|
120
121
|
export * from './SteerResponse';
|
|
122
|
+
export * from './StopOperation';
|
|
123
|
+
export * from './StopOperationResponse';
|
|
121
124
|
export * from './StopRequest';
|
|
122
125
|
export * from './SuccessBase';
|
|
123
126
|
export * from './UnknownEvent';
|
package/src/runtime.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defaultFetch } from './http2-fetch';
|
|
1
2
|
/* tslint:disable */
|
|
2
3
|
/* eslint-disable */
|
|
3
4
|
/**
|
|
@@ -202,7 +203,7 @@ export class BaseAPI {
|
|
|
202
203
|
}
|
|
203
204
|
let response: Response | undefined = undefined;
|
|
204
205
|
try {
|
|
205
|
-
response = await (this.configuration.fetchApi ||
|
|
206
|
+
response = await (this.configuration.fetchApi || defaultFetch)(fetchParams.url, fetchParams.init);
|
|
206
207
|
} catch (e) {
|
|
207
208
|
for (const middleware of this.middleware) {
|
|
208
209
|
if (middleware.onError) {
|