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

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 (110) hide show
  1. package/.openapi-generator/FILES +0 -23
  2. package/README.md +2 -2
  3. package/api/email-messages-api.ts +36 -56
  4. package/api/email-tracking-api.ts +48 -291
  5. package/api/email-verifications-api.ts +12 -24
  6. package/api/layouts-api.ts +46 -76
  7. package/api/notification-templates-api.ts +46 -76
  8. package/api/notifications-api.ts +6 -121
  9. package/api.ts +0 -6
  10. package/base.ts +41 -174
  11. package/configuration.ts +0 -20
  12. package/dist/api/email-messages-api.d.ts +28 -40
  13. package/dist/api/email-messages-api.js +40 -62
  14. package/dist/api/email-tracking-api.d.ts +40 -170
  15. package/dist/api/email-tracking-api.js +48 -261
  16. package/dist/api/email-verifications-api.d.ts +8 -16
  17. package/dist/api/email-verifications-api.js +16 -30
  18. package/dist/api/layouts-api.d.ts +36 -56
  19. package/dist/api/layouts-api.js +50 -81
  20. package/dist/api/notification-templates-api.d.ts +36 -56
  21. package/dist/api/notification-templates-api.js +50 -81
  22. package/dist/api/notifications-api.d.ts +4 -65
  23. package/dist/api/notifications-api.js +8 -111
  24. package/dist/api.d.ts +0 -3
  25. package/dist/api.js +0 -3
  26. package/dist/base.d.ts +0 -24
  27. package/dist/base.js +59 -178
  28. package/dist/configuration.d.ts +0 -17
  29. package/dist/configuration.js +0 -2
  30. package/dist/models/email-message-class.d.ts +7 -73
  31. package/dist/models/email-message-class.js +3 -22
  32. package/dist/models/email-thread-class.d.ts +5 -37
  33. package/dist/models/index.d.ts +0 -20
  34. package/dist/models/index.js +0 -20
  35. package/dist/models/send-notification-request-dto.d.ts +1 -10
  36. package/dist/models/send-notification-request-dto.js +1 -2
  37. package/models/email-message-class.ts +8 -78
  38. package/models/email-thread-class.ts +5 -37
  39. package/models/index.ts +0 -20
  40. package/models/send-notification-request-dto.ts +2 -9
  41. package/package.json +1 -1
  42. package/api/email-mailboxes-api.ts +0 -150
  43. package/api/email-subscriptions-api.ts +0 -781
  44. package/api/msgraph-webhooks-api.ts +0 -278
  45. package/dist/api/email-mailboxes-api.d.ts +0 -87
  46. package/dist/api/email-mailboxes-api.js +0 -221
  47. package/dist/api/email-subscriptions-api.d.ts +0 -432
  48. package/dist/api/email-subscriptions-api.js +0 -738
  49. package/dist/api/msgraph-webhooks-api.d.ts +0 -168
  50. package/dist/api/msgraph-webhooks-api.js +0 -305
  51. package/dist/models/assign-email-thread-entity-body-dto.d.ts +0 -43
  52. package/dist/models/assign-email-thread-entity-body-dto.js +0 -22
  53. package/dist/models/assign-email-thread-entity-response-class.d.ts +0 -25
  54. package/dist/models/assign-email-thread-entity-response-class.js +0 -15
  55. package/dist/models/catch-up-email-subscription-response-class.d.ts +0 -24
  56. package/dist/models/catch-up-email-subscription-response-class.js +0 -15
  57. package/dist/models/catch-up-email-subscriptions-request-dto.d.ts +0 -24
  58. package/dist/models/catch-up-email-subscriptions-request-dto.js +0 -15
  59. package/dist/models/catch-up-email-subscriptions-response-class.d.ts +0 -30
  60. package/dist/models/catch-up-email-subscriptions-response-class.js +0 -15
  61. package/dist/models/email-mailbox-class.d.ts +0 -47
  62. package/dist/models/email-mailbox-class.js +0 -20
  63. package/dist/models/email-message-summary-class.d.ts +0 -98
  64. package/dist/models/email-message-summary-class.js +0 -33
  65. package/dist/models/email-subscription-class.d.ts +0 -110
  66. package/dist/models/email-subscription-class.js +0 -23
  67. package/dist/models/entity-ref-class.d.ts +0 -37
  68. package/dist/models/entity-ref-class.js +0 -22
  69. package/dist/models/get-email-subscription-response-class.d.ts +0 -25
  70. package/dist/models/get-email-subscription-response-class.js +0 -15
  71. package/dist/models/grpc-send-email-request-dto.d.ts +0 -137
  72. package/dist/models/grpc-send-email-request-dto.js +0 -22
  73. package/dist/models/inline-attachment-dto.d.ts +0 -36
  74. package/dist/models/inline-attachment-dto.js +0 -15
  75. package/dist/models/list-email-mailboxes-response-class.d.ts +0 -43
  76. package/dist/models/list-email-mailboxes-response-class.js +0 -15
  77. package/dist/models/list-email-subscriptions-response-class.d.ts +0 -43
  78. package/dist/models/list-email-subscriptions-response-class.js +0 -15
  79. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +0 -24
  80. package/dist/models/reconcile-email-subscriptions-request-dto.js +0 -15
  81. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +0 -48
  82. package/dist/models/reconcile-email-subscriptions-response-class.js +0 -15
  83. package/dist/models/renew-email-subscription-response-class.d.ts +0 -25
  84. package/dist/models/renew-email-subscription-response-class.js +0 -15
  85. package/dist/models/send-email-request-dto.d.ts +0 -131
  86. package/dist/models/send-email-request-dto.js +0 -22
  87. package/dist/models/send-email-response-class.d.ts +0 -24
  88. package/dist/models/send-email-response-class.js +0 -15
  89. package/dist/models/unassign-email-thread-entity-response-class.d.ts +0 -25
  90. package/dist/models/unassign-email-thread-entity-response-class.js +0 -15
  91. package/models/assign-email-thread-entity-body-dto.ts +0 -52
  92. package/models/assign-email-thread-entity-response-class.ts +0 -31
  93. package/models/catch-up-email-subscription-response-class.ts +0 -30
  94. package/models/catch-up-email-subscriptions-request-dto.ts +0 -30
  95. package/models/catch-up-email-subscriptions-response-class.ts +0 -36
  96. package/models/email-mailbox-class.ts +0 -56
  97. package/models/email-message-summary-class.ts +0 -109
  98. package/models/email-subscription-class.ts +0 -119
  99. package/models/entity-ref-class.ts +0 -46
  100. package/models/get-email-subscription-response-class.ts +0 -31
  101. package/models/grpc-send-email-request-dto.ts +0 -144
  102. package/models/inline-attachment-dto.ts +0 -42
  103. package/models/list-email-mailboxes-response-class.ts +0 -49
  104. package/models/list-email-subscriptions-response-class.ts +0 -49
  105. package/models/reconcile-email-subscriptions-request-dto.ts +0 -30
  106. package/models/reconcile-email-subscriptions-response-class.ts +0 -54
  107. package/models/renew-email-subscription-response-class.ts +0 -31
  108. package/models/send-email-request-dto.ts +0 -138
  109. package/models/send-email-response-class.ts +0 -30
  110. package/models/unassign-email-thread-entity-response-class.ts +0 -31
package/base.ts CHANGED
@@ -32,20 +32,9 @@ export const COLLECTION_FORMATS = {
32
32
  pipes: "|",
33
33
  };
34
34
 
35
- export interface SessionClass {
36
- sub: string;
37
- username?: string;
38
- email?: string;
39
- tenantSlug?: string;
40
- permissions?: string;
41
- expiresAt?: number;
42
- }
43
-
44
35
  export interface LoginClass {
45
36
  accessToken: string;
46
37
  permissions: string;
47
- authMode?: string;
48
- session?: SessionClass;
49
38
  }
50
39
 
51
40
  export interface SwitchWorkspaceRequest {
@@ -56,8 +45,6 @@ export interface SwitchWorkspaceRequest {
56
45
  export interface SwitchWorkspaceResponseClass {
57
46
  accessToken: string;
58
47
  permissions: string;
59
- authMode?: string;
60
- session?: SessionClass;
61
48
  }
62
49
 
63
50
  export enum Environment {
@@ -90,19 +77,10 @@ interface TokenData {
90
77
  accessToken?: string;
91
78
  username?: string;
92
79
  permissions?: string;
93
- // 'both' or 'session' when authservice keeps the tokens in a server session.
94
- authMode?: string;
95
- sub?: string;
96
80
  }
97
81
 
98
82
  const NETWORK_ERROR_MESSAGE = "Network Error";
99
83
  const TOKEN_DATA = 'APP_TOKEN';
100
- // Sent only to authservice, to ask for a server session.
101
- const AUTH_MODE_HEADER = 'X-Emil-Auth-Mode';
102
- // Names the account on every call; one browser session can hold several.
103
- const ACCOUNT_HEADER = 'X-Emil-Account';
104
- const SESSION_MODES = ['both', 'session'];
105
- const RESEND_SAFE_METHODS = ['get', 'head', 'options'];
106
84
 
107
85
  /**
108
86
  *
@@ -124,18 +102,10 @@ export class BaseAPI {
124
102
  this.configuration = configuration;
125
103
  this.basePath = configuration.basePath || this.basePath;
126
104
 
127
- if (configuration.cookieAuth) {
128
- this.configuration.username = this.configuration.username || this.tokenData.username;
129
- }
130
-
131
- if (this.usesSession()) {
132
- this.useSessionAuth();
133
- } else {
134
- // Use config token if provided, otherwise use tokenData token
135
- const configToken = this.configuration.accessToken;
136
- const storedToken = accessToken ? `Bearer ${accessToken}` : '';
137
- this.configuration.accessToken = configToken || storedToken;
138
- }
105
+ // Use config token if provided, otherwise use tokenData token
106
+ const configToken = this.configuration.accessToken;
107
+ const storedToken = accessToken ? `Bearer ${accessToken}` : '';
108
+ this.configuration.accessToken = configToken || storedToken;
139
109
  } else {
140
110
  const { accessToken, username } = this.tokenData;
141
111
 
@@ -149,107 +119,6 @@ export class BaseAPI {
149
119
  this.attachInterceptor(axios);
150
120
  }
151
121
 
152
- // The app's own account wins over APP_TOKEN, which holds whichever tab wrote last.
153
- private sessionAccount(): string | undefined {
154
- return this.configuration.account || this.tokenData.sub;
155
- }
156
-
157
- // Apps may pass the address as the second argument only; authservice is on the same host.
158
- private authBasePath(): string {
159
- return this.configuration.basePath || this.basePath;
160
- }
161
-
162
- private usesSession(): boolean {
163
- return !!this.configuration.cookieAuth && SESSION_MODES.indexOf(this.tokenData.authMode) !== -1 && !!this.sessionAccount();
164
- }
165
-
166
- private useSessionAuth() {
167
- const { headers, ...baseOptions } = this.configuration.baseOptions || {};
168
- this.configuration.accessToken = '';
169
- this.configuration.baseOptions = {
170
- ...baseOptions,
171
- withCredentials: true,
172
- headers: { ...headers, [ACCOUNT_HEADER]: this.sessionAccount() },
173
- };
174
- }
175
-
176
- private useHeaderAuth(accessToken: string) {
177
- this.configuration.accessToken = accessToken ? `Bearer ${accessToken}` : '';
178
- this.tokenData.accessToken = accessToken;
179
- delete this.tokenData.authMode;
180
- delete this.tokenData.sub;
181
- if (this.configuration.cookieAuth) {
182
- const { withCredentials, headers, ...baseOptions } = this.configuration.baseOptions || {};
183
- const { [ACCOUNT_HEADER]: account, ...otherHeaders } = headers || {};
184
- this.configuration.baseOptions = { ...baseOptions, headers: otherHeaders };
185
- }
186
- }
187
-
188
- private applyTokenReply({ accessToken, authMode, session }: LoginClass) {
189
- if (this.configuration.cookieAuth && SESSION_MODES.indexOf(authMode) !== -1 && session?.sub) {
190
- this.tokenData.authMode = authMode;
191
- this.tokenData.sub = session.sub;
192
- if (this.configuration.account) {
193
- // A workspace switch moves the app to another account.
194
- this.configuration.account = session.sub;
195
- }
196
- // Both keeps the token for apps not moved yet; session mode keeps no token at all.
197
- if (authMode === 'both' && accessToken) {
198
- this.tokenData.accessToken = accessToken;
199
- } else {
200
- delete this.tokenData.accessToken;
201
- }
202
- this.useSessionAuth();
203
- } else {
204
- this.useHeaderAuth(accessToken);
205
- }
206
- }
207
-
208
- private sessionHeaders(): Record<string, string> {
209
- if (!this.configuration.cookieAuth) {
210
- return {};
211
- }
212
- return {
213
- [AUTH_MODE_HEADER]: 'session',
214
- ...(this.usesSession() && { [ACCOUNT_HEADER]: this.sessionAccount() }),
215
- };
216
- }
217
-
218
- private withCurrentAuth(config: AxiosRequestConfig): AxiosRequestConfig {
219
- delete config.headers['Authorization'];
220
- delete config.headers[ACCOUNT_HEADER];
221
- if (this.usesSession()) {
222
- config.headers[ACCOUNT_HEADER] = this.sessionAccount();
223
- config.withCredentials = true;
224
- } else if (this.configuration.accessToken) {
225
- config.headers['Authorization'] = this.configuration.accessToken;
226
- }
227
- return config;
228
- }
229
-
230
- // Both keeps the token, so a session call the browser could not complete can be sent again with it.
231
- private canRetryWithToken(config: AxiosRequestConfig): boolean {
232
- return !!config.withCredentials && !!config.headers?.[ACCOUNT_HEADER]
233
- && !!this.tokenData.accessToken && this.tokenData.authMode !== 'session';
234
- }
235
-
236
- // A network error can come after the server ran the call, so only a call that is safe to repeat is sent again.
237
- private canResend(config: AxiosRequestConfig): boolean {
238
- return RESEND_SAFE_METHODS.indexOf((config.method || 'get').toLowerCase()) !== -1
239
- || Object.keys(config.headers || {}).some((name) => name.toLowerCase() === 'idempotency-key');
240
- }
241
-
242
- private switchToToken() {
243
- this.useHeaderAuth(this.tokenData.accessToken);
244
- this.storeTokenData(this.tokenData);
245
- }
246
-
247
- private retryWithToken(axios: AxiosInstance, config: AxiosRequestConfig) {
248
- this.switchToToken();
249
- config.withCredentials = false;
250
- return axios(this.withCurrentAuth(config));
251
- }
252
-
253
122
  selectEnvironment(env: Environment) {
254
123
  this.selectBasePath(env);
255
124
  }
@@ -269,8 +138,8 @@ export class BaseAPI {
269
138
  async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
270
139
  const options: AxiosRequestConfig = {
271
140
  method: 'POST',
272
- url: `${this.authBasePath()}/authservice/v1/login`,
273
- headers: { 'Content-Type': 'application/json', ...(this.configuration.cookieAuth && { [AUTH_MODE_HEADER]: 'session' }) },
141
+ url: `${this.configuration.basePath}/authservice/v1/login`,
142
+ headers: { 'Content-Type': 'application/json' },
274
143
  data: {
275
144
  username,
276
145
  password,
@@ -280,10 +149,13 @@ export class BaseAPI {
280
149
 
281
150
  const response = await globalAxios.request<LoginClass>(options);
282
151
 
152
+ const { data: { accessToken, permissions } } = response;
153
+
283
154
  this.configuration.username = username;
155
+ this.configuration.accessToken = `Bearer ${accessToken}`;
284
156
  this.tokenData.username = username;
285
- this.tokenData.permissions = response.data.permissions;
286
- this.applyTokenReply(response.data);
157
+ this.tokenData.accessToken = accessToken;
158
+ this.tokenData.permissions = permissions;
287
159
 
288
160
  // Switch workspace if provided
289
161
  if (targetWorkspace) {
@@ -303,11 +175,10 @@ export class BaseAPI {
303
175
  async switchWorkspace(targetWorkspace: string): Promise<void> {
304
176
  const options: AxiosRequestConfig = {
305
177
  method: 'POST',
306
- url: `${this.authBasePath()}/authservice/v1/workspaces/switch`,
178
+ url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
307
179
  headers: {
308
180
  'Content-Type': 'application/json',
309
- ...this.sessionHeaders(),
310
- ...(!this.usesSession() && !!this.configuration.accessToken && { 'Authorization': this.configuration.accessToken as string }),
181
+ 'Authorization': `Bearer ${this.configuration.accessToken}`,
311
182
  },
312
183
  data: {
313
184
  username: this.configuration.username,
@@ -318,8 +189,11 @@ export class BaseAPI {
318
189
 
319
190
  const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
320
191
 
321
- this.tokenData.permissions = response.data.permissions;
322
- this.applyTokenReply(response.data);
192
+ const { data: { accessToken, permissions } } = response;
193
+
194
+ this.configuration.accessToken = `Bearer ${accessToken}`;
195
+ this.tokenData.accessToken = accessToken;
196
+ this.tokenData.permissions = permissions;
323
197
 
324
198
  this.storeTokenData({
325
199
  ...this.tokenData
@@ -345,10 +219,9 @@ export class BaseAPI {
345
219
 
346
220
  const options: AxiosRequestConfig = {
347
221
  method: 'POST',
348
- url: `${this.authBasePath()}/authservice/v1/refresh-token`,
222
+ url: `${this.configuration.basePath}/authservice/v1/refresh-token`,
349
223
  headers: {
350
224
  'Content-Type': 'application/json',
351
- ...this.sessionHeaders(),
352
225
  },
353
226
  data: { username: username },
354
227
  withCredentials: true,
@@ -389,22 +262,20 @@ export class BaseAPI {
389
262
  && !originalConfig._retry) {
390
263
  originalConfig._retry = true;
391
264
  try {
392
- const reply = await this.refreshTokenInternal();
393
- this.tokenData.permissions = reply.permissions;
394
- this.applyTokenReply(reply);
395
- this.storeTokenData(this.tokenData);
265
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
266
+ const accessToken = `Bearer ${tokenString}`;
267
+ this.tokenData.permissions = permissions;
396
268
 
397
- if (!this.usesSession()) {
398
- return axios(this.withCurrentAuth(originalConfig));
399
- }
269
+ delete originalConfig.headers['Authorization']
270
+
271
+ originalConfig.headers['Authorization'] = accessToken;
400
272
 
401
- // Both mode: if the browser does not send the session cookie (another site), use the token.
402
- return axios(this.withCurrentAuth(originalConfig)).catch((retryError) => {
403
- if (retryError?.response?.status !== 401 || !this.tokenData.accessToken) {
404
- return Promise.reject(retryError);
405
- }
406
- return this.retryWithToken(axios, originalConfig);
407
- });
273
+ this.configuration.accessToken = accessToken;
274
+ this.tokenData.accessToken = tokenString;
275
+
276
+ this.storeTokenData(this.tokenData);
277
+
278
+ return axios(originalConfig);
408
279
  } catch (_error) {
409
280
  if (_error.response && _error.response.data) {
410
281
  return Promise.reject(_error.response.data);
@@ -412,30 +283,26 @@ export class BaseAPI {
412
283
  return Promise.reject(_error);
413
284
  }
414
285
  }
415
- } else if (err.message === NETWORK_ERROR_MESSAGE && this.canRetryWithToken(originalConfig)) {
416
- // Both mode: the browser blocked the session call or hid its reply; later calls use the token.
417
- if (!this.canResend(originalConfig)) {
418
- this.switchToToken();
419
- return Promise.reject(err);
420
- }
421
- return this.retryWithToken(axios, originalConfig);
422
286
  } else if (err.message === NETWORK_ERROR_MESSAGE
423
- && (originalConfig.headers.hasOwnProperty('Authorization')
424
- || (this.configuration.cookieAuth && originalConfig.withCredentials && this.canResend(originalConfig)))
287
+ && originalConfig.headers.hasOwnProperty('Authorization')
425
288
  && _retry_count < 4
426
289
  ) {
427
290
  _retry_count++;
428
291
  try {
429
- // In session mode an unreadable 401 (no CORS headers on the error reply) also lands here.
430
- const reply = await this.refreshTokenInternal();
431
- this.tokenData.permissions = reply.permissions;
292
+ const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
293
+ const accessToken = `Bearer ${tokenString}`;
294
+ this.tokenData.permissions = permissions;
432
295
 
433
296
  _retry = true;
434
- this.applyTokenReply(reply);
297
+ originalConfig.headers['Authorization'] = accessToken;
298
+
299
+ this.configuration.accessToken = accessToken;
300
+ this.tokenData.accessToken = tokenString;
301
+
435
302
  this.storeTokenData(this.tokenData);
436
303
 
437
304
  return axios.request({
438
- ...this.withCurrentAuth(originalConfig),
305
+ ...originalConfig,
439
306
  });
440
307
  } catch (_error) {
441
308
  if (_error.response && _error.response.data) {
package/configuration.ts CHANGED
@@ -21,8 +21,6 @@ export interface ConfigurationParameters {
21
21
  basePath?: string;
22
22
  baseOptions?: any;
23
23
  formDataCtor?: new () => any;
24
- cookieAuth?: boolean;
25
- account?: string;
26
24
  }
27
25
 
28
26
  export class Configuration {
@@ -76,22 +74,6 @@ export class Configuration {
76
74
  */
77
75
  formDataCtor?: new () => any;
78
76
 
79
- /**
80
- * Use a server session when authservice makes one; otherwise the token, as without this option.
81
- * Set `account` too, so each SDK object keeps its own account.
82
- *
83
- * @type {boolean}
84
- * @memberof Configuration
85
- */
86
- cookieAuth?: boolean;
87
- /**
88
- * The session account (Cognito sub) this app shows, so the SDK never takes another tab's account.
89
- *
90
- * @type {string}
91
- * @memberof Configuration
92
- */
93
- account?: string;
94
-
95
77
  constructor(param: ConfigurationParameters = {}) {
96
78
  this.apiKey = param.apiKey;
97
79
  this.username = param.username;
@@ -100,8 +82,6 @@ export class Configuration {
100
82
  this.basePath = param.basePath;
101
83
  this.baseOptions = param.baseOptions;
102
84
  this.formDataCtor = param.formDataCtor;
103
- this.cookieAuth = param.cookieAuth;
104
- this.account = param.account;
105
85
  }
106
86
 
107
87
  /**
@@ -22,8 +22,7 @@ import { ListEmailMessagesResponseClass } from '../models';
22
22
  */
23
23
  export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configuration) => {
24
24
  /**
25
- * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
26
- * @summary Download the email message attachment
25
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
27
26
  * @param {string} code
28
27
  * @param {number} attachmentId
29
28
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -32,8 +31,7 @@ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configu
32
31
  */
33
32
  downloadAttachment: (code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
34
33
  /**
35
- * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
36
- * @summary Retrieve the email message
34
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
37
35
  * @param {string} code
38
36
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
39
37
  * @param {*} [options] Override http request option.
@@ -41,8 +39,7 @@ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configu
41
39
  */
42
40
  getMessage: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
43
41
  /**
44
- * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
45
- * @summary List the email message attachments
42
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
46
43
  * @param {string} code
47
44
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
48
45
  * @param {*} [options] Override http request option.
@@ -50,16 +47,16 @@ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configu
50
47
  */
51
48
  listAttachments: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
52
49
  /**
53
- * 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\"
50
+ * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
54
51
  * @summary List email messages
55
52
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
56
53
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
57
54
  * @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.
58
- * @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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
55
+ * @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;
59
56
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
60
- * @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;
57
+ * @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;
61
58
  * @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;
62
- * @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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
59
+ * @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;
63
60
  * @param {*} [options] Override http request option.
64
61
  * @throws {RequiredError}
65
62
  */
@@ -71,8 +68,7 @@ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configu
71
68
  */
72
69
  export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
73
70
  /**
74
- * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
75
- * @summary Download the email message attachment
71
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
76
72
  * @param {string} code
77
73
  * @param {number} attachmentId
78
74
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -81,8 +77,7 @@ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
81
77
  */
82
78
  downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>>;
83
79
  /**
84
- * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
85
- * @summary Retrieve the email message
80
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
86
81
  * @param {string} code
87
82
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
88
83
  * @param {*} [options] Override http request option.
@@ -90,8 +85,7 @@ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
90
85
  */
91
86
  getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>>;
92
87
  /**
93
- * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
94
- * @summary List the email message attachments
88
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
95
89
  * @param {string} code
96
90
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
97
91
  * @param {*} [options] Override http request option.
@@ -99,16 +93,16 @@ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
99
93
  */
100
94
  listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>>;
101
95
  /**
102
- * 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\"
96
+ * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
103
97
  * @summary List email messages
104
98
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
105
99
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
106
100
  * @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.
107
- * @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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
101
+ * @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;
108
102
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
109
- * @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;
103
+ * @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;
110
104
  * @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;
111
- * @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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
105
+ * @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;
112
106
  * @param {*} [options] Override http request option.
113
107
  * @throws {RequiredError}
114
108
  */
@@ -120,8 +114,7 @@ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
120
114
  */
121
115
  export declare const EmailMessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
122
116
  /**
123
- * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
124
- * @summary Download the email message attachment
117
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
125
118
  * @param {string} code
126
119
  * @param {number} attachmentId
127
120
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
@@ -130,8 +123,7 @@ export declare const EmailMessagesApiFactory: (configuration?: Configuration, ba
130
123
  */
131
124
  downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass>;
132
125
  /**
133
- * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
134
- * @summary Retrieve the email message
126
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
135
127
  * @param {string} code
136
128
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
137
129
  * @param {*} [options] Override http request option.
@@ -139,8 +131,7 @@ export declare const EmailMessagesApiFactory: (configuration?: Configuration, ba
139
131
  */
140
132
  getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass>;
141
133
  /**
142
- * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
143
- * @summary List the email message attachments
134
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
144
135
  * @param {string} code
145
136
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
146
137
  * @param {*} [options] Override http request option.
@@ -148,16 +139,16 @@ export declare const EmailMessagesApiFactory: (configuration?: Configuration, ba
148
139
  */
149
140
  listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass>;
150
141
  /**
151
- * 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\"
142
+ * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
152
143
  * @summary List email messages
153
144
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
154
145
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
155
146
  * @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.
156
- * @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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
147
+ * @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;
157
148
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
158
- * @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;
149
+ * @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;
159
150
  * @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;
160
- * @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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
151
+ * @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;
161
152
  * @param {*} [options] Override http request option.
162
153
  * @throws {RequiredError}
163
154
  */
@@ -251,7 +242,7 @@ export interface EmailMessagesApiListEmailMessagesRequest {
251
242
  */
252
243
  readonly pageToken?: string;
253
244
  /**
254
- * 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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
245
+ * 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;
255
246
  * @type {string}
256
247
  * @memberof EmailMessagesApiListEmailMessages
257
248
  */
@@ -263,7 +254,7 @@ export interface EmailMessagesApiListEmailMessagesRequest {
263
254
  */
264
255
  readonly search?: string;
265
256
  /**
266
- * 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;
257
+ * 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;
267
258
  * @type {string}
268
259
  * @memberof EmailMessagesApiListEmailMessages
269
260
  */
@@ -275,7 +266,7 @@ export interface EmailMessagesApiListEmailMessagesRequest {
275
266
  */
276
267
  readonly expand?: string;
277
268
  /**
278
- * 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, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
269
+ * 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;
279
270
  * @type {string}
280
271
  * @memberof EmailMessagesApiListEmailMessages
281
272
  */
@@ -289,8 +280,7 @@ export interface EmailMessagesApiListEmailMessagesRequest {
289
280
  */
290
281
  export declare class EmailMessagesApi extends BaseAPI {
291
282
  /**
292
- * Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
293
- * @summary Download the email message attachment
283
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
294
284
  * @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
295
285
  * @param {*} [options] Override http request option.
296
286
  * @throws {RequiredError}
@@ -298,8 +288,7 @@ export declare class EmailMessagesApi extends BaseAPI {
298
288
  */
299
289
  downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DownloadAttachmentResponseClass, any, {}>>;
300
290
  /**
301
- * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
302
- * @summary Retrieve the email message
291
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
303
292
  * @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
304
293
  * @param {*} [options] Override http request option.
305
294
  * @throws {RequiredError}
@@ -307,8 +296,7 @@ export declare class EmailMessagesApi extends BaseAPI {
307
296
  */
308
297
  getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetEmailMessageResponseClass, any, {}>>;
309
298
  /**
310
- * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
311
- * @summary List the email message attachments
299
+ * undefined **Required Permissions** \"notification-management.email-messages.view\"
312
300
  * @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
313
301
  * @param {*} [options] Override http request option.
314
302
  * @throws {RequiredError}
@@ -316,7 +304,7 @@ export declare class EmailMessagesApi extends BaseAPI {
316
304
  */
317
305
  listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailAttachmentsResponseClass, any, {}>>;
318
306
  /**
319
- * 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\"
307
+ * Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
320
308
  * @summary List email messages
321
309
  * @param {EmailMessagesApiListEmailMessagesRequest} requestParameters Request parameters.
322
310
  * @param {*} [options] Override http request option.