sandbox0 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/apispec/src/apis/SandboxesApi.d.ts +1 -49
  2. package/dist/apispec/src/apis/SandboxesApi.d.ts.map +1 -1
  3. package/dist/apispec/src/apis/SandboxesApi.js +1 -144
  4. package/dist/apispec/src/models/CredentialProjectionType.d.ts +1 -0
  5. package/dist/apispec/src/models/CredentialProjectionType.d.ts.map +1 -1
  6. package/dist/apispec/src/models/CredentialProjectionType.js +2 -1
  7. package/dist/apispec/src/models/CredentialSourceResolverKind.d.ts +1 -0
  8. package/dist/apispec/src/models/CredentialSourceResolverKind.d.ts.map +1 -1
  9. package/dist/apispec/src/models/CredentialSourceResolverKind.js +2 -1
  10. package/dist/apispec/src/models/CredentialSourceWriteSpec.d.ts +7 -0
  11. package/dist/apispec/src/models/CredentialSourceWriteSpec.d.ts.map +1 -1
  12. package/dist/apispec/src/models/CredentialSourceWriteSpec.js +3 -0
  13. package/dist/apispec/src/models/EgressAuthProtocol.d.ts +1 -0
  14. package/dist/apispec/src/models/EgressAuthProtocol.d.ts.map +1 -1
  15. package/dist/apispec/src/models/EgressAuthProtocol.js +1 -0
  16. package/dist/apispec/src/models/EgressCredentialRule.d.ts +7 -0
  17. package/dist/apispec/src/models/EgressCredentialRule.d.ts.map +1 -1
  18. package/dist/apispec/src/models/EgressCredentialRule.js +3 -0
  19. package/dist/apispec/src/models/HTTPMatch.d.ts +58 -0
  20. package/dist/apispec/src/models/HTTPMatch.d.ts.map +1 -0
  21. package/dist/apispec/src/models/HTTPMatch.js +50 -0
  22. package/dist/apispec/src/models/HTTPValueMatch.d.ts +45 -0
  23. package/dist/apispec/src/models/HTTPValueMatch.d.ts.map +1 -0
  24. package/dist/apispec/src/models/HTTPValueMatch.js +47 -0
  25. package/dist/apispec/src/models/ProjectionSpec.d.ts +7 -0
  26. package/dist/apispec/src/models/ProjectionSpec.d.ts.map +1 -1
  27. package/dist/apispec/src/models/ProjectionSpec.js +3 -0
  28. package/dist/apispec/src/models/SSHProxyProjection.d.ts +45 -0
  29. package/dist/apispec/src/models/SSHProxyProjection.d.ts.map +1 -0
  30. package/dist/apispec/src/models/SSHProxyProjection.js +45 -0
  31. package/dist/apispec/src/models/Sandbox.d.ts +0 -7
  32. package/dist/apispec/src/models/Sandbox.d.ts.map +1 -1
  33. package/dist/apispec/src/models/Sandbox.js +0 -3
  34. package/dist/apispec/src/models/SandboxConfig.d.ts +0 -7
  35. package/dist/apispec/src/models/SandboxConfig.d.ts.map +1 -1
  36. package/dist/apispec/src/models/SandboxConfig.js +0 -3
  37. package/dist/apispec/src/models/SandboxUpdateConfig.d.ts +0 -7
  38. package/dist/apispec/src/models/SandboxUpdateConfig.d.ts.map +1 -1
  39. package/dist/apispec/src/models/SandboxUpdateConfig.js +0 -3
  40. package/dist/apispec/src/models/StaticSSHPrivateKeySourceSpec.d.ts +39 -0
  41. package/dist/apispec/src/models/StaticSSHPrivateKeySourceSpec.d.ts.map +1 -0
  42. package/dist/apispec/src/models/StaticSSHPrivateKeySourceSpec.js +45 -0
  43. package/dist/apispec/src/models/index.d.ts +4 -4
  44. package/dist/apispec/src/models/index.d.ts.map +1 -1
  45. package/dist/apispec/src/models/index.js +4 -4
  46. package/dist/index.d.ts +0 -1
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +0 -1
  49. package/dist/models.d.ts +0 -9
  50. package/dist/models.d.ts.map +1 -1
  51. package/dist/response_normalize.d.ts.map +1 -1
  52. package/dist/response_normalize.js +0 -1
  53. package/package.json +1 -1
  54. package/dist/apispec/src/models/ExposedPortConfig.d.ts +0 -50
  55. package/dist/apispec/src/models/ExposedPortConfig.d.ts.map +0 -1
  56. package/dist/apispec/src/models/ExposedPortConfig.js +0 -48
  57. package/dist/apispec/src/models/SuccessExposedPortsResponse.d.ts +0 -40
  58. package/dist/apispec/src/models/SuccessExposedPortsResponse.d.ts.map +0 -1
  59. package/dist/apispec/src/models/SuccessExposedPortsResponse.js +0 -46
  60. package/dist/apispec/src/models/SuccessExposedPortsResponseAllOfData.d.ts +0 -48
  61. package/dist/apispec/src/models/SuccessExposedPortsResponseAllOfData.d.ts.map +0 -1
  62. package/dist/apispec/src/models/SuccessExposedPortsResponseAllOfData.js +0 -49
  63. package/dist/apispec/src/models/UpdateExposedPortsRequest.d.ts +0 -34
  64. package/dist/apispec/src/models/UpdateExposedPortsRequest.d.ts.map +0 -1
  65. package/dist/apispec/src/models/UpdateExposedPortsRequest.js +0 -44
  66. package/dist/sandbox_exposed_ports.d.ts +0 -11
  67. package/dist/sandbox_exposed_ports.d.ts.map +0 -1
  68. package/dist/sandbox_exposed_ports.js +0 -66
@@ -24,7 +24,6 @@ const NULL_ARRAY_KEYS = new Set([
24
24
  "drop",
25
25
  "entries",
26
26
  "env",
27
- "exposed_ports",
28
27
  "identities",
29
28
  "matchExpressions",
30
29
  "matchFields",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandbox0",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Sandbox0 JavaScript/TypeScript SDK",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Sandbox0 Team",
@@ -1,50 +0,0 @@
1
- /**
2
- * Sandbox0 API
3
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
4
- *
5
- * The version of the OpenAPI document: 0.1.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 ExposedPortConfig
16
- */
17
- export interface ExposedPortConfig {
18
- /**
19
- *
20
- * @type {number}
21
- * @memberof ExposedPortConfig
22
- */
23
- port: number;
24
- /**
25
- * Port-level resume gate for public exposure traffic. Evaluated only when
26
- * sandbox auto_resume is true. Priority: sandbox auto_resume (global gate)
27
- * > exposed_ports[].resume (per-port gate).
28
- *
29
- * @type {boolean}
30
- * @memberof ExposedPortConfig
31
- */
32
- resume: boolean;
33
- /**
34
- * The full public URL to access this exposed port.
35
- * Format: https://<sandboxName>--p<port>.<regionID>.<rootDomain>
36
- *
37
- * @type {string}
38
- * @memberof ExposedPortConfig
39
- */
40
- readonly publicUrl?: string;
41
- }
42
- /**
43
- * Check if a given object implements the ExposedPortConfig interface.
44
- */
45
- export declare function instanceOfExposedPortConfig(value: object): value is ExposedPortConfig;
46
- export declare function ExposedPortConfigFromJSON(json: any): ExposedPortConfig;
47
- export declare function ExposedPortConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExposedPortConfig;
48
- export declare function ExposedPortConfigToJSON(json: any): ExposedPortConfig;
49
- export declare function ExposedPortConfigToJSONTyped(value?: Omit<ExposedPortConfig, 'public_url'> | null, ignoreDiscriminator?: boolean): any;
50
- //# sourceMappingURL=ExposedPortConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExposedPortConfig.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/ExposedPortConfig.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,iBAAiB,CAIrF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEtE;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,iBAAiB,CAUzG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEpE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAU5I"}
@@ -1,48 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Sandbox0 API
5
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
- *
7
- * The version of the OpenAPI document: 0.1.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
- * Check if a given object implements the ExposedPortConfig interface.
16
- */
17
- export function instanceOfExposedPortConfig(value) {
18
- if (!('port' in value) || value['port'] === undefined)
19
- return false;
20
- if (!('resume' in value) || value['resume'] === undefined)
21
- return false;
22
- return true;
23
- }
24
- export function ExposedPortConfigFromJSON(json) {
25
- return ExposedPortConfigFromJSONTyped(json, false);
26
- }
27
- export function ExposedPortConfigFromJSONTyped(json, ignoreDiscriminator) {
28
- if (json == null) {
29
- return json;
30
- }
31
- return {
32
- 'port': json['port'],
33
- 'resume': json['resume'],
34
- 'publicUrl': json['public_url'] == null ? undefined : json['public_url'],
35
- };
36
- }
37
- export function ExposedPortConfigToJSON(json) {
38
- return ExposedPortConfigToJSONTyped(json, false);
39
- }
40
- export function ExposedPortConfigToJSONTyped(value, ignoreDiscriminator = false) {
41
- if (value == null) {
42
- return value;
43
- }
44
- return {
45
- 'port': value['port'],
46
- 'resume': value['resume'],
47
- };
48
- }
@@ -1,40 +0,0 @@
1
- /**
2
- * Sandbox0 API
3
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
4
- *
5
- * The version of the OpenAPI document: 0.1.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 { SuccessExposedPortsResponseAllOfData } from './SuccessExposedPortsResponseAllOfData.js';
13
- /**
14
- *
15
- * @export
16
- * @interface SuccessExposedPortsResponse
17
- */
18
- export interface SuccessExposedPortsResponse {
19
- /**
20
- *
21
- * @type {boolean}
22
- * @memberof SuccessExposedPortsResponse
23
- */
24
- success: boolean;
25
- /**
26
- *
27
- * @type {SuccessExposedPortsResponseAllOfData}
28
- * @memberof SuccessExposedPortsResponse
29
- */
30
- data?: SuccessExposedPortsResponseAllOfData;
31
- }
32
- /**
33
- * Check if a given object implements the SuccessExposedPortsResponse interface.
34
- */
35
- export declare function instanceOfSuccessExposedPortsResponse(value: object): value is SuccessExposedPortsResponse;
36
- export declare function SuccessExposedPortsResponseFromJSON(json: any): SuccessExposedPortsResponse;
37
- export declare function SuccessExposedPortsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SuccessExposedPortsResponse;
38
- export declare function SuccessExposedPortsResponseToJSON(json: any): SuccessExposedPortsResponse;
39
- export declare function SuccessExposedPortsResponseToJSONTyped(value?: SuccessExposedPortsResponse | null, ignoreDiscriminator?: boolean): any;
40
- //# sourceMappingURL=SuccessExposedPortsResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SuccessExposedPortsResponse.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/SuccessExposedPortsResponse.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAQnG;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IACxC;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,oCAAoC,CAAC;CAC/C;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,2BAA2B,CAGzG;AAED,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,GAAG,GAAG,2BAA2B,CAE1F;AAED,wBAAgB,wCAAwC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,2BAA2B,CAS7H;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,GAAG,2BAA2B,CAExF;AAED,wBAAgB,sCAAsC,CAAC,KAAK,CAAC,EAAE,2BAA2B,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAU5I"}
@@ -1,46 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Sandbox0 API
5
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
- *
7
- * The version of the OpenAPI document: 0.1.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
- import { SuccessExposedPortsResponseAllOfDataFromJSON, SuccessExposedPortsResponseAllOfDataToJSON, } from './SuccessExposedPortsResponseAllOfData.js';
15
- /**
16
- * Check if a given object implements the SuccessExposedPortsResponse interface.
17
- */
18
- export function instanceOfSuccessExposedPortsResponse(value) {
19
- if (!('success' in value) || value['success'] === undefined)
20
- return false;
21
- return true;
22
- }
23
- export function SuccessExposedPortsResponseFromJSON(json) {
24
- return SuccessExposedPortsResponseFromJSONTyped(json, false);
25
- }
26
- export function SuccessExposedPortsResponseFromJSONTyped(json, ignoreDiscriminator) {
27
- if (json == null) {
28
- return json;
29
- }
30
- return {
31
- 'success': json['success'],
32
- 'data': json['data'] == null ? undefined : SuccessExposedPortsResponseAllOfDataFromJSON(json['data']),
33
- };
34
- }
35
- export function SuccessExposedPortsResponseToJSON(json) {
36
- return SuccessExposedPortsResponseToJSONTyped(json, false);
37
- }
38
- export function SuccessExposedPortsResponseToJSONTyped(value, ignoreDiscriminator = false) {
39
- if (value == null) {
40
- return value;
41
- }
42
- return {
43
- 'success': value['success'],
44
- 'data': SuccessExposedPortsResponseAllOfDataToJSON(value['data']),
45
- };
46
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * Sandbox0 API
3
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
4
- *
5
- * The version of the OpenAPI document: 0.1.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 { ExposedPortConfig } from './ExposedPortConfig.js';
13
- /**
14
- *
15
- * @export
16
- * @interface SuccessExposedPortsResponseAllOfData
17
- */
18
- export interface SuccessExposedPortsResponseAllOfData {
19
- /**
20
- *
21
- * @type {string}
22
- * @memberof SuccessExposedPortsResponseAllOfData
23
- */
24
- sandboxId: string;
25
- /**
26
- *
27
- * @type {Array<ExposedPortConfig>}
28
- * @memberof SuccessExposedPortsResponseAllOfData
29
- */
30
- exposedPorts: Array<ExposedPortConfig>;
31
- /**
32
- * The base exposure domain (e.g., "aws-us-east-1.sandbox0.app").
33
- * Useful for clients that need to construct URLs manually.
34
- *
35
- * @type {string}
36
- * @memberof SuccessExposedPortsResponseAllOfData
37
- */
38
- readonly exposureDomain?: string;
39
- }
40
- /**
41
- * Check if a given object implements the SuccessExposedPortsResponseAllOfData interface.
42
- */
43
- export declare function instanceOfSuccessExposedPortsResponseAllOfData(value: object): value is SuccessExposedPortsResponseAllOfData;
44
- export declare function SuccessExposedPortsResponseAllOfDataFromJSON(json: any): SuccessExposedPortsResponseAllOfData;
45
- export declare function SuccessExposedPortsResponseAllOfDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SuccessExposedPortsResponseAllOfData;
46
- export declare function SuccessExposedPortsResponseAllOfDataToJSON(json: any): SuccessExposedPortsResponseAllOfData;
47
- export declare function SuccessExposedPortsResponseAllOfDataToJSONTyped(value?: Omit<SuccessExposedPortsResponseAllOfData, 'exposure_domain'> | null, ignoreDiscriminator?: boolean): any;
48
- //# sourceMappingURL=SuccessExposedPortsResponseAllOfData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SuccessExposedPortsResponseAllOfData.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/SuccessExposedPortsResponseAllOfData.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQ7D;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACjD;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,8CAA8C,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oCAAoC,CAI3H;AAED,wBAAgB,4CAA4C,CAAC,IAAI,EAAE,GAAG,GAAG,oCAAoC,CAE5G;AAED,wBAAgB,iDAAiD,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oCAAoC,CAU/I;AAED,wBAAgB,0CAA0C,CAAC,IAAI,EAAE,GAAG,GAAG,oCAAoC,CAE1G;AAED,wBAAgB,+CAA+C,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,oCAAoC,EAAE,iBAAiB,CAAC,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAUvL"}
@@ -1,49 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Sandbox0 API
5
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
- *
7
- * The version of the OpenAPI document: 0.1.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
- import { ExposedPortConfigFromJSON, ExposedPortConfigToJSON, } from './ExposedPortConfig.js';
15
- /**
16
- * Check if a given object implements the SuccessExposedPortsResponseAllOfData interface.
17
- */
18
- export function instanceOfSuccessExposedPortsResponseAllOfData(value) {
19
- if (!('sandboxId' in value) || value['sandboxId'] === undefined)
20
- return false;
21
- if (!('exposedPorts' in value) || value['exposedPorts'] === undefined)
22
- return false;
23
- return true;
24
- }
25
- export function SuccessExposedPortsResponseAllOfDataFromJSON(json) {
26
- return SuccessExposedPortsResponseAllOfDataFromJSONTyped(json, false);
27
- }
28
- export function SuccessExposedPortsResponseAllOfDataFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'sandboxId': json['sandbox_id'],
34
- 'exposedPorts': (json['exposed_ports'].map(ExposedPortConfigFromJSON)),
35
- 'exposureDomain': json['exposure_domain'] == null ? undefined : json['exposure_domain'],
36
- };
37
- }
38
- export function SuccessExposedPortsResponseAllOfDataToJSON(json) {
39
- return SuccessExposedPortsResponseAllOfDataToJSONTyped(json, false);
40
- }
41
- export function SuccessExposedPortsResponseAllOfDataToJSONTyped(value, ignoreDiscriminator = false) {
42
- if (value == null) {
43
- return value;
44
- }
45
- return {
46
- 'sandbox_id': value['sandboxId'],
47
- 'exposed_ports': (value['exposedPorts'].map(ExposedPortConfigToJSON)),
48
- };
49
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Sandbox0 API
3
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
4
- *
5
- * The version of the OpenAPI document: 0.1.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 { ExposedPortConfig } from './ExposedPortConfig.js';
13
- /**
14
- *
15
- * @export
16
- * @interface UpdateExposedPortsRequest
17
- */
18
- export interface UpdateExposedPortsRequest {
19
- /**
20
- *
21
- * @type {Array<ExposedPortConfig>}
22
- * @memberof UpdateExposedPortsRequest
23
- */
24
- ports: Array<ExposedPortConfig>;
25
- }
26
- /**
27
- * Check if a given object implements the UpdateExposedPortsRequest interface.
28
- */
29
- export declare function instanceOfUpdateExposedPortsRequest(value: object): value is UpdateExposedPortsRequest;
30
- export declare function UpdateExposedPortsRequestFromJSON(json: any): UpdateExposedPortsRequest;
31
- export declare function UpdateExposedPortsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateExposedPortsRequest;
32
- export declare function UpdateExposedPortsRequestToJSON(json: any): UpdateExposedPortsRequest;
33
- export declare function UpdateExposedPortsRequestToJSONTyped(value?: UpdateExposedPortsRequest | null, ignoreDiscriminator?: boolean): any;
34
- //# sourceMappingURL=UpdateExposedPortsRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UpdateExposedPortsRequest.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/UpdateExposedPortsRequest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQ7D;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACtC;;;;OAIG;IACH,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,yBAAyB,CAGrG;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,GAAG,yBAAyB,CAEtF;AAED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,yBAAyB,CAQzH;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,GAAG,GAAG,yBAAyB,CAEpF;AAED,wBAAgB,oCAAoC,CAAC,KAAK,CAAC,EAAE,yBAAyB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CASxI"}
@@ -1,44 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Sandbox0 API
5
- * Public HTTP APIs exposed by Sandbox0 regional gateways and the global gateway.
6
- *
7
- * The version of the OpenAPI document: 0.1.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
- import { ExposedPortConfigFromJSON, ExposedPortConfigToJSON, } from './ExposedPortConfig.js';
15
- /**
16
- * Check if a given object implements the UpdateExposedPortsRequest interface.
17
- */
18
- export function instanceOfUpdateExposedPortsRequest(value) {
19
- if (!('ports' in value) || value['ports'] === undefined)
20
- return false;
21
- return true;
22
- }
23
- export function UpdateExposedPortsRequestFromJSON(json) {
24
- return UpdateExposedPortsRequestFromJSONTyped(json, false);
25
- }
26
- export function UpdateExposedPortsRequestFromJSONTyped(json, ignoreDiscriminator) {
27
- if (json == null) {
28
- return json;
29
- }
30
- return {
31
- 'ports': (json['ports'].map(ExposedPortConfigFromJSON)),
32
- };
33
- }
34
- export function UpdateExposedPortsRequestToJSON(json) {
35
- return UpdateExposedPortsRequestToJSONTyped(json, false);
36
- }
37
- export function UpdateExposedPortsRequestToJSONTyped(value, ignoreDiscriminator = false) {
38
- if (value == null) {
39
- return value;
40
- }
41
- return {
42
- 'ports': (value['ports'].map(ExposedPortConfigToJSON)),
43
- };
44
- }
@@ -1,11 +0,0 @@
1
- import type { ExposedPort, ExposedPortsResponse } from "./models.js";
2
- declare module "./sandbox" {
3
- interface Sandbox {
4
- getExposedPorts(): Promise<ExposedPortsResponse>;
5
- updateExposedPorts(ports: ExposedPort[]): Promise<ExposedPortsResponse>;
6
- exposePort(port: number, resume: boolean): Promise<ExposedPortsResponse>;
7
- unexposePort(port: number): Promise<ExposedPortsResponse>;
8
- clearExposedPorts(): Promise<void>;
9
- }
10
- }
11
- //# sourceMappingURL=sandbox_exposed_ports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox_exposed_ports.d.ts","sourceRoot":"","sources":["../src/sandbox_exposed_ports.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOlE,OAAO,QAAQ,WAAW,CAAC;IACzB,UAAU,OAAO;QACf,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;QACjD,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QACxE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QACzE,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC1D,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KACpC;CACF"}
@@ -1,66 +0,0 @@
1
- import { wrapApiCall } from "./errors.js";
2
- import { ensureData } from "./response.js";
3
- import { Sandbox } from "./sandbox.js";
4
- function getClient(sandbox) {
5
- return sandbox.client;
6
- }
7
- Sandbox.prototype.getExposedPorts = async function () {
8
- const client = getClient(this);
9
- const response = await wrapApiCall(() => client.apispec.sandboxes.apiV1SandboxesIdExposedPortsGet({ id: this.id }));
10
- const data = ensureData(response, "get exposed ports returned empty response");
11
- return toExposedPortsResponse(data);
12
- };
13
- Sandbox.prototype.updateExposedPorts = async function (ports) {
14
- const client = getClient(this);
15
- const request = {
16
- ports: ports.map((port) => ({ port: port.port, resume: port.resume })),
17
- };
18
- const response = await wrapApiCall(() => client.apispec.sandboxes.apiV1SandboxesIdExposedPortsPut({
19
- id: this.id,
20
- updateExposedPortsRequest: request,
21
- }));
22
- const data = ensureData(response, "update exposed ports returned empty response");
23
- return toExposedPortsResponse(data);
24
- };
25
- Sandbox.prototype.exposePort = async function (port, resume) {
26
- const current = await this.getExposedPorts();
27
- const updated = [];
28
- let replaced = false;
29
- for (const item of current.ports) {
30
- if (item.port === port) {
31
- updated.push({ ...item, resume });
32
- replaced = true;
33
- }
34
- else {
35
- updated.push(item);
36
- }
37
- }
38
- if (!replaced) {
39
- updated.push({ port, resume });
40
- }
41
- return this.updateExposedPorts(updated);
42
- };
43
- Sandbox.prototype.unexposePort = async function (port) {
44
- const client = getClient(this);
45
- const response = await wrapApiCall(() => client.apispec.sandboxes.apiV1SandboxesIdExposedPortsPortDelete({
46
- id: this.id,
47
- port,
48
- }));
49
- const data = ensureData(response, "unexpose port returned empty response");
50
- return toExposedPortsResponse(data);
51
- };
52
- Sandbox.prototype.clearExposedPorts = async function () {
53
- const client = getClient(this);
54
- await wrapApiCall(() => client.apispec.sandboxes.apiV1SandboxesIdExposedPortsDelete({ id: this.id }));
55
- };
56
- function toExposedPortsResponse(data) {
57
- const ports = (data.exposedPorts ?? []).map((item) => ({
58
- port: item.port,
59
- resume: item.resume,
60
- publicUrl: item.publicUrl ?? undefined,
61
- }));
62
- return {
63
- ports,
64
- exposureDomain: data.exposureDomain ?? undefined,
65
- };
66
- }