@emilgroup/task-sdk 1.0.1-beta.1

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 (139) hide show
  1. package/.openapi-generator/FILES +51 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/categories-api.ts +651 -0
  6. package/api/default-api.ts +124 -0
  7. package/api/hub-spot-api.ts +165 -0
  8. package/api/priorities-api.ts +284 -0
  9. package/api/statuses-api.ts +651 -0
  10. package/api/tasks-api.ts +651 -0
  11. package/api.ts +37 -0
  12. package/base.ts +331 -0
  13. package/common.ts +198 -0
  14. package/configuration.ts +110 -0
  15. package/dist/api/categories-api.d.ts +366 -0
  16. package/dist/api/categories-api.js +626 -0
  17. package/dist/api/default-api.d.ts +70 -0
  18. package/dist/api/default-api.js +200 -0
  19. package/dist/api/hub-spot-api.d.ts +97 -0
  20. package/dist/api/hub-spot-api.js +224 -0
  21. package/dist/api/priorities-api.d.ts +162 -0
  22. package/dist/api/priorities-api.js +324 -0
  23. package/dist/api/statuses-api.d.ts +366 -0
  24. package/dist/api/statuses-api.js +626 -0
  25. package/dist/api/tasks-api.d.ts +366 -0
  26. package/dist/api/tasks-api.js +626 -0
  27. package/dist/api.d.ts +17 -0
  28. package/dist/api.js +35 -0
  29. package/dist/base.d.ts +86 -0
  30. package/dist/base.js +367 -0
  31. package/dist/common.d.ts +91 -0
  32. package/dist/common.js +276 -0
  33. package/dist/configuration.d.ts +89 -0
  34. package/dist/configuration.js +52 -0
  35. package/dist/index.d.ts +15 -0
  36. package/dist/index.js +36 -0
  37. package/dist/models/category-class.d.ts +60 -0
  38. package/dist/models/category-class.js +15 -0
  39. package/dist/models/create-category-request-dto.d.ts +24 -0
  40. package/dist/models/create-category-request-dto.js +15 -0
  41. package/dist/models/create-category-response-class.d.ts +25 -0
  42. package/dist/models/create-category-response-class.js +15 -0
  43. package/dist/models/create-hub-spot-ticket-request-dto.d.ts +31 -0
  44. package/dist/models/create-hub-spot-ticket-request-dto.js +15 -0
  45. package/dist/models/create-hub-spot-ticket-response-class.d.ts +25 -0
  46. package/dist/models/create-hub-spot-ticket-response-class.js +15 -0
  47. package/dist/models/create-priority-request-dto.d.ts +24 -0
  48. package/dist/models/create-priority-request-dto.js +15 -0
  49. package/dist/models/create-priority-response-class.d.ts +25 -0
  50. package/dist/models/create-priority-response-class.js +15 -0
  51. package/dist/models/create-status-request-dto.d.ts +24 -0
  52. package/dist/models/create-status-request-dto.js +15 -0
  53. package/dist/models/create-status-response-class.d.ts +25 -0
  54. package/dist/models/create-status-response-class.js +15 -0
  55. package/dist/models/create-task-request-dto.d.ts +54 -0
  56. package/dist/models/create-task-request-dto.js +15 -0
  57. package/dist/models/create-task-response-class.d.ts +25 -0
  58. package/dist/models/create-task-response-class.js +15 -0
  59. package/dist/models/get-category-response-class.d.ts +25 -0
  60. package/dist/models/get-category-response-class.js +15 -0
  61. package/dist/models/get-priority-response-class.d.ts +25 -0
  62. package/dist/models/get-priority-response-class.js +15 -0
  63. package/dist/models/get-status-response-class.d.ts +25 -0
  64. package/dist/models/get-status-response-class.js +15 -0
  65. package/dist/models/get-task-response-class.d.ts +25 -0
  66. package/dist/models/get-task-response-class.js +15 -0
  67. package/dist/models/hub-spot-ticket-class.d.ts +49 -0
  68. package/dist/models/hub-spot-ticket-class.js +15 -0
  69. package/dist/models/hub-spot-ticket-error-class.d.ts +30 -0
  70. package/dist/models/hub-spot-ticket-error-class.js +15 -0
  71. package/dist/models/hub-spot-ticket-name-value-dto.d.ts +30 -0
  72. package/dist/models/hub-spot-ticket-name-value-dto.js +15 -0
  73. package/dist/models/index.d.ts +32 -0
  74. package/dist/models/index.js +48 -0
  75. package/dist/models/inline-response200.d.ts +54 -0
  76. package/dist/models/inline-response200.js +15 -0
  77. package/dist/models/inline-response503.d.ts +54 -0
  78. package/dist/models/inline-response503.js +15 -0
  79. package/dist/models/list-categories-response-class.d.ts +43 -0
  80. package/dist/models/list-categories-response-class.js +15 -0
  81. package/dist/models/list-statuses-response-class.d.ts +43 -0
  82. package/dist/models/list-statuses-response-class.js +15 -0
  83. package/dist/models/list-tasks-response-class.d.ts +43 -0
  84. package/dist/models/list-tasks-response-class.js +15 -0
  85. package/dist/models/priority-class.d.ts +60 -0
  86. package/dist/models/priority-class.js +15 -0
  87. package/dist/models/status-class.d.ts +60 -0
  88. package/dist/models/status-class.js +15 -0
  89. package/dist/models/task-class.d.ts +99 -0
  90. package/dist/models/task-class.js +15 -0
  91. package/dist/models/update-category-request-dto.d.ts +30 -0
  92. package/dist/models/update-category-request-dto.js +15 -0
  93. package/dist/models/update-category-response-class.d.ts +25 -0
  94. package/dist/models/update-category-response-class.js +15 -0
  95. package/dist/models/update-status-request-dto.d.ts +30 -0
  96. package/dist/models/update-status-request-dto.js +15 -0
  97. package/dist/models/update-status-response-class.d.ts +25 -0
  98. package/dist/models/update-status-response-class.js +15 -0
  99. package/dist/models/update-task-request-dto.d.ts +60 -0
  100. package/dist/models/update-task-request-dto.js +15 -0
  101. package/dist/models/update-task-response-class.d.ts +25 -0
  102. package/dist/models/update-task-response-class.js +15 -0
  103. package/git_push.sh +57 -0
  104. package/index.ts +19 -0
  105. package/models/category-class.ts +66 -0
  106. package/models/create-category-request-dto.ts +30 -0
  107. package/models/create-category-response-class.ts +31 -0
  108. package/models/create-hub-spot-ticket-request-dto.ts +37 -0
  109. package/models/create-hub-spot-ticket-response-class.ts +31 -0
  110. package/models/create-priority-request-dto.ts +30 -0
  111. package/models/create-priority-response-class.ts +31 -0
  112. package/models/create-status-request-dto.ts +30 -0
  113. package/models/create-status-response-class.ts +31 -0
  114. package/models/create-task-request-dto.ts +60 -0
  115. package/models/create-task-response-class.ts +31 -0
  116. package/models/get-category-response-class.ts +31 -0
  117. package/models/get-priority-response-class.ts +31 -0
  118. package/models/get-status-response-class.ts +31 -0
  119. package/models/get-task-response-class.ts +31 -0
  120. package/models/hub-spot-ticket-class.ts +55 -0
  121. package/models/hub-spot-ticket-error-class.ts +36 -0
  122. package/models/hub-spot-ticket-name-value-dto.ts +36 -0
  123. package/models/index.ts +32 -0
  124. package/models/inline-response200.ts +48 -0
  125. package/models/inline-response503.ts +48 -0
  126. package/models/list-categories-response-class.ts +49 -0
  127. package/models/list-statuses-response-class.ts +49 -0
  128. package/models/list-tasks-response-class.ts +49 -0
  129. package/models/priority-class.ts +66 -0
  130. package/models/status-class.ts +66 -0
  131. package/models/task-class.ts +105 -0
  132. package/models/update-category-request-dto.ts +36 -0
  133. package/models/update-category-response-class.ts +31 -0
  134. package/models/update-status-request-dto.ts +36 -0
  135. package/models/update-status-response-class.ts +31 -0
  136. package/models/update-task-request-dto.ts +66 -0
  137. package/models/update-task-response-class.ts +31 -0
  138. package/package.json +26 -0
  139. package/tsconfig.json +23 -0
@@ -0,0 +1,651 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL TaskService
5
+ * The EMIL Task API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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 globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateCategoryRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateCategoryResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetCategoryResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListCategoriesResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateCategoryRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateCategoryResponseClass } from '../models';
35
+ /**
36
+ * CategoriesApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const CategoriesApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * This will create category.
43
+ * @summary Create the category
44
+ * @param {CreateCategoryRequestDto} createCategoryRequestDto
45
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ createCategory: async (createCategoryRequestDto: CreateCategoryRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
50
+ // verify required parameter 'createCategoryRequestDto' is not null or undefined
51
+ assertParamExists('createCategory', 'createCategoryRequestDto', createCategoryRequestDto)
52
+ const localVarPath = `/taskservice/v1/categories`;
53
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
55
+ let baseOptions;
56
+ let baseAccessToken;
57
+ if (configuration) {
58
+ baseOptions = configuration.baseOptions;
59
+ baseAccessToken = configuration.accessToken;
60
+ }
61
+
62
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
63
+ const localVarHeaderParameter = {} as any;
64
+ const localVarQueryParameter = {} as any;
65
+
66
+ // authentication bearer required
67
+ // http bearer authentication required
68
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
+
70
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
72
+ }
73
+
74
+
75
+
76
+ localVarHeaderParameter['Content-Type'] = 'application/json';
77
+
78
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
79
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
80
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
81
+ localVarRequestOptions.data = serializeDataIfNeeded(createCategoryRequestDto, localVarRequestOptions, configuration)
82
+
83
+ return {
84
+ url: toPathString(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ };
87
+ },
88
+ /**
89
+ * This will delete category.
90
+ * @summary Delete the category
91
+ * @param {string} code Unique identifier for the object.
92
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ deleteCategory: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
97
+ // verify required parameter 'code' is not null or undefined
98
+ assertParamExists('deleteCategory', 'code', code)
99
+ const localVarPath = `/taskservice/v1/categories/{code}`
100
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
101
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
102
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
103
+ let baseOptions;
104
+ let baseAccessToken;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ baseAccessToken = configuration.accessToken;
108
+ }
109
+
110
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
111
+ const localVarHeaderParameter = {} as any;
112
+ const localVarQueryParameter = {} as any;
113
+
114
+ // authentication bearer required
115
+ // http bearer authentication required
116
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
+
118
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
120
+ }
121
+
122
+
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
+ * This will get category.
135
+ * @summary Retrieve the category
136
+ * @param {string} code
137
+ * @param {string} expand
138
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
139
+ * @param {*} [options] Override http request option.
140
+ * @throws {RequiredError}
141
+ */
142
+ getCategory: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
143
+ // verify required parameter 'code' is not null or undefined
144
+ assertParamExists('getCategory', 'code', code)
145
+ // verify required parameter 'expand' is not null or undefined
146
+ assertParamExists('getCategory', 'expand', expand)
147
+ const localVarPath = `/taskservice/v1/categories/{code}`
148
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
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
+ let baseAccessToken;
153
+ if (configuration) {
154
+ baseOptions = configuration.baseOptions;
155
+ baseAccessToken = configuration.accessToken;
156
+ }
157
+
158
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
159
+ const localVarHeaderParameter = {} as any;
160
+ const localVarQueryParameter = {} as any;
161
+
162
+ // authentication bearer required
163
+ // http bearer authentication required
164
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
165
+
166
+ if (expand !== undefined) {
167
+ localVarQueryParameter['expand'] = expand;
168
+ }
169
+
170
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
171
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
172
+ }
173
+
174
+
175
+
176
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
177
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
178
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
179
+
180
+ return {
181
+ url: toPathString(localVarUrlObj),
182
+ options: localVarRequestOptions,
183
+ };
184
+ },
185
+ /**
186
+ * Retrieves a list of categories.
187
+ * @summary List categories
188
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
189
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
190
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
191
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
192
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ listCategories: async (authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
197
+ const localVarPath = `/taskservice/v1/categories`;
198
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
199
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
200
+ let baseOptions;
201
+ let baseAccessToken;
202
+ if (configuration) {
203
+ baseOptions = configuration.baseOptions;
204
+ baseAccessToken = configuration.accessToken;
205
+ }
206
+
207
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
208
+ const localVarHeaderParameter = {} as any;
209
+ const localVarQueryParameter = {} as any;
210
+
211
+ // authentication bearer required
212
+ // http bearer authentication required
213
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
214
+
215
+ if (filter !== undefined) {
216
+ localVarQueryParameter['filter'] = filter;
217
+ }
218
+
219
+ if (filters !== undefined) {
220
+ localVarQueryParameter['filters'] = filters;
221
+ }
222
+
223
+ if (order !== undefined) {
224
+ localVarQueryParameter['order'] = order;
225
+ }
226
+
227
+ if (expand !== undefined) {
228
+ localVarQueryParameter['expand'] = expand;
229
+ }
230
+
231
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
232
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
233
+ }
234
+
235
+
236
+
237
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
238
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
239
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
240
+
241
+ return {
242
+ url: toPathString(localVarUrlObj),
243
+ options: localVarRequestOptions,
244
+ };
245
+ },
246
+ /**
247
+ * This will update category.
248
+ * @summary Update the category
249
+ * @param {string} code
250
+ * @param {UpdateCategoryRequestDto} updateCategoryRequestDto
251
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ updateCategory: async (code: string, updateCategoryRequestDto: UpdateCategoryRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
256
+ // verify required parameter 'code' is not null or undefined
257
+ assertParamExists('updateCategory', 'code', code)
258
+ // verify required parameter 'updateCategoryRequestDto' is not null or undefined
259
+ assertParamExists('updateCategory', 'updateCategoryRequestDto', updateCategoryRequestDto)
260
+ const localVarPath = `/taskservice/v1/categories/{code}`
261
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
262
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
263
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
264
+ let baseOptions;
265
+ let baseAccessToken;
266
+ if (configuration) {
267
+ baseOptions = configuration.baseOptions;
268
+ baseAccessToken = configuration.accessToken;
269
+ }
270
+
271
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
272
+ const localVarHeaderParameter = {} as any;
273
+ const localVarQueryParameter = {} as any;
274
+
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
278
+
279
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
281
+ }
282
+
283
+
284
+
285
+ localVarHeaderParameter['Content-Type'] = 'application/json';
286
+
287
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
289
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
290
+ localVarRequestOptions.data = serializeDataIfNeeded(updateCategoryRequestDto, localVarRequestOptions, configuration)
291
+
292
+ return {
293
+ url: toPathString(localVarUrlObj),
294
+ options: localVarRequestOptions,
295
+ };
296
+ },
297
+ }
298
+ };
299
+
300
+ /**
301
+ * CategoriesApi - functional programming interface
302
+ * @export
303
+ */
304
+ export const CategoriesApiFp = function(configuration?: Configuration) {
305
+ const localVarAxiosParamCreator = CategoriesApiAxiosParamCreator(configuration)
306
+ return {
307
+ /**
308
+ * This will create category.
309
+ * @summary Create the category
310
+ * @param {CreateCategoryRequestDto} createCategoryRequestDto
311
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ async createCategory(createCategoryRequestDto: CreateCategoryRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCategoryResponseClass>> {
316
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCategory(createCategoryRequestDto, authorization, options);
317
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
318
+ },
319
+ /**
320
+ * This will delete category.
321
+ * @summary Delete the category
322
+ * @param {string} code Unique identifier for the object.
323
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
324
+ * @param {*} [options] Override http request option.
325
+ * @throws {RequiredError}
326
+ */
327
+ async deleteCategory(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
328
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCategory(code, authorization, options);
329
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
330
+ },
331
+ /**
332
+ * This will get category.
333
+ * @summary Retrieve the category
334
+ * @param {string} code
335
+ * @param {string} expand
336
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ async getCategory(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCategoryResponseClass>> {
341
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCategory(code, expand, authorization, options);
342
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
343
+ },
344
+ /**
345
+ * Retrieves a list of categories.
346
+ * @summary List categories
347
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
348
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
349
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
350
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
351
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ async listCategories(authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCategoriesResponseClass>> {
356
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCategories(authorization, filter, filters, order, expand, options);
357
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
358
+ },
359
+ /**
360
+ * This will update category.
361
+ * @summary Update the category
362
+ * @param {string} code
363
+ * @param {UpdateCategoryRequestDto} updateCategoryRequestDto
364
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ async updateCategory(code: string, updateCategoryRequestDto: UpdateCategoryRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCategoryResponseClass>> {
369
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateCategory(code, updateCategoryRequestDto, authorization, options);
370
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
371
+ },
372
+ }
373
+ };
374
+
375
+ /**
376
+ * CategoriesApi - factory interface
377
+ * @export
378
+ */
379
+ export const CategoriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
380
+ const localVarFp = CategoriesApiFp(configuration)
381
+ return {
382
+ /**
383
+ * This will create category.
384
+ * @summary Create the category
385
+ * @param {CreateCategoryRequestDto} createCategoryRequestDto
386
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ createCategory(createCategoryRequestDto: CreateCategoryRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCategoryResponseClass> {
391
+ return localVarFp.createCategory(createCategoryRequestDto, authorization, options).then((request) => request(axios, basePath));
392
+ },
393
+ /**
394
+ * This will delete category.
395
+ * @summary Delete the category
396
+ * @param {string} code Unique identifier for the object.
397
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
398
+ * @param {*} [options] Override http request option.
399
+ * @throws {RequiredError}
400
+ */
401
+ deleteCategory(code: string, authorization?: string, options?: any): AxiosPromise<void> {
402
+ return localVarFp.deleteCategory(code, authorization, options).then((request) => request(axios, basePath));
403
+ },
404
+ /**
405
+ * This will get category.
406
+ * @summary Retrieve the category
407
+ * @param {string} code
408
+ * @param {string} expand
409
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ */
413
+ getCategory(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetCategoryResponseClass> {
414
+ return localVarFp.getCategory(code, expand, authorization, options).then((request) => request(axios, basePath));
415
+ },
416
+ /**
417
+ * Retrieves a list of categories.
418
+ * @summary List categories
419
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
420
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
421
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
422
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
423
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ listCategories(authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListCategoriesResponseClass> {
428
+ return localVarFp.listCategories(authorization, filter, filters, order, expand, options).then((request) => request(axios, basePath));
429
+ },
430
+ /**
431
+ * This will update category.
432
+ * @summary Update the category
433
+ * @param {string} code
434
+ * @param {UpdateCategoryRequestDto} updateCategoryRequestDto
435
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ updateCategory(code: string, updateCategoryRequestDto: UpdateCategoryRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateCategoryResponseClass> {
440
+ return localVarFp.updateCategory(code, updateCategoryRequestDto, authorization, options).then((request) => request(axios, basePath));
441
+ },
442
+ };
443
+ };
444
+
445
+ /**
446
+ * Request parameters for createCategory operation in CategoriesApi.
447
+ * @export
448
+ * @interface CategoriesApiCreateCategoryRequest
449
+ */
450
+ export interface CategoriesApiCreateCategoryRequest {
451
+ /**
452
+ *
453
+ * @type {CreateCategoryRequestDto}
454
+ * @memberof CategoriesApiCreateCategory
455
+ */
456
+ readonly createCategoryRequestDto: CreateCategoryRequestDto
457
+
458
+ /**
459
+ * Bearer Token: provided by the login endpoint under the name accessToken.
460
+ * @type {string}
461
+ * @memberof CategoriesApiCreateCategory
462
+ */
463
+ readonly authorization?: string
464
+ }
465
+
466
+ /**
467
+ * Request parameters for deleteCategory operation in CategoriesApi.
468
+ * @export
469
+ * @interface CategoriesApiDeleteCategoryRequest
470
+ */
471
+ export interface CategoriesApiDeleteCategoryRequest {
472
+ /**
473
+ * Unique identifier for the object.
474
+ * @type {string}
475
+ * @memberof CategoriesApiDeleteCategory
476
+ */
477
+ readonly code: string
478
+
479
+ /**
480
+ * Bearer Token: provided by the login endpoint under the name accessToken.
481
+ * @type {string}
482
+ * @memberof CategoriesApiDeleteCategory
483
+ */
484
+ readonly authorization?: string
485
+ }
486
+
487
+ /**
488
+ * Request parameters for getCategory operation in CategoriesApi.
489
+ * @export
490
+ * @interface CategoriesApiGetCategoryRequest
491
+ */
492
+ export interface CategoriesApiGetCategoryRequest {
493
+ /**
494
+ *
495
+ * @type {string}
496
+ * @memberof CategoriesApiGetCategory
497
+ */
498
+ readonly code: string
499
+
500
+ /**
501
+ *
502
+ * @type {string}
503
+ * @memberof CategoriesApiGetCategory
504
+ */
505
+ readonly expand: string
506
+
507
+ /**
508
+ * Bearer Token: provided by the login endpoint under the name accessToken.
509
+ * @type {string}
510
+ * @memberof CategoriesApiGetCategory
511
+ */
512
+ readonly authorization?: string
513
+ }
514
+
515
+ /**
516
+ * Request parameters for listCategories operation in CategoriesApi.
517
+ * @export
518
+ * @interface CategoriesApiListCategoriesRequest
519
+ */
520
+ export interface CategoriesApiListCategoriesRequest {
521
+ /**
522
+ * Bearer Token: provided by the login endpoint under the name accessToken.
523
+ * @type {string}
524
+ * @memberof CategoriesApiListCategories
525
+ */
526
+ readonly authorization?: string
527
+
528
+ /**
529
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
530
+ * @type {string}
531
+ * @memberof CategoriesApiListCategories
532
+ */
533
+ readonly filter?: string
534
+
535
+ /**
536
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, createdAt&lt;/i&gt;
537
+ * @type {string}
538
+ * @memberof CategoriesApiListCategories
539
+ */
540
+ readonly filters?: string
541
+
542
+ /**
543
+ * Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt&lt;/i&gt;
544
+ * @type {string}
545
+ * @memberof CategoriesApiListCategories
546
+ */
547
+ readonly order?: string
548
+
549
+ /**
550
+ * Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
551
+ * @type {string}
552
+ * @memberof CategoriesApiListCategories
553
+ */
554
+ readonly expand?: string
555
+ }
556
+
557
+ /**
558
+ * Request parameters for updateCategory operation in CategoriesApi.
559
+ * @export
560
+ * @interface CategoriesApiUpdateCategoryRequest
561
+ */
562
+ export interface CategoriesApiUpdateCategoryRequest {
563
+ /**
564
+ *
565
+ * @type {string}
566
+ * @memberof CategoriesApiUpdateCategory
567
+ */
568
+ readonly code: string
569
+
570
+ /**
571
+ *
572
+ * @type {UpdateCategoryRequestDto}
573
+ * @memberof CategoriesApiUpdateCategory
574
+ */
575
+ readonly updateCategoryRequestDto: UpdateCategoryRequestDto
576
+
577
+ /**
578
+ * Bearer Token: provided by the login endpoint under the name accessToken.
579
+ * @type {string}
580
+ * @memberof CategoriesApiUpdateCategory
581
+ */
582
+ readonly authorization?: string
583
+ }
584
+
585
+ /**
586
+ * CategoriesApi - object-oriented interface
587
+ * @export
588
+ * @class CategoriesApi
589
+ * @extends {BaseAPI}
590
+ */
591
+ export class CategoriesApi extends BaseAPI {
592
+ /**
593
+ * This will create category.
594
+ * @summary Create the category
595
+ * @param {CategoriesApiCreateCategoryRequest} requestParameters Request parameters.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ * @memberof CategoriesApi
599
+ */
600
+ public createCategory(requestParameters: CategoriesApiCreateCategoryRequest, options?: AxiosRequestConfig) {
601
+ return CategoriesApiFp(this.configuration).createCategory(requestParameters.createCategoryRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
602
+ }
603
+
604
+ /**
605
+ * This will delete category.
606
+ * @summary Delete the category
607
+ * @param {CategoriesApiDeleteCategoryRequest} requestParameters Request parameters.
608
+ * @param {*} [options] Override http request option.
609
+ * @throws {RequiredError}
610
+ * @memberof CategoriesApi
611
+ */
612
+ public deleteCategory(requestParameters: CategoriesApiDeleteCategoryRequest, options?: AxiosRequestConfig) {
613
+ return CategoriesApiFp(this.configuration).deleteCategory(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
614
+ }
615
+
616
+ /**
617
+ * This will get category.
618
+ * @summary Retrieve the category
619
+ * @param {CategoriesApiGetCategoryRequest} requestParameters Request parameters.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ * @memberof CategoriesApi
623
+ */
624
+ public getCategory(requestParameters: CategoriesApiGetCategoryRequest, options?: AxiosRequestConfig) {
625
+ return CategoriesApiFp(this.configuration).getCategory(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
626
+ }
627
+
628
+ /**
629
+ * Retrieves a list of categories.
630
+ * @summary List categories
631
+ * @param {CategoriesApiListCategoriesRequest} requestParameters Request parameters.
632
+ * @param {*} [options] Override http request option.
633
+ * @throws {RequiredError}
634
+ * @memberof CategoriesApi
635
+ */
636
+ public listCategories(requestParameters: CategoriesApiListCategoriesRequest = {}, options?: AxiosRequestConfig) {
637
+ return CategoriesApiFp(this.configuration).listCategories(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
638
+ }
639
+
640
+ /**
641
+ * This will update category.
642
+ * @summary Update the category
643
+ * @param {CategoriesApiUpdateCategoryRequest} requestParameters Request parameters.
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ * @memberof CategoriesApi
647
+ */
648
+ public updateCategory(requestParameters: CategoriesApiUpdateCategoryRequest, options?: AxiosRequestConfig) {
649
+ return CategoriesApiFp(this.configuration).updateCategory(requestParameters.code, requestParameters.updateCategoryRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
650
+ }
651
+ }