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