@emilgroup/task-sdk 1.9.0 → 1.9.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 (41) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/api/filters-api.ts +677 -0
  4. package/api/task-client-api.ts +8 -8
  5. package/api/tasks-api.ts +8 -8
  6. package/api.ts +2 -0
  7. package/dist/api/filters-api.d.ts +384 -0
  8. package/dist/api/filters-api.js +636 -0
  9. package/dist/api/task-client-api.d.ts +8 -8
  10. package/dist/api/task-client-api.js +6 -6
  11. package/dist/api/tasks-api.d.ts +8 -8
  12. package/dist/api/tasks-api.js +6 -6
  13. package/dist/api.d.ts +1 -0
  14. package/dist/api.js +1 -0
  15. package/dist/models/create-filter-request-dto.d.ts +66 -0
  16. package/dist/models/create-filter-request-dto.js +15 -0
  17. package/dist/models/create-filter-response-class.d.ts +25 -0
  18. package/dist/models/create-filter-response-class.js +15 -0
  19. package/dist/models/filter-class.d.ts +102 -0
  20. package/dist/models/filter-class.js +15 -0
  21. package/dist/models/get-filter-response-class.d.ts +25 -0
  22. package/dist/models/get-filter-response-class.js +15 -0
  23. package/dist/models/index.d.ts +7 -0
  24. package/dist/models/index.js +7 -0
  25. package/dist/models/list-filters-response-class.d.ts +43 -0
  26. package/dist/models/list-filters-response-class.js +15 -0
  27. package/dist/models/task-class.d.ts +6 -0
  28. package/dist/models/update-filter-request-dto.d.ts +60 -0
  29. package/dist/models/update-filter-request-dto.js +15 -0
  30. package/dist/models/update-filter-response-class.d.ts +25 -0
  31. package/dist/models/update-filter-response-class.js +15 -0
  32. package/models/create-filter-request-dto.ts +72 -0
  33. package/models/create-filter-response-class.ts +31 -0
  34. package/models/filter-class.ts +108 -0
  35. package/models/get-filter-response-class.ts +31 -0
  36. package/models/index.ts +7 -0
  37. package/models/list-filters-response-class.ts +49 -0
  38. package/models/task-class.ts +6 -0
  39. package/models/update-filter-request-dto.ts +66 -0
  40. package/models/update-filter-response-class.ts +31 -0
  41. package/package.json +1 -1
@@ -0,0 +1,677 @@
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 { CreateFilterRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateFilterResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetFilterResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListFiltersResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateFilterRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateFilterResponseClass } from '../models';
35
+ /**
36
+ * FiltersApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const FiltersApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * Create a routing filter targeting a user-group. **Required Permissions** \"task-management.task-filters.create\"
43
+ * @summary Create the filter
44
+ * @param {CreateFilterRequestDto} createFilterRequestDto
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
+ createFilter: async (createFilterRequestDto: CreateFilterRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
50
+ // verify required parameter 'createFilterRequestDto' is not null or undefined
51
+ assertParamExists('createFilter', 'createFilterRequestDto', createFilterRequestDto)
52
+ const localVarPath = `/taskservice/v1/filters`;
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(createFilterRequestDto, localVarRequestOptions, configuration)
82
+
83
+ return {
84
+ url: toPathString(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ };
87
+ },
88
+ /**
89
+ * Delete a filter by its code. **Required Permissions** \"task-management.task-filters.delete\"
90
+ * @summary Delete the filter
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
+ deleteFilter: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
97
+ // verify required parameter 'code' is not null or undefined
98
+ assertParamExists('deleteFilter', 'code', code)
99
+ const localVarPath = `/taskservice/v1/filters/{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
+ * Fetch a filter by its code. **Required Permissions** \"task-management.task-filters.view\"
135
+ * @summary Retrieve the filter
136
+ * @param {string} code Unique identifier for the object.
137
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getFilter: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ // verify required parameter 'code' is not null or undefined
143
+ assertParamExists('getFilter', 'code', code)
144
+ const localVarPath = `/taskservice/v1/filters/{code}`
145
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ let baseAccessToken;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ baseAccessToken = configuration.accessToken;
153
+ }
154
+
155
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
156
+ const localVarHeaderParameter = {} as any;
157
+ const localVarQueryParameter = {} as any;
158
+
159
+ // authentication bearer required
160
+ // http bearer authentication required
161
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
162
+
163
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
164
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
165
+ }
166
+
167
+
168
+
169
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
171
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
172
+
173
+ return {
174
+ url: toPathString(localVarUrlObj),
175
+ options: localVarRequestOptions,
176
+ };
177
+ },
178
+ /**
179
+ * Returns a list of filters you have previously created. The filters are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"task-management.task-filters.view\"
180
+ * @summary List filters
181
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
182
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
183
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
184
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
185
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
186
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
187
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
188
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ */
192
+ listFilters: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
193
+ const localVarPath = `/taskservice/v1/filters`;
194
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
195
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
196
+ let baseOptions;
197
+ let baseAccessToken;
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ baseAccessToken = configuration.accessToken;
201
+ }
202
+
203
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
204
+ const localVarHeaderParameter = {} as any;
205
+ const localVarQueryParameter = {} as any;
206
+
207
+ // authentication bearer required
208
+ // http bearer authentication required
209
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
210
+
211
+ if (pageSize !== undefined) {
212
+ localVarQueryParameter['pageSize'] = pageSize;
213
+ }
214
+
215
+ if (pageToken !== undefined) {
216
+ localVarQueryParameter['pageToken'] = pageToken;
217
+ }
218
+
219
+ if (filter !== undefined) {
220
+ localVarQueryParameter['filter'] = filter;
221
+ }
222
+
223
+ if (search !== undefined) {
224
+ localVarQueryParameter['search'] = search;
225
+ }
226
+
227
+ if (order !== undefined) {
228
+ localVarQueryParameter['order'] = order;
229
+ }
230
+
231
+ if (expand !== undefined) {
232
+ localVarQueryParameter['expand'] = expand;
233
+ }
234
+
235
+ if (filters !== undefined) {
236
+ localVarQueryParameter['filters'] = filters;
237
+ }
238
+
239
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
240
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
241
+ }
242
+
243
+
244
+
245
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
246
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
247
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
248
+
249
+ return {
250
+ url: toPathString(localVarUrlObj),
251
+ options: localVarRequestOptions,
252
+ };
253
+ },
254
+ /**
255
+ * Update a filter (slug, name, description, expression, target group, priority, is_active, is_fallback). **Required Permissions** \"task-management.task-filters.update\"
256
+ * @summary Update the filter
257
+ * @param {string} code Unique identifier for the object.
258
+ * @param {UpdateFilterRequestDto} updateFilterRequestDto
259
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ updateFilter: async (code: string, updateFilterRequestDto: UpdateFilterRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
264
+ // verify required parameter 'code' is not null or undefined
265
+ assertParamExists('updateFilter', 'code', code)
266
+ // verify required parameter 'updateFilterRequestDto' is not null or undefined
267
+ assertParamExists('updateFilter', 'updateFilterRequestDto', updateFilterRequestDto)
268
+ const localVarPath = `/taskservice/v1/filters/{code}`
269
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
270
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
271
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
272
+ let baseOptions;
273
+ let baseAccessToken;
274
+ if (configuration) {
275
+ baseOptions = configuration.baseOptions;
276
+ baseAccessToken = configuration.accessToken;
277
+ }
278
+
279
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
280
+ const localVarHeaderParameter = {} as any;
281
+ const localVarQueryParameter = {} as any;
282
+
283
+ // authentication bearer required
284
+ // http bearer authentication required
285
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
286
+
287
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
288
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
289
+ }
290
+
291
+
292
+
293
+ localVarHeaderParameter['Content-Type'] = 'application/json';
294
+
295
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
296
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
297
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
298
+ localVarRequestOptions.data = serializeDataIfNeeded(updateFilterRequestDto, localVarRequestOptions, configuration)
299
+
300
+ return {
301
+ url: toPathString(localVarUrlObj),
302
+ options: localVarRequestOptions,
303
+ };
304
+ },
305
+ }
306
+ };
307
+
308
+ /**
309
+ * FiltersApi - functional programming interface
310
+ * @export
311
+ */
312
+ export const FiltersApiFp = function(configuration?: Configuration) {
313
+ const localVarAxiosParamCreator = FiltersApiAxiosParamCreator(configuration)
314
+ return {
315
+ /**
316
+ * Create a routing filter targeting a user-group. **Required Permissions** \"task-management.task-filters.create\"
317
+ * @summary Create the filter
318
+ * @param {CreateFilterRequestDto} createFilterRequestDto
319
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ async createFilter(createFilterRequestDto: CreateFilterRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateFilterResponseClass>> {
324
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFilter(createFilterRequestDto, authorization, options);
325
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
326
+ },
327
+ /**
328
+ * Delete a filter by its code. **Required Permissions** \"task-management.task-filters.delete\"
329
+ * @summary Delete the filter
330
+ * @param {string} code Unique identifier for the object.
331
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ async deleteFilter(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
336
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFilter(code, authorization, options);
337
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
338
+ },
339
+ /**
340
+ * Fetch a filter by its code. **Required Permissions** \"task-management.task-filters.view\"
341
+ * @summary Retrieve the filter
342
+ * @param {string} code Unique identifier for the object.
343
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ async getFilter(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetFilterResponseClass>> {
348
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFilter(code, authorization, options);
349
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
350
+ },
351
+ /**
352
+ * Returns a list of filters you have previously created. The filters are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"task-management.task-filters.view\"
353
+ * @summary List filters
354
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
355
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
356
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
357
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
358
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
359
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
360
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
361
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ */
365
+ async listFilters(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListFiltersResponseClass>> {
366
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFilters(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
367
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
368
+ },
369
+ /**
370
+ * Update a filter (slug, name, description, expression, target group, priority, is_active, is_fallback). **Required Permissions** \"task-management.task-filters.update\"
371
+ * @summary Update the filter
372
+ * @param {string} code Unique identifier for the object.
373
+ * @param {UpdateFilterRequestDto} updateFilterRequestDto
374
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ async updateFilter(code: string, updateFilterRequestDto: UpdateFilterRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateFilterResponseClass>> {
379
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateFilter(code, updateFilterRequestDto, authorization, options);
380
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
381
+ },
382
+ }
383
+ };
384
+
385
+ /**
386
+ * FiltersApi - factory interface
387
+ * @export
388
+ */
389
+ export const FiltersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
390
+ const localVarFp = FiltersApiFp(configuration)
391
+ return {
392
+ /**
393
+ * Create a routing filter targeting a user-group. **Required Permissions** \"task-management.task-filters.create\"
394
+ * @summary Create the filter
395
+ * @param {CreateFilterRequestDto} createFilterRequestDto
396
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ createFilter(createFilterRequestDto: CreateFilterRequestDto, authorization?: string, options?: any): AxiosPromise<CreateFilterResponseClass> {
401
+ return localVarFp.createFilter(createFilterRequestDto, authorization, options).then((request) => request(axios, basePath));
402
+ },
403
+ /**
404
+ * Delete a filter by its code. **Required Permissions** \"task-management.task-filters.delete\"
405
+ * @summary Delete the filter
406
+ * @param {string} code Unique identifier for the object.
407
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ deleteFilter(code: string, authorization?: string, options?: any): AxiosPromise<void> {
412
+ return localVarFp.deleteFilter(code, authorization, options).then((request) => request(axios, basePath));
413
+ },
414
+ /**
415
+ * Fetch a filter by its code. **Required Permissions** \"task-management.task-filters.view\"
416
+ * @summary Retrieve the filter
417
+ * @param {string} code Unique identifier for the object.
418
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ getFilter(code: string, authorization?: string, options?: any): AxiosPromise<GetFilterResponseClass> {
423
+ return localVarFp.getFilter(code, authorization, options).then((request) => request(axios, basePath));
424
+ },
425
+ /**
426
+ * Returns a list of filters you have previously created. The filters are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"task-management.task-filters.view\"
427
+ * @summary List filters
428
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
430
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
431
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
432
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
433
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
434
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
435
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ listFilters(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListFiltersResponseClass> {
440
+ return localVarFp.listFilters(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
441
+ },
442
+ /**
443
+ * Update a filter (slug, name, description, expression, target group, priority, is_active, is_fallback). **Required Permissions** \"task-management.task-filters.update\"
444
+ * @summary Update the filter
445
+ * @param {string} code Unique identifier for the object.
446
+ * @param {UpdateFilterRequestDto} updateFilterRequestDto
447
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ */
451
+ updateFilter(code: string, updateFilterRequestDto: UpdateFilterRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateFilterResponseClass> {
452
+ return localVarFp.updateFilter(code, updateFilterRequestDto, authorization, options).then((request) => request(axios, basePath));
453
+ },
454
+ };
455
+ };
456
+
457
+ /**
458
+ * Request parameters for createFilter operation in FiltersApi.
459
+ * @export
460
+ * @interface FiltersApiCreateFilterRequest
461
+ */
462
+ export interface FiltersApiCreateFilterRequest {
463
+ /**
464
+ *
465
+ * @type {CreateFilterRequestDto}
466
+ * @memberof FiltersApiCreateFilter
467
+ */
468
+ readonly createFilterRequestDto: CreateFilterRequestDto
469
+
470
+ /**
471
+ * Bearer Token: provided by the login endpoint under the name accessToken.
472
+ * @type {string}
473
+ * @memberof FiltersApiCreateFilter
474
+ */
475
+ readonly authorization?: string
476
+ }
477
+
478
+ /**
479
+ * Request parameters for deleteFilter operation in FiltersApi.
480
+ * @export
481
+ * @interface FiltersApiDeleteFilterRequest
482
+ */
483
+ export interface FiltersApiDeleteFilterRequest {
484
+ /**
485
+ * Unique identifier for the object.
486
+ * @type {string}
487
+ * @memberof FiltersApiDeleteFilter
488
+ */
489
+ readonly code: string
490
+
491
+ /**
492
+ * Bearer Token: provided by the login endpoint under the name accessToken.
493
+ * @type {string}
494
+ * @memberof FiltersApiDeleteFilter
495
+ */
496
+ readonly authorization?: string
497
+ }
498
+
499
+ /**
500
+ * Request parameters for getFilter operation in FiltersApi.
501
+ * @export
502
+ * @interface FiltersApiGetFilterRequest
503
+ */
504
+ export interface FiltersApiGetFilterRequest {
505
+ /**
506
+ * Unique identifier for the object.
507
+ * @type {string}
508
+ * @memberof FiltersApiGetFilter
509
+ */
510
+ readonly code: string
511
+
512
+ /**
513
+ * Bearer Token: provided by the login endpoint under the name accessToken.
514
+ * @type {string}
515
+ * @memberof FiltersApiGetFilter
516
+ */
517
+ readonly authorization?: string
518
+ }
519
+
520
+ /**
521
+ * Request parameters for listFilters operation in FiltersApi.
522
+ * @export
523
+ * @interface FiltersApiListFiltersRequest
524
+ */
525
+ export interface FiltersApiListFiltersRequest {
526
+ /**
527
+ * Bearer Token: provided by the login endpoint under the name accessToken.
528
+ * @type {string}
529
+ * @memberof FiltersApiListFilters
530
+ */
531
+ readonly authorization?: string
532
+
533
+ /**
534
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
535
+ * @type {number}
536
+ * @memberof FiltersApiListFilters
537
+ */
538
+ readonly pageSize?: number
539
+
540
+ /**
541
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
542
+ * @type {string}
543
+ * @memberof FiltersApiListFilters
544
+ */
545
+ readonly pageToken?: string
546
+
547
+ /**
548
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
549
+ * @type {string}
550
+ * @memberof FiltersApiListFilters
551
+ */
552
+ readonly filter?: string
553
+
554
+ /**
555
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
556
+ * @type {string}
557
+ * @memberof FiltersApiListFilters
558
+ */
559
+ readonly search?: string
560
+
561
+ /**
562
+ * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
563
+ * @type {string}
564
+ * @memberof FiltersApiListFilters
565
+ */
566
+ readonly order?: string
567
+
568
+ /**
569
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
570
+ * @type {string}
571
+ * @memberof FiltersApiListFilters
572
+ */
573
+ readonly expand?: string
574
+
575
+ /**
576
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
577
+ * @type {string}
578
+ * @memberof FiltersApiListFilters
579
+ */
580
+ readonly filters?: string
581
+ }
582
+
583
+ /**
584
+ * Request parameters for updateFilter operation in FiltersApi.
585
+ * @export
586
+ * @interface FiltersApiUpdateFilterRequest
587
+ */
588
+ export interface FiltersApiUpdateFilterRequest {
589
+ /**
590
+ * Unique identifier for the object.
591
+ * @type {string}
592
+ * @memberof FiltersApiUpdateFilter
593
+ */
594
+ readonly code: string
595
+
596
+ /**
597
+ *
598
+ * @type {UpdateFilterRequestDto}
599
+ * @memberof FiltersApiUpdateFilter
600
+ */
601
+ readonly updateFilterRequestDto: UpdateFilterRequestDto
602
+
603
+ /**
604
+ * Bearer Token: provided by the login endpoint under the name accessToken.
605
+ * @type {string}
606
+ * @memberof FiltersApiUpdateFilter
607
+ */
608
+ readonly authorization?: string
609
+ }
610
+
611
+ /**
612
+ * FiltersApi - object-oriented interface
613
+ * @export
614
+ * @class FiltersApi
615
+ * @extends {BaseAPI}
616
+ */
617
+ export class FiltersApi extends BaseAPI {
618
+ /**
619
+ * Create a routing filter targeting a user-group. **Required Permissions** \"task-management.task-filters.create\"
620
+ * @summary Create the filter
621
+ * @param {FiltersApiCreateFilterRequest} requestParameters Request parameters.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ * @memberof FiltersApi
625
+ */
626
+ public createFilter(requestParameters: FiltersApiCreateFilterRequest, options?: AxiosRequestConfig) {
627
+ return FiltersApiFp(this.configuration).createFilter(requestParameters.createFilterRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
628
+ }
629
+
630
+ /**
631
+ * Delete a filter by its code. **Required Permissions** \"task-management.task-filters.delete\"
632
+ * @summary Delete the filter
633
+ * @param {FiltersApiDeleteFilterRequest} requestParameters Request parameters.
634
+ * @param {*} [options] Override http request option.
635
+ * @throws {RequiredError}
636
+ * @memberof FiltersApi
637
+ */
638
+ public deleteFilter(requestParameters: FiltersApiDeleteFilterRequest, options?: AxiosRequestConfig) {
639
+ return FiltersApiFp(this.configuration).deleteFilter(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
640
+ }
641
+
642
+ /**
643
+ * Fetch a filter by its code. **Required Permissions** \"task-management.task-filters.view\"
644
+ * @summary Retrieve the filter
645
+ * @param {FiltersApiGetFilterRequest} requestParameters Request parameters.
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ * @memberof FiltersApi
649
+ */
650
+ public getFilter(requestParameters: FiltersApiGetFilterRequest, options?: AxiosRequestConfig) {
651
+ return FiltersApiFp(this.configuration).getFilter(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
652
+ }
653
+
654
+ /**
655
+ * Returns a list of filters you have previously created. The filters are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"task-management.task-filters.view\"
656
+ * @summary List filters
657
+ * @param {FiltersApiListFiltersRequest} requestParameters Request parameters.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ * @memberof FiltersApi
661
+ */
662
+ public listFilters(requestParameters: FiltersApiListFiltersRequest = {}, options?: AxiosRequestConfig) {
663
+ return FiltersApiFp(this.configuration).listFilters(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
664
+ }
665
+
666
+ /**
667
+ * Update a filter (slug, name, description, expression, target group, priority, is_active, is_fallback). **Required Permissions** \"task-management.task-filters.update\"
668
+ * @summary Update the filter
669
+ * @param {FiltersApiUpdateFilterRequest} requestParameters Request parameters.
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ * @memberof FiltersApi
673
+ */
674
+ public updateFilter(requestParameters: FiltersApiUpdateFilterRequest, options?: AxiosRequestConfig) {
675
+ return FiltersApiFp(this.configuration).updateFilter(requestParameters.code, requestParameters.updateFilterRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
676
+ }
677
+ }