@daytonaio/api-client 0.4.0 → 0.5.0

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 (89) hide show
  1. package/.openapi-generator/FILES +4 -8
  2. package/README.md +2 -2
  3. package/api/api-keys-api.ts +353 -0
  4. package/api/default-api.ts +36 -3313
  5. package/api/docker-registry-api.ts +108 -108
  6. package/api/nodes-api.ts +274 -0
  7. package/api/users-api.ts +274 -0
  8. package/api/workspace-api.ts +760 -0
  9. package/api.ts +4 -0
  10. package/dist/api/api-keys-api.d.ts +171 -0
  11. package/dist/api/api-keys-api.js +339 -0
  12. package/dist/api/default-api.d.ts +15 -1454
  13. package/dist/api/default-api.js +43 -3090
  14. package/dist/api/docker-registry-api.d.ts +64 -64
  15. package/dist/api/docker-registry-api.js +108 -108
  16. package/dist/api/nodes-api.d.ts +135 -0
  17. package/dist/api/nodes-api.js +270 -0
  18. package/dist/api/users-api.d.ts +135 -0
  19. package/dist/api/users-api.js +270 -0
  20. package/dist/api/workspace-api.d.ts +356 -0
  21. package/dist/api/workspace-api.js +722 -0
  22. package/dist/api.d.ts +4 -0
  23. package/dist/api.js +4 -0
  24. package/dist/esm/api/api-keys-api.d.ts +171 -0
  25. package/dist/esm/api/api-keys-api.js +332 -0
  26. package/dist/esm/api/default-api.d.ts +15 -1454
  27. package/dist/esm/api/default-api.js +41 -3088
  28. package/dist/esm/api/docker-registry-api.d.ts +64 -64
  29. package/dist/esm/api/docker-registry-api.js +108 -108
  30. package/dist/esm/api/nodes-api.d.ts +135 -0
  31. package/dist/esm/api/nodes-api.js +263 -0
  32. package/dist/esm/api/users-api.d.ts +135 -0
  33. package/dist/esm/api/users-api.js +263 -0
  34. package/dist/esm/api/workspace-api.d.ts +356 -0
  35. package/dist/esm/api/workspace-api.js +715 -0
  36. package/dist/esm/api.d.ts +4 -0
  37. package/dist/esm/api.js +4 -0
  38. package/dist/esm/models/create-workspace-dto.d.ts +1 -1
  39. package/dist/esm/models/index.d.ts +0 -8
  40. package/dist/esm/models/index.js +0 -8
  41. package/dist/esm/models/workspace-dto.d.ts +14 -0
  42. package/dist/models/create-workspace-dto.d.ts +1 -1
  43. package/dist/models/index.d.ts +0 -8
  44. package/dist/models/index.js +0 -8
  45. package/dist/models/workspace-dto.d.ts +14 -0
  46. package/models/create-workspace-dto.ts +1 -1
  47. package/models/index.ts +0 -8
  48. package/models/workspace-dto.ts +12 -0
  49. package/package.json +1 -1
  50. package/dist/esm/models/execute-request-dto.d.ts +0 -30
  51. package/dist/esm/models/execute-request-dto.js +0 -14
  52. package/dist/esm/models/execute-response-dto.d.ts +0 -30
  53. package/dist/esm/models/execute-response-dto.js +0 -14
  54. package/dist/esm/models/git-add-request-dto.d.ts +0 -30
  55. package/dist/esm/models/git-add-request-dto.js +0 -14
  56. package/dist/esm/models/git-branch-request-dto.d.ts +0 -30
  57. package/dist/esm/models/git-branch-request-dto.js +0 -14
  58. package/dist/esm/models/git-clone-request-dto.d.ts +0 -54
  59. package/dist/esm/models/git-clone-request-dto.js +0 -14
  60. package/dist/esm/models/git-commit-request-dto.d.ts +0 -42
  61. package/dist/esm/models/git-commit-request-dto.js +0 -14
  62. package/dist/esm/models/git-repo-request-dto.d.ts +0 -36
  63. package/dist/esm/models/git-repo-request-dto.js +0 -14
  64. package/dist/esm/models/replace-request-dto.d.ts +0 -36
  65. package/dist/esm/models/replace-request-dto.js +0 -14
  66. package/dist/models/execute-request-dto.d.ts +0 -30
  67. package/dist/models/execute-request-dto.js +0 -15
  68. package/dist/models/execute-response-dto.d.ts +0 -30
  69. package/dist/models/execute-response-dto.js +0 -15
  70. package/dist/models/git-add-request-dto.d.ts +0 -30
  71. package/dist/models/git-add-request-dto.js +0 -15
  72. package/dist/models/git-branch-request-dto.d.ts +0 -30
  73. package/dist/models/git-branch-request-dto.js +0 -15
  74. package/dist/models/git-clone-request-dto.d.ts +0 -54
  75. package/dist/models/git-clone-request-dto.js +0 -15
  76. package/dist/models/git-commit-request-dto.d.ts +0 -42
  77. package/dist/models/git-commit-request-dto.js +0 -15
  78. package/dist/models/git-repo-request-dto.d.ts +0 -36
  79. package/dist/models/git-repo-request-dto.js +0 -15
  80. package/dist/models/replace-request-dto.d.ts +0 -36
  81. package/dist/models/replace-request-dto.js +0 -15
  82. package/models/execute-request-dto.ts +0 -36
  83. package/models/execute-response-dto.ts +0 -36
  84. package/models/git-add-request-dto.ts +0 -36
  85. package/models/git-branch-request-dto.ts +0 -36
  86. package/models/git-clone-request-dto.ts +0 -60
  87. package/models/git-commit-request-dto.ts +0 -48
  88. package/models/git-repo-request-dto.ts +0 -42
  89. package/models/replace-request-dto.ts +0 -42
@@ -0,0 +1,715 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Daytona Workspaces
5
+ * Daytona Workspaces API Docs
6
+ *
7
+ * The version of the OpenAPI document: 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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * WorkspaceApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const WorkspaceApiAxiosParamCreator = function (configuration) {
34
+ return {
35
+ /**
36
+ *
37
+ * @summary Create workspace snapshot
38
+ * @param {string} workspaceId
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ createSnapshot: (workspaceId_1, ...args_1) => __awaiter(this, [workspaceId_1, ...args_1], void 0, function* (workspaceId, options = {}) {
43
+ // verify required parameter 'workspaceId' is not null or undefined
44
+ assertParamExists('createSnapshot', 'workspaceId', workspaceId);
45
+ const localVarPath = `/workspace/{workspaceId}/snapshot`
46
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
47
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
49
+ let baseOptions;
50
+ if (configuration) {
51
+ baseOptions = configuration.baseOptions;
52
+ }
53
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
54
+ const localVarHeaderParameter = {};
55
+ const localVarQueryParameter = {};
56
+ // authentication oauth2 required
57
+ // oauth required
58
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
59
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
60
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
+ return {
63
+ url: toPathString(localVarUrlObj),
64
+ options: localVarRequestOptions,
65
+ };
66
+ }),
67
+ /**
68
+ *
69
+ * @summary Create a new workspace
70
+ * @param {CreateWorkspaceDto} createWorkspaceDto
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ */
74
+ createWorkspace: (createWorkspaceDto_1, ...args_2) => __awaiter(this, [createWorkspaceDto_1, ...args_2], void 0, function* (createWorkspaceDto, options = {}) {
75
+ // verify required parameter 'createWorkspaceDto' is not null or undefined
76
+ assertParamExists('createWorkspace', 'createWorkspaceDto', createWorkspaceDto);
77
+ const localVarPath = `/workspace`;
78
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
80
+ let baseOptions;
81
+ if (configuration) {
82
+ baseOptions = configuration.baseOptions;
83
+ }
84
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
85
+ const localVarHeaderParameter = {};
86
+ const localVarQueryParameter = {};
87
+ // authentication oauth2 required
88
+ // oauth required
89
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
90
+ localVarHeaderParameter['Content-Type'] = 'application/json';
91
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
92
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
93
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
94
+ localVarRequestOptions.data = serializeDataIfNeeded(createWorkspaceDto, localVarRequestOptions, configuration);
95
+ return {
96
+ url: toPathString(localVarUrlObj),
97
+ options: localVarRequestOptions,
98
+ };
99
+ }),
100
+ /**
101
+ *
102
+ * @summary Delete workspace
103
+ * @param {string} workspaceId
104
+ * @param {boolean} force
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ deleteWorkspace: (workspaceId_2, force_1, ...args_3) => __awaiter(this, [workspaceId_2, force_1, ...args_3], void 0, function* (workspaceId, force, options = {}) {
109
+ // verify required parameter 'workspaceId' is not null or undefined
110
+ assertParamExists('deleteWorkspace', 'workspaceId', workspaceId);
111
+ // verify required parameter 'force' is not null or undefined
112
+ assertParamExists('deleteWorkspace', 'force', force);
113
+ const localVarPath = `/workspace/{workspaceId}`
114
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
115
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
116
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
117
+ let baseOptions;
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ }
121
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
122
+ const localVarHeaderParameter = {};
123
+ const localVarQueryParameter = {};
124
+ // authentication oauth2 required
125
+ // oauth required
126
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
127
+ if (force !== undefined) {
128
+ localVarQueryParameter['force'] = force;
129
+ }
130
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
133
+ return {
134
+ url: toPathString(localVarUrlObj),
135
+ options: localVarRequestOptions,
136
+ };
137
+ }),
138
+ /**
139
+ *
140
+ * @summary Get workspace details
141
+ * @param {string} workspaceId
142
+ * @param {boolean} [verbose] Include verbose output
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getWorkspace: (workspaceId_3, verbose_1, ...args_4) => __awaiter(this, [workspaceId_3, verbose_1, ...args_4], void 0, function* (workspaceId, verbose, options = {}) {
147
+ // verify required parameter 'workspaceId' is not null or undefined
148
+ assertParamExists('getWorkspace', 'workspaceId', workspaceId);
149
+ const localVarPath = `/workspace/{workspaceId}`
150
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ if (configuration) {
155
+ baseOptions = configuration.baseOptions;
156
+ }
157
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
158
+ const localVarHeaderParameter = {};
159
+ const localVarQueryParameter = {};
160
+ // authentication oauth2 required
161
+ // oauth required
162
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
163
+ if (verbose !== undefined) {
164
+ localVarQueryParameter['verbose'] = verbose;
165
+ }
166
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
167
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
168
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
169
+ return {
170
+ url: toPathString(localVarUrlObj),
171
+ options: localVarRequestOptions,
172
+ };
173
+ }),
174
+ /**
175
+ *
176
+ * @summary List all workspaces
177
+ * @param {boolean} [verbose] Include verbose output
178
+ * @param {*} [options] Override http request option.
179
+ * @throws {RequiredError}
180
+ */
181
+ listWorkspaces: (verbose_2, ...args_5) => __awaiter(this, [verbose_2, ...args_5], void 0, function* (verbose, options = {}) {
182
+ const localVarPath = `/workspace`;
183
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
184
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
185
+ let baseOptions;
186
+ if (configuration) {
187
+ baseOptions = configuration.baseOptions;
188
+ }
189
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
190
+ const localVarHeaderParameter = {};
191
+ const localVarQueryParameter = {};
192
+ // authentication oauth2 required
193
+ // oauth required
194
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
195
+ if (verbose !== undefined) {
196
+ localVarQueryParameter['verbose'] = verbose;
197
+ }
198
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
199
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
201
+ return {
202
+ url: toPathString(localVarUrlObj),
203
+ options: localVarRequestOptions,
204
+ };
205
+ }),
206
+ /**
207
+ *
208
+ * @summary Replace workspace labels
209
+ * @param {string} workspaceId
210
+ * @param {WorkspaceLabelsDto} workspaceLabelsDto
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ replaceLabels: (workspaceId_4, workspaceLabelsDto_1, ...args_6) => __awaiter(this, [workspaceId_4, workspaceLabelsDto_1, ...args_6], void 0, function* (workspaceId, workspaceLabelsDto, options = {}) {
215
+ // verify required parameter 'workspaceId' is not null or undefined
216
+ assertParamExists('replaceLabels', 'workspaceId', workspaceId);
217
+ // verify required parameter 'workspaceLabelsDto' is not null or undefined
218
+ assertParamExists('replaceLabels', 'workspaceLabelsDto', workspaceLabelsDto);
219
+ const localVarPath = `/workspace/{workspaceId}/labels`
220
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
221
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
222
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
223
+ let baseOptions;
224
+ if (configuration) {
225
+ baseOptions = configuration.baseOptions;
226
+ }
227
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
228
+ const localVarHeaderParameter = {};
229
+ const localVarQueryParameter = {};
230
+ // authentication oauth2 required
231
+ // oauth required
232
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
233
+ localVarHeaderParameter['Content-Type'] = 'application/json';
234
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
235
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
237
+ localVarRequestOptions.data = serializeDataIfNeeded(workspaceLabelsDto, localVarRequestOptions, configuration);
238
+ return {
239
+ url: toPathString(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ };
242
+ }),
243
+ /**
244
+ *
245
+ * @summary Start workspace
246
+ * @param {string} workspaceId
247
+ * @param {*} [options] Override http request option.
248
+ * @throws {RequiredError}
249
+ */
250
+ startWorkspace: (workspaceId_5, ...args_7) => __awaiter(this, [workspaceId_5, ...args_7], void 0, function* (workspaceId, options = {}) {
251
+ // verify required parameter 'workspaceId' is not null or undefined
252
+ assertParamExists('startWorkspace', 'workspaceId', workspaceId);
253
+ const localVarPath = `/workspace/{workspaceId}/start`
254
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
255
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
256
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
257
+ let baseOptions;
258
+ if (configuration) {
259
+ baseOptions = configuration.baseOptions;
260
+ }
261
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
262
+ const localVarHeaderParameter = {};
263
+ const localVarQueryParameter = {};
264
+ // authentication oauth2 required
265
+ // oauth required
266
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
267
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
268
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
269
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
270
+ return {
271
+ url: toPathString(localVarUrlObj),
272
+ options: localVarRequestOptions,
273
+ };
274
+ }),
275
+ /**
276
+ *
277
+ * @summary Stop workspace
278
+ * @param {string} workspaceId
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ stopWorkspace: (workspaceId_6, ...args_8) => __awaiter(this, [workspaceId_6, ...args_8], void 0, function* (workspaceId, options = {}) {
283
+ // verify required parameter 'workspaceId' is not null or undefined
284
+ assertParamExists('stopWorkspace', 'workspaceId', workspaceId);
285
+ const localVarPath = `/workspace/{workspaceId}/stop`
286
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
287
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
288
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
289
+ let baseOptions;
290
+ if (configuration) {
291
+ baseOptions = configuration.baseOptions;
292
+ }
293
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
294
+ const localVarHeaderParameter = {};
295
+ const localVarQueryParameter = {};
296
+ // authentication oauth2 required
297
+ // oauth required
298
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
299
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
300
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
301
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
302
+ return {
303
+ url: toPathString(localVarUrlObj),
304
+ options: localVarRequestOptions,
305
+ };
306
+ }),
307
+ /**
308
+ *
309
+ * @summary Update public status
310
+ * @param {string} workspaceId ID of the workspace
311
+ * @param {boolean} isPublic Public status to set
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ updatePublicStatus: (workspaceId_7, isPublic_1, ...args_9) => __awaiter(this, [workspaceId_7, isPublic_1, ...args_9], void 0, function* (workspaceId, isPublic, options = {}) {
316
+ // verify required parameter 'workspaceId' is not null or undefined
317
+ assertParamExists('updatePublicStatus', 'workspaceId', workspaceId);
318
+ // verify required parameter 'isPublic' is not null or undefined
319
+ assertParamExists('updatePublicStatus', 'isPublic', isPublic);
320
+ const localVarPath = `/workspace/{workspaceId}/public/{isPublic}`
321
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
322
+ .replace(`{${"isPublic"}}`, encodeURIComponent(String(isPublic)));
323
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
324
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
325
+ let baseOptions;
326
+ if (configuration) {
327
+ baseOptions = configuration.baseOptions;
328
+ }
329
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
330
+ const localVarHeaderParameter = {};
331
+ const localVarQueryParameter = {};
332
+ // authentication oauth2 required
333
+ // oauth required
334
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
335
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
336
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
338
+ return {
339
+ url: toPathString(localVarUrlObj),
340
+ options: localVarRequestOptions,
341
+ };
342
+ }),
343
+ };
344
+ };
345
+ /**
346
+ * WorkspaceApi - functional programming interface
347
+ * @export
348
+ */
349
+ export const WorkspaceApiFp = function (configuration) {
350
+ const localVarAxiosParamCreator = WorkspaceApiAxiosParamCreator(configuration);
351
+ return {
352
+ /**
353
+ *
354
+ * @summary Create workspace snapshot
355
+ * @param {string} workspaceId
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ createSnapshot(workspaceId, options) {
360
+ return __awaiter(this, void 0, void 0, function* () {
361
+ var _a, _b, _c;
362
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSnapshot(workspaceId, options);
363
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
364
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.createSnapshot']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
365
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
366
+ });
367
+ },
368
+ /**
369
+ *
370
+ * @summary Create a new workspace
371
+ * @param {CreateWorkspaceDto} createWorkspaceDto
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ createWorkspace(createWorkspaceDto, options) {
376
+ return __awaiter(this, void 0, void 0, function* () {
377
+ var _a, _b, _c;
378
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createWorkspace(createWorkspaceDto, options);
379
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
380
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.createWorkspace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
381
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
382
+ });
383
+ },
384
+ /**
385
+ *
386
+ * @summary Delete workspace
387
+ * @param {string} workspaceId
388
+ * @param {boolean} force
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ deleteWorkspace(workspaceId, force, options) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ var _a, _b, _c;
395
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWorkspace(workspaceId, force, options);
396
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
397
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.deleteWorkspace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
398
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
399
+ });
400
+ },
401
+ /**
402
+ *
403
+ * @summary Get workspace details
404
+ * @param {string} workspaceId
405
+ * @param {boolean} [verbose] Include verbose output
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ getWorkspace(workspaceId, verbose, options) {
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ var _a, _b, _c;
412
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getWorkspace(workspaceId, verbose, options);
413
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
414
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.getWorkspace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
415
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
416
+ });
417
+ },
418
+ /**
419
+ *
420
+ * @summary List all workspaces
421
+ * @param {boolean} [verbose] Include verbose output
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ */
425
+ listWorkspaces(verbose, options) {
426
+ return __awaiter(this, void 0, void 0, function* () {
427
+ var _a, _b, _c;
428
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkspaces(verbose, options);
429
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
430
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.listWorkspaces']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
431
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
432
+ });
433
+ },
434
+ /**
435
+ *
436
+ * @summary Replace workspace labels
437
+ * @param {string} workspaceId
438
+ * @param {WorkspaceLabelsDto} workspaceLabelsDto
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ */
442
+ replaceLabels(workspaceId, workspaceLabelsDto, options) {
443
+ return __awaiter(this, void 0, void 0, function* () {
444
+ var _a, _b, _c;
445
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceLabels(workspaceId, workspaceLabelsDto, options);
446
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
447
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.replaceLabels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
448
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
449
+ });
450
+ },
451
+ /**
452
+ *
453
+ * @summary Start workspace
454
+ * @param {string} workspaceId
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ */
458
+ startWorkspace(workspaceId, options) {
459
+ return __awaiter(this, void 0, void 0, function* () {
460
+ var _a, _b, _c;
461
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.startWorkspace(workspaceId, options);
462
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
463
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.startWorkspace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
464
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
465
+ });
466
+ },
467
+ /**
468
+ *
469
+ * @summary Stop workspace
470
+ * @param {string} workspaceId
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ stopWorkspace(workspaceId, options) {
475
+ return __awaiter(this, void 0, void 0, function* () {
476
+ var _a, _b, _c;
477
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.stopWorkspace(workspaceId, options);
478
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
479
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.stopWorkspace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
480
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
481
+ });
482
+ },
483
+ /**
484
+ *
485
+ * @summary Update public status
486
+ * @param {string} workspaceId ID of the workspace
487
+ * @param {boolean} isPublic Public status to set
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ */
491
+ updatePublicStatus(workspaceId, isPublic, options) {
492
+ return __awaiter(this, void 0, void 0, function* () {
493
+ var _a, _b, _c;
494
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePublicStatus(workspaceId, isPublic, options);
495
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
496
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WorkspaceApi.updatePublicStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
497
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
498
+ });
499
+ },
500
+ };
501
+ };
502
+ /**
503
+ * WorkspaceApi - factory interface
504
+ * @export
505
+ */
506
+ export const WorkspaceApiFactory = function (configuration, basePath, axios) {
507
+ const localVarFp = WorkspaceApiFp(configuration);
508
+ return {
509
+ /**
510
+ *
511
+ * @summary Create workspace snapshot
512
+ * @param {string} workspaceId
513
+ * @param {*} [options] Override http request option.
514
+ * @throws {RequiredError}
515
+ */
516
+ createSnapshot(workspaceId, options) {
517
+ return localVarFp.createSnapshot(workspaceId, options).then((request) => request(axios, basePath));
518
+ },
519
+ /**
520
+ *
521
+ * @summary Create a new workspace
522
+ * @param {CreateWorkspaceDto} createWorkspaceDto
523
+ * @param {*} [options] Override http request option.
524
+ * @throws {RequiredError}
525
+ */
526
+ createWorkspace(createWorkspaceDto, options) {
527
+ return localVarFp.createWorkspace(createWorkspaceDto, options).then((request) => request(axios, basePath));
528
+ },
529
+ /**
530
+ *
531
+ * @summary Delete workspace
532
+ * @param {string} workspaceId
533
+ * @param {boolean} force
534
+ * @param {*} [options] Override http request option.
535
+ * @throws {RequiredError}
536
+ */
537
+ deleteWorkspace(workspaceId, force, options) {
538
+ return localVarFp.deleteWorkspace(workspaceId, force, options).then((request) => request(axios, basePath));
539
+ },
540
+ /**
541
+ *
542
+ * @summary Get workspace details
543
+ * @param {string} workspaceId
544
+ * @param {boolean} [verbose] Include verbose output
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ getWorkspace(workspaceId, verbose, options) {
549
+ return localVarFp.getWorkspace(workspaceId, verbose, options).then((request) => request(axios, basePath));
550
+ },
551
+ /**
552
+ *
553
+ * @summary List all workspaces
554
+ * @param {boolean} [verbose] Include verbose output
555
+ * @param {*} [options] Override http request option.
556
+ * @throws {RequiredError}
557
+ */
558
+ listWorkspaces(verbose, options) {
559
+ return localVarFp.listWorkspaces(verbose, options).then((request) => request(axios, basePath));
560
+ },
561
+ /**
562
+ *
563
+ * @summary Replace workspace labels
564
+ * @param {string} workspaceId
565
+ * @param {WorkspaceLabelsDto} workspaceLabelsDto
566
+ * @param {*} [options] Override http request option.
567
+ * @throws {RequiredError}
568
+ */
569
+ replaceLabels(workspaceId, workspaceLabelsDto, options) {
570
+ return localVarFp.replaceLabels(workspaceId, workspaceLabelsDto, options).then((request) => request(axios, basePath));
571
+ },
572
+ /**
573
+ *
574
+ * @summary Start workspace
575
+ * @param {string} workspaceId
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ startWorkspace(workspaceId, options) {
580
+ return localVarFp.startWorkspace(workspaceId, options).then((request) => request(axios, basePath));
581
+ },
582
+ /**
583
+ *
584
+ * @summary Stop workspace
585
+ * @param {string} workspaceId
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ */
589
+ stopWorkspace(workspaceId, options) {
590
+ return localVarFp.stopWorkspace(workspaceId, options).then((request) => request(axios, basePath));
591
+ },
592
+ /**
593
+ *
594
+ * @summary Update public status
595
+ * @param {string} workspaceId ID of the workspace
596
+ * @param {boolean} isPublic Public status to set
597
+ * @param {*} [options] Override http request option.
598
+ * @throws {RequiredError}
599
+ */
600
+ updatePublicStatus(workspaceId, isPublic, options) {
601
+ return localVarFp.updatePublicStatus(workspaceId, isPublic, options).then((request) => request(axios, basePath));
602
+ },
603
+ };
604
+ };
605
+ /**
606
+ * WorkspaceApi - object-oriented interface
607
+ * @export
608
+ * @class WorkspaceApi
609
+ * @extends {BaseAPI}
610
+ */
611
+ export class WorkspaceApi extends BaseAPI {
612
+ /**
613
+ *
614
+ * @summary Create workspace snapshot
615
+ * @param {string} workspaceId
616
+ * @param {*} [options] Override http request option.
617
+ * @throws {RequiredError}
618
+ * @memberof WorkspaceApi
619
+ */
620
+ createSnapshot(workspaceId, options) {
621
+ return WorkspaceApiFp(this.configuration).createSnapshot(workspaceId, options).then((request) => request(this.axios, this.basePath));
622
+ }
623
+ /**
624
+ *
625
+ * @summary Create a new workspace
626
+ * @param {CreateWorkspaceDto} createWorkspaceDto
627
+ * @param {*} [options] Override http request option.
628
+ * @throws {RequiredError}
629
+ * @memberof WorkspaceApi
630
+ */
631
+ createWorkspace(createWorkspaceDto, options) {
632
+ return WorkspaceApiFp(this.configuration).createWorkspace(createWorkspaceDto, options).then((request) => request(this.axios, this.basePath));
633
+ }
634
+ /**
635
+ *
636
+ * @summary Delete workspace
637
+ * @param {string} workspaceId
638
+ * @param {boolean} force
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ * @memberof WorkspaceApi
642
+ */
643
+ deleteWorkspace(workspaceId, force, options) {
644
+ return WorkspaceApiFp(this.configuration).deleteWorkspace(workspaceId, force, options).then((request) => request(this.axios, this.basePath));
645
+ }
646
+ /**
647
+ *
648
+ * @summary Get workspace details
649
+ * @param {string} workspaceId
650
+ * @param {boolean} [verbose] Include verbose output
651
+ * @param {*} [options] Override http request option.
652
+ * @throws {RequiredError}
653
+ * @memberof WorkspaceApi
654
+ */
655
+ getWorkspace(workspaceId, verbose, options) {
656
+ return WorkspaceApiFp(this.configuration).getWorkspace(workspaceId, verbose, options).then((request) => request(this.axios, this.basePath));
657
+ }
658
+ /**
659
+ *
660
+ * @summary List all workspaces
661
+ * @param {boolean} [verbose] Include verbose output
662
+ * @param {*} [options] Override http request option.
663
+ * @throws {RequiredError}
664
+ * @memberof WorkspaceApi
665
+ */
666
+ listWorkspaces(verbose, options) {
667
+ return WorkspaceApiFp(this.configuration).listWorkspaces(verbose, options).then((request) => request(this.axios, this.basePath));
668
+ }
669
+ /**
670
+ *
671
+ * @summary Replace workspace labels
672
+ * @param {string} workspaceId
673
+ * @param {WorkspaceLabelsDto} workspaceLabelsDto
674
+ * @param {*} [options] Override http request option.
675
+ * @throws {RequiredError}
676
+ * @memberof WorkspaceApi
677
+ */
678
+ replaceLabels(workspaceId, workspaceLabelsDto, options) {
679
+ return WorkspaceApiFp(this.configuration).replaceLabels(workspaceId, workspaceLabelsDto, options).then((request) => request(this.axios, this.basePath));
680
+ }
681
+ /**
682
+ *
683
+ * @summary Start workspace
684
+ * @param {string} workspaceId
685
+ * @param {*} [options] Override http request option.
686
+ * @throws {RequiredError}
687
+ * @memberof WorkspaceApi
688
+ */
689
+ startWorkspace(workspaceId, options) {
690
+ return WorkspaceApiFp(this.configuration).startWorkspace(workspaceId, options).then((request) => request(this.axios, this.basePath));
691
+ }
692
+ /**
693
+ *
694
+ * @summary Stop workspace
695
+ * @param {string} workspaceId
696
+ * @param {*} [options] Override http request option.
697
+ * @throws {RequiredError}
698
+ * @memberof WorkspaceApi
699
+ */
700
+ stopWorkspace(workspaceId, options) {
701
+ return WorkspaceApiFp(this.configuration).stopWorkspace(workspaceId, options).then((request) => request(this.axios, this.basePath));
702
+ }
703
+ /**
704
+ *
705
+ * @summary Update public status
706
+ * @param {string} workspaceId ID of the workspace
707
+ * @param {boolean} isPublic Public status to set
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ * @memberof WorkspaceApi
711
+ */
712
+ updatePublicStatus(workspaceId, isPublic, options) {
713
+ return WorkspaceApiFp(this.configuration).updatePublicStatus(workspaceId, isPublic, options).then((request) => request(this.axios, this.basePath));
714
+ }
715
+ }