sandbox0 0.2.6 → 0.2.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 (113) hide show
  1. package/README.md +3 -1
  2. package/dist/apispec/src/apis/ApiKeysApi.d.ts +11 -1
  3. package/dist/apispec/src/apis/ApiKeysApi.d.ts.map +1 -1
  4. package/dist/apispec/src/apis/ApiKeysApi.js +32 -1
  5. package/dist/apispec/src/apis/ContextsApi.d.ts +6 -4
  6. package/dist/apispec/src/apis/ContextsApi.d.ts.map +1 -1
  7. package/dist/apispec/src/apis/ContextsApi.js +6 -4
  8. package/dist/apispec/src/apis/SandboxesApi.d.ts +21 -1
  9. package/dist/apispec/src/apis/SandboxesApi.d.ts.map +1 -1
  10. package/dist/apispec/src/apis/SandboxesApi.js +57 -1
  11. package/dist/apispec/src/apis/UsersApi.d.ts +31 -1
  12. package/dist/apispec/src/apis/UsersApi.d.ts.map +1 -1
  13. package/dist/apispec/src/apis/UsersApi.js +97 -1
  14. package/dist/apispec/src/models/APIKey.d.ts +0 -6
  15. package/dist/apispec/src/models/APIKey.d.ts.map +1 -1
  16. package/dist/apispec/src/models/APIKey.js +0 -4
  17. package/dist/apispec/src/models/ContextInputRequest.d.ts +1 -1
  18. package/dist/apispec/src/models/ContextWebSocketInput.d.ts +1 -1
  19. package/dist/apispec/src/models/CreateAPIKeyRequest.d.ts +0 -14
  20. package/dist/apispec/src/models/CreateAPIKeyRequest.d.ts.map +1 -1
  21. package/dist/apispec/src/models/CreateAPIKeyRequest.js +0 -11
  22. package/dist/apispec/src/models/CreateAPIKeyResponse.d.ts +0 -6
  23. package/dist/apispec/src/models/CreateAPIKeyResponse.d.ts.map +1 -1
  24. package/dist/apispec/src/models/CreateAPIKeyResponse.js +0 -4
  25. package/dist/apispec/src/models/CreateSSHPublicKeyRequest.d.ts +39 -0
  26. package/dist/apispec/src/models/CreateSSHPublicKeyRequest.d.ts.map +1 -0
  27. package/dist/apispec/src/models/CreateSSHPublicKeyRequest.js +47 -0
  28. package/dist/apispec/src/models/CurrentAPIKeyResponse.d.ts +69 -0
  29. package/dist/apispec/src/models/CurrentAPIKeyResponse.d.ts.map +1 -0
  30. package/dist/apispec/src/models/CurrentAPIKeyResponse.js +67 -0
  31. package/dist/apispec/src/models/HTTPGetAction.d.ts +2 -3
  32. package/dist/apispec/src/models/HTTPGetAction.d.ts.map +1 -1
  33. package/dist/apispec/src/models/HTTPGetAction.js +2 -3
  34. package/dist/apispec/src/models/SSHPublicKey.d.ts +75 -0
  35. package/dist/apispec/src/models/SSHPublicKey.d.ts.map +1 -0
  36. package/dist/apispec/src/models/SSHPublicKey.js +69 -0
  37. package/dist/apispec/src/models/Sandbox.d.ts +7 -0
  38. package/dist/apispec/src/models/Sandbox.d.ts.map +1 -1
  39. package/dist/apispec/src/models/Sandbox.js +3 -0
  40. package/dist/apispec/src/models/SandboxLogs.d.ts +57 -0
  41. package/dist/apispec/src/models/SandboxLogs.d.ts.map +1 -0
  42. package/dist/apispec/src/models/SandboxLogs.js +59 -0
  43. package/dist/apispec/src/models/SandboxProbeSet.d.ts +46 -0
  44. package/dist/apispec/src/models/SandboxProbeSet.d.ts.map +1 -0
  45. package/dist/apispec/src/models/SandboxProbeSet.js +46 -0
  46. package/dist/apispec/src/models/SandboxProbeSpec.d.ts +66 -0
  47. package/dist/apispec/src/models/SandboxProbeSpec.d.ts.map +1 -0
  48. package/dist/apispec/src/models/SandboxProbeSpec.js +54 -0
  49. package/dist/apispec/src/models/SandboxSSHConnection.d.ts +45 -0
  50. package/dist/apispec/src/models/SandboxSSHConnection.d.ts.map +1 -0
  51. package/dist/apispec/src/models/SandboxSSHConnection.js +51 -0
  52. package/dist/apispec/src/models/SandboxTemplateSpec.d.ts +3 -10
  53. package/dist/apispec/src/models/SandboxTemplateSpec.d.ts.map +1 -1
  54. package/dist/apispec/src/models/SandboxTemplateSpec.js +3 -6
  55. package/dist/apispec/src/models/SuccessCurrentAPIKeyResponse.d.ts +40 -0
  56. package/dist/apispec/src/models/SuccessCurrentAPIKeyResponse.d.ts.map +1 -0
  57. package/dist/apispec/src/models/SuccessCurrentAPIKeyResponse.js +46 -0
  58. package/dist/apispec/src/models/SuccessCurrentAPIKeyResponseAllOfData.d.ts +34 -0
  59. package/dist/apispec/src/models/SuccessCurrentAPIKeyResponseAllOfData.d.ts.map +1 -0
  60. package/dist/apispec/src/models/SuccessCurrentAPIKeyResponseAllOfData.js +42 -0
  61. package/dist/apispec/src/models/SuccessSSHPublicKeyListResponse.d.ts +40 -0
  62. package/dist/apispec/src/models/SuccessSSHPublicKeyListResponse.d.ts.map +1 -0
  63. package/dist/apispec/src/models/SuccessSSHPublicKeyListResponse.js +46 -0
  64. package/dist/apispec/src/models/SuccessSSHPublicKeyListResponseAllOfData.d.ts +34 -0
  65. package/dist/apispec/src/models/SuccessSSHPublicKeyListResponseAllOfData.d.ts.map +1 -0
  66. package/dist/apispec/src/models/SuccessSSHPublicKeyListResponseAllOfData.js +42 -0
  67. package/dist/apispec/src/models/SuccessSSHPublicKeyResponse.d.ts +40 -0
  68. package/dist/apispec/src/models/SuccessSSHPublicKeyResponse.d.ts.map +1 -0
  69. package/dist/apispec/src/models/SuccessSSHPublicKeyResponse.js +46 -0
  70. package/dist/apispec/src/models/SuccessSandboxLogsResponse.d.ts +40 -0
  71. package/dist/apispec/src/models/SuccessSandboxLogsResponse.d.ts.map +1 -0
  72. package/dist/apispec/src/models/SuccessSandboxLogsResponse.js +46 -0
  73. package/dist/apispec/src/models/TCPSocketAction.d.ts +2 -3
  74. package/dist/apispec/src/models/TCPSocketAction.d.ts.map +1 -1
  75. package/dist/apispec/src/models/TCPSocketAction.js +2 -3
  76. package/dist/apispec/src/models/WarmProcessSpec.d.ts +80 -0
  77. package/dist/apispec/src/models/WarmProcessSpec.d.ts.map +1 -0
  78. package/dist/apispec/src/models/WarmProcessSpec.js +63 -0
  79. package/dist/apispec/src/models/index.d.ts +14 -4
  80. package/dist/apispec/src/models/index.d.ts.map +1 -1
  81. package/dist/apispec/src/models/index.js +14 -4
  82. package/dist/client.d.ts +5 -0
  83. package/dist/client.d.ts.map +1 -1
  84. package/dist/client.js +92 -0
  85. package/dist/index.d.ts +1 -0
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +1 -0
  88. package/dist/models.d.ts +15 -0
  89. package/dist/models.d.ts.map +1 -1
  90. package/dist/resources/volumes.js +1 -1
  91. package/dist/response_normalize.d.ts.map +1 -1
  92. package/dist/response_normalize.js +1 -2
  93. package/dist/sandbox.js +1 -1
  94. package/dist/sandbox_files.js +1 -1
  95. package/dist/sandbox_logs.d.ts +9 -0
  96. package/dist/sandbox_logs.d.ts.map +1 -0
  97. package/dist/sandbox_logs.js +10 -0
  98. package/dist/template_helpers.d.ts +7 -19
  99. package/dist/template_helpers.d.ts.map +1 -1
  100. package/dist/template_helpers.js +7 -26
  101. package/dist/ws_client.d.ts +13 -3
  102. package/dist/ws_client.d.ts.map +1 -1
  103. package/dist/ws_client.js +145 -28
  104. package/package.json +1 -1
  105. package/dist/apispec/src/models/ContainerMountSpec.d.ts +0 -45
  106. package/dist/apispec/src/models/ContainerMountSpec.d.ts.map +0 -1
  107. package/dist/apispec/src/models/ContainerMountSpec.js +0 -49
  108. package/dist/apispec/src/models/SharedVolumeSpec.d.ts +0 -69
  109. package/dist/apispec/src/models/SharedVolumeSpec.d.ts.map +0 -1
  110. package/dist/apispec/src/models/SharedVolumeSpec.js +0 -57
  111. package/dist/apispec/src/models/SidecarContainerSpec.d.ts +0 -85
  112. package/dist/apispec/src/models/SidecarContainerSpec.d.ts.map +0 -1
  113. package/dist/apispec/src/models/SidecarContainerSpec.js +0 -67
@@ -1 +1 @@
1
- {"version":3,"file":"ws_client.d.ts","sourceRoot":"","sources":["../src/ws_client.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,IAAI,CAAC;AAE3B,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC;AAEjD,KAAK,sB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GAAG,MAAM,IAAI;IAIlD,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAY3B,KAAK,IAAI,IAAI;IAYP,cAAc,CAAC,SAAS,SAAQ,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAiCzE,OAAO,CAAC,iBAAiB;CAQ1B"}
package/dist/ws_client.js CHANGED
@@ -1,13 +1,22 @@
1
- import WebSocket from "ws";
1
+ const READY_STATE = {
2
+ CONNECTING: 0,
3
+ OPEN: 1,
4
+ CLOSING: 2,
5
+ CLOSED: 3,
6
+ };
2
7
  export class WebSocketClient {
3
8
  socket;
4
9
  pendingSends = [];
5
10
  closePending = false;
6
11
  connectTimeoutMs;
7
- constructor(url, options = {}) {
12
+ static async connect(url, options = {}) {
13
+ const socket = await createWebSocket(url, options);
14
+ return new WebSocketClient(socket, options);
15
+ }
16
+ constructor(socket, options = {}) {
8
17
  this.connectTimeoutMs = options.connectTimeoutMs ?? 10000;
9
- this.socket = new WebSocket(url, { headers: options.headers });
10
- this.socket.on("open", () => {
18
+ this.socket = socket;
19
+ addOpenListener(this.socket, () => {
11
20
  this.flushPendingSends();
12
21
  if (this.closePending) {
13
22
  this.closePending = false;
@@ -20,7 +29,7 @@ export class WebSocketClient {
20
29
  return this.socket.readyState;
21
30
  }
22
31
  async waitForOpen(timeoutMs = this.connectTimeoutMs) {
23
- if (this.socket.readyState === WebSocket.OPEN) {
32
+ if (this.socket.readyState === READY_STATE.OPEN) {
24
33
  return;
25
34
  }
26
35
  return new Promise((resolve, reject) => {
@@ -43,33 +52,30 @@ export class WebSocketClient {
43
52
  };
44
53
  const cleanup = () => {
45
54
  clearTimeout(timer);
46
- this.socket.off("open", onOpen);
47
- this.socket.off("error", onError);
48
- this.socket.off("close", onClose);
55
+ cleanupOpen();
56
+ cleanupError();
57
+ cleanupClose();
49
58
  };
50
- this.socket.once("open", onOpen);
51
- this.socket.once("error", onError);
52
- this.socket.once("close", onClose);
59
+ const cleanupOpen = addOpenListener(this.socket, onOpen, { once: true });
60
+ const cleanupError = addErrorListener(this.socket, onError, { once: true });
61
+ const cleanupClose = addCloseListener(this.socket, onClose, { once: true });
53
62
  });
54
63
  }
55
64
  onMessage(handler) {
56
- this.socket.on("message", handler);
57
- return () => this.socket.off("message", handler);
65
+ return addMessageListener(this.socket, handler);
58
66
  }
59
67
  onClose(handler) {
60
- this.socket.on("close", handler);
61
- return () => this.socket.off("close", handler);
68
+ return addCloseListener(this.socket, handler);
62
69
  }
63
70
  onError(handler) {
64
- this.socket.on("error", handler);
65
- return () => this.socket.off("error", handler);
71
+ return addErrorListener(this.socket, handler);
66
72
  }
67
73
  send(payload) {
68
- if (this.socket.readyState === WebSocket.OPEN) {
74
+ if (this.socket.readyState === READY_STATE.OPEN) {
69
75
  this.socket.send(payload);
70
76
  return;
71
77
  }
72
- if (this.socket.readyState === WebSocket.CONNECTING) {
78
+ if (this.socket.readyState === READY_STATE.CONNECTING) {
73
79
  this.pendingSends.push(payload);
74
80
  return;
75
81
  }
@@ -77,11 +83,11 @@ export class WebSocketClient {
77
83
  }
78
84
  close() {
79
85
  this.pendingSends.length = 0;
80
- if (this.socket.readyState === WebSocket.CONNECTING) {
86
+ if (this.socket.readyState === READY_STATE.CONNECTING) {
81
87
  this.closePending = true;
82
88
  return;
83
89
  }
84
- if (this.socket.readyState === WebSocket.CLOSED) {
90
+ if (this.socket.readyState === READY_STATE.CLOSED) {
85
91
  return;
86
92
  }
87
93
  this.socket.close();
@@ -107,17 +113,17 @@ export class WebSocketClient {
107
113
  };
108
114
  const cleanup = () => {
109
115
  clearTimeout(timer);
110
- this.socket.off("message", onMessage);
111
- this.socket.off("error", onError);
112
- this.socket.off("close", onClose);
116
+ cleanupMessage();
117
+ cleanupError();
118
+ cleanupClose();
113
119
  };
114
- this.socket.once("message", onMessage);
115
- this.socket.once("error", onError);
116
- this.socket.once("close", onClose);
120
+ const cleanupMessage = addMessageListener(this.socket, onMessage, { once: true });
121
+ const cleanupError = addErrorListener(this.socket, onError, { once: true });
122
+ const cleanupClose = addCloseListener(this.socket, onClose, { once: true });
117
123
  });
118
124
  }
119
125
  flushPendingSends() {
120
- while (this.pendingSends.length > 0 && this.socket.readyState === WebSocket.OPEN) {
126
+ while (this.pendingSends.length > 0 && this.socket.readyState === READY_STATE.OPEN) {
121
127
  const payload = this.pendingSends.shift();
122
128
  if (payload) {
123
129
  this.socket.send(payload);
@@ -125,3 +131,114 @@ export class WebSocketClient {
125
131
  }
126
132
  }
127
133
  }
134
+ async function createWebSocket(url, options) {
135
+ const resolveConstructor = options.resolveWebSocketConstructor ?? defaultResolveWebSocketConstructor;
136
+ const WebSocketCtor = await resolveConstructor(options);
137
+ const socket = options.headers
138
+ ? new WebSocketCtor(url, { headers: options.headers })
139
+ : new WebSocketCtor(url);
140
+ if ("binaryType" in socket) {
141
+ socket.binaryType = "arraybuffer";
142
+ }
143
+ return socket;
144
+ }
145
+ async function defaultResolveWebSocketConstructor(options) {
146
+ if (typeof globalThis.WebSocket === "function" && (!options.headers || isNodeLikeRuntime())) {
147
+ return globalThis.WebSocket;
148
+ }
149
+ const imported = await importWsModule();
150
+ return (imported.default ?? imported.WebSocket);
151
+ }
152
+ async function importWsModule() {
153
+ // Keep the `ws` fallback out of static bundle graphs so SandFunc can rely on
154
+ // runtime-native WebSocket globals without pulling Node socket code.
155
+ const dynamicImport = Function("specifier", "return import(specifier);");
156
+ return dynamicImport("ws");
157
+ }
158
+ function isNodeLikeRuntime() {
159
+ const maybeProcess = globalThis.process;
160
+ return typeof maybeProcess?.versions?.node === "string";
161
+ }
162
+ function isEventTargetSocket(socket) {
163
+ return typeof socket.addEventListener === "function";
164
+ }
165
+ function addOpenListener(socket, handler, options) {
166
+ if (isEventTargetSocket(socket)) {
167
+ const wrapped = () => handler();
168
+ socket.addEventListener("open", wrapped, options?.once ? { once: true } : undefined);
169
+ return () => socket.removeEventListener("open", wrapped);
170
+ }
171
+ if (options?.once) {
172
+ socket.once("open", handler);
173
+ }
174
+ else {
175
+ socket.on("open", handler);
176
+ }
177
+ return () => socket.off("open", handler);
178
+ }
179
+ function addMessageListener(socket, handler, options) {
180
+ if (isEventTargetSocket(socket)) {
181
+ const wrapped = (event) => {
182
+ handler(extractMessageData(event));
183
+ };
184
+ socket.addEventListener("message", wrapped, options?.once ? { once: true } : undefined);
185
+ return () => socket.removeEventListener("message", wrapped);
186
+ }
187
+ const wrapped = (data) => {
188
+ handler(data);
189
+ };
190
+ if (options?.once) {
191
+ socket.once("message", wrapped);
192
+ }
193
+ else {
194
+ socket.on("message", wrapped);
195
+ }
196
+ return () => socket.off("message", wrapped);
197
+ }
198
+ function addCloseListener(socket, handler, options) {
199
+ if (isEventTargetSocket(socket)) {
200
+ const wrapped = () => handler();
201
+ socket.addEventListener("close", wrapped, options?.once ? { once: true } : undefined);
202
+ return () => socket.removeEventListener("close", wrapped);
203
+ }
204
+ if (options?.once) {
205
+ socket.once("close", handler);
206
+ }
207
+ else {
208
+ socket.on("close", handler);
209
+ }
210
+ return () => socket.off("close", handler);
211
+ }
212
+ function addErrorListener(socket, handler, options) {
213
+ if (isEventTargetSocket(socket)) {
214
+ const wrapped = (event) => {
215
+ handler(extractError(event));
216
+ };
217
+ socket.addEventListener("error", wrapped, options?.once ? { once: true } : undefined);
218
+ return () => socket.removeEventListener("error", wrapped);
219
+ }
220
+ const wrapped = (error) => {
221
+ handler(error instanceof Error ? error : new Error("websocket error"));
222
+ };
223
+ if (options?.once) {
224
+ socket.once("error", wrapped);
225
+ }
226
+ else {
227
+ socket.on("error", wrapped);
228
+ }
229
+ return () => socket.off("error", wrapped);
230
+ }
231
+ function extractMessageData(event) {
232
+ const candidate = event;
233
+ return candidate.data ?? new Uint8Array();
234
+ }
235
+ function extractError(event) {
236
+ const candidate = event;
237
+ if (candidate.error instanceof Error) {
238
+ return candidate.error;
239
+ }
240
+ if (typeof candidate.message === "string" && candidate.message.trim()) {
241
+ return new Error(candidate.message);
242
+ }
243
+ return new Error("websocket error");
244
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandbox0",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Sandbox0 JavaScript/TypeScript SDK",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Sandbox0 Team",
@@ -1,45 +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 ContainerMountSpec
16
- */
17
- export interface ContainerMountSpec {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof ContainerMountSpec
22
- */
23
- name: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof ContainerMountSpec
28
- */
29
- mountPath: string;
30
- /**
31
- *
32
- * @type {boolean}
33
- * @memberof ContainerMountSpec
34
- */
35
- readOnly?: boolean;
36
- }
37
- /**
38
- * Check if a given object implements the ContainerMountSpec interface.
39
- */
40
- export declare function instanceOfContainerMountSpec(value: object): value is ContainerMountSpec;
41
- export declare function ContainerMountSpecFromJSON(json: any): ContainerMountSpec;
42
- export declare function ContainerMountSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerMountSpec;
43
- export declare function ContainerMountSpecToJSON(json: any): ContainerMountSpec;
44
- export declare function ContainerMountSpecToJSONTyped(value?: ContainerMountSpec | null, ignoreDiscriminator?: boolean): any;
45
- //# sourceMappingURL=ContainerMountSpec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContainerMountSpec.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/ContainerMountSpec.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAIvF;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,GAAG,kBAAkB,CAExE;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,kBAAkB,CAU3G;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,kBAAkB,CAEtE;AAED,wBAAgB,6BAA6B,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAW1H"}
@@ -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
- /**
15
- * Check if a given object implements the ContainerMountSpec interface.
16
- */
17
- export function instanceOfContainerMountSpec(value) {
18
- if (!('name' in value) || value['name'] === undefined)
19
- return false;
20
- if (!('mountPath' in value) || value['mountPath'] === undefined)
21
- return false;
22
- return true;
23
- }
24
- export function ContainerMountSpecFromJSON(json) {
25
- return ContainerMountSpecFromJSONTyped(json, false);
26
- }
27
- export function ContainerMountSpecFromJSONTyped(json, ignoreDiscriminator) {
28
- if (json == null) {
29
- return json;
30
- }
31
- return {
32
- 'name': json['name'],
33
- 'mountPath': json['mountPath'],
34
- 'readOnly': json['readOnly'] == null ? undefined : json['readOnly'],
35
- };
36
- }
37
- export function ContainerMountSpecToJSON(json) {
38
- return ContainerMountSpecToJSONTyped(json, false);
39
- }
40
- export function ContainerMountSpecToJSONTyped(value, ignoreDiscriminator = false) {
41
- if (value == null) {
42
- return value;
43
- }
44
- return {
45
- 'name': value['name'],
46
- 'mountPath': value['mountPath'],
47
- 'readOnly': value['readOnly'],
48
- };
49
- }
@@ -1,69 +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 SharedVolumeSpec
16
- */
17
- export interface SharedVolumeSpec {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof SharedVolumeSpec
22
- */
23
- name: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof SharedVolumeSpec
28
- */
29
- sandboxVolumeId?: string;
30
- /**
31
- *
32
- * @type {string}
33
- * @memberof SharedVolumeSpec
34
- */
35
- mountPath: string;
36
- /**
37
- *
38
- * @type {string}
39
- * @memberof SharedVolumeSpec
40
- */
41
- cacheSize?: string;
42
- /**
43
- *
44
- * @type {number}
45
- * @memberof SharedVolumeSpec
46
- */
47
- prefetch?: number;
48
- /**
49
- *
50
- * @type {string}
51
- * @memberof SharedVolumeSpec
52
- */
53
- bufferSize?: string;
54
- /**
55
- *
56
- * @type {boolean}
57
- * @memberof SharedVolumeSpec
58
- */
59
- writeback?: boolean;
60
- }
61
- /**
62
- * Check if a given object implements the SharedVolumeSpec interface.
63
- */
64
- export declare function instanceOfSharedVolumeSpec(value: object): value is SharedVolumeSpec;
65
- export declare function SharedVolumeSpecFromJSON(json: any): SharedVolumeSpec;
66
- export declare function SharedVolumeSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SharedVolumeSpec;
67
- export declare function SharedVolumeSpecToJSON(json: any): SharedVolumeSpec;
68
- export declare function SharedVolumeSpecToJSONTyped(value?: SharedVolumeSpec | null, ignoreDiscriminator?: boolean): any;
69
- //# sourceMappingURL=SharedVolumeSpec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SharedVolumeSpec.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/SharedVolumeSpec.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAInF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,gBAAgB,CAEpE;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,gBAAgB,CAcvG;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAG,gBAAgB,CAElE;AAED,wBAAgB,2BAA2B,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAetH"}
@@ -1,57 +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 SharedVolumeSpec interface.
16
- */
17
- export function instanceOfSharedVolumeSpec(value) {
18
- if (!('name' in value) || value['name'] === undefined)
19
- return false;
20
- if (!('mountPath' in value) || value['mountPath'] === undefined)
21
- return false;
22
- return true;
23
- }
24
- export function SharedVolumeSpecFromJSON(json) {
25
- return SharedVolumeSpecFromJSONTyped(json, false);
26
- }
27
- export function SharedVolumeSpecFromJSONTyped(json, ignoreDiscriminator) {
28
- if (json == null) {
29
- return json;
30
- }
31
- return {
32
- 'name': json['name'],
33
- 'sandboxVolumeId': json['sandboxVolumeId'] == null ? undefined : json['sandboxVolumeId'],
34
- 'mountPath': json['mountPath'],
35
- 'cacheSize': json['cacheSize'] == null ? undefined : json['cacheSize'],
36
- 'prefetch': json['prefetch'] == null ? undefined : json['prefetch'],
37
- 'bufferSize': json['bufferSize'] == null ? undefined : json['bufferSize'],
38
- 'writeback': json['writeback'] == null ? undefined : json['writeback'],
39
- };
40
- }
41
- export function SharedVolumeSpecToJSON(json) {
42
- return SharedVolumeSpecToJSONTyped(json, false);
43
- }
44
- export function SharedVolumeSpecToJSONTyped(value, ignoreDiscriminator = false) {
45
- if (value == null) {
46
- return value;
47
- }
48
- return {
49
- 'name': value['name'],
50
- 'sandboxVolumeId': value['sandboxVolumeId'],
51
- 'mountPath': value['mountPath'],
52
- 'cacheSize': value['cacheSize'],
53
- 'prefetch': value['prefetch'],
54
- 'bufferSize': value['bufferSize'],
55
- 'writeback': value['writeback'],
56
- };
57
- }
@@ -1,85 +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 { ResourceQuota } from './ResourceQuota.js';
13
- import type { ContainerMountSpec } from './ContainerMountSpec.js';
14
- import type { EnvVar } from './EnvVar.js';
15
- import type { Probe } from './Probe.js';
16
- /**
17
- *
18
- * @export
19
- * @interface SidecarContainerSpec
20
- */
21
- export interface SidecarContainerSpec {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof SidecarContainerSpec
26
- */
27
- name: string;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof SidecarContainerSpec
32
- */
33
- image: string;
34
- /**
35
- *
36
- * @type {Array<string>}
37
- * @memberof SidecarContainerSpec
38
- */
39
- command?: Array<string>;
40
- /**
41
- *
42
- * @type {Array<string>}
43
- * @memberof SidecarContainerSpec
44
- */
45
- args?: Array<string>;
46
- /**
47
- *
48
- * @type {Array<EnvVar>}
49
- * @memberof SidecarContainerSpec
50
- */
51
- env?: Array<EnvVar>;
52
- /**
53
- *
54
- * @type {ResourceQuota}
55
- * @memberof SidecarContainerSpec
56
- */
57
- resources: ResourceQuota;
58
- /**
59
- *
60
- * @type {Array<ContainerMountSpec>}
61
- * @memberof SidecarContainerSpec
62
- */
63
- mounts?: Array<ContainerMountSpec>;
64
- /**
65
- *
66
- * @type {Probe}
67
- * @memberof SidecarContainerSpec
68
- */
69
- readinessProbe?: Probe;
70
- /**
71
- *
72
- * @type {Probe}
73
- * @memberof SidecarContainerSpec
74
- */
75
- startupProbe?: Probe;
76
- }
77
- /**
78
- * Check if a given object implements the SidecarContainerSpec interface.
79
- */
80
- export declare function instanceOfSidecarContainerSpec(value: object): value is SidecarContainerSpec;
81
- export declare function SidecarContainerSpecFromJSON(json: any): SidecarContainerSpec;
82
- export declare function SidecarContainerSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarContainerSpec;
83
- export declare function SidecarContainerSpecToJSON(json: any): SidecarContainerSpec;
84
- export declare function SidecarContainerSpecToJSONTyped(value?: SidecarContainerSpec | null, ignoreDiscriminator?: boolean): any;
85
- //# sourceMappingURL=SidecarContainerSpec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidecarContainerSpec.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/SidecarContainerSpec.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQrC;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB;;;;OAIG;IACH,SAAS,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACnC;;;;OAIG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oBAAoB,CAK3F;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE5E;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oBAAoB,CAgB/G;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE1E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAiB9H"}
@@ -1,67 +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 { ResourceQuotaFromJSON, ResourceQuotaToJSON, } from './ResourceQuota.js';
15
- import { ContainerMountSpecFromJSON, ContainerMountSpecToJSON, } from './ContainerMountSpec.js';
16
- import { EnvVarFromJSON, EnvVarToJSON, } from './EnvVar.js';
17
- import { ProbeFromJSON, ProbeToJSON, } from './Probe.js';
18
- /**
19
- * Check if a given object implements the SidecarContainerSpec interface.
20
- */
21
- export function instanceOfSidecarContainerSpec(value) {
22
- if (!('name' in value) || value['name'] === undefined)
23
- return false;
24
- if (!('image' in value) || value['image'] === undefined)
25
- return false;
26
- if (!('resources' in value) || value['resources'] === undefined)
27
- return false;
28
- return true;
29
- }
30
- export function SidecarContainerSpecFromJSON(json) {
31
- return SidecarContainerSpecFromJSONTyped(json, false);
32
- }
33
- export function SidecarContainerSpecFromJSONTyped(json, ignoreDiscriminator) {
34
- if (json == null) {
35
- return json;
36
- }
37
- return {
38
- 'name': json['name'],
39
- 'image': json['image'],
40
- 'command': json['command'] == null ? undefined : json['command'],
41
- 'args': json['args'] == null ? undefined : json['args'],
42
- 'env': json['env'] == null ? undefined : (json['env'].map(EnvVarFromJSON)),
43
- 'resources': ResourceQuotaFromJSON(json['resources']),
44
- 'mounts': json['mounts'] == null ? undefined : (json['mounts'].map(ContainerMountSpecFromJSON)),
45
- 'readinessProbe': json['readinessProbe'] == null ? undefined : ProbeFromJSON(json['readinessProbe']),
46
- 'startupProbe': json['startupProbe'] == null ? undefined : ProbeFromJSON(json['startupProbe']),
47
- };
48
- }
49
- export function SidecarContainerSpecToJSON(json) {
50
- return SidecarContainerSpecToJSONTyped(json, false);
51
- }
52
- export function SidecarContainerSpecToJSONTyped(value, ignoreDiscriminator = false) {
53
- if (value == null) {
54
- return value;
55
- }
56
- return {
57
- 'name': value['name'],
58
- 'image': value['image'],
59
- 'command': value['command'],
60
- 'args': value['args'],
61
- 'env': value['env'] == null ? undefined : (value['env'].map(EnvVarToJSON)),
62
- 'resources': ResourceQuotaToJSON(value['resources']),
63
- 'mounts': value['mounts'] == null ? undefined : (value['mounts'].map(ContainerMountSpecToJSON)),
64
- 'readinessProbe': ProbeToJSON(value['readinessProbe']),
65
- 'startupProbe': ProbeToJSON(value['startupProbe']),
66
- };
67
- }