@boatdev/sdk 1.7.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 +4 -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/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/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 +2 -1
- package/dist/esm/models/Sandbox.js +2 -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 +1 -1
- 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 +2 -0
- package/dist/esm/models/index.js +2 -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/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/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 +2 -1
- package/dist/models/Sandbox.js +2 -1
- package/dist/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/models/SandboxUsageResponse.js +2 -1
- package/dist/models/StopOperation.d.ts +1 -1
- 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 +2 -0
- package/dist/models/index.js +2 -0
- package/dist/runtime.js +9 -8
- package/docs/BoatApi.md +160 -2
- package/docs/Recover200Response.md +38 -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/CreateSandboxRequest.ts +4 -3
- package/src/models/ForkRequest.ts +3 -2
- package/src/models/Recover200Response.ts +99 -0
- package/src/models/ResumeRequest.ts +3 -2
- package/src/models/Sandbox.ts +3 -2
- package/src/models/SandboxUsageResponse.ts +3 -2
- package/src/models/StopOperation.ts +1 -1
- 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 +2 -0
- package/src/runtime.ts +2 -1
|
@@ -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';
|
|
@@ -119,6 +120,7 @@ export * from './SteerEventData';
|
|
|
119
120
|
export * from './SteerRequest';
|
|
120
121
|
export * from './SteerResponse';
|
|
121
122
|
export * from './StopOperation';
|
|
123
|
+
export * from './StopOperationResponse';
|
|
122
124
|
export * from './StopRequest';
|
|
123
125
|
export * from './SuccessBase';
|
|
124
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) {
|