@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,1645 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Daytona Workspaces
6
+ * Daytona Workspaces API Docs
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.DefaultApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class DefaultApi extends runtime.BaseAPI {
32
+ /**
33
+ * Create a new API key
34
+ */
35
+ apiKeyControllerCreateApiKeyRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['createApiKeyDto'] == null) {
38
+ throw new runtime.RequiredError('createApiKeyDto', 'Required parameter "createApiKeyDto" was null or undefined when calling apiKeyControllerCreateApiKey().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ headerParameters['Content-Type'] = 'application/json';
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ // oauth required
45
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
46
+ }
47
+ const response = yield this.request({
48
+ path: `/api-keys`,
49
+ method: 'POST',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ body: (0, index_1.CreateApiKeyDtoToJSON)(requestParameters['createApiKeyDto']),
53
+ }, initOverrides);
54
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApiKeyResponseDtoFromJSON)(jsonValue));
55
+ });
56
+ }
57
+ /**
58
+ * Create a new API key
59
+ */
60
+ apiKeyControllerCreateApiKey(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const response = yield this.apiKeyControllerCreateApiKeyRaw(requestParameters, initOverrides);
63
+ return yield response.value();
64
+ });
65
+ }
66
+ /**
67
+ * Delete an API key by name
68
+ */
69
+ apiKeyControllerDeleteApiKeyRaw(requestParameters, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ if (requestParameters['name'] == null) {
72
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling apiKeyControllerDeleteApiKey().');
73
+ }
74
+ const queryParameters = {};
75
+ const headerParameters = {};
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ // oauth required
78
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
79
+ }
80
+ const response = yield this.request({
81
+ path: `/api-keys/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
82
+ method: 'DELETE',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ }, initOverrides);
86
+ return new runtime.VoidApiResponse(response);
87
+ });
88
+ }
89
+ /**
90
+ * Delete an API key by name
91
+ */
92
+ apiKeyControllerDeleteApiKey(requestParameters, initOverrides) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ yield this.apiKeyControllerDeleteApiKeyRaw(requestParameters, initOverrides);
95
+ });
96
+ }
97
+ /**
98
+ * Get a specific API key by name
99
+ */
100
+ apiKeyControllerGetApiKeyRaw(requestParameters, initOverrides) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ if (requestParameters['name'] == null) {
103
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling apiKeyControllerGetApiKey().');
104
+ }
105
+ const queryParameters = {};
106
+ const headerParameters = {};
107
+ if (this.configuration && this.configuration.accessToken) {
108
+ // oauth required
109
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
110
+ }
111
+ const response = yield this.request({
112
+ path: `/api-keys/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
113
+ method: 'GET',
114
+ headers: headerParameters,
115
+ query: queryParameters,
116
+ }, initOverrides);
117
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApiKeyListDtoFromJSON)(jsonValue));
118
+ });
119
+ }
120
+ /**
121
+ * Get a specific API key by name
122
+ */
123
+ apiKeyControllerGetApiKey(requestParameters, initOverrides) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ const response = yield this.apiKeyControllerGetApiKeyRaw(requestParameters, initOverrides);
126
+ return yield response.value();
127
+ });
128
+ }
129
+ /**
130
+ * Get all API keys for the user
131
+ */
132
+ apiKeyControllerGetApiKeysRaw(initOverrides) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const queryParameters = {};
135
+ const headerParameters = {};
136
+ if (this.configuration && this.configuration.accessToken) {
137
+ // oauth required
138
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
139
+ }
140
+ const response = yield this.request({
141
+ path: `/api-keys`,
142
+ method: 'GET',
143
+ headers: headerParameters,
144
+ query: queryParameters,
145
+ }, initOverrides);
146
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ApiKeyListDtoFromJSON));
147
+ });
148
+ }
149
+ /**
150
+ * Get all API keys for the user
151
+ */
152
+ apiKeyControllerGetApiKeys(initOverrides) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ const response = yield this.apiKeyControllerGetApiKeysRaw(initOverrides);
155
+ return yield response.value();
156
+ });
157
+ }
158
+ /**
159
+ */
160
+ appControllerGetHelloRaw(initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ const queryParameters = {};
163
+ const headerParameters = {};
164
+ const response = yield this.request({
165
+ path: `/`,
166
+ method: 'GET',
167
+ headers: headerParameters,
168
+ query: queryParameters,
169
+ }, initOverrides);
170
+ return new runtime.VoidApiResponse(response);
171
+ });
172
+ }
173
+ /**
174
+ */
175
+ appControllerGetHello(initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ yield this.appControllerGetHelloRaw(initOverrides);
178
+ });
179
+ }
180
+ /**
181
+ */
182
+ nodeControllerCreateRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ if (requestParameters['body'] == null) {
185
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling nodeControllerCreate().');
186
+ }
187
+ const queryParameters = {};
188
+ const headerParameters = {};
189
+ headerParameters['Content-Type'] = 'application/json';
190
+ if (this.configuration && this.configuration.accessToken) {
191
+ // oauth required
192
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
193
+ }
194
+ const response = yield this.request({
195
+ path: `/nodes`,
196
+ method: 'POST',
197
+ headers: headerParameters,
198
+ query: queryParameters,
199
+ body: requestParameters['body'],
200
+ }, initOverrides);
201
+ return new runtime.VoidApiResponse(response);
202
+ });
203
+ }
204
+ /**
205
+ */
206
+ nodeControllerCreate(requestParameters, initOverrides) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ yield this.nodeControllerCreateRaw(requestParameters, initOverrides);
209
+ });
210
+ }
211
+ /**
212
+ */
213
+ nodeControllerFindAllRaw(initOverrides) {
214
+ return __awaiter(this, void 0, void 0, function* () {
215
+ const queryParameters = {};
216
+ const headerParameters = {};
217
+ if (this.configuration && this.configuration.accessToken) {
218
+ // oauth required
219
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
220
+ }
221
+ const response = yield this.request({
222
+ path: `/nodes`,
223
+ method: 'GET',
224
+ headers: headerParameters,
225
+ query: queryParameters,
226
+ }, initOverrides);
227
+ return new runtime.VoidApiResponse(response);
228
+ });
229
+ }
230
+ /**
231
+ */
232
+ nodeControllerFindAll(initOverrides) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ yield this.nodeControllerFindAllRaw(initOverrides);
235
+ });
236
+ }
237
+ /**
238
+ */
239
+ nodeControllerUpdateSchedulingStatusRaw(requestParameters, initOverrides) {
240
+ return __awaiter(this, void 0, void 0, function* () {
241
+ if (requestParameters['id'] == null) {
242
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling nodeControllerUpdateSchedulingStatus().');
243
+ }
244
+ const queryParameters = {};
245
+ const headerParameters = {};
246
+ if (this.configuration && this.configuration.accessToken) {
247
+ // oauth required
248
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
249
+ }
250
+ const response = yield this.request({
251
+ path: `/nodes/{id}/scheduling`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
252
+ method: 'PATCH',
253
+ headers: headerParameters,
254
+ query: queryParameters,
255
+ }, initOverrides);
256
+ return new runtime.VoidApiResponse(response);
257
+ });
258
+ }
259
+ /**
260
+ */
261
+ nodeControllerUpdateSchedulingStatus(requestParameters, initOverrides) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ yield this.nodeControllerUpdateSchedulingStatusRaw(requestParameters, initOverrides);
264
+ });
265
+ }
266
+ /**
267
+ */
268
+ userControllerCreateRaw(requestParameters, initOverrides) {
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ if (requestParameters['body'] == null) {
271
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling userControllerCreate().');
272
+ }
273
+ const queryParameters = {};
274
+ const headerParameters = {};
275
+ headerParameters['Content-Type'] = 'application/json';
276
+ if (this.configuration && this.configuration.accessToken) {
277
+ // oauth required
278
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
279
+ }
280
+ const response = yield this.request({
281
+ path: `/users`,
282
+ method: 'POST',
283
+ headers: headerParameters,
284
+ query: queryParameters,
285
+ body: requestParameters['body'],
286
+ }, initOverrides);
287
+ return new runtime.VoidApiResponse(response);
288
+ });
289
+ }
290
+ /**
291
+ */
292
+ userControllerCreate(requestParameters, initOverrides) {
293
+ return __awaiter(this, void 0, void 0, function* () {
294
+ yield this.userControllerCreateRaw(requestParameters, initOverrides);
295
+ });
296
+ }
297
+ /**
298
+ */
299
+ userControllerFindAllRaw(initOverrides) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ const queryParameters = {};
302
+ const headerParameters = {};
303
+ if (this.configuration && this.configuration.accessToken) {
304
+ // oauth required
305
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
306
+ }
307
+ const response = yield this.request({
308
+ path: `/users`,
309
+ method: 'GET',
310
+ headers: headerParameters,
311
+ query: queryParameters,
312
+ }, initOverrides);
313
+ return new runtime.VoidApiResponse(response);
314
+ });
315
+ }
316
+ /**
317
+ */
318
+ userControllerFindAll(initOverrides) {
319
+ return __awaiter(this, void 0, void 0, function* () {
320
+ yield this.userControllerFindAllRaw(initOverrides);
321
+ });
322
+ }
323
+ /**
324
+ */
325
+ userControllerRegenerateKeyPairRaw(requestParameters, initOverrides) {
326
+ return __awaiter(this, void 0, void 0, function* () {
327
+ if (requestParameters['id'] == null) {
328
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling userControllerRegenerateKeyPair().');
329
+ }
330
+ const queryParameters = {};
331
+ const headerParameters = {};
332
+ if (this.configuration && this.configuration.accessToken) {
333
+ // oauth required
334
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
335
+ }
336
+ const response = yield this.request({
337
+ path: `/users/{id}/regenerate-key-pair`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
338
+ method: 'POST',
339
+ headers: headerParameters,
340
+ query: queryParameters,
341
+ }, initOverrides);
342
+ return new runtime.VoidApiResponse(response);
343
+ });
344
+ }
345
+ /**
346
+ */
347
+ userControllerRegenerateKeyPair(requestParameters, initOverrides) {
348
+ return __awaiter(this, void 0, void 0, function* () {
349
+ yield this.userControllerRegenerateKeyPairRaw(requestParameters, initOverrides);
350
+ });
351
+ }
352
+ /**
353
+ * Create folder inside workspace project
354
+ * Create folder
355
+ */
356
+ workspaceControllerCreateFolderRaw(requestParameters, initOverrides) {
357
+ return __awaiter(this, void 0, void 0, function* () {
358
+ if (requestParameters['workspaceId'] == null) {
359
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerCreateFolder().');
360
+ }
361
+ if (requestParameters['projectId'] == null) {
362
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerCreateFolder().');
363
+ }
364
+ if (requestParameters['path'] == null) {
365
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerCreateFolder().');
366
+ }
367
+ if (requestParameters['mode'] == null) {
368
+ throw new runtime.RequiredError('mode', 'Required parameter "mode" was null or undefined when calling workspaceControllerCreateFolder().');
369
+ }
370
+ const queryParameters = {};
371
+ if (requestParameters['path'] != null) {
372
+ queryParameters['path'] = requestParameters['path'];
373
+ }
374
+ if (requestParameters['mode'] != null) {
375
+ queryParameters['mode'] = requestParameters['mode'];
376
+ }
377
+ const headerParameters = {};
378
+ if (this.configuration && this.configuration.accessToken) {
379
+ // oauth required
380
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
381
+ }
382
+ const response = yield this.request({
383
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/folder`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
384
+ method: 'POST',
385
+ headers: headerParameters,
386
+ query: queryParameters,
387
+ }, initOverrides);
388
+ return new runtime.VoidApiResponse(response);
389
+ });
390
+ }
391
+ /**
392
+ * Create folder inside workspace project
393
+ * Create folder
394
+ */
395
+ workspaceControllerCreateFolder(requestParameters, initOverrides) {
396
+ return __awaiter(this, void 0, void 0, function* () {
397
+ yield this.workspaceControllerCreateFolderRaw(requestParameters, initOverrides);
398
+ });
399
+ }
400
+ /**
401
+ * Create a workspace snapshot
402
+ */
403
+ workspaceControllerCreateSnapshotRaw(requestParameters, initOverrides) {
404
+ return __awaiter(this, void 0, void 0, function* () {
405
+ if (requestParameters['workspaceId'] == null) {
406
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerCreateSnapshot().');
407
+ }
408
+ const queryParameters = {};
409
+ const headerParameters = {};
410
+ if (this.configuration && this.configuration.accessToken) {
411
+ // oauth required
412
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
413
+ }
414
+ const response = yield this.request({
415
+ path: `/workspace/{workspaceId}/snapshot`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
416
+ method: 'POST',
417
+ headers: headerParameters,
418
+ query: queryParameters,
419
+ }, initOverrides);
420
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceDtoFromJSON)(jsonValue));
421
+ });
422
+ }
423
+ /**
424
+ * Create a workspace snapshot
425
+ */
426
+ workspaceControllerCreateSnapshot(requestParameters, initOverrides) {
427
+ return __awaiter(this, void 0, void 0, function* () {
428
+ const response = yield this.workspaceControllerCreateSnapshotRaw(requestParameters, initOverrides);
429
+ return yield response.value();
430
+ });
431
+ }
432
+ /**
433
+ */
434
+ workspaceControllerCreateWorkspaceRaw(requestParameters, initOverrides) {
435
+ return __awaiter(this, void 0, void 0, function* () {
436
+ if (requestParameters['createWorkspaceDto'] == null) {
437
+ throw new runtime.RequiredError('createWorkspaceDto', 'Required parameter "createWorkspaceDto" was null or undefined when calling workspaceControllerCreateWorkspace().');
438
+ }
439
+ const queryParameters = {};
440
+ const headerParameters = {};
441
+ headerParameters['Content-Type'] = 'application/json';
442
+ if (this.configuration && this.configuration.accessToken) {
443
+ // oauth required
444
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
445
+ }
446
+ const response = yield this.request({
447
+ path: `/workspace`,
448
+ method: 'POST',
449
+ headers: headerParameters,
450
+ query: queryParameters,
451
+ body: (0, index_1.CreateWorkspaceDtoToJSON)(requestParameters['createWorkspaceDto']),
452
+ }, initOverrides);
453
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceDtoFromJSON)(jsonValue));
454
+ });
455
+ }
456
+ /**
457
+ */
458
+ workspaceControllerCreateWorkspace(requestParameters, initOverrides) {
459
+ return __awaiter(this, void 0, void 0, function* () {
460
+ const response = yield this.workspaceControllerCreateWorkspaceRaw(requestParameters, initOverrides);
461
+ return yield response.value();
462
+ });
463
+ }
464
+ /**
465
+ * Delete file inside workspace project
466
+ * Delete file
467
+ */
468
+ workspaceControllerDeleteFileRaw(requestParameters, initOverrides) {
469
+ return __awaiter(this, void 0, void 0, function* () {
470
+ if (requestParameters['workspaceId'] == null) {
471
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerDeleteFile().');
472
+ }
473
+ if (requestParameters['projectId'] == null) {
474
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerDeleteFile().');
475
+ }
476
+ if (requestParameters['path'] == null) {
477
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerDeleteFile().');
478
+ }
479
+ const queryParameters = {};
480
+ if (requestParameters['path'] != null) {
481
+ queryParameters['path'] = requestParameters['path'];
482
+ }
483
+ const headerParameters = {};
484
+ if (this.configuration && this.configuration.accessToken) {
485
+ // oauth required
486
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
487
+ }
488
+ const response = yield this.request({
489
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
490
+ method: 'DELETE',
491
+ headers: headerParameters,
492
+ query: queryParameters,
493
+ }, initOverrides);
494
+ return new runtime.VoidApiResponse(response);
495
+ });
496
+ }
497
+ /**
498
+ * Delete file inside workspace project
499
+ * Delete file
500
+ */
501
+ workspaceControllerDeleteFile(requestParameters, initOverrides) {
502
+ return __awaiter(this, void 0, void 0, function* () {
503
+ yield this.workspaceControllerDeleteFileRaw(requestParameters, initOverrides);
504
+ });
505
+ }
506
+ /**
507
+ * Download file from workspace project
508
+ * Download file
509
+ */
510
+ workspaceControllerDownloadFileRaw(requestParameters, initOverrides) {
511
+ return __awaiter(this, void 0, void 0, function* () {
512
+ if (requestParameters['workspaceId'] == null) {
513
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerDownloadFile().');
514
+ }
515
+ if (requestParameters['projectId'] == null) {
516
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerDownloadFile().');
517
+ }
518
+ if (requestParameters['path'] == null) {
519
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerDownloadFile().');
520
+ }
521
+ const queryParameters = {};
522
+ if (requestParameters['path'] != null) {
523
+ queryParameters['path'] = requestParameters['path'];
524
+ }
525
+ const headerParameters = {};
526
+ if (this.configuration && this.configuration.accessToken) {
527
+ // oauth required
528
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
529
+ }
530
+ const response = yield this.request({
531
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/download`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
532
+ method: 'GET',
533
+ headers: headerParameters,
534
+ query: queryParameters,
535
+ }, initOverrides);
536
+ return new runtime.VoidApiResponse(response);
537
+ });
538
+ }
539
+ /**
540
+ * Download file from workspace project
541
+ * Download file
542
+ */
543
+ workspaceControllerDownloadFile(requestParameters, initOverrides) {
544
+ return __awaiter(this, void 0, void 0, function* () {
545
+ yield this.workspaceControllerDownloadFileRaw(requestParameters, initOverrides);
546
+ });
547
+ }
548
+ /**
549
+ * Execute command synchronously inside workspace project
550
+ * Execute command
551
+ */
552
+ workspaceControllerExecuteCommandRaw(requestParameters, initOverrides) {
553
+ return __awaiter(this, void 0, void 0, function* () {
554
+ if (requestParameters['workspaceId'] == null) {
555
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerExecuteCommand().');
556
+ }
557
+ if (requestParameters['projectId'] == null) {
558
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerExecuteCommand().');
559
+ }
560
+ if (requestParameters['executeRequestDto'] == null) {
561
+ throw new runtime.RequiredError('executeRequestDto', 'Required parameter "executeRequestDto" was null or undefined when calling workspaceControllerExecuteCommand().');
562
+ }
563
+ const queryParameters = {};
564
+ const headerParameters = {};
565
+ headerParameters['Content-Type'] = 'application/json';
566
+ if (this.configuration && this.configuration.accessToken) {
567
+ // oauth required
568
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
569
+ }
570
+ const response = yield this.request({
571
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/process/execute`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
572
+ method: 'POST',
573
+ headers: headerParameters,
574
+ query: queryParameters,
575
+ body: (0, index_1.ExecuteRequestDtoToJSON)(requestParameters['executeRequestDto']),
576
+ }, initOverrides);
577
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ExecuteResponseDtoFromJSON)(jsonValue));
578
+ });
579
+ }
580
+ /**
581
+ * Execute command synchronously inside workspace project
582
+ * Execute command
583
+ */
584
+ workspaceControllerExecuteCommand(requestParameters, initOverrides) {
585
+ return __awaiter(this, void 0, void 0, function* () {
586
+ const response = yield this.workspaceControllerExecuteCommandRaw(requestParameters, initOverrides);
587
+ return yield response.value();
588
+ });
589
+ }
590
+ /**
591
+ * Search for text/pattern inside workspace project files
592
+ * Search for text/pattern in files
593
+ */
594
+ workspaceControllerFindInFilesRaw(requestParameters, initOverrides) {
595
+ return __awaiter(this, void 0, void 0, function* () {
596
+ if (requestParameters['workspaceId'] == null) {
597
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerFindInFiles().');
598
+ }
599
+ if (requestParameters['projectId'] == null) {
600
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerFindInFiles().');
601
+ }
602
+ if (requestParameters['path'] == null) {
603
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerFindInFiles().');
604
+ }
605
+ if (requestParameters['pattern'] == null) {
606
+ throw new runtime.RequiredError('pattern', 'Required parameter "pattern" was null or undefined when calling workspaceControllerFindInFiles().');
607
+ }
608
+ const queryParameters = {};
609
+ if (requestParameters['path'] != null) {
610
+ queryParameters['path'] = requestParameters['path'];
611
+ }
612
+ if (requestParameters['pattern'] != null) {
613
+ queryParameters['pattern'] = requestParameters['pattern'];
614
+ }
615
+ const headerParameters = {};
616
+ if (this.configuration && this.configuration.accessToken) {
617
+ // oauth required
618
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
619
+ }
620
+ const response = yield this.request({
621
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/find`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
622
+ method: 'GET',
623
+ headers: headerParameters,
624
+ query: queryParameters,
625
+ }, initOverrides);
626
+ return new runtime.VoidApiResponse(response);
627
+ });
628
+ }
629
+ /**
630
+ * Search for text/pattern inside workspace project files
631
+ * Search for text/pattern in files
632
+ */
633
+ workspaceControllerFindInFiles(requestParameters, initOverrides) {
634
+ return __awaiter(this, void 0, void 0, function* () {
635
+ yield this.workspaceControllerFindInFilesRaw(requestParameters, initOverrides);
636
+ });
637
+ }
638
+ /**
639
+ * Get file info inside workspace project
640
+ * Get file info
641
+ */
642
+ workspaceControllerGetFileInfoRaw(requestParameters, initOverrides) {
643
+ return __awaiter(this, void 0, void 0, function* () {
644
+ if (requestParameters['workspaceId'] == null) {
645
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGetFileInfo().');
646
+ }
647
+ if (requestParameters['projectId'] == null) {
648
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGetFileInfo().');
649
+ }
650
+ if (requestParameters['path'] == null) {
651
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerGetFileInfo().');
652
+ }
653
+ const queryParameters = {};
654
+ if (requestParameters['path'] != null) {
655
+ queryParameters['path'] = requestParameters['path'];
656
+ }
657
+ const headerParameters = {};
658
+ if (this.configuration && this.configuration.accessToken) {
659
+ // oauth required
660
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
661
+ }
662
+ const response = yield this.request({
663
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/info`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
664
+ method: 'GET',
665
+ headers: headerParameters,
666
+ query: queryParameters,
667
+ }, initOverrides);
668
+ return new runtime.VoidApiResponse(response);
669
+ });
670
+ }
671
+ /**
672
+ * Get file info inside workspace project
673
+ * Get file info
674
+ */
675
+ workspaceControllerGetFileInfo(requestParameters, initOverrides) {
676
+ return __awaiter(this, void 0, void 0, function* () {
677
+ yield this.workspaceControllerGetFileInfoRaw(requestParameters, initOverrides);
678
+ });
679
+ }
680
+ /**
681
+ * Get project directory
682
+ * Get project dir
683
+ */
684
+ workspaceControllerGetProjectDirRaw(requestParameters, initOverrides) {
685
+ return __awaiter(this, void 0, void 0, function* () {
686
+ if (requestParameters['workspaceId'] == null) {
687
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGetProjectDir().');
688
+ }
689
+ if (requestParameters['projectId'] == null) {
690
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGetProjectDir().');
691
+ }
692
+ const queryParameters = {};
693
+ const headerParameters = {};
694
+ if (this.configuration && this.configuration.accessToken) {
695
+ // oauth required
696
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
697
+ }
698
+ const response = yield this.request({
699
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/project-dir`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
700
+ method: 'GET',
701
+ headers: headerParameters,
702
+ query: queryParameters,
703
+ }, initOverrides);
704
+ return new runtime.VoidApiResponse(response);
705
+ });
706
+ }
707
+ /**
708
+ * Get project directory
709
+ * Get project dir
710
+ */
711
+ workspaceControllerGetProjectDir(requestParameters, initOverrides) {
712
+ return __awaiter(this, void 0, void 0, function* () {
713
+ yield this.workspaceControllerGetProjectDirRaw(requestParameters, initOverrides);
714
+ });
715
+ }
716
+ /**
717
+ */
718
+ workspaceControllerGetWorkspaceRaw(requestParameters, initOverrides) {
719
+ return __awaiter(this, void 0, void 0, function* () {
720
+ if (requestParameters['workspaceId'] == null) {
721
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGetWorkspace().');
722
+ }
723
+ const queryParameters = {};
724
+ if (requestParameters['verbose'] != null) {
725
+ queryParameters['verbose'] = requestParameters['verbose'];
726
+ }
727
+ const headerParameters = {};
728
+ if (this.configuration && this.configuration.accessToken) {
729
+ // oauth required
730
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
731
+ }
732
+ const response = yield this.request({
733
+ path: `/workspace/{workspaceId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
734
+ method: 'GET',
735
+ headers: headerParameters,
736
+ query: queryParameters,
737
+ }, initOverrides);
738
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceDtoFromJSON)(jsonValue));
739
+ });
740
+ }
741
+ /**
742
+ */
743
+ workspaceControllerGetWorkspace(requestParameters, initOverrides) {
744
+ return __awaiter(this, void 0, void 0, function* () {
745
+ const response = yield this.workspaceControllerGetWorkspaceRaw(requestParameters, initOverrides);
746
+ return yield response.value();
747
+ });
748
+ }
749
+ /**
750
+ * Add files to git commit
751
+ * Add files
752
+ */
753
+ workspaceControllerGitAddFilesRaw(requestParameters, initOverrides) {
754
+ return __awaiter(this, void 0, void 0, function* () {
755
+ if (requestParameters['workspaceId'] == null) {
756
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitAddFiles().');
757
+ }
758
+ if (requestParameters['projectId'] == null) {
759
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitAddFiles().');
760
+ }
761
+ if (requestParameters['gitAddRequestDto'] == null) {
762
+ throw new runtime.RequiredError('gitAddRequestDto', 'Required parameter "gitAddRequestDto" was null or undefined when calling workspaceControllerGitAddFiles().');
763
+ }
764
+ const queryParameters = {};
765
+ const headerParameters = {};
766
+ headerParameters['Content-Type'] = 'application/json';
767
+ if (this.configuration && this.configuration.accessToken) {
768
+ // oauth required
769
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
770
+ }
771
+ const response = yield this.request({
772
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/add`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
773
+ method: 'POST',
774
+ headers: headerParameters,
775
+ query: queryParameters,
776
+ body: (0, index_1.GitAddRequestDtoToJSON)(requestParameters['gitAddRequestDto']),
777
+ }, initOverrides);
778
+ return new runtime.VoidApiResponse(response);
779
+ });
780
+ }
781
+ /**
782
+ * Add files to git commit
783
+ * Add files
784
+ */
785
+ workspaceControllerGitAddFiles(requestParameters, initOverrides) {
786
+ return __awaiter(this, void 0, void 0, function* () {
787
+ yield this.workspaceControllerGitAddFilesRaw(requestParameters, initOverrides);
788
+ });
789
+ }
790
+ /**
791
+ * Get branch list from git repository
792
+ * Get branch list
793
+ */
794
+ workspaceControllerGitBranchListRaw(requestParameters, initOverrides) {
795
+ return __awaiter(this, void 0, void 0, function* () {
796
+ if (requestParameters['workspaceId'] == null) {
797
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitBranchList().');
798
+ }
799
+ if (requestParameters['projectId'] == null) {
800
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitBranchList().');
801
+ }
802
+ if (requestParameters['path'] == null) {
803
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerGitBranchList().');
804
+ }
805
+ const queryParameters = {};
806
+ if (requestParameters['path'] != null) {
807
+ queryParameters['path'] = requestParameters['path'];
808
+ }
809
+ const headerParameters = {};
810
+ if (this.configuration && this.configuration.accessToken) {
811
+ // oauth required
812
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
813
+ }
814
+ const response = yield this.request({
815
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/branches`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
816
+ method: 'GET',
817
+ headers: headerParameters,
818
+ query: queryParameters,
819
+ }, initOverrides);
820
+ return new runtime.VoidApiResponse(response);
821
+ });
822
+ }
823
+ /**
824
+ * Get branch list from git repository
825
+ * Get branch list
826
+ */
827
+ workspaceControllerGitBranchList(requestParameters, initOverrides) {
828
+ return __awaiter(this, void 0, void 0, function* () {
829
+ yield this.workspaceControllerGitBranchListRaw(requestParameters, initOverrides);
830
+ });
831
+ }
832
+ /**
833
+ * Clone git repository
834
+ * Clone repository
835
+ */
836
+ workspaceControllerGitCloneRepositoryRaw(requestParameters, initOverrides) {
837
+ return __awaiter(this, void 0, void 0, function* () {
838
+ if (requestParameters['workspaceId'] == null) {
839
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCloneRepository().');
840
+ }
841
+ if (requestParameters['projectId'] == null) {
842
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCloneRepository().');
843
+ }
844
+ if (requestParameters['gitCloneRequestDto'] == null) {
845
+ throw new runtime.RequiredError('gitCloneRequestDto', 'Required parameter "gitCloneRequestDto" was null or undefined when calling workspaceControllerGitCloneRepository().');
846
+ }
847
+ const queryParameters = {};
848
+ const headerParameters = {};
849
+ headerParameters['Content-Type'] = 'application/json';
850
+ if (this.configuration && this.configuration.accessToken) {
851
+ // oauth required
852
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
853
+ }
854
+ const response = yield this.request({
855
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/clone`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
856
+ method: 'POST',
857
+ headers: headerParameters,
858
+ query: queryParameters,
859
+ body: (0, index_1.GitCloneRequestDtoToJSON)(requestParameters['gitCloneRequestDto']),
860
+ }, initOverrides);
861
+ return new runtime.VoidApiResponse(response);
862
+ });
863
+ }
864
+ /**
865
+ * Clone git repository
866
+ * Clone repository
867
+ */
868
+ workspaceControllerGitCloneRepository(requestParameters, initOverrides) {
869
+ return __awaiter(this, void 0, void 0, function* () {
870
+ yield this.workspaceControllerGitCloneRepositoryRaw(requestParameters, initOverrides);
871
+ });
872
+ }
873
+ /**
874
+ * Commit changes to git repository
875
+ * Commit changes
876
+ */
877
+ workspaceControllerGitCommitChangesRaw(requestParameters, initOverrides) {
878
+ return __awaiter(this, void 0, void 0, function* () {
879
+ if (requestParameters['workspaceId'] == null) {
880
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCommitChanges().');
881
+ }
882
+ if (requestParameters['projectId'] == null) {
883
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCommitChanges().');
884
+ }
885
+ if (requestParameters['gitCommitRequestDto'] == null) {
886
+ throw new runtime.RequiredError('gitCommitRequestDto', 'Required parameter "gitCommitRequestDto" was null or undefined when calling workspaceControllerGitCommitChanges().');
887
+ }
888
+ const queryParameters = {};
889
+ const headerParameters = {};
890
+ headerParameters['Content-Type'] = 'application/json';
891
+ if (this.configuration && this.configuration.accessToken) {
892
+ // oauth required
893
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
894
+ }
895
+ const response = yield this.request({
896
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/commit`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
897
+ method: 'POST',
898
+ headers: headerParameters,
899
+ query: queryParameters,
900
+ body: (0, index_1.GitCommitRequestDtoToJSON)(requestParameters['gitCommitRequestDto']),
901
+ }, initOverrides);
902
+ return new runtime.VoidApiResponse(response);
903
+ });
904
+ }
905
+ /**
906
+ * Commit changes to git repository
907
+ * Commit changes
908
+ */
909
+ workspaceControllerGitCommitChanges(requestParameters, initOverrides) {
910
+ return __awaiter(this, void 0, void 0, function* () {
911
+ yield this.workspaceControllerGitCommitChangesRaw(requestParameters, initOverrides);
912
+ });
913
+ }
914
+ /**
915
+ * Get commit history from git repository
916
+ * Get commit history
917
+ */
918
+ workspaceControllerGitCommitHistoryRaw(requestParameters, initOverrides) {
919
+ return __awaiter(this, void 0, void 0, function* () {
920
+ if (requestParameters['workspaceId'] == null) {
921
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCommitHistory().');
922
+ }
923
+ if (requestParameters['projectId'] == null) {
924
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCommitHistory().');
925
+ }
926
+ if (requestParameters['path'] == null) {
927
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerGitCommitHistory().');
928
+ }
929
+ const queryParameters = {};
930
+ if (requestParameters['path'] != null) {
931
+ queryParameters['path'] = requestParameters['path'];
932
+ }
933
+ const headerParameters = {};
934
+ if (this.configuration && this.configuration.accessToken) {
935
+ // oauth required
936
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
937
+ }
938
+ const response = yield this.request({
939
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/history`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
940
+ method: 'GET',
941
+ headers: headerParameters,
942
+ query: queryParameters,
943
+ }, initOverrides);
944
+ return new runtime.VoidApiResponse(response);
945
+ });
946
+ }
947
+ /**
948
+ * Get commit history from git repository
949
+ * Get commit history
950
+ */
951
+ workspaceControllerGitCommitHistory(requestParameters, initOverrides) {
952
+ return __awaiter(this, void 0, void 0, function* () {
953
+ yield this.workspaceControllerGitCommitHistoryRaw(requestParameters, initOverrides);
954
+ });
955
+ }
956
+ /**
957
+ * Create branch on git repository
958
+ * Create branch
959
+ */
960
+ workspaceControllerGitCreateBranchRaw(requestParameters, initOverrides) {
961
+ return __awaiter(this, void 0, void 0, function* () {
962
+ if (requestParameters['workspaceId'] == null) {
963
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitCreateBranch().');
964
+ }
965
+ if (requestParameters['projectId'] == null) {
966
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitCreateBranch().');
967
+ }
968
+ if (requestParameters['gitBranchRequestDto'] == null) {
969
+ throw new runtime.RequiredError('gitBranchRequestDto', 'Required parameter "gitBranchRequestDto" was null or undefined when calling workspaceControllerGitCreateBranch().');
970
+ }
971
+ const queryParameters = {};
972
+ const headerParameters = {};
973
+ headerParameters['Content-Type'] = 'application/json';
974
+ if (this.configuration && this.configuration.accessToken) {
975
+ // oauth required
976
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
977
+ }
978
+ const response = yield this.request({
979
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/branches`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
980
+ method: 'POST',
981
+ headers: headerParameters,
982
+ query: queryParameters,
983
+ body: (0, index_1.GitBranchRequestDtoToJSON)(requestParameters['gitBranchRequestDto']),
984
+ }, initOverrides);
985
+ return new runtime.VoidApiResponse(response);
986
+ });
987
+ }
988
+ /**
989
+ * Create branch on git repository
990
+ * Create branch
991
+ */
992
+ workspaceControllerGitCreateBranch(requestParameters, initOverrides) {
993
+ return __awaiter(this, void 0, void 0, function* () {
994
+ yield this.workspaceControllerGitCreateBranchRaw(requestParameters, initOverrides);
995
+ });
996
+ }
997
+ /**
998
+ * Pull changes from remote
999
+ * Pull changes
1000
+ */
1001
+ workspaceControllerGitPullChangesRaw(requestParameters, initOverrides) {
1002
+ return __awaiter(this, void 0, void 0, function* () {
1003
+ if (requestParameters['workspaceId'] == null) {
1004
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitPullChanges().');
1005
+ }
1006
+ if (requestParameters['projectId'] == null) {
1007
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitPullChanges().');
1008
+ }
1009
+ if (requestParameters['gitRepoRequestDto'] == null) {
1010
+ throw new runtime.RequiredError('gitRepoRequestDto', 'Required parameter "gitRepoRequestDto" was null or undefined when calling workspaceControllerGitPullChanges().');
1011
+ }
1012
+ const queryParameters = {};
1013
+ const headerParameters = {};
1014
+ headerParameters['Content-Type'] = 'application/json';
1015
+ if (this.configuration && this.configuration.accessToken) {
1016
+ // oauth required
1017
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1018
+ }
1019
+ const response = yield this.request({
1020
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/pull`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1021
+ method: 'POST',
1022
+ headers: headerParameters,
1023
+ query: queryParameters,
1024
+ body: (0, index_1.GitRepoRequestDtoToJSON)(requestParameters['gitRepoRequestDto']),
1025
+ }, initOverrides);
1026
+ return new runtime.VoidApiResponse(response);
1027
+ });
1028
+ }
1029
+ /**
1030
+ * Pull changes from remote
1031
+ * Pull changes
1032
+ */
1033
+ workspaceControllerGitPullChanges(requestParameters, initOverrides) {
1034
+ return __awaiter(this, void 0, void 0, function* () {
1035
+ yield this.workspaceControllerGitPullChangesRaw(requestParameters, initOverrides);
1036
+ });
1037
+ }
1038
+ /**
1039
+ * Push changes to remote
1040
+ * Push changes
1041
+ */
1042
+ workspaceControllerGitPushChangesRaw(requestParameters, initOverrides) {
1043
+ return __awaiter(this, void 0, void 0, function* () {
1044
+ if (requestParameters['workspaceId'] == null) {
1045
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitPushChanges().');
1046
+ }
1047
+ if (requestParameters['projectId'] == null) {
1048
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitPushChanges().');
1049
+ }
1050
+ if (requestParameters['gitRepoRequestDto'] == null) {
1051
+ throw new runtime.RequiredError('gitRepoRequestDto', 'Required parameter "gitRepoRequestDto" was null or undefined when calling workspaceControllerGitPushChanges().');
1052
+ }
1053
+ const queryParameters = {};
1054
+ const headerParameters = {};
1055
+ headerParameters['Content-Type'] = 'application/json';
1056
+ if (this.configuration && this.configuration.accessToken) {
1057
+ // oauth required
1058
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1059
+ }
1060
+ const response = yield this.request({
1061
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/push`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1062
+ method: 'POST',
1063
+ headers: headerParameters,
1064
+ query: queryParameters,
1065
+ body: (0, index_1.GitRepoRequestDtoToJSON)(requestParameters['gitRepoRequestDto']),
1066
+ }, initOverrides);
1067
+ return new runtime.VoidApiResponse(response);
1068
+ });
1069
+ }
1070
+ /**
1071
+ * Push changes to remote
1072
+ * Push changes
1073
+ */
1074
+ workspaceControllerGitPushChanges(requestParameters, initOverrides) {
1075
+ return __awaiter(this, void 0, void 0, function* () {
1076
+ yield this.workspaceControllerGitPushChangesRaw(requestParameters, initOverrides);
1077
+ });
1078
+ }
1079
+ /**
1080
+ * Get status from git repository
1081
+ * Get git status
1082
+ */
1083
+ workspaceControllerGitStatusRaw(requestParameters, initOverrides) {
1084
+ return __awaiter(this, void 0, void 0, function* () {
1085
+ if (requestParameters['workspaceId'] == null) {
1086
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerGitStatus().');
1087
+ }
1088
+ if (requestParameters['projectId'] == null) {
1089
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerGitStatus().');
1090
+ }
1091
+ if (requestParameters['path'] == null) {
1092
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerGitStatus().');
1093
+ }
1094
+ const queryParameters = {};
1095
+ if (requestParameters['path'] != null) {
1096
+ queryParameters['path'] = requestParameters['path'];
1097
+ }
1098
+ const headerParameters = {};
1099
+ if (this.configuration && this.configuration.accessToken) {
1100
+ // oauth required
1101
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1102
+ }
1103
+ const response = yield this.request({
1104
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/git/status`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1105
+ method: 'GET',
1106
+ headers: headerParameters,
1107
+ query: queryParameters,
1108
+ }, initOverrides);
1109
+ return new runtime.VoidApiResponse(response);
1110
+ });
1111
+ }
1112
+ /**
1113
+ * Get status from git repository
1114
+ * Get git status
1115
+ */
1116
+ workspaceControllerGitStatus(requestParameters, initOverrides) {
1117
+ return __awaiter(this, void 0, void 0, function* () {
1118
+ yield this.workspaceControllerGitStatusRaw(requestParameters, initOverrides);
1119
+ });
1120
+ }
1121
+ /**
1122
+ * List files inside workspace project
1123
+ * List files
1124
+ */
1125
+ workspaceControllerListFilesRaw(requestParameters, initOverrides) {
1126
+ return __awaiter(this, void 0, void 0, function* () {
1127
+ if (requestParameters['workspaceId'] == null) {
1128
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerListFiles().');
1129
+ }
1130
+ if (requestParameters['projectId'] == null) {
1131
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerListFiles().');
1132
+ }
1133
+ const queryParameters = {};
1134
+ if (requestParameters['path'] != null) {
1135
+ queryParameters['path'] = requestParameters['path'];
1136
+ }
1137
+ const headerParameters = {};
1138
+ if (this.configuration && this.configuration.accessToken) {
1139
+ // oauth required
1140
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1141
+ }
1142
+ const response = yield this.request({
1143
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1144
+ method: 'GET',
1145
+ headers: headerParameters,
1146
+ query: queryParameters,
1147
+ }, initOverrides);
1148
+ return new runtime.VoidApiResponse(response);
1149
+ });
1150
+ }
1151
+ /**
1152
+ * List files inside workspace project
1153
+ * List files
1154
+ */
1155
+ workspaceControllerListFiles(requestParameters, initOverrides) {
1156
+ return __awaiter(this, void 0, void 0, function* () {
1157
+ yield this.workspaceControllerListFilesRaw(requestParameters, initOverrides);
1158
+ });
1159
+ }
1160
+ /**
1161
+ */
1162
+ workspaceControllerListWorkspacesRaw(requestParameters, initOverrides) {
1163
+ return __awaiter(this, void 0, void 0, function* () {
1164
+ const queryParameters = {};
1165
+ if (requestParameters['verbose'] != null) {
1166
+ queryParameters['verbose'] = requestParameters['verbose'];
1167
+ }
1168
+ const headerParameters = {};
1169
+ if (this.configuration && this.configuration.accessToken) {
1170
+ // oauth required
1171
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1172
+ }
1173
+ const response = yield this.request({
1174
+ path: `/workspace`,
1175
+ method: 'GET',
1176
+ headers: headerParameters,
1177
+ query: queryParameters,
1178
+ }, initOverrides);
1179
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.WorkspaceDtoFromJSON));
1180
+ });
1181
+ }
1182
+ /**
1183
+ */
1184
+ workspaceControllerListWorkspaces() {
1185
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
1186
+ const response = yield this.workspaceControllerListWorkspacesRaw(requestParameters, initOverrides);
1187
+ return yield response.value();
1188
+ });
1189
+ }
1190
+ /**
1191
+ * Move file inside workspace project
1192
+ * Move file
1193
+ */
1194
+ workspaceControllerMoveFileRaw(requestParameters, initOverrides) {
1195
+ return __awaiter(this, void 0, void 0, function* () {
1196
+ if (requestParameters['workspaceId'] == null) {
1197
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerMoveFile().');
1198
+ }
1199
+ if (requestParameters['projectId'] == null) {
1200
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerMoveFile().');
1201
+ }
1202
+ if (requestParameters['source'] == null) {
1203
+ throw new runtime.RequiredError('source', 'Required parameter "source" was null or undefined when calling workspaceControllerMoveFile().');
1204
+ }
1205
+ if (requestParameters['destination'] == null) {
1206
+ throw new runtime.RequiredError('destination', 'Required parameter "destination" was null or undefined when calling workspaceControllerMoveFile().');
1207
+ }
1208
+ const queryParameters = {};
1209
+ if (requestParameters['source'] != null) {
1210
+ queryParameters['source'] = requestParameters['source'];
1211
+ }
1212
+ if (requestParameters['destination'] != null) {
1213
+ queryParameters['destination'] = requestParameters['destination'];
1214
+ }
1215
+ const headerParameters = {};
1216
+ if (this.configuration && this.configuration.accessToken) {
1217
+ // oauth required
1218
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1219
+ }
1220
+ const response = yield this.request({
1221
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/move`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1222
+ method: 'POST',
1223
+ headers: headerParameters,
1224
+ query: queryParameters,
1225
+ }, initOverrides);
1226
+ return new runtime.VoidApiResponse(response);
1227
+ });
1228
+ }
1229
+ /**
1230
+ * Move file inside workspace project
1231
+ * Move file
1232
+ */
1233
+ workspaceControllerMoveFile(requestParameters, initOverrides) {
1234
+ return __awaiter(this, void 0, void 0, function* () {
1235
+ yield this.workspaceControllerMoveFileRaw(requestParameters, initOverrides);
1236
+ });
1237
+ }
1238
+ /**
1239
+ */
1240
+ workspaceControllerRemoveWorkspaceRaw(requestParameters, initOverrides) {
1241
+ return __awaiter(this, void 0, void 0, function* () {
1242
+ if (requestParameters['workspaceId'] == null) {
1243
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerRemoveWorkspace().');
1244
+ }
1245
+ if (requestParameters['force'] == null) {
1246
+ throw new runtime.RequiredError('force', 'Required parameter "force" was null or undefined when calling workspaceControllerRemoveWorkspace().');
1247
+ }
1248
+ const queryParameters = {};
1249
+ if (requestParameters['force'] != null) {
1250
+ queryParameters['force'] = requestParameters['force'];
1251
+ }
1252
+ const headerParameters = {};
1253
+ if (this.configuration && this.configuration.accessToken) {
1254
+ // oauth required
1255
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1256
+ }
1257
+ const response = yield this.request({
1258
+ path: `/workspace/{workspaceId}`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1259
+ method: 'DELETE',
1260
+ headers: headerParameters,
1261
+ query: queryParameters,
1262
+ }, initOverrides);
1263
+ return new runtime.VoidApiResponse(response);
1264
+ });
1265
+ }
1266
+ /**
1267
+ */
1268
+ workspaceControllerRemoveWorkspace(requestParameters, initOverrides) {
1269
+ return __awaiter(this, void 0, void 0, function* () {
1270
+ yield this.workspaceControllerRemoveWorkspaceRaw(requestParameters, initOverrides);
1271
+ });
1272
+ }
1273
+ /**
1274
+ * Replace text/pattern in multiple files inside workspace project
1275
+ * Replace in files
1276
+ */
1277
+ workspaceControllerReplaceInFilesRaw(requestParameters, initOverrides) {
1278
+ return __awaiter(this, void 0, void 0, function* () {
1279
+ if (requestParameters['workspaceId'] == null) {
1280
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerReplaceInFiles().');
1281
+ }
1282
+ if (requestParameters['projectId'] == null) {
1283
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerReplaceInFiles().');
1284
+ }
1285
+ if (requestParameters['replaceRequestDto'] == null) {
1286
+ throw new runtime.RequiredError('replaceRequestDto', 'Required parameter "replaceRequestDto" was null or undefined when calling workspaceControllerReplaceInFiles().');
1287
+ }
1288
+ const queryParameters = {};
1289
+ const headerParameters = {};
1290
+ headerParameters['Content-Type'] = 'application/json';
1291
+ if (this.configuration && this.configuration.accessToken) {
1292
+ // oauth required
1293
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1294
+ }
1295
+ const response = yield this.request({
1296
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/replace`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1297
+ method: 'POST',
1298
+ headers: headerParameters,
1299
+ query: queryParameters,
1300
+ body: (0, index_1.ReplaceRequestDtoToJSON)(requestParameters['replaceRequestDto']),
1301
+ }, initOverrides);
1302
+ return new runtime.VoidApiResponse(response);
1303
+ });
1304
+ }
1305
+ /**
1306
+ * Replace text/pattern in multiple files inside workspace project
1307
+ * Replace in files
1308
+ */
1309
+ workspaceControllerReplaceInFiles(requestParameters, initOverrides) {
1310
+ return __awaiter(this, void 0, void 0, function* () {
1311
+ yield this.workspaceControllerReplaceInFilesRaw(requestParameters, initOverrides);
1312
+ });
1313
+ }
1314
+ /**
1315
+ * Replace all labels for a workspace. Existing labels will be removed.
1316
+ * Replace workspace labels
1317
+ */
1318
+ workspaceControllerReplaceLabelsRaw(requestParameters, initOverrides) {
1319
+ return __awaiter(this, void 0, void 0, function* () {
1320
+ if (requestParameters['workspaceId'] == null) {
1321
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerReplaceLabels().');
1322
+ }
1323
+ if (requestParameters['workspaceLabelsDto'] == null) {
1324
+ throw new runtime.RequiredError('workspaceLabelsDto', 'Required parameter "workspaceLabelsDto" was null or undefined when calling workspaceControllerReplaceLabels().');
1325
+ }
1326
+ const queryParameters = {};
1327
+ const headerParameters = {};
1328
+ headerParameters['Content-Type'] = 'application/json';
1329
+ if (this.configuration && this.configuration.accessToken) {
1330
+ // oauth required
1331
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1332
+ }
1333
+ const response = yield this.request({
1334
+ path: `/workspace/{workspaceId}/labels`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1335
+ method: 'PUT',
1336
+ headers: headerParameters,
1337
+ query: queryParameters,
1338
+ body: (0, index_1.WorkspaceLabelsDtoToJSON)(requestParameters['workspaceLabelsDto']),
1339
+ }, initOverrides);
1340
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceLabelsDtoFromJSON)(jsonValue));
1341
+ });
1342
+ }
1343
+ /**
1344
+ * Replace all labels for a workspace. Existing labels will be removed.
1345
+ * Replace workspace labels
1346
+ */
1347
+ workspaceControllerReplaceLabels(requestParameters, initOverrides) {
1348
+ return __awaiter(this, void 0, void 0, function* () {
1349
+ const response = yield this.workspaceControllerReplaceLabelsRaw(requestParameters, initOverrides);
1350
+ return yield response.value();
1351
+ });
1352
+ }
1353
+ /**
1354
+ * Search for files inside workspace project
1355
+ * Search files
1356
+ */
1357
+ workspaceControllerSearchFilesRaw(requestParameters, initOverrides) {
1358
+ return __awaiter(this, void 0, void 0, function* () {
1359
+ if (requestParameters['workspaceId'] == null) {
1360
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerSearchFiles().');
1361
+ }
1362
+ if (requestParameters['projectId'] == null) {
1363
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerSearchFiles().');
1364
+ }
1365
+ if (requestParameters['path'] == null) {
1366
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerSearchFiles().');
1367
+ }
1368
+ if (requestParameters['pattern'] == null) {
1369
+ throw new runtime.RequiredError('pattern', 'Required parameter "pattern" was null or undefined when calling workspaceControllerSearchFiles().');
1370
+ }
1371
+ const queryParameters = {};
1372
+ if (requestParameters['path'] != null) {
1373
+ queryParameters['path'] = requestParameters['path'];
1374
+ }
1375
+ if (requestParameters['pattern'] != null) {
1376
+ queryParameters['pattern'] = requestParameters['pattern'];
1377
+ }
1378
+ const headerParameters = {};
1379
+ if (this.configuration && this.configuration.accessToken) {
1380
+ // oauth required
1381
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1382
+ }
1383
+ const response = yield this.request({
1384
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/search`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1385
+ method: 'GET',
1386
+ headers: headerParameters,
1387
+ query: queryParameters,
1388
+ }, initOverrides);
1389
+ return new runtime.VoidApiResponse(response);
1390
+ });
1391
+ }
1392
+ /**
1393
+ * Search for files inside workspace project
1394
+ * Search files
1395
+ */
1396
+ workspaceControllerSearchFiles(requestParameters, initOverrides) {
1397
+ return __awaiter(this, void 0, void 0, function* () {
1398
+ yield this.workspaceControllerSearchFilesRaw(requestParameters, initOverrides);
1399
+ });
1400
+ }
1401
+ /**
1402
+ * Set file owner/group/permissions inside workspace project
1403
+ * Set file permissions
1404
+ */
1405
+ workspaceControllerSetFilePermissionsRaw(requestParameters, initOverrides) {
1406
+ return __awaiter(this, void 0, void 0, function* () {
1407
+ if (requestParameters['workspaceId'] == null) {
1408
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerSetFilePermissions().');
1409
+ }
1410
+ if (requestParameters['projectId'] == null) {
1411
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerSetFilePermissions().');
1412
+ }
1413
+ if (requestParameters['path'] == null) {
1414
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerSetFilePermissions().');
1415
+ }
1416
+ if (requestParameters['owner'] == null) {
1417
+ throw new runtime.RequiredError('owner', 'Required parameter "owner" was null or undefined when calling workspaceControllerSetFilePermissions().');
1418
+ }
1419
+ if (requestParameters['group'] == null) {
1420
+ throw new runtime.RequiredError('group', 'Required parameter "group" was null or undefined when calling workspaceControllerSetFilePermissions().');
1421
+ }
1422
+ if (requestParameters['mode'] == null) {
1423
+ throw new runtime.RequiredError('mode', 'Required parameter "mode" was null or undefined when calling workspaceControllerSetFilePermissions().');
1424
+ }
1425
+ const queryParameters = {};
1426
+ if (requestParameters['path'] != null) {
1427
+ queryParameters['path'] = requestParameters['path'];
1428
+ }
1429
+ if (requestParameters['owner'] != null) {
1430
+ queryParameters['owner'] = requestParameters['owner'];
1431
+ }
1432
+ if (requestParameters['group'] != null) {
1433
+ queryParameters['group'] = requestParameters['group'];
1434
+ }
1435
+ if (requestParameters['mode'] != null) {
1436
+ queryParameters['mode'] = requestParameters['mode'];
1437
+ }
1438
+ const headerParameters = {};
1439
+ if (this.configuration && this.configuration.accessToken) {
1440
+ // oauth required
1441
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1442
+ }
1443
+ const response = yield this.request({
1444
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/permissions`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1445
+ method: 'POST',
1446
+ headers: headerParameters,
1447
+ query: queryParameters,
1448
+ }, initOverrides);
1449
+ return new runtime.VoidApiResponse(response);
1450
+ });
1451
+ }
1452
+ /**
1453
+ * Set file owner/group/permissions inside workspace project
1454
+ * Set file permissions
1455
+ */
1456
+ workspaceControllerSetFilePermissions(requestParameters, initOverrides) {
1457
+ return __awaiter(this, void 0, void 0, function* () {
1458
+ yield this.workspaceControllerSetFilePermissionsRaw(requestParameters, initOverrides);
1459
+ });
1460
+ }
1461
+ /**
1462
+ */
1463
+ workspaceControllerStartProjectRaw(requestParameters, initOverrides) {
1464
+ return __awaiter(this, void 0, void 0, function* () {
1465
+ if (requestParameters['workspaceId'] == null) {
1466
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStartProject().');
1467
+ }
1468
+ if (requestParameters['projectId'] == null) {
1469
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerStartProject().');
1470
+ }
1471
+ const queryParameters = {};
1472
+ const headerParameters = {};
1473
+ if (this.configuration && this.configuration.accessToken) {
1474
+ // oauth required
1475
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1476
+ }
1477
+ const response = yield this.request({
1478
+ path: `/workspace/{workspaceId}/{projectId}/start`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1479
+ method: 'POST',
1480
+ headers: headerParameters,
1481
+ query: queryParameters,
1482
+ }, initOverrides);
1483
+ return new runtime.VoidApiResponse(response);
1484
+ });
1485
+ }
1486
+ /**
1487
+ */
1488
+ workspaceControllerStartProject(requestParameters, initOverrides) {
1489
+ return __awaiter(this, void 0, void 0, function* () {
1490
+ yield this.workspaceControllerStartProjectRaw(requestParameters, initOverrides);
1491
+ });
1492
+ }
1493
+ /**
1494
+ */
1495
+ workspaceControllerStartWorkspaceRaw(requestParameters, initOverrides) {
1496
+ return __awaiter(this, void 0, void 0, function* () {
1497
+ if (requestParameters['workspaceId'] == null) {
1498
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStartWorkspace().');
1499
+ }
1500
+ const queryParameters = {};
1501
+ const headerParameters = {};
1502
+ if (this.configuration && this.configuration.accessToken) {
1503
+ // oauth required
1504
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1505
+ }
1506
+ const response = yield this.request({
1507
+ path: `/workspace/{workspaceId}/start`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1508
+ method: 'POST',
1509
+ headers: headerParameters,
1510
+ query: queryParameters,
1511
+ }, initOverrides);
1512
+ return new runtime.VoidApiResponse(response);
1513
+ });
1514
+ }
1515
+ /**
1516
+ */
1517
+ workspaceControllerStartWorkspace(requestParameters, initOverrides) {
1518
+ return __awaiter(this, void 0, void 0, function* () {
1519
+ yield this.workspaceControllerStartWorkspaceRaw(requestParameters, initOverrides);
1520
+ });
1521
+ }
1522
+ /**
1523
+ */
1524
+ workspaceControllerStopProjectRaw(requestParameters, initOverrides) {
1525
+ return __awaiter(this, void 0, void 0, function* () {
1526
+ if (requestParameters['workspaceId'] == null) {
1527
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStopProject().');
1528
+ }
1529
+ if (requestParameters['projectId'] == null) {
1530
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerStopProject().');
1531
+ }
1532
+ const queryParameters = {};
1533
+ const headerParameters = {};
1534
+ if (this.configuration && this.configuration.accessToken) {
1535
+ // oauth required
1536
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1537
+ }
1538
+ const response = yield this.request({
1539
+ path: `/workspace/{workspaceId}/{projectId}/stop`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1540
+ method: 'POST',
1541
+ headers: headerParameters,
1542
+ query: queryParameters,
1543
+ }, initOverrides);
1544
+ return new runtime.VoidApiResponse(response);
1545
+ });
1546
+ }
1547
+ /**
1548
+ */
1549
+ workspaceControllerStopProject(requestParameters, initOverrides) {
1550
+ return __awaiter(this, void 0, void 0, function* () {
1551
+ yield this.workspaceControllerStopProjectRaw(requestParameters, initOverrides);
1552
+ });
1553
+ }
1554
+ /**
1555
+ */
1556
+ workspaceControllerStopWorkspaceRaw(requestParameters, initOverrides) {
1557
+ return __awaiter(this, void 0, void 0, function* () {
1558
+ if (requestParameters['workspaceId'] == null) {
1559
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerStopWorkspace().');
1560
+ }
1561
+ const queryParameters = {};
1562
+ const headerParameters = {};
1563
+ if (this.configuration && this.configuration.accessToken) {
1564
+ // oauth required
1565
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1566
+ }
1567
+ const response = yield this.request({
1568
+ path: `/workspace/{workspaceId}/stop`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))),
1569
+ method: 'POST',
1570
+ headers: headerParameters,
1571
+ query: queryParameters,
1572
+ }, initOverrides);
1573
+ return new runtime.VoidApiResponse(response);
1574
+ });
1575
+ }
1576
+ /**
1577
+ */
1578
+ workspaceControllerStopWorkspace(requestParameters, initOverrides) {
1579
+ return __awaiter(this, void 0, void 0, function* () {
1580
+ yield this.workspaceControllerStopWorkspaceRaw(requestParameters, initOverrides);
1581
+ });
1582
+ }
1583
+ /**
1584
+ * Upload file inside workspace project
1585
+ * Upload file
1586
+ */
1587
+ workspaceControllerUploadFileRaw(requestParameters, initOverrides) {
1588
+ return __awaiter(this, void 0, void 0, function* () {
1589
+ if (requestParameters['workspaceId'] == null) {
1590
+ throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling workspaceControllerUploadFile().');
1591
+ }
1592
+ if (requestParameters['projectId'] == null) {
1593
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling workspaceControllerUploadFile().');
1594
+ }
1595
+ if (requestParameters['path'] == null) {
1596
+ throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling workspaceControllerUploadFile().');
1597
+ }
1598
+ const queryParameters = {};
1599
+ if (requestParameters['path'] != null) {
1600
+ queryParameters['path'] = requestParameters['path'];
1601
+ }
1602
+ const headerParameters = {};
1603
+ if (this.configuration && this.configuration.accessToken) {
1604
+ // oauth required
1605
+ headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2", ["openid", "profile", "email"]);
1606
+ }
1607
+ const consumes = [
1608
+ { contentType: 'multipart/form-data' },
1609
+ ];
1610
+ // @ts-ignore: canConsumeForm may be unused
1611
+ const canConsumeForm = runtime.canConsumeForm(consumes);
1612
+ let formParams;
1613
+ let useForm = false;
1614
+ // use FormData to transmit files using content-type "multipart/form-data"
1615
+ useForm = canConsumeForm;
1616
+ if (useForm) {
1617
+ formParams = new FormData();
1618
+ }
1619
+ else {
1620
+ formParams = new URLSearchParams();
1621
+ }
1622
+ if (requestParameters['file'] != null) {
1623
+ formParams.append('file', requestParameters['file']);
1624
+ }
1625
+ const response = yield this.request({
1626
+ path: `/workspace/{workspaceId}/{projectId}/toolbox/files/upload`.replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters['workspaceId']))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters['projectId']))),
1627
+ method: 'POST',
1628
+ headers: headerParameters,
1629
+ query: queryParameters,
1630
+ body: formParams,
1631
+ }, initOverrides);
1632
+ return new runtime.VoidApiResponse(response);
1633
+ });
1634
+ }
1635
+ /**
1636
+ * Upload file inside workspace project
1637
+ * Upload file
1638
+ */
1639
+ workspaceControllerUploadFile(requestParameters, initOverrides) {
1640
+ return __awaiter(this, void 0, void 0, function* () {
1641
+ yield this.workspaceControllerUploadFileRaw(requestParameters, initOverrides);
1642
+ });
1643
+ }
1644
+ }
1645
+ exports.DefaultApi = DefaultApi;