@boatdev/sdk 1.9.3 → 1.9.5

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 (46) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/dist/apis/BoatApi.d.ts +42 -4
  3. package/dist/apis/BoatApi.js +102 -4
  4. package/dist/esm/apis/BoatApi.d.ts +42 -4
  5. package/dist/esm/apis/BoatApi.js +102 -4
  6. package/dist/esm/models/DeletionOperation.d.ts +1 -1
  7. package/dist/esm/models/FileUrlRequest.d.ts +38 -0
  8. package/dist/esm/models/FileUrlRequest.js +45 -0
  9. package/dist/esm/models/FileUrlResponse.d.ts +78 -0
  10. package/dist/esm/models/FileUrlResponse.js +77 -0
  11. package/dist/esm/models/HostPortRequest.d.ts +6 -0
  12. package/dist/esm/models/HostPortRequest.js +2 -0
  13. package/dist/esm/models/HostPortResponse.d.ts +6 -0
  14. package/dist/esm/models/HostPortResponse.js +2 -0
  15. package/dist/esm/models/SnapshotSummary.d.ts +14 -0
  16. package/dist/esm/models/SnapshotSummary.js +9 -0
  17. package/dist/esm/models/index.d.ts +2 -0
  18. package/dist/esm/models/index.js +2 -0
  19. package/dist/models/DeletionOperation.d.ts +1 -1
  20. package/dist/models/FileUrlRequest.d.ts +38 -0
  21. package/dist/models/FileUrlRequest.js +52 -0
  22. package/dist/models/FileUrlResponse.d.ts +78 -0
  23. package/dist/models/FileUrlResponse.js +85 -0
  24. package/dist/models/HostPortRequest.d.ts +6 -0
  25. package/dist/models/HostPortRequest.js +2 -0
  26. package/dist/models/HostPortResponse.d.ts +6 -0
  27. package/dist/models/HostPortResponse.js +2 -0
  28. package/dist/models/SnapshotSummary.d.ts +14 -0
  29. package/dist/models/SnapshotSummary.js +10 -1
  30. package/dist/models/index.d.ts +2 -0
  31. package/dist/models/index.js +2 -0
  32. package/docs/BoatApi.md +160 -2
  33. package/docs/FileUrlRequest.md +34 -0
  34. package/docs/FileUrlResponse.md +42 -0
  35. package/docs/HostPortRequest.md +2 -0
  36. package/docs/HostPortResponse.md +2 -0
  37. package/docs/SnapshotSummary.md +2 -0
  38. package/package.json +1 -1
  39. package/src/apis/BoatApi.ts +156 -4
  40. package/src/models/DeletionOperation.ts +1 -1
  41. package/src/models/FileUrlRequest.ts +74 -0
  42. package/src/models/FileUrlResponse.ts +131 -0
  43. package/src/models/HostPortRequest.ts +8 -0
  44. package/src/models/HostPortResponse.ts +8 -0
  45. package/src/models/SnapshotSummary.ts +17 -0
  46. package/src/models/index.ts +2 -0
@@ -0,0 +1,74 @@
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 FileUrlRequest
20
+ */
21
+ export interface FileUrlRequest {
22
+ /**
23
+ * Absolute path, or path relative to the sandbox work directory (/home/user). It must resolve under /home/user or /tmp.
24
+ * @type {string}
25
+ * @memberof FileUrlRequest
26
+ */
27
+ path: string;
28
+ /**
29
+ * How long the URL stays valid.
30
+ * @type {number}
31
+ * @memberof FileUrlRequest
32
+ */
33
+ ttlSeconds?: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the FileUrlRequest interface.
38
+ */
39
+ export function instanceOfFileUrlRequest(value: object): value is FileUrlRequest {
40
+ if (!('path' in value) || value['path'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function FileUrlRequestFromJSON(json: any): FileUrlRequest {
45
+ return FileUrlRequestFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function FileUrlRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileUrlRequest {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'path': json['path'],
55
+ 'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'],
56
+ };
57
+ }
58
+
59
+ export function FileUrlRequestToJSON(json: any): FileUrlRequest {
60
+ return FileUrlRequestToJSONTyped(json, false);
61
+ }
62
+
63
+ export function FileUrlRequestToJSONTyped(value?: FileUrlRequest | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'path': value['path'],
71
+ 'ttlSeconds': value['ttlSeconds'],
72
+ };
73
+ }
74
+
@@ -0,0 +1,131 @@
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 FileUrlResponse
20
+ */
21
+ export interface FileUrlResponse {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof FileUrlResponse
26
+ */
27
+ ok: boolean;
28
+ /**
29
+ *
30
+ * @type {FileUrlResponseTypeEnum}
31
+ * @memberof FileUrlResponse
32
+ */
33
+ type: FileUrlResponseTypeEnum;
34
+ /**
35
+ * The signed URL. Send the request straight to it; it needs no Authorization header.
36
+ * @type {string}
37
+ * @memberof FileUrlResponse
38
+ */
39
+ url: string;
40
+ /**
41
+ * GET downloads the file. PUT uploads the request body as the file.
42
+ * @type {FileUrlResponseMethodEnum}
43
+ * @memberof FileUrlResponse
44
+ */
45
+ method: FileUrlResponseMethodEnum;
46
+ /**
47
+ * The canonical path the URL is bound to.
48
+ * @type {string}
49
+ * @memberof FileUrlResponse
50
+ */
51
+ path: string;
52
+ /**
53
+ *
54
+ * @type {Date}
55
+ * @memberof FileUrlResponse
56
+ */
57
+ expiresAt: Date;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const FileUrlResponseTypeEnum = {
65
+ FileDownloadUrl: 'file.download_url',
66
+ FileUploadUrl: 'file.upload_url'
67
+ } as const;
68
+ export type FileUrlResponseTypeEnum = typeof FileUrlResponseTypeEnum[keyof typeof FileUrlResponseTypeEnum];
69
+
70
+ /**
71
+ * @export
72
+ */
73
+ export const FileUrlResponseMethodEnum = {
74
+ Get: 'GET',
75
+ Put: 'PUT'
76
+ } as const;
77
+ export type FileUrlResponseMethodEnum = typeof FileUrlResponseMethodEnum[keyof typeof FileUrlResponseMethodEnum];
78
+
79
+
80
+ /**
81
+ * Check if a given object implements the FileUrlResponse interface.
82
+ */
83
+ export function instanceOfFileUrlResponse(value: object): value is FileUrlResponse {
84
+ if (!('ok' in value) || value['ok'] === undefined) return false;
85
+ if (!('type' in value) || value['type'] === undefined) return false;
86
+ if (!('url' in value) || value['url'] === undefined) return false;
87
+ if (!('method' in value) || value['method'] === undefined) return false;
88
+ if (!('path' in value) || value['path'] === undefined) return false;
89
+ if (!('expiresAt' in value) || value['expiresAt'] === undefined) return false;
90
+ return true;
91
+ }
92
+
93
+ export function FileUrlResponseFromJSON(json: any): FileUrlResponse {
94
+ return FileUrlResponseFromJSONTyped(json, false);
95
+ }
96
+
97
+ export function FileUrlResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileUrlResponse {
98
+ if (json == null) {
99
+ return json;
100
+ }
101
+ return {
102
+
103
+ 'ok': json['ok'],
104
+ 'type': json['type'],
105
+ 'url': json['url'],
106
+ 'method': json['method'],
107
+ 'path': json['path'],
108
+ 'expiresAt': (new Date(json['expiresAt'])),
109
+ };
110
+ }
111
+
112
+ export function FileUrlResponseToJSON(json: any): FileUrlResponse {
113
+ return FileUrlResponseToJSONTyped(json, false);
114
+ }
115
+
116
+ export function FileUrlResponseToJSONTyped(value?: FileUrlResponse | null, ignoreDiscriminator: boolean = false): any {
117
+ if (value == null) {
118
+ return value;
119
+ }
120
+
121
+ return {
122
+
123
+ 'ok': value['ok'],
124
+ 'type': value['type'],
125
+ 'url': value['url'],
126
+ 'method': value['method'],
127
+ 'path': value['path'],
128
+ 'expiresAt': value['expiresAt'].toISOString(),
129
+ };
130
+ }
131
+
@@ -31,6 +31,12 @@ export interface HostPortRequest {
31
31
  * @memberof HostPortRequest
32
32
  */
33
33
  _public?: boolean;
34
+ /**
35
+ * Set when the service listens on localhost (`127.0.0.1` or `::1`) only. The sandbox relays the URL to it. Leave unset for a service bound to `0.0.0.0`. Each call sets the value again.
36
+ * @type {boolean}
37
+ * @memberof HostPortRequest
38
+ */
39
+ localhost?: boolean;
34
40
  /**
35
41
  * Display title for the hosted port.
36
42
  * @type {string}
@@ -59,6 +65,7 @@ export function HostPortRequestFromJSONTyped(json: any, ignoreDiscriminator: boo
59
65
 
60
66
  'port': json['port'],
61
67
  '_public': json['public'] == null ? undefined : json['public'],
68
+ 'localhost': json['localhost'] == null ? undefined : json['localhost'],
62
69
  'title': json['title'] == null ? undefined : json['title'],
63
70
  };
64
71
  }
@@ -76,6 +83,7 @@ export function HostPortRequestToJSONTyped(value?: HostPortRequest | null, ignor
76
83
 
77
84
  'port': value['port'],
78
85
  'public': value['_public'],
86
+ 'localhost': value['localhost'],
79
87
  'title': value['title'],
80
88
  };
81
89
  }
@@ -61,6 +61,12 @@ export interface HostPortResponse {
61
61
  * @memberof HostPortResponse
62
62
  */
63
63
  access?: HostPortResponseAccessEnum;
64
+ /**
65
+ * The sandbox relays the URL to a service that listens on localhost only.
66
+ * @type {boolean}
67
+ * @memberof HostPortResponse
68
+ */
69
+ localhost?: boolean;
64
70
  }
65
71
 
66
72
 
@@ -100,6 +106,7 @@ export function HostPortResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
100
106
  'url': json['url'] == null ? undefined : json['url'],
101
107
  'isProtected': json['isProtected'] == null ? undefined : json['isProtected'],
102
108
  'access': json['access'] == null ? undefined : json['access'],
109
+ 'localhost': json['localhost'] == null ? undefined : json['localhost'],
103
110
  };
104
111
  }
105
112
 
@@ -121,6 +128,7 @@ export function HostPortResponseToJSONTyped(value?: HostPortResponse | null, ign
121
128
  'url': value['url'],
122
129
  'isProtected': value['isProtected'],
123
130
  'access': value['access'],
131
+ 'localhost': value['localhost'],
124
132
  };
125
133
  }
126
134
 
@@ -91,6 +91,12 @@ export interface SnapshotSummary {
91
91
  * @memberof SnapshotSummary
92
92
  */
93
93
  contentFileCount?: number | null;
94
+ /**
95
+ * `template` = this Sandbox has snapshots off, so Boat never captures it: the row is a copy of the template, named snapshot or Sandbox it was created from. `captured` = this Sandbox has snapshots on: its own captures, plus the copies Boat makes when the Sandbox is created from a source, forked or resumed.
96
+ * @type {SnapshotSummaryOriginEnum}
97
+ * @memberof SnapshotSummary
98
+ */
99
+ origin?: SnapshotSummaryOriginEnum;
94
100
  }
95
101
 
96
102
 
@@ -111,6 +117,15 @@ export const SnapshotSummaryKindEnum = {
111
117
  } as const;
112
118
  export type SnapshotSummaryKindEnum = typeof SnapshotSummaryKindEnum[keyof typeof SnapshotSummaryKindEnum];
113
119
 
120
+ /**
121
+ * @export
122
+ */
123
+ export const SnapshotSummaryOriginEnum = {
124
+ Captured: 'captured',
125
+ Template: 'template'
126
+ } as const;
127
+ export type SnapshotSummaryOriginEnum = typeof SnapshotSummaryOriginEnum[keyof typeof SnapshotSummaryOriginEnum];
128
+
114
129
 
115
130
  /**
116
131
  * Check if a given object implements the SnapshotSummary interface.
@@ -148,6 +163,7 @@ export function SnapshotSummaryFromJSONTyped(json: any, ignoreDiscriminator: boo
148
163
  'fileCount': json['fileCount'],
149
164
  'contentSizeBytes': json['contentSizeBytes'] == null ? undefined : json['contentSizeBytes'],
150
165
  'contentFileCount': json['contentFileCount'] == null ? undefined : json['contentFileCount'],
166
+ 'origin': json['origin'] == null ? undefined : json['origin'],
151
167
  };
152
168
  }
153
169
 
@@ -174,6 +190,7 @@ export function SnapshotSummaryToJSONTyped(value?: SnapshotSummary | null, ignor
174
190
  'fileCount': value['fileCount'],
175
191
  'contentSizeBytes': value['contentSizeBytes'],
176
192
  'contentFileCount': value['contentFileCount'],
193
+ 'origin': value['origin'],
177
194
  };
178
195
  }
179
196
 
@@ -50,6 +50,8 @@ export * from './ErrorEnvelopeError';
50
50
  export * from './ErrorEvent';
51
51
  export * from './EventsResponse';
52
52
  export * from './FileReadResponse';
53
+ export * from './FileUrlRequest';
54
+ export * from './FileUrlResponse';
53
55
  export * from './FileWriteRequest';
54
56
  export * from './FileWriteResponse';
55
57
  export * from './ForkRequest';