@boatdev/sdk 1.10.0 → 1.11.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 (129) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/dist/apis/BoatApi.d.ts +92 -12
  3. package/dist/apis/BoatApi.js +196 -15
  4. package/dist/esm/apis/BoatApi.d.ts +92 -12
  5. package/dist/esm/apis/BoatApi.js +196 -15
  6. package/dist/esm/models/CreateSandboxRequest.d.ts +3 -3
  7. package/dist/esm/models/CredentialId.d.ts +3 -0
  8. package/dist/esm/models/CredentialId.js +3 -0
  9. package/dist/esm/models/CredentialProfile.d.ts +7 -0
  10. package/dist/esm/models/CredentialProfile.js +3 -0
  11. package/dist/esm/models/DeletionOperation.d.ts +1 -1
  12. package/dist/esm/models/ResourceAccess.d.ts +38 -0
  13. package/dist/esm/models/ResourceAccess.js +47 -0
  14. package/dist/esm/models/ResourceAccessUpdate.d.ts +38 -0
  15. package/dist/esm/models/ResourceAccessUpdate.js +45 -0
  16. package/dist/esm/models/Sandbox.d.ts +7 -0
  17. package/dist/esm/models/Sandbox.js +3 -0
  18. package/dist/esm/models/SandboxEnvironment.d.ts +7 -0
  19. package/dist/esm/models/SandboxEnvironment.js +3 -0
  20. package/dist/esm/models/SandboxLastReboot.d.ts +47 -0
  21. package/dist/esm/models/SandboxLastReboot.js +51 -0
  22. package/dist/esm/models/SandboxListResponse.d.ts +7 -0
  23. package/dist/esm/models/SandboxListResponse.js +3 -0
  24. package/dist/esm/models/SandboxListResponseAllOfDeletedCost.d.ts +44 -0
  25. package/dist/esm/models/SandboxListResponseAllOfDeletedCost.js +51 -0
  26. package/dist/esm/models/SavedSnapshot.d.ts +83 -0
  27. package/dist/esm/models/SavedSnapshot.js +71 -0
  28. package/dist/esm/models/SavedSnapshotAllowance.d.ts +81 -0
  29. package/dist/esm/models/SavedSnapshotAllowance.js +57 -0
  30. package/dist/esm/models/SavedSnapshotDeletedResponse.d.ts +64 -0
  31. package/dist/esm/models/SavedSnapshotDeletedResponse.js +67 -0
  32. package/dist/esm/models/SavedSnapshotInfoResponse.d.ts +52 -0
  33. package/dist/esm/models/SavedSnapshotInfoResponse.js +58 -0
  34. package/dist/esm/models/SavedSnapshotListResponse.d.ts +59 -0
  35. package/dist/esm/models/SavedSnapshotListResponse.js +61 -0
  36. package/dist/esm/models/SavedSnapshotSaveRequest.d.ts +38 -0
  37. package/dist/esm/models/SavedSnapshotSaveRequest.js +47 -0
  38. package/dist/esm/models/SavedSnapshotSavingResponse.d.ts +65 -0
  39. package/dist/esm/models/SavedSnapshotSavingResponse.js +68 -0
  40. package/dist/esm/models/SnapshotSummary.d.ts +1 -1
  41. package/dist/esm/models/UpdateCredentialProfileRequest.d.ts +7 -0
  42. package/dist/esm/models/UpdateCredentialProfileRequest.js +3 -0
  43. package/dist/esm/models/UpdateSandboxEnvironmentRequest.d.ts +7 -0
  44. package/dist/esm/models/UpdateSandboxEnvironmentRequest.js +3 -0
  45. package/dist/esm/models/index.d.ts +11 -0
  46. package/dist/esm/models/index.js +11 -0
  47. package/dist/models/CreateSandboxRequest.d.ts +3 -3
  48. package/dist/models/CredentialId.d.ts +3 -0
  49. package/dist/models/CredentialId.js +3 -0
  50. package/dist/models/CredentialProfile.d.ts +7 -0
  51. package/dist/models/CredentialProfile.js +3 -0
  52. package/dist/models/DeletionOperation.d.ts +1 -1
  53. package/dist/models/ResourceAccess.d.ts +38 -0
  54. package/dist/models/ResourceAccess.js +54 -0
  55. package/dist/models/ResourceAccessUpdate.d.ts +38 -0
  56. package/dist/models/ResourceAccessUpdate.js +52 -0
  57. package/dist/models/Sandbox.d.ts +7 -0
  58. package/dist/models/Sandbox.js +3 -0
  59. package/dist/models/SandboxEnvironment.d.ts +7 -0
  60. package/dist/models/SandboxEnvironment.js +3 -0
  61. package/dist/models/SandboxLastReboot.d.ts +47 -0
  62. package/dist/models/SandboxLastReboot.js +59 -0
  63. package/dist/models/SandboxListResponse.d.ts +7 -0
  64. package/dist/models/SandboxListResponse.js +3 -0
  65. package/dist/models/SandboxListResponseAllOfDeletedCost.d.ts +44 -0
  66. package/dist/models/SandboxListResponseAllOfDeletedCost.js +58 -0
  67. package/dist/models/SavedSnapshot.d.ts +83 -0
  68. package/dist/models/SavedSnapshot.js +79 -0
  69. package/dist/models/SavedSnapshotAllowance.d.ts +81 -0
  70. package/dist/models/SavedSnapshotAllowance.js +64 -0
  71. package/dist/models/SavedSnapshotDeletedResponse.d.ts +64 -0
  72. package/dist/models/SavedSnapshotDeletedResponse.js +75 -0
  73. package/dist/models/SavedSnapshotInfoResponse.d.ts +52 -0
  74. package/dist/models/SavedSnapshotInfoResponse.js +66 -0
  75. package/dist/models/SavedSnapshotListResponse.d.ts +59 -0
  76. package/dist/models/SavedSnapshotListResponse.js +69 -0
  77. package/dist/models/SavedSnapshotSaveRequest.d.ts +38 -0
  78. package/dist/models/SavedSnapshotSaveRequest.js +54 -0
  79. package/dist/models/SavedSnapshotSavingResponse.d.ts +65 -0
  80. package/dist/models/SavedSnapshotSavingResponse.js +76 -0
  81. package/dist/models/SnapshotSummary.d.ts +1 -1
  82. package/dist/models/UpdateCredentialProfileRequest.d.ts +7 -0
  83. package/dist/models/UpdateCredentialProfileRequest.js +3 -0
  84. package/dist/models/UpdateSandboxEnvironmentRequest.d.ts +7 -0
  85. package/dist/models/UpdateSandboxEnvironmentRequest.js +3 -0
  86. package/dist/models/index.d.ts +11 -0
  87. package/dist/models/index.js +11 -0
  88. package/docs/BoatApi.md +307 -15
  89. package/docs/CredentialProfile.md +2 -0
  90. package/docs/ResourceAccess.md +35 -0
  91. package/docs/ResourceAccessUpdate.md +35 -0
  92. package/docs/Sandbox.md +2 -0
  93. package/docs/SandboxEnvironment.md +2 -0
  94. package/docs/SandboxLastReboot.md +35 -0
  95. package/docs/SandboxListResponse.md +2 -0
  96. package/docs/SandboxListResponseAllOfDeletedCost.md +37 -0
  97. package/docs/SavedSnapshot.md +47 -0
  98. package/docs/SavedSnapshotAllowance.md +49 -0
  99. package/docs/SavedSnapshotDeletedResponse.md +38 -0
  100. package/docs/SavedSnapshotInfoResponse.md +36 -0
  101. package/docs/SavedSnapshotListResponse.md +38 -0
  102. package/docs/SavedSnapshotSaveRequest.md +34 -0
  103. package/docs/SavedSnapshotSavingResponse.md +38 -0
  104. package/docs/UpdateCredentialProfileRequest.md +2 -0
  105. package/docs/UpdateSandboxEnvironmentRequest.md +2 -0
  106. package/package.json +1 -1
  107. package/src/apis/BoatApi.ts +277 -15
  108. package/src/models/CreateSandboxRequest.ts +3 -3
  109. package/src/models/CredentialId.ts +3 -0
  110. package/src/models/CredentialProfile.ts +15 -0
  111. package/src/models/DeletionOperation.ts +1 -1
  112. package/src/models/ResourceAccess.ts +75 -0
  113. package/src/models/ResourceAccessUpdate.ts +74 -0
  114. package/src/models/Sandbox.ts +15 -0
  115. package/src/models/SandboxEnvironment.ts +15 -0
  116. package/src/models/SandboxLastReboot.ts +85 -0
  117. package/src/models/SandboxListResponse.ts +15 -0
  118. package/src/models/SandboxListResponseAllOfDeletedCost.ts +84 -0
  119. package/src/models/SavedSnapshot.ts +137 -0
  120. package/src/models/SavedSnapshotAllowance.ts +130 -0
  121. package/src/models/SavedSnapshotDeletedResponse.ts +111 -0
  122. package/src/models/SavedSnapshotInfoResponse.ts +102 -0
  123. package/src/models/SavedSnapshotListResponse.ts +117 -0
  124. package/src/models/SavedSnapshotSaveRequest.ts +75 -0
  125. package/src/models/SavedSnapshotSavingResponse.ts +119 -0
  126. package/src/models/SnapshotSummary.ts +1 -1
  127. package/src/models/UpdateCredentialProfileRequest.ts +16 -0
  128. package/src/models/UpdateSandboxEnvironmentRequest.ts +15 -0
  129. package/src/models/index.ts +11 -0
@@ -0,0 +1,75 @@
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
+ * Which organization members can use this organization environment or profile. `restricted` false means every member. `restricted` true means owners, admins and `members` only. Others do not see it in lists. Personal environments and profiles always return `restricted` false.
18
+ * @export
19
+ * @interface ResourceAccess
20
+ */
21
+ export interface ResourceAccess {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof ResourceAccess
26
+ */
27
+ restricted: boolean;
28
+ /**
29
+ * Member ids. Empty when `restricted` is false.
30
+ * @type {Array<string>}
31
+ * @memberof ResourceAccess
32
+ */
33
+ members: Array<string>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ResourceAccess interface.
38
+ */
39
+ export function instanceOfResourceAccess(value: object): value is ResourceAccess {
40
+ if (!('restricted' in value) || value['restricted'] === undefined) return false;
41
+ if (!('members' in value) || value['members'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ResourceAccessFromJSON(json: any): ResourceAccess {
46
+ return ResourceAccessFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ResourceAccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceAccess {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'restricted': json['restricted'],
56
+ 'members': json['members'],
57
+ };
58
+ }
59
+
60
+ export function ResourceAccessToJSON(json: any): ResourceAccess {
61
+ return ResourceAccessToJSONTyped(json, false);
62
+ }
63
+
64
+ export function ResourceAccessToJSONTyped(value?: ResourceAccess | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'restricted': value['restricted'],
72
+ 'members': value['members'],
73
+ };
74
+ }
75
+
@@ -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
+ * Set who can use an organization environment (owner or admin) or profile (owner). A change does not touch running sandboxes. A bad list returns `400 invalid_access`.
18
+ * @export
19
+ * @interface ResourceAccessUpdate
20
+ */
21
+ export interface ResourceAccessUpdate {
22
+ /**
23
+ * False opens it to every member. True limits it to owners, admins and `members`.
24
+ * @type {boolean}
25
+ * @memberof ResourceAccessUpdate
26
+ */
27
+ restricted: boolean;
28
+ /**
29
+ * Member ids or emails of active members. Replaces the full list.
30
+ * @type {Array<string>}
31
+ * @memberof ResourceAccessUpdate
32
+ */
33
+ members?: Array<string>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ResourceAccessUpdate interface.
38
+ */
39
+ export function instanceOfResourceAccessUpdate(value: object): value is ResourceAccessUpdate {
40
+ if (!('restricted' in value) || value['restricted'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ResourceAccessUpdateFromJSON(json: any): ResourceAccessUpdate {
45
+ return ResourceAccessUpdateFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ResourceAccessUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceAccessUpdate {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'restricted': json['restricted'],
55
+ 'members': json['members'] == null ? undefined : json['members'],
56
+ };
57
+ }
58
+
59
+ export function ResourceAccessUpdateToJSON(json: any): ResourceAccessUpdate {
60
+ return ResourceAccessUpdateToJSONTyped(json, false);
61
+ }
62
+
63
+ export function ResourceAccessUpdateToJSONTyped(value?: ResourceAccessUpdate | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'restricted': value['restricted'],
71
+ 'members': value['members'],
72
+ };
73
+ }
74
+
@@ -27,6 +27,13 @@ import {
27
27
  StopOperationToJSON,
28
28
  StopOperationToJSONTyped,
29
29
  } from './StopOperation';
30
+ import type { SandboxLastReboot } from './SandboxLastReboot';
31
+ import {
32
+ SandboxLastRebootFromJSON,
33
+ SandboxLastRebootFromJSONTyped,
34
+ SandboxLastRebootToJSON,
35
+ SandboxLastRebootToJSONTyped,
36
+ } from './SandboxLastReboot';
30
37
  import type { SandboxCost } from './SandboxCost';
31
38
  import {
32
39
  SandboxCostFromJSON,
@@ -294,6 +301,12 @@ export interface Sandbox {
294
301
  * @memberof Sandbox
295
302
  */
296
303
  lastSnapshotStatus?: SandboxLastSnapshotStatusEnum | null;
304
+ /**
305
+ *
306
+ * @type {SandboxLastReboot}
307
+ * @memberof Sandbox
308
+ */
309
+ lastReboot?: SandboxLastReboot;
297
310
  /**
298
311
  * Outcome of the create-time `setupScript`: `pending` (stored, not yet started), `running` (executing on the sandbox in the background), `done` (exit code 0) or `failed` (non-zero exit, or the sandbox lost track of the process). Null when the sandbox was created without a setup script.
299
312
  * @type {SandboxSetupStatusEnum}
@@ -480,6 +493,7 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
480
493
  'subdomain': json['subdomain'] == null ? undefined : json['subdomain'],
481
494
  'lastSnapshotAttemptAt': json['lastSnapshotAttemptAt'] == null ? undefined : (new Date(json['lastSnapshotAttemptAt'])),
482
495
  'lastSnapshotStatus': json['lastSnapshotStatus'] == null ? undefined : json['lastSnapshotStatus'],
496
+ 'lastReboot': json['lastReboot'] == null ? undefined : SandboxLastRebootFromJSON(json['lastReboot']),
483
497
  'setupStatus': json['setupStatus'] == null ? undefined : json['setupStatus'],
484
498
  'setupError': json['setupError'] == null ? undefined : json['setupError'],
485
499
  'environment': json['environment'] == null ? undefined : json['environment'],
@@ -540,6 +554,7 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
540
554
  'subdomain': value['subdomain'],
541
555
  'lastSnapshotAttemptAt': value['lastSnapshotAttemptAt'] == null ? value['lastSnapshotAttemptAt'] : value['lastSnapshotAttemptAt'].toISOString(),
542
556
  'lastSnapshotStatus': value['lastSnapshotStatus'],
557
+ 'lastReboot': SandboxLastRebootToJSON(value['lastReboot']),
543
558
  'setupStatus': value['setupStatus'],
544
559
  'setupError': value['setupError'],
545
560
  'environment': value['environment'],
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ResourceAccess } from './ResourceAccess';
17
+ import {
18
+ ResourceAccessFromJSON,
19
+ ResourceAccessFromJSONTyped,
20
+ ResourceAccessToJSON,
21
+ ResourceAccessToJSONTyped,
22
+ } from './ResourceAccess';
16
23
  import type { SelectedRepository } from './SelectedRepository';
17
24
  import {
18
25
  SelectedRepositoryFromJSON,
@@ -119,6 +126,12 @@ export interface SandboxEnvironment {
119
126
  * @memberof SandboxEnvironment
120
127
  */
121
128
  proxyAiCredentials?: boolean;
129
+ /**
130
+ *
131
+ * @type {ResourceAccess}
132
+ * @memberof SandboxEnvironment
133
+ */
134
+ access?: ResourceAccess;
122
135
  /**
123
136
  * The latest version's .env-style content. Treat as sensitive.
124
137
  * @type {string}
@@ -187,6 +200,7 @@ export function SandboxEnvironmentFromJSONTyped(json: any, ignoreDiscriminator:
187
200
  'passAgentsCredentials': json['passAgentsCredentials'],
188
201
  'credentialProfileId': json['credentialProfileId'] == null ? undefined : json['credentialProfileId'],
189
202
  'proxyAiCredentials': json['proxyAiCredentials'] == null ? undefined : json['proxyAiCredentials'],
203
+ 'access': json['access'] == null ? undefined : ResourceAccessFromJSON(json['access']),
190
204
  'envContents': json['envContents'],
191
205
  'secretFiles': ((json['secretFiles'] as Array<any>).map(SecretFileFromJSON)),
192
206
  'selectedRepositories': json['selectedRepositories'] == null ? undefined : ((json['selectedRepositories'] as Array<any>).map(SelectedRepositoryFromJSON)),
@@ -218,6 +232,7 @@ export function SandboxEnvironmentToJSONTyped(value?: SandboxEnvironment | null,
218
232
  'passAgentsCredentials': value['passAgentsCredentials'],
219
233
  'credentialProfileId': value['credentialProfileId'],
220
234
  'proxyAiCredentials': value['proxyAiCredentials'],
235
+ 'access': ResourceAccessToJSON(value['access']),
221
236
  'envContents': value['envContents'],
222
237
  'secretFiles': ((value['secretFiles'] as Array<any>).map(SecretFileToJSON)),
223
238
  'selectedRepositories': value['selectedRepositories'] == null ? undefined : ((value['selectedRepositories'] as Array<any>).map(SelectedRepositoryToJSON)),
@@ -0,0 +1,85 @@
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
+ * The last time the sandbox's kernel restarted on its machine, or null if it never did. Every process running at that time ended. `crash` means the system log ended with no shutdown, for example after a kernel panic.
18
+ * @export
19
+ * @interface SandboxLastReboot
20
+ */
21
+ export interface SandboxLastReboot {
22
+ /**
23
+ *
24
+ * @type {Date}
25
+ * @memberof SandboxLastReboot
26
+ */
27
+ at?: Date;
28
+ /**
29
+ *
30
+ * @type {SandboxLastRebootReasonEnum}
31
+ * @memberof SandboxLastReboot
32
+ */
33
+ reason?: SandboxLastRebootReasonEnum;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const SandboxLastRebootReasonEnum = {
41
+ Crash: 'crash',
42
+ Clean: 'clean',
43
+ Unknown: 'unknown'
44
+ } as const;
45
+ export type SandboxLastRebootReasonEnum = typeof SandboxLastRebootReasonEnum[keyof typeof SandboxLastRebootReasonEnum];
46
+
47
+
48
+ /**
49
+ * Check if a given object implements the SandboxLastReboot interface.
50
+ */
51
+ export function instanceOfSandboxLastReboot(value: object): value is SandboxLastReboot {
52
+ return true;
53
+ }
54
+
55
+ export function SandboxLastRebootFromJSON(json: any): SandboxLastReboot {
56
+ return SandboxLastRebootFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function SandboxLastRebootFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxLastReboot {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'at': json['at'] == null ? undefined : (new Date(json['at'])),
66
+ 'reason': json['reason'] == null ? undefined : json['reason'],
67
+ };
68
+ }
69
+
70
+ export function SandboxLastRebootToJSON(json: any): SandboxLastReboot {
71
+ return SandboxLastRebootToJSONTyped(json, false);
72
+ }
73
+
74
+ export function SandboxLastRebootToJSONTyped(value?: SandboxLastReboot | null, ignoreDiscriminator: boolean = false): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+
79
+ return {
80
+
81
+ 'at': value['at'] == null ? value['at'] : value['at'].toISOString(),
82
+ 'reason': value['reason'],
83
+ };
84
+ }
85
+
@@ -20,6 +20,13 @@ import {
20
20
  PageInfoToJSON,
21
21
  PageInfoToJSONTyped,
22
22
  } from './PageInfo';
23
+ import type { SandboxListResponseAllOfDeletedCost } from './SandboxListResponseAllOfDeletedCost';
24
+ import {
25
+ SandboxListResponseAllOfDeletedCostFromJSON,
26
+ SandboxListResponseAllOfDeletedCostFromJSONTyped,
27
+ SandboxListResponseAllOfDeletedCostToJSON,
28
+ SandboxListResponseAllOfDeletedCostToJSONTyped,
29
+ } from './SandboxListResponseAllOfDeletedCost';
23
30
  import type { Sandbox } from './Sandbox';
24
31
  import {
25
32
  SandboxFromJSON,
@@ -58,6 +65,12 @@ export interface SandboxListResponse {
58
65
  * @memberof SandboxListResponse
59
66
  */
60
67
  pageInfo?: PageInfo;
68
+ /**
69
+ *
70
+ * @type {SandboxListResponseAllOfDeletedCost}
71
+ * @memberof SandboxListResponse
72
+ */
73
+ deletedCost?: SandboxListResponseAllOfDeletedCost;
61
74
  }
62
75
 
63
76
 
@@ -94,6 +107,7 @@ export function SandboxListResponseFromJSONTyped(json: any, ignoreDiscriminator:
94
107
  'type': json['type'],
95
108
  'sandboxes': ((json['sandboxes'] as Array<any>).map(SandboxFromJSON)),
96
109
  'pageInfo': json['pageInfo'] == null ? undefined : PageInfoFromJSON(json['pageInfo']),
110
+ 'deletedCost': json['deletedCost'] == null ? undefined : SandboxListResponseAllOfDeletedCostFromJSON(json['deletedCost']),
97
111
  };
98
112
  }
99
113
 
@@ -112,6 +126,7 @@ export function SandboxListResponseToJSONTyped(value?: SandboxListResponse | nul
112
126
  'type': value['type'],
113
127
  'sandboxes': ((value['sandboxes'] as Array<any>).map(SandboxToJSON)),
114
128
  'pageInfo': PageInfoToJSON(value['pageInfo']),
129
+ 'deletedCost': SandboxListResponseAllOfDeletedCostToJSON(value['deletedCost']),
115
130
  };
116
131
  }
117
132
 
@@ -0,0 +1,84 @@
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
+ * Only with `include=cost`, and not for an API key limited to some sandboxes. Machine time this calendar month (UTC) of deleted sandboxes this list would otherwise show. They are not in the list, but their time was billed. Add it to the sandboxes' `cost` to get the full total.
18
+ * @export
19
+ * @interface SandboxListResponseAllOfDeletedCost
20
+ */
21
+ export interface SandboxListResponseAllOfDeletedCost {
22
+ /**
23
+ * The 1st of this month, 00:00 UTC.
24
+ * @type {Date}
25
+ * @memberof SandboxListResponseAllOfDeletedCost
26
+ */
27
+ since: Date;
28
+ /**
29
+ * Billable machine-seconds, size multiplier applied.
30
+ * @type {number}
31
+ * @memberof SandboxListResponseAllOfDeletedCost
32
+ */
33
+ seconds: number;
34
+ /**
35
+ * seconds / secondsPerDollar, at list price.
36
+ * @type {number}
37
+ * @memberof SandboxListResponseAllOfDeletedCost
38
+ */
39
+ dollars: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the SandboxListResponseAllOfDeletedCost interface.
44
+ */
45
+ export function instanceOfSandboxListResponseAllOfDeletedCost(value: object): value is SandboxListResponseAllOfDeletedCost {
46
+ if (!('since' in value) || value['since'] === undefined) return false;
47
+ if (!('seconds' in value) || value['seconds'] === undefined) return false;
48
+ if (!('dollars' in value) || value['dollars'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function SandboxListResponseAllOfDeletedCostFromJSON(json: any): SandboxListResponseAllOfDeletedCost {
53
+ return SandboxListResponseAllOfDeletedCostFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function SandboxListResponseAllOfDeletedCostFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxListResponseAllOfDeletedCost {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'since': (new Date(json['since'])),
63
+ 'seconds': json['seconds'],
64
+ 'dollars': json['dollars'],
65
+ };
66
+ }
67
+
68
+ export function SandboxListResponseAllOfDeletedCostToJSON(json: any): SandboxListResponseAllOfDeletedCost {
69
+ return SandboxListResponseAllOfDeletedCostToJSONTyped(json, false);
70
+ }
71
+
72
+ export function SandboxListResponseAllOfDeletedCostToJSONTyped(value?: SandboxListResponseAllOfDeletedCost | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'since': value['since'].toISOString(),
80
+ 'seconds': value['seconds'],
81
+ 'dollars': value['dollars'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,137 @@
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
+ * A saved snapshot: a frozen copy of a sandbox's disk at one moment, saved under a name you pick. Independent of the source sandbox's later life: the sandbox can change, stop, or be deleted and the saved snapshot still deploys. Saved snapshots never expire; re-saving a name replaces its artifact.
18
+ * @export
19
+ * @interface SavedSnapshot
20
+ */
21
+ export interface SavedSnapshot {
22
+ /**
23
+ * The user-chosen handle, unique within your account.
24
+ * @type {string}
25
+ * @memberof SavedSnapshot
26
+ */
27
+ name: string;
28
+ /**
29
+ * `saving` while the capture and pin are in flight (a live source sandbox takes a fresh snapshot first, which can run minutes), `ready` when deployable, `failed` if the save did not complete (see `error`; save again to retry).
30
+ * @type {SavedSnapshotStatusEnum}
31
+ * @memberof SavedSnapshot
32
+ */
33
+ status: SavedSnapshotStatusEnum;
34
+ /**
35
+ * Failure reason. Only present when `status` is `failed`.
36
+ * @type {string}
37
+ * @memberof SavedSnapshot
38
+ */
39
+ error?: string;
40
+ /**
41
+ * The sandbox this snapshot was saved from (display only).
42
+ * @type {string}
43
+ * @memberof SavedSnapshot
44
+ */
45
+ sourceSandboxId: string;
46
+ /**
47
+ * The frozen artifact behind the name. Present once `status` is `ready`. Accepted by `GET /api/boat/snapshots/{snapshotId}/tree` to browse its files.
48
+ * @type {string}
49
+ * @memberof SavedSnapshot
50
+ */
51
+ snapshotId?: string;
52
+ /**
53
+ * Sandbox type the snapshot was saved from. Deploys default to it.
54
+ * @type {string}
55
+ * @memberof SavedSnapshot
56
+ */
57
+ type?: string;
58
+ /**
59
+ * Restored content size of the frozen state, in bytes.
60
+ * @type {number}
61
+ * @memberof SavedSnapshot
62
+ */
63
+ sizeBytes?: number;
64
+ /**
65
+ *
66
+ * @type {Date}
67
+ * @memberof SavedSnapshot
68
+ */
69
+ createdAt: Date;
70
+ }
71
+
72
+
73
+ /**
74
+ * @export
75
+ */
76
+ export const SavedSnapshotStatusEnum = {
77
+ Saving: 'saving',
78
+ Ready: 'ready',
79
+ Failed: 'failed'
80
+ } as const;
81
+ export type SavedSnapshotStatusEnum = typeof SavedSnapshotStatusEnum[keyof typeof SavedSnapshotStatusEnum];
82
+
83
+
84
+ /**
85
+ * Check if a given object implements the SavedSnapshot interface.
86
+ */
87
+ export function instanceOfSavedSnapshot(value: object): value is SavedSnapshot {
88
+ if (!('name' in value) || value['name'] === undefined) return false;
89
+ if (!('status' in value) || value['status'] === undefined) return false;
90
+ if (!('sourceSandboxId' in value) || value['sourceSandboxId'] === undefined) return false;
91
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
92
+ return true;
93
+ }
94
+
95
+ export function SavedSnapshotFromJSON(json: any): SavedSnapshot {
96
+ return SavedSnapshotFromJSONTyped(json, false);
97
+ }
98
+
99
+ export function SavedSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): SavedSnapshot {
100
+ if (json == null) {
101
+ return json;
102
+ }
103
+ return {
104
+
105
+ 'name': json['name'],
106
+ 'status': json['status'],
107
+ 'error': json['error'] == null ? undefined : json['error'],
108
+ 'sourceSandboxId': json['sourceSandboxId'],
109
+ 'snapshotId': json['snapshotId'] == null ? undefined : json['snapshotId'],
110
+ 'type': json['type'] == null ? undefined : json['type'],
111
+ 'sizeBytes': json['sizeBytes'] == null ? undefined : json['sizeBytes'],
112
+ 'createdAt': (new Date(json['createdAt'])),
113
+ };
114
+ }
115
+
116
+ export function SavedSnapshotToJSON(json: any): SavedSnapshot {
117
+ return SavedSnapshotToJSONTyped(json, false);
118
+ }
119
+
120
+ export function SavedSnapshotToJSONTyped(value?: SavedSnapshot | null, ignoreDiscriminator: boolean = false): any {
121
+ if (value == null) {
122
+ return value;
123
+ }
124
+
125
+ return {
126
+
127
+ 'name': value['name'],
128
+ 'status': value['status'],
129
+ 'error': value['error'],
130
+ 'sourceSandboxId': value['sourceSandboxId'],
131
+ 'snapshotId': value['snapshotId'],
132
+ 'type': value['type'],
133
+ 'sizeBytes': value['sizeBytes'],
134
+ 'createdAt': value['createdAt'].toISOString(),
135
+ };
136
+ }
137
+