@daytonaio/api-client 0.17.0 → 0.18.0-alpha.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 (97) hide show
  1. package/.openapi-generator/FILES +4 -1
  2. package/api/volumes-api.ts +584 -0
  3. package/api/workspace-api.ts +9 -13
  4. package/api.ts +1 -0
  5. package/dist/api/api-keys-api.js +57 -40
  6. package/dist/api/docker-registry-api.js +93 -70
  7. package/dist/api/images-api.js +69 -50
  8. package/dist/api/nodes-api.js +45 -30
  9. package/dist/api/organizations-api.js +309 -250
  10. package/dist/api/preview-api.js +41 -26
  11. package/dist/api/toolbox-api.js +441 -360
  12. package/dist/api/users-api.js +53 -36
  13. package/dist/api/volumes-api.d.ts +227 -0
  14. package/dist/api/volumes-api.js +465 -0
  15. package/dist/api/workspace-api.d.ts +8 -9
  16. package/dist/api/workspace-api.js +170 -137
  17. package/dist/api.d.ts +1 -0
  18. package/dist/api.js +1 -0
  19. package/dist/common.js +34 -19
  20. package/dist/esm/api/api-keys-api.js +57 -40
  21. package/dist/esm/api/docker-registry-api.js +93 -70
  22. package/dist/esm/api/images-api.js +69 -50
  23. package/dist/esm/api/nodes-api.js +45 -30
  24. package/dist/esm/api/organizations-api.js +309 -250
  25. package/dist/esm/api/preview-api.js +41 -26
  26. package/dist/esm/api/toolbox-api.js +441 -360
  27. package/dist/esm/api/users-api.js +53 -36
  28. package/dist/esm/api/volumes-api.d.ts +227 -0
  29. package/dist/esm/api/volumes-api.js +458 -0
  30. package/dist/esm/api/workspace-api.d.ts +8 -9
  31. package/dist/esm/api/workspace-api.js +170 -137
  32. package/dist/esm/api.d.ts +1 -0
  33. package/dist/esm/api.js +1 -0
  34. package/dist/esm/common.js +34 -19
  35. package/dist/esm/models/api-key-list.d.ts +3 -0
  36. package/dist/esm/models/api-key-list.js +3 -0
  37. package/dist/esm/models/api-key-response.d.ts +3 -0
  38. package/dist/esm/models/api-key-response.js +3 -0
  39. package/dist/esm/models/create-api-key.d.ts +3 -0
  40. package/dist/esm/models/create-api-key.js +3 -0
  41. package/dist/esm/models/create-organization-role.d.ts +3 -0
  42. package/dist/esm/models/create-organization-role.js +3 -0
  43. package/dist/esm/models/{list-workspaces-labels-parameter.d.ts → create-volume.d.ts} +5 -7
  44. package/dist/esm/models/create-workspace.d.ts +7 -0
  45. package/dist/esm/models/index.d.ts +3 -1
  46. package/dist/esm/models/index.js +3 -1
  47. package/dist/esm/models/organization-role.d.ts +3 -0
  48. package/dist/esm/models/organization-role.js +3 -0
  49. package/dist/esm/models/update-organization-role.d.ts +3 -0
  50. package/dist/esm/models/update-organization-role.js +3 -0
  51. package/dist/esm/models/volume-dto.d.ts +70 -0
  52. package/dist/esm/models/volume-dto.js +22 -0
  53. package/dist/esm/models/volume-mount-dto.d.ts +30 -0
  54. package/dist/esm/models/volume-mount-dto.js +2 -0
  55. package/dist/esm/models/workspace-volume.d.ts +30 -0
  56. package/dist/esm/models/workspace-volume.js +14 -0
  57. package/dist/esm/models/workspace.d.ts +7 -0
  58. package/dist/models/api-key-list.d.ts +3 -0
  59. package/dist/models/api-key-list.js +3 -0
  60. package/dist/models/api-key-response.d.ts +3 -0
  61. package/dist/models/api-key-response.js +3 -0
  62. package/dist/models/create-api-key.d.ts +3 -0
  63. package/dist/models/create-api-key.js +3 -0
  64. package/dist/models/create-organization-role.d.ts +3 -0
  65. package/dist/models/create-organization-role.js +3 -0
  66. package/dist/models/{list-workspaces-labels-parameter.d.ts → create-volume.d.ts} +5 -7
  67. package/dist/models/create-workspace.d.ts +7 -0
  68. package/dist/models/index.d.ts +3 -1
  69. package/dist/models/index.js +3 -1
  70. package/dist/models/organization-role.d.ts +3 -0
  71. package/dist/models/organization-role.js +3 -0
  72. package/dist/models/update-organization-role.d.ts +3 -0
  73. package/dist/models/update-organization-role.js +3 -0
  74. package/dist/models/volume-dto.d.ts +70 -0
  75. package/dist/models/volume-dto.js +25 -0
  76. package/dist/models/volume-mount-dto.d.ts +30 -0
  77. package/dist/models/volume-mount-dto.js +3 -0
  78. package/dist/models/workspace-volume.d.ts +30 -0
  79. package/dist/models/workspace-volume.js +15 -0
  80. package/dist/models/workspace.d.ts +7 -0
  81. package/models/api-key-list.ts +3 -0
  82. package/models/api-key-response.ts +3 -0
  83. package/models/create-api-key.ts +3 -0
  84. package/models/create-organization-role.ts +3 -0
  85. package/models/{list-workspaces-labels-parameter.ts → create-volume.ts} +5 -5
  86. package/models/create-workspace.ts +10 -0
  87. package/models/index.ts +3 -1
  88. package/models/organization-role.ts +3 -0
  89. package/models/update-organization-role.ts +3 -0
  90. package/models/volume-dto.ts +75 -0
  91. package/models/volume-mount-dto.ts +33 -0
  92. package/models/workspace-volume.ts +33 -0
  93. package/models/workspace.ts +9 -0
  94. package/package.json +1 -1
  95. package/tsconfig.json +1 -1
  96. /package/dist/esm/models/{list-workspaces-labels-parameter.js → create-volume.js} +0 -0
  97. /package/dist/models/{list-workspaces-labels-parameter.js → create-volume.js} +0 -0
@@ -9,6 +9,7 @@ api/organizations-api.ts
9
9
  api/preview-api.ts
10
10
  api/toolbox-api.ts
11
11
  api/users-api.ts
12
+ api/volumes-api.ts
12
13
  api/workspace-api.ts
13
14
  base.ts
14
15
  common.ts
@@ -30,6 +31,7 @@ models/create-organization-role.ts
30
31
  models/create-organization.ts
31
32
  models/create-session-request.ts
32
33
  models/create-user.ts
34
+ models/create-volume.ts
33
35
  models/create-workspace.ts
34
36
  models/docker-registry.ts
35
37
  models/execute-request.ts
@@ -48,7 +50,6 @@ models/image-dto.ts
48
50
  models/image-state.ts
49
51
  models/index.ts
50
52
  models/list-branch-response.ts
51
- models/list-workspaces-labels-parameter.ts
52
53
  models/lsp-completion-params.ts
53
54
  models/lsp-document-request.ts
54
55
  models/lsp-location.ts
@@ -83,9 +84,11 @@ models/update-organization-role.ts
83
84
  models/usage-overview.ts
84
85
  models/user-public-key.ts
85
86
  models/user.ts
87
+ models/volume-dto.ts
86
88
  models/workspace-info.ts
87
89
  models/workspace-labels.ts
88
90
  models/workspace-state.ts
91
+ models/workspace-volume.ts
89
92
  models/workspace.ts
90
93
  package.json
91
94
  tsconfig.esm.json
@@ -0,0 +1,584 @@
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
+ import type { Configuration } from '../configuration'
16
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'
17
+ import globalAxios from 'axios'
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import {
21
+ DUMMY_BASE_URL,
22
+ assertParamExists,
23
+ setApiKeyToObject,
24
+ setBasicAuthToObject,
25
+ setBearerAuthToObject,
26
+ setOAuthToObject,
27
+ setSearchParams,
28
+ serializeDataIfNeeded,
29
+ toPathString,
30
+ createRequestFunction,
31
+ } from '../common'
32
+ // @ts-ignore
33
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'
34
+ // @ts-ignore
35
+ import type { CreateVolume } from '../models'
36
+ // @ts-ignore
37
+ import type { VolumeDto } from '../models'
38
+ /**
39
+ * VolumesApi - axios parameter creator
40
+ * @export
41
+ */
42
+ export const VolumesApiAxiosParamCreator = function (configuration?: Configuration) {
43
+ return {
44
+ /**
45
+ *
46
+ * @summary Create a new volume
47
+ * @param {CreateVolume} createVolume
48
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
49
+ * @param {*} [options] Override http request option.
50
+ * @throws {RequiredError}
51
+ */
52
+ createVolume: async (
53
+ createVolume: CreateVolume,
54
+ xDaytonaOrganizationID?: string,
55
+ options: RawAxiosRequestConfig = {},
56
+ ): Promise<RequestArgs> => {
57
+ // verify required parameter 'createVolume' is not null or undefined
58
+ assertParamExists('createVolume', 'createVolume', createVolume)
59
+ const localVarPath = `/volumes`
60
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
61
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
62
+ let baseOptions
63
+ if (configuration) {
64
+ baseOptions = configuration.baseOptions
65
+ }
66
+
67
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }
68
+ const localVarHeaderParameter = {} as any
69
+ const localVarQueryParameter = {} as any
70
+
71
+ // authentication oauth2 required
72
+ // oauth required
73
+ await setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration)
74
+
75
+ localVarHeaderParameter['Content-Type'] = 'application/json'
76
+
77
+ if (xDaytonaOrganizationID != null) {
78
+ localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID)
79
+ }
80
+ setSearchParams(localVarUrlObj, localVarQueryParameter)
81
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
82
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
83
+ localVarRequestOptions.data = serializeDataIfNeeded(createVolume, localVarRequestOptions, configuration)
84
+
85
+ return {
86
+ url: toPathString(localVarUrlObj),
87
+ options: localVarRequestOptions,
88
+ }
89
+ },
90
+ /**
91
+ *
92
+ * @summary Delete volume
93
+ * @param {string} volumeId ID of the volume
94
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ deleteVolume: async (
99
+ volumeId: string,
100
+ xDaytonaOrganizationID?: string,
101
+ options: RawAxiosRequestConfig = {},
102
+ ): Promise<RequestArgs> => {
103
+ // verify required parameter 'volumeId' is not null or undefined
104
+ assertParamExists('deleteVolume', 'volumeId', volumeId)
105
+ const localVarPath = `/volumes/{volumeId}`.replace(`{${'volumeId'}}`, encodeURIComponent(String(volumeId)))
106
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
107
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
108
+ let baseOptions
109
+ if (configuration) {
110
+ baseOptions = configuration.baseOptions
111
+ }
112
+
113
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }
114
+ const localVarHeaderParameter = {} as any
115
+ const localVarQueryParameter = {} as any
116
+
117
+ // authentication oauth2 required
118
+ // oauth required
119
+ await setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration)
120
+
121
+ if (xDaytonaOrganizationID != null) {
122
+ localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID)
123
+ }
124
+ setSearchParams(localVarUrlObj, localVarQueryParameter)
125
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
126
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
127
+
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ }
132
+ },
133
+ /**
134
+ *
135
+ * @summary Get volume details
136
+ * @param {string} volumeId ID of the volume
137
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getVolume: async (
142
+ volumeId: string,
143
+ xDaytonaOrganizationID?: string,
144
+ options: RawAxiosRequestConfig = {},
145
+ ): Promise<RequestArgs> => {
146
+ // verify required parameter 'volumeId' is not null or undefined
147
+ assertParamExists('getVolume', 'volumeId', volumeId)
148
+ const localVarPath = `/volumes/{volumeId}`.replace(`{${'volumeId'}}`, encodeURIComponent(String(volumeId)))
149
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
150
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
151
+ let baseOptions
152
+ if (configuration) {
153
+ baseOptions = configuration.baseOptions
154
+ }
155
+
156
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }
157
+ const localVarHeaderParameter = {} as any
158
+ const localVarQueryParameter = {} as any
159
+
160
+ // authentication oauth2 required
161
+ // oauth required
162
+ await setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration)
163
+
164
+ if (xDaytonaOrganizationID != null) {
165
+ localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID)
166
+ }
167
+ setSearchParams(localVarUrlObj, localVarQueryParameter)
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
169
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
170
+
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ }
175
+ },
176
+ /**
177
+ *
178
+ * @summary Get volume details by name
179
+ * @param {string} name Name of the volume
180
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ getVolumeByName: async (
185
+ name: string,
186
+ xDaytonaOrganizationID?: string,
187
+ options: RawAxiosRequestConfig = {},
188
+ ): Promise<RequestArgs> => {
189
+ // verify required parameter 'name' is not null or undefined
190
+ assertParamExists('getVolumeByName', 'name', name)
191
+ const localVarPath = `/volumes/by-name/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name)))
192
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
193
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
194
+ let baseOptions
195
+ if (configuration) {
196
+ baseOptions = configuration.baseOptions
197
+ }
198
+
199
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }
200
+ const localVarHeaderParameter = {} as any
201
+ const localVarQueryParameter = {} as any
202
+
203
+ // authentication oauth2 required
204
+ // oauth required
205
+ await setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration)
206
+
207
+ if (xDaytonaOrganizationID != null) {
208
+ localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID)
209
+ }
210
+ setSearchParams(localVarUrlObj, localVarQueryParameter)
211
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
212
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
213
+
214
+ return {
215
+ url: toPathString(localVarUrlObj),
216
+ options: localVarRequestOptions,
217
+ }
218
+ },
219
+ /**
220
+ *
221
+ * @summary List all volumes
222
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
223
+ * @param {boolean} [includeDeleted] Include deleted volumes in the response
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ listVolumes: async (
228
+ xDaytonaOrganizationID?: string,
229
+ includeDeleted?: boolean,
230
+ options: RawAxiosRequestConfig = {},
231
+ ): Promise<RequestArgs> => {
232
+ const localVarPath = `/volumes`
233
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
234
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
235
+ let baseOptions
236
+ if (configuration) {
237
+ baseOptions = configuration.baseOptions
238
+ }
239
+
240
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }
241
+ const localVarHeaderParameter = {} as any
242
+ const localVarQueryParameter = {} as any
243
+
244
+ // authentication oauth2 required
245
+ // oauth required
246
+ await setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration)
247
+
248
+ if (includeDeleted !== undefined) {
249
+ localVarQueryParameter['includeDeleted'] = includeDeleted
250
+ }
251
+
252
+ if (xDaytonaOrganizationID != null) {
253
+ localVarHeaderParameter['X-Daytona-Organization-ID'] = String(xDaytonaOrganizationID)
254
+ }
255
+ setSearchParams(localVarUrlObj, localVarQueryParameter)
256
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
257
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
258
+
259
+ return {
260
+ url: toPathString(localVarUrlObj),
261
+ options: localVarRequestOptions,
262
+ }
263
+ },
264
+ }
265
+ }
266
+
267
+ /**
268
+ * VolumesApi - functional programming interface
269
+ * @export
270
+ */
271
+ export const VolumesApiFp = function (configuration?: Configuration) {
272
+ const localVarAxiosParamCreator = VolumesApiAxiosParamCreator(configuration)
273
+ return {
274
+ /**
275
+ *
276
+ * @summary Create a new volume
277
+ * @param {CreateVolume} createVolume
278
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ async createVolume(
283
+ createVolume: CreateVolume,
284
+ xDaytonaOrganizationID?: string,
285
+ options?: RawAxiosRequestConfig,
286
+ ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VolumeDto>> {
287
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createVolume(
288
+ createVolume,
289
+ xDaytonaOrganizationID,
290
+ options,
291
+ )
292
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0
293
+ const localVarOperationServerBasePath =
294
+ operationServerMap['VolumesApi.createVolume']?.[localVarOperationServerIndex]?.url
295
+ return (axios, basePath) =>
296
+ createRequestFunction(
297
+ localVarAxiosArgs,
298
+ globalAxios,
299
+ BASE_PATH,
300
+ configuration,
301
+ )(axios, localVarOperationServerBasePath || basePath)
302
+ },
303
+ /**
304
+ *
305
+ * @summary Delete volume
306
+ * @param {string} volumeId ID of the volume
307
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
308
+ * @param {*} [options] Override http request option.
309
+ * @throws {RequiredError}
310
+ */
311
+ async deleteVolume(
312
+ volumeId: string,
313
+ xDaytonaOrganizationID?: string,
314
+ options?: RawAxiosRequestConfig,
315
+ ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
316
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVolume(volumeId, xDaytonaOrganizationID, options)
317
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0
318
+ const localVarOperationServerBasePath =
319
+ operationServerMap['VolumesApi.deleteVolume']?.[localVarOperationServerIndex]?.url
320
+ return (axios, basePath) =>
321
+ createRequestFunction(
322
+ localVarAxiosArgs,
323
+ globalAxios,
324
+ BASE_PATH,
325
+ configuration,
326
+ )(axios, localVarOperationServerBasePath || basePath)
327
+ },
328
+ /**
329
+ *
330
+ * @summary Get volume details
331
+ * @param {string} volumeId ID of the volume
332
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ */
336
+ async getVolume(
337
+ volumeId: string,
338
+ xDaytonaOrganizationID?: string,
339
+ options?: RawAxiosRequestConfig,
340
+ ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VolumeDto>> {
341
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVolume(volumeId, xDaytonaOrganizationID, options)
342
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0
343
+ const localVarOperationServerBasePath =
344
+ operationServerMap['VolumesApi.getVolume']?.[localVarOperationServerIndex]?.url
345
+ return (axios, basePath) =>
346
+ createRequestFunction(
347
+ localVarAxiosArgs,
348
+ globalAxios,
349
+ BASE_PATH,
350
+ configuration,
351
+ )(axios, localVarOperationServerBasePath || basePath)
352
+ },
353
+ /**
354
+ *
355
+ * @summary Get volume details by name
356
+ * @param {string} name Name of the volume
357
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ async getVolumeByName(
362
+ name: string,
363
+ xDaytonaOrganizationID?: string,
364
+ options?: RawAxiosRequestConfig,
365
+ ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VolumeDto>> {
366
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVolumeByName(name, xDaytonaOrganizationID, options)
367
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0
368
+ const localVarOperationServerBasePath =
369
+ operationServerMap['VolumesApi.getVolumeByName']?.[localVarOperationServerIndex]?.url
370
+ return (axios, basePath) =>
371
+ createRequestFunction(
372
+ localVarAxiosArgs,
373
+ globalAxios,
374
+ BASE_PATH,
375
+ configuration,
376
+ )(axios, localVarOperationServerBasePath || basePath)
377
+ },
378
+ /**
379
+ *
380
+ * @summary List all volumes
381
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
382
+ * @param {boolean} [includeDeleted] Include deleted volumes in the response
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ async listVolumes(
387
+ xDaytonaOrganizationID?: string,
388
+ includeDeleted?: boolean,
389
+ options?: RawAxiosRequestConfig,
390
+ ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<VolumeDto>>> {
391
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listVolumes(
392
+ xDaytonaOrganizationID,
393
+ includeDeleted,
394
+ options,
395
+ )
396
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0
397
+ const localVarOperationServerBasePath =
398
+ operationServerMap['VolumesApi.listVolumes']?.[localVarOperationServerIndex]?.url
399
+ return (axios, basePath) =>
400
+ createRequestFunction(
401
+ localVarAxiosArgs,
402
+ globalAxios,
403
+ BASE_PATH,
404
+ configuration,
405
+ )(axios, localVarOperationServerBasePath || basePath)
406
+ },
407
+ }
408
+ }
409
+
410
+ /**
411
+ * VolumesApi - factory interface
412
+ * @export
413
+ */
414
+ export const VolumesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
415
+ const localVarFp = VolumesApiFp(configuration)
416
+ return {
417
+ /**
418
+ *
419
+ * @summary Create a new volume
420
+ * @param {CreateVolume} createVolume
421
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ */
425
+ createVolume(
426
+ createVolume: CreateVolume,
427
+ xDaytonaOrganizationID?: string,
428
+ options?: RawAxiosRequestConfig,
429
+ ): AxiosPromise<VolumeDto> {
430
+ return localVarFp
431
+ .createVolume(createVolume, xDaytonaOrganizationID, options)
432
+ .then((request) => request(axios, basePath))
433
+ },
434
+ /**
435
+ *
436
+ * @summary Delete volume
437
+ * @param {string} volumeId ID of the volume
438
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ */
442
+ deleteVolume(
443
+ volumeId: string,
444
+ xDaytonaOrganizationID?: string,
445
+ options?: RawAxiosRequestConfig,
446
+ ): AxiosPromise<void> {
447
+ return localVarFp
448
+ .deleteVolume(volumeId, xDaytonaOrganizationID, options)
449
+ .then((request) => request(axios, basePath))
450
+ },
451
+ /**
452
+ *
453
+ * @summary Get volume details
454
+ * @param {string} volumeId ID of the volume
455
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ getVolume(
460
+ volumeId: string,
461
+ xDaytonaOrganizationID?: string,
462
+ options?: RawAxiosRequestConfig,
463
+ ): AxiosPromise<VolumeDto> {
464
+ return localVarFp.getVolume(volumeId, xDaytonaOrganizationID, options).then((request) => request(axios, basePath))
465
+ },
466
+ /**
467
+ *
468
+ * @summary Get volume details by name
469
+ * @param {string} name Name of the volume
470
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ getVolumeByName(
475
+ name: string,
476
+ xDaytonaOrganizationID?: string,
477
+ options?: RawAxiosRequestConfig,
478
+ ): AxiosPromise<VolumeDto> {
479
+ return localVarFp
480
+ .getVolumeByName(name, xDaytonaOrganizationID, options)
481
+ .then((request) => request(axios, basePath))
482
+ },
483
+ /**
484
+ *
485
+ * @summary List all volumes
486
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
487
+ * @param {boolean} [includeDeleted] Include deleted volumes in the response
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ */
491
+ listVolumes(
492
+ xDaytonaOrganizationID?: string,
493
+ includeDeleted?: boolean,
494
+ options?: RawAxiosRequestConfig,
495
+ ): AxiosPromise<Array<VolumeDto>> {
496
+ return localVarFp
497
+ .listVolumes(xDaytonaOrganizationID, includeDeleted, options)
498
+ .then((request) => request(axios, basePath))
499
+ },
500
+ }
501
+ }
502
+
503
+ /**
504
+ * VolumesApi - object-oriented interface
505
+ * @export
506
+ * @class VolumesApi
507
+ * @extends {BaseAPI}
508
+ */
509
+ export class VolumesApi extends BaseAPI {
510
+ /**
511
+ *
512
+ * @summary Create a new volume
513
+ * @param {CreateVolume} createVolume
514
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
515
+ * @param {*} [options] Override http request option.
516
+ * @throws {RequiredError}
517
+ * @memberof VolumesApi
518
+ */
519
+ public createVolume(createVolume: CreateVolume, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
520
+ return VolumesApiFp(this.configuration)
521
+ .createVolume(createVolume, xDaytonaOrganizationID, options)
522
+ .then((request) => request(this.axios, this.basePath))
523
+ }
524
+
525
+ /**
526
+ *
527
+ * @summary Delete volume
528
+ * @param {string} volumeId ID of the volume
529
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
530
+ * @param {*} [options] Override http request option.
531
+ * @throws {RequiredError}
532
+ * @memberof VolumesApi
533
+ */
534
+ public deleteVolume(volumeId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
535
+ return VolumesApiFp(this.configuration)
536
+ .deleteVolume(volumeId, xDaytonaOrganizationID, options)
537
+ .then((request) => request(this.axios, this.basePath))
538
+ }
539
+
540
+ /**
541
+ *
542
+ * @summary Get volume details
543
+ * @param {string} volumeId ID of the volume
544
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ * @memberof VolumesApi
548
+ */
549
+ public getVolume(volumeId: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
550
+ return VolumesApiFp(this.configuration)
551
+ .getVolume(volumeId, xDaytonaOrganizationID, options)
552
+ .then((request) => request(this.axios, this.basePath))
553
+ }
554
+
555
+ /**
556
+ *
557
+ * @summary Get volume details by name
558
+ * @param {string} name Name of the volume
559
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
560
+ * @param {*} [options] Override http request option.
561
+ * @throws {RequiredError}
562
+ * @memberof VolumesApi
563
+ */
564
+ public getVolumeByName(name: string, xDaytonaOrganizationID?: string, options?: RawAxiosRequestConfig) {
565
+ return VolumesApiFp(this.configuration)
566
+ .getVolumeByName(name, xDaytonaOrganizationID, options)
567
+ .then((request) => request(this.axios, this.basePath))
568
+ }
569
+
570
+ /**
571
+ *
572
+ * @summary List all volumes
573
+ * @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
574
+ * @param {boolean} [includeDeleted] Include deleted volumes in the response
575
+ * @param {*} [options] Override http request option.
576
+ * @throws {RequiredError}
577
+ * @memberof VolumesApi
578
+ */
579
+ public listVolumes(xDaytonaOrganizationID?: string, includeDeleted?: boolean, options?: RawAxiosRequestConfig) {
580
+ return VolumesApiFp(this.configuration)
581
+ .listVolumes(xDaytonaOrganizationID, includeDeleted, options)
582
+ .then((request) => request(this.axios, this.basePath))
583
+ }
584
+ }