@daytonaio/api-client 0.9.8 → 0.12.2

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 (65) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/docker-registry-api.ts +12 -76
  4. package/api/images-api.ts +380 -0
  5. package/api/toolbox-api.ts +169 -0
  6. package/api.ts +1 -0
  7. package/dist/api/docker-registry-api.d.ts +16 -44
  8. package/dist/api/docker-registry-api.js +0 -62
  9. package/dist/api/images-api.d.ts +184 -0
  10. package/dist/api/images-api.js +361 -0
  11. package/dist/api/toolbox-api.d.ts +79 -0
  12. package/dist/api/toolbox-api.js +159 -0
  13. package/dist/api.d.ts +1 -0
  14. package/dist/api.js +1 -0
  15. package/dist/esm/api/docker-registry-api.d.ts +16 -44
  16. package/dist/esm/api/docker-registry-api.js +0 -62
  17. package/dist/esm/api/images-api.d.ts +184 -0
  18. package/dist/esm/api/images-api.js +354 -0
  19. package/dist/esm/api/toolbox-api.d.ts +79 -0
  20. package/dist/esm/api/toolbox-api.js +159 -0
  21. package/dist/esm/api.d.ts +1 -0
  22. package/dist/esm/api.js +1 -0
  23. package/dist/esm/models/command.d.ts +2 -8
  24. package/dist/esm/models/create-docker-registry.d.ts +0 -6
  25. package/dist/esm/models/create-image.d.ts +30 -0
  26. package/dist/esm/models/create-image.js +14 -0
  27. package/dist/esm/models/docker-registry.d.ts +60 -0
  28. package/dist/esm/models/docker-registry.js +14 -0
  29. package/dist/esm/models/image-dto.d.ts +93 -0
  30. package/dist/esm/models/image-dto.js +21 -0
  31. package/dist/esm/models/index.d.ts +5 -0
  32. package/dist/esm/models/index.js +5 -0
  33. package/dist/esm/models/paginated-images-dto.d.ts +43 -0
  34. package/dist/esm/models/paginated-images-dto.js +14 -0
  35. package/dist/esm/models/toggle-state.d.ts +24 -0
  36. package/dist/esm/models/toggle-state.js +14 -0
  37. package/dist/esm/models/update-docker-registry.d.ts +2 -20
  38. package/dist/esm/models/usage-overview.d.ts +24 -0
  39. package/dist/models/command.d.ts +2 -8
  40. package/dist/models/create-docker-registry.d.ts +0 -6
  41. package/dist/models/create-image.d.ts +30 -0
  42. package/dist/models/create-image.js +15 -0
  43. package/dist/models/docker-registry.d.ts +60 -0
  44. package/dist/models/docker-registry.js +15 -0
  45. package/dist/models/image-dto.d.ts +93 -0
  46. package/dist/models/image-dto.js +24 -0
  47. package/dist/models/index.d.ts +5 -0
  48. package/dist/models/index.js +5 -0
  49. package/dist/models/paginated-images-dto.d.ts +43 -0
  50. package/dist/models/paginated-images-dto.js +15 -0
  51. package/dist/models/toggle-state.d.ts +24 -0
  52. package/dist/models/toggle-state.js +15 -0
  53. package/dist/models/update-docker-registry.d.ts +2 -20
  54. package/dist/models/usage-overview.d.ts +24 -0
  55. package/models/command.ts +2 -8
  56. package/models/create-docker-registry.ts +0 -6
  57. package/models/create-image.ts +36 -0
  58. package/models/docker-registry.ts +66 -0
  59. package/models/image-dto.ts +102 -0
  60. package/models/index.ts +5 -0
  61. package/models/paginated-images-dto.ts +51 -0
  62. package/models/toggle-state.ts +30 -0
  63. package/models/update-docker-registry.ts +2 -20
  64. package/models/usage-overview.ts +24 -0
  65. package/package.json +1 -1
@@ -0,0 +1,361 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Daytona Workspaces
6
+ * Daytona Workspaces API Docs
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ImagesApi = exports.ImagesApiFactory = exports.ImagesApiFp = exports.ImagesApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * ImagesApi - axios parameter creator
34
+ * @export
35
+ */
36
+ const ImagesApiAxiosParamCreator = function (configuration) {
37
+ return {
38
+ /**
39
+ *
40
+ * @summary Create a new image
41
+ * @param {CreateImage} createImage
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ createImage: (createImage_1, ...args_1) => __awaiter(this, [createImage_1, ...args_1], void 0, function* (createImage, options = {}) {
46
+ // verify required parameter 'createImage' is not null or undefined
47
+ (0, common_1.assertParamExists)('createImage', 'createImage', createImage);
48
+ const localVarPath = `/images`;
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
56
+ const localVarHeaderParameter = {};
57
+ const localVarQueryParameter = {};
58
+ // authentication oauth2 required
59
+ // oauth required
60
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
61
+ localVarHeaderParameter['Content-Type'] = 'application/json';
62
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
63
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
64
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
65
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createImage, localVarRequestOptions, configuration);
66
+ return {
67
+ url: (0, common_1.toPathString)(localVarUrlObj),
68
+ options: localVarRequestOptions,
69
+ };
70
+ }),
71
+ /**
72
+ *
73
+ * @summary List all images
74
+ * @param {number} [limit] Number of items per page
75
+ * @param {number} [page] Page number
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ */
79
+ getAllImages: (limit_1, page_1, ...args_1) => __awaiter(this, [limit_1, page_1, ...args_1], void 0, function* (limit, page, options = {}) {
80
+ const localVarPath = `/images`;
81
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
82
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
83
+ let baseOptions;
84
+ if (configuration) {
85
+ baseOptions = configuration.baseOptions;
86
+ }
87
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
88
+ const localVarHeaderParameter = {};
89
+ const localVarQueryParameter = {};
90
+ // authentication oauth2 required
91
+ // oauth required
92
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
93
+ if (limit !== undefined) {
94
+ localVarQueryParameter['limit'] = limit;
95
+ }
96
+ if (page !== undefined) {
97
+ localVarQueryParameter['page'] = page;
98
+ }
99
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
102
+ return {
103
+ url: (0, common_1.toPathString)(localVarUrlObj),
104
+ options: localVarRequestOptions,
105
+ };
106
+ }),
107
+ /**
108
+ *
109
+ * @summary Delete image
110
+ * @param {string} id Image ID
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ removeImage: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
115
+ // verify required parameter 'id' is not null or undefined
116
+ (0, common_1.assertParamExists)('removeImage', 'id', id);
117
+ const localVarPath = `/images/{id}`
118
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
119
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
120
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
121
+ let baseOptions;
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ }
125
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
126
+ const localVarHeaderParameter = {};
127
+ const localVarQueryParameter = {};
128
+ // authentication oauth2 required
129
+ // oauth required
130
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ return {
135
+ url: (0, common_1.toPathString)(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ }),
139
+ /**
140
+ *
141
+ * @summary Toggle image state
142
+ * @param {string} id Image ID
143
+ * @param {ToggleState} toggleState
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ toggleImageState: (id_1, toggleState_1, ...args_1) => __awaiter(this, [id_1, toggleState_1, ...args_1], void 0, function* (id, toggleState, options = {}) {
148
+ // verify required parameter 'id' is not null or undefined
149
+ (0, common_1.assertParamExists)('toggleImageState', 'id', id);
150
+ // verify required parameter 'toggleState' is not null or undefined
151
+ (0, common_1.assertParamExists)('toggleImageState', 'toggleState', toggleState);
152
+ const localVarPath = `/images/{id}/toggle`
153
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
154
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
155
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
156
+ let baseOptions;
157
+ if (configuration) {
158
+ baseOptions = configuration.baseOptions;
159
+ }
160
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
161
+ const localVarHeaderParameter = {};
162
+ const localVarQueryParameter = {};
163
+ // authentication oauth2 required
164
+ // oauth required
165
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
166
+ localVarHeaderParameter['Content-Type'] = 'application/json';
167
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
169
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
170
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(toggleState, localVarRequestOptions, configuration);
171
+ return {
172
+ url: (0, common_1.toPathString)(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ };
175
+ }),
176
+ };
177
+ };
178
+ exports.ImagesApiAxiosParamCreator = ImagesApiAxiosParamCreator;
179
+ /**
180
+ * ImagesApi - functional programming interface
181
+ * @export
182
+ */
183
+ const ImagesApiFp = function (configuration) {
184
+ const localVarAxiosParamCreator = (0, exports.ImagesApiAxiosParamCreator)(configuration);
185
+ return {
186
+ /**
187
+ *
188
+ * @summary Create a new image
189
+ * @param {CreateImage} createImage
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ createImage(createImage, options) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ var _a, _b, _c;
196
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createImage(createImage, options);
197
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
198
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ImagesApi.createImage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
199
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
200
+ });
201
+ },
202
+ /**
203
+ *
204
+ * @summary List all images
205
+ * @param {number} [limit] Number of items per page
206
+ * @param {number} [page] Page number
207
+ * @param {*} [options] Override http request option.
208
+ * @throws {RequiredError}
209
+ */
210
+ getAllImages(limit, page, options) {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ var _a, _b, _c;
213
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllImages(limit, page, options);
214
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
215
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ImagesApi.getAllImages']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
216
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
217
+ });
218
+ },
219
+ /**
220
+ *
221
+ * @summary Delete image
222
+ * @param {string} id Image ID
223
+ * @param {*} [options] Override http request option.
224
+ * @throws {RequiredError}
225
+ */
226
+ removeImage(id, options) {
227
+ return __awaiter(this, void 0, void 0, function* () {
228
+ var _a, _b, _c;
229
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.removeImage(id, options);
230
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
231
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ImagesApi.removeImage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
232
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
233
+ });
234
+ },
235
+ /**
236
+ *
237
+ * @summary Toggle image state
238
+ * @param {string} id Image ID
239
+ * @param {ToggleState} toggleState
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ */
243
+ toggleImageState(id, toggleState, options) {
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ var _a, _b, _c;
246
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleImageState(id, toggleState, options);
247
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
248
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ImagesApi.toggleImageState']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
249
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
250
+ });
251
+ },
252
+ };
253
+ };
254
+ exports.ImagesApiFp = ImagesApiFp;
255
+ /**
256
+ * ImagesApi - factory interface
257
+ * @export
258
+ */
259
+ const ImagesApiFactory = function (configuration, basePath, axios) {
260
+ const localVarFp = (0, exports.ImagesApiFp)(configuration);
261
+ return {
262
+ /**
263
+ *
264
+ * @summary Create a new image
265
+ * @param {CreateImage} createImage
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ createImage(createImage, options) {
270
+ return localVarFp.createImage(createImage, options).then((request) => request(axios, basePath));
271
+ },
272
+ /**
273
+ *
274
+ * @summary List all images
275
+ * @param {number} [limit] Number of items per page
276
+ * @param {number} [page] Page number
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ getAllImages(limit, page, options) {
281
+ return localVarFp.getAllImages(limit, page, options).then((request) => request(axios, basePath));
282
+ },
283
+ /**
284
+ *
285
+ * @summary Delete image
286
+ * @param {string} id Image ID
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ removeImage(id, options) {
291
+ return localVarFp.removeImage(id, options).then((request) => request(axios, basePath));
292
+ },
293
+ /**
294
+ *
295
+ * @summary Toggle image state
296
+ * @param {string} id Image ID
297
+ * @param {ToggleState} toggleState
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ toggleImageState(id, toggleState, options) {
302
+ return localVarFp.toggleImageState(id, toggleState, options).then((request) => request(axios, basePath));
303
+ },
304
+ };
305
+ };
306
+ exports.ImagesApiFactory = ImagesApiFactory;
307
+ /**
308
+ * ImagesApi - object-oriented interface
309
+ * @export
310
+ * @class ImagesApi
311
+ * @extends {BaseAPI}
312
+ */
313
+ class ImagesApi extends base_1.BaseAPI {
314
+ /**
315
+ *
316
+ * @summary Create a new image
317
+ * @param {CreateImage} createImage
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ * @memberof ImagesApi
321
+ */
322
+ createImage(createImage, options) {
323
+ return (0, exports.ImagesApiFp)(this.configuration).createImage(createImage, options).then((request) => request(this.axios, this.basePath));
324
+ }
325
+ /**
326
+ *
327
+ * @summary List all images
328
+ * @param {number} [limit] Number of items per page
329
+ * @param {number} [page] Page number
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ * @memberof ImagesApi
333
+ */
334
+ getAllImages(limit, page, options) {
335
+ return (0, exports.ImagesApiFp)(this.configuration).getAllImages(limit, page, options).then((request) => request(this.axios, this.basePath));
336
+ }
337
+ /**
338
+ *
339
+ * @summary Delete image
340
+ * @param {string} id Image ID
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ * @memberof ImagesApi
344
+ */
345
+ removeImage(id, options) {
346
+ return (0, exports.ImagesApiFp)(this.configuration).removeImage(id, options).then((request) => request(this.axios, this.basePath));
347
+ }
348
+ /**
349
+ *
350
+ * @summary Toggle image state
351
+ * @param {string} id Image ID
352
+ * @param {ToggleState} toggleState
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ * @memberof ImagesApi
356
+ */
357
+ toggleImageState(id, toggleState, options) {
358
+ return (0, exports.ImagesApiFp)(this.configuration).toggleImageState(id, toggleState, options).then((request) => request(this.axios, this.basePath));
359
+ }
360
+ }
361
+ exports.ImagesApi = ImagesApi;
@@ -12,6 +12,7 @@
12
12
  import type { Configuration } from '../configuration';
13
13
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { Command } from '../models';
15
16
  import type { CompletionList } from '../models';
16
17
  import type { CreateSessionRequest } from '../models';
17
18
  import type { ExecuteRequest } from '../models';
@@ -135,6 +136,25 @@ export declare const ToolboxApiAxiosParamCreator: (configuration?: Configuration
135
136
  * @throws {RequiredError}
136
137
  */
137
138
  getProjectDir: (workspaceId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
139
+ /**
140
+ * Get session by ID
141
+ * @summary Get session
142
+ * @param {string} workspaceId
143
+ * @param {string} sessionId
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ getSession: (workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
148
+ /**
149
+ * Get session command by ID
150
+ * @summary Get session command
151
+ * @param {string} workspaceId
152
+ * @param {string} sessionId
153
+ * @param {string} commandId
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ getSessionCommand: (workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
138
158
  /**
139
159
  * Get logs for a specific command in a session
140
160
  * @summary Get command logs
@@ -459,6 +479,25 @@ export declare const ToolboxApiFp: (configuration?: Configuration) => {
459
479
  * @throws {RequiredError}
460
480
  */
461
481
  getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectDirResponse>>;
482
+ /**
483
+ * Get session by ID
484
+ * @summary Get session
485
+ * @param {string} workspaceId
486
+ * @param {string} sessionId
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ */
490
+ getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>>;
491
+ /**
492
+ * Get session command by ID
493
+ * @summary Get session command
494
+ * @param {string} workspaceId
495
+ * @param {string} sessionId
496
+ * @param {string} commandId
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Command>>;
462
501
  /**
463
502
  * Get logs for a specific command in a session
464
503
  * @summary Get command logs
@@ -783,6 +822,25 @@ export declare const ToolboxApiFactory: (configuration?: Configuration, basePath
783
822
  * @throws {RequiredError}
784
823
  */
785
824
  getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): AxiosPromise<ProjectDirResponse>;
825
+ /**
826
+ * Get session by ID
827
+ * @summary Get session
828
+ * @param {string} workspaceId
829
+ * @param {string} sessionId
830
+ * @param {*} [options] Override http request option.
831
+ * @throws {RequiredError}
832
+ */
833
+ getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<Session>;
834
+ /**
835
+ * Get session command by ID
836
+ * @summary Get session command
837
+ * @param {string} workspaceId
838
+ * @param {string} sessionId
839
+ * @param {string} commandId
840
+ * @param {*} [options] Override http request option.
841
+ * @throws {RequiredError}
842
+ */
843
+ getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): AxiosPromise<Command>;
786
844
  /**
787
845
  * Get logs for a specific command in a session
788
846
  * @summary Get command logs
@@ -1119,6 +1177,27 @@ export declare class ToolboxApi extends BaseAPI {
1119
1177
  * @memberof ToolboxApi
1120
1178
  */
1121
1179
  getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ProjectDirResponse, any>>;
1180
+ /**
1181
+ * Get session by ID
1182
+ * @summary Get session
1183
+ * @param {string} workspaceId
1184
+ * @param {string} sessionId
1185
+ * @param {*} [options] Override http request option.
1186
+ * @throws {RequiredError}
1187
+ * @memberof ToolboxApi
1188
+ */
1189
+ getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Session, any>>;
1190
+ /**
1191
+ * Get session command by ID
1192
+ * @summary Get session command
1193
+ * @param {string} workspaceId
1194
+ * @param {string} sessionId
1195
+ * @param {string} commandId
1196
+ * @param {*} [options] Override http request option.
1197
+ * @throws {RequiredError}
1198
+ * @memberof ToolboxApi
1199
+ */
1200
+ getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Command, any>>;
1122
1201
  /**
1123
1202
  * Get logs for a specific command in a session
1124
1203
  * @summary Get command logs
@@ -420,6 +420,82 @@ const ToolboxApiAxiosParamCreator = function (configuration) {
420
420
  options: localVarRequestOptions,
421
421
  };
422
422
  }),
423
+ /**
424
+ * Get session by ID
425
+ * @summary Get session
426
+ * @param {string} workspaceId
427
+ * @param {string} sessionId
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ getSession: (workspaceId_1, sessionId_1, ...args_1) => __awaiter(this, [workspaceId_1, sessionId_1, ...args_1], void 0, function* (workspaceId, sessionId, options = {}) {
432
+ // verify required parameter 'workspaceId' is not null or undefined
433
+ (0, common_1.assertParamExists)('getSession', 'workspaceId', workspaceId);
434
+ // verify required parameter 'sessionId' is not null or undefined
435
+ (0, common_1.assertParamExists)('getSession', 'sessionId', sessionId);
436
+ const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}`
437
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
438
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
439
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
440
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
441
+ let baseOptions;
442
+ if (configuration) {
443
+ baseOptions = configuration.baseOptions;
444
+ }
445
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
446
+ const localVarHeaderParameter = {};
447
+ const localVarQueryParameter = {};
448
+ // authentication oauth2 required
449
+ // oauth required
450
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
451
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
452
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
453
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
454
+ return {
455
+ url: (0, common_1.toPathString)(localVarUrlObj),
456
+ options: localVarRequestOptions,
457
+ };
458
+ }),
459
+ /**
460
+ * Get session command by ID
461
+ * @summary Get session command
462
+ * @param {string} workspaceId
463
+ * @param {string} sessionId
464
+ * @param {string} commandId
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ getSessionCommand: (workspaceId_1, sessionId_1, commandId_1, ...args_1) => __awaiter(this, [workspaceId_1, sessionId_1, commandId_1, ...args_1], void 0, function* (workspaceId, sessionId, commandId, options = {}) {
469
+ // verify required parameter 'workspaceId' is not null or undefined
470
+ (0, common_1.assertParamExists)('getSessionCommand', 'workspaceId', workspaceId);
471
+ // verify required parameter 'sessionId' is not null or undefined
472
+ (0, common_1.assertParamExists)('getSessionCommand', 'sessionId', sessionId);
473
+ // verify required parameter 'commandId' is not null or undefined
474
+ (0, common_1.assertParamExists)('getSessionCommand', 'commandId', commandId);
475
+ const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}/command/{commandId}`
476
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
477
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)))
478
+ .replace(`{${"commandId"}}`, encodeURIComponent(String(commandId)));
479
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
480
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
481
+ let baseOptions;
482
+ if (configuration) {
483
+ baseOptions = configuration.baseOptions;
484
+ }
485
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
486
+ const localVarHeaderParameter = {};
487
+ const localVarQueryParameter = {};
488
+ // authentication oauth2 required
489
+ // oauth required
490
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
491
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
492
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
493
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
494
+ return {
495
+ url: (0, common_1.toPathString)(localVarUrlObj),
496
+ options: localVarRequestOptions,
497
+ };
498
+ }),
423
499
  /**
424
500
  * Get logs for a specific command in a session
425
501
  * @summary Get command logs
@@ -1551,6 +1627,41 @@ const ToolboxApiFp = function (configuration) {
1551
1627
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1552
1628
  });
1553
1629
  },
1630
+ /**
1631
+ * Get session by ID
1632
+ * @summary Get session
1633
+ * @param {string} workspaceId
1634
+ * @param {string} sessionId
1635
+ * @param {*} [options] Override http request option.
1636
+ * @throws {RequiredError}
1637
+ */
1638
+ getSession(workspaceId, sessionId, options) {
1639
+ return __awaiter(this, void 0, void 0, function* () {
1640
+ var _a, _b, _c;
1641
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSession(workspaceId, sessionId, options);
1642
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1643
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ToolboxApi.getSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1644
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1645
+ });
1646
+ },
1647
+ /**
1648
+ * Get session command by ID
1649
+ * @summary Get session command
1650
+ * @param {string} workspaceId
1651
+ * @param {string} sessionId
1652
+ * @param {string} commandId
1653
+ * @param {*} [options] Override http request option.
1654
+ * @throws {RequiredError}
1655
+ */
1656
+ getSessionCommand(workspaceId, sessionId, commandId, options) {
1657
+ return __awaiter(this, void 0, void 0, function* () {
1658
+ var _a, _b, _c;
1659
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSessionCommand(workspaceId, sessionId, commandId, options);
1660
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1661
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ToolboxApi.getSessionCommand']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1662
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1663
+ });
1664
+ },
1554
1665
  /**
1555
1666
  * Get logs for a specific command in a session
1556
1667
  * @summary Get command logs
@@ -2091,6 +2202,29 @@ const ToolboxApiFactory = function (configuration, basePath, axios) {
2091
2202
  getProjectDir(workspaceId, options) {
2092
2203
  return localVarFp.getProjectDir(workspaceId, options).then((request) => request(axios, basePath));
2093
2204
  },
2205
+ /**
2206
+ * Get session by ID
2207
+ * @summary Get session
2208
+ * @param {string} workspaceId
2209
+ * @param {string} sessionId
2210
+ * @param {*} [options] Override http request option.
2211
+ * @throws {RequiredError}
2212
+ */
2213
+ getSession(workspaceId, sessionId, options) {
2214
+ return localVarFp.getSession(workspaceId, sessionId, options).then((request) => request(axios, basePath));
2215
+ },
2216
+ /**
2217
+ * Get session command by ID
2218
+ * @summary Get session command
2219
+ * @param {string} workspaceId
2220
+ * @param {string} sessionId
2221
+ * @param {string} commandId
2222
+ * @param {*} [options] Override http request option.
2223
+ * @throws {RequiredError}
2224
+ */
2225
+ getSessionCommand(workspaceId, sessionId, commandId, options) {
2226
+ return localVarFp.getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(axios, basePath));
2227
+ },
2094
2228
  /**
2095
2229
  * Get logs for a specific command in a session
2096
2230
  * @summary Get command logs
@@ -2497,6 +2631,31 @@ class ToolboxApi extends base_1.BaseAPI {
2497
2631
  getProjectDir(workspaceId, options) {
2498
2632
  return (0, exports.ToolboxApiFp)(this.configuration).getProjectDir(workspaceId, options).then((request) => request(this.axios, this.basePath));
2499
2633
  }
2634
+ /**
2635
+ * Get session by ID
2636
+ * @summary Get session
2637
+ * @param {string} workspaceId
2638
+ * @param {string} sessionId
2639
+ * @param {*} [options] Override http request option.
2640
+ * @throws {RequiredError}
2641
+ * @memberof ToolboxApi
2642
+ */
2643
+ getSession(workspaceId, sessionId, options) {
2644
+ return (0, exports.ToolboxApiFp)(this.configuration).getSession(workspaceId, sessionId, options).then((request) => request(this.axios, this.basePath));
2645
+ }
2646
+ /**
2647
+ * Get session command by ID
2648
+ * @summary Get session command
2649
+ * @param {string} workspaceId
2650
+ * @param {string} sessionId
2651
+ * @param {string} commandId
2652
+ * @param {*} [options] Override http request option.
2653
+ * @throws {RequiredError}
2654
+ * @memberof ToolboxApi
2655
+ */
2656
+ getSessionCommand(workspaceId, sessionId, commandId, options) {
2657
+ return (0, exports.ToolboxApiFp)(this.configuration).getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(this.axios, this.basePath));
2658
+ }
2500
2659
  /**
2501
2660
  * Get logs for a specific command in a session
2502
2661
  * @summary Get command logs
package/dist/api.d.ts CHANGED
@@ -11,6 +11,7 @@
11
11
  */
12
12
  export * from './api/api-keys-api';
13
13
  export * from './api/docker-registry-api';
14
+ export * from './api/images-api';
14
15
  export * from './api/nodes-api';
15
16
  export * from './api/toolbox-api';
16
17
  export * from './api/users-api';