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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/.openapi-generator/FILES +23 -0
  2. package/README.md +2 -2
  3. package/api/email-mailboxes-api.ts +150 -0
  4. package/api/email-messages-api.ts +56 -36
  5. package/api/email-subscriptions-api.ts +781 -0
  6. package/api/email-tracking-api.ts +291 -48
  7. package/api/email-verifications-api.ts +24 -12
  8. package/api/layouts-api.ts +76 -46
  9. package/api/msgraph-webhooks-api.ts +278 -0
  10. package/api/notification-templates-api.ts +76 -46
  11. package/api/notifications-api.ts +121 -6
  12. package/api.ts +6 -0
  13. package/base.ts +174 -41
  14. package/common.ts +3 -2
  15. package/configuration.ts +20 -0
  16. package/dist/api/email-mailboxes-api.d.ts +87 -0
  17. package/dist/api/email-mailboxes-api.js +221 -0
  18. package/dist/api/email-messages-api.d.ts +44 -32
  19. package/dist/api/email-messages-api.js +62 -40
  20. package/dist/api/email-subscriptions-api.d.ts +432 -0
  21. package/dist/api/email-subscriptions-api.js +738 -0
  22. package/dist/api/email-tracking-api.d.ts +174 -44
  23. package/dist/api/email-tracking-api.js +261 -48
  24. package/dist/api/email-verifications-api.d.ts +18 -10
  25. package/dist/api/email-verifications-api.js +30 -16
  26. package/dist/api/health-api.d.ts +1 -1
  27. package/dist/api/layouts-api.d.ts +61 -41
  28. package/dist/api/layouts-api.js +81 -50
  29. package/dist/api/msgraph-webhooks-api.d.ts +168 -0
  30. package/dist/api/msgraph-webhooks-api.js +305 -0
  31. package/dist/api/notification-templates-api.d.ts +61 -41
  32. package/dist/api/notification-templates-api.js +81 -50
  33. package/dist/api/notifications-api.d.ts +66 -5
  34. package/dist/api/notifications-api.js +111 -8
  35. package/dist/api.d.ts +3 -0
  36. package/dist/api.js +3 -0
  37. package/dist/base.d.ts +24 -0
  38. package/dist/base.js +178 -59
  39. package/dist/common.d.ts +1 -1
  40. package/dist/common.js +1 -0
  41. package/dist/configuration.d.ts +17 -0
  42. package/dist/configuration.js +2 -0
  43. package/dist/models/assign-email-thread-entity-body-dto.d.ts +43 -0
  44. package/dist/models/assign-email-thread-entity-body-dto.js +22 -0
  45. package/dist/models/assign-email-thread-entity-response-class.d.ts +25 -0
  46. package/dist/models/assign-email-thread-entity-response-class.js +15 -0
  47. package/dist/models/catch-up-email-subscription-response-class.d.ts +24 -0
  48. package/dist/models/catch-up-email-subscription-response-class.js +15 -0
  49. package/dist/models/catch-up-email-subscriptions-request-dto.d.ts +24 -0
  50. package/dist/models/catch-up-email-subscriptions-request-dto.js +15 -0
  51. package/dist/models/catch-up-email-subscriptions-response-class.d.ts +30 -0
  52. package/dist/models/catch-up-email-subscriptions-response-class.js +15 -0
  53. package/dist/models/email-mailbox-class.d.ts +47 -0
  54. package/dist/models/email-mailbox-class.js +20 -0
  55. package/dist/models/email-message-class.d.ts +73 -7
  56. package/dist/models/email-message-class.js +22 -3
  57. package/dist/models/email-message-summary-class.d.ts +98 -0
  58. package/dist/models/email-message-summary-class.js +33 -0
  59. package/dist/models/email-subscription-class.d.ts +110 -0
  60. package/dist/models/email-subscription-class.js +23 -0
  61. package/dist/models/email-thread-class.d.ts +37 -5
  62. package/dist/models/entity-ref-class.d.ts +37 -0
  63. package/dist/models/entity-ref-class.js +22 -0
  64. package/dist/models/get-email-subscription-response-class.d.ts +25 -0
  65. package/dist/models/get-email-subscription-response-class.js +15 -0
  66. package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
  67. package/dist/models/grpc-send-email-request-dto.js +22 -0
  68. package/dist/models/index.d.ts +20 -0
  69. package/dist/models/index.js +20 -0
  70. package/dist/models/inline-attachment-dto.d.ts +36 -0
  71. package/dist/models/inline-attachment-dto.js +15 -0
  72. package/dist/models/list-email-mailboxes-response-class.d.ts +43 -0
  73. package/dist/models/list-email-mailboxes-response-class.js +15 -0
  74. package/dist/models/list-email-subscriptions-response-class.d.ts +43 -0
  75. package/dist/models/list-email-subscriptions-response-class.js +15 -0
  76. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +24 -0
  77. package/dist/models/reconcile-email-subscriptions-request-dto.js +15 -0
  78. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +48 -0
  79. package/dist/models/reconcile-email-subscriptions-response-class.js +15 -0
  80. package/dist/models/renew-email-subscription-response-class.d.ts +25 -0
  81. package/dist/models/renew-email-subscription-response-class.js +15 -0
  82. package/dist/models/send-email-request-dto.d.ts +131 -0
  83. package/dist/models/send-email-request-dto.js +22 -0
  84. package/dist/models/send-email-response-class.d.ts +24 -0
  85. package/dist/models/send-email-response-class.js +15 -0
  86. package/dist/models/send-notification-request-dto.d.ts +10 -1
  87. package/dist/models/send-notification-request-dto.js +2 -1
  88. package/dist/models/unassign-email-thread-entity-response-class.d.ts +25 -0
  89. package/dist/models/unassign-email-thread-entity-response-class.js +15 -0
  90. package/models/assign-email-thread-entity-body-dto.ts +52 -0
  91. package/models/assign-email-thread-entity-response-class.ts +31 -0
  92. package/models/catch-up-email-subscription-response-class.ts +30 -0
  93. package/models/catch-up-email-subscriptions-request-dto.ts +30 -0
  94. package/models/catch-up-email-subscriptions-response-class.ts +36 -0
  95. package/models/email-mailbox-class.ts +56 -0
  96. package/models/email-message-class.ts +78 -8
  97. package/models/email-message-summary-class.ts +109 -0
  98. package/models/email-subscription-class.ts +119 -0
  99. package/models/email-thread-class.ts +37 -5
  100. package/models/entity-ref-class.ts +46 -0
  101. package/models/get-email-subscription-response-class.ts +31 -0
  102. package/models/grpc-send-email-request-dto.ts +144 -0
  103. package/models/index.ts +20 -0
  104. package/models/inline-attachment-dto.ts +42 -0
  105. package/models/list-email-mailboxes-response-class.ts +49 -0
  106. package/models/list-email-subscriptions-response-class.ts +49 -0
  107. package/models/reconcile-email-subscriptions-request-dto.ts +30 -0
  108. package/models/reconcile-email-subscriptions-response-class.ts +54 -0
  109. package/models/renew-email-subscription-response-class.ts +31 -0
  110. package/models/send-email-request-dto.ts +138 -0
  111. package/models/send-email-response-class.ts +30 -0
  112. package/models/send-notification-request-dto.ts +9 -2
  113. package/models/unassign-email-thread-entity-response-class.ts +31 -0
  114. package/package.json +2 -2
@@ -0,0 +1,738 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL NotificationService
6
+ * The EMIL NotificationService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.EmailSubscriptionsApi = exports.EmailSubscriptionsApiFactory = exports.EmailSubscriptionsApiFp = exports.EmailSubscriptionsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * EmailSubscriptionsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * 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\"
97
+ * @summary Catch up missed mail for the email subscription
98
+ * @param {number} id
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
+ catchUpEmailSubscription: function (id, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'id' is not null or undefined
111
+ (0, common_1.assertParamExists)('catchUpEmailSubscription', 'id', id);
112
+ localVarPath = "/notificationservice/v1/email-subscriptions/{id}/catch-up"
113
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
114
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ baseAccessToken = configuration.accessToken;
118
+ }
119
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
120
+ localVarHeaderParameter = {};
121
+ localVarQueryParameter = {};
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token; an empty value is never sent.
126
+ ];
127
+ case 1:
128
+ // authentication bearer required
129
+ // http bearer authentication required
130
+ _a.sent();
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
+ }
135
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
136
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
+ return [2 /*return*/, {
139
+ url: (0, common_1.toPathString)(localVarUrlObj),
140
+ options: localVarRequestOptions,
141
+ }];
142
+ }
143
+ });
144
+ });
145
+ },
146
+ /**
147
+ * 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\"
148
+ * @summary Catch up missed mail for all email subscriptions
149
+ * @param {CatchUpEmailSubscriptionsRequestDto} catchUpEmailSubscriptionsRequestDto
150
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ catchUpEmailSubscriptions: function (catchUpEmailSubscriptionsRequestDto, authorization, options) {
155
+ if (options === void 0) { options = {}; }
156
+ return __awaiter(_this, void 0, void 0, function () {
157
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
158
+ return __generator(this, function (_a) {
159
+ switch (_a.label) {
160
+ case 0:
161
+ // verify required parameter 'catchUpEmailSubscriptionsRequestDto' is not null or undefined
162
+ (0, common_1.assertParamExists)('catchUpEmailSubscriptions', 'catchUpEmailSubscriptionsRequestDto', catchUpEmailSubscriptionsRequestDto);
163
+ localVarPath = "/notificationservice/v1/email-subscriptions/catch-up";
164
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
165
+ if (configuration) {
166
+ baseOptions = configuration.baseOptions;
167
+ baseAccessToken = configuration.accessToken;
168
+ }
169
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
170
+ localVarHeaderParameter = {};
171
+ localVarQueryParameter = {};
172
+ // authentication bearer required
173
+ // http bearer authentication required
174
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
175
+ // Only Authorization falls back to the configured token; an empty value is never sent.
176
+ ];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
182
+ if (authorizationValue) {
183
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
+ }
185
+ localVarHeaderParameter['Content-Type'] = 'application/json';
186
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
187
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
189
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(catchUpEmailSubscriptionsRequestDto, localVarRequestOptions, configuration);
190
+ return [2 /*return*/, {
191
+ url: (0, common_1.toPathString)(localVarUrlObj),
192
+ options: localVarRequestOptions,
193
+ }];
194
+ }
195
+ });
196
+ });
197
+ },
198
+ /**
199
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
200
+ * @summary Retrieve the email subscription
201
+ * @param {number} id
202
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
203
+ * @param {*} [options] Override http request option.
204
+ * @throws {RequiredError}
205
+ */
206
+ getEmailSubscription: function (id, authorization, options) {
207
+ if (options === void 0) { options = {}; }
208
+ return __awaiter(_this, void 0, void 0, function () {
209
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
210
+ return __generator(this, function (_a) {
211
+ switch (_a.label) {
212
+ case 0:
213
+ // verify required parameter 'id' is not null or undefined
214
+ (0, common_1.assertParamExists)('getEmailSubscription', 'id', id);
215
+ localVarPath = "/notificationservice/v1/email-subscriptions/{id}"
216
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
217
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
218
+ if (configuration) {
219
+ baseOptions = configuration.baseOptions;
220
+ baseAccessToken = configuration.accessToken;
221
+ }
222
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
223
+ localVarHeaderParameter = {};
224
+ localVarQueryParameter = {};
225
+ // authentication bearer required
226
+ // http bearer authentication required
227
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
228
+ // Only Authorization falls back to the configured token; an empty value is never sent.
229
+ ];
230
+ case 1:
231
+ // authentication bearer required
232
+ // http bearer authentication required
233
+ _a.sent();
234
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
235
+ if (authorizationValue) {
236
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
237
+ }
238
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
239
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
240
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
241
+ return [2 /*return*/, {
242
+ url: (0, common_1.toPathString)(localVarUrlObj),
243
+ options: localVarRequestOptions,
244
+ }];
245
+ }
246
+ });
247
+ });
248
+ },
249
+ /**
250
+ * 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\"
251
+ * @summary List email subscriptions
252
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
253
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
254
+ * @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.
255
+ * @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;
256
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
257
+ * @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;
258
+ * @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;
259
+ * @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;
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
264
+ if (options === void 0) { options = {}; }
265
+ return __awaiter(_this, void 0, void 0, function () {
266
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
267
+ return __generator(this, function (_a) {
268
+ switch (_a.label) {
269
+ case 0:
270
+ localVarPath = "/notificationservice/v1/email-subscriptions";
271
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
272
+ if (configuration) {
273
+ baseOptions = configuration.baseOptions;
274
+ baseAccessToken = configuration.accessToken;
275
+ }
276
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
277
+ localVarHeaderParameter = {};
278
+ localVarQueryParameter = {};
279
+ // authentication bearer required
280
+ // http bearer authentication required
281
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
282
+ case 1:
283
+ // authentication bearer required
284
+ // http bearer authentication required
285
+ _a.sent();
286
+ if (pageSize !== undefined) {
287
+ localVarQueryParameter['pageSize'] = pageSize;
288
+ }
289
+ if (pageToken !== undefined) {
290
+ localVarQueryParameter['pageToken'] = pageToken;
291
+ }
292
+ if (filter !== undefined) {
293
+ localVarQueryParameter['filter'] = filter;
294
+ }
295
+ if (search !== undefined) {
296
+ localVarQueryParameter['search'] = search;
297
+ }
298
+ if (order !== undefined) {
299
+ localVarQueryParameter['order'] = order;
300
+ }
301
+ if (expand !== undefined) {
302
+ localVarQueryParameter['expand'] = expand;
303
+ }
304
+ if (filters !== undefined) {
305
+ localVarQueryParameter['filters'] = filters;
306
+ }
307
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
308
+ if (authorizationValue) {
309
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
310
+ }
311
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
312
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
313
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
314
+ return [2 /*return*/, {
315
+ url: (0, common_1.toPathString)(localVarUrlObj),
316
+ options: localVarRequestOptions,
317
+ }];
318
+ }
319
+ });
320
+ });
321
+ },
322
+ /**
323
+ * 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\"
324
+ * @summary Reconcile the email subscriptions
325
+ * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
326
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
331
+ if (options === void 0) { options = {}; }
332
+ return __awaiter(_this, void 0, void 0, function () {
333
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
334
+ return __generator(this, function (_a) {
335
+ switch (_a.label) {
336
+ case 0:
337
+ // verify required parameter 'reconcileEmailSubscriptionsRequestDto' is not null or undefined
338
+ (0, common_1.assertParamExists)('reconcileEmailSubscriptions', 'reconcileEmailSubscriptionsRequestDto', reconcileEmailSubscriptionsRequestDto);
339
+ localVarPath = "/notificationservice/v1/email-subscriptions/reconcile";
340
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
341
+ if (configuration) {
342
+ baseOptions = configuration.baseOptions;
343
+ baseAccessToken = configuration.accessToken;
344
+ }
345
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
346
+ localVarHeaderParameter = {};
347
+ localVarQueryParameter = {};
348
+ // authentication bearer required
349
+ // http bearer authentication required
350
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
351
+ // Only Authorization falls back to the configured token; an empty value is never sent.
352
+ ];
353
+ case 1:
354
+ // authentication bearer required
355
+ // http bearer authentication required
356
+ _a.sent();
357
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
358
+ if (authorizationValue) {
359
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
360
+ }
361
+ localVarHeaderParameter['Content-Type'] = 'application/json';
362
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
363
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
364
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
365
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(reconcileEmailSubscriptionsRequestDto, localVarRequestOptions, configuration);
366
+ return [2 /*return*/, {
367
+ url: (0, common_1.toPathString)(localVarUrlObj),
368
+ options: localVarRequestOptions,
369
+ }];
370
+ }
371
+ });
372
+ });
373
+ },
374
+ /**
375
+ * 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\"
376
+ * @summary Renew the email subscription
377
+ * @param {number} id
378
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ renewEmailSubscription: function (id, authorization, options) {
383
+ if (options === void 0) { options = {}; }
384
+ return __awaiter(_this, void 0, void 0, function () {
385
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
386
+ return __generator(this, function (_a) {
387
+ switch (_a.label) {
388
+ case 0:
389
+ // verify required parameter 'id' is not null or undefined
390
+ (0, common_1.assertParamExists)('renewEmailSubscription', 'id', id);
391
+ localVarPath = "/notificationservice/v1/email-subscriptions/{id}/renew"
392
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
393
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
394
+ if (configuration) {
395
+ baseOptions = configuration.baseOptions;
396
+ baseAccessToken = configuration.accessToken;
397
+ }
398
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
399
+ localVarHeaderParameter = {};
400
+ localVarQueryParameter = {};
401
+ // authentication bearer required
402
+ // http bearer authentication required
403
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
404
+ // Only Authorization falls back to the configured token; an empty value is never sent.
405
+ ];
406
+ case 1:
407
+ // authentication bearer required
408
+ // http bearer authentication required
409
+ _a.sent();
410
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
411
+ if (authorizationValue) {
412
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
413
+ }
414
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
415
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
416
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
417
+ return [2 /*return*/, {
418
+ url: (0, common_1.toPathString)(localVarUrlObj),
419
+ options: localVarRequestOptions,
420
+ }];
421
+ }
422
+ });
423
+ });
424
+ },
425
+ };
426
+ };
427
+ exports.EmailSubscriptionsApiAxiosParamCreator = EmailSubscriptionsApiAxiosParamCreator;
428
+ /**
429
+ * EmailSubscriptionsApi - functional programming interface
430
+ * @export
431
+ */
432
+ var EmailSubscriptionsApiFp = function (configuration) {
433
+ var localVarAxiosParamCreator = (0, exports.EmailSubscriptionsApiAxiosParamCreator)(configuration);
434
+ return {
435
+ /**
436
+ * 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\"
437
+ * @summary Catch up missed mail for the email subscription
438
+ * @param {number} id
439
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ catchUpEmailSubscription: function (id, authorization, options) {
444
+ return __awaiter(this, void 0, void 0, function () {
445
+ var localVarAxiosArgs;
446
+ return __generator(this, function (_a) {
447
+ switch (_a.label) {
448
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.catchUpEmailSubscription(id, authorization, options)];
449
+ case 1:
450
+ localVarAxiosArgs = _a.sent();
451
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
452
+ }
453
+ });
454
+ });
455
+ },
456
+ /**
457
+ * 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\"
458
+ * @summary Catch up missed mail for all email subscriptions
459
+ * @param {CatchUpEmailSubscriptionsRequestDto} catchUpEmailSubscriptionsRequestDto
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
+ catchUpEmailSubscriptions: function (catchUpEmailSubscriptionsRequestDto, authorization, options) {
465
+ return __awaiter(this, void 0, void 0, function () {
466
+ var localVarAxiosArgs;
467
+ return __generator(this, function (_a) {
468
+ switch (_a.label) {
469
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.catchUpEmailSubscriptions(catchUpEmailSubscriptionsRequestDto, authorization, options)];
470
+ case 1:
471
+ localVarAxiosArgs = _a.sent();
472
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
473
+ }
474
+ });
475
+ });
476
+ },
477
+ /**
478
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
479
+ * @summary Retrieve the email subscription
480
+ * @param {number} id
481
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ getEmailSubscription: function (id, authorization, options) {
486
+ return __awaiter(this, void 0, void 0, function () {
487
+ var localVarAxiosArgs;
488
+ return __generator(this, function (_a) {
489
+ switch (_a.label) {
490
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getEmailSubscription(id, authorization, options)];
491
+ case 1:
492
+ localVarAxiosArgs = _a.sent();
493
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
494
+ }
495
+ });
496
+ });
497
+ },
498
+ /**
499
+ * 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\"
500
+ * @summary List email subscriptions
501
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
502
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
503
+ * @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.
504
+ * @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;
505
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
506
+ * @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;
507
+ * @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;
508
+ * @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;
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
512
+ listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
513
+ return __awaiter(this, void 0, void 0, function () {
514
+ var localVarAxiosArgs;
515
+ return __generator(this, function (_a) {
516
+ switch (_a.label) {
517
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listEmailSubscriptions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
518
+ case 1:
519
+ localVarAxiosArgs = _a.sent();
520
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
521
+ }
522
+ });
523
+ });
524
+ },
525
+ /**
526
+ * 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\"
527
+ * @summary Reconcile the email subscriptions
528
+ * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
529
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
530
+ * @param {*} [options] Override http request option.
531
+ * @throws {RequiredError}
532
+ */
533
+ reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
534
+ return __awaiter(this, void 0, void 0, function () {
535
+ var localVarAxiosArgs;
536
+ return __generator(this, function (_a) {
537
+ switch (_a.label) {
538
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto, authorization, options)];
539
+ case 1:
540
+ localVarAxiosArgs = _a.sent();
541
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
542
+ }
543
+ });
544
+ });
545
+ },
546
+ /**
547
+ * 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\"
548
+ * @summary Renew the email subscription
549
+ * @param {number} id
550
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ renewEmailSubscription: function (id, authorization, options) {
555
+ return __awaiter(this, void 0, void 0, function () {
556
+ var localVarAxiosArgs;
557
+ return __generator(this, function (_a) {
558
+ switch (_a.label) {
559
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.renewEmailSubscription(id, authorization, options)];
560
+ case 1:
561
+ localVarAxiosArgs = _a.sent();
562
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
563
+ }
564
+ });
565
+ });
566
+ },
567
+ };
568
+ };
569
+ exports.EmailSubscriptionsApiFp = EmailSubscriptionsApiFp;
570
+ /**
571
+ * EmailSubscriptionsApi - factory interface
572
+ * @export
573
+ */
574
+ var EmailSubscriptionsApiFactory = function (configuration, basePath, axios) {
575
+ var localVarFp = (0, exports.EmailSubscriptionsApiFp)(configuration);
576
+ return {
577
+ /**
578
+ * 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\"
579
+ * @summary Catch up missed mail for the email subscription
580
+ * @param {number} id
581
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ catchUpEmailSubscription: function (id, authorization, options) {
586
+ return localVarFp.catchUpEmailSubscription(id, authorization, options).then(function (request) { return request(axios, basePath); });
587
+ },
588
+ /**
589
+ * 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\"
590
+ * @summary Catch up missed mail for all email subscriptions
591
+ * @param {CatchUpEmailSubscriptionsRequestDto} catchUpEmailSubscriptionsRequestDto
592
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
593
+ * @param {*} [options] Override http request option.
594
+ * @throws {RequiredError}
595
+ */
596
+ catchUpEmailSubscriptions: function (catchUpEmailSubscriptionsRequestDto, authorization, options) {
597
+ return localVarFp.catchUpEmailSubscriptions(catchUpEmailSubscriptionsRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
598
+ },
599
+ /**
600
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
601
+ * @summary Retrieve the email subscription
602
+ * @param {number} id
603
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
604
+ * @param {*} [options] Override http request option.
605
+ * @throws {RequiredError}
606
+ */
607
+ getEmailSubscription: function (id, authorization, options) {
608
+ return localVarFp.getEmailSubscription(id, authorization, options).then(function (request) { return request(axios, basePath); });
609
+ },
610
+ /**
611
+ * 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\"
612
+ * @summary List email subscriptions
613
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
614
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
615
+ * @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.
616
+ * @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;
617
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
618
+ * @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;
619
+ * @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;
620
+ * @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;
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
625
+ return localVarFp.listEmailSubscriptions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
626
+ },
627
+ /**
628
+ * 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\"
629
+ * @summary Reconcile the email subscriptions
630
+ * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
631
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
632
+ * @param {*} [options] Override http request option.
633
+ * @throws {RequiredError}
634
+ */
635
+ reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
636
+ return localVarFp.reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
637
+ },
638
+ /**
639
+ * 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\"
640
+ * @summary Renew the email subscription
641
+ * @param {number} id
642
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
643
+ * @param {*} [options] Override http request option.
644
+ * @throws {RequiredError}
645
+ */
646
+ renewEmailSubscription: function (id, authorization, options) {
647
+ return localVarFp.renewEmailSubscription(id, authorization, options).then(function (request) { return request(axios, basePath); });
648
+ },
649
+ };
650
+ };
651
+ exports.EmailSubscriptionsApiFactory = EmailSubscriptionsApiFactory;
652
+ /**
653
+ * EmailSubscriptionsApi - object-oriented interface
654
+ * @export
655
+ * @class EmailSubscriptionsApi
656
+ * @extends {BaseAPI}
657
+ */
658
+ var EmailSubscriptionsApi = /** @class */ (function (_super) {
659
+ __extends(EmailSubscriptionsApi, _super);
660
+ function EmailSubscriptionsApi() {
661
+ return _super !== null && _super.apply(this, arguments) || this;
662
+ }
663
+ /**
664
+ * 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\"
665
+ * @summary Catch up missed mail for the email subscription
666
+ * @param {EmailSubscriptionsApiCatchUpEmailSubscriptionRequest} requestParameters Request parameters.
667
+ * @param {*} [options] Override http request option.
668
+ * @throws {RequiredError}
669
+ * @memberof EmailSubscriptionsApi
670
+ */
671
+ EmailSubscriptionsApi.prototype.catchUpEmailSubscription = function (requestParameters, options) {
672
+ var _this = this;
673
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).catchUpEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
674
+ };
675
+ /**
676
+ * 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\"
677
+ * @summary Catch up missed mail for all email subscriptions
678
+ * @param {EmailSubscriptionsApiCatchUpEmailSubscriptionsRequest} requestParameters Request parameters.
679
+ * @param {*} [options] Override http request option.
680
+ * @throws {RequiredError}
681
+ * @memberof EmailSubscriptionsApi
682
+ */
683
+ EmailSubscriptionsApi.prototype.catchUpEmailSubscriptions = function (requestParameters, options) {
684
+ var _this = this;
685
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).catchUpEmailSubscriptions(requestParameters.catchUpEmailSubscriptionsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
686
+ };
687
+ /**
688
+ * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
689
+ * @summary Retrieve the email subscription
690
+ * @param {EmailSubscriptionsApiGetEmailSubscriptionRequest} requestParameters Request parameters.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ * @memberof EmailSubscriptionsApi
694
+ */
695
+ EmailSubscriptionsApi.prototype.getEmailSubscription = function (requestParameters, options) {
696
+ var _this = this;
697
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).getEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
698
+ };
699
+ /**
700
+ * 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\"
701
+ * @summary List email subscriptions
702
+ * @param {EmailSubscriptionsApiListEmailSubscriptionsRequest} requestParameters Request parameters.
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ * @memberof EmailSubscriptionsApi
706
+ */
707
+ EmailSubscriptionsApi.prototype.listEmailSubscriptions = function (requestParameters, options) {
708
+ var _this = this;
709
+ if (requestParameters === void 0) { requestParameters = {}; }
710
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).listEmailSubscriptions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
711
+ };
712
+ /**
713
+ * 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\"
714
+ * @summary Reconcile the email subscriptions
715
+ * @param {EmailSubscriptionsApiReconcileEmailSubscriptionsRequest} requestParameters Request parameters.
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ * @memberof EmailSubscriptionsApi
719
+ */
720
+ EmailSubscriptionsApi.prototype.reconcileEmailSubscriptions = function (requestParameters, options) {
721
+ var _this = this;
722
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).reconcileEmailSubscriptions(requestParameters.reconcileEmailSubscriptionsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
723
+ };
724
+ /**
725
+ * 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\"
726
+ * @summary Renew the email subscription
727
+ * @param {EmailSubscriptionsApiRenewEmailSubscriptionRequest} requestParameters Request parameters.
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ * @memberof EmailSubscriptionsApi
731
+ */
732
+ EmailSubscriptionsApi.prototype.renewEmailSubscription = function (requestParameters, options) {
733
+ var _this = this;
734
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).renewEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
735
+ };
736
+ return EmailSubscriptionsApi;
737
+ }(base_1.BaseAPI));
738
+ exports.EmailSubscriptionsApi = EmailSubscriptionsApi;