@emilgroup/notification-sdk 0.8.1-beta.49 → 0.8.1-beta.5

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 (101) hide show
  1. package/.openapi-generator/FILES +0 -20
  2. package/README.md +2 -2
  3. package/api/email-messages-api.ts +28 -40
  4. package/api/email-tracking-api.ts +40 -271
  5. package/api/email-verifications-api.ts +8 -16
  6. package/api/layouts-api.ts +36 -56
  7. package/api/notification-templates-api.ts +36 -56
  8. package/api/notifications-api.ts +4 -115
  9. package/api.ts +0 -6
  10. package/base.ts +15 -36
  11. package/configuration.ts +0 -11
  12. package/dist/api/email-messages-api.d.ts +28 -40
  13. package/dist/api/email-messages-api.js +25 -37
  14. package/dist/api/email-tracking-api.d.ts +40 -170
  15. package/dist/api/email-tracking-api.js +34 -233
  16. package/dist/api/email-verifications-api.d.ts +8 -16
  17. package/dist/api/email-verifications-api.js +8 -16
  18. package/dist/api/layouts-api.d.ts +36 -56
  19. package/dist/api/layouts-api.js +32 -52
  20. package/dist/api/notification-templates-api.d.ts +36 -56
  21. package/dist/api/notification-templates-api.js +32 -52
  22. package/dist/api/notifications-api.d.ts +4 -65
  23. package/dist/api/notifications-api.js +4 -101
  24. package/dist/api.d.ts +0 -3
  25. package/dist/api.js +0 -3
  26. package/dist/base.d.ts +0 -1
  27. package/dist/base.js +16 -36
  28. package/dist/configuration.d.ts +0 -9
  29. package/dist/configuration.js +0 -1
  30. package/dist/models/email-message-class.d.ts +7 -73
  31. package/dist/models/email-message-class.js +3 -22
  32. package/dist/models/email-thread-class.d.ts +5 -37
  33. package/dist/models/index.d.ts +0 -17
  34. package/dist/models/index.js +0 -17
  35. package/dist/models/send-notification-request-dto.d.ts +1 -10
  36. package/dist/models/send-notification-request-dto.js +1 -2
  37. package/models/email-message-class.ts +8 -78
  38. package/models/email-thread-class.ts +5 -37
  39. package/models/index.ts +0 -17
  40. package/models/send-notification-request-dto.ts +2 -9
  41. package/package.json +1 -1
  42. package/api/email-mailboxes-api.ts +0 -148
  43. package/api/email-subscriptions-api.ts +0 -559
  44. package/api/msgraph-webhooks-api.ts +0 -278
  45. package/dist/api/email-mailboxes-api.d.ts +0 -87
  46. package/dist/api/email-mailboxes-api.js +0 -218
  47. package/dist/api/email-subscriptions-api.d.ts +0 -319
  48. package/dist/api/email-subscriptions-api.js +0 -537
  49. package/dist/api/msgraph-webhooks-api.d.ts +0 -168
  50. package/dist/api/msgraph-webhooks-api.js +0 -305
  51. package/dist/models/assign-email-thread-entity-body-dto.d.ts +0 -43
  52. package/dist/models/assign-email-thread-entity-body-dto.js +0 -22
  53. package/dist/models/assign-email-thread-entity-response-class.d.ts +0 -25
  54. package/dist/models/assign-email-thread-entity-response-class.js +0 -15
  55. package/dist/models/email-mailbox-class.d.ts +0 -47
  56. package/dist/models/email-mailbox-class.js +0 -20
  57. package/dist/models/email-message-summary-class.d.ts +0 -98
  58. package/dist/models/email-message-summary-class.js +0 -33
  59. package/dist/models/email-subscription-class.d.ts +0 -104
  60. package/dist/models/email-subscription-class.js +0 -23
  61. package/dist/models/entity-ref-class.d.ts +0 -37
  62. package/dist/models/entity-ref-class.js +0 -22
  63. package/dist/models/get-email-subscription-response-class.d.ts +0 -25
  64. package/dist/models/get-email-subscription-response-class.js +0 -15
  65. package/dist/models/grpc-send-email-request-dto.d.ts +0 -137
  66. package/dist/models/grpc-send-email-request-dto.js +0 -22
  67. package/dist/models/inline-attachment-dto.d.ts +0 -36
  68. package/dist/models/inline-attachment-dto.js +0 -15
  69. package/dist/models/list-email-mailboxes-response-class.d.ts +0 -43
  70. package/dist/models/list-email-mailboxes-response-class.js +0 -15
  71. package/dist/models/list-email-subscriptions-response-class.d.ts +0 -43
  72. package/dist/models/list-email-subscriptions-response-class.js +0 -15
  73. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +0 -24
  74. package/dist/models/reconcile-email-subscriptions-request-dto.js +0 -15
  75. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +0 -48
  76. package/dist/models/reconcile-email-subscriptions-response-class.js +0 -15
  77. package/dist/models/renew-email-subscription-response-class.d.ts +0 -25
  78. package/dist/models/renew-email-subscription-response-class.js +0 -15
  79. package/dist/models/send-email-request-dto.d.ts +0 -131
  80. package/dist/models/send-email-request-dto.js +0 -22
  81. package/dist/models/send-email-response-class.d.ts +0 -24
  82. package/dist/models/send-email-response-class.js +0 -15
  83. package/dist/models/unassign-email-thread-entity-response-class.d.ts +0 -25
  84. package/dist/models/unassign-email-thread-entity-response-class.js +0 -15
  85. package/models/assign-email-thread-entity-body-dto.ts +0 -52
  86. package/models/assign-email-thread-entity-response-class.ts +0 -31
  87. package/models/email-mailbox-class.ts +0 -56
  88. package/models/email-message-summary-class.ts +0 -109
  89. package/models/email-subscription-class.ts +0 -113
  90. package/models/entity-ref-class.ts +0 -46
  91. package/models/get-email-subscription-response-class.ts +0 -31
  92. package/models/grpc-send-email-request-dto.ts +0 -144
  93. package/models/inline-attachment-dto.ts +0 -42
  94. package/models/list-email-mailboxes-response-class.ts +0 -49
  95. package/models/list-email-subscriptions-response-class.ts +0 -49
  96. package/models/reconcile-email-subscriptions-request-dto.ts +0 -30
  97. package/models/reconcile-email-subscriptions-response-class.ts +0 -54
  98. package/models/renew-email-subscription-response-class.ts +0 -31
  99. package/models/send-email-request-dto.ts +0 -138
  100. package/models/send-email-response-class.ts +0 -30
  101. package/models/unassign-email-thread-entity-response-class.ts +0 -31
@@ -1,537 +0,0 @@
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
- * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
97
- * @summary Retrieve 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
- getEmailSubscription: 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, 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)('getEmailSubscription', 'id', id);
112
- localVarPath = "/notificationservice/v1/email-subscriptions/{id}"
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: 'GET' }, 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
- case 1:
126
- // authentication bearer required
127
- // http bearer authentication required
128
- _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
- }
132
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
- return [2 /*return*/, {
136
- url: (0, common_1.toPathString)(localVarUrlObj),
137
- options: localVarRequestOptions,
138
- }];
139
- }
140
- });
141
- });
142
- },
143
- /**
144
- * 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\"
145
- * @summary List email subscriptions
146
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
147
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
148
- * @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.
149
- * @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;
150
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
151
- * @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;
152
- * @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;
153
- * @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;
154
- * @param {*} [options] Override http request option.
155
- * @throws {RequiredError}
156
- */
157
- listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
158
- if (options === void 0) { options = {}; }
159
- return __awaiter(_this, void 0, void 0, function () {
160
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
161
- return __generator(this, function (_a) {
162
- switch (_a.label) {
163
- case 0:
164
- localVarPath = "/notificationservice/v1/email-subscriptions";
165
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
166
- if (configuration) {
167
- baseOptions = configuration.baseOptions;
168
- baseAccessToken = configuration.accessToken;
169
- }
170
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
171
- localVarHeaderParameter = {};
172
- localVarQueryParameter = {};
173
- // authentication bearer required
174
- // http bearer authentication required
175
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
176
- case 1:
177
- // authentication bearer required
178
- // http bearer authentication required
179
- _a.sent();
180
- if (pageSize !== undefined) {
181
- localVarQueryParameter['pageSize'] = pageSize;
182
- }
183
- if (pageToken !== undefined) {
184
- localVarQueryParameter['pageToken'] = pageToken;
185
- }
186
- if (filter !== undefined) {
187
- localVarQueryParameter['filter'] = filter;
188
- }
189
- if (search !== undefined) {
190
- localVarQueryParameter['search'] = search;
191
- }
192
- if (order !== undefined) {
193
- localVarQueryParameter['order'] = order;
194
- }
195
- if (expand !== undefined) {
196
- localVarQueryParameter['expand'] = expand;
197
- }
198
- if (filters !== undefined) {
199
- localVarQueryParameter['filters'] = filters;
200
- }
201
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
202
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
203
- }
204
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
205
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
206
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
207
- return [2 /*return*/, {
208
- url: (0, common_1.toPathString)(localVarUrlObj),
209
- options: localVarRequestOptions,
210
- }];
211
- }
212
- });
213
- });
214
- },
215
- /**
216
- * 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\"
217
- * @summary Reconcile the email subscriptions
218
- * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
219
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
220
- * @param {*} [options] Override http request option.
221
- * @throws {RequiredError}
222
- */
223
- reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
224
- if (options === void 0) { options = {}; }
225
- return __awaiter(_this, void 0, void 0, function () {
226
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
227
- return __generator(this, function (_a) {
228
- switch (_a.label) {
229
- case 0:
230
- // verify required parameter 'reconcileEmailSubscriptionsRequestDto' is not null or undefined
231
- (0, common_1.assertParamExists)('reconcileEmailSubscriptions', 'reconcileEmailSubscriptionsRequestDto', reconcileEmailSubscriptionsRequestDto);
232
- localVarPath = "/notificationservice/v1/email-subscriptions/reconcile";
233
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
234
- if (configuration) {
235
- baseOptions = configuration.baseOptions;
236
- baseAccessToken = configuration.accessToken;
237
- }
238
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
239
- localVarHeaderParameter = {};
240
- localVarQueryParameter = {};
241
- // authentication bearer required
242
- // http bearer authentication required
243
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
244
- case 1:
245
- // authentication bearer required
246
- // http bearer authentication required
247
- _a.sent();
248
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
249
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
250
- }
251
- localVarHeaderParameter['Content-Type'] = 'application/json';
252
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
253
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
254
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
255
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(reconcileEmailSubscriptionsRequestDto, localVarRequestOptions, configuration);
256
- return [2 /*return*/, {
257
- url: (0, common_1.toPathString)(localVarUrlObj),
258
- options: localVarRequestOptions,
259
- }];
260
- }
261
- });
262
- });
263
- },
264
- /**
265
- * 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\"
266
- * @summary Renew the email subscription
267
- * @param {number} id
268
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
269
- * @param {*} [options] Override http request option.
270
- * @throws {RequiredError}
271
- */
272
- renewEmailSubscription: function (id, authorization, options) {
273
- if (options === void 0) { options = {}; }
274
- return __awaiter(_this, void 0, void 0, function () {
275
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
276
- return __generator(this, function (_a) {
277
- switch (_a.label) {
278
- case 0:
279
- // verify required parameter 'id' is not null or undefined
280
- (0, common_1.assertParamExists)('renewEmailSubscription', 'id', id);
281
- localVarPath = "/notificationservice/v1/email-subscriptions/{id}/renew"
282
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
283
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
284
- if (configuration) {
285
- baseOptions = configuration.baseOptions;
286
- baseAccessToken = configuration.accessToken;
287
- }
288
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
289
- localVarHeaderParameter = {};
290
- localVarQueryParameter = {};
291
- // authentication bearer required
292
- // http bearer authentication required
293
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
294
- case 1:
295
- // authentication bearer required
296
- // http bearer authentication required
297
- _a.sent();
298
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
300
- }
301
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
302
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
304
- return [2 /*return*/, {
305
- url: (0, common_1.toPathString)(localVarUrlObj),
306
- options: localVarRequestOptions,
307
- }];
308
- }
309
- });
310
- });
311
- },
312
- };
313
- };
314
- exports.EmailSubscriptionsApiAxiosParamCreator = EmailSubscriptionsApiAxiosParamCreator;
315
- /**
316
- * EmailSubscriptionsApi - functional programming interface
317
- * @export
318
- */
319
- var EmailSubscriptionsApiFp = function (configuration) {
320
- var localVarAxiosParamCreator = (0, exports.EmailSubscriptionsApiAxiosParamCreator)(configuration);
321
- return {
322
- /**
323
- * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
324
- * @summary Retrieve the email subscription
325
- * @param {number} id
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
- getEmailSubscription: function (id, authorization, options) {
331
- return __awaiter(this, void 0, void 0, function () {
332
- var localVarAxiosArgs;
333
- return __generator(this, function (_a) {
334
- switch (_a.label) {
335
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getEmailSubscription(id, authorization, options)];
336
- case 1:
337
- localVarAxiosArgs = _a.sent();
338
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
339
- }
340
- });
341
- });
342
- },
343
- /**
344
- * 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\"
345
- * @summary List email subscriptions
346
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
347
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
348
- * @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.
349
- * @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;
350
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
351
- * @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;
352
- * @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;
353
- * @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;
354
- * @param {*} [options] Override http request option.
355
- * @throws {RequiredError}
356
- */
357
- listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
358
- return __awaiter(this, void 0, void 0, function () {
359
- var localVarAxiosArgs;
360
- return __generator(this, function (_a) {
361
- switch (_a.label) {
362
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listEmailSubscriptions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
363
- case 1:
364
- localVarAxiosArgs = _a.sent();
365
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
366
- }
367
- });
368
- });
369
- },
370
- /**
371
- * 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\"
372
- * @summary Reconcile the email subscriptions
373
- * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
374
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
375
- * @param {*} [options] Override http request option.
376
- * @throws {RequiredError}
377
- */
378
- reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
379
- return __awaiter(this, void 0, void 0, function () {
380
- var localVarAxiosArgs;
381
- return __generator(this, function (_a) {
382
- switch (_a.label) {
383
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto, authorization, options)];
384
- case 1:
385
- localVarAxiosArgs = _a.sent();
386
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
387
- }
388
- });
389
- });
390
- },
391
- /**
392
- * 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\"
393
- * @summary Renew the email subscription
394
- * @param {number} id
395
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
- * @param {*} [options] Override http request option.
397
- * @throws {RequiredError}
398
- */
399
- renewEmailSubscription: function (id, authorization, options) {
400
- return __awaiter(this, void 0, void 0, function () {
401
- var localVarAxiosArgs;
402
- return __generator(this, function (_a) {
403
- switch (_a.label) {
404
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.renewEmailSubscription(id, authorization, options)];
405
- case 1:
406
- localVarAxiosArgs = _a.sent();
407
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
408
- }
409
- });
410
- });
411
- },
412
- };
413
- };
414
- exports.EmailSubscriptionsApiFp = EmailSubscriptionsApiFp;
415
- /**
416
- * EmailSubscriptionsApi - factory interface
417
- * @export
418
- */
419
- var EmailSubscriptionsApiFactory = function (configuration, basePath, axios) {
420
- var localVarFp = (0, exports.EmailSubscriptionsApiFp)(configuration);
421
- return {
422
- /**
423
- * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
424
- * @summary Retrieve the email subscription
425
- * @param {number} id
426
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
427
- * @param {*} [options] Override http request option.
428
- * @throws {RequiredError}
429
- */
430
- getEmailSubscription: function (id, authorization, options) {
431
- return localVarFp.getEmailSubscription(id, authorization, options).then(function (request) { return request(axios, basePath); });
432
- },
433
- /**
434
- * 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\"
435
- * @summary List email subscriptions
436
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
437
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
438
- * @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.
439
- * @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;
440
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
441
- * @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;
442
- * @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;
443
- * @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;
444
- * @param {*} [options] Override http request option.
445
- * @throws {RequiredError}
446
- */
447
- listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
448
- return localVarFp.listEmailSubscriptions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
449
- },
450
- /**
451
- * 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\"
452
- * @summary Reconcile the email subscriptions
453
- * @param {ReconcileEmailSubscriptionsRequestDto} reconcileEmailSubscriptionsRequestDto
454
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
455
- * @param {*} [options] Override http request option.
456
- * @throws {RequiredError}
457
- */
458
- reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
459
- return localVarFp.reconcileEmailSubscriptions(reconcileEmailSubscriptionsRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
460
- },
461
- /**
462
- * 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\"
463
- * @summary Renew the email subscription
464
- * @param {number} id
465
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
466
- * @param {*} [options] Override http request option.
467
- * @throws {RequiredError}
468
- */
469
- renewEmailSubscription: function (id, authorization, options) {
470
- return localVarFp.renewEmailSubscription(id, authorization, options).then(function (request) { return request(axios, basePath); });
471
- },
472
- };
473
- };
474
- exports.EmailSubscriptionsApiFactory = EmailSubscriptionsApiFactory;
475
- /**
476
- * EmailSubscriptionsApi - object-oriented interface
477
- * @export
478
- * @class EmailSubscriptionsApi
479
- * @extends {BaseAPI}
480
- */
481
- var EmailSubscriptionsApi = /** @class */ (function (_super) {
482
- __extends(EmailSubscriptionsApi, _super);
483
- function EmailSubscriptionsApi() {
484
- return _super !== null && _super.apply(this, arguments) || this;
485
- }
486
- /**
487
- * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
488
- * @summary Retrieve the email subscription
489
- * @param {EmailSubscriptionsApiGetEmailSubscriptionRequest} requestParameters Request parameters.
490
- * @param {*} [options] Override http request option.
491
- * @throws {RequiredError}
492
- * @memberof EmailSubscriptionsApi
493
- */
494
- EmailSubscriptionsApi.prototype.getEmailSubscription = function (requestParameters, options) {
495
- var _this = this;
496
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).getEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
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 {EmailSubscriptionsApiListEmailSubscriptionsRequest} requestParameters Request parameters.
502
- * @param {*} [options] Override http request option.
503
- * @throws {RequiredError}
504
- * @memberof EmailSubscriptionsApi
505
- */
506
- EmailSubscriptionsApi.prototype.listEmailSubscriptions = function (requestParameters, options) {
507
- var _this = this;
508
- if (requestParameters === void 0) { requestParameters = {}; }
509
- 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); });
510
- };
511
- /**
512
- * 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\"
513
- * @summary Reconcile the email subscriptions
514
- * @param {EmailSubscriptionsApiReconcileEmailSubscriptionsRequest} requestParameters Request parameters.
515
- * @param {*} [options] Override http request option.
516
- * @throws {RequiredError}
517
- * @memberof EmailSubscriptionsApi
518
- */
519
- EmailSubscriptionsApi.prototype.reconcileEmailSubscriptions = function (requestParameters, options) {
520
- var _this = this;
521
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).reconcileEmailSubscriptions(requestParameters.reconcileEmailSubscriptionsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
522
- };
523
- /**
524
- * 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\"
525
- * @summary Renew the email subscription
526
- * @param {EmailSubscriptionsApiRenewEmailSubscriptionRequest} requestParameters Request parameters.
527
- * @param {*} [options] Override http request option.
528
- * @throws {RequiredError}
529
- * @memberof EmailSubscriptionsApi
530
- */
531
- EmailSubscriptionsApi.prototype.renewEmailSubscription = function (requestParameters, options) {
532
- var _this = this;
533
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).renewEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
534
- };
535
- return EmailSubscriptionsApi;
536
- }(base_1.BaseAPI));
537
- exports.EmailSubscriptionsApi = EmailSubscriptionsApi;