@boatdev/sdk 1.11.0 → 1.12.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.
Files changed (175) hide show
  1. package/.openapi-generator/FILES +42 -0
  2. package/dist/apis/BoatApi.d.ts +191 -14
  3. package/dist/apis/BoatApi.js +466 -14
  4. package/dist/esm/apis/BoatApi.d.ts +191 -14
  5. package/dist/esm/apis/BoatApi.js +466 -14
  6. package/dist/esm/models/CreateSandboxRequest.d.ts +35 -1
  7. package/dist/esm/models/CreateSandboxRequest.js +17 -0
  8. package/dist/esm/models/CreateSandboxRequestFilesInner.d.ts +52 -0
  9. package/dist/esm/models/CreateSandboxRequestFilesInner.js +56 -0
  10. package/dist/esm/models/CreateSandboxResponse.d.ts +7 -0
  11. package/dist/esm/models/CreateSandboxResponse.js +3 -0
  12. package/dist/esm/models/CreateSandboxResponseAllOfHostedPortsInner.d.ts +77 -0
  13. package/dist/esm/models/CreateSandboxResponseAllOfHostedPortsInner.js +64 -0
  14. package/dist/esm/models/FileDeleteResponse.d.ts +57 -0
  15. package/dist/esm/models/FileDeleteResponse.js +59 -0
  16. package/dist/esm/models/FileEntry.d.ts +68 -0
  17. package/dist/esm/models/FileEntry.js +67 -0
  18. package/dist/esm/models/FileFindResponse.d.ts +70 -0
  19. package/dist/esm/models/FileFindResponse.js +66 -0
  20. package/dist/esm/models/FileFindResponseAllOfMatches.d.ts +44 -0
  21. package/dist/esm/models/FileFindResponseAllOfMatches.js +51 -0
  22. package/dist/esm/models/FileFolderRequest.d.ts +38 -0
  23. package/dist/esm/models/FileFolderRequest.js +45 -0
  24. package/dist/esm/models/FileInfoResponse.d.ts +95 -0
  25. package/dist/esm/models/FileInfoResponse.js +85 -0
  26. package/dist/esm/models/FileListResponse.d.ts +70 -0
  27. package/dist/esm/models/FileListResponse.js +68 -0
  28. package/dist/esm/models/FileMoveRequest.d.ts +44 -0
  29. package/dist/esm/models/FileMoveRequest.js +49 -0
  30. package/dist/esm/models/FileMoveResponse.d.ts +63 -0
  31. package/dist/esm/models/FileMoveResponse.js +63 -0
  32. package/dist/esm/models/FilePermissionsRequest.d.ts +38 -0
  33. package/dist/esm/models/FilePermissionsRequest.js +47 -0
  34. package/dist/esm/models/FileReplaceRequest.d.ts +44 -0
  35. package/dist/esm/models/FileReplaceRequest.js +51 -0
  36. package/dist/esm/models/FileReplaceResponse.d.ts +58 -0
  37. package/dist/esm/models/FileReplaceResponse.js +60 -0
  38. package/dist/esm/models/FileReplaceResponseAllOfResults.d.ts +50 -0
  39. package/dist/esm/models/FileReplaceResponseAllOfResults.js +51 -0
  40. package/dist/esm/models/FileSearchResponse.d.ts +69 -0
  41. package/dist/esm/models/FileSearchResponse.js +65 -0
  42. package/dist/esm/models/LimitsFields.d.ts +54 -16
  43. package/dist/esm/models/LimitsFields.js +16 -2
  44. package/dist/esm/models/LimitsFieldsOveragePrices.d.ts +51 -0
  45. package/dist/esm/models/LimitsFieldsOveragePrices.js +48 -0
  46. package/dist/esm/models/LimitsFieldsOveragePricesStartBracketsInner.d.ts +44 -0
  47. package/dist/esm/models/LimitsFieldsOveragePricesStartBracketsInner.js +45 -0
  48. package/dist/esm/models/LimitsFieldsPlanIncluded.d.ts +44 -0
  49. package/dist/esm/models/LimitsFieldsPlanIncluded.js +45 -0
  50. package/dist/esm/models/LimitsFieldsStartLimitsWithWallet.d.ts +44 -0
  51. package/dist/esm/models/LimitsFieldsStartLimitsWithWallet.js +45 -0
  52. package/dist/esm/models/LimitsFieldsWallet.d.ts +32 -0
  53. package/dist/esm/models/LimitsFieldsWallet.js +41 -0
  54. package/dist/esm/models/LimitsResponse.d.ts +54 -16
  55. package/dist/esm/models/LimitsResponse.js +16 -2
  56. package/dist/esm/models/NamedSnapshotAllowance.d.ts +9 -3
  57. package/dist/esm/models/NamedSnapshotAllowance.js +2 -0
  58. package/dist/esm/models/SavedSnapshotAllowance.d.ts +9 -3
  59. package/dist/esm/models/SavedSnapshotAllowance.js +2 -0
  60. package/dist/esm/models/index.d.ts +21 -0
  61. package/dist/esm/models/index.js +21 -0
  62. package/dist/models/CreateSandboxRequest.d.ts +35 -1
  63. package/dist/models/CreateSandboxRequest.js +18 -1
  64. package/dist/models/CreateSandboxRequestFilesInner.d.ts +52 -0
  65. package/dist/models/CreateSandboxRequestFilesInner.js +64 -0
  66. package/dist/models/CreateSandboxResponse.d.ts +7 -0
  67. package/dist/models/CreateSandboxResponse.js +3 -0
  68. package/dist/models/CreateSandboxResponseAllOfHostedPortsInner.d.ts +77 -0
  69. package/dist/models/CreateSandboxResponseAllOfHostedPortsInner.js +72 -0
  70. package/dist/models/FileDeleteResponse.d.ts +57 -0
  71. package/dist/models/FileDeleteResponse.js +67 -0
  72. package/dist/models/FileEntry.d.ts +68 -0
  73. package/dist/models/FileEntry.js +74 -0
  74. package/dist/models/FileFindResponse.d.ts +70 -0
  75. package/dist/models/FileFindResponse.js +74 -0
  76. package/dist/models/FileFindResponseAllOfMatches.d.ts +44 -0
  77. package/dist/models/FileFindResponseAllOfMatches.js +58 -0
  78. package/dist/models/FileFolderRequest.d.ts +38 -0
  79. package/dist/models/FileFolderRequest.js +52 -0
  80. package/dist/models/FileInfoResponse.d.ts +95 -0
  81. package/dist/models/FileInfoResponse.js +93 -0
  82. package/dist/models/FileListResponse.d.ts +70 -0
  83. package/dist/models/FileListResponse.js +76 -0
  84. package/dist/models/FileMoveRequest.d.ts +44 -0
  85. package/dist/models/FileMoveRequest.js +56 -0
  86. package/dist/models/FileMoveResponse.d.ts +63 -0
  87. package/dist/models/FileMoveResponse.js +71 -0
  88. package/dist/models/FilePermissionsRequest.d.ts +38 -0
  89. package/dist/models/FilePermissionsRequest.js +54 -0
  90. package/dist/models/FileReplaceRequest.d.ts +44 -0
  91. package/dist/models/FileReplaceRequest.js +58 -0
  92. package/dist/models/FileReplaceResponse.d.ts +58 -0
  93. package/dist/models/FileReplaceResponse.js +68 -0
  94. package/dist/models/FileReplaceResponseAllOfResults.d.ts +50 -0
  95. package/dist/models/FileReplaceResponseAllOfResults.js +58 -0
  96. package/dist/models/FileSearchResponse.d.ts +69 -0
  97. package/dist/models/FileSearchResponse.js +73 -0
  98. package/dist/models/LimitsFields.d.ts +54 -16
  99. package/dist/models/LimitsFields.js +16 -2
  100. package/dist/models/LimitsFieldsOveragePrices.d.ts +51 -0
  101. package/dist/models/LimitsFieldsOveragePrices.js +55 -0
  102. package/dist/models/LimitsFieldsOveragePricesStartBracketsInner.d.ts +44 -0
  103. package/dist/models/LimitsFieldsOveragePricesStartBracketsInner.js +52 -0
  104. package/dist/models/LimitsFieldsPlanIncluded.d.ts +44 -0
  105. package/dist/models/LimitsFieldsPlanIncluded.js +52 -0
  106. package/dist/models/LimitsFieldsStartLimitsWithWallet.d.ts +44 -0
  107. package/dist/models/LimitsFieldsStartLimitsWithWallet.js +52 -0
  108. package/dist/models/LimitsFieldsWallet.d.ts +32 -0
  109. package/dist/models/LimitsFieldsWallet.js +48 -0
  110. package/dist/models/LimitsResponse.d.ts +54 -16
  111. package/dist/models/LimitsResponse.js +16 -2
  112. package/dist/models/NamedSnapshotAllowance.d.ts +9 -3
  113. package/dist/models/NamedSnapshotAllowance.js +2 -0
  114. package/dist/models/SavedSnapshotAllowance.d.ts +9 -3
  115. package/dist/models/SavedSnapshotAllowance.js +2 -0
  116. package/dist/models/index.d.ts +21 -0
  117. package/dist/models/index.js +21 -0
  118. package/docs/BoatApi.md +744 -48
  119. package/docs/CreateSandboxRequest.md +8 -0
  120. package/docs/CreateSandboxRequestFilesInner.md +36 -0
  121. package/docs/CreateSandboxResponse.md +2 -0
  122. package/docs/CreateSandboxResponseAllOfHostedPortsInner.md +44 -0
  123. package/docs/FileDeleteResponse.md +38 -0
  124. package/docs/FileEntry.md +44 -0
  125. package/docs/FileFindResponse.md +42 -0
  126. package/docs/FileFindResponseAllOfMatches.md +36 -0
  127. package/docs/FileFolderRequest.md +34 -0
  128. package/docs/FileInfoResponse.md +50 -0
  129. package/docs/FileListResponse.md +42 -0
  130. package/docs/FileMoveRequest.md +36 -0
  131. package/docs/FileMoveResponse.md +40 -0
  132. package/docs/FilePermissionsRequest.md +34 -0
  133. package/docs/FileReplaceRequest.md +36 -0
  134. package/docs/FileReplaceResponse.md +38 -0
  135. package/docs/FileReplaceResponseAllOfResults.md +38 -0
  136. package/docs/FileSearchResponse.md +42 -0
  137. package/docs/LimitsFields.md +12 -2
  138. package/docs/LimitsFieldsOveragePrices.md +39 -0
  139. package/docs/LimitsFieldsOveragePricesStartBracketsInner.md +36 -0
  140. package/docs/LimitsFieldsPlanIncluded.md +37 -0
  141. package/docs/LimitsFieldsStartLimitsWithWallet.md +37 -0
  142. package/docs/LimitsFieldsWallet.md +33 -0
  143. package/docs/LimitsResponse.md +12 -2
  144. package/docs/NamedSnapshotAllowance.md +3 -1
  145. package/docs/SavedSnapshotAllowance.md +3 -1
  146. package/package.json +1 -1
  147. package/src/apis/BoatApi.ts +721 -14
  148. package/src/models/CreateSandboxRequest.ts +57 -1
  149. package/src/models/CreateSandboxRequestFilesInner.ts +94 -0
  150. package/src/models/CreateSandboxResponse.ts +15 -0
  151. package/src/models/CreateSandboxResponseAllOfHostedPortsInner.ts +128 -0
  152. package/src/models/FileDeleteResponse.ts +102 -0
  153. package/src/models/FileEntry.ts +120 -0
  154. package/src/models/FileFindResponse.ts +127 -0
  155. package/src/models/FileFindResponseAllOfMatches.ts +84 -0
  156. package/src/models/FileFolderRequest.ts +74 -0
  157. package/src/models/FileInfoResponse.ts +158 -0
  158. package/src/models/FileListResponse.ts +128 -0
  159. package/src/models/FileMoveRequest.ts +83 -0
  160. package/src/models/FileMoveResponse.ts +111 -0
  161. package/src/models/FilePermissionsRequest.ts +75 -0
  162. package/src/models/FileReplaceRequest.ts +84 -0
  163. package/src/models/FileReplaceResponse.ts +110 -0
  164. package/src/models/FileReplaceResponseAllOfResults.ts +91 -0
  165. package/src/models/FileSearchResponse.ts +119 -0
  166. package/src/models/LimitsFields.ts +90 -16
  167. package/src/models/LimitsFieldsOveragePrices.ts +97 -0
  168. package/src/models/LimitsFieldsOveragePricesStartBracketsInner.ts +81 -0
  169. package/src/models/LimitsFieldsPlanIncluded.ts +81 -0
  170. package/src/models/LimitsFieldsStartLimitsWithWallet.ts +81 -0
  171. package/src/models/LimitsFieldsWallet.ts +65 -0
  172. package/src/models/LimitsResponse.ts +90 -16
  173. package/src/models/NamedSnapshotAllowance.ts +11 -3
  174. package/src/models/SavedSnapshotAllowance.ts +11 -3
  175. package/src/models/index.ts +21 -0
@@ -13,6 +13,21 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { CreateSandboxRequestFilesInner } from './CreateSandboxRequestFilesInner';
17
+ import {
18
+ CreateSandboxRequestFilesInnerFromJSON,
19
+ CreateSandboxRequestFilesInnerFromJSONTyped,
20
+ CreateSandboxRequestFilesInnerToJSON,
21
+ CreateSandboxRequestFilesInnerToJSONTyped,
22
+ } from './CreateSandboxRequestFilesInner';
23
+ import type { HostPortRequest } from './HostPortRequest';
24
+ import {
25
+ HostPortRequestFromJSON,
26
+ HostPortRequestFromJSONTyped,
27
+ HostPortRequestToJSON,
28
+ HostPortRequestToJSONTyped,
29
+ } from './HostPortRequest';
30
+
16
31
  /**
17
32
  * Options for provisioning a new cloud computer.
18
33
  * @export
@@ -74,11 +89,35 @@ export interface CreateSandboxRequest {
74
89
  */
75
90
  count?: number;
76
91
  /**
77
- * Shell script that runs on the sandbox after it is ready. Ready means "ready to accept the user", not "setup done": the script starts in the background once provisioning completes and never blocks the sandbox becoming usable. It runs as the sandbox user (`user`, not root; `sudo` needs no password) via `bash`, with the sandbox's environment applied, and its output goes to a log file on the sandbox. Observe the outcome as `setupStatus` (pending/running/done/failed) and `setupError` on the sandbox. Rejected with a 400 `invalid_setup_script` error when it is not a string or exceeds 64KB.
92
+ * Shell script that runs on the sandbox after it is ready. Ready means "ready to accept the user", not "setup done": the script starts in the background once provisioning completes and never blocks the sandbox becoming usable. It runs as the sandbox user (`user`, not root; `sudo` needs no password) via `bash`, with the sandbox's environment applied, and its output goes to a log file on the sandbox. Observe the outcome as `setupStatus` (pending/running/done/failed) and `setupError` on the sandbox. Rejected with a 400 `invalid_setup_script` error when it is not a string or exceeds 64KB. When the request also has `files`, the script starts after every file is written.
78
93
  * @type {string}
79
94
  * @memberof CreateSandboxRequest
80
95
  */
81
96
  setupScript?: string;
97
+ /**
98
+ * Display name of the sandbox, the same value `PATCH /sandboxes/{id}` sets. A sandbox created `from` a saved snapshot is named after the snapshot when this is omitted.
99
+ * @type {string}
100
+ * @memberof CreateSandboxRequest
101
+ */
102
+ name?: string;
103
+ /**
104
+ * Who can use a sandbox billed to an organization, with the same rules as the sandbox's `visibility` field. `private`: only you can use it. `shared`: every member can, as long as it holds none of your personal logins (`noEnv`, or an environment that passes nothing). Omitted, the organization's default for new sandboxes applies (`PATCH /orgs/{org}` `newSandboxesPrivate`). It is set before the sandbox gets a machine, so a `private` sandbox is never shared, not even for a moment, and needs no `unshare` call. A personal sandbox is always private: `shared` is refused with 400 `not_org_sandbox`. Change it later with `POST /sandboxes/{id}/share` and `POST /sandboxes/{id}/unshare`.
105
+ * @type {CreateSandboxRequestVisibilityEnum}
106
+ * @memberof CreateSandboxRequest
107
+ */
108
+ visibility?: CreateSandboxRequestVisibilityEnum;
109
+ /**
110
+ * Ports to host on public HTTPS URLs, each exactly as `POST /sandboxes/{id}/host` does. The create waits for the sandbox's machine (up to 60 s, usually under a second), hosts every port at once and answers the URLs in `hostedPorts`. The ports are routed before the sandbox is ready, so a service that starts later is reachable as soon as it listens. Refused with 400 `invalid_hosted_ports` for a bad entry or a duplicate port, with 400 `count_with_hosted_ports` together with `count`, and with 400 `fail_fast_with_hosted_ports` together with `failFast`.
111
+ * @type {Array<HostPortRequest>}
112
+ * @memberof CreateSandboxRequest
113
+ */
114
+ hostedPorts?: Array<HostPortRequest>;
115
+ /**
116
+ * Files to write on the sandbox, each like `PUT /sandboxes/{id}/files` (a path under `/home/user` or `/tmp`, relative paths resolve against `/home/user`; missing folders are created). Boat writes them once the sandbox's disk is in place and before it reports `ready`, so a client that sees `ready`, and the `setupScript`, always find them. They are written once, at the first start: a resume does not write them again. At most 256KB in total; upload bigger files with `POST /sandboxes/{id}/files/upload-url`. `setupStatus` covers them: it stays `pending` until they are written, and a write that fails sets it `failed` with the path and the reason in `setupError` (the setup script then does not run). Refused with 400 `invalid_files` for a bad path, a duplicate path or a body over the limits.
117
+ * @type {Array<CreateSandboxRequestFilesInner>}
118
+ * @memberof CreateSandboxRequest
119
+ */
120
+ files?: Array<CreateSandboxRequestFilesInner>;
82
121
  /**
83
122
  * Bill this sandbox to an organization you belong to (its shared wallet), by id or by name as `GET /orgs` lists it; `personal` or your own account id means personal billing. Omitted, the `X-Boat-Org` / `?org=` request scope applies, then the account's active wallet (`PATCH /orgs/active`), then personal. Listing, snapshots, and environments stay yours: the org is a wallet, not a shared workspace. Takes precedence over `teamId`.
84
123
  * @type {string}
@@ -111,6 +150,15 @@ export const CreateSandboxRequestTypeEnum = {
111
150
  } as const;
112
151
  export type CreateSandboxRequestTypeEnum = typeof CreateSandboxRequestTypeEnum[keyof typeof CreateSandboxRequestTypeEnum];
113
152
 
153
+ /**
154
+ * @export
155
+ */
156
+ export const CreateSandboxRequestVisibilityEnum = {
157
+ Private: 'private',
158
+ Shared: 'shared'
159
+ } as const;
160
+ export type CreateSandboxRequestVisibilityEnum = typeof CreateSandboxRequestVisibilityEnum[keyof typeof CreateSandboxRequestVisibilityEnum];
161
+
114
162
 
115
163
  /**
116
164
  * Check if a given object implements the CreateSandboxRequest interface.
@@ -139,6 +187,10 @@ export function CreateSandboxRequestFromJSONTyped(json: any, ignoreDiscriminator
139
187
  'failFast': json['failFast'] == null ? undefined : json['failFast'],
140
188
  'count': json['count'] == null ? undefined : json['count'],
141
189
  'setupScript': json['setupScript'] == null ? undefined : json['setupScript'],
190
+ 'name': json['name'] == null ? undefined : json['name'],
191
+ 'visibility': json['visibility'] == null ? undefined : json['visibility'],
192
+ 'hostedPorts': json['hostedPorts'] == null ? undefined : ((json['hostedPorts'] as Array<any>).map(HostPortRequestFromJSON)),
193
+ 'files': json['files'] == null ? undefined : ((json['files'] as Array<any>).map(CreateSandboxRequestFilesInnerFromJSON)),
142
194
  'org': json['org'] == null ? undefined : json['org'],
143
195
  'teamId': json['teamId'] == null ? undefined : json['teamId'],
144
196
  'from': json['from'] == null ? undefined : json['from'],
@@ -166,6 +218,10 @@ export function CreateSandboxRequestToJSONTyped(value?: CreateSandboxRequest | n
166
218
  'failFast': value['failFast'],
167
219
  'count': value['count'],
168
220
  'setupScript': value['setupScript'],
221
+ 'name': value['name'],
222
+ 'visibility': value['visibility'],
223
+ 'hostedPorts': value['hostedPorts'] == null ? undefined : ((value['hostedPorts'] as Array<any>).map(HostPortRequestToJSON)),
224
+ 'files': value['files'] == null ? undefined : ((value['files'] as Array<any>).map(CreateSandboxRequestFilesInnerToJSON)),
169
225
  'org': value['org'],
170
226
  'teamId': value['teamId'],
171
227
  'from': value['from'],
@@ -0,0 +1,94 @@
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 CreateSandboxRequestFilesInner
20
+ */
21
+ export interface CreateSandboxRequestFilesInner {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CreateSandboxRequestFilesInner
26
+ */
27
+ path: string;
28
+ /**
29
+ * File contents, as text or base64 (see `encoding`).
30
+ * @type {string}
31
+ * @memberof CreateSandboxRequestFilesInner
32
+ */
33
+ content: string;
34
+ /**
35
+ *
36
+ * @type {CreateSandboxRequestFilesInnerEncodingEnum}
37
+ * @memberof CreateSandboxRequestFilesInner
38
+ */
39
+ encoding?: CreateSandboxRequestFilesInnerEncodingEnum;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const CreateSandboxRequestFilesInnerEncodingEnum = {
47
+ Utf8: 'utf8',
48
+ Base64: 'base64'
49
+ } as const;
50
+ export type CreateSandboxRequestFilesInnerEncodingEnum = typeof CreateSandboxRequestFilesInnerEncodingEnum[keyof typeof CreateSandboxRequestFilesInnerEncodingEnum];
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the CreateSandboxRequestFilesInner interface.
55
+ */
56
+ export function instanceOfCreateSandboxRequestFilesInner(value: object): value is CreateSandboxRequestFilesInner {
57
+ if (!('path' in value) || value['path'] === undefined) return false;
58
+ if (!('content' in value) || value['content'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function CreateSandboxRequestFilesInnerFromJSON(json: any): CreateSandboxRequestFilesInner {
63
+ return CreateSandboxRequestFilesInnerFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function CreateSandboxRequestFilesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSandboxRequestFilesInner {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'path': json['path'],
73
+ 'content': json['content'],
74
+ 'encoding': json['encoding'] == null ? undefined : json['encoding'],
75
+ };
76
+ }
77
+
78
+ export function CreateSandboxRequestFilesInnerToJSON(json: any): CreateSandboxRequestFilesInner {
79
+ return CreateSandboxRequestFilesInnerToJSONTyped(json, false);
80
+ }
81
+
82
+ export function CreateSandboxRequestFilesInnerToJSONTyped(value?: CreateSandboxRequestFilesInner | null, ignoreDiscriminator: boolean = false): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+
87
+ return {
88
+
89
+ 'path': value['path'],
90
+ 'content': value['content'],
91
+ 'encoding': value['encoding'],
92
+ };
93
+ }
94
+
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { CreateSandboxResponseAllOfHostedPortsInner } from './CreateSandboxResponseAllOfHostedPortsInner';
17
+ import {
18
+ CreateSandboxResponseAllOfHostedPortsInnerFromJSON,
19
+ CreateSandboxResponseAllOfHostedPortsInnerFromJSONTyped,
20
+ CreateSandboxResponseAllOfHostedPortsInnerToJSON,
21
+ CreateSandboxResponseAllOfHostedPortsInnerToJSONTyped,
22
+ } from './CreateSandboxResponseAllOfHostedPortsInner';
16
23
  import type { Sandbox } from './Sandbox';
17
24
  import {
18
25
  SandboxFromJSON,
@@ -63,6 +70,12 @@ export interface CreateSandboxResponse {
63
70
  * @memberof CreateSandboxResponse
64
71
  */
65
72
  sandboxes?: Array<Sandbox>;
73
+ /**
74
+ * Present when the request set `hostedPorts`, in request order. Each entry is what `POST /sandboxes/{id}/host` answers for that port: `url`, `access`, `isProtected` and `localhost`, or `error` and `message` when that one port could not be hosted (the sandbox is created anyway; host the port again with `POST /sandboxes/{id}/host`).
75
+ * @type {Array<CreateSandboxResponseAllOfHostedPortsInner>}
76
+ * @memberof CreateSandboxResponse
77
+ */
78
+ hostedPorts?: Array<CreateSandboxResponseAllOfHostedPortsInner>;
66
79
  /**
67
80
  * Present when a fair-use cap on a gifted account shortened the requested auto-stop time.
68
81
  * @type {string}
@@ -118,6 +131,7 @@ export function CreateSandboxResponseFromJSONTyped(json: any, ignoreDiscriminato
118
131
  'ttlSeconds': json['ttlSeconds'],
119
132
  'sandbox': SandboxFromJSON(json['sandbox']),
120
133
  'sandboxes': json['sandboxes'] == null ? undefined : ((json['sandboxes'] as Array<any>).map(SandboxFromJSON)),
134
+ 'hostedPorts': json['hostedPorts'] == null ? undefined : ((json['hostedPorts'] as Array<any>).map(CreateSandboxResponseAllOfHostedPortsInnerFromJSON)),
121
135
  'giftLimitNotice': json['giftLimitNotice'] == null ? undefined : json['giftLimitNotice'],
122
136
  };
123
137
  }
@@ -139,6 +153,7 @@ export function CreateSandboxResponseToJSONTyped(value?: CreateSandboxResponse |
139
153
  'ttlSeconds': value['ttlSeconds'],
140
154
  'sandbox': SandboxToJSON(value['sandbox']),
141
155
  'sandboxes': value['sandboxes'] == null ? undefined : ((value['sandboxes'] as Array<any>).map(SandboxToJSON)),
156
+ 'hostedPorts': value['hostedPorts'] == null ? undefined : ((value['hostedPorts'] as Array<any>).map(CreateSandboxResponseAllOfHostedPortsInnerToJSON)),
142
157
  'giftLimitNotice': value['giftLimitNotice'],
143
158
  };
144
159
  }
@@ -0,0 +1,128 @@
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 CreateSandboxResponseAllOfHostedPortsInner
20
+ */
21
+ export interface CreateSandboxResponseAllOfHostedPortsInner {
22
+ [key: string]: any | any;
23
+ /**
24
+ *
25
+ * @type {number}
26
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
27
+ */
28
+ port: number;
29
+ /**
30
+ * Public HTTPS URL. Carries the `_token` query parameter unless the port is public; redact from logs.
31
+ * @type {string}
32
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
33
+ */
34
+ url?: string;
35
+ /**
36
+ *
37
+ * @type {boolean}
38
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
39
+ */
40
+ isProtected?: boolean;
41
+ /**
42
+ *
43
+ * @type {CreateSandboxResponseAllOfHostedPortsInnerAccessEnum}
44
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
45
+ */
46
+ access?: CreateSandboxResponseAllOfHostedPortsInnerAccessEnum;
47
+ /**
48
+ *
49
+ * @type {boolean}
50
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
51
+ */
52
+ localhost?: boolean;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
57
+ */
58
+ error?: string;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof CreateSandboxResponseAllOfHostedPortsInner
63
+ */
64
+ message?: string;
65
+ }
66
+
67
+
68
+ /**
69
+ * @export
70
+ */
71
+ export const CreateSandboxResponseAllOfHostedPortsInnerAccessEnum = {
72
+ Private: 'private',
73
+ Public: 'public'
74
+ } as const;
75
+ export type CreateSandboxResponseAllOfHostedPortsInnerAccessEnum = typeof CreateSandboxResponseAllOfHostedPortsInnerAccessEnum[keyof typeof CreateSandboxResponseAllOfHostedPortsInnerAccessEnum];
76
+
77
+
78
+ /**
79
+ * Check if a given object implements the CreateSandboxResponseAllOfHostedPortsInner interface.
80
+ */
81
+ export function instanceOfCreateSandboxResponseAllOfHostedPortsInner(value: object): value is CreateSandboxResponseAllOfHostedPortsInner {
82
+ if (!('port' in value) || value['port'] === undefined) return false;
83
+ return true;
84
+ }
85
+
86
+ export function CreateSandboxResponseAllOfHostedPortsInnerFromJSON(json: any): CreateSandboxResponseAllOfHostedPortsInner {
87
+ return CreateSandboxResponseAllOfHostedPortsInnerFromJSONTyped(json, false);
88
+ }
89
+
90
+ export function CreateSandboxResponseAllOfHostedPortsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSandboxResponseAllOfHostedPortsInner {
91
+ if (json == null) {
92
+ return json;
93
+ }
94
+ return {
95
+
96
+ ...json,
97
+ 'port': json['port'],
98
+ 'url': json['url'] == null ? undefined : json['url'],
99
+ 'isProtected': json['isProtected'] == null ? undefined : json['isProtected'],
100
+ 'access': json['access'] == null ? undefined : json['access'],
101
+ 'localhost': json['localhost'] == null ? undefined : json['localhost'],
102
+ 'error': json['error'] == null ? undefined : json['error'],
103
+ 'message': json['message'] == null ? undefined : json['message'],
104
+ };
105
+ }
106
+
107
+ export function CreateSandboxResponseAllOfHostedPortsInnerToJSON(json: any): CreateSandboxResponseAllOfHostedPortsInner {
108
+ return CreateSandboxResponseAllOfHostedPortsInnerToJSONTyped(json, false);
109
+ }
110
+
111
+ export function CreateSandboxResponseAllOfHostedPortsInnerToJSONTyped(value?: CreateSandboxResponseAllOfHostedPortsInner | null, ignoreDiscriminator: boolean = false): any {
112
+ if (value == null) {
113
+ return value;
114
+ }
115
+
116
+ return {
117
+
118
+ ...value,
119
+ 'port': value['port'],
120
+ 'url': value['url'],
121
+ 'isProtected': value['isProtected'],
122
+ 'access': value['access'],
123
+ 'localhost': value['localhost'],
124
+ 'error': value['error'],
125
+ 'message': value['message'],
126
+ };
127
+ }
128
+
@@ -0,0 +1,102 @@
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 FileDeleteResponse
20
+ */
21
+ export interface FileDeleteResponse {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof FileDeleteResponse
26
+ */
27
+ ok: boolean;
28
+ /**
29
+ *
30
+ * @type {FileDeleteResponseTypeEnum}
31
+ * @memberof FileDeleteResponse
32
+ */
33
+ type: FileDeleteResponseTypeEnum;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof FileDeleteResponse
38
+ */
39
+ success?: boolean;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof FileDeleteResponse
44
+ */
45
+ path: string;
46
+ }
47
+
48
+
49
+ /**
50
+ * @export
51
+ */
52
+ export const FileDeleteResponseTypeEnum = {
53
+ FileDeleted: 'file.deleted'
54
+ } as const;
55
+ export type FileDeleteResponseTypeEnum = typeof FileDeleteResponseTypeEnum[keyof typeof FileDeleteResponseTypeEnum];
56
+
57
+
58
+ /**
59
+ * Check if a given object implements the FileDeleteResponse interface.
60
+ */
61
+ export function instanceOfFileDeleteResponse(value: object): value is FileDeleteResponse {
62
+ if (!('ok' in value) || value['ok'] === undefined) return false;
63
+ if (!('type' in value) || value['type'] === undefined) return false;
64
+ if (!('path' in value) || value['path'] === undefined) return false;
65
+ return true;
66
+ }
67
+
68
+ export function FileDeleteResponseFromJSON(json: any): FileDeleteResponse {
69
+ return FileDeleteResponseFromJSONTyped(json, false);
70
+ }
71
+
72
+ export function FileDeleteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileDeleteResponse {
73
+ if (json == null) {
74
+ return json;
75
+ }
76
+ return {
77
+
78
+ 'ok': json['ok'],
79
+ 'type': json['type'],
80
+ 'success': json['success'] == null ? undefined : json['success'],
81
+ 'path': json['path'],
82
+ };
83
+ }
84
+
85
+ export function FileDeleteResponseToJSON(json: any): FileDeleteResponse {
86
+ return FileDeleteResponseToJSONTyped(json, false);
87
+ }
88
+
89
+ export function FileDeleteResponseToJSONTyped(value?: FileDeleteResponse | null, ignoreDiscriminator: boolean = false): any {
90
+ if (value == null) {
91
+ return value;
92
+ }
93
+
94
+ return {
95
+
96
+ 'ok': value['ok'],
97
+ 'type': value['type'],
98
+ 'success': value['success'],
99
+ 'path': value['path'],
100
+ };
101
+ }
102
+
@@ -0,0 +1,120 @@
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 FileEntry
20
+ */
21
+ export interface FileEntry {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof FileEntry
26
+ */
27
+ name: string;
28
+ /**
29
+ * Absolute path on the sandbox.
30
+ * @type {string}
31
+ * @memberof FileEntry
32
+ */
33
+ path: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof FileEntry
38
+ */
39
+ isDir: boolean;
40
+ /**
41
+ *
42
+ * @type {boolean}
43
+ * @memberof FileEntry
44
+ */
45
+ isSymlink: boolean;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof FileEntry
50
+ */
51
+ size: number;
52
+ /**
53
+ * Octal permission bits, for example "0644".
54
+ * @type {string}
55
+ * @memberof FileEntry
56
+ */
57
+ mode: string;
58
+ /**
59
+ *
60
+ * @type {Date}
61
+ * @memberof FileEntry
62
+ */
63
+ modifiedAt: Date;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the FileEntry interface.
68
+ */
69
+ export function instanceOfFileEntry(value: object): value is FileEntry {
70
+ if (!('name' in value) || value['name'] === undefined) return false;
71
+ if (!('path' in value) || value['path'] === undefined) return false;
72
+ if (!('isDir' in value) || value['isDir'] === undefined) return false;
73
+ if (!('isSymlink' in value) || value['isSymlink'] === undefined) return false;
74
+ if (!('size' in value) || value['size'] === undefined) return false;
75
+ if (!('mode' in value) || value['mode'] === undefined) return false;
76
+ if (!('modifiedAt' in value) || value['modifiedAt'] === undefined) return false;
77
+ return true;
78
+ }
79
+
80
+ export function FileEntryFromJSON(json: any): FileEntry {
81
+ return FileEntryFromJSONTyped(json, false);
82
+ }
83
+
84
+ export function FileEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileEntry {
85
+ if (json == null) {
86
+ return json;
87
+ }
88
+ return {
89
+
90
+ 'name': json['name'],
91
+ 'path': json['path'],
92
+ 'isDir': json['isDir'],
93
+ 'isSymlink': json['isSymlink'],
94
+ 'size': json['size'],
95
+ 'mode': json['mode'],
96
+ 'modifiedAt': (new Date(json['modifiedAt'])),
97
+ };
98
+ }
99
+
100
+ export function FileEntryToJSON(json: any): FileEntry {
101
+ return FileEntryToJSONTyped(json, false);
102
+ }
103
+
104
+ export function FileEntryToJSONTyped(value?: FileEntry | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'name': value['name'],
112
+ 'path': value['path'],
113
+ 'isDir': value['isDir'],
114
+ 'isSymlink': value['isSymlink'],
115
+ 'size': value['size'],
116
+ 'mode': value['mode'],
117
+ 'modifiedAt': value['modifiedAt'].toISOString(),
118
+ };
119
+ }
120
+