@emilgroup/notification-sdk 0.8.1-beta.7 → 0.8.1-beta.70

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 (122) hide show
  1. package/.openapi-generator/FILES +25 -0
  2. package/README.md +2 -2
  3. package/api/email-mailboxes-api.ts +153 -0
  4. package/api/email-messages-api.ts +197 -40
  5. package/api/email-subscriptions-api.ts +799 -0
  6. package/api/email-tracking-api.ts +313 -52
  7. package/api/email-verifications-api.ts +32 -14
  8. package/api/health-api.ts +1 -1
  9. package/api/layouts-api.ts +96 -51
  10. package/api/msgraph-webhooks-api.ts +278 -0
  11. package/api/notification-templates-api.ts +96 -51
  12. package/api/notifications-api.ts +128 -7
  13. package/api.ts +6 -0
  14. package/base.ts +239 -43
  15. package/common.ts +3 -2
  16. package/configuration.ts +20 -0
  17. package/dist/api/email-mailboxes-api.d.ts +87 -0
  18. package/dist/api/email-mailboxes-api.js +225 -0
  19. package/dist/api/email-messages-api.d.ts +110 -32
  20. package/dist/api/email-messages-api.js +199 -56
  21. package/dist/api/email-subscriptions-api.d.ts +432 -0
  22. package/dist/api/email-subscriptions-api.js +761 -0
  23. package/dist/api/email-tracking-api.d.ts +174 -44
  24. package/dist/api/email-tracking-api.js +299 -64
  25. package/dist/api/email-verifications-api.d.ts +18 -10
  26. package/dist/api/email-verifications-api.js +46 -24
  27. package/dist/api/health-api.d.ts +1 -1
  28. package/dist/api/health-api.js +1 -1
  29. package/dist/api/layouts-api.d.ts +61 -41
  30. package/dist/api/layouts-api.js +119 -70
  31. package/dist/api/msgraph-webhooks-api.d.ts +168 -0
  32. package/dist/api/msgraph-webhooks-api.js +305 -0
  33. package/dist/api/notification-templates-api.d.ts +61 -41
  34. package/dist/api/notification-templates-api.js +119 -70
  35. package/dist/api/notifications-api.d.ts +66 -5
  36. package/dist/api/notifications-api.js +123 -12
  37. package/dist/api.d.ts +3 -0
  38. package/dist/api.js +3 -0
  39. package/dist/base.d.ts +26 -0
  40. package/dist/base.js +243 -60
  41. package/dist/common.d.ts +1 -1
  42. package/dist/common.js +1 -0
  43. package/dist/configuration.d.ts +17 -0
  44. package/dist/configuration.js +2 -0
  45. package/dist/models/assign-email-thread-entity-body-dto.d.ts +43 -0
  46. package/dist/models/assign-email-thread-entity-body-dto.js +22 -0
  47. package/dist/models/assign-email-thread-entity-response-class.d.ts +25 -0
  48. package/dist/models/assign-email-thread-entity-response-class.js +15 -0
  49. package/dist/models/catch-up-email-subscription-response-class.d.ts +24 -0
  50. package/dist/models/catch-up-email-subscription-response-class.js +15 -0
  51. package/dist/models/catch-up-email-subscriptions-request-dto.d.ts +24 -0
  52. package/dist/models/catch-up-email-subscriptions-request-dto.js +15 -0
  53. package/dist/models/catch-up-email-subscriptions-response-class.d.ts +30 -0
  54. package/dist/models/catch-up-email-subscriptions-response-class.js +15 -0
  55. package/dist/models/email-mailbox-class.d.ts +47 -0
  56. package/dist/models/email-mailbox-class.js +20 -0
  57. package/dist/models/email-message-class.d.ts +102 -7
  58. package/dist/models/email-message-class.js +25 -2
  59. package/dist/models/email-message-summary-class.d.ts +121 -0
  60. package/dist/models/email-message-summary-class.js +37 -0
  61. package/dist/models/email-subscription-class.d.ts +110 -0
  62. package/dist/models/email-subscription-class.js +23 -0
  63. package/dist/models/email-thread-class.d.ts +37 -5
  64. package/dist/models/entity-ref-class.d.ts +37 -0
  65. package/dist/models/entity-ref-class.js +22 -0
  66. package/dist/models/get-email-subscription-response-class.d.ts +25 -0
  67. package/dist/models/get-email-subscription-response-class.js +15 -0
  68. package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
  69. package/dist/models/grpc-send-email-request-dto.js +22 -0
  70. package/dist/models/index.d.ts +22 -0
  71. package/dist/models/index.js +22 -0
  72. package/dist/models/inline-attachment-dto.d.ts +36 -0
  73. package/dist/models/inline-attachment-dto.js +15 -0
  74. package/dist/models/list-email-mailboxes-response-class.d.ts +43 -0
  75. package/dist/models/list-email-mailboxes-response-class.js +15 -0
  76. package/dist/models/list-email-subscriptions-response-class.d.ts +43 -0
  77. package/dist/models/list-email-subscriptions-response-class.js +15 -0
  78. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +24 -0
  79. package/dist/models/reconcile-email-subscriptions-request-dto.js +15 -0
  80. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +48 -0
  81. package/dist/models/reconcile-email-subscriptions-response-class.js +15 -0
  82. package/dist/models/renew-email-subscription-response-class.d.ts +25 -0
  83. package/dist/models/renew-email-subscription-response-class.js +15 -0
  84. package/dist/models/resend-email-message-body-dto.d.ts +30 -0
  85. package/dist/models/resend-email-message-body-dto.js +15 -0
  86. package/dist/models/resend-email-message-response-class.d.ts +25 -0
  87. package/dist/models/resend-email-message-response-class.js +15 -0
  88. package/dist/models/send-email-request-dto.d.ts +131 -0
  89. package/dist/models/send-email-request-dto.js +22 -0
  90. package/dist/models/send-email-response-class.d.ts +24 -0
  91. package/dist/models/send-email-response-class.js +15 -0
  92. package/dist/models/send-notification-request-dto.d.ts +10 -1
  93. package/dist/models/send-notification-request-dto.js +2 -1
  94. package/dist/models/unassign-email-thread-entity-response-class.d.ts +25 -0
  95. package/dist/models/unassign-email-thread-entity-response-class.js +15 -0
  96. package/models/assign-email-thread-entity-body-dto.ts +52 -0
  97. package/models/assign-email-thread-entity-response-class.ts +31 -0
  98. package/models/catch-up-email-subscription-response-class.ts +30 -0
  99. package/models/catch-up-email-subscriptions-request-dto.ts +30 -0
  100. package/models/catch-up-email-subscriptions-response-class.ts +36 -0
  101. package/models/email-mailbox-class.ts +56 -0
  102. package/models/email-message-class.ts +108 -8
  103. package/models/email-message-summary-class.ts +133 -0
  104. package/models/email-subscription-class.ts +119 -0
  105. package/models/email-thread-class.ts +37 -5
  106. package/models/entity-ref-class.ts +46 -0
  107. package/models/get-email-subscription-response-class.ts +31 -0
  108. package/models/grpc-send-email-request-dto.ts +144 -0
  109. package/models/index.ts +22 -0
  110. package/models/inline-attachment-dto.ts +42 -0
  111. package/models/list-email-mailboxes-response-class.ts +49 -0
  112. package/models/list-email-subscriptions-response-class.ts +49 -0
  113. package/models/reconcile-email-subscriptions-request-dto.ts +30 -0
  114. package/models/reconcile-email-subscriptions-response-class.ts +54 -0
  115. package/models/renew-email-subscription-response-class.ts +31 -0
  116. package/models/resend-email-message-body-dto.ts +36 -0
  117. package/models/resend-email-message-response-class.ts +31 -0
  118. package/models/send-email-request-dto.ts +138 -0
  119. package/models/send-email-response-class.ts +30 -0
  120. package/models/send-notification-request-dto.ts +9 -2
  121. package/models/unassign-email-thread-entity-response-class.ts +31 -0
  122. package/package.json +2 -2
@@ -28,6 +28,10 @@ import { GetEmailMessageResponseClass } from '../models';
28
28
  import { ListEmailAttachmentsResponseClass } from '../models';
29
29
  // @ts-ignore
30
30
  import { ListEmailMessagesResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { ResendEmailMessageBodyDto } from '../models';
33
+ // @ts-ignore
34
+ import { ResendEmailMessageResponseClass } from '../models';
31
35
  /**
32
36
  * EmailMessagesApi - axios parameter creator
33
37
  * @export
@@ -35,7 +39,8 @@ import { ListEmailMessagesResponseClass } from '../models';
35
39
  export const EmailMessagesApiAxiosParamCreator = function (configuration?: Configuration) {
36
40
  return {
37
41
  /**
38
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
42
+ * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
43
+ * @summary Download the email message attachment
39
44
  * @param {string} code
40
45
  * @param {number} attachmentId
41
46
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -67,8 +72,13 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
67
72
  // http bearer authentication required
68
73
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
74
 
70
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
75
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
76
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
77
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
78
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
79
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
80
+ if (authorizationValue || authorizationKeepEmpty) {
81
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
72
82
  }
73
83
 
74
84
 
@@ -83,7 +93,8 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
83
93
  };
84
94
  },
85
95
  /**
86
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
96
+ * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
97
+ * @summary Retrieve the email message
87
98
  * @param {string} code
88
99
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
89
100
  * @param {*} [options] Override http request option.
@@ -111,8 +122,13 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
111
122
  // http bearer authentication required
112
123
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
124
 
114
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
128
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
129
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
130
+ if (authorizationValue || authorizationKeepEmpty) {
131
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
116
132
  }
117
133
 
118
134
 
@@ -127,7 +143,8 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
127
143
  };
128
144
  },
129
145
  /**
130
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
146
+ * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
147
+ * @summary List the email message attachments
131
148
  * @param {string} code
132
149
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
133
150
  * @param {*} [options] Override http request option.
@@ -155,8 +172,13 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
155
172
  // http bearer authentication required
156
173
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
157
174
 
158
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
159
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
175
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
176
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
177
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
178
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
179
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
180
+ if (authorizationValue || authorizationKeepEmpty) {
181
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
160
182
  }
161
183
 
162
184
 
@@ -171,16 +193,16 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
171
193
  };
172
194
  },
173
195
  /**
174
- * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
196
+ * Returns a list of sent and received email messages. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
175
197
  * @summary List email messages
176
198
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
177
199
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
178
200
  * @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.
179
- * @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>
201
+ * @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, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
180
202
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
181
- * @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>
203
+ * @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>
182
204
  * @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>
183
- * @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>
205
+ * @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, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy</i>
184
206
  * @param {*} [options] Override http request option.
185
207
  * @throws {RequiredError}
186
208
  */
@@ -231,8 +253,13 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
231
253
  localVarQueryParameter['filters'] = filters;
232
254
  }
233
255
 
234
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
235
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
256
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
257
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
258
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
259
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
260
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
261
+ if (authorizationValue || authorizationKeepEmpty) {
262
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
236
263
  }
237
264
 
238
265
 
@@ -241,6 +268,62 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
241
268
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
242
269
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
243
270
 
271
+ return {
272
+ url: toPathString(localVarUrlObj),
273
+ options: localVarRequestOptions,
274
+ };
275
+ },
276
+ /**
277
+ * Sends an outgoing email with delivery status bounced or failed again, as a new email in the same thread, and returns the new email. A bounced email is resent to every recipient that bounced, not to the recipients that received it. newAddress replaces one bounced recipient; pass recipient to name it when more than one bounced. A failed email is resent to all its original recipients; recipient and newAddress are not allowed for it. The original email is not changed and can be resent again. The new email starts as pending and carries resentFromMessageCode, resendReason and, for a bounce, resentOriginalRecipient. **Required Permissions** \"notification-management.email-messages.create\"
278
+ * @summary Resend the email message
279
+ * @param {string} code
280
+ * @param {ResendEmailMessageBodyDto} resendEmailMessageBodyDto
281
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ resendMessage: async (code: string, resendEmailMessageBodyDto: ResendEmailMessageBodyDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
286
+ // verify required parameter 'code' is not null or undefined
287
+ assertParamExists('resendMessage', 'code', code)
288
+ // verify required parameter 'resendEmailMessageBodyDto' is not null or undefined
289
+ assertParamExists('resendMessage', 'resendEmailMessageBodyDto', resendEmailMessageBodyDto)
290
+ const localVarPath = `/notificationservice/v1/email-messages/{code}/resend`
291
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
292
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
293
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
294
+ let baseOptions;
295
+ let baseAccessToken;
296
+ if (configuration) {
297
+ baseOptions = configuration.baseOptions;
298
+ baseAccessToken = configuration.accessToken;
299
+ }
300
+
301
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
302
+ const localVarHeaderParameter = {} as any;
303
+ const localVarQueryParameter = {} as any;
304
+
305
+ // authentication bearer required
306
+ // http bearer authentication required
307
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
308
+
309
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
310
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
311
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
312
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
313
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
314
+ if (authorizationValue || authorizationKeepEmpty) {
315
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
316
+ }
317
+
318
+
319
+
320
+ localVarHeaderParameter['Content-Type'] = 'application/json';
321
+
322
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
323
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
324
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
325
+ localVarRequestOptions.data = serializeDataIfNeeded(resendEmailMessageBodyDto, localVarRequestOptions, configuration)
326
+
244
327
  return {
245
328
  url: toPathString(localVarUrlObj),
246
329
  options: localVarRequestOptions,
@@ -257,7 +340,8 @@ export const EmailMessagesApiFp = function(configuration?: Configuration) {
257
340
  const localVarAxiosParamCreator = EmailMessagesApiAxiosParamCreator(configuration)
258
341
  return {
259
342
  /**
260
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
343
+ * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
344
+ * @summary Download the email message attachment
261
345
  * @param {string} code
262
346
  * @param {number} attachmentId
263
347
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -269,7 +353,8 @@ export const EmailMessagesApiFp = function(configuration?: Configuration) {
269
353
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
270
354
  },
271
355
  /**
272
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
356
+ * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
357
+ * @summary Retrieve the email message
273
358
  * @param {string} code
274
359
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
275
360
  * @param {*} [options] Override http request option.
@@ -280,7 +365,8 @@ export const EmailMessagesApiFp = function(configuration?: Configuration) {
280
365
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
281
366
  },
282
367
  /**
283
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
368
+ * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
369
+ * @summary List the email message attachments
284
370
  * @param {string} code
285
371
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
286
372
  * @param {*} [options] Override http request option.
@@ -291,16 +377,16 @@ export const EmailMessagesApiFp = function(configuration?: Configuration) {
291
377
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
292
378
  },
293
379
  /**
294
- * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
380
+ * Returns a list of sent and received email messages. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
295
381
  * @summary List email messages
296
382
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
297
383
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
298
384
  * @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.
299
- * @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, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
385
+ * @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, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
300
386
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
301
- * @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, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
387
+ * @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, threadCode, direction, deliveryStatus, workflowStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
302
388
  * @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: attachments&lt;i&gt;
303
- * @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, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
389
+ * @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, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
304
390
  * @param {*} [options] Override http request option.
305
391
  * @throws {RequiredError}
306
392
  */
@@ -308,6 +394,19 @@ export const EmailMessagesApiFp = function(configuration?: Configuration) {
308
394
  const localVarAxiosArgs = await localVarAxiosParamCreator.listEmailMessages(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
309
395
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
310
396
  },
397
+ /**
398
+ * Sends an outgoing email with delivery status bounced or failed again, as a new email in the same thread, and returns the new email. A bounced email is resent to every recipient that bounced, not to the recipients that received it. newAddress replaces one bounced recipient; pass recipient to name it when more than one bounced. A failed email is resent to all its original recipients; recipient and newAddress are not allowed for it. The original email is not changed and can be resent again. The new email starts as pending and carries resentFromMessageCode, resendReason and, for a bounce, resentOriginalRecipient. **Required Permissions** \"notification-management.email-messages.create\"
399
+ * @summary Resend the email message
400
+ * @param {string} code
401
+ * @param {ResendEmailMessageBodyDto} resendEmailMessageBodyDto
402
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ async resendMessage(code: string, resendEmailMessageBodyDto: ResendEmailMessageBodyDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResendEmailMessageResponseClass>> {
407
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resendMessage(code, resendEmailMessageBodyDto, authorization, options);
408
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
409
+ },
311
410
  }
312
411
  };
313
412
 
@@ -319,7 +418,8 @@ export const EmailMessagesApiFactory = function (configuration?: Configuration,
319
418
  const localVarFp = EmailMessagesApiFp(configuration)
320
419
  return {
321
420
  /**
322
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
421
+ * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
422
+ * @summary Download the email message attachment
323
423
  * @param {string} code
324
424
  * @param {number} attachmentId
325
425
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -330,7 +430,8 @@ export const EmailMessagesApiFactory = function (configuration?: Configuration,
330
430
  return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then((request) => request(axios, basePath));
331
431
  },
332
432
  /**
333
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
433
+ * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
434
+ * @summary Retrieve the email message
334
435
  * @param {string} code
335
436
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
336
437
  * @param {*} [options] Override http request option.
@@ -340,7 +441,8 @@ export const EmailMessagesApiFactory = function (configuration?: Configuration,
340
441
  return localVarFp.getMessage(code, authorization, options).then((request) => request(axios, basePath));
341
442
  },
342
443
  /**
343
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
444
+ * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
445
+ * @summary List the email message attachments
344
446
  * @param {string} code
345
447
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
346
448
  * @param {*} [options] Override http request option.
@@ -350,22 +452,34 @@ export const EmailMessagesApiFactory = function (configuration?: Configuration,
350
452
  return localVarFp.listAttachments(code, authorization, options).then((request) => request(axios, basePath));
351
453
  },
352
454
  /**
353
- * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
455
+ * Returns a list of sent and received email messages. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
354
456
  * @summary List email messages
355
457
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
356
458
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
357
459
  * @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.
358
- * @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, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
460
+ * @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, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
359
461
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
360
- * @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, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
462
+ * @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, threadCode, direction, deliveryStatus, workflowStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
361
463
  * @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: attachments&lt;i&gt;
362
- * @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, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
464
+ * @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, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
363
465
  * @param {*} [options] Override http request option.
364
466
  * @throws {RequiredError}
365
467
  */
366
468
  listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass> {
367
469
  return localVarFp.listEmailMessages(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
368
470
  },
471
+ /**
472
+ * Sends an outgoing email with delivery status bounced or failed again, as a new email in the same thread, and returns the new email. A bounced email is resent to every recipient that bounced, not to the recipients that received it. newAddress replaces one bounced recipient; pass recipient to name it when more than one bounced. A failed email is resent to all its original recipients; recipient and newAddress are not allowed for it. The original email is not changed and can be resent again. The new email starts as pending and carries resentFromMessageCode, resendReason and, for a bounce, resentOriginalRecipient. **Required Permissions** \"notification-management.email-messages.create\"
473
+ * @summary Resend the email message
474
+ * @param {string} code
475
+ * @param {ResendEmailMessageBodyDto} resendEmailMessageBodyDto
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
+ resendMessage(code: string, resendEmailMessageBodyDto: ResendEmailMessageBodyDto, authorization?: string, options?: any): AxiosPromise<ResendEmailMessageResponseClass> {
481
+ return localVarFp.resendMessage(code, resendEmailMessageBodyDto, authorization, options).then((request) => request(axios, basePath));
482
+ },
369
483
  };
370
484
  };
371
485
 
@@ -467,7 +581,7 @@ export interface EmailMessagesApiListEmailMessagesRequest {
467
581
  readonly pageToken?: string
468
582
 
469
583
  /**
470
- * 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, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
584
+ * 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, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
471
585
  * @type {string}
472
586
  * @memberof EmailMessagesApiListEmailMessages
473
587
  */
@@ -481,7 +595,7 @@ export interface EmailMessagesApiListEmailMessagesRequest {
481
595
  readonly search?: string
482
596
 
483
597
  /**
484
- * 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, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
598
+ * 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, threadCode, direction, deliveryStatus, workflowStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
485
599
  * @type {string}
486
600
  * @memberof EmailMessagesApiListEmailMessages
487
601
  */
@@ -495,13 +609,41 @@ export interface EmailMessagesApiListEmailMessagesRequest {
495
609
  readonly expand?: string
496
610
 
497
611
  /**
498
- * 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, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
612
+ * 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, threadCode, entityType, entityCode, entityNumber, direction, deliveryStatus, provider, mailbox, workflowStatus, resentFromMessageCode, resendReason, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
499
613
  * @type {string}
500
614
  * @memberof EmailMessagesApiListEmailMessages
501
615
  */
502
616
  readonly filters?: string
503
617
  }
504
618
 
619
+ /**
620
+ * Request parameters for resendMessage operation in EmailMessagesApi.
621
+ * @export
622
+ * @interface EmailMessagesApiResendMessageRequest
623
+ */
624
+ export interface EmailMessagesApiResendMessageRequest {
625
+ /**
626
+ *
627
+ * @type {string}
628
+ * @memberof EmailMessagesApiResendMessage
629
+ */
630
+ readonly code: string
631
+
632
+ /**
633
+ *
634
+ * @type {ResendEmailMessageBodyDto}
635
+ * @memberof EmailMessagesApiResendMessage
636
+ */
637
+ readonly resendEmailMessageBodyDto: ResendEmailMessageBodyDto
638
+
639
+ /**
640
+ * Bearer Token: provided by the login endpoint under the name accessToken.
641
+ * @type {string}
642
+ * @memberof EmailMessagesApiResendMessage
643
+ */
644
+ readonly authorization?: string
645
+ }
646
+
505
647
  /**
506
648
  * EmailMessagesApi - object-oriented interface
507
649
  * @export
@@ -510,40 +652,43 @@ export interface EmailMessagesApiListEmailMessagesRequest {
510
652
  */
511
653
  export class EmailMessagesApi extends BaseAPI {
512
654
  /**
513
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
655
+ * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
656
+ * @summary Download the email message attachment
514
657
  * @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
515
658
  * @param {*} [options] Override http request option.
516
659
  * @throws {RequiredError}
517
660
  * @memberof EmailMessagesApi
518
661
  */
519
662
  public downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig) {
520
- return EmailMessagesApiFp(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
663
+ return EmailMessagesApiFp(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
521
664
  }
522
665
 
523
666
  /**
524
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
667
+ * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
668
+ * @summary Retrieve the email message
525
669
  * @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
526
670
  * @param {*} [options] Override http request option.
527
671
  * @throws {RequiredError}
528
672
  * @memberof EmailMessagesApi
529
673
  */
530
674
  public getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig) {
531
- return EmailMessagesApiFp(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
675
+ return EmailMessagesApiFp(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
532
676
  }
533
677
 
534
678
  /**
535
- * undefined **Required Permissions** \"notification-management.email-messages.view\"
679
+ * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
680
+ * @summary List the email message attachments
536
681
  * @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
537
682
  * @param {*} [options] Override http request option.
538
683
  * @throws {RequiredError}
539
684
  * @memberof EmailMessagesApi
540
685
  */
541
686
  public listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig) {
542
- return EmailMessagesApiFp(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
687
+ return EmailMessagesApiFp(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
543
688
  }
544
689
 
545
690
  /**
546
- * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
691
+ * Returns a list of sent and received email messages. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
547
692
  * @summary List email messages
548
693
  * @param {EmailMessagesApiListEmailMessagesRequest} requestParameters Request parameters.
549
694
  * @param {*} [options] Override http request option.
@@ -551,6 +696,18 @@ export class EmailMessagesApi extends BaseAPI {
551
696
  * @memberof EmailMessagesApi
552
697
  */
553
698
  public listEmailMessages(requestParameters: EmailMessagesApiListEmailMessagesRequest = {}, options?: AxiosRequestConfig) {
554
- return EmailMessagesApiFp(this.configuration).listEmailMessages(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
699
+ return EmailMessagesApiFp(this.configuration).listEmailMessages(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
700
+ }
701
+
702
+ /**
703
+ * Sends an outgoing email with delivery status bounced or failed again, as a new email in the same thread, and returns the new email. A bounced email is resent to every recipient that bounced, not to the recipients that received it. newAddress replaces one bounced recipient; pass recipient to name it when more than one bounced. A failed email is resent to all its original recipients; recipient and newAddress are not allowed for it. The original email is not changed and can be resent again. The new email starts as pending and carries resentFromMessageCode, resendReason and, for a bounce, resentOriginalRecipient. **Required Permissions** \"notification-management.email-messages.create\"
704
+ * @summary Resend the email message
705
+ * @param {EmailMessagesApiResendMessageRequest} requestParameters Request parameters.
706
+ * @param {*} [options] Override http request option.
707
+ * @throws {RequiredError}
708
+ * @memberof EmailMessagesApi
709
+ */
710
+ public resendMessage(requestParameters: EmailMessagesApiResendMessageRequest, options?: AxiosRequestConfig) {
711
+ return EmailMessagesApiFp(this.configuration).resendMessage(requestParameters.code, requestParameters.resendEmailMessageBodyDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
555
712
  }
556
713
  }