@boatdev/sdk 1.9.9 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +8 -0
- package/dist/apis/BoatApi.d.ts +52 -6
- package/dist/apis/BoatApi.js +109 -7
- package/dist/esm/apis/BoatApi.d.ts +52 -6
- package/dist/esm/apis/BoatApi.js +108 -6
- package/dist/esm/models/CreateSandboxRequest.d.ts +7 -1
- package/dist/esm/models/CreateSandboxRequest.js +2 -0
- package/dist/esm/models/CreateSandboxResponse.d.ts +6 -0
- package/dist/esm/models/CreateSandboxResponse.js +2 -0
- package/dist/esm/models/CreateScopedApiKeyRequest.d.ts +1 -1
- package/dist/esm/models/LimitsFields.d.ts +1 -1
- package/dist/esm/models/LimitsResponse.d.ts +1 -1
- package/dist/esm/models/MeResponseAllOfUser.d.ts +1 -0
- package/dist/esm/models/MeResponseAllOfUser.js +1 -0
- package/dist/esm/models/ResumeRequest.d.ts +1 -1
- package/dist/esm/models/Sandbox.d.ts +28 -1
- package/dist/esm/models/Sandbox.js +14 -0
- package/dist/esm/models/SandboxCost.d.ts +44 -0
- package/dist/esm/models/SandboxCost.js +51 -0
- package/dist/esm/models/Unshare200Response.d.ts +39 -0
- package/dist/esm/models/Unshare200Response.js +44 -0
- package/dist/esm/models/UpdateOrganization200Response.d.ts +50 -0
- package/dist/esm/models/UpdateOrganization200Response.js +47 -0
- package/dist/esm/models/UpdateOrganizationRequest.d.ts +32 -0
- package/dist/esm/models/UpdateOrganizationRequest.js +43 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/CreateSandboxRequest.d.ts +7 -1
- package/dist/models/CreateSandboxRequest.js +2 -0
- package/dist/models/CreateSandboxResponse.d.ts +6 -0
- package/dist/models/CreateSandboxResponse.js +2 -0
- package/dist/models/CreateScopedApiKeyRequest.d.ts +1 -1
- package/dist/models/LimitsFields.d.ts +1 -1
- package/dist/models/LimitsResponse.d.ts +1 -1
- package/dist/models/MeResponseAllOfUser.d.ts +1 -0
- package/dist/models/MeResponseAllOfUser.js +1 -0
- package/dist/models/ResumeRequest.d.ts +1 -1
- package/dist/models/Sandbox.d.ts +28 -1
- package/dist/models/Sandbox.js +15 -1
- package/dist/models/SandboxCost.d.ts +44 -0
- package/dist/models/SandboxCost.js +58 -0
- package/dist/models/Unshare200Response.d.ts +39 -0
- package/dist/models/Unshare200Response.js +51 -0
- package/dist/models/UpdateOrganization200Response.d.ts +50 -0
- package/dist/models/UpdateOrganization200Response.js +54 -0
- package/dist/models/UpdateOrganizationRequest.d.ts +32 -0
- package/dist/models/UpdateOrganizationRequest.js +50 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/BoatApi.md +161 -4
- package/docs/CreateSandboxRequest.md +2 -0
- package/docs/CreateSandboxResponse.md +2 -0
- package/docs/Sandbox.md +6 -0
- package/docs/SandboxCost.md +37 -0
- package/docs/Unshare200Response.md +34 -0
- package/docs/UpdateOrganization200Response.md +38 -0
- package/docs/UpdateOrganizationRequest.md +32 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +163 -6
- package/src/models/CreateSandboxRequest.ts +9 -1
- package/src/models/CreateSandboxResponse.ts +8 -0
- package/src/models/CreateScopedApiKeyRequest.ts +1 -1
- package/src/models/LimitsFields.ts +1 -1
- package/src/models/LimitsResponse.ts +1 -1
- package/src/models/MeResponseAllOfUser.ts +1 -0
- package/src/models/ResumeRequest.ts +1 -1
- package/src/models/Sandbox.ts +41 -1
- package/src/models/SandboxCost.ts +84 -0
- package/src/models/Unshare200Response.ts +81 -0
- package/src/models/UpdateOrganization200Response.ts +89 -0
- package/src/models/UpdateOrganizationRequest.ts +66 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateOrganization200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`success` | boolean
|
|
12
|
+
`newSandboxesPrivate` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { UpdateOrganization200Response } from '@boatdev/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"ok": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
"success": null,
|
|
24
|
+
"newSandboxesPrivate": null,
|
|
25
|
+
} satisfies UpdateOrganization200Response
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateOrganization200Response
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateOrganizationRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`newSandboxesPrivate` | boolean
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { UpdateOrganizationRequest } from '@boatdev/sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"newSandboxesPrivate": null,
|
|
19
|
+
} satisfies UpdateOrganizationRequest
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateOrganizationRequest
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
package/package.json
CHANGED
package/src/apis/BoatApi.ts
CHANGED
|
@@ -498,6 +498,11 @@ import {
|
|
|
498
498
|
TelemetrySetResponseFromJSON,
|
|
499
499
|
TelemetrySetResponseToJSON,
|
|
500
500
|
} from '../models/TelemetrySetResponse';
|
|
501
|
+
import {
|
|
502
|
+
type Unshare200Response,
|
|
503
|
+
Unshare200ResponseFromJSON,
|
|
504
|
+
Unshare200ResponseToJSON,
|
|
505
|
+
} from '../models/Unshare200Response';
|
|
501
506
|
import {
|
|
502
507
|
type UpdateAiProxyRequest,
|
|
503
508
|
UpdateAiProxyRequestFromJSON,
|
|
@@ -508,6 +513,16 @@ import {
|
|
|
508
513
|
UpdateCredentialProfileRequestFromJSON,
|
|
509
514
|
UpdateCredentialProfileRequestToJSON,
|
|
510
515
|
} from '../models/UpdateCredentialProfileRequest';
|
|
516
|
+
import {
|
|
517
|
+
type UpdateOrganization200Response,
|
|
518
|
+
UpdateOrganization200ResponseFromJSON,
|
|
519
|
+
UpdateOrganization200ResponseToJSON,
|
|
520
|
+
} from '../models/UpdateOrganization200Response';
|
|
521
|
+
import {
|
|
522
|
+
type UpdateOrganizationRequest,
|
|
523
|
+
UpdateOrganizationRequestFromJSON,
|
|
524
|
+
UpdateOrganizationRequestToJSON,
|
|
525
|
+
} from '../models/UpdateOrganizationRequest';
|
|
511
526
|
import {
|
|
512
527
|
type UpdateSandboxEnvironmentRequest,
|
|
513
528
|
UpdateSandboxEnvironmentRequestFromJSON,
|
|
@@ -911,6 +926,7 @@ export interface SandboxesRequest {
|
|
|
911
926
|
cursor?: string | null;
|
|
912
927
|
sort?: SandboxesSortEnum;
|
|
913
928
|
state?: string;
|
|
929
|
+
include?: SandboxesIncludeEnum;
|
|
914
930
|
}
|
|
915
931
|
|
|
916
932
|
export interface SaveNamedSnapshotRequest {
|
|
@@ -990,6 +1006,10 @@ export interface SwitchCredentialAccountRequest {
|
|
|
990
1006
|
account: string;
|
|
991
1007
|
}
|
|
992
1008
|
|
|
1009
|
+
export interface UnshareRequest {
|
|
1010
|
+
sandboxId: string;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
993
1013
|
export interface UpdateRequest {
|
|
994
1014
|
sandboxId: string;
|
|
995
1015
|
updateSandboxRequest: UpdateSandboxRequest;
|
|
@@ -1016,6 +1036,11 @@ export interface UpdateEnvironmentRequest {
|
|
|
1016
1036
|
org?: string;
|
|
1017
1037
|
}
|
|
1018
1038
|
|
|
1039
|
+
export interface UpdateOrganizationOperationRequest {
|
|
1040
|
+
org: string;
|
|
1041
|
+
updateOrganizationRequest: UpdateOrganizationRequest;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1019
1044
|
export interface UpdateSecretsRequest {
|
|
1020
1045
|
secretsUpdateRequest: SecretsUpdateRequest;
|
|
1021
1046
|
}
|
|
@@ -3872,7 +3897,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3872
3897
|
}
|
|
3873
3898
|
|
|
3874
3899
|
/**
|
|
3875
|
-
* One sandbox\'s proxied AI usage per UTC day, credential and model, and whether it is blocked. Needs an API key with `
|
|
3900
|
+
* One sandbox\'s proxied AI usage per UTC day, credential and model, and whether it is blocked. Needs an API key with `sandbox.read` on the sandbox.
|
|
3876
3901
|
* Get sandbox AI usage
|
|
3877
3902
|
*/
|
|
3878
3903
|
async getSandboxAiUsageRaw(requestParameters: GetSandboxAiUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxAiUsageResponse>> {
|
|
@@ -3883,7 +3908,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3883
3908
|
}
|
|
3884
3909
|
|
|
3885
3910
|
/**
|
|
3886
|
-
* One sandbox\'s proxied AI usage per UTC day, credential and model, and whether it is blocked. Needs an API key with `
|
|
3911
|
+
* One sandbox\'s proxied AI usage per UTC day, credential and model, and whether it is blocked. Needs an API key with `sandbox.read` on the sandbox.
|
|
3887
3912
|
* Get sandbox AI usage
|
|
3888
3913
|
*/
|
|
3889
3914
|
async getSandboxAiUsage(requestParameters: GetSandboxAiUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxAiUsageResponse> {
|
|
@@ -5178,7 +5203,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
5178
5203
|
}
|
|
5179
5204
|
|
|
5180
5205
|
/**
|
|
5181
|
-
* Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or resume it from its last snapshot. - `reset_failed`: the power-cycle failed. Reply to the incident email.
|
|
5206
|
+
* Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or stop it with `{\"force\": true}` and resume it from its last good snapshot. With no snapshot, a forced stop loses everything. - `reset_failed`: the power-cycle failed. Reply to the incident email.
|
|
5182
5207
|
* Recover a sandbox that stopped responding
|
|
5183
5208
|
*/
|
|
5184
5209
|
async recoverRaw(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Recover200Response>> {
|
|
@@ -5189,7 +5214,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
5189
5214
|
}
|
|
5190
5215
|
|
|
5191
5216
|
/**
|
|
5192
|
-
* Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or resume it from its last snapshot. - `reset_failed`: the power-cycle failed. Reply to the incident email.
|
|
5217
|
+
* Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or stop it with `{\"force\": true}` and resume it from its last good snapshot. With no snapshot, a forced stop loses everything. - `reset_failed`: the power-cycle failed. Reply to the incident email.
|
|
5193
5218
|
* Recover a sandbox that stopped responding
|
|
5194
5219
|
*/
|
|
5195
5220
|
async recover(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recover200Response> {
|
|
@@ -5579,6 +5604,10 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
5579
5604
|
queryParameters['state'] = requestParameters['state'];
|
|
5580
5605
|
}
|
|
5581
5606
|
|
|
5607
|
+
if (requestParameters['include'] != null) {
|
|
5608
|
+
queryParameters['include'] = requestParameters['include'];
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5582
5611
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
5583
5612
|
|
|
5584
5613
|
if (requestParameters['xBoatOrg'] != null) {
|
|
@@ -6301,7 +6330,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
6301
6330
|
}
|
|
6302
6331
|
|
|
6303
6332
|
/**
|
|
6304
|
-
* Let every member of the organization that pays for this sandbox use it.
|
|
6333
|
+
* Let every member of the organization that pays for this sandbox use it. A sandbox that holds none of your personal logins is shared at once. A sandbox that holds them: your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. The wipe is one-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`): its running programs hold your logins in memory. Teammates never read history recorded before the share. Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op. Undo with `POST /sandboxes/{sandboxId}/unshare`.
|
|
6305
6334
|
* Share sandbox with the organization
|
|
6306
6335
|
*/
|
|
6307
6336
|
async shareRaw(requestParameters: ShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Share200Response>> {
|
|
@@ -6312,7 +6341,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
6312
6341
|
}
|
|
6313
6342
|
|
|
6314
6343
|
/**
|
|
6315
|
-
* Let every member of the organization that pays for this sandbox use it.
|
|
6344
|
+
* Let every member of the organization that pays for this sandbox use it. A sandbox that holds none of your personal logins is shared at once. A sandbox that holds them: your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. The wipe is one-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`): its running programs hold your logins in memory. Teammates never read history recorded before the share. Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op. Undo with `POST /sandboxes/{sandboxId}/unshare`.
|
|
6316
6345
|
* Share sandbox with the organization
|
|
6317
6346
|
*/
|
|
6318
6347
|
async share(requestParameters: ShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Share200Response> {
|
|
@@ -6649,6 +6678,61 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
6649
6678
|
return await response.value();
|
|
6650
6679
|
}
|
|
6651
6680
|
|
|
6681
|
+
/**
|
|
6682
|
+
* Creates request options for unshare without sending the request
|
|
6683
|
+
*/
|
|
6684
|
+
async unshareRequestOpts(requestParameters: UnshareRequest): Promise<runtime.RequestOpts> {
|
|
6685
|
+
if (requestParameters['sandboxId'] == null) {
|
|
6686
|
+
throw new runtime.RequiredError(
|
|
6687
|
+
'sandboxId',
|
|
6688
|
+
'Required parameter "sandboxId" was null or undefined when calling unshare().'
|
|
6689
|
+
);
|
|
6690
|
+
}
|
|
6691
|
+
|
|
6692
|
+
const queryParameters: any = {};
|
|
6693
|
+
|
|
6694
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
6695
|
+
|
|
6696
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
6697
|
+
const token = this.configuration.accessToken;
|
|
6698
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
6699
|
+
|
|
6700
|
+
if (tokenString) {
|
|
6701
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6704
|
+
|
|
6705
|
+
let urlPath = `/sandboxes/{sandboxId}/unshare`;
|
|
6706
|
+
urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
|
|
6707
|
+
|
|
6708
|
+
return {
|
|
6709
|
+
path: urlPath,
|
|
6710
|
+
method: 'POST',
|
|
6711
|
+
headers: headerParameters,
|
|
6712
|
+
query: queryParameters,
|
|
6713
|
+
};
|
|
6714
|
+
}
|
|
6715
|
+
|
|
6716
|
+
/**
|
|
6717
|
+
* Make a shared organization sandbox private again, at once. Only you can then use it. Teammates still see it in their list and can stop it. Their SSH keys are removed from the running machine. Nothing on the sandbox changes: files, installs and its environment stay. Undo with `POST /sandboxes/{sandboxId}/share`. Only the person who created the sandbox can make it private, and only a sandbox billed to an organization. Making a private sandbox private is a no-op.
|
|
6718
|
+
* Make an organization sandbox private
|
|
6719
|
+
*/
|
|
6720
|
+
async unshareRaw(requestParameters: UnshareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Unshare200Response>> {
|
|
6721
|
+
const requestOptions = await this.unshareRequestOpts(requestParameters);
|
|
6722
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
6723
|
+
|
|
6724
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Unshare200ResponseFromJSON(jsonValue));
|
|
6725
|
+
}
|
|
6726
|
+
|
|
6727
|
+
/**
|
|
6728
|
+
* Make a shared organization sandbox private again, at once. Only you can then use it. Teammates still see it in their list and can stop it. Their SSH keys are removed from the running machine. Nothing on the sandbox changes: files, installs and its environment stay. Undo with `POST /sandboxes/{sandboxId}/share`. Only the person who created the sandbox can make it private, and only a sandbox billed to an organization. Making a private sandbox private is a no-op.
|
|
6729
|
+
* Make an organization sandbox private
|
|
6730
|
+
*/
|
|
6731
|
+
async unshare(requestParameters: UnshareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unshare200Response> {
|
|
6732
|
+
const response = await this.unshareRaw(requestParameters, initOverrides);
|
|
6733
|
+
return await response.value();
|
|
6734
|
+
}
|
|
6735
|
+
|
|
6652
6736
|
/**
|
|
6653
6737
|
* Creates request options for update without sending the request
|
|
6654
6738
|
*/
|
|
@@ -6973,6 +7057,72 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
6973
7057
|
return await response.value();
|
|
6974
7058
|
}
|
|
6975
7059
|
|
|
7060
|
+
/**
|
|
7061
|
+
* Creates request options for updateOrganization without sending the request
|
|
7062
|
+
*/
|
|
7063
|
+
async updateOrganizationRequestOpts(input: UpdateOrganizationOperationRequest | runtime.FlatBody<UpdateOrganizationOperationRequest, 'updateOrganizationRequest'>): Promise<runtime.RequestOpts> {
|
|
7064
|
+
const requestParameters = runtime.unflattenBody<UpdateOrganizationOperationRequest>(input, 'updateOrganizationRequest', ['org'], []);
|
|
7065
|
+
if (requestParameters['org'] == null) {
|
|
7066
|
+
throw new runtime.RequiredError(
|
|
7067
|
+
'org',
|
|
7068
|
+
'Required parameter "org" was null or undefined when calling updateOrganization().'
|
|
7069
|
+
);
|
|
7070
|
+
}
|
|
7071
|
+
|
|
7072
|
+
if (requestParameters['updateOrganizationRequest'] == null) {
|
|
7073
|
+
throw new runtime.RequiredError(
|
|
7074
|
+
'updateOrganizationRequest',
|
|
7075
|
+
'Required parameter "updateOrganizationRequest" was null or undefined when calling updateOrganization().'
|
|
7076
|
+
);
|
|
7077
|
+
}
|
|
7078
|
+
|
|
7079
|
+
const queryParameters: any = {};
|
|
7080
|
+
|
|
7081
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
7082
|
+
|
|
7083
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
7084
|
+
|
|
7085
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7086
|
+
const token = this.configuration.accessToken;
|
|
7087
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
7088
|
+
|
|
7089
|
+
if (tokenString) {
|
|
7090
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7091
|
+
}
|
|
7092
|
+
}
|
|
7093
|
+
|
|
7094
|
+
let urlPath = `/orgs/{org}`;
|
|
7095
|
+
urlPath = urlPath.replace('{org}', encodeURIComponent(String(requestParameters['org'])));
|
|
7096
|
+
|
|
7097
|
+
return {
|
|
7098
|
+
path: urlPath,
|
|
7099
|
+
method: 'PATCH',
|
|
7100
|
+
headers: headerParameters,
|
|
7101
|
+
query: queryParameters,
|
|
7102
|
+
body: UpdateOrganizationRequestToJSON(requestParameters['updateOrganizationRequest']),
|
|
7103
|
+
};
|
|
7104
|
+
}
|
|
7105
|
+
|
|
7106
|
+
/**
|
|
7107
|
+
* Owners and admins set whether new sandboxes of the organization start private (only their creator can use them) or shared (every member can use those that hold none of their creator\'s logins). The default is shared. Existing sandboxes keep their setting; their creators change it with `POST /sandboxes/{sandboxId}/share` and `POST /sandboxes/{sandboxId}/unshare`. A fork of a private sandbox is private.
|
|
7108
|
+
* Update organization settings
|
|
7109
|
+
*/
|
|
7110
|
+
async updateOrganizationRaw(requestParameters: UpdateOrganizationOperationRequest | runtime.FlatBody<UpdateOrganizationOperationRequest, 'updateOrganizationRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateOrganization200Response>> {
|
|
7111
|
+
const requestOptions = await this.updateOrganizationRequestOpts(requestParameters);
|
|
7112
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
7113
|
+
|
|
7114
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UpdateOrganization200ResponseFromJSON(jsonValue));
|
|
7115
|
+
}
|
|
7116
|
+
|
|
7117
|
+
/**
|
|
7118
|
+
* Owners and admins set whether new sandboxes of the organization start private (only their creator can use them) or shared (every member can use those that hold none of their creator\'s logins). The default is shared. Existing sandboxes keep their setting; their creators change it with `POST /sandboxes/{sandboxId}/share` and `POST /sandboxes/{sandboxId}/unshare`. A fork of a private sandbox is private.
|
|
7119
|
+
* Update organization settings
|
|
7120
|
+
*/
|
|
7121
|
+
async updateOrganization(requestParameters: UpdateOrganizationOperationRequest | runtime.FlatBody<UpdateOrganizationOperationRequest, 'updateOrganizationRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateOrganization200Response> {
|
|
7122
|
+
const response = await this.updateOrganizationRaw(requestParameters, initOverrides);
|
|
7123
|
+
return await response.value();
|
|
7124
|
+
}
|
|
7125
|
+
|
|
6976
7126
|
/**
|
|
6977
7127
|
* Creates request options for updateSecrets without sending the request
|
|
6978
7128
|
*/
|
|
@@ -7368,3 +7518,10 @@ export const SandboxesSortEnum = {
|
|
|
7368
7518
|
Desc: 'desc'
|
|
7369
7519
|
} as const;
|
|
7370
7520
|
export type SandboxesSortEnum = typeof SandboxesSortEnum[keyof typeof SandboxesSortEnum];
|
|
7521
|
+
/**
|
|
7522
|
+
* @export
|
|
7523
|
+
*/
|
|
7524
|
+
export const SandboxesIncludeEnum = {
|
|
7525
|
+
Cost: 'cost'
|
|
7526
|
+
} as const;
|
|
7527
|
+
export type SandboxesIncludeEnum = typeof SandboxesIncludeEnum[keyof typeof SandboxesIncludeEnum];
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface CreateSandboxRequest {
|
|
22
22
|
/**
|
|
23
|
-
* Machine size. `small` consumes machine time at half rate and `large` at twice the default rate (see the Billing guide). `xlarge` needs the $100/month plan or higher
|
|
23
|
+
* Machine size. `small` consumes machine time at half rate and `large` at twice the default rate (see the Billing guide). `xlarge` needs the $100/month plan or higher, or an account access grant from an administrator. Otherwise, create, resume and fork return 403 `machine_class_plan_required`. A fork inherits the source sandbox's type unless the fork request passes its own, and resume and fork can move a sandbox between sizes.
|
|
24
24
|
* @type {CreateSandboxRequestTypeEnum}
|
|
25
25
|
* @memberof CreateSandboxRequest
|
|
26
26
|
*/
|
|
@@ -67,6 +67,12 @@ export interface CreateSandboxRequest {
|
|
|
67
67
|
* @memberof CreateSandboxRequest
|
|
68
68
|
*/
|
|
69
69
|
failFast?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* With `from`: create this many sandboxes from the named snapshot in one request. Boat creates them together, which is faster than separate creates when you need many sandboxes at once. Start limits and the active-sandbox limit count every sandbox of the batch; if the batch does not fit, nothing is created. The answer lists all of them in `sandboxes` (and the first one in `sandbox`). Refused with 400 `count_requires_from` without `from`, and with 400 `count_with_fail_fast` together with `failFast`.
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof CreateSandboxRequest
|
|
74
|
+
*/
|
|
75
|
+
count?: number;
|
|
70
76
|
/**
|
|
71
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.
|
|
72
78
|
* @type {string}
|
|
@@ -131,6 +137,7 @@ export function CreateSandboxRequestFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
131
137
|
'snapshots': json['snapshots'] == null ? undefined : json['snapshots'],
|
|
132
138
|
'monitoring': json['monitoring'] == null ? undefined : json['monitoring'],
|
|
133
139
|
'failFast': json['failFast'] == null ? undefined : json['failFast'],
|
|
140
|
+
'count': json['count'] == null ? undefined : json['count'],
|
|
134
141
|
'setupScript': json['setupScript'] == null ? undefined : json['setupScript'],
|
|
135
142
|
'org': json['org'] == null ? undefined : json['org'],
|
|
136
143
|
'teamId': json['teamId'] == null ? undefined : json['teamId'],
|
|
@@ -157,6 +164,7 @@ export function CreateSandboxRequestToJSONTyped(value?: CreateSandboxRequest | n
|
|
|
157
164
|
'snapshots': value['snapshots'],
|
|
158
165
|
'monitoring': value['monitoring'],
|
|
159
166
|
'failFast': value['failFast'],
|
|
167
|
+
'count': value['count'],
|
|
160
168
|
'setupScript': value['setupScript'],
|
|
161
169
|
'org': value['org'],
|
|
162
170
|
'teamId': value['teamId'],
|
|
@@ -57,6 +57,12 @@ export interface CreateSandboxResponse {
|
|
|
57
57
|
* @memberof CreateSandboxResponse
|
|
58
58
|
*/
|
|
59
59
|
sandbox: Sandbox;
|
|
60
|
+
/**
|
|
61
|
+
* Present when the request set `count` above 1. Every sandbox of the batch, in creation order.
|
|
62
|
+
* @type {Array<Sandbox>}
|
|
63
|
+
* @memberof CreateSandboxResponse
|
|
64
|
+
*/
|
|
65
|
+
sandboxes?: Array<Sandbox>;
|
|
60
66
|
/**
|
|
61
67
|
* Present when a fair-use cap on a gifted account shortened the requested auto-stop time.
|
|
62
68
|
* @type {string}
|
|
@@ -111,6 +117,7 @@ export function CreateSandboxResponseFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
111
117
|
'status': json['status'],
|
|
112
118
|
'ttlSeconds': json['ttlSeconds'],
|
|
113
119
|
'sandbox': SandboxFromJSON(json['sandbox']),
|
|
120
|
+
'sandboxes': json['sandboxes'] == null ? undefined : ((json['sandboxes'] as Array<any>).map(SandboxFromJSON)),
|
|
114
121
|
'giftLimitNotice': json['giftLimitNotice'] == null ? undefined : json['giftLimitNotice'],
|
|
115
122
|
};
|
|
116
123
|
}
|
|
@@ -131,6 +138,7 @@ export function CreateSandboxResponseToJSONTyped(value?: CreateSandboxResponse |
|
|
|
131
138
|
'status': value['status'],
|
|
132
139
|
'ttlSeconds': value['ttlSeconds'],
|
|
133
140
|
'sandbox': SandboxToJSON(value['sandbox']),
|
|
141
|
+
'sandboxes': value['sandboxes'] == null ? undefined : ((value['sandboxes'] as Array<any>).map(SandboxToJSON)),
|
|
134
142
|
'giftLimitNotice': value['giftLimitNotice'],
|
|
135
143
|
};
|
|
136
144
|
}
|
|
@@ -26,7 +26,7 @@ export interface CreateScopedApiKeyRequest {
|
|
|
26
26
|
*/
|
|
27
27
|
name?: string;
|
|
28
28
|
/**
|
|
29
|
-
* Duration such as 90d, 24h, or seconds
|
|
29
|
+
* Duration such as 90d, 24h, or seconds, up to 365d; or `never` for a key that works until revoked. Default 90d.
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof CreateScopedApiKeyRequest
|
|
32
32
|
*/
|
|
@@ -298,7 +298,7 @@ export interface LimitsFields {
|
|
|
298
298
|
*/
|
|
299
299
|
last24hUsageSeconds?: number;
|
|
300
300
|
/**
|
|
301
|
-
* Lifetime
|
|
301
|
+
* Lifetime Boat-time allowance for new sandboxes while the account has not paid, a plan trial included. Every charge on the wallet counts. Null once the account has paid.
|
|
302
302
|
* @type {number}
|
|
303
303
|
* @memberof LimitsFields
|
|
304
304
|
*/
|
|
@@ -309,7 +309,7 @@ export interface LimitsResponse {
|
|
|
309
309
|
*/
|
|
310
310
|
last24hUsageSeconds?: number;
|
|
311
311
|
/**
|
|
312
|
-
* Lifetime
|
|
312
|
+
* Lifetime Boat-time allowance for new sandboxes while the account has not paid, a plan trial included. Every charge on the wallet counts. Null once the account has paid.
|
|
313
313
|
* @type {number}
|
|
314
314
|
* @memberof LimitsResponse
|
|
315
315
|
*/
|
|
@@ -143,6 +143,7 @@ export const MeResponseAllOfUserConnectionMethodEnum = {
|
|
|
143
143
|
Github: 'github',
|
|
144
144
|
Google: 'google',
|
|
145
145
|
Email: 'email',
|
|
146
|
+
Agentid: 'agentid',
|
|
146
147
|
Service: 'service'
|
|
147
148
|
} as const;
|
|
148
149
|
export type MeResponseAllOfUserConnectionMethodEnum = typeof MeResponseAllOfUserConnectionMethodEnum[keyof typeof MeResponseAllOfUserConnectionMethodEnum];
|
|
@@ -26,7 +26,7 @@ export interface ResumeRequest {
|
|
|
26
26
|
*/
|
|
27
27
|
failFast?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Resume onto a different machine size. Omit to keep the sandbox's current type. `xlarge` needs the $100/month plan or higher (403 `machine_class_plan_required`). A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
|
|
29
|
+
* Resume onto a different machine size. Omit to keep the sandbox's current type. `xlarge` needs the $100/month plan or higher, or an account access grant from an administrator (403 `machine_class_plan_required` otherwise). A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
|
|
30
30
|
* @type {ResumeRequestTypeEnum}
|
|
31
31
|
* @memberof ResumeRequest
|
|
32
32
|
*/
|
package/src/models/Sandbox.ts
CHANGED
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
StopOperationToJSON,
|
|
28
28
|
StopOperationToJSONTyped,
|
|
29
29
|
} from './StopOperation';
|
|
30
|
+
import type { SandboxCost } from './SandboxCost';
|
|
31
|
+
import {
|
|
32
|
+
SandboxCostFromJSON,
|
|
33
|
+
SandboxCostFromJSONTyped,
|
|
34
|
+
SandboxCostToJSON,
|
|
35
|
+
SandboxCostToJSONTyped,
|
|
36
|
+
} from './SandboxCost';
|
|
30
37
|
import type { SandboxHydration } from './SandboxHydration';
|
|
31
38
|
import {
|
|
32
39
|
SandboxHydrationFromJSON,
|
|
@@ -65,6 +72,12 @@ export interface Sandbox {
|
|
|
65
72
|
* @memberof Sandbox
|
|
66
73
|
*/
|
|
67
74
|
error?: string | null;
|
|
75
|
+
/**
|
|
76
|
+
* When Boat deleted the snapshot data of this stopped sandbox, 14 days after it stopped. Resume and fork then fail with `409 snapshot_data_expired`. Null while the data is kept.
|
|
77
|
+
* @type {Date}
|
|
78
|
+
* @memberof Sandbox
|
|
79
|
+
*/
|
|
80
|
+
dataExpiredAt?: Date | null;
|
|
68
81
|
/**
|
|
69
82
|
* `degraded` when the machine is alive but Boat cannot fully reach it (for example a firewall rule inside the sandbox blocks the tunnel). The sandbox keeps running.
|
|
70
83
|
* @type {SandboxHealthEnum}
|
|
@@ -234,7 +247,7 @@ export interface Sandbox {
|
|
|
234
247
|
*/
|
|
235
248
|
createdById?: string | null;
|
|
236
249
|
/**
|
|
237
|
-
* What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that
|
|
250
|
+
* What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that is `shared` (see `visibility`), so you can open, run commands in, prompt, resume and stop it. `view`: a teammate's organization sandbox that is `private`, so you can see it and stop it until they share it (`POST /sandboxes/{sandboxId}/share`).
|
|
238
251
|
* @type {SandboxAccessEnum}
|
|
239
252
|
* @memberof Sandbox
|
|
240
253
|
*/
|
|
@@ -245,6 +258,18 @@ export interface Sandbox {
|
|
|
245
258
|
* @memberof Sandbox
|
|
246
259
|
*/
|
|
247
260
|
holdsCreatorLogins?: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Organization sandboxes only; null for a personal sandbox. `shared`: every member can use it. It holds none of its creator's personal logins (`noEnv`, shared and restarted, or created on an environment that passes nothing) and its creator did not make it private. `private`: only its creator can use it. It holds their logins, or its creator made it private (`POST /sandboxes/{sandboxId}/unshare`, or the organization's `newSandboxesPrivate` default).
|
|
263
|
+
* @type {SandboxVisibilityEnum}
|
|
264
|
+
* @memberof Sandbox
|
|
265
|
+
*/
|
|
266
|
+
visibility?: SandboxVisibilityEnum | null;
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
* @type {SandboxCost}
|
|
270
|
+
* @memberof Sandbox
|
|
271
|
+
*/
|
|
272
|
+
cost?: SandboxCost;
|
|
248
273
|
/**
|
|
249
274
|
* True once the sandbox is shared but not restarted yet. Its creator's logins are wiped at its next start, and the organization can use it from then on.
|
|
250
275
|
* @type {boolean}
|
|
@@ -359,6 +384,15 @@ export const SandboxAccessEnum = {
|
|
|
359
384
|
} as const;
|
|
360
385
|
export type SandboxAccessEnum = typeof SandboxAccessEnum[keyof typeof SandboxAccessEnum];
|
|
361
386
|
|
|
387
|
+
/**
|
|
388
|
+
* @export
|
|
389
|
+
*/
|
|
390
|
+
export const SandboxVisibilityEnum = {
|
|
391
|
+
Shared: 'shared',
|
|
392
|
+
Private: 'private'
|
|
393
|
+
} as const;
|
|
394
|
+
export type SandboxVisibilityEnum = typeof SandboxVisibilityEnum[keyof typeof SandboxVisibilityEnum];
|
|
395
|
+
|
|
362
396
|
/**
|
|
363
397
|
* @export
|
|
364
398
|
*/
|
|
@@ -409,6 +443,7 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
409
443
|
'name': json['name'],
|
|
410
444
|
'state': json['state'],
|
|
411
445
|
'error': json['error'] == null ? undefined : json['error'],
|
|
446
|
+
'dataExpiredAt': json['dataExpiredAt'] == null ? undefined : (new Date(json['dataExpiredAt'])),
|
|
412
447
|
'health': json['health'] == null ? undefined : json['health'],
|
|
413
448
|
'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
|
|
414
449
|
'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
|
|
@@ -439,6 +474,8 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
439
474
|
'createdById': json['createdById'] == null ? undefined : json['createdById'],
|
|
440
475
|
'access': json['access'] == null ? undefined : json['access'],
|
|
441
476
|
'holdsCreatorLogins': json['holdsCreatorLogins'] == null ? undefined : json['holdsCreatorLogins'],
|
|
477
|
+
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
478
|
+
'cost': json['cost'] == null ? undefined : SandboxCostFromJSON(json['cost']),
|
|
442
479
|
'wipePendingUntilRestart': json['wipePendingUntilRestart'] == null ? undefined : json['wipePendingUntilRestart'],
|
|
443
480
|
'subdomain': json['subdomain'] == null ? undefined : json['subdomain'],
|
|
444
481
|
'lastSnapshotAttemptAt': json['lastSnapshotAttemptAt'] == null ? undefined : (new Date(json['lastSnapshotAttemptAt'])),
|
|
@@ -466,6 +503,7 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
466
503
|
'name': value['name'],
|
|
467
504
|
'state': value['state'],
|
|
468
505
|
'error': value['error'],
|
|
506
|
+
'dataExpiredAt': value['dataExpiredAt'] == null ? value['dataExpiredAt'] : value['dataExpiredAt'].toISOString(),
|
|
469
507
|
'health': value['health'],
|
|
470
508
|
'healthReason': value['healthReason'],
|
|
471
509
|
'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
|
|
@@ -496,6 +534,8 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
496
534
|
'createdById': value['createdById'],
|
|
497
535
|
'access': value['access'],
|
|
498
536
|
'holdsCreatorLogins': value['holdsCreatorLogins'],
|
|
537
|
+
'visibility': value['visibility'],
|
|
538
|
+
'cost': SandboxCostToJSON(value['cost']),
|
|
499
539
|
'wipePendingUntilRestart': value['wipePendingUntilRestart'],
|
|
500
540
|
'subdomain': value['subdomain'],
|
|
501
541
|
'lastSnapshotAttemptAt': value['lastSnapshotAttemptAt'] == null ? value['lastSnapshotAttemptAt'] : value['lastSnapshotAttemptAt'].toISOString(),
|
|
@@ -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` on `GET /sandboxes`. Machine time this sandbox used this calendar month (UTC), at list price. Same meter as `GET /sandboxes/{sandboxId}/usage`.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SandboxCost
|
|
20
|
+
*/
|
|
21
|
+
export interface SandboxCost {
|
|
22
|
+
/**
|
|
23
|
+
* The 1st of this month, 00:00 UTC.
|
|
24
|
+
* @type {Date}
|
|
25
|
+
* @memberof SandboxCost
|
|
26
|
+
*/
|
|
27
|
+
since: Date;
|
|
28
|
+
/**
|
|
29
|
+
* Billable machine-seconds, size multiplier applied.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SandboxCost
|
|
32
|
+
*/
|
|
33
|
+
seconds: number;
|
|
34
|
+
/**
|
|
35
|
+
* seconds / secondsPerDollar, at list price.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SandboxCost
|
|
38
|
+
*/
|
|
39
|
+
dollars: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the SandboxCost interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfSandboxCost(value: object): value is SandboxCost {
|
|
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 SandboxCostFromJSON(json: any): SandboxCost {
|
|
53
|
+
return SandboxCostFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SandboxCostFromJSONTyped(json: any, ignoreDiscriminator: boolean): SandboxCost {
|
|
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 SandboxCostToJSON(json: any): SandboxCost {
|
|
69
|
+
return SandboxCostToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function SandboxCostToJSONTyped(value?: SandboxCost | 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
|
+
|