@daytonaio/api-client 0.1.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 (122) hide show
  1. package/.openapi-generator/FILES +30 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +46 -0
  5. package/dist/apis/DefaultApi.d.ts +551 -0
  6. package/dist/apis/DefaultApi.js +1645 -0
  7. package/dist/apis/DockerRegistryApi.d.ts +90 -0
  8. package/dist/apis/DockerRegistryApi.js +257 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +20 -0
  11. package/dist/esm/apis/DefaultApi.d.ts +551 -0
  12. package/dist/esm/apis/DefaultApi.js +1641 -0
  13. package/dist/esm/apis/DockerRegistryApi.d.ts +90 -0
  14. package/dist/esm/apis/DockerRegistryApi.js +253 -0
  15. package/dist/esm/apis/index.d.ts +2 -0
  16. package/dist/esm/apis/index.js +4 -0
  17. package/dist/esm/index.d.ts +3 -0
  18. package/dist/esm/index.js +5 -0
  19. package/dist/esm/models/ApiKeyListDto.d.ts +44 -0
  20. package/dist/esm/models/ApiKeyListDto.js +51 -0
  21. package/dist/esm/models/ApiKeyResponseDto.d.ts +44 -0
  22. package/dist/esm/models/ApiKeyResponseDto.js +51 -0
  23. package/dist/esm/models/CreateApiKeyDto.d.ts +32 -0
  24. package/dist/esm/models/CreateApiKeyDto.js +43 -0
  25. package/dist/esm/models/CreateDockerRegistryDto.d.ts +62 -0
  26. package/dist/esm/models/CreateDockerRegistryDto.js +61 -0
  27. package/dist/esm/models/CreateWorkspaceDto.d.ts +64 -0
  28. package/dist/esm/models/CreateWorkspaceDto.js +63 -0
  29. package/dist/esm/models/ExecuteRequestDto.d.ts +38 -0
  30. package/dist/esm/models/ExecuteRequestDto.js +45 -0
  31. package/dist/esm/models/ExecuteResponseDto.d.ts +38 -0
  32. package/dist/esm/models/ExecuteResponseDto.js +47 -0
  33. package/dist/esm/models/GitAddRequestDto.d.ts +38 -0
  34. package/dist/esm/models/GitAddRequestDto.js +47 -0
  35. package/dist/esm/models/GitBranchRequestDto.d.ts +38 -0
  36. package/dist/esm/models/GitBranchRequestDto.js +47 -0
  37. package/dist/esm/models/GitCloneRequestDto.d.ts +62 -0
  38. package/dist/esm/models/GitCloneRequestDto.js +55 -0
  39. package/dist/esm/models/GitCommitRequestDto.d.ts +50 -0
  40. package/dist/esm/models/GitCommitRequestDto.js +55 -0
  41. package/dist/esm/models/GitRepoRequestDto.d.ts +44 -0
  42. package/dist/esm/models/GitRepoRequestDto.js +47 -0
  43. package/dist/esm/models/ReplaceRequestDto.d.ts +44 -0
  44. package/dist/esm/models/ReplaceRequestDto.js +51 -0
  45. package/dist/esm/models/UpdateDockerRegistryDto.d.ts +62 -0
  46. package/dist/esm/models/UpdateDockerRegistryDto.js +51 -0
  47. package/dist/esm/models/WorkspaceDto.d.ts +71 -0
  48. package/dist/esm/models/WorkspaceDto.js +66 -0
  49. package/dist/esm/models/WorkspaceInfoDto.d.ts +44 -0
  50. package/dist/esm/models/WorkspaceInfoDto.js +49 -0
  51. package/dist/esm/models/WorkspaceLabelsDto.d.ts +34 -0
  52. package/dist/esm/models/WorkspaceLabelsDto.js +43 -0
  53. package/dist/esm/models/index.d.ts +17 -0
  54. package/dist/esm/models/index.js +19 -0
  55. package/dist/esm/runtime.d.ts +181 -0
  56. package/dist/esm/runtime.js +326 -0
  57. package/dist/index.d.ts +3 -0
  58. package/dist/index.js +21 -0
  59. package/dist/models/ApiKeyListDto.d.ts +44 -0
  60. package/dist/models/ApiKeyListDto.js +59 -0
  61. package/dist/models/ApiKeyResponseDto.d.ts +44 -0
  62. package/dist/models/ApiKeyResponseDto.js +59 -0
  63. package/dist/models/CreateApiKeyDto.d.ts +32 -0
  64. package/dist/models/CreateApiKeyDto.js +51 -0
  65. package/dist/models/CreateDockerRegistryDto.d.ts +62 -0
  66. package/dist/models/CreateDockerRegistryDto.js +69 -0
  67. package/dist/models/CreateWorkspaceDto.d.ts +64 -0
  68. package/dist/models/CreateWorkspaceDto.js +71 -0
  69. package/dist/models/ExecuteRequestDto.d.ts +38 -0
  70. package/dist/models/ExecuteRequestDto.js +53 -0
  71. package/dist/models/ExecuteResponseDto.d.ts +38 -0
  72. package/dist/models/ExecuteResponseDto.js +55 -0
  73. package/dist/models/GitAddRequestDto.d.ts +38 -0
  74. package/dist/models/GitAddRequestDto.js +55 -0
  75. package/dist/models/GitBranchRequestDto.d.ts +38 -0
  76. package/dist/models/GitBranchRequestDto.js +55 -0
  77. package/dist/models/GitCloneRequestDto.d.ts +62 -0
  78. package/dist/models/GitCloneRequestDto.js +63 -0
  79. package/dist/models/GitCommitRequestDto.d.ts +50 -0
  80. package/dist/models/GitCommitRequestDto.js +63 -0
  81. package/dist/models/GitRepoRequestDto.d.ts +44 -0
  82. package/dist/models/GitRepoRequestDto.js +55 -0
  83. package/dist/models/ReplaceRequestDto.d.ts +44 -0
  84. package/dist/models/ReplaceRequestDto.js +59 -0
  85. package/dist/models/UpdateDockerRegistryDto.d.ts +62 -0
  86. package/dist/models/UpdateDockerRegistryDto.js +59 -0
  87. package/dist/models/WorkspaceDto.d.ts +71 -0
  88. package/dist/models/WorkspaceDto.js +74 -0
  89. package/dist/models/WorkspaceInfoDto.d.ts +44 -0
  90. package/dist/models/WorkspaceInfoDto.js +57 -0
  91. package/dist/models/WorkspaceLabelsDto.d.ts +34 -0
  92. package/dist/models/WorkspaceLabelsDto.js +51 -0
  93. package/dist/models/index.d.ts +17 -0
  94. package/dist/models/index.js +35 -0
  95. package/dist/runtime.d.ts +181 -0
  96. package/dist/runtime.js +341 -0
  97. package/package.json +22 -0
  98. package/src/apis/DefaultApi.ts +2380 -0
  99. package/src/apis/DockerRegistryApi.ts +318 -0
  100. package/src/apis/index.ts +4 -0
  101. package/src/index.ts +5 -0
  102. package/src/models/ApiKeyListDto.ts +84 -0
  103. package/src/models/ApiKeyResponseDto.ts +84 -0
  104. package/src/models/CreateApiKeyDto.ts +66 -0
  105. package/src/models/CreateDockerRegistryDto.ts +110 -0
  106. package/src/models/CreateWorkspaceDto.ts +111 -0
  107. package/src/models/ExecuteRequestDto.ts +74 -0
  108. package/src/models/ExecuteResponseDto.ts +75 -0
  109. package/src/models/GitAddRequestDto.ts +75 -0
  110. package/src/models/GitBranchRequestDto.ts +75 -0
  111. package/src/models/GitCloneRequestDto.ts +107 -0
  112. package/src/models/GitCommitRequestDto.ts +93 -0
  113. package/src/models/GitRepoRequestDto.ts +82 -0
  114. package/src/models/ReplaceRequestDto.ts +84 -0
  115. package/src/models/UpdateDockerRegistryDto.ts +105 -0
  116. package/src/models/WorkspaceDto.ts +127 -0
  117. package/src/models/WorkspaceInfoDto.ts +83 -0
  118. package/src/models/WorkspaceLabelsDto.ts +66 -0
  119. package/src/models/index.ts +19 -0
  120. package/src/runtime.ts +426 -0
  121. package/tsconfig.esm.json +7 -0
  122. package/tsconfig.json +16 -0
@@ -0,0 +1,2380 @@
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 * as runtime from '../runtime';
17
+ import type {
18
+ ApiKeyListDto,
19
+ ApiKeyResponseDto,
20
+ CreateApiKeyDto,
21
+ CreateWorkspaceDto,
22
+ ExecuteRequestDto,
23
+ ExecuteResponseDto,
24
+ GitAddRequestDto,
25
+ GitBranchRequestDto,
26
+ GitCloneRequestDto,
27
+ GitCommitRequestDto,
28
+ GitRepoRequestDto,
29
+ ReplaceRequestDto,
30
+ WorkspaceDto,
31
+ WorkspaceLabelsDto,
32
+ } from '../models/index';
33
+ import {
34
+ ApiKeyListDtoFromJSON,
35
+ ApiKeyListDtoToJSON,
36
+ ApiKeyResponseDtoFromJSON,
37
+ ApiKeyResponseDtoToJSON,
38
+ CreateApiKeyDtoFromJSON,
39
+ CreateApiKeyDtoToJSON,
40
+ CreateWorkspaceDtoFromJSON,
41
+ CreateWorkspaceDtoToJSON,
42
+ ExecuteRequestDtoFromJSON,
43
+ ExecuteRequestDtoToJSON,
44
+ ExecuteResponseDtoFromJSON,
45
+ ExecuteResponseDtoToJSON,
46
+ GitAddRequestDtoFromJSON,
47
+ GitAddRequestDtoToJSON,
48
+ GitBranchRequestDtoFromJSON,
49
+ GitBranchRequestDtoToJSON,
50
+ GitCloneRequestDtoFromJSON,
51
+ GitCloneRequestDtoToJSON,
52
+ GitCommitRequestDtoFromJSON,
53
+ GitCommitRequestDtoToJSON,
54
+ GitRepoRequestDtoFromJSON,
55
+ GitRepoRequestDtoToJSON,
56
+ ReplaceRequestDtoFromJSON,
57
+ ReplaceRequestDtoToJSON,
58
+ WorkspaceDtoFromJSON,
59
+ WorkspaceDtoToJSON,
60
+ WorkspaceLabelsDtoFromJSON,
61
+ WorkspaceLabelsDtoToJSON,
62
+ } from '../models/index';
63
+
64
+ export interface ApiKeyControllerCreateApiKeyRequest {
65
+ createApiKeyDto: CreateApiKeyDto;
66
+ }
67
+
68
+ export interface ApiKeyControllerDeleteApiKeyRequest {
69
+ name: string;
70
+ }
71
+
72
+ export interface ApiKeyControllerGetApiKeyRequest {
73
+ name: string;
74
+ }
75
+
76
+ export interface NodeControllerCreateRequest {
77
+ body: object;
78
+ }
79
+
80
+ export interface NodeControllerUpdateSchedulingStatusRequest {
81
+ id: string;
82
+ }
83
+
84
+ export interface UserControllerCreateRequest {
85
+ body: object;
86
+ }
87
+
88
+ export interface UserControllerRegenerateKeyPairRequest {
89
+ id: string;
90
+ }
91
+
92
+ export interface WorkspaceControllerCreateFolderRequest {
93
+ workspaceId: string;
94
+ projectId: string;
95
+ path: string;
96
+ mode: string;
97
+ }
98
+
99
+ export interface WorkspaceControllerCreateSnapshotRequest {
100
+ workspaceId: string;
101
+ }
102
+
103
+ export interface WorkspaceControllerCreateWorkspaceRequest {
104
+ createWorkspaceDto: CreateWorkspaceDto;
105
+ }
106
+
107
+ export interface WorkspaceControllerDeleteFileRequest {
108
+ workspaceId: string;
109
+ projectId: string;
110
+ path: string;
111
+ }
112
+
113
+ export interface WorkspaceControllerDownloadFileRequest {
114
+ workspaceId: string;
115
+ projectId: string;
116
+ path: string;
117
+ }
118
+
119
+ export interface WorkspaceControllerExecuteCommandRequest {
120
+ workspaceId: string;
121
+ projectId: string;
122
+ executeRequestDto: ExecuteRequestDto;
123
+ }
124
+
125
+ export interface WorkspaceControllerFindInFilesRequest {
126
+ workspaceId: string;
127
+ projectId: string;
128
+ path: string;
129
+ pattern: string;
130
+ }
131
+
132
+ export interface WorkspaceControllerGetFileInfoRequest {
133
+ workspaceId: string;
134
+ projectId: string;
135
+ path: string;
136
+ }
137
+
138
+ export interface WorkspaceControllerGetProjectDirRequest {
139
+ workspaceId: string;
140
+ projectId: string;
141
+ }
142
+
143
+ export interface WorkspaceControllerGetWorkspaceRequest {
144
+ workspaceId: string;
145
+ verbose?: boolean;
146
+ }
147
+
148
+ export interface WorkspaceControllerGitAddFilesRequest {
149
+ workspaceId: string;
150
+ projectId: string;
151
+ gitAddRequestDto: GitAddRequestDto;
152
+ }
153
+
154
+ export interface WorkspaceControllerGitBranchListRequest {
155
+ workspaceId: string;
156
+ projectId: string;
157
+ path: string;
158
+ }
159
+
160
+ export interface WorkspaceControllerGitCloneRepositoryRequest {
161
+ workspaceId: string;
162
+ projectId: string;
163
+ gitCloneRequestDto: GitCloneRequestDto;
164
+ }
165
+
166
+ export interface WorkspaceControllerGitCommitChangesRequest {
167
+ workspaceId: string;
168
+ projectId: string;
169
+ gitCommitRequestDto: GitCommitRequestDto;
170
+ }
171
+
172
+ export interface WorkspaceControllerGitCommitHistoryRequest {
173
+ workspaceId: string;
174
+ projectId: string;
175
+ path: string;
176
+ }
177
+
178
+ export interface WorkspaceControllerGitCreateBranchRequest {
179
+ workspaceId: string;
180
+ projectId: string;
181
+ gitBranchRequestDto: GitBranchRequestDto;
182
+ }
183
+
184
+ export interface WorkspaceControllerGitPullChangesRequest {
185
+ workspaceId: string;
186
+ projectId: string;
187
+ gitRepoRequestDto: GitRepoRequestDto;
188
+ }
189
+
190
+ export interface WorkspaceControllerGitPushChangesRequest {
191
+ workspaceId: string;
192
+ projectId: string;
193
+ gitRepoRequestDto: GitRepoRequestDto;
194
+ }
195
+
196
+ export interface WorkspaceControllerGitStatusRequest {
197
+ workspaceId: string;
198
+ projectId: string;
199
+ path: string;
200
+ }
201
+
202
+ export interface WorkspaceControllerListFilesRequest {
203
+ workspaceId: string;
204
+ projectId: string;
205
+ path?: string;
206
+ }
207
+
208
+ export interface WorkspaceControllerListWorkspacesRequest {
209
+ verbose?: boolean;
210
+ }
211
+
212
+ export interface WorkspaceControllerMoveFileRequest {
213
+ workspaceId: string;
214
+ projectId: string;
215
+ source: string;
216
+ destination: string;
217
+ }
218
+
219
+ export interface WorkspaceControllerRemoveWorkspaceRequest {
220
+ workspaceId: string;
221
+ force: boolean;
222
+ }
223
+
224
+ export interface WorkspaceControllerReplaceInFilesRequest {
225
+ workspaceId: string;
226
+ projectId: string;
227
+ replaceRequestDto: ReplaceRequestDto;
228
+ }
229
+
230
+ export interface WorkspaceControllerReplaceLabelsRequest {
231
+ workspaceId: string;
232
+ workspaceLabelsDto: WorkspaceLabelsDto;
233
+ }
234
+
235
+ export interface WorkspaceControllerSearchFilesRequest {
236
+ workspaceId: string;
237
+ projectId: string;
238
+ path: string;
239
+ pattern: string;
240
+ }
241
+
242
+ export interface WorkspaceControllerSetFilePermissionsRequest {
243
+ workspaceId: string;
244
+ projectId: string;
245
+ path: string;
246
+ owner: string;
247
+ group: string;
248
+ mode: string;
249
+ }
250
+
251
+ export interface WorkspaceControllerStartProjectRequest {
252
+ workspaceId: string;
253
+ projectId: string;
254
+ }
255
+
256
+ export interface WorkspaceControllerStartWorkspaceRequest {
257
+ workspaceId: string;
258
+ }
259
+
260
+ export interface WorkspaceControllerStopProjectRequest {
261
+ workspaceId: string;
262
+ projectId: string;
263
+ }
264
+
265
+ export interface WorkspaceControllerStopWorkspaceRequest {
266
+ workspaceId: string;
267
+ }
268
+
269
+ export interface WorkspaceControllerUploadFileRequest {
270
+ workspaceId: string;
271
+ projectId: string;
272
+ path: string;
273
+ file?: Blob;
274
+ }
275
+
276
+ /**
277
+ *
278
+ */
279
+ export class DefaultApi extends runtime.BaseAPI {
280
+
281
+ /**
282
+ * Create a new API key
283
+ */
284
+ async apiKeyControllerCreateApiKeyRaw(requestParameters: ApiKeyControllerCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyResponseDto>> {
285
+ if (requestParameters['createApiKeyDto'] == null) {
286
+ throw new runtime.RequiredError(
287
+ 'createApiKeyDto',
288
+ 'Required parameter "createApiKeyDto" was null or undefined when calling apiKeyControllerCreateApiKey().'
289
+ );
290
+ }
291
+
292
+ const queryParameters: any = {};
293
+
294
+ const headerParameters: runtime.HTTPHeaders = {};
295
+
296
+ headerParameters['Content-Type'] = 'application/json';
297
+
298
+ if (this.configuration && this.configuration.accessToken) {
299
+ // oauth required
300
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
301
+ }
302
+
303
+ const response = await this.request({
304
+ path: `/api-keys`,
305
+ method: 'POST',
306
+ headers: headerParameters,
307
+ query: queryParameters,
308
+ body: CreateApiKeyDtoToJSON(requestParameters['createApiKeyDto']),
309
+ }, initOverrides);
310
+
311
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiKeyResponseDtoFromJSON(jsonValue));
312
+ }
313
+
314
+ /**
315
+ * Create a new API key
316
+ */
317
+ async apiKeyControllerCreateApiKey(requestParameters: ApiKeyControllerCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyResponseDto> {
318
+ const response = await this.apiKeyControllerCreateApiKeyRaw(requestParameters, initOverrides);
319
+ return await response.value();
320
+ }
321
+
322
+ /**
323
+ * Delete an API key by name
324
+ */
325
+ async apiKeyControllerDeleteApiKeyRaw(requestParameters: ApiKeyControllerDeleteApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
326
+ if (requestParameters['name'] == null) {
327
+ throw new runtime.RequiredError(
328
+ 'name',
329
+ 'Required parameter "name" was null or undefined when calling apiKeyControllerDeleteApiKey().'
330
+ );
331
+ }
332
+
333
+ const queryParameters: any = {};
334
+
335
+ const headerParameters: runtime.HTTPHeaders = {};
336
+
337
+ if (this.configuration && this.configuration.accessToken) {
338
+ // oauth required
339
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
340
+ }
341
+
342
+ const response = await this.request({
343
+ path: `/api-keys/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
344
+ method: 'DELETE',
345
+ headers: headerParameters,
346
+ query: queryParameters,
347
+ }, initOverrides);
348
+
349
+ return new runtime.VoidApiResponse(response);
350
+ }
351
+
352
+ /**
353
+ * Delete an API key by name
354
+ */
355
+ async apiKeyControllerDeleteApiKey(requestParameters: ApiKeyControllerDeleteApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
356
+ await this.apiKeyControllerDeleteApiKeyRaw(requestParameters, initOverrides);
357
+ }
358
+
359
+ /**
360
+ * Get a specific API key by name
361
+ */
362
+ async apiKeyControllerGetApiKeyRaw(requestParameters: ApiKeyControllerGetApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyListDto>> {
363
+ if (requestParameters['name'] == null) {
364
+ throw new runtime.RequiredError(
365
+ 'name',
366
+ 'Required parameter "name" was null or undefined when calling apiKeyControllerGetApiKey().'
367
+ );
368
+ }
369
+
370
+ const queryParameters: any = {};
371
+
372
+ const headerParameters: runtime.HTTPHeaders = {};
373
+
374
+ if (this.configuration && this.configuration.accessToken) {
375
+ // oauth required
376
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
377
+ }
378
+
379
+ const response = await this.request({
380
+ path: `/api-keys/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
381
+ method: 'GET',
382
+ headers: headerParameters,
383
+ query: queryParameters,
384
+ }, initOverrides);
385
+
386
+ return new runtime.JSONApiResponse(response, (jsonValue) => ApiKeyListDtoFromJSON(jsonValue));
387
+ }
388
+
389
+ /**
390
+ * Get a specific API key by name
391
+ */
392
+ async apiKeyControllerGetApiKey(requestParameters: ApiKeyControllerGetApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyListDto> {
393
+ const response = await this.apiKeyControllerGetApiKeyRaw(requestParameters, initOverrides);
394
+ return await response.value();
395
+ }
396
+
397
+ /**
398
+ * Get all API keys for the user
399
+ */
400
+ async apiKeyControllerGetApiKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyListDto>>> {
401
+ const queryParameters: any = {};
402
+
403
+ const headerParameters: runtime.HTTPHeaders = {};
404
+
405
+ if (this.configuration && this.configuration.accessToken) {
406
+ // oauth required
407
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
408
+ }
409
+
410
+ const response = await this.request({
411
+ path: `/api-keys`,
412
+ method: 'GET',
413
+ headers: headerParameters,
414
+ query: queryParameters,
415
+ }, initOverrides);
416
+
417
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApiKeyListDtoFromJSON));
418
+ }
419
+
420
+ /**
421
+ * Get all API keys for the user
422
+ */
423
+ async apiKeyControllerGetApiKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyListDto>> {
424
+ const response = await this.apiKeyControllerGetApiKeysRaw(initOverrides);
425
+ return await response.value();
426
+ }
427
+
428
+ /**
429
+ */
430
+ async appControllerGetHelloRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
431
+ const queryParameters: any = {};
432
+
433
+ const headerParameters: runtime.HTTPHeaders = {};
434
+
435
+ const response = await this.request({
436
+ path: `/`,
437
+ method: 'GET',
438
+ headers: headerParameters,
439
+ query: queryParameters,
440
+ }, initOverrides);
441
+
442
+ return new runtime.VoidApiResponse(response);
443
+ }
444
+
445
+ /**
446
+ */
447
+ async appControllerGetHello(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
448
+ await this.appControllerGetHelloRaw(initOverrides);
449
+ }
450
+
451
+ /**
452
+ */
453
+ async nodeControllerCreateRaw(requestParameters: NodeControllerCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
454
+ if (requestParameters['body'] == null) {
455
+ throw new runtime.RequiredError(
456
+ 'body',
457
+ 'Required parameter "body" was null or undefined when calling nodeControllerCreate().'
458
+ );
459
+ }
460
+
461
+ const queryParameters: any = {};
462
+
463
+ const headerParameters: runtime.HTTPHeaders = {};
464
+
465
+ headerParameters['Content-Type'] = 'application/json';
466
+
467
+ if (this.configuration && this.configuration.accessToken) {
468
+ // oauth required
469
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
470
+ }
471
+
472
+ const response = await this.request({
473
+ path: `/nodes`,
474
+ method: 'POST',
475
+ headers: headerParameters,
476
+ query: queryParameters,
477
+ body: requestParameters['body'] as any,
478
+ }, initOverrides);
479
+
480
+ return new runtime.VoidApiResponse(response);
481
+ }
482
+
483
+ /**
484
+ */
485
+ async nodeControllerCreate(requestParameters: NodeControllerCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
486
+ await this.nodeControllerCreateRaw(requestParameters, initOverrides);
487
+ }
488
+
489
+ /**
490
+ */
491
+ async nodeControllerFindAllRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
492
+ const queryParameters: any = {};
493
+
494
+ const headerParameters: runtime.HTTPHeaders = {};
495
+
496
+ if (this.configuration && this.configuration.accessToken) {
497
+ // oauth required
498
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
499
+ }
500
+
501
+ const response = await this.request({
502
+ path: `/nodes`,
503
+ method: 'GET',
504
+ headers: headerParameters,
505
+ query: queryParameters,
506
+ }, initOverrides);
507
+
508
+ return new runtime.VoidApiResponse(response);
509
+ }
510
+
511
+ /**
512
+ */
513
+ async nodeControllerFindAll(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
514
+ await this.nodeControllerFindAllRaw(initOverrides);
515
+ }
516
+
517
+ /**
518
+ */
519
+ async nodeControllerUpdateSchedulingStatusRaw(requestParameters: NodeControllerUpdateSchedulingStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
520
+ if (requestParameters['id'] == null) {
521
+ throw new runtime.RequiredError(
522
+ 'id',
523
+ 'Required parameter "id" was null or undefined when calling nodeControllerUpdateSchedulingStatus().'
524
+ );
525
+ }
526
+
527
+ const queryParameters: any = {};
528
+
529
+ const headerParameters: runtime.HTTPHeaders = {};
530
+
531
+ if (this.configuration && this.configuration.accessToken) {
532
+ // oauth required
533
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
534
+ }
535
+
536
+ const response = await this.request({
537
+ path: `/nodes/{id}/scheduling`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
538
+ method: 'PATCH',
539
+ headers: headerParameters,
540
+ query: queryParameters,
541
+ }, initOverrides);
542
+
543
+ return new runtime.VoidApiResponse(response);
544
+ }
545
+
546
+ /**
547
+ */
548
+ async nodeControllerUpdateSchedulingStatus(requestParameters: NodeControllerUpdateSchedulingStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
549
+ await this.nodeControllerUpdateSchedulingStatusRaw(requestParameters, initOverrides);
550
+ }
551
+
552
+ /**
553
+ */
554
+ async userControllerCreateRaw(requestParameters: UserControllerCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
555
+ if (requestParameters['body'] == null) {
556
+ throw new runtime.RequiredError(
557
+ 'body',
558
+ 'Required parameter "body" was null or undefined when calling userControllerCreate().'
559
+ );
560
+ }
561
+
562
+ const queryParameters: any = {};
563
+
564
+ const headerParameters: runtime.HTTPHeaders = {};
565
+
566
+ headerParameters['Content-Type'] = 'application/json';
567
+
568
+ if (this.configuration && this.configuration.accessToken) {
569
+ // oauth required
570
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
571
+ }
572
+
573
+ const response = await this.request({
574
+ path: `/users`,
575
+ method: 'POST',
576
+ headers: headerParameters,
577
+ query: queryParameters,
578
+ body: requestParameters['body'] as any,
579
+ }, initOverrides);
580
+
581
+ return new runtime.VoidApiResponse(response);
582
+ }
583
+
584
+ /**
585
+ */
586
+ async userControllerCreate(requestParameters: UserControllerCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
587
+ await this.userControllerCreateRaw(requestParameters, initOverrides);
588
+ }
589
+
590
+ /**
591
+ */
592
+ async userControllerFindAllRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
593
+ const queryParameters: any = {};
594
+
595
+ const headerParameters: runtime.HTTPHeaders = {};
596
+
597
+ if (this.configuration && this.configuration.accessToken) {
598
+ // oauth required
599
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
600
+ }
601
+
602
+ const response = await this.request({
603
+ path: `/users`,
604
+ method: 'GET',
605
+ headers: headerParameters,
606
+ query: queryParameters,
607
+ }, initOverrides);
608
+
609
+ return new runtime.VoidApiResponse(response);
610
+ }
611
+
612
+ /**
613
+ */
614
+ async userControllerFindAll(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
615
+ await this.userControllerFindAllRaw(initOverrides);
616
+ }
617
+
618
+ /**
619
+ */
620
+ async userControllerRegenerateKeyPairRaw(requestParameters: UserControllerRegenerateKeyPairRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
621
+ if (requestParameters['id'] == null) {
622
+ throw new runtime.RequiredError(
623
+ 'id',
624
+ 'Required parameter "id" was null or undefined when calling userControllerRegenerateKeyPair().'
625
+ );
626
+ }
627
+
628
+ const queryParameters: any = {};
629
+
630
+ const headerParameters: runtime.HTTPHeaders = {};
631
+
632
+ if (this.configuration && this.configuration.accessToken) {
633
+ // oauth required
634
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
635
+ }
636
+
637
+ const response = await this.request({
638
+ path: `/users/{id}/regenerate-key-pair`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
639
+ method: 'POST',
640
+ headers: headerParameters,
641
+ query: queryParameters,
642
+ }, initOverrides);
643
+
644
+ return new runtime.VoidApiResponse(response);
645
+ }
646
+
647
+ /**
648
+ */
649
+ async userControllerRegenerateKeyPair(requestParameters: UserControllerRegenerateKeyPairRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
650
+ await this.userControllerRegenerateKeyPairRaw(requestParameters, initOverrides);
651
+ }
652
+
653
+ /**
654
+ * Create folder inside workspace project
655
+ * Create folder
656
+ */
657
+ async workspaceControllerCreateFolderRaw(requestParameters: WorkspaceControllerCreateFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
658
+ if (requestParameters['workspaceId'] == null) {
659
+ throw new runtime.RequiredError(
660
+ 'workspaceId',
661
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerCreateFolder().'
662
+ );
663
+ }
664
+
665
+ if (requestParameters['projectId'] == null) {
666
+ throw new runtime.RequiredError(
667
+ 'projectId',
668
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerCreateFolder().'
669
+ );
670
+ }
671
+
672
+ if (requestParameters['path'] == null) {
673
+ throw new runtime.RequiredError(
674
+ 'path',
675
+ 'Required parameter "path" was null or undefined when calling workspaceControllerCreateFolder().'
676
+ );
677
+ }
678
+
679
+ if (requestParameters['mode'] == null) {
680
+ throw new runtime.RequiredError(
681
+ 'mode',
682
+ 'Required parameter "mode" was null or undefined when calling workspaceControllerCreateFolder().'
683
+ );
684
+ }
685
+
686
+ const queryParameters: any = {};
687
+
688
+ if (requestParameters['path'] != null) {
689
+ queryParameters['path'] = requestParameters['path'];
690
+ }
691
+
692
+ if (requestParameters['mode'] != null) {
693
+ queryParameters['mode'] = requestParameters['mode'];
694
+ }
695
+
696
+ const headerParameters: runtime.HTTPHeaders = {};
697
+
698
+ if (this.configuration && this.configuration.accessToken) {
699
+ // oauth required
700
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
701
+ }
702
+
703
+ const response = await this.request({
704
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/folder`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
705
+ method: 'POST',
706
+ headers: headerParameters,
707
+ query: queryParameters,
708
+ }, initOverrides);
709
+
710
+ return new runtime.VoidApiResponse(response);
711
+ }
712
+
713
+ /**
714
+ * Create folder inside workspace project
715
+ * Create folder
716
+ */
717
+ async workspaceControllerCreateFolder(requestParameters: WorkspaceControllerCreateFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
718
+ await this.workspaceControllerCreateFolderRaw(requestParameters, initOverrides);
719
+ }
720
+
721
+ /**
722
+ * Create a workspace snapshot
723
+ */
724
+ async workspaceControllerCreateSnapshotRaw(requestParameters: WorkspaceControllerCreateSnapshotRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceDto>> {
725
+ if (requestParameters['workspaceId'] == null) {
726
+ throw new runtime.RequiredError(
727
+ 'workspaceId',
728
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerCreateSnapshot().'
729
+ );
730
+ }
731
+
732
+ const queryParameters: any = {};
733
+
734
+ const headerParameters: runtime.HTTPHeaders = {};
735
+
736
+ if (this.configuration && this.configuration.accessToken) {
737
+ // oauth required
738
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
739
+ }
740
+
741
+ const response = await this.request({
742
+ path: `/workspace/{workspaceId}/snapshot`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
743
+ method: 'POST',
744
+ headers: headerParameters,
745
+ query: queryParameters,
746
+ }, initOverrides);
747
+
748
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceDtoFromJSON(jsonValue));
749
+ }
750
+
751
+ /**
752
+ * Create a workspace snapshot
753
+ */
754
+ async workspaceControllerCreateSnapshot(requestParameters: WorkspaceControllerCreateSnapshotRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceDto> {
755
+ const response = await this.workspaceControllerCreateSnapshotRaw(requestParameters, initOverrides);
756
+ return await response.value();
757
+ }
758
+
759
+ /**
760
+ */
761
+ async workspaceControllerCreateWorkspaceRaw(requestParameters: WorkspaceControllerCreateWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceDto>> {
762
+ if (requestParameters['createWorkspaceDto'] == null) {
763
+ throw new runtime.RequiredError(
764
+ 'createWorkspaceDto',
765
+ 'Required parameter "createWorkspaceDto" was null or undefined when calling workspaceControllerCreateWorkspace().'
766
+ );
767
+ }
768
+
769
+ const queryParameters: any = {};
770
+
771
+ const headerParameters: runtime.HTTPHeaders = {};
772
+
773
+ headerParameters['Content-Type'] = 'application/json';
774
+
775
+ if (this.configuration && this.configuration.accessToken) {
776
+ // oauth required
777
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
778
+ }
779
+
780
+ const response = await this.request({
781
+ path: `/workspace`,
782
+ method: 'POST',
783
+ headers: headerParameters,
784
+ query: queryParameters,
785
+ body: CreateWorkspaceDtoToJSON(requestParameters['createWorkspaceDto']),
786
+ }, initOverrides);
787
+
788
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceDtoFromJSON(jsonValue));
789
+ }
790
+
791
+ /**
792
+ */
793
+ async workspaceControllerCreateWorkspace(requestParameters: WorkspaceControllerCreateWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceDto> {
794
+ const response = await this.workspaceControllerCreateWorkspaceRaw(requestParameters, initOverrides);
795
+ return await response.value();
796
+ }
797
+
798
+ /**
799
+ * Delete file inside workspace project
800
+ * Delete file
801
+ */
802
+ async workspaceControllerDeleteFileRaw(requestParameters: WorkspaceControllerDeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
803
+ if (requestParameters['workspaceId'] == null) {
804
+ throw new runtime.RequiredError(
805
+ 'workspaceId',
806
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerDeleteFile().'
807
+ );
808
+ }
809
+
810
+ if (requestParameters['projectId'] == null) {
811
+ throw new runtime.RequiredError(
812
+ 'projectId',
813
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerDeleteFile().'
814
+ );
815
+ }
816
+
817
+ if (requestParameters['path'] == null) {
818
+ throw new runtime.RequiredError(
819
+ 'path',
820
+ 'Required parameter "path" was null or undefined when calling workspaceControllerDeleteFile().'
821
+ );
822
+ }
823
+
824
+ const queryParameters: any = {};
825
+
826
+ if (requestParameters['path'] != null) {
827
+ queryParameters['path'] = requestParameters['path'];
828
+ }
829
+
830
+ const headerParameters: runtime.HTTPHeaders = {};
831
+
832
+ if (this.configuration && this.configuration.accessToken) {
833
+ // oauth required
834
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
835
+ }
836
+
837
+ const response = await this.request({
838
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
839
+ method: 'DELETE',
840
+ headers: headerParameters,
841
+ query: queryParameters,
842
+ }, initOverrides);
843
+
844
+ return new runtime.VoidApiResponse(response);
845
+ }
846
+
847
+ /**
848
+ * Delete file inside workspace project
849
+ * Delete file
850
+ */
851
+ async workspaceControllerDeleteFile(requestParameters: WorkspaceControllerDeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
852
+ await this.workspaceControllerDeleteFileRaw(requestParameters, initOverrides);
853
+ }
854
+
855
+ /**
856
+ * Download file from workspace project
857
+ * Download file
858
+ */
859
+ async workspaceControllerDownloadFileRaw(requestParameters: WorkspaceControllerDownloadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
860
+ if (requestParameters['workspaceId'] == null) {
861
+ throw new runtime.RequiredError(
862
+ 'workspaceId',
863
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerDownloadFile().'
864
+ );
865
+ }
866
+
867
+ if (requestParameters['projectId'] == null) {
868
+ throw new runtime.RequiredError(
869
+ 'projectId',
870
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerDownloadFile().'
871
+ );
872
+ }
873
+
874
+ if (requestParameters['path'] == null) {
875
+ throw new runtime.RequiredError(
876
+ 'path',
877
+ 'Required parameter "path" was null or undefined when calling workspaceControllerDownloadFile().'
878
+ );
879
+ }
880
+
881
+ const queryParameters: any = {};
882
+
883
+ if (requestParameters['path'] != null) {
884
+ queryParameters['path'] = requestParameters['path'];
885
+ }
886
+
887
+ const headerParameters: runtime.HTTPHeaders = {};
888
+
889
+ if (this.configuration && this.configuration.accessToken) {
890
+ // oauth required
891
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
892
+ }
893
+
894
+ const response = await this.request({
895
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/download`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
896
+ method: 'GET',
897
+ headers: headerParameters,
898
+ query: queryParameters,
899
+ }, initOverrides);
900
+
901
+ return new runtime.VoidApiResponse(response);
902
+ }
903
+
904
+ /**
905
+ * Download file from workspace project
906
+ * Download file
907
+ */
908
+ async workspaceControllerDownloadFile(requestParameters: WorkspaceControllerDownloadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
909
+ await this.workspaceControllerDownloadFileRaw(requestParameters, initOverrides);
910
+ }
911
+
912
+ /**
913
+ * Execute command synchronously inside workspace project
914
+ * Execute command
915
+ */
916
+ async workspaceControllerExecuteCommandRaw(requestParameters: WorkspaceControllerExecuteCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExecuteResponseDto>> {
917
+ if (requestParameters['workspaceId'] == null) {
918
+ throw new runtime.RequiredError(
919
+ 'workspaceId',
920
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerExecuteCommand().'
921
+ );
922
+ }
923
+
924
+ if (requestParameters['projectId'] == null) {
925
+ throw new runtime.RequiredError(
926
+ 'projectId',
927
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerExecuteCommand().'
928
+ );
929
+ }
930
+
931
+ if (requestParameters['executeRequestDto'] == null) {
932
+ throw new runtime.RequiredError(
933
+ 'executeRequestDto',
934
+ 'Required parameter "executeRequestDto" was null or undefined when calling workspaceControllerExecuteCommand().'
935
+ );
936
+ }
937
+
938
+ const queryParameters: any = {};
939
+
940
+ const headerParameters: runtime.HTTPHeaders = {};
941
+
942
+ headerParameters['Content-Type'] = 'application/json';
943
+
944
+ if (this.configuration && this.configuration.accessToken) {
945
+ // oauth required
946
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
947
+ }
948
+
949
+ const response = await this.request({
950
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/process/execute`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
951
+ method: 'POST',
952
+ headers: headerParameters,
953
+ query: queryParameters,
954
+ body: ExecuteRequestDtoToJSON(requestParameters['executeRequestDto']),
955
+ }, initOverrides);
956
+
957
+ return new runtime.JSONApiResponse(response, (jsonValue) => ExecuteResponseDtoFromJSON(jsonValue));
958
+ }
959
+
960
+ /**
961
+ * Execute command synchronously inside workspace project
962
+ * Execute command
963
+ */
964
+ async workspaceControllerExecuteCommand(requestParameters: WorkspaceControllerExecuteCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExecuteResponseDto> {
965
+ const response = await this.workspaceControllerExecuteCommandRaw(requestParameters, initOverrides);
966
+ return await response.value();
967
+ }
968
+
969
+ /**
970
+ * Search for text/pattern inside workspace project files
971
+ * Search for text/pattern in files
972
+ */
973
+ async workspaceControllerFindInFilesRaw(requestParameters: WorkspaceControllerFindInFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
974
+ if (requestParameters['workspaceId'] == null) {
975
+ throw new runtime.RequiredError(
976
+ 'workspaceId',
977
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerFindInFiles().'
978
+ );
979
+ }
980
+
981
+ if (requestParameters['projectId'] == null) {
982
+ throw new runtime.RequiredError(
983
+ 'projectId',
984
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerFindInFiles().'
985
+ );
986
+ }
987
+
988
+ if (requestParameters['path'] == null) {
989
+ throw new runtime.RequiredError(
990
+ 'path',
991
+ 'Required parameter "path" was null or undefined when calling workspaceControllerFindInFiles().'
992
+ );
993
+ }
994
+
995
+ if (requestParameters['pattern'] == null) {
996
+ throw new runtime.RequiredError(
997
+ 'pattern',
998
+ 'Required parameter "pattern" was null or undefined when calling workspaceControllerFindInFiles().'
999
+ );
1000
+ }
1001
+
1002
+ const queryParameters: any = {};
1003
+
1004
+ if (requestParameters['path'] != null) {
1005
+ queryParameters['path'] = requestParameters['path'];
1006
+ }
1007
+
1008
+ if (requestParameters['pattern'] != null) {
1009
+ queryParameters['pattern'] = requestParameters['pattern'];
1010
+ }
1011
+
1012
+ const headerParameters: runtime.HTTPHeaders = {};
1013
+
1014
+ if (this.configuration && this.configuration.accessToken) {
1015
+ // oauth required
1016
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1017
+ }
1018
+
1019
+ const response = await this.request({
1020
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/find`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1021
+ method: 'GET',
1022
+ headers: headerParameters,
1023
+ query: queryParameters,
1024
+ }, initOverrides);
1025
+
1026
+ return new runtime.VoidApiResponse(response);
1027
+ }
1028
+
1029
+ /**
1030
+ * Search for text/pattern inside workspace project files
1031
+ * Search for text/pattern in files
1032
+ */
1033
+ async workspaceControllerFindInFiles(requestParameters: WorkspaceControllerFindInFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1034
+ await this.workspaceControllerFindInFilesRaw(requestParameters, initOverrides);
1035
+ }
1036
+
1037
+ /**
1038
+ * Get file info inside workspace project
1039
+ * Get file info
1040
+ */
1041
+ async workspaceControllerGetFileInfoRaw(requestParameters: WorkspaceControllerGetFileInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1042
+ if (requestParameters['workspaceId'] == null) {
1043
+ throw new runtime.RequiredError(
1044
+ 'workspaceId',
1045
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGetFileInfo().'
1046
+ );
1047
+ }
1048
+
1049
+ if (requestParameters['projectId'] == null) {
1050
+ throw new runtime.RequiredError(
1051
+ 'projectId',
1052
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGetFileInfo().'
1053
+ );
1054
+ }
1055
+
1056
+ if (requestParameters['path'] == null) {
1057
+ throw new runtime.RequiredError(
1058
+ 'path',
1059
+ 'Required parameter "path" was null or undefined when calling workspaceControllerGetFileInfo().'
1060
+ );
1061
+ }
1062
+
1063
+ const queryParameters: any = {};
1064
+
1065
+ if (requestParameters['path'] != null) {
1066
+ queryParameters['path'] = requestParameters['path'];
1067
+ }
1068
+
1069
+ const headerParameters: runtime.HTTPHeaders = {};
1070
+
1071
+ if (this.configuration && this.configuration.accessToken) {
1072
+ // oauth required
1073
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1074
+ }
1075
+
1076
+ const response = await this.request({
1077
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/info`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1078
+ method: 'GET',
1079
+ headers: headerParameters,
1080
+ query: queryParameters,
1081
+ }, initOverrides);
1082
+
1083
+ return new runtime.VoidApiResponse(response);
1084
+ }
1085
+
1086
+ /**
1087
+ * Get file info inside workspace project
1088
+ * Get file info
1089
+ */
1090
+ async workspaceControllerGetFileInfo(requestParameters: WorkspaceControllerGetFileInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1091
+ await this.workspaceControllerGetFileInfoRaw(requestParameters, initOverrides);
1092
+ }
1093
+
1094
+ /**
1095
+ * Get project directory
1096
+ * Get project dir
1097
+ */
1098
+ async workspaceControllerGetProjectDirRaw(requestParameters: WorkspaceControllerGetProjectDirRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1099
+ if (requestParameters['workspaceId'] == null) {
1100
+ throw new runtime.RequiredError(
1101
+ 'workspaceId',
1102
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGetProjectDir().'
1103
+ );
1104
+ }
1105
+
1106
+ if (requestParameters['projectId'] == null) {
1107
+ throw new runtime.RequiredError(
1108
+ 'projectId',
1109
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGetProjectDir().'
1110
+ );
1111
+ }
1112
+
1113
+ const queryParameters: any = {};
1114
+
1115
+ const headerParameters: runtime.HTTPHeaders = {};
1116
+
1117
+ if (this.configuration && this.configuration.accessToken) {
1118
+ // oauth required
1119
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1120
+ }
1121
+
1122
+ const response = await this.request({
1123
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/project-dir`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1124
+ method: 'GET',
1125
+ headers: headerParameters,
1126
+ query: queryParameters,
1127
+ }, initOverrides);
1128
+
1129
+ return new runtime.VoidApiResponse(response);
1130
+ }
1131
+
1132
+ /**
1133
+ * Get project directory
1134
+ * Get project dir
1135
+ */
1136
+ async workspaceControllerGetProjectDir(requestParameters: WorkspaceControllerGetProjectDirRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1137
+ await this.workspaceControllerGetProjectDirRaw(requestParameters, initOverrides);
1138
+ }
1139
+
1140
+ /**
1141
+ */
1142
+ async workspaceControllerGetWorkspaceRaw(requestParameters: WorkspaceControllerGetWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceDto>> {
1143
+ if (requestParameters['workspaceId'] == null) {
1144
+ throw new runtime.RequiredError(
1145
+ 'workspaceId',
1146
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGetWorkspace().'
1147
+ );
1148
+ }
1149
+
1150
+ const queryParameters: any = {};
1151
+
1152
+ if (requestParameters['verbose'] != null) {
1153
+ queryParameters['verbose'] = requestParameters['verbose'];
1154
+ }
1155
+
1156
+ const headerParameters: runtime.HTTPHeaders = {};
1157
+
1158
+ if (this.configuration && this.configuration.accessToken) {
1159
+ // oauth required
1160
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1161
+ }
1162
+
1163
+ const response = await this.request({
1164
+ path: `/workspace/{workspaceId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1165
+ method: 'GET',
1166
+ headers: headerParameters,
1167
+ query: queryParameters,
1168
+ }, initOverrides);
1169
+
1170
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceDtoFromJSON(jsonValue));
1171
+ }
1172
+
1173
+ /**
1174
+ */
1175
+ async workspaceControllerGetWorkspace(requestParameters: WorkspaceControllerGetWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceDto> {
1176
+ const response = await this.workspaceControllerGetWorkspaceRaw(requestParameters, initOverrides);
1177
+ return await response.value();
1178
+ }
1179
+
1180
+ /**
1181
+ * Add files to git commit
1182
+ * Add files
1183
+ */
1184
+ async workspaceControllerGitAddFilesRaw(requestParameters: WorkspaceControllerGitAddFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1185
+ if (requestParameters['workspaceId'] == null) {
1186
+ throw new runtime.RequiredError(
1187
+ 'workspaceId',
1188
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitAddFiles().'
1189
+ );
1190
+ }
1191
+
1192
+ if (requestParameters['projectId'] == null) {
1193
+ throw new runtime.RequiredError(
1194
+ 'projectId',
1195
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitAddFiles().'
1196
+ );
1197
+ }
1198
+
1199
+ if (requestParameters['gitAddRequestDto'] == null) {
1200
+ throw new runtime.RequiredError(
1201
+ 'gitAddRequestDto',
1202
+ 'Required parameter "gitAddRequestDto" was null or undefined when calling workspaceControllerGitAddFiles().'
1203
+ );
1204
+ }
1205
+
1206
+ const queryParameters: any = {};
1207
+
1208
+ const headerParameters: runtime.HTTPHeaders = {};
1209
+
1210
+ headerParameters['Content-Type'] = 'application/json';
1211
+
1212
+ if (this.configuration && this.configuration.accessToken) {
1213
+ // oauth required
1214
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1215
+ }
1216
+
1217
+ const response = await this.request({
1218
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/add`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1219
+ method: 'POST',
1220
+ headers: headerParameters,
1221
+ query: queryParameters,
1222
+ body: GitAddRequestDtoToJSON(requestParameters['gitAddRequestDto']),
1223
+ }, initOverrides);
1224
+
1225
+ return new runtime.VoidApiResponse(response);
1226
+ }
1227
+
1228
+ /**
1229
+ * Add files to git commit
1230
+ * Add files
1231
+ */
1232
+ async workspaceControllerGitAddFiles(requestParameters: WorkspaceControllerGitAddFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1233
+ await this.workspaceControllerGitAddFilesRaw(requestParameters, initOverrides);
1234
+ }
1235
+
1236
+ /**
1237
+ * Get branch list from git repository
1238
+ * Get branch list
1239
+ */
1240
+ async workspaceControllerGitBranchListRaw(requestParameters: WorkspaceControllerGitBranchListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1241
+ if (requestParameters['workspaceId'] == null) {
1242
+ throw new runtime.RequiredError(
1243
+ 'workspaceId',
1244
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitBranchList().'
1245
+ );
1246
+ }
1247
+
1248
+ if (requestParameters['projectId'] == null) {
1249
+ throw new runtime.RequiredError(
1250
+ 'projectId',
1251
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitBranchList().'
1252
+ );
1253
+ }
1254
+
1255
+ if (requestParameters['path'] == null) {
1256
+ throw new runtime.RequiredError(
1257
+ 'path',
1258
+ 'Required parameter "path" was null or undefined when calling workspaceControllerGitBranchList().'
1259
+ );
1260
+ }
1261
+
1262
+ const queryParameters: any = {};
1263
+
1264
+ if (requestParameters['path'] != null) {
1265
+ queryParameters['path'] = requestParameters['path'];
1266
+ }
1267
+
1268
+ const headerParameters: runtime.HTTPHeaders = {};
1269
+
1270
+ if (this.configuration && this.configuration.accessToken) {
1271
+ // oauth required
1272
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1273
+ }
1274
+
1275
+ const response = await this.request({
1276
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/branches`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1277
+ method: 'GET',
1278
+ headers: headerParameters,
1279
+ query: queryParameters,
1280
+ }, initOverrides);
1281
+
1282
+ return new runtime.VoidApiResponse(response);
1283
+ }
1284
+
1285
+ /**
1286
+ * Get branch list from git repository
1287
+ * Get branch list
1288
+ */
1289
+ async workspaceControllerGitBranchList(requestParameters: WorkspaceControllerGitBranchListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1290
+ await this.workspaceControllerGitBranchListRaw(requestParameters, initOverrides);
1291
+ }
1292
+
1293
+ /**
1294
+ * Clone git repository
1295
+ * Clone repository
1296
+ */
1297
+ async workspaceControllerGitCloneRepositoryRaw(requestParameters: WorkspaceControllerGitCloneRepositoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1298
+ if (requestParameters['workspaceId'] == null) {
1299
+ throw new runtime.RequiredError(
1300
+ 'workspaceId',
1301
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCloneRepository().'
1302
+ );
1303
+ }
1304
+
1305
+ if (requestParameters['projectId'] == null) {
1306
+ throw new runtime.RequiredError(
1307
+ 'projectId',
1308
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCloneRepository().'
1309
+ );
1310
+ }
1311
+
1312
+ if (requestParameters['gitCloneRequestDto'] == null) {
1313
+ throw new runtime.RequiredError(
1314
+ 'gitCloneRequestDto',
1315
+ 'Required parameter "gitCloneRequestDto" was null or undefined when calling workspaceControllerGitCloneRepository().'
1316
+ );
1317
+ }
1318
+
1319
+ const queryParameters: any = {};
1320
+
1321
+ const headerParameters: runtime.HTTPHeaders = {};
1322
+
1323
+ headerParameters['Content-Type'] = 'application/json';
1324
+
1325
+ if (this.configuration && this.configuration.accessToken) {
1326
+ // oauth required
1327
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1328
+ }
1329
+
1330
+ const response = await this.request({
1331
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/clone`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1332
+ method: 'POST',
1333
+ headers: headerParameters,
1334
+ query: queryParameters,
1335
+ body: GitCloneRequestDtoToJSON(requestParameters['gitCloneRequestDto']),
1336
+ }, initOverrides);
1337
+
1338
+ return new runtime.VoidApiResponse(response);
1339
+ }
1340
+
1341
+ /**
1342
+ * Clone git repository
1343
+ * Clone repository
1344
+ */
1345
+ async workspaceControllerGitCloneRepository(requestParameters: WorkspaceControllerGitCloneRepositoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1346
+ await this.workspaceControllerGitCloneRepositoryRaw(requestParameters, initOverrides);
1347
+ }
1348
+
1349
+ /**
1350
+ * Commit changes to git repository
1351
+ * Commit changes
1352
+ */
1353
+ async workspaceControllerGitCommitChangesRaw(requestParameters: WorkspaceControllerGitCommitChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1354
+ if (requestParameters['workspaceId'] == null) {
1355
+ throw new runtime.RequiredError(
1356
+ 'workspaceId',
1357
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCommitChanges().'
1358
+ );
1359
+ }
1360
+
1361
+ if (requestParameters['projectId'] == null) {
1362
+ throw new runtime.RequiredError(
1363
+ 'projectId',
1364
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCommitChanges().'
1365
+ );
1366
+ }
1367
+
1368
+ if (requestParameters['gitCommitRequestDto'] == null) {
1369
+ throw new runtime.RequiredError(
1370
+ 'gitCommitRequestDto',
1371
+ 'Required parameter "gitCommitRequestDto" was null or undefined when calling workspaceControllerGitCommitChanges().'
1372
+ );
1373
+ }
1374
+
1375
+ const queryParameters: any = {};
1376
+
1377
+ const headerParameters: runtime.HTTPHeaders = {};
1378
+
1379
+ headerParameters['Content-Type'] = 'application/json';
1380
+
1381
+ if (this.configuration && this.configuration.accessToken) {
1382
+ // oauth required
1383
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1384
+ }
1385
+
1386
+ const response = await this.request({
1387
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/commit`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1388
+ method: 'POST',
1389
+ headers: headerParameters,
1390
+ query: queryParameters,
1391
+ body: GitCommitRequestDtoToJSON(requestParameters['gitCommitRequestDto']),
1392
+ }, initOverrides);
1393
+
1394
+ return new runtime.VoidApiResponse(response);
1395
+ }
1396
+
1397
+ /**
1398
+ * Commit changes to git repository
1399
+ * Commit changes
1400
+ */
1401
+ async workspaceControllerGitCommitChanges(requestParameters: WorkspaceControllerGitCommitChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1402
+ await this.workspaceControllerGitCommitChangesRaw(requestParameters, initOverrides);
1403
+ }
1404
+
1405
+ /**
1406
+ * Get commit history from git repository
1407
+ * Get commit history
1408
+ */
1409
+ async workspaceControllerGitCommitHistoryRaw(requestParameters: WorkspaceControllerGitCommitHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1410
+ if (requestParameters['workspaceId'] == null) {
1411
+ throw new runtime.RequiredError(
1412
+ 'workspaceId',
1413
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCommitHistory().'
1414
+ );
1415
+ }
1416
+
1417
+ if (requestParameters['projectId'] == null) {
1418
+ throw new runtime.RequiredError(
1419
+ 'projectId',
1420
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCommitHistory().'
1421
+ );
1422
+ }
1423
+
1424
+ if (requestParameters['path'] == null) {
1425
+ throw new runtime.RequiredError(
1426
+ 'path',
1427
+ 'Required parameter "path" was null or undefined when calling workspaceControllerGitCommitHistory().'
1428
+ );
1429
+ }
1430
+
1431
+ const queryParameters: any = {};
1432
+
1433
+ if (requestParameters['path'] != null) {
1434
+ queryParameters['path'] = requestParameters['path'];
1435
+ }
1436
+
1437
+ const headerParameters: runtime.HTTPHeaders = {};
1438
+
1439
+ if (this.configuration && this.configuration.accessToken) {
1440
+ // oauth required
1441
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1442
+ }
1443
+
1444
+ const response = await this.request({
1445
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/history`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1446
+ method: 'GET',
1447
+ headers: headerParameters,
1448
+ query: queryParameters,
1449
+ }, initOverrides);
1450
+
1451
+ return new runtime.VoidApiResponse(response);
1452
+ }
1453
+
1454
+ /**
1455
+ * Get commit history from git repository
1456
+ * Get commit history
1457
+ */
1458
+ async workspaceControllerGitCommitHistory(requestParameters: WorkspaceControllerGitCommitHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1459
+ await this.workspaceControllerGitCommitHistoryRaw(requestParameters, initOverrides);
1460
+ }
1461
+
1462
+ /**
1463
+ * Create branch on git repository
1464
+ * Create branch
1465
+ */
1466
+ async workspaceControllerGitCreateBranchRaw(requestParameters: WorkspaceControllerGitCreateBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1467
+ if (requestParameters['workspaceId'] == null) {
1468
+ throw new runtime.RequiredError(
1469
+ 'workspaceId',
1470
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCreateBranch().'
1471
+ );
1472
+ }
1473
+
1474
+ if (requestParameters['projectId'] == null) {
1475
+ throw new runtime.RequiredError(
1476
+ 'projectId',
1477
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCreateBranch().'
1478
+ );
1479
+ }
1480
+
1481
+ if (requestParameters['gitBranchRequestDto'] == null) {
1482
+ throw new runtime.RequiredError(
1483
+ 'gitBranchRequestDto',
1484
+ 'Required parameter "gitBranchRequestDto" was null or undefined when calling workspaceControllerGitCreateBranch().'
1485
+ );
1486
+ }
1487
+
1488
+ const queryParameters: any = {};
1489
+
1490
+ const headerParameters: runtime.HTTPHeaders = {};
1491
+
1492
+ headerParameters['Content-Type'] = 'application/json';
1493
+
1494
+ if (this.configuration && this.configuration.accessToken) {
1495
+ // oauth required
1496
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1497
+ }
1498
+
1499
+ const response = await this.request({
1500
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/branches`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1501
+ method: 'POST',
1502
+ headers: headerParameters,
1503
+ query: queryParameters,
1504
+ body: GitBranchRequestDtoToJSON(requestParameters['gitBranchRequestDto']),
1505
+ }, initOverrides);
1506
+
1507
+ return new runtime.VoidApiResponse(response);
1508
+ }
1509
+
1510
+ /**
1511
+ * Create branch on git repository
1512
+ * Create branch
1513
+ */
1514
+ async workspaceControllerGitCreateBranch(requestParameters: WorkspaceControllerGitCreateBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1515
+ await this.workspaceControllerGitCreateBranchRaw(requestParameters, initOverrides);
1516
+ }
1517
+
1518
+ /**
1519
+ * Pull changes from remote
1520
+ * Pull changes
1521
+ */
1522
+ async workspaceControllerGitPullChangesRaw(requestParameters: WorkspaceControllerGitPullChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1523
+ if (requestParameters['workspaceId'] == null) {
1524
+ throw new runtime.RequiredError(
1525
+ 'workspaceId',
1526
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitPullChanges().'
1527
+ );
1528
+ }
1529
+
1530
+ if (requestParameters['projectId'] == null) {
1531
+ throw new runtime.RequiredError(
1532
+ 'projectId',
1533
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitPullChanges().'
1534
+ );
1535
+ }
1536
+
1537
+ if (requestParameters['gitRepoRequestDto'] == null) {
1538
+ throw new runtime.RequiredError(
1539
+ 'gitRepoRequestDto',
1540
+ 'Required parameter "gitRepoRequestDto" was null or undefined when calling workspaceControllerGitPullChanges().'
1541
+ );
1542
+ }
1543
+
1544
+ const queryParameters: any = {};
1545
+
1546
+ const headerParameters: runtime.HTTPHeaders = {};
1547
+
1548
+ headerParameters['Content-Type'] = 'application/json';
1549
+
1550
+ if (this.configuration && this.configuration.accessToken) {
1551
+ // oauth required
1552
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1553
+ }
1554
+
1555
+ const response = await this.request({
1556
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/pull`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1557
+ method: 'POST',
1558
+ headers: headerParameters,
1559
+ query: queryParameters,
1560
+ body: GitRepoRequestDtoToJSON(requestParameters['gitRepoRequestDto']),
1561
+ }, initOverrides);
1562
+
1563
+ return new runtime.VoidApiResponse(response);
1564
+ }
1565
+
1566
+ /**
1567
+ * Pull changes from remote
1568
+ * Pull changes
1569
+ */
1570
+ async workspaceControllerGitPullChanges(requestParameters: WorkspaceControllerGitPullChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1571
+ await this.workspaceControllerGitPullChangesRaw(requestParameters, initOverrides);
1572
+ }
1573
+
1574
+ /**
1575
+ * Push changes to remote
1576
+ * Push changes
1577
+ */
1578
+ async workspaceControllerGitPushChangesRaw(requestParameters: WorkspaceControllerGitPushChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1579
+ if (requestParameters['workspaceId'] == null) {
1580
+ throw new runtime.RequiredError(
1581
+ 'workspaceId',
1582
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitPushChanges().'
1583
+ );
1584
+ }
1585
+
1586
+ if (requestParameters['projectId'] == null) {
1587
+ throw new runtime.RequiredError(
1588
+ 'projectId',
1589
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitPushChanges().'
1590
+ );
1591
+ }
1592
+
1593
+ if (requestParameters['gitRepoRequestDto'] == null) {
1594
+ throw new runtime.RequiredError(
1595
+ 'gitRepoRequestDto',
1596
+ 'Required parameter "gitRepoRequestDto" was null or undefined when calling workspaceControllerGitPushChanges().'
1597
+ );
1598
+ }
1599
+
1600
+ const queryParameters: any = {};
1601
+
1602
+ const headerParameters: runtime.HTTPHeaders = {};
1603
+
1604
+ headerParameters['Content-Type'] = 'application/json';
1605
+
1606
+ if (this.configuration && this.configuration.accessToken) {
1607
+ // oauth required
1608
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1609
+ }
1610
+
1611
+ const response = await this.request({
1612
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/push`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1613
+ method: 'POST',
1614
+ headers: headerParameters,
1615
+ query: queryParameters,
1616
+ body: GitRepoRequestDtoToJSON(requestParameters['gitRepoRequestDto']),
1617
+ }, initOverrides);
1618
+
1619
+ return new runtime.VoidApiResponse(response);
1620
+ }
1621
+
1622
+ /**
1623
+ * Push changes to remote
1624
+ * Push changes
1625
+ */
1626
+ async workspaceControllerGitPushChanges(requestParameters: WorkspaceControllerGitPushChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1627
+ await this.workspaceControllerGitPushChangesRaw(requestParameters, initOverrides);
1628
+ }
1629
+
1630
+ /**
1631
+ * Get status from git repository
1632
+ * Get git status
1633
+ */
1634
+ async workspaceControllerGitStatusRaw(requestParameters: WorkspaceControllerGitStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1635
+ if (requestParameters['workspaceId'] == null) {
1636
+ throw new runtime.RequiredError(
1637
+ 'workspaceId',
1638
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitStatus().'
1639
+ );
1640
+ }
1641
+
1642
+ if (requestParameters['projectId'] == null) {
1643
+ throw new runtime.RequiredError(
1644
+ 'projectId',
1645
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitStatus().'
1646
+ );
1647
+ }
1648
+
1649
+ if (requestParameters['path'] == null) {
1650
+ throw new runtime.RequiredError(
1651
+ 'path',
1652
+ 'Required parameter "path" was null or undefined when calling workspaceControllerGitStatus().'
1653
+ );
1654
+ }
1655
+
1656
+ const queryParameters: any = {};
1657
+
1658
+ if (requestParameters['path'] != null) {
1659
+ queryParameters['path'] = requestParameters['path'];
1660
+ }
1661
+
1662
+ const headerParameters: runtime.HTTPHeaders = {};
1663
+
1664
+ if (this.configuration && this.configuration.accessToken) {
1665
+ // oauth required
1666
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1667
+ }
1668
+
1669
+ const response = await this.request({
1670
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/status`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1671
+ method: 'GET',
1672
+ headers: headerParameters,
1673
+ query: queryParameters,
1674
+ }, initOverrides);
1675
+
1676
+ return new runtime.VoidApiResponse(response);
1677
+ }
1678
+
1679
+ /**
1680
+ * Get status from git repository
1681
+ * Get git status
1682
+ */
1683
+ async workspaceControllerGitStatus(requestParameters: WorkspaceControllerGitStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1684
+ await this.workspaceControllerGitStatusRaw(requestParameters, initOverrides);
1685
+ }
1686
+
1687
+ /**
1688
+ * List files inside workspace project
1689
+ * List files
1690
+ */
1691
+ async workspaceControllerListFilesRaw(requestParameters: WorkspaceControllerListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1692
+ if (requestParameters['workspaceId'] == null) {
1693
+ throw new runtime.RequiredError(
1694
+ 'workspaceId',
1695
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerListFiles().'
1696
+ );
1697
+ }
1698
+
1699
+ if (requestParameters['projectId'] == null) {
1700
+ throw new runtime.RequiredError(
1701
+ 'projectId',
1702
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerListFiles().'
1703
+ );
1704
+ }
1705
+
1706
+ const queryParameters: any = {};
1707
+
1708
+ if (requestParameters['path'] != null) {
1709
+ queryParameters['path'] = requestParameters['path'];
1710
+ }
1711
+
1712
+ const headerParameters: runtime.HTTPHeaders = {};
1713
+
1714
+ if (this.configuration && this.configuration.accessToken) {
1715
+ // oauth required
1716
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1717
+ }
1718
+
1719
+ const response = await this.request({
1720
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1721
+ method: 'GET',
1722
+ headers: headerParameters,
1723
+ query: queryParameters,
1724
+ }, initOverrides);
1725
+
1726
+ return new runtime.VoidApiResponse(response);
1727
+ }
1728
+
1729
+ /**
1730
+ * List files inside workspace project
1731
+ * List files
1732
+ */
1733
+ async workspaceControllerListFiles(requestParameters: WorkspaceControllerListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1734
+ await this.workspaceControllerListFilesRaw(requestParameters, initOverrides);
1735
+ }
1736
+
1737
+ /**
1738
+ */
1739
+ async workspaceControllerListWorkspacesRaw(requestParameters: WorkspaceControllerListWorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<WorkspaceDto>>> {
1740
+ const queryParameters: any = {};
1741
+
1742
+ if (requestParameters['verbose'] != null) {
1743
+ queryParameters['verbose'] = requestParameters['verbose'];
1744
+ }
1745
+
1746
+ const headerParameters: runtime.HTTPHeaders = {};
1747
+
1748
+ if (this.configuration && this.configuration.accessToken) {
1749
+ // oauth required
1750
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1751
+ }
1752
+
1753
+ const response = await this.request({
1754
+ path: `/workspace`,
1755
+ method: 'GET',
1756
+ headers: headerParameters,
1757
+ query: queryParameters,
1758
+ }, initOverrides);
1759
+
1760
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(WorkspaceDtoFromJSON));
1761
+ }
1762
+
1763
+ /**
1764
+ */
1765
+ async workspaceControllerListWorkspaces(requestParameters: WorkspaceControllerListWorkspacesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WorkspaceDto>> {
1766
+ const response = await this.workspaceControllerListWorkspacesRaw(requestParameters, initOverrides);
1767
+ return await response.value();
1768
+ }
1769
+
1770
+ /**
1771
+ * Move file inside workspace project
1772
+ * Move file
1773
+ */
1774
+ async workspaceControllerMoveFileRaw(requestParameters: WorkspaceControllerMoveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1775
+ if (requestParameters['workspaceId'] == null) {
1776
+ throw new runtime.RequiredError(
1777
+ 'workspaceId',
1778
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerMoveFile().'
1779
+ );
1780
+ }
1781
+
1782
+ if (requestParameters['projectId'] == null) {
1783
+ throw new runtime.RequiredError(
1784
+ 'projectId',
1785
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerMoveFile().'
1786
+ );
1787
+ }
1788
+
1789
+ if (requestParameters['source'] == null) {
1790
+ throw new runtime.RequiredError(
1791
+ 'source',
1792
+ 'Required parameter "source" was null or undefined when calling workspaceControllerMoveFile().'
1793
+ );
1794
+ }
1795
+
1796
+ if (requestParameters['destination'] == null) {
1797
+ throw new runtime.RequiredError(
1798
+ 'destination',
1799
+ 'Required parameter "destination" was null or undefined when calling workspaceControllerMoveFile().'
1800
+ );
1801
+ }
1802
+
1803
+ const queryParameters: any = {};
1804
+
1805
+ if (requestParameters['source'] != null) {
1806
+ queryParameters['source'] = requestParameters['source'];
1807
+ }
1808
+
1809
+ if (requestParameters['destination'] != null) {
1810
+ queryParameters['destination'] = requestParameters['destination'];
1811
+ }
1812
+
1813
+ const headerParameters: runtime.HTTPHeaders = {};
1814
+
1815
+ if (this.configuration && this.configuration.accessToken) {
1816
+ // oauth required
1817
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1818
+ }
1819
+
1820
+ const response = await this.request({
1821
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/move`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1822
+ method: 'POST',
1823
+ headers: headerParameters,
1824
+ query: queryParameters,
1825
+ }, initOverrides);
1826
+
1827
+ return new runtime.VoidApiResponse(response);
1828
+ }
1829
+
1830
+ /**
1831
+ * Move file inside workspace project
1832
+ * Move file
1833
+ */
1834
+ async workspaceControllerMoveFile(requestParameters: WorkspaceControllerMoveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1835
+ await this.workspaceControllerMoveFileRaw(requestParameters, initOverrides);
1836
+ }
1837
+
1838
+ /**
1839
+ */
1840
+ async workspaceControllerRemoveWorkspaceRaw(requestParameters: WorkspaceControllerRemoveWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1841
+ if (requestParameters['workspaceId'] == null) {
1842
+ throw new runtime.RequiredError(
1843
+ 'workspaceId',
1844
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerRemoveWorkspace().'
1845
+ );
1846
+ }
1847
+
1848
+ if (requestParameters['force'] == null) {
1849
+ throw new runtime.RequiredError(
1850
+ 'force',
1851
+ 'Required parameter "force" was null or undefined when calling workspaceControllerRemoveWorkspace().'
1852
+ );
1853
+ }
1854
+
1855
+ const queryParameters: any = {};
1856
+
1857
+ if (requestParameters['force'] != null) {
1858
+ queryParameters['force'] = requestParameters['force'];
1859
+ }
1860
+
1861
+ const headerParameters: runtime.HTTPHeaders = {};
1862
+
1863
+ if (this.configuration && this.configuration.accessToken) {
1864
+ // oauth required
1865
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1866
+ }
1867
+
1868
+ const response = await this.request({
1869
+ path: `/workspace/{workspaceId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1870
+ method: 'DELETE',
1871
+ headers: headerParameters,
1872
+ query: queryParameters,
1873
+ }, initOverrides);
1874
+
1875
+ return new runtime.VoidApiResponse(response);
1876
+ }
1877
+
1878
+ /**
1879
+ */
1880
+ async workspaceControllerRemoveWorkspace(requestParameters: WorkspaceControllerRemoveWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1881
+ await this.workspaceControllerRemoveWorkspaceRaw(requestParameters, initOverrides);
1882
+ }
1883
+
1884
+ /**
1885
+ * Replace text/pattern in multiple files inside workspace project
1886
+ * Replace in files
1887
+ */
1888
+ async workspaceControllerReplaceInFilesRaw(requestParameters: WorkspaceControllerReplaceInFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1889
+ if (requestParameters['workspaceId'] == null) {
1890
+ throw new runtime.RequiredError(
1891
+ 'workspaceId',
1892
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerReplaceInFiles().'
1893
+ );
1894
+ }
1895
+
1896
+ if (requestParameters['projectId'] == null) {
1897
+ throw new runtime.RequiredError(
1898
+ 'projectId',
1899
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerReplaceInFiles().'
1900
+ );
1901
+ }
1902
+
1903
+ if (requestParameters['replaceRequestDto'] == null) {
1904
+ throw new runtime.RequiredError(
1905
+ 'replaceRequestDto',
1906
+ 'Required parameter "replaceRequestDto" was null or undefined when calling workspaceControllerReplaceInFiles().'
1907
+ );
1908
+ }
1909
+
1910
+ const queryParameters: any = {};
1911
+
1912
+ const headerParameters: runtime.HTTPHeaders = {};
1913
+
1914
+ headerParameters['Content-Type'] = 'application/json';
1915
+
1916
+ if (this.configuration && this.configuration.accessToken) {
1917
+ // oauth required
1918
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1919
+ }
1920
+
1921
+ const response = await this.request({
1922
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/replace`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1923
+ method: 'POST',
1924
+ headers: headerParameters,
1925
+ query: queryParameters,
1926
+ body: ReplaceRequestDtoToJSON(requestParameters['replaceRequestDto']),
1927
+ }, initOverrides);
1928
+
1929
+ return new runtime.VoidApiResponse(response);
1930
+ }
1931
+
1932
+ /**
1933
+ * Replace text/pattern in multiple files inside workspace project
1934
+ * Replace in files
1935
+ */
1936
+ async workspaceControllerReplaceInFiles(requestParameters: WorkspaceControllerReplaceInFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1937
+ await this.workspaceControllerReplaceInFilesRaw(requestParameters, initOverrides);
1938
+ }
1939
+
1940
+ /**
1941
+ * Replace all labels for a workspace. Existing labels will be removed.
1942
+ * Replace workspace labels
1943
+ */
1944
+ async workspaceControllerReplaceLabelsRaw(requestParameters: WorkspaceControllerReplaceLabelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceLabelsDto>> {
1945
+ if (requestParameters['workspaceId'] == null) {
1946
+ throw new runtime.RequiredError(
1947
+ 'workspaceId',
1948
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerReplaceLabels().'
1949
+ );
1950
+ }
1951
+
1952
+ if (requestParameters['workspaceLabelsDto'] == null) {
1953
+ throw new runtime.RequiredError(
1954
+ 'workspaceLabelsDto',
1955
+ 'Required parameter "workspaceLabelsDto" was null or undefined when calling workspaceControllerReplaceLabels().'
1956
+ );
1957
+ }
1958
+
1959
+ const queryParameters: any = {};
1960
+
1961
+ const headerParameters: runtime.HTTPHeaders = {};
1962
+
1963
+ headerParameters['Content-Type'] = 'application/json';
1964
+
1965
+ if (this.configuration && this.configuration.accessToken) {
1966
+ // oauth required
1967
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1968
+ }
1969
+
1970
+ const response = await this.request({
1971
+ path: `/workspace/{workspaceId}/labels`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1972
+ method: 'PUT',
1973
+ headers: headerParameters,
1974
+ query: queryParameters,
1975
+ body: WorkspaceLabelsDtoToJSON(requestParameters['workspaceLabelsDto']),
1976
+ }, initOverrides);
1977
+
1978
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceLabelsDtoFromJSON(jsonValue));
1979
+ }
1980
+
1981
+ /**
1982
+ * Replace all labels for a workspace. Existing labels will be removed.
1983
+ * Replace workspace labels
1984
+ */
1985
+ async workspaceControllerReplaceLabels(requestParameters: WorkspaceControllerReplaceLabelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceLabelsDto> {
1986
+ const response = await this.workspaceControllerReplaceLabelsRaw(requestParameters, initOverrides);
1987
+ return await response.value();
1988
+ }
1989
+
1990
+ /**
1991
+ * Search for files inside workspace project
1992
+ * Search files
1993
+ */
1994
+ async workspaceControllerSearchFilesRaw(requestParameters: WorkspaceControllerSearchFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1995
+ if (requestParameters['workspaceId'] == null) {
1996
+ throw new runtime.RequiredError(
1997
+ 'workspaceId',
1998
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerSearchFiles().'
1999
+ );
2000
+ }
2001
+
2002
+ if (requestParameters['projectId'] == null) {
2003
+ throw new runtime.RequiredError(
2004
+ 'projectId',
2005
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerSearchFiles().'
2006
+ );
2007
+ }
2008
+
2009
+ if (requestParameters['path'] == null) {
2010
+ throw new runtime.RequiredError(
2011
+ 'path',
2012
+ 'Required parameter "path" was null or undefined when calling workspaceControllerSearchFiles().'
2013
+ );
2014
+ }
2015
+
2016
+ if (requestParameters['pattern'] == null) {
2017
+ throw new runtime.RequiredError(
2018
+ 'pattern',
2019
+ 'Required parameter "pattern" was null or undefined when calling workspaceControllerSearchFiles().'
2020
+ );
2021
+ }
2022
+
2023
+ const queryParameters: any = {};
2024
+
2025
+ if (requestParameters['path'] != null) {
2026
+ queryParameters['path'] = requestParameters['path'];
2027
+ }
2028
+
2029
+ if (requestParameters['pattern'] != null) {
2030
+ queryParameters['pattern'] = requestParameters['pattern'];
2031
+ }
2032
+
2033
+ const headerParameters: runtime.HTTPHeaders = {};
2034
+
2035
+ if (this.configuration && this.configuration.accessToken) {
2036
+ // oauth required
2037
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2038
+ }
2039
+
2040
+ const response = await this.request({
2041
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/search`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
2042
+ method: 'GET',
2043
+ headers: headerParameters,
2044
+ query: queryParameters,
2045
+ }, initOverrides);
2046
+
2047
+ return new runtime.VoidApiResponse(response);
2048
+ }
2049
+
2050
+ /**
2051
+ * Search for files inside workspace project
2052
+ * Search files
2053
+ */
2054
+ async workspaceControllerSearchFiles(requestParameters: WorkspaceControllerSearchFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2055
+ await this.workspaceControllerSearchFilesRaw(requestParameters, initOverrides);
2056
+ }
2057
+
2058
+ /**
2059
+ * Set file owner/group/permissions inside workspace project
2060
+ * Set file permissions
2061
+ */
2062
+ async workspaceControllerSetFilePermissionsRaw(requestParameters: WorkspaceControllerSetFilePermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
2063
+ if (requestParameters['workspaceId'] == null) {
2064
+ throw new runtime.RequiredError(
2065
+ 'workspaceId',
2066
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerSetFilePermissions().'
2067
+ );
2068
+ }
2069
+
2070
+ if (requestParameters['projectId'] == null) {
2071
+ throw new runtime.RequiredError(
2072
+ 'projectId',
2073
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerSetFilePermissions().'
2074
+ );
2075
+ }
2076
+
2077
+ if (requestParameters['path'] == null) {
2078
+ throw new runtime.RequiredError(
2079
+ 'path',
2080
+ 'Required parameter "path" was null or undefined when calling workspaceControllerSetFilePermissions().'
2081
+ );
2082
+ }
2083
+
2084
+ if (requestParameters['owner'] == null) {
2085
+ throw new runtime.RequiredError(
2086
+ 'owner',
2087
+ 'Required parameter "owner" was null or undefined when calling workspaceControllerSetFilePermissions().'
2088
+ );
2089
+ }
2090
+
2091
+ if (requestParameters['group'] == null) {
2092
+ throw new runtime.RequiredError(
2093
+ 'group',
2094
+ 'Required parameter "group" was null or undefined when calling workspaceControllerSetFilePermissions().'
2095
+ );
2096
+ }
2097
+
2098
+ if (requestParameters['mode'] == null) {
2099
+ throw new runtime.RequiredError(
2100
+ 'mode',
2101
+ 'Required parameter "mode" was null or undefined when calling workspaceControllerSetFilePermissions().'
2102
+ );
2103
+ }
2104
+
2105
+ const queryParameters: any = {};
2106
+
2107
+ if (requestParameters['path'] != null) {
2108
+ queryParameters['path'] = requestParameters['path'];
2109
+ }
2110
+
2111
+ if (requestParameters['owner'] != null) {
2112
+ queryParameters['owner'] = requestParameters['owner'];
2113
+ }
2114
+
2115
+ if (requestParameters['group'] != null) {
2116
+ queryParameters['group'] = requestParameters['group'];
2117
+ }
2118
+
2119
+ if (requestParameters['mode'] != null) {
2120
+ queryParameters['mode'] = requestParameters['mode'];
2121
+ }
2122
+
2123
+ const headerParameters: runtime.HTTPHeaders = {};
2124
+
2125
+ if (this.configuration && this.configuration.accessToken) {
2126
+ // oauth required
2127
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2128
+ }
2129
+
2130
+ const response = await this.request({
2131
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/permissions`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
2132
+ method: 'POST',
2133
+ headers: headerParameters,
2134
+ query: queryParameters,
2135
+ }, initOverrides);
2136
+
2137
+ return new runtime.VoidApiResponse(response);
2138
+ }
2139
+
2140
+ /**
2141
+ * Set file owner/group/permissions inside workspace project
2142
+ * Set file permissions
2143
+ */
2144
+ async workspaceControllerSetFilePermissions(requestParameters: WorkspaceControllerSetFilePermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2145
+ await this.workspaceControllerSetFilePermissionsRaw(requestParameters, initOverrides);
2146
+ }
2147
+
2148
+ /**
2149
+ */
2150
+ async workspaceControllerStartProjectRaw(requestParameters: WorkspaceControllerStartProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
2151
+ if (requestParameters['workspaceId'] == null) {
2152
+ throw new runtime.RequiredError(
2153
+ 'workspaceId',
2154
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStartProject().'
2155
+ );
2156
+ }
2157
+
2158
+ if (requestParameters['projectId'] == null) {
2159
+ throw new runtime.RequiredError(
2160
+ 'projectId',
2161
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerStartProject().'
2162
+ );
2163
+ }
2164
+
2165
+ const queryParameters: any = {};
2166
+
2167
+ const headerParameters: runtime.HTTPHeaders = {};
2168
+
2169
+ if (this.configuration && this.configuration.accessToken) {
2170
+ // oauth required
2171
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2172
+ }
2173
+
2174
+ const response = await this.request({
2175
+ path: `/workspace/{workspaceId}/{projectId}/start`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
2176
+ method: 'POST',
2177
+ headers: headerParameters,
2178
+ query: queryParameters,
2179
+ }, initOverrides);
2180
+
2181
+ return new runtime.VoidApiResponse(response);
2182
+ }
2183
+
2184
+ /**
2185
+ */
2186
+ async workspaceControllerStartProject(requestParameters: WorkspaceControllerStartProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2187
+ await this.workspaceControllerStartProjectRaw(requestParameters, initOverrides);
2188
+ }
2189
+
2190
+ /**
2191
+ */
2192
+ async workspaceControllerStartWorkspaceRaw(requestParameters: WorkspaceControllerStartWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
2193
+ if (requestParameters['workspaceId'] == null) {
2194
+ throw new runtime.RequiredError(
2195
+ 'workspaceId',
2196
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStartWorkspace().'
2197
+ );
2198
+ }
2199
+
2200
+ const queryParameters: any = {};
2201
+
2202
+ const headerParameters: runtime.HTTPHeaders = {};
2203
+
2204
+ if (this.configuration && this.configuration.accessToken) {
2205
+ // oauth required
2206
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2207
+ }
2208
+
2209
+ const response = await this.request({
2210
+ path: `/workspace/{workspaceId}/start`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
2211
+ method: 'POST',
2212
+ headers: headerParameters,
2213
+ query: queryParameters,
2214
+ }, initOverrides);
2215
+
2216
+ return new runtime.VoidApiResponse(response);
2217
+ }
2218
+
2219
+ /**
2220
+ */
2221
+ async workspaceControllerStartWorkspace(requestParameters: WorkspaceControllerStartWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2222
+ await this.workspaceControllerStartWorkspaceRaw(requestParameters, initOverrides);
2223
+ }
2224
+
2225
+ /**
2226
+ */
2227
+ async workspaceControllerStopProjectRaw(requestParameters: WorkspaceControllerStopProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
2228
+ if (requestParameters['workspaceId'] == null) {
2229
+ throw new runtime.RequiredError(
2230
+ 'workspaceId',
2231
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStopProject().'
2232
+ );
2233
+ }
2234
+
2235
+ if (requestParameters['projectId'] == null) {
2236
+ throw new runtime.RequiredError(
2237
+ 'projectId',
2238
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerStopProject().'
2239
+ );
2240
+ }
2241
+
2242
+ const queryParameters: any = {};
2243
+
2244
+ const headerParameters: runtime.HTTPHeaders = {};
2245
+
2246
+ if (this.configuration && this.configuration.accessToken) {
2247
+ // oauth required
2248
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2249
+ }
2250
+
2251
+ const response = await this.request({
2252
+ path: `/workspace/{workspaceId}/{projectId}/stop`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
2253
+ method: 'POST',
2254
+ headers: headerParameters,
2255
+ query: queryParameters,
2256
+ }, initOverrides);
2257
+
2258
+ return new runtime.VoidApiResponse(response);
2259
+ }
2260
+
2261
+ /**
2262
+ */
2263
+ async workspaceControllerStopProject(requestParameters: WorkspaceControllerStopProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2264
+ await this.workspaceControllerStopProjectRaw(requestParameters, initOverrides);
2265
+ }
2266
+
2267
+ /**
2268
+ */
2269
+ async workspaceControllerStopWorkspaceRaw(requestParameters: WorkspaceControllerStopWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
2270
+ if (requestParameters['workspaceId'] == null) {
2271
+ throw new runtime.RequiredError(
2272
+ 'workspaceId',
2273
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStopWorkspace().'
2274
+ );
2275
+ }
2276
+
2277
+ const queryParameters: any = {};
2278
+
2279
+ const headerParameters: runtime.HTTPHeaders = {};
2280
+
2281
+ if (this.configuration && this.configuration.accessToken) {
2282
+ // oauth required
2283
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2284
+ }
2285
+
2286
+ const response = await this.request({
2287
+ path: `/workspace/{workspaceId}/stop`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
2288
+ method: 'POST',
2289
+ headers: headerParameters,
2290
+ query: queryParameters,
2291
+ }, initOverrides);
2292
+
2293
+ return new runtime.VoidApiResponse(response);
2294
+ }
2295
+
2296
+ /**
2297
+ */
2298
+ async workspaceControllerStopWorkspace(requestParameters: WorkspaceControllerStopWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2299
+ await this.workspaceControllerStopWorkspaceRaw(requestParameters, initOverrides);
2300
+ }
2301
+
2302
+ /**
2303
+ * Upload file inside workspace project
2304
+ * Upload file
2305
+ */
2306
+ async workspaceControllerUploadFileRaw(requestParameters: WorkspaceControllerUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
2307
+ if (requestParameters['workspaceId'] == null) {
2308
+ throw new runtime.RequiredError(
2309
+ 'workspaceId',
2310
+ 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerUploadFile().'
2311
+ );
2312
+ }
2313
+
2314
+ if (requestParameters['projectId'] == null) {
2315
+ throw new runtime.RequiredError(
2316
+ 'projectId',
2317
+ 'Required parameter "projectId" was null or undefined when calling workspaceControllerUploadFile().'
2318
+ );
2319
+ }
2320
+
2321
+ if (requestParameters['path'] == null) {
2322
+ throw new runtime.RequiredError(
2323
+ 'path',
2324
+ 'Required parameter "path" was null or undefined when calling workspaceControllerUploadFile().'
2325
+ );
2326
+ }
2327
+
2328
+ const queryParameters: any = {};
2329
+
2330
+ if (requestParameters['path'] != null) {
2331
+ queryParameters['path'] = requestParameters['path'];
2332
+ }
2333
+
2334
+ const headerParameters: runtime.HTTPHeaders = {};
2335
+
2336
+ if (this.configuration && this.configuration.accessToken) {
2337
+ // oauth required
2338
+ headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
2339
+ }
2340
+
2341
+ const consumes: runtime.Consume[] = [
2342
+ { contentType: 'multipart/form-data' },
2343
+ ];
2344
+ // @ts-ignore: canConsumeForm may be unused
2345
+ const canConsumeForm = runtime.canConsumeForm(consumes);
2346
+
2347
+ let formParams: { append(param: string, value: any): any };
2348
+ let useForm = false;
2349
+ // use FormData to transmit files using content-type "multipart/form-data"
2350
+ useForm = canConsumeForm;
2351
+ if (useForm) {
2352
+ formParams = new FormData();
2353
+ } else {
2354
+ formParams = new URLSearchParams();
2355
+ }
2356
+
2357
+ if (requestParameters['file'] != null) {
2358
+ formParams.append('file', requestParameters['file'] as any);
2359
+ }
2360
+
2361
+ const response = await this.request({
2362
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/upload`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
2363
+ method: 'POST',
2364
+ headers: headerParameters,
2365
+ query: queryParameters,
2366
+ body: formParams,
2367
+ }, initOverrides);
2368
+
2369
+ return new runtime.VoidApiResponse(response);
2370
+ }
2371
+
2372
+ /**
2373
+ * Upload file inside workspace project
2374
+ * Upload file
2375
+ */
2376
+ async workspaceControllerUploadFile(requestParameters: WorkspaceControllerUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
2377
+ await this.workspaceControllerUploadFileRaw(requestParameters, initOverrides);
2378
+ }
2379
+
2380
+ }