@daytonaio/api-client 0.9.8 → 0.12.2

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 (65) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/docker-registry-api.ts +12 -76
  4. package/api/images-api.ts +380 -0
  5. package/api/toolbox-api.ts +169 -0
  6. package/api.ts +1 -0
  7. package/dist/api/docker-registry-api.d.ts +16 -44
  8. package/dist/api/docker-registry-api.js +0 -62
  9. package/dist/api/images-api.d.ts +184 -0
  10. package/dist/api/images-api.js +361 -0
  11. package/dist/api/toolbox-api.d.ts +79 -0
  12. package/dist/api/toolbox-api.js +159 -0
  13. package/dist/api.d.ts +1 -0
  14. package/dist/api.js +1 -0
  15. package/dist/esm/api/docker-registry-api.d.ts +16 -44
  16. package/dist/esm/api/docker-registry-api.js +0 -62
  17. package/dist/esm/api/images-api.d.ts +184 -0
  18. package/dist/esm/api/images-api.js +354 -0
  19. package/dist/esm/api/toolbox-api.d.ts +79 -0
  20. package/dist/esm/api/toolbox-api.js +159 -0
  21. package/dist/esm/api.d.ts +1 -0
  22. package/dist/esm/api.js +1 -0
  23. package/dist/esm/models/command.d.ts +2 -8
  24. package/dist/esm/models/create-docker-registry.d.ts +0 -6
  25. package/dist/esm/models/create-image.d.ts +30 -0
  26. package/dist/esm/models/create-image.js +14 -0
  27. package/dist/esm/models/docker-registry.d.ts +60 -0
  28. package/dist/esm/models/docker-registry.js +14 -0
  29. package/dist/esm/models/image-dto.d.ts +93 -0
  30. package/dist/esm/models/image-dto.js +21 -0
  31. package/dist/esm/models/index.d.ts +5 -0
  32. package/dist/esm/models/index.js +5 -0
  33. package/dist/esm/models/paginated-images-dto.d.ts +43 -0
  34. package/dist/esm/models/paginated-images-dto.js +14 -0
  35. package/dist/esm/models/toggle-state.d.ts +24 -0
  36. package/dist/esm/models/toggle-state.js +14 -0
  37. package/dist/esm/models/update-docker-registry.d.ts +2 -20
  38. package/dist/esm/models/usage-overview.d.ts +24 -0
  39. package/dist/models/command.d.ts +2 -8
  40. package/dist/models/create-docker-registry.d.ts +0 -6
  41. package/dist/models/create-image.d.ts +30 -0
  42. package/dist/models/create-image.js +15 -0
  43. package/dist/models/docker-registry.d.ts +60 -0
  44. package/dist/models/docker-registry.js +15 -0
  45. package/dist/models/image-dto.d.ts +93 -0
  46. package/dist/models/image-dto.js +24 -0
  47. package/dist/models/index.d.ts +5 -0
  48. package/dist/models/index.js +5 -0
  49. package/dist/models/paginated-images-dto.d.ts +43 -0
  50. package/dist/models/paginated-images-dto.js +15 -0
  51. package/dist/models/toggle-state.d.ts +24 -0
  52. package/dist/models/toggle-state.js +15 -0
  53. package/dist/models/update-docker-registry.d.ts +2 -20
  54. package/dist/models/usage-overview.d.ts +24 -0
  55. package/models/command.ts +2 -8
  56. package/models/create-docker-registry.ts +0 -6
  57. package/models/create-image.ts +36 -0
  58. package/models/docker-registry.ts +66 -0
  59. package/models/image-dto.ts +102 -0
  60. package/models/index.ts +5 -0
  61. package/models/paginated-images-dto.ts +51 -0
  62. package/models/toggle-state.ts +30 -0
  63. package/models/update-docker-registry.ts +2 -20
  64. package/models/usage-overview.ts +24 -0
  65. package/package.json +1 -1
@@ -5,6 +5,7 @@ README.md
5
5
  api.ts
6
6
  api/api-keys-api.ts
7
7
  api/docker-registry-api.ts
8
+ api/images-api.ts
8
9
  api/nodes-api.ts
9
10
  api/toolbox-api.ts
10
11
  api/users-api.ts
@@ -22,10 +23,12 @@ models/completion-item.ts
22
23
  models/completion-list.ts
23
24
  models/create-api-key.ts
24
25
  models/create-docker-registry.ts
26
+ models/create-image.ts
25
27
  models/create-node.ts
26
28
  models/create-session-request.ts
27
29
  models/create-user.ts
28
30
  models/create-workspace.ts
31
+ models/docker-registry.ts
29
32
  models/execute-request.ts
30
33
  models/execute-response.ts
31
34
  models/file-info.ts
@@ -38,6 +41,7 @@ models/git-commit-request.ts
38
41
  models/git-commit-response.ts
39
42
  models/git-repo-request.ts
40
43
  models/git-status.ts
44
+ models/image-dto.ts
41
45
  models/index.ts
42
46
  models/list-branch-response.ts
43
47
  models/lsp-completion-params.ts
@@ -46,6 +50,7 @@ models/lsp-location.ts
46
50
  models/lsp-server-request.ts
47
51
  models/lsp-symbol.ts
48
52
  models/match.ts
53
+ models/paginated-images-dto.ts
49
54
  models/position.ts
50
55
  models/project-dir-response.ts
51
56
  models/range.ts
@@ -55,6 +60,7 @@ models/search-files-response.ts
55
60
  models/session-execute-request.ts
56
61
  models/session-execute-response.ts
57
62
  models/session.ts
63
+ models/toggle-state.ts
58
64
  models/update-docker-registry.ts
59
65
  models/usage-overview.ts
60
66
  models/workspace-info.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @daytonaio/api-client@0.9.8
1
+ ## @daytonaio/api-client@0.12.2
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @daytonaio/api-client@0.9.8 --save
39
+ npm install @daytonaio/api-client@0.12.2 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -24,6 +24,8 @@ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError
24
24
  // @ts-ignore
25
25
  import type { CreateDockerRegistry } from '../models';
26
26
  // @ts-ignore
27
+ import type { DockerRegistry } from '../models';
28
+ // @ts-ignore
27
29
  import type { UpdateDockerRegistry } from '../models';
28
30
  /**
29
31
  * DockerRegistryApi - axios parameter creator
@@ -100,40 +102,6 @@ export const DockerRegistryApiAxiosParamCreator = function (configuration?: Conf
100
102
 
101
103
 
102
104
 
103
- setSearchParams(localVarUrlObj, localVarQueryParameter);
104
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
105
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
106
-
107
- return {
108
- url: toPathString(localVarUrlObj),
109
- options: localVarRequestOptions,
110
- };
111
- },
112
- /**
113
- *
114
- * @summary Get default registry
115
- * @param {*} [options] Override http request option.
116
- * @throws {RequiredError}
117
- */
118
- getDefaultRegistry: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
119
- const localVarPath = `/docker-registry/default`;
120
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
121
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
122
- let baseOptions;
123
- if (configuration) {
124
- baseOptions = configuration.baseOptions;
125
- }
126
-
127
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
128
- const localVarHeaderParameter = {} as any;
129
- const localVarQueryParameter = {} as any;
130
-
131
- // authentication oauth2 required
132
- // oauth required
133
- await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
134
-
135
-
136
-
137
105
  setSearchParams(localVarUrlObj, localVarQueryParameter);
138
106
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
139
107
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -314,7 +282,7 @@ export const DockerRegistryApiFp = function(configuration?: Configuration) {
314
282
  * @param {*} [options] Override http request option.
315
283
  * @throws {RequiredError}
316
284
  */
317
- async createRegistry(createDockerRegistry: CreateDockerRegistry, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
285
+ async createRegistry(createDockerRegistry: CreateDockerRegistry, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DockerRegistry>> {
318
286
  const localVarAxiosArgs = await localVarAxiosParamCreator.createRegistry(createDockerRegistry, options);
319
287
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
320
288
  const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.createRegistry']?.[localVarOperationServerIndex]?.url;
@@ -333,18 +301,6 @@ export const DockerRegistryApiFp = function(configuration?: Configuration) {
333
301
  const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.deleteRegistry']?.[localVarOperationServerIndex]?.url;
334
302
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
335
303
  },
336
- /**
337
- *
338
- * @summary Get default registry
339
- * @param {*} [options] Override http request option.
340
- * @throws {RequiredError}
341
- */
342
- async getDefaultRegistry(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
343
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDefaultRegistry(options);
344
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
345
- const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.getDefaultRegistry']?.[localVarOperationServerIndex]?.url;
346
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
347
- },
348
304
  /**
349
305
  *
350
306
  * @summary Get registry
@@ -352,7 +308,7 @@ export const DockerRegistryApiFp = function(configuration?: Configuration) {
352
308
  * @param {*} [options] Override http request option.
353
309
  * @throws {RequiredError}
354
310
  */
355
- async getRegistry(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
311
+ async getRegistry(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DockerRegistry>> {
356
312
  const localVarAxiosArgs = await localVarAxiosParamCreator.getRegistry(id, options);
357
313
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
358
314
  const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.getRegistry']?.[localVarOperationServerIndex]?.url;
@@ -364,7 +320,7 @@ export const DockerRegistryApiFp = function(configuration?: Configuration) {
364
320
  * @param {*} [options] Override http request option.
365
321
  * @throws {RequiredError}
366
322
  */
367
- async listRegistries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<object>>> {
323
+ async listRegistries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DockerRegistry>>> {
368
324
  const localVarAxiosArgs = await localVarAxiosParamCreator.listRegistries(options);
369
325
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
370
326
  const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.listRegistries']?.[localVarOperationServerIndex]?.url;
@@ -377,7 +333,7 @@ export const DockerRegistryApiFp = function(configuration?: Configuration) {
377
333
  * @param {*} [options] Override http request option.
378
334
  * @throws {RequiredError}
379
335
  */
380
- async setDefaultRegistry(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
336
+ async setDefaultRegistry(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DockerRegistry>> {
381
337
  const localVarAxiosArgs = await localVarAxiosParamCreator.setDefaultRegistry(id, options);
382
338
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
383
339
  const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.setDefaultRegistry']?.[localVarOperationServerIndex]?.url;
@@ -391,7 +347,7 @@ export const DockerRegistryApiFp = function(configuration?: Configuration) {
391
347
  * @param {*} [options] Override http request option.
392
348
  * @throws {RequiredError}
393
349
  */
394
- async updateRegistry(id: string, updateDockerRegistry: UpdateDockerRegistry, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
350
+ async updateRegistry(id: string, updateDockerRegistry: UpdateDockerRegistry, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DockerRegistry>> {
395
351
  const localVarAxiosArgs = await localVarAxiosParamCreator.updateRegistry(id, updateDockerRegistry, options);
396
352
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
397
353
  const localVarOperationServerBasePath = operationServerMap['DockerRegistryApi.updateRegistry']?.[localVarOperationServerIndex]?.url;
@@ -414,7 +370,7 @@ export const DockerRegistryApiFactory = function (configuration?: Configuration,
414
370
  * @param {*} [options] Override http request option.
415
371
  * @throws {RequiredError}
416
372
  */
417
- createRegistry(createDockerRegistry: CreateDockerRegistry, options?: RawAxiosRequestConfig): AxiosPromise<object> {
373
+ createRegistry(createDockerRegistry: CreateDockerRegistry, options?: RawAxiosRequestConfig): AxiosPromise<DockerRegistry> {
418
374
  return localVarFp.createRegistry(createDockerRegistry, options).then((request) => request(axios, basePath));
419
375
  },
420
376
  /**
@@ -427,15 +383,6 @@ export const DockerRegistryApiFactory = function (configuration?: Configuration,
427
383
  deleteRegistry(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
428
384
  return localVarFp.deleteRegistry(id, options).then((request) => request(axios, basePath));
429
385
  },
430
- /**
431
- *
432
- * @summary Get default registry
433
- * @param {*} [options] Override http request option.
434
- * @throws {RequiredError}
435
- */
436
- getDefaultRegistry(options?: RawAxiosRequestConfig): AxiosPromise<object> {
437
- return localVarFp.getDefaultRegistry(options).then((request) => request(axios, basePath));
438
- },
439
386
  /**
440
387
  *
441
388
  * @summary Get registry
@@ -443,7 +390,7 @@ export const DockerRegistryApiFactory = function (configuration?: Configuration,
443
390
  * @param {*} [options] Override http request option.
444
391
  * @throws {RequiredError}
445
392
  */
446
- getRegistry(id: string, options?: RawAxiosRequestConfig): AxiosPromise<object> {
393
+ getRegistry(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DockerRegistry> {
447
394
  return localVarFp.getRegistry(id, options).then((request) => request(axios, basePath));
448
395
  },
449
396
  /**
@@ -452,7 +399,7 @@ export const DockerRegistryApiFactory = function (configuration?: Configuration,
452
399
  * @param {*} [options] Override http request option.
453
400
  * @throws {RequiredError}
454
401
  */
455
- listRegistries(options?: RawAxiosRequestConfig): AxiosPromise<Array<object>> {
402
+ listRegistries(options?: RawAxiosRequestConfig): AxiosPromise<Array<DockerRegistry>> {
456
403
  return localVarFp.listRegistries(options).then((request) => request(axios, basePath));
457
404
  },
458
405
  /**
@@ -462,7 +409,7 @@ export const DockerRegistryApiFactory = function (configuration?: Configuration,
462
409
  * @param {*} [options] Override http request option.
463
410
  * @throws {RequiredError}
464
411
  */
465
- setDefaultRegistry(id: string, options?: RawAxiosRequestConfig): AxiosPromise<object> {
412
+ setDefaultRegistry(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DockerRegistry> {
466
413
  return localVarFp.setDefaultRegistry(id, options).then((request) => request(axios, basePath));
467
414
  },
468
415
  /**
@@ -473,7 +420,7 @@ export const DockerRegistryApiFactory = function (configuration?: Configuration,
473
420
  * @param {*} [options] Override http request option.
474
421
  * @throws {RequiredError}
475
422
  */
476
- updateRegistry(id: string, updateDockerRegistry: UpdateDockerRegistry, options?: RawAxiosRequestConfig): AxiosPromise<object> {
423
+ updateRegistry(id: string, updateDockerRegistry: UpdateDockerRegistry, options?: RawAxiosRequestConfig): AxiosPromise<DockerRegistry> {
477
424
  return localVarFp.updateRegistry(id, updateDockerRegistry, options).then((request) => request(axios, basePath));
478
425
  },
479
426
  };
@@ -510,17 +457,6 @@ export class DockerRegistryApi extends BaseAPI {
510
457
  return DockerRegistryApiFp(this.configuration).deleteRegistry(id, options).then((request) => request(this.axios, this.basePath));
511
458
  }
512
459
 
513
- /**
514
- *
515
- * @summary Get default registry
516
- * @param {*} [options] Override http request option.
517
- * @throws {RequiredError}
518
- * @memberof DockerRegistryApi
519
- */
520
- public getDefaultRegistry(options?: RawAxiosRequestConfig) {
521
- return DockerRegistryApiFp(this.configuration).getDefaultRegistry(options).then((request) => request(this.axios, this.basePath));
522
- }
523
-
524
460
  /**
525
461
  *
526
462
  * @summary Get registry
@@ -0,0 +1,380 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Daytona Workspaces
5
+ * Daytona Workspaces API Docs
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { CreateImage } from '../models';
26
+ // @ts-ignore
27
+ import type { ImageDto } from '../models';
28
+ // @ts-ignore
29
+ import type { PaginatedImagesDto } from '../models';
30
+ // @ts-ignore
31
+ import type { ToggleState } from '../models';
32
+ /**
33
+ * ImagesApi - axios parameter creator
34
+ * @export
35
+ */
36
+ export const ImagesApiAxiosParamCreator = function (configuration?: Configuration) {
37
+ return {
38
+ /**
39
+ *
40
+ * @summary Create a new image
41
+ * @param {CreateImage} createImage
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ createImage: async (createImage: CreateImage, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'createImage' is not null or undefined
47
+ assertParamExists('createImage', 'createImage', createImage)
48
+ const localVarPath = `/images`;
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+
56
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
57
+ const localVarHeaderParameter = {} as any;
58
+ const localVarQueryParameter = {} as any;
59
+
60
+ // authentication oauth2 required
61
+ // oauth required
62
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
63
+
64
+
65
+
66
+ localVarHeaderParameter['Content-Type'] = 'application/json';
67
+
68
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
69
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
71
+ localVarRequestOptions.data = serializeDataIfNeeded(createImage, localVarRequestOptions, configuration)
72
+
73
+ return {
74
+ url: toPathString(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ },
78
+ /**
79
+ *
80
+ * @summary List all images
81
+ * @param {number} [limit] Number of items per page
82
+ * @param {number} [page] Page number
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ */
86
+ getAllImages: async (limit?: number, page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
87
+ const localVarPath = `/images`;
88
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
89
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
90
+ let baseOptions;
91
+ if (configuration) {
92
+ baseOptions = configuration.baseOptions;
93
+ }
94
+
95
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
96
+ const localVarHeaderParameter = {} as any;
97
+ const localVarQueryParameter = {} as any;
98
+
99
+ // authentication oauth2 required
100
+ // oauth required
101
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
102
+
103
+ if (limit !== undefined) {
104
+ localVarQueryParameter['limit'] = limit;
105
+ }
106
+
107
+ if (page !== undefined) {
108
+ localVarQueryParameter['page'] = page;
109
+ }
110
+
111
+
112
+
113
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
114
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
116
+
117
+ return {
118
+ url: toPathString(localVarUrlObj),
119
+ options: localVarRequestOptions,
120
+ };
121
+ },
122
+ /**
123
+ *
124
+ * @summary Delete image
125
+ * @param {string} id Image ID
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ removeImage: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
130
+ // verify required parameter 'id' is not null or undefined
131
+ assertParamExists('removeImage', 'id', id)
132
+ const localVarPath = `/images/{id}`
133
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
135
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
136
+ let baseOptions;
137
+ if (configuration) {
138
+ baseOptions = configuration.baseOptions;
139
+ }
140
+
141
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
142
+ const localVarHeaderParameter = {} as any;
143
+ const localVarQueryParameter = {} as any;
144
+
145
+ // authentication oauth2 required
146
+ // oauth required
147
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
148
+
149
+
150
+
151
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
152
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
153
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
154
+
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions,
158
+ };
159
+ },
160
+ /**
161
+ *
162
+ * @summary Toggle image state
163
+ * @param {string} id Image ID
164
+ * @param {ToggleState} toggleState
165
+ * @param {*} [options] Override http request option.
166
+ * @throws {RequiredError}
167
+ */
168
+ toggleImageState: async (id: string, toggleState: ToggleState, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
169
+ // verify required parameter 'id' is not null or undefined
170
+ assertParamExists('toggleImageState', 'id', id)
171
+ // verify required parameter 'toggleState' is not null or undefined
172
+ assertParamExists('toggleImageState', 'toggleState', toggleState)
173
+ const localVarPath = `/images/{id}/toggle`
174
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
175
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
176
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
177
+ let baseOptions;
178
+ if (configuration) {
179
+ baseOptions = configuration.baseOptions;
180
+ }
181
+
182
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
183
+ const localVarHeaderParameter = {} as any;
184
+ const localVarQueryParameter = {} as any;
185
+
186
+ // authentication oauth2 required
187
+ // oauth required
188
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
189
+
190
+
191
+
192
+ localVarHeaderParameter['Content-Type'] = 'application/json';
193
+
194
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
195
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
196
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
197
+ localVarRequestOptions.data = serializeDataIfNeeded(toggleState, localVarRequestOptions, configuration)
198
+
199
+ return {
200
+ url: toPathString(localVarUrlObj),
201
+ options: localVarRequestOptions,
202
+ };
203
+ },
204
+ }
205
+ };
206
+
207
+ /**
208
+ * ImagesApi - functional programming interface
209
+ * @export
210
+ */
211
+ export const ImagesApiFp = function(configuration?: Configuration) {
212
+ const localVarAxiosParamCreator = ImagesApiAxiosParamCreator(configuration)
213
+ return {
214
+ /**
215
+ *
216
+ * @summary Create a new image
217
+ * @param {CreateImage} createImage
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ async createImage(createImage: CreateImage, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImageDto>> {
222
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createImage(createImage, options);
223
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
224
+ const localVarOperationServerBasePath = operationServerMap['ImagesApi.createImage']?.[localVarOperationServerIndex]?.url;
225
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
226
+ },
227
+ /**
228
+ *
229
+ * @summary List all images
230
+ * @param {number} [limit] Number of items per page
231
+ * @param {number} [page] Page number
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async getAllImages(limit?: number, page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedImagesDto>> {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllImages(limit, page, options);
237
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
238
+ const localVarOperationServerBasePath = operationServerMap['ImagesApi.getAllImages']?.[localVarOperationServerIndex]?.url;
239
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
240
+ },
241
+ /**
242
+ *
243
+ * @summary Delete image
244
+ * @param {string} id Image ID
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ async removeImage(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
249
+ const localVarAxiosArgs = await localVarAxiosParamCreator.removeImage(id, options);
250
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
251
+ const localVarOperationServerBasePath = operationServerMap['ImagesApi.removeImage']?.[localVarOperationServerIndex]?.url;
252
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
253
+ },
254
+ /**
255
+ *
256
+ * @summary Toggle image state
257
+ * @param {string} id Image ID
258
+ * @param {ToggleState} toggleState
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ async toggleImageState(id: string, toggleState: ToggleState, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImageDto>> {
263
+ const localVarAxiosArgs = await localVarAxiosParamCreator.toggleImageState(id, toggleState, options);
264
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
265
+ const localVarOperationServerBasePath = operationServerMap['ImagesApi.toggleImageState']?.[localVarOperationServerIndex]?.url;
266
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
267
+ },
268
+ }
269
+ };
270
+
271
+ /**
272
+ * ImagesApi - factory interface
273
+ * @export
274
+ */
275
+ export const ImagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
276
+ const localVarFp = ImagesApiFp(configuration)
277
+ return {
278
+ /**
279
+ *
280
+ * @summary Create a new image
281
+ * @param {CreateImage} createImage
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ createImage(createImage: CreateImage, options?: RawAxiosRequestConfig): AxiosPromise<ImageDto> {
286
+ return localVarFp.createImage(createImage, options).then((request) => request(axios, basePath));
287
+ },
288
+ /**
289
+ *
290
+ * @summary List all images
291
+ * @param {number} [limit] Number of items per page
292
+ * @param {number} [page] Page number
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ */
296
+ getAllImages(limit?: number, page?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedImagesDto> {
297
+ return localVarFp.getAllImages(limit, page, options).then((request) => request(axios, basePath));
298
+ },
299
+ /**
300
+ *
301
+ * @summary Delete image
302
+ * @param {string} id Image ID
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ removeImage(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
307
+ return localVarFp.removeImage(id, options).then((request) => request(axios, basePath));
308
+ },
309
+ /**
310
+ *
311
+ * @summary Toggle image state
312
+ * @param {string} id Image ID
313
+ * @param {ToggleState} toggleState
314
+ * @param {*} [options] Override http request option.
315
+ * @throws {RequiredError}
316
+ */
317
+ toggleImageState(id: string, toggleState: ToggleState, options?: RawAxiosRequestConfig): AxiosPromise<ImageDto> {
318
+ return localVarFp.toggleImageState(id, toggleState, options).then((request) => request(axios, basePath));
319
+ },
320
+ };
321
+ };
322
+
323
+ /**
324
+ * ImagesApi - object-oriented interface
325
+ * @export
326
+ * @class ImagesApi
327
+ * @extends {BaseAPI}
328
+ */
329
+ export class ImagesApi extends BaseAPI {
330
+ /**
331
+ *
332
+ * @summary Create a new image
333
+ * @param {CreateImage} createImage
334
+ * @param {*} [options] Override http request option.
335
+ * @throws {RequiredError}
336
+ * @memberof ImagesApi
337
+ */
338
+ public createImage(createImage: CreateImage, options?: RawAxiosRequestConfig) {
339
+ return ImagesApiFp(this.configuration).createImage(createImage, options).then((request) => request(this.axios, this.basePath));
340
+ }
341
+
342
+ /**
343
+ *
344
+ * @summary List all images
345
+ * @param {number} [limit] Number of items per page
346
+ * @param {number} [page] Page number
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ * @memberof ImagesApi
350
+ */
351
+ public getAllImages(limit?: number, page?: number, options?: RawAxiosRequestConfig) {
352
+ return ImagesApiFp(this.configuration).getAllImages(limit, page, options).then((request) => request(this.axios, this.basePath));
353
+ }
354
+
355
+ /**
356
+ *
357
+ * @summary Delete image
358
+ * @param {string} id Image ID
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ * @memberof ImagesApi
362
+ */
363
+ public removeImage(id: string, options?: RawAxiosRequestConfig) {
364
+ return ImagesApiFp(this.configuration).removeImage(id, options).then((request) => request(this.axios, this.basePath));
365
+ }
366
+
367
+ /**
368
+ *
369
+ * @summary Toggle image state
370
+ * @param {string} id Image ID
371
+ * @param {ToggleState} toggleState
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ * @memberof ImagesApi
375
+ */
376
+ public toggleImageState(id: string, toggleState: ToggleState, options?: RawAxiosRequestConfig) {
377
+ return ImagesApiFp(this.configuration).toggleImageState(id, toggleState, options).then((request) => request(this.axios, this.basePath));
378
+ }
379
+ }
380
+