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

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
@@ -35,7 +35,8 @@ import { InitiateEmailVerificationResponseClass } from '../models';
35
35
  export const EmailVerificationsApiAxiosParamCreator = function (configuration?: Configuration) {
36
36
  return {
37
37
  /**
38
- * undefined **Required Permissions** none
38
+ * Verifies the token sent to the given email address. Returns `result: true` when the token is valid. **Required Permissions** none
39
+ * @summary Complete an email verification
39
40
  * @param {CompleteEmailVerificationDto} completeEmailVerificationDto
40
41
  * @param {string} [authorization] Bearer Token
41
42
  * @param {*} [options] Override http request option.
@@ -62,8 +63,13 @@ export const EmailVerificationsApiAxiosParamCreator = function (configuration?:
62
63
  // http bearer authentication required
63
64
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
64
65
 
65
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
66
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
66
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
67
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
68
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
69
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
70
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
71
+ if (authorizationValue || authorizationKeepEmpty) {
72
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
67
73
  }
68
74
 
69
75
 
@@ -81,7 +87,8 @@ export const EmailVerificationsApiAxiosParamCreator = function (configuration?:
81
87
  };
82
88
  },
83
89
  /**
84
- * undefined **Required Permissions** none
90
+ * Sends a verification token to the given email address. Use the complete endpoint to verify the token. **Required Permissions** none
91
+ * @summary Initiate an email verification
85
92
  * @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
86
93
  * @param {string} [authorization] Bearer Token
87
94
  * @param {*} [options] Override http request option.
@@ -108,8 +115,13 @@ export const EmailVerificationsApiAxiosParamCreator = function (configuration?:
108
115
  // http bearer authentication required
109
116
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
110
117
 
111
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
112
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
118
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
119
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
120
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
121
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
122
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
123
+ if (authorizationValue || authorizationKeepEmpty) {
124
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
113
125
  }
114
126
 
115
127
 
@@ -137,7 +149,8 @@ export const EmailVerificationsApiFp = function(configuration?: Configuration) {
137
149
  const localVarAxiosParamCreator = EmailVerificationsApiAxiosParamCreator(configuration)
138
150
  return {
139
151
  /**
140
- * undefined **Required Permissions** none
152
+ * Verifies the token sent to the given email address. Returns `result: true` when the token is valid. **Required Permissions** none
153
+ * @summary Complete an email verification
141
154
  * @param {CompleteEmailVerificationDto} completeEmailVerificationDto
142
155
  * @param {string} [authorization] Bearer Token
143
156
  * @param {*} [options] Override http request option.
@@ -148,7 +161,8 @@ export const EmailVerificationsApiFp = function(configuration?: Configuration) {
148
161
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
149
162
  },
150
163
  /**
151
- * undefined **Required Permissions** none
164
+ * Sends a verification token to the given email address. Use the complete endpoint to verify the token. **Required Permissions** none
165
+ * @summary Initiate an email verification
152
166
  * @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
153
167
  * @param {string} [authorization] Bearer Token
154
168
  * @param {*} [options] Override http request option.
@@ -169,7 +183,8 @@ export const EmailVerificationsApiFactory = function (configuration?: Configurat
169
183
  const localVarFp = EmailVerificationsApiFp(configuration)
170
184
  return {
171
185
  /**
172
- * undefined **Required Permissions** none
186
+ * Verifies the token sent to the given email address. Returns `result: true` when the token is valid. **Required Permissions** none
187
+ * @summary Complete an email verification
173
188
  * @param {CompleteEmailVerificationDto} completeEmailVerificationDto
174
189
  * @param {string} [authorization] Bearer Token
175
190
  * @param {*} [options] Override http request option.
@@ -179,7 +194,8 @@ export const EmailVerificationsApiFactory = function (configuration?: Configurat
179
194
  return localVarFp.completeEmailVerification(completeEmailVerificationDto, authorization, options).then((request) => request(axios, basePath));
180
195
  },
181
196
  /**
182
- * undefined **Required Permissions** none
197
+ * Sends a verification token to the given email address. Use the complete endpoint to verify the token. **Required Permissions** none
198
+ * @summary Initiate an email verification
183
199
  * @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
184
200
  * @param {string} [authorization] Bearer Token
185
201
  * @param {*} [options] Override http request option.
@@ -241,24 +257,26 @@ export interface EmailVerificationsApiInitiateEmailVerificationRequest {
241
257
  */
242
258
  export class EmailVerificationsApi extends BaseAPI {
243
259
  /**
244
- * undefined **Required Permissions** none
260
+ * Verifies the token sent to the given email address. Returns `result: true` when the token is valid. **Required Permissions** none
261
+ * @summary Complete an email verification
245
262
  * @param {EmailVerificationsApiCompleteEmailVerificationRequest} requestParameters Request parameters.
246
263
  * @param {*} [options] Override http request option.
247
264
  * @throws {RequiredError}
248
265
  * @memberof EmailVerificationsApi
249
266
  */
250
267
  public completeEmailVerification(requestParameters: EmailVerificationsApiCompleteEmailVerificationRequest, options?: AxiosRequestConfig) {
251
- return EmailVerificationsApiFp(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
268
+ return EmailVerificationsApiFp(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
252
269
  }
253
270
 
254
271
  /**
255
- * undefined **Required Permissions** none
272
+ * Sends a verification token to the given email address. Use the complete endpoint to verify the token. **Required Permissions** none
273
+ * @summary Initiate an email verification
256
274
  * @param {EmailVerificationsApiInitiateEmailVerificationRequest} requestParameters Request parameters.
257
275
  * @param {*} [options] Override http request option.
258
276
  * @throws {RequiredError}
259
277
  * @memberof EmailVerificationsApi
260
278
  */
261
279
  public initiateEmailVerification(requestParameters: EmailVerificationsApiInitiateEmailVerificationRequest, options?: AxiosRequestConfig) {
262
- return EmailVerificationsApiFp(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
280
+ return EmailVerificationsApiFp(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
263
281
  }
264
282
  }
package/api/health-api.ts CHANGED
@@ -119,6 +119,6 @@ export class HealthApi extends BaseAPI {
119
119
  * @memberof HealthApi
120
120
  */
121
121
  public check(options?: AxiosRequestConfig) {
122
- return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
122
+ return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
123
123
  }
124
124
  }
@@ -39,7 +39,8 @@ import { UpdateLayoutResponseClass } from '../models';
39
39
  export const LayoutsApiAxiosParamCreator = function (configuration?: Configuration) {
40
40
  return {
41
41
  /**
42
- * undefined **Required Permissions** \"notification-management.email-templates.create\"
42
+ * Creates a layout that defines the header and footer wrapped around notification template bodies. **Required Permissions** \"notification-management.email-templates.create\"
43
+ * @summary Create the layout
43
44
  * @param {CreateLayoutRequestDto} createLayoutRequestDto
44
45
  * @param {string} [authorization] Bearer Token
45
46
  * @param {*} [options] Override http request option.
@@ -66,8 +67,13 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
66
67
  // http bearer authentication required
67
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
69
 
69
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
71
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
72
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
73
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
74
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
75
+ if (authorizationValue || authorizationKeepEmpty) {
76
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
71
77
  }
72
78
 
73
79
 
@@ -85,7 +91,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
85
91
  };
86
92
  },
87
93
  /**
88
- * undefined **Required Permissions** \"notification-management.email-templates.delete\"
94
+ * Permanently deletes the layout with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
95
+ * @summary Delete the layout
89
96
  * @param {number} id
90
97
  * @param {string} [authorization] Bearer Token
91
98
  * @param {*} [options] Override http request option.
@@ -113,8 +120,13 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
113
120
  // http bearer authentication required
114
121
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
122
 
116
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
117
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
123
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
124
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
126
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
127
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
128
+ if (authorizationValue || authorizationKeepEmpty) {
129
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
118
130
  }
119
131
 
120
132
 
@@ -129,7 +141,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
129
141
  };
130
142
  },
131
143
  /**
132
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
144
+ * Retrieves the details of the layout with the given id. **Required Permissions** \"notification-management.email-templates.view\"
145
+ * @summary Retrieve the layout
133
146
  * @param {number} id
134
147
  * @param {number} id2 Layout id
135
148
  * @param {string} [authorization] Bearer Token
@@ -164,8 +177,13 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
164
177
  localVarQueryParameter['id'] = id2;
165
178
  }
166
179
 
167
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
168
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
181
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
182
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
183
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
184
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
185
+ if (authorizationValue || authorizationKeepEmpty) {
186
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
169
187
  }
170
188
 
171
189
 
@@ -180,15 +198,16 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
180
198
  };
181
199
  },
182
200
  /**
183
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
201
+ * Returns a list of layouts. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
202
+ * @summary List layouts
184
203
  * @param {string} [authorization] Bearer Token
185
204
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
186
205
  * @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.
187
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
206
+ * @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, name, slug</i>
188
207
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
189
- * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
190
- * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
191
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
208
+ * @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, createdAt</i>
209
+ * @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: headerTemplate, footerTemplate<i>
210
+ * @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, name, slug</i>
192
211
  * @param {*} [options] Override http request option.
193
212
  * @throws {RequiredError}
194
213
  */
@@ -239,8 +258,13 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
239
258
  localVarQueryParameter['filters'] = filters;
240
259
  }
241
260
 
242
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
243
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
261
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
262
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
263
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
264
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
265
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
266
+ if (authorizationValue || authorizationKeepEmpty) {
267
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
244
268
  }
245
269
 
246
270
 
@@ -255,7 +279,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
255
279
  };
256
280
  },
257
281
  /**
258
- * undefined **Required Permissions** \"notification-management.email-templates.update\"
282
+ * Updates the specified layout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"notification-management.email-templates.update\"
283
+ * @summary Update the layout
259
284
  * @param {number} id
260
285
  * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
261
286
  * @param {string} [authorization] Bearer Token
@@ -286,8 +311,13 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
286
311
  // http bearer authentication required
287
312
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
288
313
 
289
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
290
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
314
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
315
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
316
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
317
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
318
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
319
+ if (authorizationValue || authorizationKeepEmpty) {
320
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
291
321
  }
292
322
 
293
323
 
@@ -315,7 +345,8 @@ export const LayoutsApiFp = function(configuration?: Configuration) {
315
345
  const localVarAxiosParamCreator = LayoutsApiAxiosParamCreator(configuration)
316
346
  return {
317
347
  /**
318
- * undefined **Required Permissions** \"notification-management.email-templates.create\"
348
+ * Creates a layout that defines the header and footer wrapped around notification template bodies. **Required Permissions** \"notification-management.email-templates.create\"
349
+ * @summary Create the layout
319
350
  * @param {CreateLayoutRequestDto} createLayoutRequestDto
320
351
  * @param {string} [authorization] Bearer Token
321
352
  * @param {*} [options] Override http request option.
@@ -326,7 +357,8 @@ export const LayoutsApiFp = function(configuration?: Configuration) {
326
357
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
327
358
  },
328
359
  /**
329
- * undefined **Required Permissions** \"notification-management.email-templates.delete\"
360
+ * Permanently deletes the layout with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
361
+ * @summary Delete the layout
330
362
  * @param {number} id
331
363
  * @param {string} [authorization] Bearer Token
332
364
  * @param {*} [options] Override http request option.
@@ -337,7 +369,8 @@ export const LayoutsApiFp = function(configuration?: Configuration) {
337
369
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
338
370
  },
339
371
  /**
340
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
372
+ * Retrieves the details of the layout with the given id. **Required Permissions** \"notification-management.email-templates.view\"
373
+ * @summary Retrieve the layout
341
374
  * @param {number} id
342
375
  * @param {number} id2 Layout id
343
376
  * @param {string} [authorization] Bearer Token
@@ -349,15 +382,16 @@ export const LayoutsApiFp = function(configuration?: Configuration) {
349
382
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
350
383
  },
351
384
  /**
352
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
385
+ * Returns a list of layouts. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
386
+ * @summary List layouts
353
387
  * @param {string} [authorization] Bearer Token
354
388
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
355
389
  * @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.
356
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
390
+ * @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, name, slug</i>
357
391
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
358
- * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
359
- * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
360
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
392
+ * @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, createdAt</i>
393
+ * @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: headerTemplate, footerTemplate<i>
394
+ * @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, name, slug</i>
361
395
  * @param {*} [options] Override http request option.
362
396
  * @throws {RequiredError}
363
397
  */
@@ -366,7 +400,8 @@ export const LayoutsApiFp = function(configuration?: Configuration) {
366
400
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
367
401
  },
368
402
  /**
369
- * undefined **Required Permissions** \"notification-management.email-templates.update\"
403
+ * Updates the specified layout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"notification-management.email-templates.update\"
404
+ * @summary Update the layout
370
405
  * @param {number} id
371
406
  * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
372
407
  * @param {string} [authorization] Bearer Token
@@ -388,7 +423,8 @@ export const LayoutsApiFactory = function (configuration?: Configuration, basePa
388
423
  const localVarFp = LayoutsApiFp(configuration)
389
424
  return {
390
425
  /**
391
- * undefined **Required Permissions** \"notification-management.email-templates.create\"
426
+ * Creates a layout that defines the header and footer wrapped around notification template bodies. **Required Permissions** \"notification-management.email-templates.create\"
427
+ * @summary Create the layout
392
428
  * @param {CreateLayoutRequestDto} createLayoutRequestDto
393
429
  * @param {string} [authorization] Bearer Token
394
430
  * @param {*} [options] Override http request option.
@@ -398,7 +434,8 @@ export const LayoutsApiFactory = function (configuration?: Configuration, basePa
398
434
  return localVarFp.createLayout(createLayoutRequestDto, authorization, options).then((request) => request(axios, basePath));
399
435
  },
400
436
  /**
401
- * undefined **Required Permissions** \"notification-management.email-templates.delete\"
437
+ * Permanently deletes the layout with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
438
+ * @summary Delete the layout
402
439
  * @param {number} id
403
440
  * @param {string} [authorization] Bearer Token
404
441
  * @param {*} [options] Override http request option.
@@ -408,7 +445,8 @@ export const LayoutsApiFactory = function (configuration?: Configuration, basePa
408
445
  return localVarFp.deleteLayout(id, authorization, options).then((request) => request(axios, basePath));
409
446
  },
410
447
  /**
411
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
448
+ * Retrieves the details of the layout with the given id. **Required Permissions** \"notification-management.email-templates.view\"
449
+ * @summary Retrieve the layout
412
450
  * @param {number} id
413
451
  * @param {number} id2 Layout id
414
452
  * @param {string} [authorization] Bearer Token
@@ -419,15 +457,16 @@ export const LayoutsApiFactory = function (configuration?: Configuration, basePa
419
457
  return localVarFp.getLayout(id, id2, authorization, options).then((request) => request(axios, basePath));
420
458
  },
421
459
  /**
422
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
460
+ * Returns a list of layouts. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
461
+ * @summary List layouts
423
462
  * @param {string} [authorization] Bearer Token
424
463
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
425
464
  * @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.
426
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
465
+ * @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, name, slug</i>
427
466
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
428
- * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
429
- * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
430
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
467
+ * @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, createdAt</i>
468
+ * @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: headerTemplate, footerTemplate<i>
469
+ * @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, name, slug</i>
431
470
  * @param {*} [options] Override http request option.
432
471
  * @throws {RequiredError}
433
472
  */
@@ -435,7 +474,8 @@ export const LayoutsApiFactory = function (configuration?: Configuration, basePa
435
474
  return localVarFp.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
436
475
  },
437
476
  /**
438
- * undefined **Required Permissions** \"notification-management.email-templates.update\"
477
+ * Updates the specified layout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"notification-management.email-templates.update\"
478
+ * @summary Update the layout
439
479
  * @param {number} id
440
480
  * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
441
481
  * @param {string} [authorization] Bearer Token
@@ -546,7 +586,7 @@ export interface LayoutsApiListLayoutsRequest {
546
586
  readonly pageToken?: string
547
587
 
548
588
  /**
549
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
589
+ * 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, name, slug</i>
550
590
  * @type {string}
551
591
  * @memberof LayoutsApiListLayouts
552
592
  */
@@ -560,21 +600,21 @@ export interface LayoutsApiListLayoutsRequest {
560
600
  readonly search?: string
561
601
 
562
602
  /**
563
- * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
603
+ * 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, createdAt</i>
564
604
  * @type {string}
565
605
  * @memberof LayoutsApiListLayouts
566
606
  */
567
607
  readonly order?: string
568
608
 
569
609
  /**
570
- * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
610
+ * 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: headerTemplate, footerTemplate<i>
571
611
  * @type {string}
572
612
  * @memberof LayoutsApiListLayouts
573
613
  */
574
614
  readonly expand?: string
575
615
 
576
616
  /**
577
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
617
+ * 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, name, slug</i>
578
618
  * @type {string}
579
619
  * @memberof LayoutsApiListLayouts
580
620
  */
@@ -617,57 +657,62 @@ export interface LayoutsApiUpdateLayoutRequest {
617
657
  */
618
658
  export class LayoutsApi extends BaseAPI {
619
659
  /**
620
- * undefined **Required Permissions** \"notification-management.email-templates.create\"
660
+ * Creates a layout that defines the header and footer wrapped around notification template bodies. **Required Permissions** \"notification-management.email-templates.create\"
661
+ * @summary Create the layout
621
662
  * @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
622
663
  * @param {*} [options] Override http request option.
623
664
  * @throws {RequiredError}
624
665
  * @memberof LayoutsApi
625
666
  */
626
667
  public createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig) {
627
- return LayoutsApiFp(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
668
+ return LayoutsApiFp(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
628
669
  }
629
670
 
630
671
  /**
631
- * undefined **Required Permissions** \"notification-management.email-templates.delete\"
672
+ * Permanently deletes the layout with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
673
+ * @summary Delete the layout
632
674
  * @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
633
675
  * @param {*} [options] Override http request option.
634
676
  * @throws {RequiredError}
635
677
  * @memberof LayoutsApi
636
678
  */
637
679
  public deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig) {
638
- return LayoutsApiFp(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
680
+ return LayoutsApiFp(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
639
681
  }
640
682
 
641
683
  /**
642
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
684
+ * Retrieves the details of the layout with the given id. **Required Permissions** \"notification-management.email-templates.view\"
685
+ * @summary Retrieve the layout
643
686
  * @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
644
687
  * @param {*} [options] Override http request option.
645
688
  * @throws {RequiredError}
646
689
  * @memberof LayoutsApi
647
690
  */
648
691
  public getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig) {
649
- return LayoutsApiFp(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
692
+ return LayoutsApiFp(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
650
693
  }
651
694
 
652
695
  /**
653
- * undefined **Required Permissions** \"notification-management.email-templates.view\"
696
+ * Returns a list of layouts. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
697
+ * @summary List layouts
654
698
  * @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
655
699
  * @param {*} [options] Override http request option.
656
700
  * @throws {RequiredError}
657
701
  * @memberof LayoutsApi
658
702
  */
659
703
  public listLayouts(requestParameters: LayoutsApiListLayoutsRequest = {}, options?: AxiosRequestConfig) {
660
- return LayoutsApiFp(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
704
+ return LayoutsApiFp(this.configuration).listLayouts(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));
661
705
  }
662
706
 
663
707
  /**
664
- * undefined **Required Permissions** \"notification-management.email-templates.update\"
708
+ * Updates the specified layout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"notification-management.email-templates.update\"
709
+ * @summary Update the layout
665
710
  * @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
666
711
  * @param {*} [options] Override http request option.
667
712
  * @throws {RequiredError}
668
713
  * @memberof LayoutsApi
669
714
  */
670
715
  public updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig) {
671
- return LayoutsApiFp(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
716
+ return LayoutsApiFp(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
672
717
  }
673
718
  }