@emilgroup/notification-sdk 0.8.1-beta.38 → 0.8.1-beta.39

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 (34) hide show
  1. package/.openapi-generator/FILES +4 -3
  2. package/README.md +2 -2
  3. package/api/email-messages-api.ts +0 -223
  4. package/api/email-tracking-api.ts +231 -8
  5. package/dist/api/email-messages-api.d.ts +0 -122
  6. package/dist/api/email-messages-api.js +0 -191
  7. package/dist/api/email-tracking-api.d.ts +130 -8
  8. package/dist/api/email-tracking-api.js +197 -6
  9. package/dist/models/{assign-email-message-entity-body-dto.d.ts → assign-email-thread-entity-body-dto.d.ts} +9 -9
  10. package/dist/models/{assign-email-message-entity-body-dto.js → assign-email-thread-entity-body-dto.js} +2 -2
  11. package/dist/models/{assign-email-message-entity-response-class.d.ts → assign-email-thread-entity-response-class.d.ts} +7 -7
  12. package/dist/models/email-message-class.d.ts +4 -9
  13. package/dist/models/email-thread-class.d.ts +6 -5
  14. package/dist/models/entity-ref-class.d.ts +37 -0
  15. package/dist/models/entity-ref-class.js +22 -0
  16. package/dist/models/grpc-send-email-request-dto.d.ts +1 -1
  17. package/dist/models/index.d.ts +4 -3
  18. package/dist/models/index.js +4 -3
  19. package/dist/models/send-email-request-dto.d.ts +1 -1
  20. package/dist/models/send-notification-request-dto.d.ts +1 -1
  21. package/dist/models/{unassign-email-message-entity-response-class.d.ts → unassign-email-thread-entity-response-class.d.ts} +7 -7
  22. package/models/{assign-email-message-entity-body-dto.ts → assign-email-thread-entity-body-dto.ts} +9 -9
  23. package/models/{assign-email-message-entity-response-class.ts → assign-email-thread-entity-response-class.ts} +7 -7
  24. package/models/email-message-class.ts +4 -9
  25. package/models/email-thread-class.ts +6 -5
  26. package/models/entity-ref-class.ts +46 -0
  27. package/models/grpc-send-email-request-dto.ts +1 -1
  28. package/models/index.ts +4 -3
  29. package/models/send-email-request-dto.ts +1 -1
  30. package/models/send-notification-request-dto.ts +1 -1
  31. package/models/{unassign-email-message-entity-response-class.ts → unassign-email-thread-entity-response-class.ts} +7 -7
  32. package/package.json +1 -1
  33. /package/dist/models/{assign-email-message-entity-response-class.js → assign-email-thread-entity-response-class.js} +0 -0
  34. /package/dist/models/{unassign-email-message-entity-response-class.js → unassign-email-thread-entity-response-class.js} +0 -0
@@ -21,17 +21,74 @@ 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 { AssignEmailThreadEntityBodyDto } from '../models';
25
+ // @ts-ignore
26
+ import { AssignEmailThreadEntityResponseClass } from '../models';
27
+ // @ts-ignore
24
28
  import { GetEmailThreadResponseClass } from '../models';
25
29
  // @ts-ignore
26
30
  import { ListEmailMessagesResponseClass } from '../models';
27
31
  // @ts-ignore
28
32
  import { ListEmailThreadsResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UnassignEmailThreadEntityResponseClass } from '../models';
29
35
  /**
30
36
  * EmailTrackingApi - axios parameter creator
31
37
  * @export
32
38
  */
33
39
  export const EmailTrackingApiAxiosParamCreator = function (configuration?: Configuration) {
34
40
  return {
41
+ /**
42
+ * Links the email thread, and every message in it, to the given entity, identified by code or by number (the code wins when both are set). Replaces the current link. The entity must exist. Messages that arrive in the thread later are linked to the same entity. **Required Permissions** \"notification-management.email-messages.update\"
43
+ * @summary Assign an email thread to an entity
44
+ * @param {string} code
45
+ * @param {AssignEmailThreadEntityBodyDto} assignEmailThreadEntityBodyDto
46
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ assignEntity: async (code: string, assignEmailThreadEntityBodyDto: AssignEmailThreadEntityBodyDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
51
+ // verify required parameter 'code' is not null or undefined
52
+ assertParamExists('assignEntity', 'code', code)
53
+ // verify required parameter 'assignEmailThreadEntityBodyDto' is not null or undefined
54
+ assertParamExists('assignEntity', 'assignEmailThreadEntityBodyDto', assignEmailThreadEntityBodyDto)
55
+ const localVarPath = `/notificationservice/v1/email-threads/{code}/entity`
56
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
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: 'PATCH', ...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(assignEmailThreadEntityBodyDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
35
92
  /**
36
93
  * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
37
94
  * @summary Close the email thread
@@ -193,11 +250,11 @@ export const EmailTrackingApiAxiosParamCreator = function (configuration?: Confi
193
250
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
194
251
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
195
252
  * @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.
196
- * @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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
253
+ * @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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
197
254
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
198
255
  * @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, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
199
256
  * @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: messages&lt;i&gt;
200
- * @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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
257
+ * @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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
201
258
  * @param {*} [options] Override http request option.
202
259
  * @throws {RequiredError}
203
260
  */
@@ -254,6 +311,51 @@ export const EmailTrackingApiAxiosParamCreator = function (configuration?: Confi
254
311
 
255
312
 
256
313
 
314
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
315
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
316
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
317
+
318
+ return {
319
+ url: toPathString(localVarUrlObj),
320
+ options: localVarRequestOptions,
321
+ };
322
+ },
323
+ /**
324
+ * Removes the entity link from the email thread and every message in it, and marks the messages as unassigned. **Required Permissions** \"notification-management.email-messages.update\"
325
+ * @summary Unassign an email thread from its entity
326
+ * @param {string} code
327
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ unassignEntity: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
332
+ // verify required parameter 'code' is not null or undefined
333
+ assertParamExists('unassignEntity', 'code', code)
334
+ const localVarPath = `/notificationservice/v1/email-threads/{code}/entity`
335
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
336
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
337
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
338
+ let baseOptions;
339
+ let baseAccessToken;
340
+ if (configuration) {
341
+ baseOptions = configuration.baseOptions;
342
+ baseAccessToken = configuration.accessToken;
343
+ }
344
+
345
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
346
+ const localVarHeaderParameter = {} as any;
347
+ const localVarQueryParameter = {} as any;
348
+
349
+ // authentication bearer required
350
+ // http bearer authentication required
351
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
352
+
353
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
354
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
355
+ }
356
+
357
+
358
+
257
359
  setSearchParams(localVarUrlObj, localVarQueryParameter);
258
360
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
259
361
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -273,6 +375,19 @@ export const EmailTrackingApiAxiosParamCreator = function (configuration?: Confi
273
375
  export const EmailTrackingApiFp = function(configuration?: Configuration) {
274
376
  const localVarAxiosParamCreator = EmailTrackingApiAxiosParamCreator(configuration)
275
377
  return {
378
+ /**
379
+ * Links the email thread, and every message in it, to the given entity, identified by code or by number (the code wins when both are set). Replaces the current link. The entity must exist. Messages that arrive in the thread later are linked to the same entity. **Required Permissions** \"notification-management.email-messages.update\"
380
+ * @summary Assign an email thread to an entity
381
+ * @param {string} code
382
+ * @param {AssignEmailThreadEntityBodyDto} assignEmailThreadEntityBodyDto
383
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
384
+ * @param {*} [options] Override http request option.
385
+ * @throws {RequiredError}
386
+ */
387
+ async assignEntity(code: string, assignEmailThreadEntityBodyDto: AssignEmailThreadEntityBodyDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssignEmailThreadEntityResponseClass>> {
388
+ const localVarAxiosArgs = await localVarAxiosParamCreator.assignEntity(code, assignEmailThreadEntityBodyDto, authorization, options);
389
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
390
+ },
276
391
  /**
277
392
  * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
278
393
  * @summary Close the email thread
@@ -319,11 +434,11 @@ export const EmailTrackingApiFp = function(configuration?: Configuration) {
319
434
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
320
435
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
321
436
  * @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.
322
- * @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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
437
+ * @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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
323
438
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
324
439
  * @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, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
325
440
  * @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: messages&lt;i&gt;
326
- * @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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
441
+ * @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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
327
442
  * @param {*} [options] Override http request option.
328
443
  * @throws {RequiredError}
329
444
  */
@@ -331,6 +446,18 @@ export const EmailTrackingApiFp = function(configuration?: Configuration) {
331
446
  const localVarAxiosArgs = await localVarAxiosParamCreator.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
332
447
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
333
448
  },
449
+ /**
450
+ * Removes the entity link from the email thread and every message in it, and marks the messages as unassigned. **Required Permissions** \"notification-management.email-messages.update\"
451
+ * @summary Unassign an email thread from its entity
452
+ * @param {string} code
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 unassignEntity(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UnassignEmailThreadEntityResponseClass>> {
458
+ const localVarAxiosArgs = await localVarAxiosParamCreator.unassignEntity(code, authorization, options);
459
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
460
+ },
334
461
  }
335
462
  };
336
463
 
@@ -341,6 +468,18 @@ export const EmailTrackingApiFp = function(configuration?: Configuration) {
341
468
  export const EmailTrackingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
342
469
  const localVarFp = EmailTrackingApiFp(configuration)
343
470
  return {
471
+ /**
472
+ * Links the email thread, and every message in it, to the given entity, identified by code or by number (the code wins when both are set). Replaces the current link. The entity must exist. Messages that arrive in the thread later are linked to the same entity. **Required Permissions** \"notification-management.email-messages.update\"
473
+ * @summary Assign an email thread to an entity
474
+ * @param {string} code
475
+ * @param {AssignEmailThreadEntityBodyDto} assignEmailThreadEntityBodyDto
476
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
477
+ * @param {*} [options] Override http request option.
478
+ * @throws {RequiredError}
479
+ */
480
+ assignEntity(code: string, assignEmailThreadEntityBodyDto: AssignEmailThreadEntityBodyDto, authorization?: string, options?: any): AxiosPromise<AssignEmailThreadEntityResponseClass> {
481
+ return localVarFp.assignEntity(code, assignEmailThreadEntityBodyDto, authorization, options).then((request) => request(axios, basePath));
482
+ },
344
483
  /**
345
484
  * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
346
485
  * @summary Close the email thread
@@ -384,20 +523,59 @@ export const EmailTrackingApiFactory = function (configuration?: Configuration,
384
523
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
385
524
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
386
525
  * @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.
387
- * @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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
526
+ * @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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
388
527
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
389
528
  * @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, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
390
529
  * @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: messages&lt;i&gt;
391
- * @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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
530
+ * @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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
392
531
  * @param {*} [options] Override http request option.
393
532
  * @throws {RequiredError}
394
533
  */
395
534
  listThreads(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailThreadsResponseClass> {
396
535
  return localVarFp.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
397
536
  },
537
+ /**
538
+ * Removes the entity link from the email thread and every message in it, and marks the messages as unassigned. **Required Permissions** \"notification-management.email-messages.update\"
539
+ * @summary Unassign an email thread from its entity
540
+ * @param {string} code
541
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
542
+ * @param {*} [options] Override http request option.
543
+ * @throws {RequiredError}
544
+ */
545
+ unassignEntity(code: string, authorization?: string, options?: any): AxiosPromise<UnassignEmailThreadEntityResponseClass> {
546
+ return localVarFp.unassignEntity(code, authorization, options).then((request) => request(axios, basePath));
547
+ },
398
548
  };
399
549
  };
400
550
 
551
+ /**
552
+ * Request parameters for assignEntity operation in EmailTrackingApi.
553
+ * @export
554
+ * @interface EmailTrackingApiAssignEntityRequest
555
+ */
556
+ export interface EmailTrackingApiAssignEntityRequest {
557
+ /**
558
+ *
559
+ * @type {string}
560
+ * @memberof EmailTrackingApiAssignEntity
561
+ */
562
+ readonly code: string
563
+
564
+ /**
565
+ *
566
+ * @type {AssignEmailThreadEntityBodyDto}
567
+ * @memberof EmailTrackingApiAssignEntity
568
+ */
569
+ readonly assignEmailThreadEntityBodyDto: AssignEmailThreadEntityBodyDto
570
+
571
+ /**
572
+ * Bearer Token: provided by the login endpoint under the name accessToken.
573
+ * @type {string}
574
+ * @memberof EmailTrackingApiAssignEntity
575
+ */
576
+ readonly authorization?: string
577
+ }
578
+
401
579
  /**
402
580
  * Request parameters for closeThread operation in EmailTrackingApi.
403
581
  * @export
@@ -517,7 +695,7 @@ export interface EmailTrackingApiListThreadsRequest {
517
695
  readonly pageToken?: string
518
696
 
519
697
  /**
520
- * 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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
698
+ * 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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
521
699
  * @type {string}
522
700
  * @memberof EmailTrackingApiListThreads
523
701
  */
@@ -545,13 +723,34 @@ export interface EmailTrackingApiListThreadsRequest {
545
723
  readonly expand?: string
546
724
 
547
725
  /**
548
- * 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, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
726
+ * 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, entityType, entityCode, entityNumber, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
549
727
  * @type {string}
550
728
  * @memberof EmailTrackingApiListThreads
551
729
  */
552
730
  readonly filters?: string
553
731
  }
554
732
 
733
+ /**
734
+ * Request parameters for unassignEntity operation in EmailTrackingApi.
735
+ * @export
736
+ * @interface EmailTrackingApiUnassignEntityRequest
737
+ */
738
+ export interface EmailTrackingApiUnassignEntityRequest {
739
+ /**
740
+ *
741
+ * @type {string}
742
+ * @memberof EmailTrackingApiUnassignEntity
743
+ */
744
+ readonly code: string
745
+
746
+ /**
747
+ * Bearer Token: provided by the login endpoint under the name accessToken.
748
+ * @type {string}
749
+ * @memberof EmailTrackingApiUnassignEntity
750
+ */
751
+ readonly authorization?: string
752
+ }
753
+
555
754
  /**
556
755
  * EmailTrackingApi - object-oriented interface
557
756
  * @export
@@ -559,6 +758,18 @@ export interface EmailTrackingApiListThreadsRequest {
559
758
  * @extends {BaseAPI}
560
759
  */
561
760
  export class EmailTrackingApi extends BaseAPI {
761
+ /**
762
+ * Links the email thread, and every message in it, to the given entity, identified by code or by number (the code wins when both are set). Replaces the current link. The entity must exist. Messages that arrive in the thread later are linked to the same entity. **Required Permissions** \"notification-management.email-messages.update\"
763
+ * @summary Assign an email thread to an entity
764
+ * @param {EmailTrackingApiAssignEntityRequest} requestParameters Request parameters.
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ * @memberof EmailTrackingApi
768
+ */
769
+ public assignEntity(requestParameters: EmailTrackingApiAssignEntityRequest, options?: AxiosRequestConfig) {
770
+ return EmailTrackingApiFp(this.configuration).assignEntity(requestParameters.code, requestParameters.assignEmailThreadEntityBodyDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
771
+ }
772
+
562
773
  /**
563
774
  * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
564
775
  * @summary Close the email thread
@@ -606,4 +817,16 @@ export class EmailTrackingApi extends BaseAPI {
606
817
  public listThreads(requestParameters: EmailTrackingApiListThreadsRequest = {}, options?: AxiosRequestConfig) {
607
818
  return EmailTrackingApiFp(this.configuration).listThreads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
608
819
  }
820
+
821
+ /**
822
+ * Removes the entity link from the email thread and every message in it, and marks the messages as unassigned. **Required Permissions** \"notification-management.email-messages.update\"
823
+ * @summary Unassign an email thread from its entity
824
+ * @param {EmailTrackingApiUnassignEntityRequest} requestParameters Request parameters.
825
+ * @param {*} [options] Override http request option.
826
+ * @throws {RequiredError}
827
+ * @memberof EmailTrackingApi
828
+ */
829
+ public unassignEntity(requestParameters: EmailTrackingApiUnassignEntityRequest, options?: AxiosRequestConfig) {
830
+ return EmailTrackingApiFp(this.configuration).unassignEntity(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
831
+ }
609
832
  }
@@ -12,28 +12,15 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
- import { AssignEmailMessageEntityBodyDto } from '../models';
16
- import { AssignEmailMessageEntityResponseClass } from '../models';
17
15
  import { DownloadAttachmentResponseClass } from '../models';
18
16
  import { GetEmailMessageResponseClass } from '../models';
19
17
  import { ListEmailAttachmentsResponseClass } from '../models';
20
18
  import { ListEmailMessagesResponseClass } from '../models';
21
- import { UnassignEmailMessageEntityResponseClass } from '../models';
22
19
  /**
23
20
  * EmailMessagesApi - axios parameter creator
24
21
  * @export
25
22
  */
26
23
  export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configuration) => {
27
- /**
28
- * Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
29
- * @summary Assign an email message to an entity
30
- * @param {string} code
31
- * @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
32
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
33
- * @param {*} [options] Override http request option.
34
- * @throws {RequiredError}
35
- */
36
- assignEntity: (code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
37
24
  /**
38
25
  * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
39
26
  * @summary Download the email message attachment
@@ -77,31 +64,12 @@ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configu
77
64
  * @throws {RequiredError}
78
65
  */
79
66
  listEmailMessages: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
80
- /**
81
- * Removes the entity link from the email message and marks it as unassigned. The message stays in its thread. **Required Permissions** \"notification-management.email-messages.update\"
82
- * @summary Unassign an email message from its entity
83
- * @param {string} code
84
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
85
- * @param {*} [options] Override http request option.
86
- * @throws {RequiredError}
87
- */
88
- unassignEntity: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
89
67
  };
90
68
  /**
91
69
  * EmailMessagesApi - functional programming interface
92
70
  * @export
93
71
  */
94
72
  export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
95
- /**
96
- * Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
97
- * @summary Assign an email message to an entity
98
- * @param {string} code
99
- * @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
100
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
101
- * @param {*} [options] Override http request option.
102
- * @throws {RequiredError}
103
- */
104
- assignEntity(code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssignEmailMessageEntityResponseClass>>;
105
73
  /**
106
74
  * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
107
75
  * @summary Download the email message attachment
@@ -145,31 +113,12 @@ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
145
113
  * @throws {RequiredError}
146
114
  */
147
115
  listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailMessagesResponseClass>>;
148
- /**
149
- * Removes the entity link from the email message and marks it as unassigned. The message stays in its thread. **Required Permissions** \"notification-management.email-messages.update\"
150
- * @summary Unassign an email message from its entity
151
- * @param {string} code
152
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
- * @param {*} [options] Override http request option.
154
- * @throws {RequiredError}
155
- */
156
- unassignEntity(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UnassignEmailMessageEntityResponseClass>>;
157
116
  };
158
117
  /**
159
118
  * EmailMessagesApi - factory interface
160
119
  * @export
161
120
  */
162
121
  export declare const EmailMessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
163
- /**
164
- * Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
165
- * @summary Assign an email message to an entity
166
- * @param {string} code
167
- * @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
168
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
169
- * @param {*} [options] Override http request option.
170
- * @throws {RequiredError}
171
- */
172
- assignEntity(code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: any): AxiosPromise<AssignEmailMessageEntityResponseClass>;
173
122
  /**
174
123
  * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
175
124
  * @summary Download the email message attachment
@@ -213,41 +162,7 @@ export declare const EmailMessagesApiFactory: (configuration?: Configuration, ba
213
162
  * @throws {RequiredError}
214
163
  */
215
164
  listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass>;
216
- /**
217
- * Removes the entity link from the email message and marks it as unassigned. The message stays in its thread. **Required Permissions** \"notification-management.email-messages.update\"
218
- * @summary Unassign an email message from its entity
219
- * @param {string} code
220
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
221
- * @param {*} [options] Override http request option.
222
- * @throws {RequiredError}
223
- */
224
- unassignEntity(code: string, authorization?: string, options?: any): AxiosPromise<UnassignEmailMessageEntityResponseClass>;
225
165
  };
226
- /**
227
- * Request parameters for assignEntity operation in EmailMessagesApi.
228
- * @export
229
- * @interface EmailMessagesApiAssignEntityRequest
230
- */
231
- export interface EmailMessagesApiAssignEntityRequest {
232
- /**
233
- *
234
- * @type {string}
235
- * @memberof EmailMessagesApiAssignEntity
236
- */
237
- readonly code: string;
238
- /**
239
- *
240
- * @type {AssignEmailMessageEntityBodyDto}
241
- * @memberof EmailMessagesApiAssignEntity
242
- */
243
- readonly assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto;
244
- /**
245
- * Bearer Token: provided by the login endpoint under the name accessToken.
246
- * @type {string}
247
- * @memberof EmailMessagesApiAssignEntity
248
- */
249
- readonly authorization?: string;
250
- }
251
166
  /**
252
167
  * Request parameters for downloadAttachment operation in EmailMessagesApi.
253
168
  * @export
@@ -366,25 +281,6 @@ export interface EmailMessagesApiListEmailMessagesRequest {
366
281
  */
367
282
  readonly filters?: string;
368
283
  }
369
- /**
370
- * Request parameters for unassignEntity operation in EmailMessagesApi.
371
- * @export
372
- * @interface EmailMessagesApiUnassignEntityRequest
373
- */
374
- export interface EmailMessagesApiUnassignEntityRequest {
375
- /**
376
- *
377
- * @type {string}
378
- * @memberof EmailMessagesApiUnassignEntity
379
- */
380
- readonly code: string;
381
- /**
382
- * Bearer Token: provided by the login endpoint under the name accessToken.
383
- * @type {string}
384
- * @memberof EmailMessagesApiUnassignEntity
385
- */
386
- readonly authorization?: string;
387
- }
388
284
  /**
389
285
  * EmailMessagesApi - object-oriented interface
390
286
  * @export
@@ -392,15 +288,6 @@ export interface EmailMessagesApiUnassignEntityRequest {
392
288
  * @extends {BaseAPI}
393
289
  */
394
290
  export declare class EmailMessagesApi extends BaseAPI {
395
- /**
396
- * Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
397
- * @summary Assign an email message to an entity
398
- * @param {EmailMessagesApiAssignEntityRequest} requestParameters Request parameters.
399
- * @param {*} [options] Override http request option.
400
- * @throws {RequiredError}
401
- * @memberof EmailMessagesApi
402
- */
403
- assignEntity(requestParameters: EmailMessagesApiAssignEntityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AssignEmailMessageEntityResponseClass, any, {}>>;
404
291
  /**
405
292
  * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
406
293
  * @summary Download the email message attachment
@@ -437,13 +324,4 @@ export declare class EmailMessagesApi extends BaseAPI {
437
324
  * @memberof EmailMessagesApi
438
325
  */
439
326
  listEmailMessages(requestParameters?: EmailMessagesApiListEmailMessagesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailMessagesResponseClass, any, {}>>;
440
- /**
441
- * Removes the entity link from the email message and marks it as unassigned. The message stays in its thread. **Required Permissions** \"notification-management.email-messages.update\"
442
- * @summary Unassign an email message from its entity
443
- * @param {EmailMessagesApiUnassignEntityRequest} requestParameters Request parameters.
444
- * @param {*} [options] Override http request option.
445
- * @throws {RequiredError}
446
- * @memberof EmailMessagesApi
447
- */
448
- unassignEntity(requestParameters: EmailMessagesApiUnassignEntityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UnassignEmailMessageEntityResponseClass, any, {}>>;
449
327
  }