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

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