@emilgroup/notification-sdk 0.8.1-beta.6 → 0.8.1-beta.60

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 (114) hide show
  1. package/.openapi-generator/FILES +23 -0
  2. package/README.md +2 -2
  3. package/api/email-mailboxes-api.ts +150 -0
  4. package/api/email-messages-api.ts +56 -36
  5. package/api/email-subscriptions-api.ts +781 -0
  6. package/api/email-tracking-api.ts +291 -48
  7. package/api/email-verifications-api.ts +24 -12
  8. package/api/layouts-api.ts +76 -46
  9. package/api/msgraph-webhooks-api.ts +278 -0
  10. package/api/notification-templates-api.ts +76 -46
  11. package/api/notifications-api.ts +121 -6
  12. package/api.ts +6 -0
  13. package/base.ts +174 -41
  14. package/common.ts +3 -2
  15. package/configuration.ts +20 -0
  16. package/dist/api/email-mailboxes-api.d.ts +87 -0
  17. package/dist/api/email-mailboxes-api.js +221 -0
  18. package/dist/api/email-messages-api.d.ts +44 -32
  19. package/dist/api/email-messages-api.js +62 -40
  20. package/dist/api/email-subscriptions-api.d.ts +432 -0
  21. package/dist/api/email-subscriptions-api.js +738 -0
  22. package/dist/api/email-tracking-api.d.ts +174 -44
  23. package/dist/api/email-tracking-api.js +261 -48
  24. package/dist/api/email-verifications-api.d.ts +18 -10
  25. package/dist/api/email-verifications-api.js +30 -16
  26. package/dist/api/health-api.d.ts +1 -1
  27. package/dist/api/layouts-api.d.ts +61 -41
  28. package/dist/api/layouts-api.js +81 -50
  29. package/dist/api/msgraph-webhooks-api.d.ts +168 -0
  30. package/dist/api/msgraph-webhooks-api.js +305 -0
  31. package/dist/api/notification-templates-api.d.ts +61 -41
  32. package/dist/api/notification-templates-api.js +81 -50
  33. package/dist/api/notifications-api.d.ts +66 -5
  34. package/dist/api/notifications-api.js +111 -8
  35. package/dist/api.d.ts +3 -0
  36. package/dist/api.js +3 -0
  37. package/dist/base.d.ts +24 -0
  38. package/dist/base.js +178 -59
  39. package/dist/common.d.ts +1 -1
  40. package/dist/common.js +1 -0
  41. package/dist/configuration.d.ts +17 -0
  42. package/dist/configuration.js +2 -0
  43. package/dist/models/assign-email-thread-entity-body-dto.d.ts +43 -0
  44. package/dist/models/assign-email-thread-entity-body-dto.js +22 -0
  45. package/dist/models/assign-email-thread-entity-response-class.d.ts +25 -0
  46. package/dist/models/assign-email-thread-entity-response-class.js +15 -0
  47. package/dist/models/catch-up-email-subscription-response-class.d.ts +24 -0
  48. package/dist/models/catch-up-email-subscription-response-class.js +15 -0
  49. package/dist/models/catch-up-email-subscriptions-request-dto.d.ts +24 -0
  50. package/dist/models/catch-up-email-subscriptions-request-dto.js +15 -0
  51. package/dist/models/catch-up-email-subscriptions-response-class.d.ts +30 -0
  52. package/dist/models/catch-up-email-subscriptions-response-class.js +15 -0
  53. package/dist/models/email-mailbox-class.d.ts +47 -0
  54. package/dist/models/email-mailbox-class.js +20 -0
  55. package/dist/models/email-message-class.d.ts +73 -7
  56. package/dist/models/email-message-class.js +22 -3
  57. package/dist/models/email-message-summary-class.d.ts +98 -0
  58. package/dist/models/email-message-summary-class.js +33 -0
  59. package/dist/models/email-subscription-class.d.ts +110 -0
  60. package/dist/models/email-subscription-class.js +23 -0
  61. package/dist/models/email-thread-class.d.ts +37 -5
  62. package/dist/models/entity-ref-class.d.ts +37 -0
  63. package/dist/models/entity-ref-class.js +22 -0
  64. package/dist/models/get-email-subscription-response-class.d.ts +25 -0
  65. package/dist/models/get-email-subscription-response-class.js +15 -0
  66. package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
  67. package/dist/models/grpc-send-email-request-dto.js +22 -0
  68. package/dist/models/index.d.ts +20 -0
  69. package/dist/models/index.js +20 -0
  70. package/dist/models/inline-attachment-dto.d.ts +36 -0
  71. package/dist/models/inline-attachment-dto.js +15 -0
  72. package/dist/models/list-email-mailboxes-response-class.d.ts +43 -0
  73. package/dist/models/list-email-mailboxes-response-class.js +15 -0
  74. package/dist/models/list-email-subscriptions-response-class.d.ts +43 -0
  75. package/dist/models/list-email-subscriptions-response-class.js +15 -0
  76. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +24 -0
  77. package/dist/models/reconcile-email-subscriptions-request-dto.js +15 -0
  78. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +48 -0
  79. package/dist/models/reconcile-email-subscriptions-response-class.js +15 -0
  80. package/dist/models/renew-email-subscription-response-class.d.ts +25 -0
  81. package/dist/models/renew-email-subscription-response-class.js +15 -0
  82. package/dist/models/send-email-request-dto.d.ts +131 -0
  83. package/dist/models/send-email-request-dto.js +22 -0
  84. package/dist/models/send-email-response-class.d.ts +24 -0
  85. package/dist/models/send-email-response-class.js +15 -0
  86. package/dist/models/send-notification-request-dto.d.ts +10 -1
  87. package/dist/models/send-notification-request-dto.js +2 -1
  88. package/dist/models/unassign-email-thread-entity-response-class.d.ts +25 -0
  89. package/dist/models/unassign-email-thread-entity-response-class.js +15 -0
  90. package/models/assign-email-thread-entity-body-dto.ts +52 -0
  91. package/models/assign-email-thread-entity-response-class.ts +31 -0
  92. package/models/catch-up-email-subscription-response-class.ts +30 -0
  93. package/models/catch-up-email-subscriptions-request-dto.ts +30 -0
  94. package/models/catch-up-email-subscriptions-response-class.ts +36 -0
  95. package/models/email-mailbox-class.ts +56 -0
  96. package/models/email-message-class.ts +78 -8
  97. package/models/email-message-summary-class.ts +109 -0
  98. package/models/email-subscription-class.ts +119 -0
  99. package/models/email-thread-class.ts +37 -5
  100. package/models/entity-ref-class.ts +46 -0
  101. package/models/get-email-subscription-response-class.ts +31 -0
  102. package/models/grpc-send-email-request-dto.ts +144 -0
  103. package/models/index.ts +20 -0
  104. package/models/inline-attachment-dto.ts +42 -0
  105. package/models/list-email-mailboxes-response-class.ts +49 -0
  106. package/models/list-email-subscriptions-response-class.ts +49 -0
  107. package/models/reconcile-email-subscriptions-request-dto.ts +30 -0
  108. package/models/reconcile-email-subscriptions-response-class.ts +54 -0
  109. package/models/renew-email-subscription-response-class.ts +31 -0
  110. package/models/send-email-request-dto.ts +138 -0
  111. package/models/send-email-response-class.ts +30 -0
  112. package/models/send-notification-request-dto.ts +9 -2
  113. package/models/unassign-email-thread-entity-response-class.ts +31 -0
  114. package/package.json +2 -2
@@ -93,7 +93,64 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
95
  /**
96
- * undefined **Required Permissions** \"notification-management.email-messages.update\"
96
+ * 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\"
97
+ * @summary Assign an email thread to an entity
98
+ * @param {string} code
99
+ * @param {AssignEmailThreadEntityBodyDto} assignEmailThreadEntityBodyDto
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: function (code, assignEmailThreadEntityBodyDto, authorization, options) {
105
+ if (options === void 0) { options = {}; }
106
+ return __awaiter(_this, void 0, void 0, function () {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0:
111
+ // verify required parameter 'code' is not null or undefined
112
+ (0, common_1.assertParamExists)('assignEntity', 'code', code);
113
+ // verify required parameter 'assignEmailThreadEntityBodyDto' is not null or undefined
114
+ (0, common_1.assertParamExists)('assignEntity', 'assignEmailThreadEntityBodyDto', assignEmailThreadEntityBodyDto);
115
+ localVarPath = "/notificationservice/v1/email-threads/{code}/entity"
116
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
117
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
+ // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ ];
130
+ case 1:
131
+ // authentication bearer required
132
+ // http bearer authentication required
133
+ _a.sent();
134
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
137
+ }
138
+ localVarHeaderParameter['Content-Type'] = 'application/json';
139
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
140
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
142
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(assignEmailThreadEntityBodyDto, localVarRequestOptions, configuration);
143
+ return [2 /*return*/, {
144
+ url: (0, common_1.toPathString)(localVarUrlObj),
145
+ options: localVarRequestOptions,
146
+ }];
147
+ }
148
+ });
149
+ });
150
+ },
151
+ /**
152
+ * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
153
+ * @summary Close the email thread
97
154
  * @param {string} code
98
155
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
99
156
  * @param {*} [options] Override http request option.
@@ -102,7 +159,7 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
102
159
  closeThread: function (code, authorization, options) {
103
160
  if (options === void 0) { options = {}; }
104
161
  return __awaiter(_this, void 0, void 0, function () {
105
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
106
163
  return __generator(this, function (_a) {
107
164
  switch (_a.label) {
108
165
  case 0:
@@ -120,13 +177,16 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
120
177
  localVarQueryParameter = {};
121
178
  // authentication bearer required
122
179
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
181
+ // Only Authorization falls back to the configured token; an empty value is never sent.
182
+ ];
124
183
  case 1:
125
184
  // authentication bearer required
126
185
  // http bearer authentication required
127
186
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
187
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
188
+ if (authorizationValue) {
189
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
190
  }
131
191
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
192
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -140,7 +200,8 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
140
200
  });
141
201
  },
142
202
  /**
143
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
203
+ * Retrieves the details of the email thread with the given code. **Required Permissions** \"notification-management.email-messages.view\"
204
+ * @summary Retrieve the email thread
144
205
  * @param {string} code
145
206
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
146
207
  * @param {*} [options] Override http request option.
@@ -149,7 +210,7 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
149
210
  getThread: function (code, authorization, options) {
150
211
  if (options === void 0) { options = {}; }
151
212
  return __awaiter(_this, void 0, void 0, function () {
152
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
213
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
153
214
  return __generator(this, function (_a) {
154
215
  switch (_a.label) {
155
216
  case 0:
@@ -167,13 +228,16 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
167
228
  localVarQueryParameter = {};
168
229
  // authentication bearer required
169
230
  // http bearer authentication required
170
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
231
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
232
+ // Only Authorization falls back to the configured token; an empty value is never sent.
233
+ ];
171
234
  case 1:
172
235
  // authentication bearer required
173
236
  // http bearer authentication required
174
237
  _a.sent();
175
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
176
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
238
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
239
+ if (authorizationValue) {
240
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
177
241
  }
178
242
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
179
243
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -187,13 +251,13 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
187
251
  });
188
252
  },
189
253
  /**
190
- * Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
254
+ * Returns the email messages of the email thread with the given code. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
191
255
  * @summary List email messages
192
256
  * @param {string} code
193
257
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
194
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
195
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
196
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt</i>
258
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
259
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
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.<br/> <br/> <i>Allowed values: id, code, threadCode, direction, deliveryStatus, workflowStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt</i>
197
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.<br/> <br/> <i>Allowed values: attachments<i>
198
262
  * @param {*} [options] Override http request option.
199
263
  * @throws {RequiredError}
@@ -201,7 +265,7 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
201
265
  listMessages: function (code, authorization, filter, filters, order, expand, options) {
202
266
  if (options === void 0) { options = {}; }
203
267
  return __awaiter(_this, void 0, void 0, function () {
204
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
268
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
205
269
  return __generator(this, function (_a) {
206
270
  switch (_a.label) {
207
271
  case 0:
@@ -236,8 +300,9 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
236
300
  if (expand !== undefined) {
237
301
  localVarQueryParameter['expand'] = expand;
238
302
  }
239
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
240
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
303
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
304
+ if (authorizationValue) {
305
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
241
306
  }
242
307
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
243
308
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -251,23 +316,23 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
251
316
  });
252
317
  },
253
318
  /**
254
- * Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
319
+ * Returns a list of email threads, newest first. A thread groups an email with its replies; each item carries the newest message of the thread in latestMessage and the number of messages in messageCount. Threads without a message yet are not listed. Filter on the newest message with latestDirection (inbox tabs), latestDeliveryStatus or latestWorkflowStatus (use latestWorkflowStatus==$null for threads whose newest message has no workflow). Add expand=messages to get every message of each thread, without bodies. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
255
320
  * @summary List email threads
256
321
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
257
322
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
258
323
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
259
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy</i>
324
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, entityNumber, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, latestFromAddress, latestToAddresses, createdAt, updatedAt, createdBy, updatedBy</i>
260
325
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
261
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt</i>
326
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, createdAt, updatedAt</i>
262
327
  * @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.<br/> <br/> <i>Allowed values: messages<i>
263
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy</i>
328
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, entityNumber, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, latestFromAddress, latestToAddresses, createdAt, updatedAt, createdBy, updatedBy</i>
264
329
  * @param {*} [options] Override http request option.
265
330
  * @throws {RequiredError}
266
331
  */
267
332
  listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
268
333
  if (options === void 0) { options = {}; }
269
334
  return __awaiter(_this, void 0, void 0, function () {
270
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
335
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
271
336
  return __generator(this, function (_a) {
272
337
  switch (_a.label) {
273
338
  case 0:
@@ -308,8 +373,60 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
308
373
  if (filters !== undefined) {
309
374
  localVarQueryParameter['filters'] = filters;
310
375
  }
311
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
312
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
376
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
377
+ if (authorizationValue) {
378
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
379
+ }
380
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
381
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
382
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
383
+ return [2 /*return*/, {
384
+ url: (0, common_1.toPathString)(localVarUrlObj),
385
+ options: localVarRequestOptions,
386
+ }];
387
+ }
388
+ });
389
+ });
390
+ },
391
+ /**
392
+ * 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\"
393
+ * @summary Unassign an email thread from its entity
394
+ * @param {string} code
395
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ unassignEntity: function (code, authorization, options) {
400
+ if (options === void 0) { options = {}; }
401
+ return __awaiter(_this, void 0, void 0, function () {
402
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
403
+ return __generator(this, function (_a) {
404
+ switch (_a.label) {
405
+ case 0:
406
+ // verify required parameter 'code' is not null or undefined
407
+ (0, common_1.assertParamExists)('unassignEntity', 'code', code);
408
+ localVarPath = "/notificationservice/v1/email-threads/{code}/entity"
409
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
410
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
411
+ if (configuration) {
412
+ baseOptions = configuration.baseOptions;
413
+ baseAccessToken = configuration.accessToken;
414
+ }
415
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
416
+ localVarHeaderParameter = {};
417
+ localVarQueryParameter = {};
418
+ // authentication bearer required
419
+ // http bearer authentication required
420
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
421
+ // Only Authorization falls back to the configured token; an empty value is never sent.
422
+ ];
423
+ case 1:
424
+ // authentication bearer required
425
+ // http bearer authentication required
426
+ _a.sent();
427
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
428
+ if (authorizationValue) {
429
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
313
430
  }
314
431
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
315
432
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -333,7 +450,30 @@ var EmailTrackingApiFp = function (configuration) {
333
450
  var localVarAxiosParamCreator = (0, exports.EmailTrackingApiAxiosParamCreator)(configuration);
334
451
  return {
335
452
  /**
336
- * undefined **Required Permissions** \"notification-management.email-messages.update\"
453
+ * 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\"
454
+ * @summary Assign an email thread to an entity
455
+ * @param {string} code
456
+ * @param {AssignEmailThreadEntityBodyDto} assignEmailThreadEntityBodyDto
457
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ assignEntity: function (code, assignEmailThreadEntityBodyDto, authorization, options) {
462
+ return __awaiter(this, void 0, void 0, function () {
463
+ var localVarAxiosArgs;
464
+ return __generator(this, function (_a) {
465
+ switch (_a.label) {
466
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.assignEntity(code, assignEmailThreadEntityBodyDto, authorization, options)];
467
+ case 1:
468
+ localVarAxiosArgs = _a.sent();
469
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
470
+ }
471
+ });
472
+ });
473
+ },
474
+ /**
475
+ * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
476
+ * @summary Close the email thread
337
477
  * @param {string} code
338
478
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
339
479
  * @param {*} [options] Override http request option.
@@ -353,7 +493,8 @@ var EmailTrackingApiFp = function (configuration) {
353
493
  });
354
494
  },
355
495
  /**
356
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
496
+ * Retrieves the details of the email thread with the given code. **Required Permissions** \"notification-management.email-messages.view\"
497
+ * @summary Retrieve the email thread
357
498
  * @param {string} code
358
499
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
359
500
  * @param {*} [options] Override http request option.
@@ -373,13 +514,13 @@ var EmailTrackingApiFp = function (configuration) {
373
514
  });
374
515
  },
375
516
  /**
376
- * Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
517
+ * Returns the email messages of the email thread with the given code. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
377
518
  * @summary List email messages
378
519
  * @param {string} code
379
520
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
380
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
381
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
382
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt</i>
521
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
522
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
523
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, threadCode, direction, deliveryStatus, workflowStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt</i>
383
524
  * @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.<br/> <br/> <i>Allowed values: attachments<i>
384
525
  * @param {*} [options] Override http request option.
385
526
  * @throws {RequiredError}
@@ -398,16 +539,16 @@ var EmailTrackingApiFp = function (configuration) {
398
539
  });
399
540
  },
400
541
  /**
401
- * Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
542
+ * Returns a list of email threads, newest first. A thread groups an email with its replies; each item carries the newest message of the thread in latestMessage and the number of messages in messageCount. Threads without a message yet are not listed. Filter on the newest message with latestDirection (inbox tabs), latestDeliveryStatus or latestWorkflowStatus (use latestWorkflowStatus==$null for threads whose newest message has no workflow). Add expand=messages to get every message of each thread, without bodies. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
402
543
  * @summary List email threads
403
544
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
404
545
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
405
546
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
406
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy</i>
547
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, entityNumber, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, latestFromAddress, latestToAddresses, createdAt, updatedAt, createdBy, updatedBy</i>
407
548
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
408
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt</i>
549
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, createdAt, updatedAt</i>
409
550
  * @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.<br/> <br/> <i>Allowed values: messages<i>
410
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy</i>
551
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, entityNumber, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, latestFromAddress, latestToAddresses, createdAt, updatedAt, createdBy, updatedBy</i>
411
552
  * @param {*} [options] Override http request option.
412
553
  * @throws {RequiredError}
413
554
  */
@@ -424,6 +565,27 @@ var EmailTrackingApiFp = function (configuration) {
424
565
  });
425
566
  });
426
567
  },
568
+ /**
569
+ * 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\"
570
+ * @summary Unassign an email thread from its entity
571
+ * @param {string} code
572
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ */
576
+ unassignEntity: function (code, authorization, options) {
577
+ return __awaiter(this, void 0, void 0, function () {
578
+ var localVarAxiosArgs;
579
+ return __generator(this, function (_a) {
580
+ switch (_a.label) {
581
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.unassignEntity(code, authorization, options)];
582
+ case 1:
583
+ localVarAxiosArgs = _a.sent();
584
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
585
+ }
586
+ });
587
+ });
588
+ },
427
589
  };
428
590
  };
429
591
  exports.EmailTrackingApiFp = EmailTrackingApiFp;
@@ -435,7 +597,20 @@ var EmailTrackingApiFactory = function (configuration, basePath, axios) {
435
597
  var localVarFp = (0, exports.EmailTrackingApiFp)(configuration);
436
598
  return {
437
599
  /**
438
- * undefined **Required Permissions** \"notification-management.email-messages.update\"
600
+ * 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\"
601
+ * @summary Assign an email thread to an entity
602
+ * @param {string} code
603
+ * @param {AssignEmailThreadEntityBodyDto} assignEmailThreadEntityBodyDto
604
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
605
+ * @param {*} [options] Override http request option.
606
+ * @throws {RequiredError}
607
+ */
608
+ assignEntity: function (code, assignEmailThreadEntityBodyDto, authorization, options) {
609
+ return localVarFp.assignEntity(code, assignEmailThreadEntityBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
610
+ },
611
+ /**
612
+ * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
613
+ * @summary Close the email thread
439
614
  * @param {string} code
440
615
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
441
616
  * @param {*} [options] Override http request option.
@@ -445,7 +620,8 @@ var EmailTrackingApiFactory = function (configuration, basePath, axios) {
445
620
  return localVarFp.closeThread(code, authorization, options).then(function (request) { return request(axios, basePath); });
446
621
  },
447
622
  /**
448
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
623
+ * Retrieves the details of the email thread with the given code. **Required Permissions** \"notification-management.email-messages.view\"
624
+ * @summary Retrieve the email thread
449
625
  * @param {string} code
450
626
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
451
627
  * @param {*} [options] Override http request option.
@@ -455,13 +631,13 @@ var EmailTrackingApiFactory = function (configuration, basePath, axios) {
455
631
  return localVarFp.getThread(code, authorization, options).then(function (request) { return request(axios, basePath); });
456
632
  },
457
633
  /**
458
- * Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
634
+ * Returns the email messages of the email thread with the given code. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
459
635
  * @summary List email messages
460
636
  * @param {string} code
461
637
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
462
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
463
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
464
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt</i>
638
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
639
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
640
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, threadCode, direction, deliveryStatus, workflowStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt</i>
465
641
  * @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.<br/> <br/> <i>Allowed values: attachments<i>
466
642
  * @param {*} [options] Override http request option.
467
643
  * @throws {RequiredError}
@@ -470,22 +646,33 @@ var EmailTrackingApiFactory = function (configuration, basePath, axios) {
470
646
  return localVarFp.listMessages(code, authorization, filter, filters, order, expand, options).then(function (request) { return request(axios, basePath); });
471
647
  },
472
648
  /**
473
- * Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
649
+ * Returns a list of email threads, newest first. A thread groups an email with its replies; each item carries the newest message of the thread in latestMessage and the number of messages in messageCount. Threads without a message yet are not listed. Filter on the newest message with latestDirection (inbox tabs), latestDeliveryStatus or latestWorkflowStatus (use latestWorkflowStatus==$null for threads whose newest message has no workflow). Add expand=messages to get every message of each thread, without bodies. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
474
650
  * @summary List email threads
475
651
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
476
652
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
477
653
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
478
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy</i>
654
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, entityNumber, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, latestFromAddress, latestToAddresses, createdAt, updatedAt, createdBy, updatedBy</i>
479
655
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
480
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt</i>
656
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, createdAt, updatedAt</i>
481
657
  * @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.<br/> <br/> <i>Allowed values: messages<i>
482
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy</i>
658
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, entityNumber, subject, status, mailbox, messageCount, lastMessageAt, latestDirection, latestDeliveryStatus, latestWorkflowStatus, latestFromAddress, latestToAddresses, createdAt, updatedAt, createdBy, updatedBy</i>
483
659
  * @param {*} [options] Override http request option.
484
660
  * @throws {RequiredError}
485
661
  */
486
662
  listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
487
663
  return localVarFp.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
488
664
  },
665
+ /**
666
+ * 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\"
667
+ * @summary Unassign an email thread from its entity
668
+ * @param {string} code
669
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ */
673
+ unassignEntity: function (code, authorization, options) {
674
+ return localVarFp.unassignEntity(code, authorization, options).then(function (request) { return request(axios, basePath); });
675
+ },
489
676
  };
490
677
  };
491
678
  exports.EmailTrackingApiFactory = EmailTrackingApiFactory;
@@ -501,7 +688,20 @@ var EmailTrackingApi = /** @class */ (function (_super) {
501
688
  return _super !== null && _super.apply(this, arguments) || this;
502
689
  }
503
690
  /**
504
- * undefined **Required Permissions** \"notification-management.email-messages.update\"
691
+ * 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\"
692
+ * @summary Assign an email thread to an entity
693
+ * @param {EmailTrackingApiAssignEntityRequest} requestParameters Request parameters.
694
+ * @param {*} [options] Override http request option.
695
+ * @throws {RequiredError}
696
+ * @memberof EmailTrackingApi
697
+ */
698
+ EmailTrackingApi.prototype.assignEntity = function (requestParameters, options) {
699
+ var _this = this;
700
+ return (0, exports.EmailTrackingApiFp)(this.configuration).assignEntity(requestParameters.code, requestParameters.assignEmailThreadEntityBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
701
+ };
702
+ /**
703
+ * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
704
+ * @summary Close the email thread
505
705
  * @param {EmailTrackingApiCloseThreadRequest} requestParameters Request parameters.
506
706
  * @param {*} [options] Override http request option.
507
707
  * @throws {RequiredError}
@@ -512,7 +712,8 @@ var EmailTrackingApi = /** @class */ (function (_super) {
512
712
  return (0, exports.EmailTrackingApiFp)(this.configuration).closeThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
513
713
  };
514
714
  /**
515
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
715
+ * Retrieves the details of the email thread with the given code. **Required Permissions** \"notification-management.email-messages.view\"
716
+ * @summary Retrieve the email thread
516
717
  * @param {EmailTrackingApiGetThreadRequest} requestParameters Request parameters.
517
718
  * @param {*} [options] Override http request option.
518
719
  * @throws {RequiredError}
@@ -523,7 +724,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
523
724
  return (0, exports.EmailTrackingApiFp)(this.configuration).getThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
524
725
  };
525
726
  /**
526
- * Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
727
+ * Returns the email messages of the email thread with the given code. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
527
728
  * @summary List email messages
528
729
  * @param {EmailTrackingApiListMessagesRequest} requestParameters Request parameters.
529
730
  * @param {*} [options] Override http request option.
@@ -535,7 +736,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
535
736
  return (0, exports.EmailTrackingApiFp)(this.configuration).listMessages(requestParameters.code, requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
536
737
  };
537
738
  /**
538
- * Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
739
+ * Returns a list of email threads, newest first. A thread groups an email with its replies; each item carries the newest message of the thread in latestMessage and the number of messages in messageCount. Threads without a message yet are not listed. Filter on the newest message with latestDirection (inbox tabs), latestDeliveryStatus or latestWorkflowStatus (use latestWorkflowStatus==$null for threads whose newest message has no workflow). Add expand=messages to get every message of each thread, without bodies. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
539
740
  * @summary List email threads
540
741
  * @param {EmailTrackingApiListThreadsRequest} requestParameters Request parameters.
541
742
  * @param {*} [options] Override http request option.
@@ -547,6 +748,18 @@ var EmailTrackingApi = /** @class */ (function (_super) {
547
748
  if (requestParameters === void 0) { requestParameters = {}; }
548
749
  return (0, exports.EmailTrackingApiFp)(this.configuration).listThreads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
549
750
  };
751
+ /**
752
+ * 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\"
753
+ * @summary Unassign an email thread from its entity
754
+ * @param {EmailTrackingApiUnassignEntityRequest} requestParameters Request parameters.
755
+ * @param {*} [options] Override http request option.
756
+ * @throws {RequiredError}
757
+ * @memberof EmailTrackingApi
758
+ */
759
+ EmailTrackingApi.prototype.unassignEntity = function (requestParameters, options) {
760
+ var _this = this;
761
+ return (0, exports.EmailTrackingApiFp)(this.configuration).unassignEntity(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
762
+ };
550
763
  return EmailTrackingApi;
551
764
  }(base_1.BaseAPI));
552
765
  exports.EmailTrackingApi = EmailTrackingApi;