@emilgroup/task-sdk-node 1.0.3 → 1.1.0

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