@emilgroup/task-sdk-node 1.2.1-beta.23 → 1.2.1-beta.25

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