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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/.openapi-generator/FILES +25 -0
  2. package/README.md +2 -2
  3. package/api/email-mailboxes-api.ts +153 -0
  4. package/api/email-messages-api.ts +197 -40
  5. package/api/email-subscriptions-api.ts +799 -0
  6. package/api/email-tracking-api.ts +313 -52
  7. package/api/email-verifications-api.ts +32 -14
  8. package/api/health-api.ts +1 -1
  9. package/api/layouts-api.ts +96 -51
  10. package/api/msgraph-webhooks-api.ts +278 -0
  11. package/api/notification-templates-api.ts +96 -51
  12. package/api/notifications-api.ts +128 -7
  13. package/api.ts +6 -0
  14. package/base.ts +239 -43
  15. package/common.ts +3 -2
  16. package/configuration.ts +20 -0
  17. package/dist/api/email-mailboxes-api.d.ts +87 -0
  18. package/dist/api/email-mailboxes-api.js +225 -0
  19. package/dist/api/email-messages-api.d.ts +110 -32
  20. package/dist/api/email-messages-api.js +199 -56
  21. package/dist/api/email-subscriptions-api.d.ts +432 -0
  22. package/dist/api/email-subscriptions-api.js +761 -0
  23. package/dist/api/email-tracking-api.d.ts +174 -44
  24. package/dist/api/email-tracking-api.js +299 -64
  25. package/dist/api/email-verifications-api.d.ts +18 -10
  26. package/dist/api/email-verifications-api.js +46 -24
  27. package/dist/api/health-api.d.ts +1 -1
  28. package/dist/api/health-api.js +1 -1
  29. package/dist/api/layouts-api.d.ts +61 -41
  30. package/dist/api/layouts-api.js +119 -70
  31. package/dist/api/msgraph-webhooks-api.d.ts +168 -0
  32. package/dist/api/msgraph-webhooks-api.js +305 -0
  33. package/dist/api/notification-templates-api.d.ts +61 -41
  34. package/dist/api/notification-templates-api.js +119 -70
  35. package/dist/api/notifications-api.d.ts +66 -5
  36. package/dist/api/notifications-api.js +123 -12
  37. package/dist/api.d.ts +3 -0
  38. package/dist/api.js +3 -0
  39. package/dist/base.d.ts +26 -0
  40. package/dist/base.js +243 -60
  41. package/dist/common.d.ts +1 -1
  42. package/dist/common.js +1 -0
  43. package/dist/configuration.d.ts +17 -0
  44. package/dist/configuration.js +2 -0
  45. package/dist/models/assign-email-thread-entity-body-dto.d.ts +43 -0
  46. package/dist/models/assign-email-thread-entity-body-dto.js +22 -0
  47. package/dist/models/assign-email-thread-entity-response-class.d.ts +25 -0
  48. package/dist/models/assign-email-thread-entity-response-class.js +15 -0
  49. package/dist/models/catch-up-email-subscription-response-class.d.ts +24 -0
  50. package/dist/models/catch-up-email-subscription-response-class.js +15 -0
  51. package/dist/models/catch-up-email-subscriptions-request-dto.d.ts +24 -0
  52. package/dist/models/catch-up-email-subscriptions-request-dto.js +15 -0
  53. package/dist/models/catch-up-email-subscriptions-response-class.d.ts +30 -0
  54. package/dist/models/catch-up-email-subscriptions-response-class.js +15 -0
  55. package/dist/models/email-mailbox-class.d.ts +47 -0
  56. package/dist/models/email-mailbox-class.js +20 -0
  57. package/dist/models/email-message-class.d.ts +102 -7
  58. package/dist/models/email-message-class.js +25 -2
  59. package/dist/models/email-message-summary-class.d.ts +121 -0
  60. package/dist/models/email-message-summary-class.js +37 -0
  61. package/dist/models/email-subscription-class.d.ts +110 -0
  62. package/dist/models/email-subscription-class.js +23 -0
  63. package/dist/models/email-thread-class.d.ts +37 -5
  64. package/dist/models/entity-ref-class.d.ts +37 -0
  65. package/dist/models/entity-ref-class.js +22 -0
  66. package/dist/models/get-email-subscription-response-class.d.ts +25 -0
  67. package/dist/models/get-email-subscription-response-class.js +15 -0
  68. package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
  69. package/dist/models/grpc-send-email-request-dto.js +22 -0
  70. package/dist/models/index.d.ts +22 -0
  71. package/dist/models/index.js +22 -0
  72. package/dist/models/inline-attachment-dto.d.ts +36 -0
  73. package/dist/models/inline-attachment-dto.js +15 -0
  74. package/dist/models/list-email-mailboxes-response-class.d.ts +43 -0
  75. package/dist/models/list-email-mailboxes-response-class.js +15 -0
  76. package/dist/models/list-email-subscriptions-response-class.d.ts +43 -0
  77. package/dist/models/list-email-subscriptions-response-class.js +15 -0
  78. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +24 -0
  79. package/dist/models/reconcile-email-subscriptions-request-dto.js +15 -0
  80. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +48 -0
  81. package/dist/models/reconcile-email-subscriptions-response-class.js +15 -0
  82. package/dist/models/renew-email-subscription-response-class.d.ts +25 -0
  83. package/dist/models/renew-email-subscription-response-class.js +15 -0
  84. package/dist/models/resend-email-message-body-dto.d.ts +30 -0
  85. package/dist/models/resend-email-message-body-dto.js +15 -0
  86. package/dist/models/resend-email-message-response-class.d.ts +25 -0
  87. package/dist/models/resend-email-message-response-class.js +15 -0
  88. package/dist/models/send-email-request-dto.d.ts +131 -0
  89. package/dist/models/send-email-request-dto.js +22 -0
  90. package/dist/models/send-email-response-class.d.ts +24 -0
  91. package/dist/models/send-email-response-class.js +15 -0
  92. package/dist/models/send-notification-request-dto.d.ts +10 -1
  93. package/dist/models/send-notification-request-dto.js +2 -1
  94. package/dist/models/unassign-email-thread-entity-response-class.d.ts +25 -0
  95. package/dist/models/unassign-email-thread-entity-response-class.js +15 -0
  96. package/models/assign-email-thread-entity-body-dto.ts +52 -0
  97. package/models/assign-email-thread-entity-response-class.ts +31 -0
  98. package/models/catch-up-email-subscription-response-class.ts +30 -0
  99. package/models/catch-up-email-subscriptions-request-dto.ts +30 -0
  100. package/models/catch-up-email-subscriptions-response-class.ts +36 -0
  101. package/models/email-mailbox-class.ts +56 -0
  102. package/models/email-message-class.ts +108 -8
  103. package/models/email-message-summary-class.ts +133 -0
  104. package/models/email-subscription-class.ts +119 -0
  105. package/models/email-thread-class.ts +37 -5
  106. package/models/entity-ref-class.ts +46 -0
  107. package/models/get-email-subscription-response-class.ts +31 -0
  108. package/models/grpc-send-email-request-dto.ts +144 -0
  109. package/models/index.ts +22 -0
  110. package/models/inline-attachment-dto.ts +42 -0
  111. package/models/list-email-mailboxes-response-class.ts +49 -0
  112. package/models/list-email-subscriptions-response-class.ts +49 -0
  113. package/models/reconcile-email-subscriptions-request-dto.ts +30 -0
  114. package/models/reconcile-email-subscriptions-response-class.ts +54 -0
  115. package/models/renew-email-subscription-response-class.ts +31 -0
  116. package/models/resend-email-message-body-dto.ts +36 -0
  117. package/models/resend-email-message-response-class.ts +31 -0
  118. package/models/send-email-request-dto.ts +138 -0
  119. package/models/send-email-response-class.ts +30 -0
  120. package/models/send-notification-request-dto.ts +9 -2
  121. package/models/unassign-email-thread-entity-response-class.ts +31 -0
  122. package/package.json +2 -2
@@ -0,0 +1,799 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL NotificationService
5
+ * The EMIL NotificationService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CatchUpEmailSubscriptionResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { CatchUpEmailSubscriptionsRequestDto } from '../models';
27
+ // @ts-ignore
28
+ import { CatchUpEmailSubscriptionsResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { GetEmailSubscriptionResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { ListEmailSubscriptionsResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { ReconcileEmailSubscriptionsRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { ReconcileEmailSubscriptionsResponseClass } from '../models';
37
+ // @ts-ignore
38
+ import { RenewEmailSubscriptionResponseClass } from '../models';
39
+ /**
40
+ * EmailSubscriptionsApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const EmailSubscriptionsApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * Queues a catch-up for this subscription: Microsoft Graph is asked for every change to the folder since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away; queued is false when the subscription is being deleted. **Required Permissions** \"tenant-management.settings.update\"
47
+ * @summary Catch up missed mail for the email subscription
48
+ * @param {number} id
49
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ catchUpEmailSubscription: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'id' is not null or undefined
55
+ assertParamExists('catchUpEmailSubscription', 'id', id)
56
+ const localVarPath = `/notificationservice/v1/email-subscriptions/{id}/catch-up`
57
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
58
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
59
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
60
+ let baseOptions;
61
+ let baseAccessToken;
62
+ if (configuration) {
63
+ baseOptions = configuration.baseOptions;
64
+ baseAccessToken = configuration.accessToken;
65
+ }
66
+
67
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
68
+ const localVarHeaderParameter = {} as any;
69
+ const localVarQueryParameter = {} as any;
70
+
71
+ // authentication bearer required
72
+ // http bearer authentication required
73
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
74
+
75
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
76
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
77
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
78
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
79
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
80
+ if (authorizationValue || authorizationKeepEmpty) {
81
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
82
+ }
83
+
84
+
85
+
86
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
87
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
88
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
89
+
90
+ return {
91
+ url: toPathString(localVarUrlObj),
92
+ options: localVarRequestOptions,
93
+ };
94
+ },
95
+ /**
96
+ * Queues a catch-up for every subscription of the email channel: Microsoft Graph is asked for every change since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away with how many catch-ups were queued. **Required Permissions** \"tenant-management.settings.update\"
97
+ * @summary Catch up missed mail for all email subscriptions
98
+ * @param {CatchUpEmailSubscriptionsRequestDto} catchUpEmailSubscriptionsRequestDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ catchUpEmailSubscriptions: async (catchUpEmailSubscriptionsRequestDto: CatchUpEmailSubscriptionsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
104
+ // verify required parameter 'catchUpEmailSubscriptionsRequestDto' is not null or undefined
105
+ assertParamExists('catchUpEmailSubscriptions', 'catchUpEmailSubscriptionsRequestDto', catchUpEmailSubscriptionsRequestDto)
106
+ const localVarPath = `/notificationservice/v1/email-subscriptions/catch-up`;
107
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
108
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
109
+ let baseOptions;
110
+ let baseAccessToken;
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ baseAccessToken = configuration.accessToken;
114
+ }
115
+
116
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
117
+ const localVarHeaderParameter = {} as any;
118
+ const localVarQueryParameter = {} as any;
119
+
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
+
124
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
125
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
126
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
127
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
128
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
129
+ if (authorizationValue || authorizationKeepEmpty) {
130
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
+ }
132
+
133
+
134
+
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+
137
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
138
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
139
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
140
+ localVarRequestOptions.data = serializeDataIfNeeded(catchUpEmailSubscriptionsRequestDto, localVarRequestOptions, configuration)
141
+
142
+ return {
143
+ url: toPathString(localVarUrlObj),
144
+ options: localVarRequestOptions,
145
+ };
146
+ },
147
+ /**
148
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
149
+ * @summary Retrieve the email subscription
150
+ * @param {number} id
151
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ getEmailSubscription: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
156
+ // verify required parameter 'id' is not null or undefined
157
+ assertParamExists('getEmailSubscription', 'id', id)
158
+ const localVarPath = `/notificationservice/v1/email-subscriptions/{id}`
159
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
160
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
161
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
162
+ let baseOptions;
163
+ let baseAccessToken;
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+
169
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
170
+ const localVarHeaderParameter = {} as any;
171
+ const localVarQueryParameter = {} as any;
172
+
173
+ // authentication bearer required
174
+ // http bearer authentication required
175
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
176
+
177
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
178
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
179
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
180
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
181
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
182
+ if (authorizationValue || authorizationKeepEmpty) {
183
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
+ }
185
+
186
+
187
+
188
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
189
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
190
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
191
+
192
+ return {
193
+ url: toPathString(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ };
196
+ },
197
+ /**
198
+ * Returns the Microsoft Graph mail subscriptions of the tenant, one per mailbox and folder of the email channel, with their status, expiry and last error. For more information about pagination, read the Pagination documentation. **Required Permissions** \"tenant-management.settings.view\"
199
+ * @summary List email subscriptions
200
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
201
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
202
+ * @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.
203
+ * @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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
204
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
205
+ * @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, mailbox, folder, status, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
206
+ * @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;
207
+ * @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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ listEmailSubscriptions: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
212
+ const localVarPath = `/notificationservice/v1/email-subscriptions`;
213
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
214
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
215
+ let baseOptions;
216
+ let baseAccessToken;
217
+ if (configuration) {
218
+ baseOptions = configuration.baseOptions;
219
+ baseAccessToken = configuration.accessToken;
220
+ }
221
+
222
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
223
+ const localVarHeaderParameter = {} as any;
224
+ const localVarQueryParameter = {} as any;
225
+
226
+ // authentication bearer required
227
+ // http bearer authentication required
228
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
229
+
230
+ if (pageSize !== undefined) {
231
+ localVarQueryParameter['pageSize'] = pageSize;
232
+ }
233
+
234
+ if (pageToken !== undefined) {
235
+ localVarQueryParameter['pageToken'] = pageToken;
236
+ }
237
+
238
+ if (filter !== undefined) {
239
+ localVarQueryParameter['filter'] = filter;
240
+ }
241
+
242
+ if (search !== undefined) {
243
+ localVarQueryParameter['search'] = search;
244
+ }
245
+
246
+ if (order !== undefined) {
247
+ localVarQueryParameter['order'] = order;
248
+ }
249
+
250
+ if (expand !== undefined) {
251
+ localVarQueryParameter['expand'] = expand;
252
+ }
253
+
254
+ if (filters !== undefined) {
255
+ localVarQueryParameter['filters'] = filters;
256
+ }
257
+
258
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
259
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
260
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
261
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
262
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
263
+ if (authorizationValue || authorizationKeepEmpty) {
264
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
265
+ }
266
+
267
+
268
+
269
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
270
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
271
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
272
+
273
+ return {
274
+ url: toPathString(localVarUrlObj),
275
+ options: localVarRequestOptions,
276
+ };
277
+ },
278
+ /**
279
+ * Brings the subscriptions in line with the mailboxes and folders of the email channel: creates the missing ones, deletes the ones no longer configured and recreates expired or failed ones. Returns how many subscriptions each step touched. **Required Permissions** \"tenant-management.settings.update\"
280
+ * @summary Reconcile the email subscriptions
281
+ * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
282
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ reconcileEmailSubscriptions: async (reconcileEmailSubscriptionsRequestDto: ReconcileEmailSubscriptionsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
287
+ // verify required parameter 'reconcileEmailSubscriptionsRequestDto' is not null or undefined
288
+ assertParamExists('reconcileEmailSubscriptions', 'reconcileEmailSubscriptionsRequestDto', reconcileEmailSubscriptionsRequestDto)
289
+ const localVarPath = `/notificationservice/v1/email-subscriptions/reconcile`;
290
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
291
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
292
+ let baseOptions;
293
+ let baseAccessToken;
294
+ if (configuration) {
295
+ baseOptions = configuration.baseOptions;
296
+ baseAccessToken = configuration.accessToken;
297
+ }
298
+
299
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
300
+ const localVarHeaderParameter = {} as any;
301
+ const localVarQueryParameter = {} as any;
302
+
303
+ // authentication bearer required
304
+ // http bearer authentication required
305
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
306
+
307
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
308
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
309
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
310
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
311
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
312
+ if (authorizationValue || authorizationKeepEmpty) {
313
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
314
+ }
315
+
316
+
317
+
318
+ localVarHeaderParameter['Content-Type'] = 'application/json';
319
+
320
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
321
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
322
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
323
+ localVarRequestOptions.data = serializeDataIfNeeded(reconcileEmailSubscriptionsRequestDto, localVarRequestOptions, configuration)
324
+
325
+ return {
326
+ url: toPathString(localVarUrlObj),
327
+ options: localVarRequestOptions,
328
+ };
329
+ },
330
+ /**
331
+ * Renews the subscription in Microsoft Graph right away and returns it with its new expiry. A pending or failed subscription, or one Graph no longer knows, is created again. Fails with 503 when Graph rejects the call; the error is kept on the subscription. **Required Permissions** \"tenant-management.settings.update\"
332
+ * @summary Renew the email subscription
333
+ * @param {number} id
334
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ renewEmailSubscription: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
339
+ // verify required parameter 'id' is not null or undefined
340
+ assertParamExists('renewEmailSubscription', 'id', id)
341
+ const localVarPath = `/notificationservice/v1/email-subscriptions/{id}/renew`
342
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
343
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
344
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
345
+ let baseOptions;
346
+ let baseAccessToken;
347
+ if (configuration) {
348
+ baseOptions = configuration.baseOptions;
349
+ baseAccessToken = configuration.accessToken;
350
+ }
351
+
352
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
353
+ const localVarHeaderParameter = {} as any;
354
+ const localVarQueryParameter = {} as any;
355
+
356
+ // authentication bearer required
357
+ // http bearer authentication required
358
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
359
+
360
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
361
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
362
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
363
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
364
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
365
+ if (authorizationValue || authorizationKeepEmpty) {
366
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
367
+ }
368
+
369
+
370
+
371
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
372
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
373
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
374
+
375
+ return {
376
+ url: toPathString(localVarUrlObj),
377
+ options: localVarRequestOptions,
378
+ };
379
+ },
380
+ }
381
+ };
382
+
383
+ /**
384
+ * EmailSubscriptionsApi - functional programming interface
385
+ * @export
386
+ */
387
+ export const EmailSubscriptionsApiFp = function(configuration?: Configuration) {
388
+ const localVarAxiosParamCreator = EmailSubscriptionsApiAxiosParamCreator(configuration)
389
+ return {
390
+ /**
391
+ * Queues a catch-up for this subscription: Microsoft Graph is asked for every change to the folder since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away; queued is false when the subscription is being deleted. **Required Permissions** \"tenant-management.settings.update\"
392
+ * @summary Catch up missed mail for the email subscription
393
+ * @param {number} id
394
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
395
+ * @param {*} [options] Override http request option.
396
+ * @throws {RequiredError}
397
+ */
398
+ async catchUpEmailSubscription(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CatchUpEmailSubscriptionResponseClass>> {
399
+ const localVarAxiosArgs = await localVarAxiosParamCreator.catchUpEmailSubscription(id, authorization, options);
400
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
401
+ },
402
+ /**
403
+ * Queues a catch-up for every subscription of the email channel: Microsoft Graph is asked for every change since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away with how many catch-ups were queued. **Required Permissions** \"tenant-management.settings.update\"
404
+ * @summary Catch up missed mail for all email subscriptions
405
+ * @param {CatchUpEmailSubscriptionsRequestDto} catchUpEmailSubscriptionsRequestDto
406
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ async catchUpEmailSubscriptions(catchUpEmailSubscriptionsRequestDto: CatchUpEmailSubscriptionsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CatchUpEmailSubscriptionsResponseClass>> {
411
+ const localVarAxiosArgs = await localVarAxiosParamCreator.catchUpEmailSubscriptions(catchUpEmailSubscriptionsRequestDto, authorization, options);
412
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
413
+ },
414
+ /**
415
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
416
+ * @summary Retrieve the email subscription
417
+ * @param {number} id
418
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ async getEmailSubscription(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailSubscriptionResponseClass>> {
423
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailSubscription(id, authorization, options);
424
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
425
+ },
426
+ /**
427
+ * Returns the Microsoft Graph mail subscriptions of the tenant, one per mailbox and folder of the email channel, with their status, expiry and last error. For more information about pagination, read the Pagination documentation. **Required Permissions** \"tenant-management.settings.view\"
428
+ * @summary List email subscriptions
429
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
430
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
431
+ * @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.
432
+ * @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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
433
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
434
+ * @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, mailbox, folder, status, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
435
+ * @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;
436
+ * @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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ */
440
+ async listEmailSubscriptions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailSubscriptionsResponseClass>> {
441
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listEmailSubscriptions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
442
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
443
+ },
444
+ /**
445
+ * Brings the subscriptions in line with the mailboxes and folders of the email channel: creates the missing ones, deletes the ones no longer configured and recreates expired or failed ones. Returns how many subscriptions each step touched. **Required Permissions** \"tenant-management.settings.update\"
446
+ * @summary Reconcile the email subscriptions
447
+ * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
448
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ async reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto: ReconcileEmailSubscriptionsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReconcileEmailSubscriptionsResponseClass>> {
453
+ const localVarAxiosArgs = await localVarAxiosParamCreator.reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto, authorization, options);
454
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
455
+ },
456
+ /**
457
+ * Renews the subscription in Microsoft Graph right away and returns it with its new expiry. A pending or failed subscription, or one Graph no longer knows, is created again. Fails with 503 when Graph rejects the call; the error is kept on the subscription. **Required Permissions** \"tenant-management.settings.update\"
458
+ * @summary Renew the email subscription
459
+ * @param {number} id
460
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ async renewEmailSubscription(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RenewEmailSubscriptionResponseClass>> {
465
+ const localVarAxiosArgs = await localVarAxiosParamCreator.renewEmailSubscription(id, authorization, options);
466
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
467
+ },
468
+ }
469
+ };
470
+
471
+ /**
472
+ * EmailSubscriptionsApi - factory interface
473
+ * @export
474
+ */
475
+ export const EmailSubscriptionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
476
+ const localVarFp = EmailSubscriptionsApiFp(configuration)
477
+ return {
478
+ /**
479
+ * Queues a catch-up for this subscription: Microsoft Graph is asked for every change to the folder since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away; queued is false when the subscription is being deleted. **Required Permissions** \"tenant-management.settings.update\"
480
+ * @summary Catch up missed mail for the email subscription
481
+ * @param {number} id
482
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
483
+ * @param {*} [options] Override http request option.
484
+ * @throws {RequiredError}
485
+ */
486
+ catchUpEmailSubscription(id: number, authorization?: string, options?: any): AxiosPromise<CatchUpEmailSubscriptionResponseClass> {
487
+ return localVarFp.catchUpEmailSubscription(id, authorization, options).then((request) => request(axios, basePath));
488
+ },
489
+ /**
490
+ * Queues a catch-up for every subscription of the email channel: Microsoft Graph is asked for every change since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away with how many catch-ups were queued. **Required Permissions** \"tenant-management.settings.update\"
491
+ * @summary Catch up missed mail for all email subscriptions
492
+ * @param {CatchUpEmailSubscriptionsRequestDto} catchUpEmailSubscriptionsRequestDto
493
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ catchUpEmailSubscriptions(catchUpEmailSubscriptionsRequestDto: CatchUpEmailSubscriptionsRequestDto, authorization?: string, options?: any): AxiosPromise<CatchUpEmailSubscriptionsResponseClass> {
498
+ return localVarFp.catchUpEmailSubscriptions(catchUpEmailSubscriptionsRequestDto, authorization, options).then((request) => request(axios, basePath));
499
+ },
500
+ /**
501
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
502
+ * @summary Retrieve the email subscription
503
+ * @param {number} id
504
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ getEmailSubscription(id: number, authorization?: string, options?: any): AxiosPromise<GetEmailSubscriptionResponseClass> {
509
+ return localVarFp.getEmailSubscription(id, authorization, options).then((request) => request(axios, basePath));
510
+ },
511
+ /**
512
+ * Returns the Microsoft Graph mail subscriptions of the tenant, one per mailbox and folder of the email channel, with their status, expiry and last error. For more information about pagination, read the Pagination documentation. **Required Permissions** \"tenant-management.settings.view\"
513
+ * @summary List email subscriptions
514
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
515
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
516
+ * @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.
517
+ * @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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
518
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
519
+ * @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, mailbox, folder, status, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
520
+ * @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;
521
+ * @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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ listEmailSubscriptions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailSubscriptionsResponseClass> {
526
+ return localVarFp.listEmailSubscriptions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
527
+ },
528
+ /**
529
+ * Brings the subscriptions in line with the mailboxes and folders of the email channel: creates the missing ones, deletes the ones no longer configured and recreates expired or failed ones. Returns how many subscriptions each step touched. **Required Permissions** \"tenant-management.settings.update\"
530
+ * @summary Reconcile the email subscriptions
531
+ * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
532
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
533
+ * @param {*} [options] Override http request option.
534
+ * @throws {RequiredError}
535
+ */
536
+ reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto: ReconcileEmailSubscriptionsRequestDto, authorization?: string, options?: any): AxiosPromise<ReconcileEmailSubscriptionsResponseClass> {
537
+ return localVarFp.reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto, authorization, options).then((request) => request(axios, basePath));
538
+ },
539
+ /**
540
+ * Renews the subscription in Microsoft Graph right away and returns it with its new expiry. A pending or failed subscription, or one Graph no longer knows, is created again. Fails with 503 when Graph rejects the call; the error is kept on the subscription. **Required Permissions** \"tenant-management.settings.update\"
541
+ * @summary Renew the email subscription
542
+ * @param {number} id
543
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ renewEmailSubscription(id: number, authorization?: string, options?: any): AxiosPromise<RenewEmailSubscriptionResponseClass> {
548
+ return localVarFp.renewEmailSubscription(id, authorization, options).then((request) => request(axios, basePath));
549
+ },
550
+ };
551
+ };
552
+
553
+ /**
554
+ * Request parameters for catchUpEmailSubscription operation in EmailSubscriptionsApi.
555
+ * @export
556
+ * @interface EmailSubscriptionsApiCatchUpEmailSubscriptionRequest
557
+ */
558
+ export interface EmailSubscriptionsApiCatchUpEmailSubscriptionRequest {
559
+ /**
560
+ *
561
+ * @type {number}
562
+ * @memberof EmailSubscriptionsApiCatchUpEmailSubscription
563
+ */
564
+ readonly id: number
565
+
566
+ /**
567
+ * Bearer Token: provided by the login endpoint under the name accessToken.
568
+ * @type {string}
569
+ * @memberof EmailSubscriptionsApiCatchUpEmailSubscription
570
+ */
571
+ readonly authorization?: string
572
+ }
573
+
574
+ /**
575
+ * Request parameters for catchUpEmailSubscriptions operation in EmailSubscriptionsApi.
576
+ * @export
577
+ * @interface EmailSubscriptionsApiCatchUpEmailSubscriptionsRequest
578
+ */
579
+ export interface EmailSubscriptionsApiCatchUpEmailSubscriptionsRequest {
580
+ /**
581
+ *
582
+ * @type {CatchUpEmailSubscriptionsRequestDto}
583
+ * @memberof EmailSubscriptionsApiCatchUpEmailSubscriptions
584
+ */
585
+ readonly catchUpEmailSubscriptionsRequestDto: CatchUpEmailSubscriptionsRequestDto
586
+
587
+ /**
588
+ * Bearer Token: provided by the login endpoint under the name accessToken.
589
+ * @type {string}
590
+ * @memberof EmailSubscriptionsApiCatchUpEmailSubscriptions
591
+ */
592
+ readonly authorization?: string
593
+ }
594
+
595
+ /**
596
+ * Request parameters for getEmailSubscription operation in EmailSubscriptionsApi.
597
+ * @export
598
+ * @interface EmailSubscriptionsApiGetEmailSubscriptionRequest
599
+ */
600
+ export interface EmailSubscriptionsApiGetEmailSubscriptionRequest {
601
+ /**
602
+ *
603
+ * @type {number}
604
+ * @memberof EmailSubscriptionsApiGetEmailSubscription
605
+ */
606
+ readonly id: number
607
+
608
+ /**
609
+ * Bearer Token: provided by the login endpoint under the name accessToken.
610
+ * @type {string}
611
+ * @memberof EmailSubscriptionsApiGetEmailSubscription
612
+ */
613
+ readonly authorization?: string
614
+ }
615
+
616
+ /**
617
+ * Request parameters for listEmailSubscriptions operation in EmailSubscriptionsApi.
618
+ * @export
619
+ * @interface EmailSubscriptionsApiListEmailSubscriptionsRequest
620
+ */
621
+ export interface EmailSubscriptionsApiListEmailSubscriptionsRequest {
622
+ /**
623
+ * Bearer Token: provided by the login endpoint under the name accessToken.
624
+ * @type {string}
625
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
626
+ */
627
+ readonly authorization?: string
628
+
629
+ /**
630
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
631
+ * @type {number}
632
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
633
+ */
634
+ readonly pageSize?: number
635
+
636
+ /**
637
+ * 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.
638
+ * @type {string}
639
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
640
+ */
641
+ readonly pageToken?: string
642
+
643
+ /**
644
+ * 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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
645
+ * @type {string}
646
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
647
+ */
648
+ readonly filter?: string
649
+
650
+ /**
651
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
652
+ * @type {string}
653
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
654
+ */
655
+ readonly search?: string
656
+
657
+ /**
658
+ * 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, mailbox, folder, status, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
659
+ * @type {string}
660
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
661
+ */
662
+ readonly order?: string
663
+
664
+ /**
665
+ * 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;
666
+ * @type {string}
667
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
668
+ */
669
+ readonly expand?: string
670
+
671
+ /**
672
+ * 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, productSlug, mailbox, folder, status, subscriptionId, expiresAt, lastRenewedAt, lastNotificationAt, createdAt, updatedAt&lt;/i&gt;
673
+ * @type {string}
674
+ * @memberof EmailSubscriptionsApiListEmailSubscriptions
675
+ */
676
+ readonly filters?: string
677
+ }
678
+
679
+ /**
680
+ * Request parameters for reconcileEmailSubscriptions operation in EmailSubscriptionsApi.
681
+ * @export
682
+ * @interface EmailSubscriptionsApiReconcileEmailSubscriptionsRequest
683
+ */
684
+ export interface EmailSubscriptionsApiReconcileEmailSubscriptionsRequest {
685
+ /**
686
+ *
687
+ * @type {ReconcileEmailSubscriptionsRequestDto}
688
+ * @memberof EmailSubscriptionsApiReconcileEmailSubscriptions
689
+ */
690
+ readonly reconcileEmailSubscriptionsRequestDto: ReconcileEmailSubscriptionsRequestDto
691
+
692
+ /**
693
+ * Bearer Token: provided by the login endpoint under the name accessToken.
694
+ * @type {string}
695
+ * @memberof EmailSubscriptionsApiReconcileEmailSubscriptions
696
+ */
697
+ readonly authorization?: string
698
+ }
699
+
700
+ /**
701
+ * Request parameters for renewEmailSubscription operation in EmailSubscriptionsApi.
702
+ * @export
703
+ * @interface EmailSubscriptionsApiRenewEmailSubscriptionRequest
704
+ */
705
+ export interface EmailSubscriptionsApiRenewEmailSubscriptionRequest {
706
+ /**
707
+ *
708
+ * @type {number}
709
+ * @memberof EmailSubscriptionsApiRenewEmailSubscription
710
+ */
711
+ readonly id: number
712
+
713
+ /**
714
+ * Bearer Token: provided by the login endpoint under the name accessToken.
715
+ * @type {string}
716
+ * @memberof EmailSubscriptionsApiRenewEmailSubscription
717
+ */
718
+ readonly authorization?: string
719
+ }
720
+
721
+ /**
722
+ * EmailSubscriptionsApi - object-oriented interface
723
+ * @export
724
+ * @class EmailSubscriptionsApi
725
+ * @extends {BaseAPI}
726
+ */
727
+ export class EmailSubscriptionsApi extends BaseAPI {
728
+ /**
729
+ * Queues a catch-up for this subscription: Microsoft Graph is asked for every change to the folder since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away; queued is false when the subscription is being deleted. **Required Permissions** \"tenant-management.settings.update\"
730
+ * @summary Catch up missed mail for the email subscription
731
+ * @param {EmailSubscriptionsApiCatchUpEmailSubscriptionRequest} requestParameters Request parameters.
732
+ * @param {*} [options] Override http request option.
733
+ * @throws {RequiredError}
734
+ * @memberof EmailSubscriptionsApi
735
+ */
736
+ public catchUpEmailSubscription(requestParameters: EmailSubscriptionsApiCatchUpEmailSubscriptionRequest, options?: AxiosRequestConfig) {
737
+ return EmailSubscriptionsApiFp(this.configuration).catchUpEmailSubscription(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
738
+ }
739
+
740
+ /**
741
+ * Queues a catch-up for every subscription of the email channel: Microsoft Graph is asked for every change since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away with how many catch-ups were queued. **Required Permissions** \"tenant-management.settings.update\"
742
+ * @summary Catch up missed mail for all email subscriptions
743
+ * @param {EmailSubscriptionsApiCatchUpEmailSubscriptionsRequest} requestParameters Request parameters.
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ * @memberof EmailSubscriptionsApi
747
+ */
748
+ public catchUpEmailSubscriptions(requestParameters: EmailSubscriptionsApiCatchUpEmailSubscriptionsRequest, options?: AxiosRequestConfig) {
749
+ return EmailSubscriptionsApiFp(this.configuration).catchUpEmailSubscriptions(requestParameters.catchUpEmailSubscriptionsRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
750
+ }
751
+
752
+ /**
753
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
754
+ * @summary Retrieve the email subscription
755
+ * @param {EmailSubscriptionsApiGetEmailSubscriptionRequest} requestParameters Request parameters.
756
+ * @param {*} [options] Override http request option.
757
+ * @throws {RequiredError}
758
+ * @memberof EmailSubscriptionsApi
759
+ */
760
+ public getEmailSubscription(requestParameters: EmailSubscriptionsApiGetEmailSubscriptionRequest, options?: AxiosRequestConfig) {
761
+ return EmailSubscriptionsApiFp(this.configuration).getEmailSubscription(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
762
+ }
763
+
764
+ /**
765
+ * Returns the Microsoft Graph mail subscriptions of the tenant, one per mailbox and folder of the email channel, with their status, expiry and last error. For more information about pagination, read the Pagination documentation. **Required Permissions** \"tenant-management.settings.view\"
766
+ * @summary List email subscriptions
767
+ * @param {EmailSubscriptionsApiListEmailSubscriptionsRequest} requestParameters Request parameters.
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ * @memberof EmailSubscriptionsApi
771
+ */
772
+ public listEmailSubscriptions(requestParameters: EmailSubscriptionsApiListEmailSubscriptionsRequest = {}, options?: AxiosRequestConfig) {
773
+ return EmailSubscriptionsApiFp(this.configuration).listEmailSubscriptions(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));
774
+ }
775
+
776
+ /**
777
+ * Brings the subscriptions in line with the mailboxes and folders of the email channel: creates the missing ones, deletes the ones no longer configured and recreates expired or failed ones. Returns how many subscriptions each step touched. **Required Permissions** \"tenant-management.settings.update\"
778
+ * @summary Reconcile the email subscriptions
779
+ * @param {EmailSubscriptionsApiReconcileEmailSubscriptionsRequest} requestParameters Request parameters.
780
+ * @param {*} [options] Override http request option.
781
+ * @throws {RequiredError}
782
+ * @memberof EmailSubscriptionsApi
783
+ */
784
+ public reconcileEmailSubscriptions(requestParameters: EmailSubscriptionsApiReconcileEmailSubscriptionsRequest, options?: AxiosRequestConfig) {
785
+ return EmailSubscriptionsApiFp(this.configuration).reconcileEmailSubscriptions(requestParameters.reconcileEmailSubscriptionsRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
786
+ }
787
+
788
+ /**
789
+ * Renews the subscription in Microsoft Graph right away and returns it with its new expiry. A pending or failed subscription, or one Graph no longer knows, is created again. Fails with 503 when Graph rejects the call; the error is kept on the subscription. **Required Permissions** \"tenant-management.settings.update\"
790
+ * @summary Renew the email subscription
791
+ * @param {EmailSubscriptionsApiRenewEmailSubscriptionRequest} requestParameters Request parameters.
792
+ * @param {*} [options] Override http request option.
793
+ * @throws {RequiredError}
794
+ * @memberof EmailSubscriptionsApi
795
+ */
796
+ public renewEmailSubscription(requestParameters: EmailSubscriptionsApiRenewEmailSubscriptionRequest, options?: AxiosRequestConfig) {
797
+ return EmailSubscriptionsApiFp(this.configuration).renewEmailSubscription(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
798
+ }
799
+ }