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