sandbox0 0.2.6 → 0.2.7
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/README.md +3 -1
- package/dist/apispec/src/apis/ApiKeysApi.d.ts +11 -1
- package/dist/apispec/src/apis/ApiKeysApi.d.ts.map +1 -1
- package/dist/apispec/src/apis/ApiKeysApi.js +32 -1
- package/dist/apispec/src/apis/UsersApi.d.ts +31 -1
- package/dist/apispec/src/apis/UsersApi.d.ts.map +1 -1
- package/dist/apispec/src/apis/UsersApi.js +97 -1
- package/dist/apispec/src/models/CreateSSHPublicKeyRequest.d.ts +39 -0
- package/dist/apispec/src/models/CreateSSHPublicKeyRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/CreateSSHPublicKeyRequest.js +47 -0
- package/dist/apispec/src/models/CurrentAPIKeyResponse.d.ts +75 -0
- package/dist/apispec/src/models/CurrentAPIKeyResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/CurrentAPIKeyResponse.js +71 -0
- package/dist/apispec/src/models/SSHPublicKey.d.ts +75 -0
- package/dist/apispec/src/models/SSHPublicKey.d.ts.map +1 -0
- package/dist/apispec/src/models/SSHPublicKey.js +69 -0
- package/dist/apispec/src/models/Sandbox.d.ts +7 -0
- package/dist/apispec/src/models/Sandbox.d.ts.map +1 -1
- package/dist/apispec/src/models/Sandbox.js +3 -0
- package/dist/apispec/src/models/SandboxSSHConnection.d.ts +45 -0
- package/dist/apispec/src/models/SandboxSSHConnection.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxSSHConnection.js +51 -0
- package/dist/apispec/src/models/SandboxTemplateSpec.d.ts +3 -10
- package/dist/apispec/src/models/SandboxTemplateSpec.d.ts.map +1 -1
- package/dist/apispec/src/models/SandboxTemplateSpec.js +3 -6
- package/dist/apispec/src/models/SuccessCurrentAPIKeyResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessCurrentAPIKeyResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessCurrentAPIKeyResponse.js +46 -0
- package/dist/apispec/src/models/SuccessCurrentAPIKeyResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessCurrentAPIKeyResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessCurrentAPIKeyResponseAllOfData.js +42 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyListResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyListResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyListResponse.js +46 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyListResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyListResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyListResponseAllOfData.js +42 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessSSHPublicKeyResponse.js +46 -0
- package/dist/apispec/src/models/WarmProcessSpec.d.ts +67 -0
- package/dist/apispec/src/models/WarmProcessSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/WarmProcessSpec.js +58 -0
- package/dist/apispec/src/models/index.d.ts +10 -3
- package/dist/apispec/src/models/index.d.ts.map +1 -1
- package/dist/apispec/src/models/index.js +10 -3
- package/dist/resources/volumes.js +1 -1
- package/dist/response_normalize.d.ts.map +1 -1
- package/dist/response_normalize.js +1 -2
- package/dist/sandbox.js +1 -1
- package/dist/sandbox_files.js +1 -1
- package/dist/template_helpers.d.ts +7 -19
- package/dist/template_helpers.d.ts.map +1 -1
- package/dist/template_helpers.js +7 -26
- package/dist/ws_client.d.ts +13 -3
- package/dist/ws_client.d.ts.map +1 -1
- package/dist/ws_client.js +145 -28
- package/package.json +1 -1
- package/dist/apispec/src/models/ContainerMountSpec.d.ts +0 -45
- package/dist/apispec/src/models/ContainerMountSpec.d.ts.map +0 -1
- package/dist/apispec/src/models/ContainerMountSpec.js +0 -49
- package/dist/apispec/src/models/SharedVolumeSpec.d.ts +0 -69
- package/dist/apispec/src/models/SharedVolumeSpec.d.ts.map +0 -1
- package/dist/apispec/src/models/SharedVolumeSpec.js +0 -57
- package/dist/apispec/src/models/SidecarContainerSpec.d.ts +0 -85
- package/dist/apispec/src/models/SidecarContainerSpec.d.ts.map +0 -1
- package/dist/apispec/src/models/SidecarContainerSpec.js +0 -67
package/dist/ws_client.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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 =
|
|
10
|
-
this.socket
|
|
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 ===
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
cleanupOpen();
|
|
56
|
+
cleanupError();
|
|
57
|
+
cleanupClose();
|
|
49
58
|
};
|
|
50
|
-
this.socket
|
|
51
|
-
this.socket
|
|
52
|
-
this.socket
|
|
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
|
|
57
|
-
return () => this.socket.off("message", handler);
|
|
65
|
+
return addMessageListener(this.socket, handler);
|
|
58
66
|
}
|
|
59
67
|
onClose(handler) {
|
|
60
|
-
this.socket
|
|
61
|
-
return () => this.socket.off("close", handler);
|
|
68
|
+
return addCloseListener(this.socket, handler);
|
|
62
69
|
}
|
|
63
70
|
onError(handler) {
|
|
64
|
-
this.socket
|
|
65
|
-
return () => this.socket.off("error", handler);
|
|
71
|
+
return addErrorListener(this.socket, handler);
|
|
66
72
|
}
|
|
67
73
|
send(payload) {
|
|
68
|
-
if (this.socket.readyState ===
|
|
74
|
+
if (this.socket.readyState === READY_STATE.OPEN) {
|
|
69
75
|
this.socket.send(payload);
|
|
70
76
|
return;
|
|
71
77
|
}
|
|
72
|
-
if (this.socket.readyState ===
|
|
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 ===
|
|
86
|
+
if (this.socket.readyState === READY_STATE.CONNECTING) {
|
|
81
87
|
this.closePending = true;
|
|
82
88
|
return;
|
|
83
89
|
}
|
|
84
|
-
if (this.socket.readyState ===
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
cleanupMessage();
|
|
117
|
+
cleanupError();
|
|
118
|
+
cleanupClose();
|
|
113
119
|
};
|
|
114
|
-
this.socket
|
|
115
|
-
this.socket
|
|
116
|
-
this.socket
|
|
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 ===
|
|
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,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
|
-
}
|