@boatdev/sdk 1.9.6 → 1.9.8

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 (78) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/dist/apis/BoatApi.d.ts +76 -0
  4. package/dist/apis/BoatApi.js +199 -0
  5. package/dist/boat-helpers.d.ts +23 -0
  6. package/dist/boat-helpers.js +97 -0
  7. package/dist/esm/apis/BoatApi.d.ts +76 -0
  8. package/dist/esm/apis/BoatApi.js +199 -0
  9. package/dist/esm/boat-helpers.d.ts +23 -0
  10. package/dist/esm/boat-helpers.js +95 -0
  11. package/dist/esm/models/CredentialAccount.d.ts +50 -0
  12. package/dist/esm/models/CredentialAccount.js +53 -0
  13. package/dist/esm/models/CredentialAccountsResponse.d.ts +64 -0
  14. package/dist/esm/models/CredentialAccountsResponse.js +65 -0
  15. package/dist/esm/models/CredentialProfile.d.ts +9 -0
  16. package/dist/esm/models/CredentialProfile.js +2 -0
  17. package/dist/esm/models/DeletionOperation.d.ts +1 -3
  18. package/dist/esm/models/DeletionOperation.js +0 -2
  19. package/dist/esm/models/LimitsFields.d.ts +7 -0
  20. package/dist/esm/models/LimitsFields.js +3 -0
  21. package/dist/esm/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
  22. package/dist/esm/models/LimitsFieldsMachineTypesInner.js +60 -0
  23. package/dist/esm/models/LimitsResponse.d.ts +7 -0
  24. package/dist/esm/models/LimitsResponse.js +3 -0
  25. package/dist/esm/models/Sandbox.d.ts +15 -2
  26. package/dist/esm/models/Sandbox.js +5 -0
  27. package/dist/esm/models/SandboxHydration.d.ts +50 -0
  28. package/dist/esm/models/SandboxHydration.js +55 -0
  29. package/dist/esm/models/SetCredentialKeyRequest.d.ts +6 -0
  30. package/dist/esm/models/SetCredentialKeyRequest.js +2 -0
  31. package/dist/esm/models/index.d.ts +4 -0
  32. package/dist/esm/models/index.js +4 -0
  33. package/dist/models/CredentialAccount.d.ts +50 -0
  34. package/dist/models/CredentialAccount.js +60 -0
  35. package/dist/models/CredentialAccountsResponse.d.ts +64 -0
  36. package/dist/models/CredentialAccountsResponse.js +72 -0
  37. package/dist/models/CredentialProfile.d.ts +9 -0
  38. package/dist/models/CredentialProfile.js +2 -0
  39. package/dist/models/DeletionOperation.d.ts +1 -3
  40. package/dist/models/DeletionOperation.js +0 -2
  41. package/dist/models/LimitsFields.d.ts +7 -0
  42. package/dist/models/LimitsFields.js +3 -0
  43. package/dist/models/LimitsFieldsMachineTypesInner.d.ts +54 -0
  44. package/dist/models/LimitsFieldsMachineTypesInner.js +68 -0
  45. package/dist/models/LimitsResponse.d.ts +7 -0
  46. package/dist/models/LimitsResponse.js +3 -0
  47. package/dist/models/Sandbox.d.ts +15 -2
  48. package/dist/models/Sandbox.js +5 -0
  49. package/dist/models/SandboxHydration.d.ts +50 -0
  50. package/dist/models/SandboxHydration.js +62 -0
  51. package/dist/models/SetCredentialKeyRequest.d.ts +6 -0
  52. package/dist/models/SetCredentialKeyRequest.js +2 -0
  53. package/dist/models/index.d.ts +4 -0
  54. package/dist/models/index.js +4 -0
  55. package/docs/BoatApi.md +325 -0
  56. package/docs/CredentialAccount.md +39 -0
  57. package/docs/CredentialAccountsResponse.md +42 -0
  58. package/docs/CredentialProfile.md +2 -0
  59. package/docs/LimitsFields.md +2 -0
  60. package/docs/LimitsFieldsMachineTypesInner.md +36 -0
  61. package/docs/LimitsResponse.md +2 -0
  62. package/docs/Sandbox.md +4 -0
  63. package/docs/SandboxHydration.md +39 -0
  64. package/docs/SetCredentialKeyRequest.md +2 -0
  65. package/package.json +2 -2
  66. package/src/apis/BoatApi.ts +307 -0
  67. package/src/boat-helpers.ts +109 -0
  68. package/src/models/CredentialAccount.ts +92 -0
  69. package/src/models/CredentialAccountsResponse.ts +128 -0
  70. package/src/models/CredentialProfile.ts +15 -0
  71. package/src/models/DeletionOperation.ts +1 -3
  72. package/src/models/LimitsFields.ts +15 -0
  73. package/src/models/LimitsFieldsMachineTypesInner.ts +97 -0
  74. package/src/models/LimitsResponse.ts +15 -0
  75. package/src/models/Sandbox.ts +25 -2
  76. package/src/models/SandboxHydration.ts +93 -0
  77. package/src/models/SetCredentialKeyRequest.ts +8 -0
  78. package/src/models/index.ts +4 -0
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * One account of a credential. Never a secret.
14
+ * @export
15
+ * @interface CredentialAccount
16
+ */
17
+ export interface CredentialAccount {
18
+ /**
19
+ * The account's id. It stays the same across switches.
20
+ * @type {string}
21
+ * @memberof CredentialAccount
22
+ */
23
+ id: string;
24
+ /**
25
+ * The account's email for a sign-in, or the key's last characters (…1234).
26
+ * @type {string}
27
+ * @memberof CredentialAccount
28
+ */
29
+ label: string;
30
+ /**
31
+ * True for the account every sandbox on the profile uses.
32
+ * @type {boolean}
33
+ * @memberof CredentialAccount
34
+ */
35
+ active: boolean;
36
+ /**
37
+ * When the account was set aside (accounts not in use).
38
+ * @type {Date}
39
+ * @memberof CredentialAccount
40
+ */
41
+ addedAt?: Date;
42
+ }
43
+ /**
44
+ * Check if a given object implements the CredentialAccount interface.
45
+ */
46
+ export declare function instanceOfCredentialAccount(value: object): value is CredentialAccount;
47
+ export declare function CredentialAccountFromJSON(json: any): CredentialAccount;
48
+ export declare function CredentialAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): CredentialAccount;
49
+ export declare function CredentialAccountToJSON(json: any): CredentialAccount;
50
+ export declare function CredentialAccountToJSONTyped(value?: CredentialAccount | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Boat Public API v1
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfCredentialAccount = instanceOfCredentialAccount;
17
+ exports.CredentialAccountFromJSON = CredentialAccountFromJSON;
18
+ exports.CredentialAccountFromJSONTyped = CredentialAccountFromJSONTyped;
19
+ exports.CredentialAccountToJSON = CredentialAccountToJSON;
20
+ exports.CredentialAccountToJSONTyped = CredentialAccountToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CredentialAccount interface.
23
+ */
24
+ function instanceOfCredentialAccount(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('label' in value) || value['label'] === undefined)
28
+ return false;
29
+ if (!('active' in value) || value['active'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function CredentialAccountFromJSON(json) {
34
+ return CredentialAccountFromJSONTyped(json, false);
35
+ }
36
+ function CredentialAccountFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'id': json['id'],
42
+ 'label': json['label'],
43
+ 'active': json['active'],
44
+ 'addedAt': json['addedAt'] == null ? undefined : (new Date(json['addedAt'])),
45
+ };
46
+ }
47
+ function CredentialAccountToJSON(json) {
48
+ return CredentialAccountToJSONTyped(json, false);
49
+ }
50
+ function CredentialAccountToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'id': value['id'],
56
+ 'label': value['label'],
57
+ 'active': value['active'],
58
+ 'addedAt': value['addedAt'] == null ? value['addedAt'] : value['addedAt'].toISOString(),
59
+ };
60
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { CredentialId } from './CredentialId';
13
+ import type { CredentialAccount } from './CredentialAccount';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface CredentialAccountsResponse
18
+ */
19
+ export interface CredentialAccountsResponse {
20
+ /**
21
+ *
22
+ * @type {boolean}
23
+ * @memberof CredentialAccountsResponse
24
+ */
25
+ ok: boolean;
26
+ /**
27
+ * Stable success envelope discriminator added by v1.
28
+ * @type {string}
29
+ * @memberof CredentialAccountsResponse
30
+ */
31
+ type: string;
32
+ /**
33
+ *
34
+ * @type {boolean}
35
+ * @memberof CredentialAccountsResponse
36
+ */
37
+ success: boolean;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof CredentialAccountsResponse
42
+ */
43
+ profileId: string;
44
+ /**
45
+ *
46
+ * @type {CredentialId}
47
+ * @memberof CredentialAccountsResponse
48
+ */
49
+ credential: CredentialId;
50
+ /**
51
+ * In the order the accounts were added, so their numbers stay the same across switches. The one in use is marked `active`.
52
+ * @type {Array<CredentialAccount>}
53
+ * @memberof CredentialAccountsResponse
54
+ */
55
+ accounts: Array<CredentialAccount>;
56
+ }
57
+ /**
58
+ * Check if a given object implements the CredentialAccountsResponse interface.
59
+ */
60
+ export declare function instanceOfCredentialAccountsResponse(value: object): value is CredentialAccountsResponse;
61
+ export declare function CredentialAccountsResponseFromJSON(json: any): CredentialAccountsResponse;
62
+ export declare function CredentialAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CredentialAccountsResponse;
63
+ export declare function CredentialAccountsResponseToJSON(json: any): CredentialAccountsResponse;
64
+ export declare function CredentialAccountsResponseToJSONTyped(value?: CredentialAccountsResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Boat Public API v1
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfCredentialAccountsResponse = instanceOfCredentialAccountsResponse;
17
+ exports.CredentialAccountsResponseFromJSON = CredentialAccountsResponseFromJSON;
18
+ exports.CredentialAccountsResponseFromJSONTyped = CredentialAccountsResponseFromJSONTyped;
19
+ exports.CredentialAccountsResponseToJSON = CredentialAccountsResponseToJSON;
20
+ exports.CredentialAccountsResponseToJSONTyped = CredentialAccountsResponseToJSONTyped;
21
+ const CredentialId_1 = require("./CredentialId");
22
+ const CredentialAccount_1 = require("./CredentialAccount");
23
+ /**
24
+ * Check if a given object implements the CredentialAccountsResponse interface.
25
+ */
26
+ function instanceOfCredentialAccountsResponse(value) {
27
+ if (!('ok' in value) || value['ok'] === undefined)
28
+ return false;
29
+ if (!('type' in value) || value['type'] === undefined)
30
+ return false;
31
+ if (!('success' in value) || value['success'] === undefined)
32
+ return false;
33
+ if (!('profileId' in value) || value['profileId'] === undefined)
34
+ return false;
35
+ if (!('credential' in value) || value['credential'] === undefined)
36
+ return false;
37
+ if (!('accounts' in value) || value['accounts'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function CredentialAccountsResponseFromJSON(json) {
42
+ return CredentialAccountsResponseFromJSONTyped(json, false);
43
+ }
44
+ function CredentialAccountsResponseFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'ok': json['ok'],
50
+ 'type': json['type'],
51
+ 'success': json['success'],
52
+ 'profileId': json['profileId'],
53
+ 'credential': (0, CredentialId_1.CredentialIdFromJSON)(json['credential']),
54
+ 'accounts': (json['accounts'].map(CredentialAccount_1.CredentialAccountFromJSON)),
55
+ };
56
+ }
57
+ function CredentialAccountsResponseToJSON(json) {
58
+ return CredentialAccountsResponseToJSONTyped(json, false);
59
+ }
60
+ function CredentialAccountsResponseToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'ok': value['ok'],
66
+ 'type': value['type'],
67
+ 'success': value['success'],
68
+ 'profileId': value['profileId'],
69
+ 'credential': (0, CredentialId_1.CredentialIdToJSON)(value['credential']),
70
+ 'accounts': (value['accounts'].map(CredentialAccount_1.CredentialAccountToJSON)),
71
+ };
72
+ }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { CredentialId } from './CredentialId';
13
13
  import type { CredentialProfileOwner } from './CredentialProfileOwner';
14
+ import type { CredentialAccount } from './CredentialAccount';
14
15
  /**
15
16
  * A named set of AI credentials. Secret values are never returned.
16
17
  * @export
@@ -53,6 +54,14 @@ export interface CredentialProfile {
53
54
  * @memberof CredentialProfile
54
55
  */
55
56
  connected: Array<CredentialId>;
57
+ /**
58
+ * Credentials with several accounts, keyed by credential id. Each lists every account (labels only), the one in use marked `active`. Empty when you cannot manage the profile.
59
+ * @type {{ [key: string]: Array<CredentialAccount>; }}
60
+ * @memberof CredentialProfile
61
+ */
62
+ accounts?: {
63
+ [key: string]: Array<CredentialAccount>;
64
+ };
56
65
  /**
57
66
  * The names of the profile's custom APIs. Values are never returned.
58
67
  * @type {Array<string>}
@@ -58,6 +58,7 @@ function CredentialProfileFromJSONTyped(json, ignoreDiscriminator) {
58
58
  'owner': (0, CredentialProfileOwner_1.CredentialProfileOwnerFromJSON)(json['owner']),
59
59
  'canManage': json['canManage'],
60
60
  'connected': (json['connected'].map(CredentialId_1.CredentialIdFromJSON)),
61
+ 'accounts': json['accounts'] == null ? undefined : json['accounts'],
61
62
  'customApis': json['customApis'],
62
63
  'createdAt': (new Date(json['createdAt'])),
63
64
  'updatedAt': (new Date(json['updatedAt'])),
@@ -77,6 +78,7 @@ function CredentialProfileToJSONTyped(value, ignoreDiscriminator = false) {
77
78
  'owner': (0, CredentialProfileOwner_1.CredentialProfileOwnerToJSON)(value['owner']),
78
79
  'canManage': value['canManage'],
79
80
  'connected': (value['connected'].map(CredentialId_1.CredentialIdToJSON)),
81
+ 'accounts': value['accounts'],
80
82
  'customApis': value['customApis'],
81
83
  'createdAt': value['createdAt'].toISOString(),
82
84
  'updatedAt': value['updatedAt'].toISOString(),
@@ -46,7 +46,7 @@ export interface DeletionOperation {
46
46
  */
47
47
  status: DeletionOperationStatusEnum;
48
48
  /**
49
- * What the background purge is doing. The target is already gone from every list, restore and fork once the operation exists. `waiting_for_uploads`: stored data is erased once the last upload URL issued for it expires (`expectedBy`). `kept_for_newer_snapshots`: a newer snapshot, or a sandbox forked or deployed from it, still builds on this data; it goes when they go. `waiting_for_restore`: a sandbox is still restoring from it. `retrying`: a transient fault, retried automatically.
49
+ * What the background purge is doing. The target is already gone from every list, restore and fork once the operation exists. `waiting_for_uploads`: stored data is erased once the last upload URL issued for it expires (`expectedBy`). `retrying`: a transient fault, retried automatically. `completed`: a newer snapshot, a fork or a named snapshot made from it keeps the data it reads, until that is deleted too.
50
50
  * @type {DeletionOperationStageEnum}
51
51
  * @memberof DeletionOperation
52
52
  */
@@ -109,8 +109,6 @@ export type DeletionOperationStatusEnum = typeof DeletionOperationStatusEnum[key
109
109
  export declare const DeletionOperationStageEnum: {
110
110
  readonly Removing: 'removing';
111
111
  readonly WaitingForUploads: 'waiting_for_uploads';
112
- readonly KeptForNewerSnapshots: 'kept_for_newer_snapshots';
113
- readonly WaitingForRestore: 'waiting_for_restore';
114
112
  readonly Retrying: 'retrying';
115
113
  readonly Completed: 'completed';
116
114
  };
@@ -49,8 +49,6 @@ exports.DeletionOperationStatusEnum = {
49
49
  exports.DeletionOperationStageEnum = {
50
50
  Removing: 'removing',
51
51
  WaitingForUploads: 'waiting_for_uploads',
52
- KeptForNewerSnapshots: 'kept_for_newer_snapshots',
53
- WaitingForRestore: 'waiting_for_restore',
54
52
  Retrying: 'retrying',
55
53
  Completed: 'completed'
56
54
  };
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { LimitsFieldsGiftLimit } from './LimitsFieldsGiftLimit';
13
13
  import type { LimitsFieldsCurrentLimits } from './LimitsFieldsCurrentLimits';
14
+ import type { LimitsFieldsMachineTypesInner } from './LimitsFieldsMachineTypesInner';
14
15
  import type { LimitsFieldsStartLimits } from './LimitsFieldsStartLimits';
15
16
  import type { LimitsFieldsStarts } from './LimitsFieldsStarts';
16
17
  import type { LimitsFieldsSandboxPlanTiersInner } from './LimitsFieldsSandboxPlanTiersInner';
@@ -271,6 +272,12 @@ export interface LimitsFields {
271
272
  * @memberof LimitsFields
272
273
  */
273
274
  trialLine?: string | null;
275
+ /**
276
+ * Each sandbox type, and whether this account can create it now. A blocked type carries the reason.
277
+ * @type {Array<LimitsFieldsMachineTypesInner>}
278
+ * @memberof LimitsFields
279
+ */
280
+ machineTypes?: Array<LimitsFieldsMachineTypesInner>;
274
281
  /**
275
282
  *
276
283
  * @type {LimitsFieldsGiftLimit}
@@ -20,6 +20,7 @@ exports.LimitsFieldsToJSON = LimitsFieldsToJSON;
20
20
  exports.LimitsFieldsToJSONTyped = LimitsFieldsToJSONTyped;
21
21
  const LimitsFieldsGiftLimit_1 = require("./LimitsFieldsGiftLimit");
22
22
  const LimitsFieldsCurrentLimits_1 = require("./LimitsFieldsCurrentLimits");
23
+ const LimitsFieldsMachineTypesInner_1 = require("./LimitsFieldsMachineTypesInner");
23
24
  const LimitsFieldsStartLimits_1 = require("./LimitsFieldsStartLimits");
24
25
  const LimitsFieldsStarts_1 = require("./LimitsFieldsStarts");
25
26
  const LimitsFieldsSandboxPlanTiersInner_1 = require("./LimitsFieldsSandboxPlanTiersInner");
@@ -87,6 +88,7 @@ function LimitsFieldsFromJSONTyped(json, ignoreDiscriminator) {
87
88
  'last24hUsageSeconds': json['last24hUsageSeconds'] == null ? undefined : json['last24hUsageSeconds'],
88
89
  'trialComputeCapSeconds': json['trialComputeCapSeconds'] == null ? undefined : json['trialComputeCapSeconds'],
89
90
  'trialLine': json['trialLine'] == null ? undefined : json['trialLine'],
91
+ 'machineTypes': json['machineTypes'] == null ? undefined : (json['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerFromJSON)),
90
92
  'giftLimit': json['giftLimit'] == null ? undefined : (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitFromJSON)(json['giftLimit']),
91
93
  'billingStatus': json['billingStatus'],
92
94
  'subscriptionStatus': json['subscriptionStatus'] == null ? undefined : json['subscriptionStatus'],
@@ -149,6 +151,7 @@ function LimitsFieldsToJSONTyped(value, ignoreDiscriminator = false) {
149
151
  'last24hUsageSeconds': value['last24hUsageSeconds'],
150
152
  'trialComputeCapSeconds': value['trialComputeCapSeconds'],
151
153
  'trialLine': value['trialLine'],
154
+ 'machineTypes': value['machineTypes'] == null ? undefined : (value['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerToJSON)),
152
155
  'giftLimit': (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitToJSON)(value['giftLimit']),
153
156
  'billingStatus': value['billingStatus'],
154
157
  'subscriptionStatus': value['subscriptionStatus'],
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface LimitsFieldsMachineTypesInner
16
+ */
17
+ export interface LimitsFieldsMachineTypesInner {
18
+ /**
19
+ *
20
+ * @type {LimitsFieldsMachineTypesInnerTypeEnum}
21
+ * @memberof LimitsFieldsMachineTypesInner
22
+ */
23
+ type: LimitsFieldsMachineTypesInnerTypeEnum;
24
+ /**
25
+ *
26
+ * @type {boolean}
27
+ * @memberof LimitsFieldsMachineTypesInner
28
+ */
29
+ available: boolean;
30
+ /**
31
+ * Why the type is blocked, for example `not during the free trial; the first payment unlocks it`. Null when available.
32
+ * @type {string}
33
+ * @memberof LimitsFieldsMachineTypesInner
34
+ */
35
+ reason: string | null;
36
+ }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const LimitsFieldsMachineTypesInnerTypeEnum: {
41
+ readonly Small: 'small';
42
+ readonly Default: 'default';
43
+ readonly Large: 'large';
44
+ readonly Xlarge: 'xlarge';
45
+ };
46
+ export type LimitsFieldsMachineTypesInnerTypeEnum = typeof LimitsFieldsMachineTypesInnerTypeEnum[keyof typeof LimitsFieldsMachineTypesInnerTypeEnum];
47
+ /**
48
+ * Check if a given object implements the LimitsFieldsMachineTypesInner interface.
49
+ */
50
+ export declare function instanceOfLimitsFieldsMachineTypesInner(value: object): value is LimitsFieldsMachineTypesInner;
51
+ export declare function LimitsFieldsMachineTypesInnerFromJSON(json: any): LimitsFieldsMachineTypesInner;
52
+ export declare function LimitsFieldsMachineTypesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): LimitsFieldsMachineTypesInner;
53
+ export declare function LimitsFieldsMachineTypesInnerToJSON(json: any): LimitsFieldsMachineTypesInner;
54
+ export declare function LimitsFieldsMachineTypesInnerToJSONTyped(value?: LimitsFieldsMachineTypesInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Boat Public API v1
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LimitsFieldsMachineTypesInnerTypeEnum = void 0;
17
+ exports.instanceOfLimitsFieldsMachineTypesInner = instanceOfLimitsFieldsMachineTypesInner;
18
+ exports.LimitsFieldsMachineTypesInnerFromJSON = LimitsFieldsMachineTypesInnerFromJSON;
19
+ exports.LimitsFieldsMachineTypesInnerFromJSONTyped = LimitsFieldsMachineTypesInnerFromJSONTyped;
20
+ exports.LimitsFieldsMachineTypesInnerToJSON = LimitsFieldsMachineTypesInnerToJSON;
21
+ exports.LimitsFieldsMachineTypesInnerToJSONTyped = LimitsFieldsMachineTypesInnerToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.LimitsFieldsMachineTypesInnerTypeEnum = {
26
+ Small: 'small',
27
+ Default: 'default',
28
+ Large: 'large',
29
+ Xlarge: 'xlarge'
30
+ };
31
+ /**
32
+ * Check if a given object implements the LimitsFieldsMachineTypesInner interface.
33
+ */
34
+ function instanceOfLimitsFieldsMachineTypesInner(value) {
35
+ if (!('type' in value) || value['type'] === undefined)
36
+ return false;
37
+ if (!('available' in value) || value['available'] === undefined)
38
+ return false;
39
+ if (!('reason' in value) || value['reason'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function LimitsFieldsMachineTypesInnerFromJSON(json) {
44
+ return LimitsFieldsMachineTypesInnerFromJSONTyped(json, false);
45
+ }
46
+ function LimitsFieldsMachineTypesInnerFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'type': json['type'],
52
+ 'available': json['available'],
53
+ 'reason': json['reason'],
54
+ };
55
+ }
56
+ function LimitsFieldsMachineTypesInnerToJSON(json) {
57
+ return LimitsFieldsMachineTypesInnerToJSONTyped(json, false);
58
+ }
59
+ function LimitsFieldsMachineTypesInnerToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'type': value['type'],
65
+ 'available': value['available'],
66
+ 'reason': value['reason'],
67
+ };
68
+ }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { LimitsFieldsGiftLimit } from './LimitsFieldsGiftLimit';
13
13
  import type { LimitsFieldsCurrentLimits } from './LimitsFieldsCurrentLimits';
14
+ import type { LimitsFieldsMachineTypesInner } from './LimitsFieldsMachineTypesInner';
14
15
  import type { LimitsFieldsStartLimits } from './LimitsFieldsStartLimits';
15
16
  import type { LimitsFieldsStarts } from './LimitsFieldsStarts';
16
17
  import type { LimitsFieldsSandboxPlanTiersInner } from './LimitsFieldsSandboxPlanTiersInner';
@@ -282,6 +283,12 @@ export interface LimitsResponse {
282
283
  * @memberof LimitsResponse
283
284
  */
284
285
  trialLine?: string;
286
+ /**
287
+ * Each sandbox type, and whether this account can create it now. A blocked type carries the reason.
288
+ * @type {Array<LimitsFieldsMachineTypesInner>}
289
+ * @memberof LimitsResponse
290
+ */
291
+ machineTypes?: Array<LimitsFieldsMachineTypesInner>;
285
292
  /**
286
293
  *
287
294
  * @type {LimitsFieldsGiftLimit}
@@ -20,6 +20,7 @@ exports.LimitsResponseToJSON = LimitsResponseToJSON;
20
20
  exports.LimitsResponseToJSONTyped = LimitsResponseToJSONTyped;
21
21
  const LimitsFieldsGiftLimit_1 = require("./LimitsFieldsGiftLimit");
22
22
  const LimitsFieldsCurrentLimits_1 = require("./LimitsFieldsCurrentLimits");
23
+ const LimitsFieldsMachineTypesInner_1 = require("./LimitsFieldsMachineTypesInner");
23
24
  const LimitsFieldsStartLimits_1 = require("./LimitsFieldsStartLimits");
24
25
  const LimitsFieldsStarts_1 = require("./LimitsFieldsStarts");
25
26
  const LimitsFieldsSandboxPlanTiersInner_1 = require("./LimitsFieldsSandboxPlanTiersInner");
@@ -92,6 +93,7 @@ function LimitsResponseFromJSONTyped(json, ignoreDiscriminator) {
92
93
  'last24hUsageSeconds': json['last24hUsageSeconds'] == null ? undefined : json['last24hUsageSeconds'],
93
94
  'trialComputeCapSeconds': json['trialComputeCapSeconds'] == null ? undefined : json['trialComputeCapSeconds'],
94
95
  'trialLine': json['trialLine'] == null ? undefined : json['trialLine'],
96
+ 'machineTypes': json['machineTypes'] == null ? undefined : (json['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerFromJSON)),
95
97
  'giftLimit': json['giftLimit'] == null ? undefined : (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitFromJSON)(json['giftLimit']),
96
98
  'billingStatus': json['billingStatus'],
97
99
  'subscriptionStatus': json['subscriptionStatus'] == null ? undefined : json['subscriptionStatus'],
@@ -155,6 +157,7 @@ function LimitsResponseToJSONTyped(value, ignoreDiscriminator = false) {
155
157
  'last24hUsageSeconds': value['last24hUsageSeconds'],
156
158
  'trialComputeCapSeconds': value['trialComputeCapSeconds'],
157
159
  'trialLine': value['trialLine'],
160
+ 'machineTypes': value['machineTypes'] == null ? undefined : (value['machineTypes'].map(LimitsFieldsMachineTypesInner_1.LimitsFieldsMachineTypesInnerToJSON)),
158
161
  'giftLimit': (0, LimitsFieldsGiftLimit_1.LimitsFieldsGiftLimitToJSON)(value['giftLimit']),
159
162
  'billingStatus': value['billingStatus'],
160
163
  'subscriptionStatus': value['subscriptionStatus'],
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { SandboxTeam } from './SandboxTeam';
13
13
  import type { StopOperation } from './StopOperation';
14
+ import type { SandboxHydration } from './SandboxHydration';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -71,6 +72,12 @@ export interface Sandbox {
71
72
  * @memberof Sandbox
72
73
  */
73
74
  hydratedAt?: Date | null;
75
+ /**
76
+ *
77
+ * @type {SandboxHydration}
78
+ * @memberof Sandbox
79
+ */
80
+ hydration?: SandboxHydration | null;
74
81
  /**
75
82
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
76
83
  * @type {SandboxTypeEnum}
@@ -132,11 +139,17 @@ export interface Sandbox {
132
139
  */
133
140
  updatedAt?: Date | null;
134
141
  /**
135
- * Automatic archival time, or null when auto-stop is disabled.
142
+ * When the sandbox stops by itself (the stop starts within about 5 seconds), or null when auto-stop is disabled. A sandbox whose agent is working gets a fresh full TTL, and this time moves forward.
136
143
  * @type {Date}
137
144
  * @memberof Sandbox
138
145
  */
139
146
  archiveAfter?: Date | null;
147
+ /**
148
+ * The auto-stop length as last set on create, resume, fork or PATCH, or null when auto-stop is disabled.
149
+ * @type {number}
150
+ * @memberof Sandbox
151
+ */
152
+ ttlSeconds?: number | null;
140
153
  /**
141
154
  *
142
155
  * @type {boolean}
@@ -198,7 +211,7 @@ export interface Sandbox {
198
211
  */
199
212
  createdById?: string | null;
200
213
  /**
201
- * What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that is `noEnv` (created with it, or shared and restarted), so you can open, run commands in, prompt, resume and stop it. `view`: a teammate's organization sandbox that still holds their personal logins, so you can see it and stop it until they share it (`POST /sandboxes/{sandboxId}/share`).
214
+ * What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that never received their personal logins (`noEnv`, shared and restarted, or created on an environment that passes nothing), so you can open, run commands in, prompt, resume and stop it. `view`: a teammate's organization sandbox that still holds their personal logins, so you can see it and stop it until they share it (`POST /sandboxes/{sandboxId}/share`).
202
215
  * @type {SandboxAccessEnum}
203
216
  * @memberof Sandbox
204
217
  */
@@ -21,6 +21,7 @@ exports.SandboxToJSON = SandboxToJSON;
21
21
  exports.SandboxToJSONTyped = SandboxToJSONTyped;
22
22
  const SandboxTeam_1 = require("./SandboxTeam");
23
23
  const StopOperation_1 = require("./StopOperation");
24
+ const SandboxHydration_1 = require("./SandboxHydration");
24
25
  /**
25
26
  * @export
26
27
  */
@@ -120,6 +121,7 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
120
121
  'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
121
122
  'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
122
123
  'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
124
+ 'hydration': json['hydration'] == null ? undefined : (0, SandboxHydration_1.SandboxHydrationFromJSON)(json['hydration']),
123
125
  'type': json['type'] == null ? undefined : json['type'],
124
126
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
125
127
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -131,6 +133,7 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
131
133
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
132
134
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
133
135
  'archiveAfter': json['archiveAfter'] == null ? undefined : (new Date(json['archiveAfter'])),
136
+ 'ttlSeconds': json['ttlSeconds'] == null ? undefined : json['ttlSeconds'],
134
137
  'desktopAvailable': json['desktopAvailable'],
135
138
  'desktopUrl': json['desktopUrl'] == null ? undefined : json['desktopUrl'],
136
139
  'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
@@ -171,6 +174,7 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
171
174
  'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
172
175
  'hydrated': value['hydrated'],
173
176
  'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
177
+ 'hydration': (0, SandboxHydration_1.SandboxHydrationToJSON)(value['hydration']),
174
178
  'type': value['type'],
175
179
  'vcpu': value['vcpu'],
176
180
  'memoryGB': value['memoryGB'],
@@ -182,6 +186,7 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
182
186
  'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
183
187
  'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
184
188
  'archiveAfter': value['archiveAfter'] == null ? value['archiveAfter'] : value['archiveAfter'].toISOString(),
189
+ 'ttlSeconds': value['ttlSeconds'],
185
190
  'desktopAvailable': value['desktopAvailable'],
186
191
  'desktopUrl': value['desktopUrl'],
187
192
  'snapshots': value['snapshots'],