@emilgroup/task-sdk-node 1.7.1-beta.4 → 1.7.1-beta.41

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 (64) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/api/assignees-api.ts +4 -2
  4. package/api/categories-api.ts +20 -10
  5. package/api/filters-api.ts +153 -34
  6. package/api/hub-spot-api.ts +4 -2
  7. package/api/reminders-api.ts +28 -14
  8. package/api/statuses-api.ts +20 -10
  9. package/api/task-client-api.ts +329 -42
  10. package/api/tasks-api.ts +281 -18
  11. package/common.ts +3 -2
  12. package/dist/api/assignees-api.d.ts +1 -1
  13. package/dist/api/assignees-api.js +4 -3
  14. package/dist/api/categories-api.d.ts +5 -5
  15. package/dist/api/categories-api.js +29 -18
  16. package/dist/api/filters-api.d.ts +86 -29
  17. package/dist/api/filters-api.js +147 -38
  18. package/dist/api/health-api.d.ts +1 -1
  19. package/dist/api/hub-spot-api.d.ts +1 -1
  20. package/dist/api/hub-spot-api.js +7 -4
  21. package/dist/api/reminders-api.d.ts +7 -7
  22. package/dist/api/reminders-api.js +40 -25
  23. package/dist/api/statuses-api.d.ts +5 -5
  24. package/dist/api/statuses-api.js +29 -18
  25. package/dist/api/task-client-api.d.ts +165 -25
  26. package/dist/api/task-client-api.js +313 -67
  27. package/dist/api/tasks-api.d.ts +153 -13
  28. package/dist/api/tasks-api.js +244 -24
  29. package/dist/common.d.ts +1 -1
  30. package/dist/common.js +1 -0
  31. package/dist/models/add-secondary-link-response-class.d.ts +25 -0
  32. package/dist/models/add-secondary-link-response-class.js +15 -0
  33. package/dist/models/create-task-request-dto.d.ts +13 -0
  34. package/dist/models/dry-run-filter-clause-class.d.ts +42 -0
  35. package/dist/models/dry-run-filter-clause-class.js +15 -0
  36. package/dist/models/dry-run-filter-request-dto.d.ts +30 -0
  37. package/dist/models/dry-run-filter-request-dto.js +15 -0
  38. package/dist/models/dry-run-filter-response-class.d.ts +37 -0
  39. package/dist/models/dry-run-filter-response-class.js +15 -0
  40. package/dist/models/entity-ref-class.d.ts +34 -0
  41. package/dist/models/entity-ref-class.js +19 -0
  42. package/dist/models/entity-ref-dto.d.ts +34 -0
  43. package/dist/models/entity-ref-dto.js +19 -0
  44. package/dist/models/index.d.ts +8 -0
  45. package/dist/models/index.js +8 -0
  46. package/dist/models/patch-task-request-dto.d.ts +12 -0
  47. package/dist/models/remove-secondary-link-response-class.d.ts +25 -0
  48. package/dist/models/remove-secondary-link-response-class.js +15 -0
  49. package/dist/models/secondary-link-class.d.ts +31 -0
  50. package/dist/models/secondary-link-class.js +15 -0
  51. package/dist/models/task-class.d.ts +7 -0
  52. package/models/add-secondary-link-response-class.ts +31 -0
  53. package/models/create-task-request-dto.ts +13 -0
  54. package/models/dry-run-filter-clause-class.ts +48 -0
  55. package/models/dry-run-filter-request-dto.ts +36 -0
  56. package/models/dry-run-filter-response-class.ts +43 -0
  57. package/models/entity-ref-class.ts +43 -0
  58. package/models/entity-ref-dto.ts +43 -0
  59. package/models/index.ts +8 -0
  60. package/models/patch-task-request-dto.ts +12 -0
  61. package/models/remove-secondary-link-response-class.ts +31 -0
  62. package/models/secondary-link-class.ts +37 -0
  63. package/models/task-class.ts +7 -0
  64. package/package.json +2 -2
package/api/tasks-api.ts CHANGED
@@ -21,10 +21,14 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { AddSecondaryLinkResponseClass } from '../models';
25
+ // @ts-ignore
24
26
  import { CreateTaskRequestDto } from '../models';
25
27
  // @ts-ignore
26
28
  import { CreateTaskResponseClass } from '../models';
27
29
  // @ts-ignore
30
+ import { EntityRefDto } from '../models';
31
+ // @ts-ignore
28
32
  import { GetTaskResponseClass } from '../models';
29
33
  // @ts-ignore
30
34
  import { ListTasksResponseClass } from '../models';
@@ -32,6 +36,8 @@ import { ListTasksResponseClass } from '../models';
32
36
  import { PatchTaskRequestDto } from '../models';
33
37
  // @ts-ignore
34
38
  import { PatchTaskResponseClass } from '../models';
39
+ // @ts-ignore
40
+ import { RemoveSecondaryLinkResponseClass } from '../models';
35
41
  // URLSearchParams not necessarily used
36
42
  // @ts-ignore
37
43
  import { URL, URLSearchParams } from 'url';
@@ -42,6 +48,59 @@ const FormData = require('form-data');
42
48
  */
43
49
  export const TasksApiAxiosParamCreator = function (configuration?: Configuration) {
44
50
  return {
51
+ /**
52
+ * Adds a secondary link from a task to a record in another service, for example an email thread. The record must exist. Adding a record that is already linked returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
53
+ * @summary Create the task secondary link
54
+ * @param {string} code
55
+ * @param {EntityRefDto} entityRefDto
56
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ addSecondaryLink: async (code: string, entityRefDto: EntityRefDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
61
+ // verify required parameter 'code' is not null or undefined
62
+ assertParamExists('addSecondaryLink', 'code', code)
63
+ // verify required parameter 'entityRefDto' is not null or undefined
64
+ assertParamExists('addSecondaryLink', 'entityRefDto', entityRefDto)
65
+ const localVarPath = `/taskservice/v1/tasks/{code}/secondary-links`
66
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
67
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
68
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
69
+ let baseOptions;
70
+ let baseAccessToken;
71
+ if (configuration) {
72
+ baseOptions = configuration.baseOptions;
73
+ baseAccessToken = configuration.accessToken;
74
+ }
75
+
76
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
77
+ const localVarHeaderParameter = {} as any;
78
+ const localVarQueryParameter = {} as any;
79
+
80
+ // authentication bearer required
81
+ // http bearer authentication required
82
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
83
+
84
+ // Only Authorization falls back to the configured token; an empty value is never sent.
85
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
86
+ if (authorizationValue) {
87
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
88
+ }
89
+
90
+
91
+
92
+ localVarHeaderParameter['Content-Type'] = 'application/json';
93
+
94
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
95
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
96
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
97
+ localVarRequestOptions.data = serializeDataIfNeeded(entityRefDto, localVarRequestOptions, configuration)
98
+
99
+ return {
100
+ url: toPathString(localVarUrlObj),
101
+ options: localVarRequestOptions,
102
+ };
103
+ },
45
104
  /**
46
105
  * This will create a task. **Required Permissions** \"task-management.tasks.create\"
47
106
  * @summary Create the task
@@ -71,8 +130,10 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
71
130
  // http bearer authentication required
72
131
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
73
132
 
74
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
75
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
133
+ // Only Authorization falls back to the configured token; an empty value is never sent.
134
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
76
137
  }
77
138
 
78
139
 
@@ -119,8 +180,10 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
119
180
  // http bearer authentication required
120
181
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
182
 
122
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ // Only Authorization falls back to the configured token; an empty value is never sent.
184
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
185
+ if (authorizationValue) {
186
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
124
187
  }
125
188
 
126
189
 
@@ -169,8 +232,10 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
169
232
  localVarQueryParameter['expand'] = expand;
170
233
  }
171
234
 
172
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
235
+ // Only Authorization falls back to the configured token; an empty value is never sent.
236
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
237
+ if (authorizationValue) {
238
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
174
239
  }
175
240
 
176
241
 
@@ -190,11 +255,11 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
190
255
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
191
256
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
192
257
  * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
258
+ * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
194
259
  * @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
260
  * @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, entityType, entityCode, status, priority&lt;/i&gt;
196
261
  * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
262
+ * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
198
263
  * @param {*} [options] Override http request option.
199
264
  * @throws {RequiredError}
200
265
  */
@@ -245,8 +310,10 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
245
310
  localVarQueryParameter['filters'] = filters;
246
311
  }
247
312
 
248
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
249
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
313
+ // Only Authorization falls back to the configured token; an empty value is never sent.
314
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
315
+ if (authorizationValue) {
316
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
250
317
  }
251
318
 
252
319
 
@@ -293,8 +360,10 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
293
360
  // http bearer authentication required
294
361
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
295
362
 
296
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
297
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
363
+ // Only Authorization falls back to the configured token; an empty value is never sent.
364
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
365
+ if (authorizationValue) {
366
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
298
367
  }
299
368
 
300
369
 
@@ -306,6 +375,61 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
306
375
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
307
376
  localVarRequestOptions.data = serializeDataIfNeeded(patchTaskRequestDto, localVarRequestOptions, configuration)
308
377
 
378
+ return {
379
+ url: toPathString(localVarUrlObj),
380
+ options: localVarRequestOptions,
381
+ };
382
+ },
383
+ /**
384
+ * Removes a secondary link between a task and a record in another service. The task and the record are kept. Removing a link that does not exist returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
385
+ * @summary Delete the task secondary link
386
+ * @param {string} code
387
+ * @param {string} linkType
388
+ * @param {string} linkCode
389
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
390
+ * @param {*} [options] Override http request option.
391
+ * @throws {RequiredError}
392
+ */
393
+ removeSecondaryLink: async (code: string, linkType: string, linkCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
394
+ // verify required parameter 'code' is not null or undefined
395
+ assertParamExists('removeSecondaryLink', 'code', code)
396
+ // verify required parameter 'linkType' is not null or undefined
397
+ assertParamExists('removeSecondaryLink', 'linkType', linkType)
398
+ // verify required parameter 'linkCode' is not null or undefined
399
+ assertParamExists('removeSecondaryLink', 'linkCode', linkCode)
400
+ const localVarPath = `/taskservice/v1/tasks/{code}/secondary-links/{linkType}/{linkCode}`
401
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)))
402
+ .replace(`{${"linkType"}}`, encodeURIComponent(String(linkType)))
403
+ .replace(`{${"linkCode"}}`, encodeURIComponent(String(linkCode)));
404
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
405
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
406
+ let baseOptions;
407
+ let baseAccessToken;
408
+ if (configuration) {
409
+ baseOptions = configuration.baseOptions;
410
+ baseAccessToken = configuration.accessToken;
411
+ }
412
+
413
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
414
+ const localVarHeaderParameter = {} as any;
415
+ const localVarQueryParameter = {} as any;
416
+
417
+ // authentication bearer required
418
+ // http bearer authentication required
419
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
420
+
421
+ // Only Authorization falls back to the configured token; an empty value is never sent.
422
+ const authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
423
+ if (authorizationValue) {
424
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
425
+ }
426
+
427
+
428
+
429
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
430
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
431
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
432
+
309
433
  return {
310
434
  url: toPathString(localVarUrlObj),
311
435
  options: localVarRequestOptions,
@@ -321,6 +445,19 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration
321
445
  export const TasksApiFp = function(configuration?: Configuration) {
322
446
  const localVarAxiosParamCreator = TasksApiAxiosParamCreator(configuration)
323
447
  return {
448
+ /**
449
+ * Adds a secondary link from a task to a record in another service, for example an email thread. The record must exist. Adding a record that is already linked returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
450
+ * @summary Create the task secondary link
451
+ * @param {string} code
452
+ * @param {EntityRefDto} entityRefDto
453
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ async addSecondaryLink(code: string, entityRefDto: EntityRefDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AddSecondaryLinkResponseClass>> {
458
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addSecondaryLink(code, entityRefDto, authorization, options);
459
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
460
+ },
324
461
  /**
325
462
  * This will create a task. **Required Permissions** \"task-management.tasks.create\"
326
463
  * @summary Create the task
@@ -364,11 +501,11 @@ export const TasksApiFp = function(configuration?: Configuration) {
364
501
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
365
502
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
366
503
  * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
504
+ * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
368
505
  * @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
506
  * @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, entityType, entityCode, status, priority&lt;/i&gt;
370
507
  * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
508
+ * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
372
509
  * @param {*} [options] Override http request option.
373
510
  * @throws {RequiredError}
374
511
  */
@@ -389,6 +526,20 @@ export const TasksApiFp = function(configuration?: Configuration) {
389
526
  const localVarAxiosArgs = await localVarAxiosParamCreator.patchTask(code, patchTaskRequestDto, authorization, options);
390
527
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
391
528
  },
529
+ /**
530
+ * Removes a secondary link between a task and a record in another service. The task and the record are kept. Removing a link that does not exist returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
531
+ * @summary Delete the task secondary link
532
+ * @param {string} code
533
+ * @param {string} linkType
534
+ * @param {string} linkCode
535
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ */
539
+ async removeSecondaryLink(code: string, linkType: string, linkCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RemoveSecondaryLinkResponseClass>> {
540
+ const localVarAxiosArgs = await localVarAxiosParamCreator.removeSecondaryLink(code, linkType, linkCode, authorization, options);
541
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
542
+ },
392
543
  }
393
544
  };
394
545
 
@@ -399,6 +550,18 @@ export const TasksApiFp = function(configuration?: Configuration) {
399
550
  export const TasksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
400
551
  const localVarFp = TasksApiFp(configuration)
401
552
  return {
553
+ /**
554
+ * Adds a secondary link from a task to a record in another service, for example an email thread. The record must exist. Adding a record that is already linked returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
555
+ * @summary Create the task secondary link
556
+ * @param {string} code
557
+ * @param {EntityRefDto} entityRefDto
558
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ addSecondaryLink(code: string, entityRefDto: EntityRefDto, authorization?: string, options?: any): AxiosPromise<AddSecondaryLinkResponseClass> {
563
+ return localVarFp.addSecondaryLink(code, entityRefDto, authorization, options).then((request) => request(axios, basePath));
564
+ },
402
565
  /**
403
566
  * This will create a task. **Required Permissions** \"task-management.tasks.create\"
404
567
  * @summary Create the task
@@ -439,11 +602,11 @@ export const TasksApiFactory = function (configuration?: Configuration, basePath
439
602
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
440
603
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
441
604
  * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
605
+ * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
443
606
  * @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
607
  * @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, entityType, entityCode, status, priority&lt;/i&gt;
445
608
  * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
609
+ * @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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
447
610
  * @param {*} [options] Override http request option.
448
611
  * @throws {RequiredError}
449
612
  */
@@ -462,9 +625,50 @@ export const TasksApiFactory = function (configuration?: Configuration, basePath
462
625
  patchTask(code: string, patchTaskRequestDto: PatchTaskRequestDto, authorization?: string, options?: any): AxiosPromise<PatchTaskResponseClass> {
463
626
  return localVarFp.patchTask(code, patchTaskRequestDto, authorization, options).then((request) => request(axios, basePath));
464
627
  },
628
+ /**
629
+ * Removes a secondary link between a task and a record in another service. The task and the record are kept. Removing a link that does not exist returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
630
+ * @summary Delete the task secondary link
631
+ * @param {string} code
632
+ * @param {string} linkType
633
+ * @param {string} linkCode
634
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ removeSecondaryLink(code: string, linkType: string, linkCode: string, authorization?: string, options?: any): AxiosPromise<RemoveSecondaryLinkResponseClass> {
639
+ return localVarFp.removeSecondaryLink(code, linkType, linkCode, authorization, options).then((request) => request(axios, basePath));
640
+ },
465
641
  };
466
642
  };
467
643
 
644
+ /**
645
+ * Request parameters for addSecondaryLink operation in TasksApi.
646
+ * @export
647
+ * @interface TasksApiAddSecondaryLinkRequest
648
+ */
649
+ export interface TasksApiAddSecondaryLinkRequest {
650
+ /**
651
+ *
652
+ * @type {string}
653
+ * @memberof TasksApiAddSecondaryLink
654
+ */
655
+ readonly code: string
656
+
657
+ /**
658
+ *
659
+ * @type {EntityRefDto}
660
+ * @memberof TasksApiAddSecondaryLink
661
+ */
662
+ readonly entityRefDto: EntityRefDto
663
+
664
+ /**
665
+ * Bearer Token: provided by the login endpoint under the name accessToken.
666
+ * @type {string}
667
+ * @memberof TasksApiAddSecondaryLink
668
+ */
669
+ readonly authorization?: string
670
+ }
671
+
468
672
  /**
469
673
  * Request parameters for createTask operation in TasksApi.
470
674
  * @export
@@ -563,7 +767,7 @@ export interface TasksApiListTasksRequest {
563
767
  readonly pageToken?: string
564
768
 
565
769
  /**
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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
770
+ * 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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
567
771
  * @type {string}
568
772
  * @memberof TasksApiListTasks
569
773
  */
@@ -591,7 +795,7 @@ export interface TasksApiListTasksRequest {
591
795
  readonly expand?: string
592
796
 
593
797
  /**
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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug&lt;/i&gt;
798
+ * 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, entityType, entityCode, entityNumber, userGroupCode, dueDate, createdAt, updatedAt, status.slug, categories.slug, secondaryLinks.type, secondaryLinks.code&lt;/i&gt;
595
799
  * @type {string}
596
800
  * @memberof TasksApiListTasks
597
801
  */
@@ -626,6 +830,41 @@ export interface TasksApiPatchTaskRequest {
626
830
  readonly authorization?: string
627
831
  }
628
832
 
833
+ /**
834
+ * Request parameters for removeSecondaryLink operation in TasksApi.
835
+ * @export
836
+ * @interface TasksApiRemoveSecondaryLinkRequest
837
+ */
838
+ export interface TasksApiRemoveSecondaryLinkRequest {
839
+ /**
840
+ *
841
+ * @type {string}
842
+ * @memberof TasksApiRemoveSecondaryLink
843
+ */
844
+ readonly code: string
845
+
846
+ /**
847
+ *
848
+ * @type {string}
849
+ * @memberof TasksApiRemoveSecondaryLink
850
+ */
851
+ readonly linkType: string
852
+
853
+ /**
854
+ *
855
+ * @type {string}
856
+ * @memberof TasksApiRemoveSecondaryLink
857
+ */
858
+ readonly linkCode: string
859
+
860
+ /**
861
+ * Bearer Token: provided by the login endpoint under the name accessToken.
862
+ * @type {string}
863
+ * @memberof TasksApiRemoveSecondaryLink
864
+ */
865
+ readonly authorization?: string
866
+ }
867
+
629
868
  /**
630
869
  * TasksApi - object-oriented interface
631
870
  * @export
@@ -633,6 +872,18 @@ export interface TasksApiPatchTaskRequest {
633
872
  * @extends {BaseAPI}
634
873
  */
635
874
  export class TasksApi extends BaseAPI {
875
+ /**
876
+ * Adds a secondary link from a task to a record in another service, for example an email thread. The record must exist. Adding a record that is already linked returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
877
+ * @summary Create the task secondary link
878
+ * @param {TasksApiAddSecondaryLinkRequest} requestParameters Request parameters.
879
+ * @param {*} [options] Override http request option.
880
+ * @throws {RequiredError}
881
+ * @memberof TasksApi
882
+ */
883
+ public addSecondaryLink(requestParameters: TasksApiAddSecondaryLinkRequest, options?: AxiosRequestConfig) {
884
+ return TasksApiFp(this.configuration).addSecondaryLink(requestParameters.code, requestParameters.entityRefDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
885
+ }
886
+
636
887
  /**
637
888
  * This will create a task. **Required Permissions** \"task-management.tasks.create\"
638
889
  * @summary Create the task
@@ -692,4 +943,16 @@ export class TasksApi extends BaseAPI {
692
943
  public patchTask(requestParameters: TasksApiPatchTaskRequest, options?: AxiosRequestConfig) {
693
944
  return TasksApiFp(this.configuration).patchTask(requestParameters.code, requestParameters.patchTaskRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
694
945
  }
946
+
947
+ /**
948
+ * Removes a secondary link between a task and a record in another service. The task and the record are kept. Removing a link that does not exist returns the task unchanged. **Required Permissions** \"task-management.tasks.update\"
949
+ * @summary Delete the task secondary link
950
+ * @param {TasksApiRemoveSecondaryLinkRequest} requestParameters Request parameters.
951
+ * @param {*} [options] Override http request option.
952
+ * @throws {RequiredError}
953
+ * @memberof TasksApi
954
+ */
955
+ public removeSecondaryLink(requestParameters: TasksApiRemoveSecondaryLinkRequest, options?: AxiosRequestConfig) {
956
+ return TasksApiFp(this.configuration).removeSecondaryLink(requestParameters.code, requestParameters.linkType, requestParameters.linkCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
957
+ }
695
958
  }
package/common.ts CHANGED
@@ -131,9 +131,10 @@ export const toPathString = function (url: URL) {
131
131
  * @export
132
132
  */
133
133
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
134
- return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
134
+ // Typed by hand: since axios 1.20, request() returns an internal axios type that SDK declarations cannot name.
135
+ return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
135
136
  const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
136
- return axios.request<T, R>(axiosRequestArgs);
137
+ return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
137
138
  };
138
139
  }
139
140
 
@@ -92,5 +92,5 @@ export declare class AssigneesApi extends BaseAPI {
92
92
  * @throws {RequiredError}
93
93
  * @memberof AssigneesApi
94
94
  */
95
- listAssignees(requestParameters?: AssigneesApiListAssigneesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAssigneesResponseClass, any, {}>>;
95
+ listAssignees(requestParameters?: AssigneesApiListAssigneesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAssigneesResponseClass, any, {}, any>>;
96
96
  }
@@ -107,7 +107,7 @@ var AssigneesApiAxiosParamCreator = function (configuration) {
107
107
  listAssignees: function (authorization, expand, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
111
111
  return __generator(this, function (_a) {
112
112
  switch (_a.label) {
113
113
  case 0:
@@ -130,8 +130,9 @@ var AssigneesApiAxiosParamCreator = function (configuration) {
130
130
  if (expand !== undefined) {
131
131
  localVarQueryParameter['expand'] = expand;
132
132
  }
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
133
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
134
+ if (authorizationValue) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
136
  }
136
137
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
138
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -353,7 +353,7 @@ export declare class CategoriesApi extends BaseAPI {
353
353
  * @throws {RequiredError}
354
354
  * @memberof CategoriesApi
355
355
  */
356
- createCategory(requestParameters: CategoriesApiCreateCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCategoryResponseClass, any, {}>>;
356
+ createCategory(requestParameters: CategoriesApiCreateCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCategoryResponseClass, any, {}, any>>;
357
357
  /**
358
358
  * This will delete a task category by code. **Required Permissions** \"task-management.tasks.delete\"
359
359
  * @summary Delete the category
@@ -362,7 +362,7 @@ export declare class CategoriesApi extends BaseAPI {
362
362
  * @throws {RequiredError}
363
363
  * @memberof CategoriesApi
364
364
  */
365
- deleteCategory(requestParameters: CategoriesApiDeleteCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
365
+ deleteCategory(requestParameters: CategoriesApiDeleteCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
366
366
  /**
367
367
  * Get category by code. **Required Permissions** \"task-management.tasks.view\"
368
368
  * @summary Retrieve the category
@@ -371,7 +371,7 @@ export declare class CategoriesApi extends BaseAPI {
371
371
  * @throws {RequiredError}
372
372
  * @memberof CategoriesApi
373
373
  */
374
- getCategory(requestParameters: CategoriesApiGetCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetCategoryResponseClass, any, {}>>;
374
+ getCategory(requestParameters: CategoriesApiGetCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetCategoryResponseClass, any, {}, any>>;
375
375
  /**
376
376
  * Retrieves a list of categories. **Required Permissions** \"task-management.tasks.view\"
377
377
  * @summary List categories
@@ -380,7 +380,7 @@ export declare class CategoriesApi extends BaseAPI {
380
380
  * @throws {RequiredError}
381
381
  * @memberof CategoriesApi
382
382
  */
383
- listCategories(requestParameters?: CategoriesApiListCategoriesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListCategoriesResponseClass, any, {}>>;
383
+ listCategories(requestParameters?: CategoriesApiListCategoriesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListCategoriesResponseClass, any, {}, any>>;
384
384
  /**
385
385
  * This will partially update a category by code with the provided fields. **Required Permissions** \"task-management.tasks.update\"
386
386
  * @summary Update the category
@@ -389,5 +389,5 @@ export declare class CategoriesApi extends BaseAPI {
389
389
  * @throws {RequiredError}
390
390
  * @memberof CategoriesApi
391
391
  */
392
- patchCategory(requestParameters: CategoriesApiPatchCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PatchCategoryResponseClass, any, {}>>;
392
+ patchCategory(requestParameters: CategoriesApiPatchCategoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PatchCategoryResponseClass, any, {}, any>>;
393
393
  }