sandbox0 0.7.8 → 0.7.9
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/dist/apispec/src/apis/SessionsApi.d.ts +202 -0
- package/dist/apispec/src/apis/SessionsApi.d.ts.map +1 -0
- package/dist/apispec/src/apis/SessionsApi.js +563 -0
- package/dist/apispec/src/apis/index.d.ts +1 -0
- package/dist/apispec/src/apis/index.d.ts.map +1 -1
- package/dist/apispec/src/apis/index.js +1 -0
- package/dist/apispec/src/models/CreateExecutionSessionAttemptRequest.d.ts +33 -0
- package/dist/apispec/src/models/CreateExecutionSessionAttemptRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/CreateExecutionSessionAttemptRequest.js +41 -0
- package/dist/apispec/src/models/ExecutionSession.d.ts +97 -0
- package/dist/apispec/src/models/ExecutionSession.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSession.js +85 -0
- package/dist/apispec/src/models/ExecutionSessionAttempt.d.ts +75 -0
- package/dist/apispec/src/models/ExecutionSessionAttempt.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionAttempt.js +61 -0
- package/dist/apispec/src/models/ExecutionSessionDesiredState.d.ts +26 -0
- package/dist/apispec/src/models/ExecutionSessionDesiredState.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionDesiredState.js +43 -0
- package/dist/apispec/src/models/ExecutionSessionDesiredStateRequest.d.ts +34 -0
- package/dist/apispec/src/models/ExecutionSessionDesiredStateRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionDesiredStateRequest.js +44 -0
- package/dist/apispec/src/models/ExecutionSessionEvent.d.ts +96 -0
- package/dist/apispec/src/models/ExecutionSessionEvent.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionEvent.js +77 -0
- package/dist/apispec/src/models/ExecutionSessionEventCursor.d.ts +39 -0
- package/dist/apispec/src/models/ExecutionSessionEventCursor.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionEventCursor.js +47 -0
- package/dist/apispec/src/models/ExecutionSessionEventPage.d.ts +41 -0
- package/dist/apispec/src/models/ExecutionSessionEventPage.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionEventPage.js +49 -0
- package/dist/apispec/src/models/ExecutionSessionEventRetentionSpec.d.ts +39 -0
- package/dist/apispec/src/models/ExecutionSessionEventRetentionSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionEventRetentionSpec.js +43 -0
- package/dist/apispec/src/models/ExecutionSessionIOMode.d.ts +26 -0
- package/dist/apispec/src/models/ExecutionSessionIOMode.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionIOMode.js +43 -0
- package/dist/apispec/src/models/ExecutionSessionIOSpec.d.ts +41 -0
- package/dist/apispec/src/models/ExecutionSessionIOSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionIOSpec.js +45 -0
- package/dist/apispec/src/models/ExecutionSessionInputRequest.d.ts +51 -0
- package/dist/apispec/src/models/ExecutionSessionInputRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionInputRequest.js +49 -0
- package/dist/apispec/src/models/ExecutionSessionInputResponse.d.ts +51 -0
- package/dist/apispec/src/models/ExecutionSessionInputResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionInputResponse.js +55 -0
- package/dist/apispec/src/models/ExecutionSessionLifecycleSpec.d.ts +66 -0
- package/dist/apispec/src/models/ExecutionSessionLifecycleSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionLifecycleSpec.js +54 -0
- package/dist/apispec/src/models/ExecutionSessionPhase.d.ts +34 -0
- package/dist/apispec/src/models/ExecutionSessionPhase.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionPhase.js +51 -0
- package/dist/apispec/src/models/ExecutionSessionReadinessSpec.d.ts +52 -0
- package/dist/apispec/src/models/ExecutionSessionReadinessSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionReadinessSpec.js +48 -0
- package/dist/apispec/src/models/ExecutionSessionReadinessType.d.ts +27 -0
- package/dist/apispec/src/models/ExecutionSessionReadinessType.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionReadinessType.js +44 -0
- package/dist/apispec/src/models/ExecutionSessionRestartPolicy.d.ts +27 -0
- package/dist/apispec/src/models/ExecutionSessionRestartPolicy.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionRestartPolicy.js +44 -0
- package/dist/apispec/src/models/ExecutionSessionRestartSpec.d.ts +58 -0
- package/dist/apispec/src/models/ExecutionSessionRestartSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionRestartSpec.js +50 -0
- package/dist/apispec/src/models/ExecutionSessionRuntimeRecoveryPolicy.d.ts +26 -0
- package/dist/apispec/src/models/ExecutionSessionRuntimeRecoveryPolicy.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionRuntimeRecoveryPolicy.js +43 -0
- package/dist/apispec/src/models/ExecutionSessionSignalRequest.d.ts +39 -0
- package/dist/apispec/src/models/ExecutionSessionSignalRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionSignalRequest.js +45 -0
- package/dist/apispec/src/models/ExecutionSessionSpec.d.ts +81 -0
- package/dist/apispec/src/models/ExecutionSessionSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionSpec.js +61 -0
- package/dist/apispec/src/models/ExecutionSessionTerminalResizeRequest.d.ts +45 -0
- package/dist/apispec/src/models/ExecutionSessionTerminalResizeRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionTerminalResizeRequest.js +49 -0
- package/dist/apispec/src/models/ExecutionSessionTerminalSpec.d.ts +45 -0
- package/dist/apispec/src/models/ExecutionSessionTerminalSpec.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionTerminalSpec.js +45 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketAck.d.ts +46 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketAck.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketAck.js +51 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketError.d.ts +52 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketError.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketError.js +55 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketEvent.d.ts +47 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketEvent.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketEvent.js +54 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketInput.d.ts +70 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketInput.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketInput.js +61 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketRequest.d.ts +25 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketRequest.js +58 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketResize.d.ts +64 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketResize.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketResize.js +61 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketResponse.d.ts +25 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketResponse.js +58 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketSignal.d.ts +58 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketSignal.d.ts.map +1 -0
- package/dist/apispec/src/models/ExecutionSessionWebSocketSignal.js +57 -0
- package/dist/apispec/src/models/SuccessAcceptedResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessAcceptedResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessAcceptedResponse.js +46 -0
- package/dist/apispec/src/models/SuccessAcceptedResponseAllOfData.d.ts +33 -0
- package/dist/apispec/src/models/SuccessAcceptedResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessAcceptedResponseAllOfData.js +43 -0
- package/dist/apispec/src/models/SuccessExecutionSessionEventPageResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessExecutionSessionEventPageResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessExecutionSessionEventPageResponse.js +46 -0
- package/dist/apispec/src/models/SuccessExecutionSessionInputResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessExecutionSessionInputResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessExecutionSessionInputResponse.js +46 -0
- package/dist/apispec/src/models/SuccessExecutionSessionListResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessExecutionSessionListResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessExecutionSessionListResponse.js +46 -0
- package/dist/apispec/src/models/SuccessExecutionSessionListResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessExecutionSessionListResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessExecutionSessionListResponseAllOfData.js +44 -0
- package/dist/apispec/src/models/SuccessExecutionSessionResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessExecutionSessionResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessExecutionSessionResponse.js +46 -0
- package/dist/apispec/src/models/index.d.ts +39 -0
- package/dist/apispec/src/models/index.d.ts.map +1 -1
- package/dist/apispec/src/models/index.js +39 -0
- package/dist/client.d.ts +3 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +9 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/models.d.ts +32 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/sandbox_contexts.d.ts +1 -1
- package/dist/sandbox_files.d.ts +1 -1
- package/dist/sandbox_network.d.ts +1 -1
- package/dist/sandbox_observability.d.ts +1 -1
- package/dist/sandbox_services.d.ts +1 -1
- package/dist/sandbox_sessions.d.ts +39 -0
- package/dist/sandbox_sessions.d.ts.map +1 -0
- package/dist/sandbox_sessions.js +275 -0
- package/package.json +1 -1
|
@@ -0,0 +1,563 @@
|
|
|
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 * as runtime from '../runtime.js';
|
|
15
|
+
import { CreateExecutionSessionAttemptRequestToJSON, ExecutionSessionDesiredStateRequestToJSON, ExecutionSessionInputRequestToJSON, ExecutionSessionSignalRequestToJSON, ExecutionSessionSpecToJSON, ExecutionSessionTerminalResizeRequestToJSON, SuccessAcceptedResponseFromJSON, SuccessDeletedResponseFromJSON, SuccessExecutionSessionEventPageResponseFromJSON, SuccessExecutionSessionInputResponseFromJSON, SuccessExecutionSessionListResponseFromJSON, SuccessExecutionSessionResponseFromJSON, SuccessResizedResponseFromJSON, } from '../models/index.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export class SessionsApi extends runtime.BaseAPI {
|
|
20
|
+
/**
|
|
21
|
+
* Lists durable process-backed sessions in the sandbox.
|
|
22
|
+
* List execution sessions
|
|
23
|
+
*/
|
|
24
|
+
async apiV1SandboxesIdSessionsGetRaw(requestParameters, initOverrides) {
|
|
25
|
+
if (requestParameters['id'] == null) {
|
|
26
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsGet().');
|
|
27
|
+
}
|
|
28
|
+
const queryParameters = {};
|
|
29
|
+
const headerParameters = {};
|
|
30
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
31
|
+
const token = this.configuration.accessToken;
|
|
32
|
+
const tokenString = await token("bearerAuth", []);
|
|
33
|
+
if (tokenString) {
|
|
34
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions`;
|
|
38
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: urlPath,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionListResponseFromJSON(jsonValue));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Lists durable process-backed sessions in the sandbox.
|
|
49
|
+
* List execution sessions
|
|
50
|
+
*/
|
|
51
|
+
async apiV1SandboxesIdSessionsGet(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.apiV1SandboxesIdSessionsGetRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates a durable process-backed session. The client connection does not own the session lifecycle.
|
|
57
|
+
* Create an execution session
|
|
58
|
+
*/
|
|
59
|
+
async apiV1SandboxesIdSessionsPostRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters['id'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsPost().');
|
|
62
|
+
}
|
|
63
|
+
if (requestParameters['executionSessionSpec'] == null) {
|
|
64
|
+
throw new runtime.RequiredError('executionSessionSpec', 'Required parameter "executionSessionSpec" was null or undefined when calling apiV1SandboxesIdSessionsPost().');
|
|
65
|
+
}
|
|
66
|
+
const queryParameters = {};
|
|
67
|
+
const headerParameters = {};
|
|
68
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
69
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
70
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
71
|
+
}
|
|
72
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
73
|
+
const token = this.configuration.accessToken;
|
|
74
|
+
const tokenString = await token("bearerAuth", []);
|
|
75
|
+
if (tokenString) {
|
|
76
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions`;
|
|
80
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
81
|
+
const response = await this.request({
|
|
82
|
+
path: urlPath,
|
|
83
|
+
method: 'POST',
|
|
84
|
+
headers: headerParameters,
|
|
85
|
+
query: queryParameters,
|
|
86
|
+
body: ExecutionSessionSpecToJSON(requestParameters['executionSessionSpec']),
|
|
87
|
+
}, initOverrides);
|
|
88
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionResponseFromJSON(jsonValue));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a durable process-backed session. The client connection does not own the session lifecycle.
|
|
92
|
+
* Create an execution session
|
|
93
|
+
*/
|
|
94
|
+
async apiV1SandboxesIdSessionsPost(requestParameters, initOverrides) {
|
|
95
|
+
const response = await this.apiV1SandboxesIdSessionsPostRaw(requestParameters, initOverrides);
|
|
96
|
+
return await response.value();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Starts a new process attempt. Set replace_current to stop and replace a running attempt.
|
|
100
|
+
* Create a new execution session attempt
|
|
101
|
+
*/
|
|
102
|
+
async apiV1SandboxesIdSessionsSessionIdAttemptsPostRaw(requestParameters, initOverrides) {
|
|
103
|
+
if (requestParameters['id'] == null) {
|
|
104
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdAttemptsPost().');
|
|
105
|
+
}
|
|
106
|
+
if (requestParameters['sessionId'] == null) {
|
|
107
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdAttemptsPost().');
|
|
108
|
+
}
|
|
109
|
+
const queryParameters = {};
|
|
110
|
+
const headerParameters = {};
|
|
111
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
112
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
113
|
+
const token = this.configuration.accessToken;
|
|
114
|
+
const tokenString = await token("bearerAuth", []);
|
|
115
|
+
if (tokenString) {
|
|
116
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/attempts`;
|
|
120
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
121
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
122
|
+
const response = await this.request({
|
|
123
|
+
path: urlPath,
|
|
124
|
+
method: 'POST',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
body: CreateExecutionSessionAttemptRequestToJSON(requestParameters['createExecutionSessionAttemptRequest']),
|
|
128
|
+
}, initOverrides);
|
|
129
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionResponseFromJSON(jsonValue));
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Starts a new process attempt. Set replace_current to stop and replace a running attempt.
|
|
133
|
+
* Create a new execution session attempt
|
|
134
|
+
*/
|
|
135
|
+
async apiV1SandboxesIdSessionsSessionIdAttemptsPost(requestParameters, initOverrides) {
|
|
136
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdAttemptsPostRaw(requestParameters, initOverrides);
|
|
137
|
+
return await response.value();
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Delete an execution session
|
|
141
|
+
*/
|
|
142
|
+
async apiV1SandboxesIdSessionsSessionIdDeleteRaw(requestParameters, initOverrides) {
|
|
143
|
+
if (requestParameters['id'] == null) {
|
|
144
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdDelete().');
|
|
145
|
+
}
|
|
146
|
+
if (requestParameters['sessionId'] == null) {
|
|
147
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdDelete().');
|
|
148
|
+
}
|
|
149
|
+
const queryParameters = {};
|
|
150
|
+
const headerParameters = {};
|
|
151
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
152
|
+
const token = this.configuration.accessToken;
|
|
153
|
+
const tokenString = await token("bearerAuth", []);
|
|
154
|
+
if (tokenString) {
|
|
155
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}`;
|
|
159
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
160
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
161
|
+
const response = await this.request({
|
|
162
|
+
path: urlPath,
|
|
163
|
+
method: 'DELETE',
|
|
164
|
+
headers: headerParameters,
|
|
165
|
+
query: queryParameters,
|
|
166
|
+
}, initOverrides);
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessDeletedResponseFromJSON(jsonValue));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Delete an execution session
|
|
171
|
+
*/
|
|
172
|
+
async apiV1SandboxesIdSessionsSessionIdDelete(requestParameters, initOverrides) {
|
|
173
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdDeleteRaw(requestParameters, initOverrides);
|
|
174
|
+
return await response.value();
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Set execution session desired state
|
|
178
|
+
*/
|
|
179
|
+
async apiV1SandboxesIdSessionsSessionIdDesiredStatePutRaw(requestParameters, initOverrides) {
|
|
180
|
+
if (requestParameters['id'] == null) {
|
|
181
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdDesiredStatePut().');
|
|
182
|
+
}
|
|
183
|
+
if (requestParameters['sessionId'] == null) {
|
|
184
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdDesiredStatePut().');
|
|
185
|
+
}
|
|
186
|
+
if (requestParameters['executionSessionDesiredStateRequest'] == null) {
|
|
187
|
+
throw new runtime.RequiredError('executionSessionDesiredStateRequest', 'Required parameter "executionSessionDesiredStateRequest" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdDesiredStatePut().');
|
|
188
|
+
}
|
|
189
|
+
const queryParameters = {};
|
|
190
|
+
const headerParameters = {};
|
|
191
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
192
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
193
|
+
const token = this.configuration.accessToken;
|
|
194
|
+
const tokenString = await token("bearerAuth", []);
|
|
195
|
+
if (tokenString) {
|
|
196
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/desired-state`;
|
|
200
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
201
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
202
|
+
const response = await this.request({
|
|
203
|
+
path: urlPath,
|
|
204
|
+
method: 'PUT',
|
|
205
|
+
headers: headerParameters,
|
|
206
|
+
query: queryParameters,
|
|
207
|
+
body: ExecutionSessionDesiredStateRequestToJSON(requestParameters['executionSessionDesiredStateRequest']),
|
|
208
|
+
}, initOverrides);
|
|
209
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionResponseFromJSON(jsonValue));
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Set execution session desired state
|
|
213
|
+
*/
|
|
214
|
+
async apiV1SandboxesIdSessionsSessionIdDesiredStatePut(requestParameters, initOverrides) {
|
|
215
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdDesiredStatePutRaw(requestParameters, initOverrides);
|
|
216
|
+
return await response.value();
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Returns retained events after the supplied sequence. Delivery is cursor-based and at least once.
|
|
220
|
+
* List execution session events
|
|
221
|
+
*/
|
|
222
|
+
async apiV1SandboxesIdSessionsSessionIdEventsGetRaw(requestParameters, initOverrides) {
|
|
223
|
+
if (requestParameters['id'] == null) {
|
|
224
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdEventsGet().');
|
|
225
|
+
}
|
|
226
|
+
if (requestParameters['sessionId'] == null) {
|
|
227
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdEventsGet().');
|
|
228
|
+
}
|
|
229
|
+
const queryParameters = {};
|
|
230
|
+
if (requestParameters['after'] != null) {
|
|
231
|
+
queryParameters['after'] = requestParameters['after'];
|
|
232
|
+
}
|
|
233
|
+
if (requestParameters['limit'] != null) {
|
|
234
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
235
|
+
}
|
|
236
|
+
const headerParameters = {};
|
|
237
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
238
|
+
const token = this.configuration.accessToken;
|
|
239
|
+
const tokenString = await token("bearerAuth", []);
|
|
240
|
+
if (tokenString) {
|
|
241
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/events`;
|
|
245
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
246
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
247
|
+
const response = await this.request({
|
|
248
|
+
path: urlPath,
|
|
249
|
+
method: 'GET',
|
|
250
|
+
headers: headerParameters,
|
|
251
|
+
query: queryParameters,
|
|
252
|
+
}, initOverrides);
|
|
253
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionEventPageResponseFromJSON(jsonValue));
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Returns retained events after the supplied sequence. Delivery is cursor-based and at least once.
|
|
257
|
+
* List execution session events
|
|
258
|
+
*/
|
|
259
|
+
async apiV1SandboxesIdSessionsSessionIdEventsGet(requestParameters, initOverrides) {
|
|
260
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdEventsGetRaw(requestParameters, initOverrides);
|
|
261
|
+
return await response.value();
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Streams retained and live events using SSE. Reconnect with Last-Event-ID or the after query parameter.
|
|
265
|
+
* Stream execution session events
|
|
266
|
+
*/
|
|
267
|
+
async apiV1SandboxesIdSessionsSessionIdEventsStreamGetRaw(requestParameters, initOverrides) {
|
|
268
|
+
if (requestParameters['id'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdEventsStreamGet().');
|
|
270
|
+
}
|
|
271
|
+
if (requestParameters['sessionId'] == null) {
|
|
272
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdEventsStreamGet().');
|
|
273
|
+
}
|
|
274
|
+
const queryParameters = {};
|
|
275
|
+
if (requestParameters['after'] != null) {
|
|
276
|
+
queryParameters['after'] = requestParameters['after'];
|
|
277
|
+
}
|
|
278
|
+
const headerParameters = {};
|
|
279
|
+
if (requestParameters['lastEventID'] != null) {
|
|
280
|
+
headerParameters['Last-Event-ID'] = String(requestParameters['lastEventID']);
|
|
281
|
+
}
|
|
282
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
283
|
+
const token = this.configuration.accessToken;
|
|
284
|
+
const tokenString = await token("bearerAuth", []);
|
|
285
|
+
if (tokenString) {
|
|
286
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/events/stream`;
|
|
290
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
291
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
292
|
+
const response = await this.request({
|
|
293
|
+
path: urlPath,
|
|
294
|
+
method: 'GET',
|
|
295
|
+
headers: headerParameters,
|
|
296
|
+
query: queryParameters,
|
|
297
|
+
}, initOverrides);
|
|
298
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
299
|
+
return new runtime.JSONApiResponse(response);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
return new runtime.TextApiResponse(response);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Streams retained and live events using SSE. Reconnect with Last-Event-ID or the after query parameter.
|
|
307
|
+
* Stream execution session events
|
|
308
|
+
*/
|
|
309
|
+
async apiV1SandboxesIdSessionsSessionIdEventsStreamGet(requestParameters, initOverrides) {
|
|
310
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdEventsStreamGetRaw(requestParameters, initOverrides);
|
|
311
|
+
return await response.value();
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Get an execution session
|
|
315
|
+
*/
|
|
316
|
+
async apiV1SandboxesIdSessionsSessionIdGetRaw(requestParameters, initOverrides) {
|
|
317
|
+
if (requestParameters['id'] == null) {
|
|
318
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdGet().');
|
|
319
|
+
}
|
|
320
|
+
if (requestParameters['sessionId'] == null) {
|
|
321
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdGet().');
|
|
322
|
+
}
|
|
323
|
+
const queryParameters = {};
|
|
324
|
+
const headerParameters = {};
|
|
325
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
326
|
+
const token = this.configuration.accessToken;
|
|
327
|
+
const tokenString = await token("bearerAuth", []);
|
|
328
|
+
if (tokenString) {
|
|
329
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}`;
|
|
333
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
334
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
335
|
+
const response = await this.request({
|
|
336
|
+
path: urlPath,
|
|
337
|
+
method: 'GET',
|
|
338
|
+
headers: headerParameters,
|
|
339
|
+
query: queryParameters,
|
|
340
|
+
}, initOverrides);
|
|
341
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionResponseFromJSON(jsonValue));
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Get an execution session
|
|
345
|
+
*/
|
|
346
|
+
async apiV1SandboxesIdSessionsSessionIdGet(requestParameters, initOverrides) {
|
|
347
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdGetRaw(requestParameters, initOverrides);
|
|
348
|
+
return await response.value();
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Writes binary-safe input to the current attempt. Once an input receipt is recorded, retrying the same input_id and content is deduplicated. A transport failure before the receipt is durable can make delivery ambiguous, so consumers must tolerate replay.
|
|
352
|
+
* Append execution session input
|
|
353
|
+
*/
|
|
354
|
+
async apiV1SandboxesIdSessionsSessionIdInputsPostRaw(requestParameters, initOverrides) {
|
|
355
|
+
if (requestParameters['id'] == null) {
|
|
356
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdInputsPost().');
|
|
357
|
+
}
|
|
358
|
+
if (requestParameters['sessionId'] == null) {
|
|
359
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdInputsPost().');
|
|
360
|
+
}
|
|
361
|
+
if (requestParameters['executionSessionInputRequest'] == null) {
|
|
362
|
+
throw new runtime.RequiredError('executionSessionInputRequest', 'Required parameter "executionSessionInputRequest" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdInputsPost().');
|
|
363
|
+
}
|
|
364
|
+
const queryParameters = {};
|
|
365
|
+
const headerParameters = {};
|
|
366
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
367
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
368
|
+
const token = this.configuration.accessToken;
|
|
369
|
+
const tokenString = await token("bearerAuth", []);
|
|
370
|
+
if (tokenString) {
|
|
371
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/inputs`;
|
|
375
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
376
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
377
|
+
const response = await this.request({
|
|
378
|
+
path: urlPath,
|
|
379
|
+
method: 'POST',
|
|
380
|
+
headers: headerParameters,
|
|
381
|
+
query: queryParameters,
|
|
382
|
+
body: ExecutionSessionInputRequestToJSON(requestParameters['executionSessionInputRequest']),
|
|
383
|
+
}, initOverrides);
|
|
384
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionInputResponseFromJSON(jsonValue));
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Writes binary-safe input to the current attempt. Once an input receipt is recorded, retrying the same input_id and content is deduplicated. A transport failure before the receipt is durable can make delivery ambiguous, so consumers must tolerate replay.
|
|
388
|
+
* Append execution session input
|
|
389
|
+
*/
|
|
390
|
+
async apiV1SandboxesIdSessionsSessionIdInputsPost(requestParameters, initOverrides) {
|
|
391
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdInputsPostRaw(requestParameters, initOverrides);
|
|
392
|
+
return await response.value();
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Replaces the specification. Changes to command, environment, I/O, or readiness create a new process attempt when the desired state is running.
|
|
396
|
+
* Replace an execution session specification
|
|
397
|
+
*/
|
|
398
|
+
async apiV1SandboxesIdSessionsSessionIdPutRaw(requestParameters, initOverrides) {
|
|
399
|
+
if (requestParameters['id'] == null) {
|
|
400
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdPut().');
|
|
401
|
+
}
|
|
402
|
+
if (requestParameters['sessionId'] == null) {
|
|
403
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdPut().');
|
|
404
|
+
}
|
|
405
|
+
if (requestParameters['executionSessionSpec'] == null) {
|
|
406
|
+
throw new runtime.RequiredError('executionSessionSpec', 'Required parameter "executionSessionSpec" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdPut().');
|
|
407
|
+
}
|
|
408
|
+
const queryParameters = {};
|
|
409
|
+
const headerParameters = {};
|
|
410
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
411
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
412
|
+
const token = this.configuration.accessToken;
|
|
413
|
+
const tokenString = await token("bearerAuth", []);
|
|
414
|
+
if (tokenString) {
|
|
415
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}`;
|
|
419
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
420
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
421
|
+
const response = await this.request({
|
|
422
|
+
path: urlPath,
|
|
423
|
+
method: 'PUT',
|
|
424
|
+
headers: headerParameters,
|
|
425
|
+
query: queryParameters,
|
|
426
|
+
body: ExecutionSessionSpecToJSON(requestParameters['executionSessionSpec']),
|
|
427
|
+
}, initOverrides);
|
|
428
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessExecutionSessionResponseFromJSON(jsonValue));
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Replaces the specification. Changes to command, environment, I/O, or readiness create a new process attempt when the desired state is running.
|
|
432
|
+
* Replace an execution session specification
|
|
433
|
+
*/
|
|
434
|
+
async apiV1SandboxesIdSessionsSessionIdPut(requestParameters, initOverrides) {
|
|
435
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdPutRaw(requestParameters, initOverrides);
|
|
436
|
+
return await response.value();
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Send a signal to an execution session attempt
|
|
440
|
+
*/
|
|
441
|
+
async apiV1SandboxesIdSessionsSessionIdSignalsPostRaw(requestParameters, initOverrides) {
|
|
442
|
+
if (requestParameters['id'] == null) {
|
|
443
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdSignalsPost().');
|
|
444
|
+
}
|
|
445
|
+
if (requestParameters['sessionId'] == null) {
|
|
446
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdSignalsPost().');
|
|
447
|
+
}
|
|
448
|
+
if (requestParameters['executionSessionSignalRequest'] == null) {
|
|
449
|
+
throw new runtime.RequiredError('executionSessionSignalRequest', 'Required parameter "executionSessionSignalRequest" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdSignalsPost().');
|
|
450
|
+
}
|
|
451
|
+
const queryParameters = {};
|
|
452
|
+
const headerParameters = {};
|
|
453
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
454
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
455
|
+
const token = this.configuration.accessToken;
|
|
456
|
+
const tokenString = await token("bearerAuth", []);
|
|
457
|
+
if (tokenString) {
|
|
458
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/signals`;
|
|
462
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
463
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
464
|
+
const response = await this.request({
|
|
465
|
+
path: urlPath,
|
|
466
|
+
method: 'POST',
|
|
467
|
+
headers: headerParameters,
|
|
468
|
+
query: queryParameters,
|
|
469
|
+
body: ExecutionSessionSignalRequestToJSON(requestParameters['executionSessionSignalRequest']),
|
|
470
|
+
}, initOverrides);
|
|
471
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessAcceptedResponseFromJSON(jsonValue));
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Send a signal to an execution session attempt
|
|
475
|
+
*/
|
|
476
|
+
async apiV1SandboxesIdSessionsSessionIdSignalsPost(requestParameters, initOverrides) {
|
|
477
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdSignalsPostRaw(requestParameters, initOverrides);
|
|
478
|
+
return await response.value();
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Resize an execution session terminal
|
|
482
|
+
*/
|
|
483
|
+
async apiV1SandboxesIdSessionsSessionIdTerminalPutRaw(requestParameters, initOverrides) {
|
|
484
|
+
if (requestParameters['id'] == null) {
|
|
485
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdTerminalPut().');
|
|
486
|
+
}
|
|
487
|
+
if (requestParameters['sessionId'] == null) {
|
|
488
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdTerminalPut().');
|
|
489
|
+
}
|
|
490
|
+
if (requestParameters['executionSessionTerminalResizeRequest'] == null) {
|
|
491
|
+
throw new runtime.RequiredError('executionSessionTerminalResizeRequest', 'Required parameter "executionSessionTerminalResizeRequest" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdTerminalPut().');
|
|
492
|
+
}
|
|
493
|
+
const queryParameters = {};
|
|
494
|
+
const headerParameters = {};
|
|
495
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
496
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
497
|
+
const token = this.configuration.accessToken;
|
|
498
|
+
const tokenString = await token("bearerAuth", []);
|
|
499
|
+
if (tokenString) {
|
|
500
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/terminal`;
|
|
504
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
505
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
506
|
+
const response = await this.request({
|
|
507
|
+
path: urlPath,
|
|
508
|
+
method: 'PUT',
|
|
509
|
+
headers: headerParameters,
|
|
510
|
+
query: queryParameters,
|
|
511
|
+
body: ExecutionSessionTerminalResizeRequestToJSON(requestParameters['executionSessionTerminalResizeRequest']),
|
|
512
|
+
}, initOverrides);
|
|
513
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessResizedResponseFromJSON(jsonValue));
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Resize an execution session terminal
|
|
517
|
+
*/
|
|
518
|
+
async apiV1SandboxesIdSessionsSessionIdTerminalPut(requestParameters, initOverrides) {
|
|
519
|
+
const response = await this.apiV1SandboxesIdSessionsSessionIdTerminalPutRaw(requestParameters, initOverrides);
|
|
520
|
+
return await response.value();
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* A WebSocket is an ephemeral attachment. Closing it does not stop the session or close process input.
|
|
524
|
+
* Attach to an execution session with WebSocket
|
|
525
|
+
*/
|
|
526
|
+
async apiV1SandboxesIdSessionsSessionIdWsGetRaw(requestParameters, initOverrides) {
|
|
527
|
+
if (requestParameters['id'] == null) {
|
|
528
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdWsGet().');
|
|
529
|
+
}
|
|
530
|
+
if (requestParameters['sessionId'] == null) {
|
|
531
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling apiV1SandboxesIdSessionsSessionIdWsGet().');
|
|
532
|
+
}
|
|
533
|
+
const queryParameters = {};
|
|
534
|
+
if (requestParameters['after'] != null) {
|
|
535
|
+
queryParameters['after'] = requestParameters['after'];
|
|
536
|
+
}
|
|
537
|
+
const headerParameters = {};
|
|
538
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
539
|
+
const token = this.configuration.accessToken;
|
|
540
|
+
const tokenString = await token("bearerAuth", []);
|
|
541
|
+
if (tokenString) {
|
|
542
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
let urlPath = `/api/v1/sandboxes/{id}/sessions/{session_id}/ws`;
|
|
546
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
547
|
+
urlPath = urlPath.replace(`{${"session_id"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
|
|
548
|
+
const response = await this.request({
|
|
549
|
+
path: urlPath,
|
|
550
|
+
method: 'GET',
|
|
551
|
+
headers: headerParameters,
|
|
552
|
+
query: queryParameters,
|
|
553
|
+
}, initOverrides);
|
|
554
|
+
return new runtime.VoidApiResponse(response);
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* A WebSocket is an ephemeral attachment. Closing it does not stop the session or close process input.
|
|
558
|
+
* Attach to an execution session with WebSocket
|
|
559
|
+
*/
|
|
560
|
+
async apiV1SandboxesIdSessionsSessionIdWsGet(requestParameters, initOverrides) {
|
|
561
|
+
await this.apiV1SandboxesIdSessionsSessionIdWsGetRaw(requestParameters, initOverrides);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
@@ -11,6 +11,7 @@ export * from './RegistryApi.js';
|
|
|
11
11
|
export * from './SandboxRootfsApi.js';
|
|
12
12
|
export * from './SandboxVolumesApi.js';
|
|
13
13
|
export * from './SandboxesApi.js';
|
|
14
|
+
export * from './SessionsApi.js';
|
|
14
15
|
export * from './SnapshotsApi.js';
|
|
15
16
|
export * from './TeamsApi.js';
|
|
16
17
|
export * from './TemplatesApi.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -13,6 +13,7 @@ export * from './RegistryApi.js';
|
|
|
13
13
|
export * from './SandboxRootfsApi.js';
|
|
14
14
|
export * from './SandboxVolumesApi.js';
|
|
15
15
|
export * from './SandboxesApi.js';
|
|
16
|
+
export * from './SessionsApi.js';
|
|
16
17
|
export * from './SnapshotsApi.js';
|
|
17
18
|
export * from './TeamsApi.js';
|
|
18
19
|
export * from './TemplatesApi.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
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 CreateExecutionSessionAttemptRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateExecutionSessionAttemptRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof CreateExecutionSessionAttemptRequest
|
|
22
|
+
*/
|
|
23
|
+
replaceCurrent?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the CreateExecutionSessionAttemptRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfCreateExecutionSessionAttemptRequest(value: object): value is CreateExecutionSessionAttemptRequest;
|
|
29
|
+
export declare function CreateExecutionSessionAttemptRequestFromJSON(json: any): CreateExecutionSessionAttemptRequest;
|
|
30
|
+
export declare function CreateExecutionSessionAttemptRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateExecutionSessionAttemptRequest;
|
|
31
|
+
export declare function CreateExecutionSessionAttemptRequestToJSON(json: any): CreateExecutionSessionAttemptRequest;
|
|
32
|
+
export declare function CreateExecutionSessionAttemptRequestToJSONTyped(value?: CreateExecutionSessionAttemptRequest | null, ignoreDiscriminator?: boolean): any;
|
|
33
|
+
//# sourceMappingURL=CreateExecutionSessionAttemptRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateExecutionSessionAttemptRequest.d.ts","sourceRoot":"","sources":["../../../../src/apispec/src/models/CreateExecutionSessionAttemptRequest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACjD;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,8CAA8C,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oCAAoC,CAE3H;AAED,wBAAgB,4CAA4C,CAAC,IAAI,EAAE,GAAG,GAAG,oCAAoC,CAE5G;AAED,wBAAgB,iDAAiD,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oCAAoC,CAQ/I;AAED,wBAAgB,0CAA0C,CAAC,IAAI,EAAE,GAAG,GAAG,oCAAoC,CAE1G;AAED,wBAAgB,+CAA+C,CAAC,KAAK,CAAC,EAAE,oCAAoC,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAS9J"}
|