@emilgroup/notification-sdk 0.1.1-beta.0

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 (160) hide show
  1. package/.openapi-generator/FILES +58 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/default-api.ts +124 -0
  6. package/api/email-messages-api.ts +368 -0
  7. package/api/email-tracking-api.ts +537 -0
  8. package/api/email-verifications-api.ts +264 -0
  9. package/api/layouts-api.ts +673 -0
  10. package/api/notification-templates-api.ts +687 -0
  11. package/api/notifications-api.ts +161 -0
  12. package/api.ts +39 -0
  13. package/base.ts +331 -0
  14. package/common.ts +198 -0
  15. package/configuration.ts +110 -0
  16. package/dist/api/default-api.d.ts +70 -0
  17. package/dist/api/default-api.js +200 -0
  18. package/dist/api/email-messages-api.d.ts +205 -0
  19. package/dist/api/email-messages-api.js +401 -0
  20. package/dist/api/email-tracking-api.d.ts +301 -0
  21. package/dist/api/email-tracking-api.js +520 -0
  22. package/dist/api/email-verifications-api.d.ts +146 -0
  23. package/dist/api/email-verifications-api.js +309 -0
  24. package/dist/api/layouts-api.d.ts +373 -0
  25. package/dist/api/layouts-api.js +624 -0
  26. package/dist/api/notification-templates-api.d.ts +382 -0
  27. package/dist/api/notification-templates-api.js +630 -0
  28. package/dist/api/notifications-api.d.ts +93 -0
  29. package/dist/api/notifications-api.js +220 -0
  30. package/dist/api.d.ts +18 -0
  31. package/dist/api.js +36 -0
  32. package/dist/base.d.ts +86 -0
  33. package/dist/base.js +367 -0
  34. package/dist/common.d.ts +91 -0
  35. package/dist/common.js +276 -0
  36. package/dist/configuration.d.ts +89 -0
  37. package/dist/configuration.js +52 -0
  38. package/dist/index.d.ts +15 -0
  39. package/dist/index.js +36 -0
  40. package/dist/models/complete-email-verification-dto.d.ts +30 -0
  41. package/dist/models/complete-email-verification-dto.js +15 -0
  42. package/dist/models/complete-email-verification-response-class.d.ts +24 -0
  43. package/dist/models/complete-email-verification-response-class.js +15 -0
  44. package/dist/models/create-layout-request-dto.d.ts +48 -0
  45. package/dist/models/create-layout-request-dto.js +15 -0
  46. package/dist/models/create-layout-response-class.d.ts +25 -0
  47. package/dist/models/create-layout-response-class.js +15 -0
  48. package/dist/models/create-notification-template-request-dto.d.ts +66 -0
  49. package/dist/models/create-notification-template-request-dto.js +15 -0
  50. package/dist/models/create-notification-template-response-class.d.ts +25 -0
  51. package/dist/models/create-notification-template-response-class.js +15 -0
  52. package/dist/models/delete-layout-request-dto.d.ts +24 -0
  53. package/dist/models/delete-layout-request-dto.js +15 -0
  54. package/dist/models/delete-notification-template-request-dto.d.ts +24 -0
  55. package/dist/models/delete-notification-template-request-dto.js +15 -0
  56. package/dist/models/download-attachment-response-class.d.ts +36 -0
  57. package/dist/models/download-attachment-response-class.js +15 -0
  58. package/dist/models/email-attachment-class.d.ts +84 -0
  59. package/dist/models/email-attachment-class.js +15 -0
  60. package/dist/models/email-message-class.d.ts +140 -0
  61. package/dist/models/email-message-class.js +27 -0
  62. package/dist/models/email-thread-class.d.ts +83 -0
  63. package/dist/models/email-thread-class.js +20 -0
  64. package/dist/models/get-email-message-response-class.d.ts +25 -0
  65. package/dist/models/get-email-message-response-class.js +15 -0
  66. package/dist/models/get-email-thread-response-class.d.ts +25 -0
  67. package/dist/models/get-email-thread-response-class.js +15 -0
  68. package/dist/models/get-layout-request-dto.d.ts +24 -0
  69. package/dist/models/get-layout-request-dto.js +15 -0
  70. package/dist/models/get-layout-response-class.d.ts +25 -0
  71. package/dist/models/get-layout-response-class.js +15 -0
  72. package/dist/models/get-notification-template-request-dto.d.ts +30 -0
  73. package/dist/models/get-notification-template-request-dto.js +15 -0
  74. package/dist/models/get-notification-template-response-class.d.ts +25 -0
  75. package/dist/models/get-notification-template-response-class.js +15 -0
  76. package/dist/models/html-template-class.d.ts +54 -0
  77. package/dist/models/html-template-class.js +15 -0
  78. package/dist/models/index.d.ts +38 -0
  79. package/dist/models/index.js +54 -0
  80. package/dist/models/initiate-email-verification-dto.d.ts +30 -0
  81. package/dist/models/initiate-email-verification-dto.js +15 -0
  82. package/dist/models/initiate-email-verification-response-class.d.ts +24 -0
  83. package/dist/models/initiate-email-verification-response-class.js +15 -0
  84. package/dist/models/inline-response200.d.ts +54 -0
  85. package/dist/models/inline-response200.js +15 -0
  86. package/dist/models/inline-response503.d.ts +54 -0
  87. package/dist/models/inline-response503.js +15 -0
  88. package/dist/models/layout-class.d.ts +73 -0
  89. package/dist/models/layout-class.js +15 -0
  90. package/dist/models/list-email-attachments-response-class.d.ts +25 -0
  91. package/dist/models/list-email-attachments-response-class.js +15 -0
  92. package/dist/models/list-email-messages-response-class.d.ts +43 -0
  93. package/dist/models/list-email-messages-response-class.js +15 -0
  94. package/dist/models/list-email-threads-response-class.d.ts +43 -0
  95. package/dist/models/list-email-threads-response-class.js +15 -0
  96. package/dist/models/list-layouts-response-class.d.ts +30 -0
  97. package/dist/models/list-layouts-response-class.js +15 -0
  98. package/dist/models/list-notification-templates-response-class.d.ts +30 -0
  99. package/dist/models/list-notification-templates-response-class.js +15 -0
  100. package/dist/models/notification-template-class.d.ts +98 -0
  101. package/dist/models/notification-template-class.js +15 -0
  102. package/dist/models/s3-document-dto.d.ts +36 -0
  103. package/dist/models/s3-document-dto.js +15 -0
  104. package/dist/models/send-notification-request-dto.d.ts +115 -0
  105. package/dist/models/send-notification-request-dto.js +21 -0
  106. package/dist/models/send-notification-response-class.d.ts +24 -0
  107. package/dist/models/send-notification-response-class.js +15 -0
  108. package/dist/models/update-html-template-request-dto.d.ts +42 -0
  109. package/dist/models/update-html-template-request-dto.js +21 -0
  110. package/dist/models/update-layout-request-dto.d.ts +55 -0
  111. package/dist/models/update-layout-request-dto.js +15 -0
  112. package/dist/models/update-layout-response-class.d.ts +25 -0
  113. package/dist/models/update-layout-response-class.js +15 -0
  114. package/dist/models/update-notification-template-request-dto.d.ts +73 -0
  115. package/dist/models/update-notification-template-request-dto.js +15 -0
  116. package/dist/models/update-notification-template-response-class.d.ts +25 -0
  117. package/dist/models/update-notification-template-response-class.js +15 -0
  118. package/git_push.sh +57 -0
  119. package/index.ts +19 -0
  120. package/models/complete-email-verification-dto.ts +36 -0
  121. package/models/complete-email-verification-response-class.ts +30 -0
  122. package/models/create-layout-request-dto.ts +54 -0
  123. package/models/create-layout-response-class.ts +31 -0
  124. package/models/create-notification-template-request-dto.ts +72 -0
  125. package/models/create-notification-template-response-class.ts +31 -0
  126. package/models/delete-layout-request-dto.ts +30 -0
  127. package/models/delete-notification-template-request-dto.ts +30 -0
  128. package/models/download-attachment-response-class.ts +42 -0
  129. package/models/email-attachment-class.ts +90 -0
  130. package/models/email-message-class.ts +150 -0
  131. package/models/email-thread-class.ts +92 -0
  132. package/models/get-email-message-response-class.ts +31 -0
  133. package/models/get-email-thread-response-class.ts +31 -0
  134. package/models/get-layout-request-dto.ts +30 -0
  135. package/models/get-layout-response-class.ts +31 -0
  136. package/models/get-notification-template-request-dto.ts +36 -0
  137. package/models/get-notification-template-response-class.ts +31 -0
  138. package/models/html-template-class.ts +60 -0
  139. package/models/index.ts +38 -0
  140. package/models/initiate-email-verification-dto.ts +36 -0
  141. package/models/initiate-email-verification-response-class.ts +30 -0
  142. package/models/inline-response200.ts +48 -0
  143. package/models/inline-response503.ts +48 -0
  144. package/models/layout-class.ts +79 -0
  145. package/models/list-email-attachments-response-class.ts +31 -0
  146. package/models/list-email-messages-response-class.ts +49 -0
  147. package/models/list-email-threads-response-class.ts +49 -0
  148. package/models/list-layouts-response-class.ts +36 -0
  149. package/models/list-notification-templates-response-class.ts +36 -0
  150. package/models/notification-template-class.ts +104 -0
  151. package/models/s3-document-dto.ts +42 -0
  152. package/models/send-notification-request-dto.ts +124 -0
  153. package/models/send-notification-response-class.ts +30 -0
  154. package/models/update-html-template-request-dto.ts +51 -0
  155. package/models/update-layout-request-dto.ts +61 -0
  156. package/models/update-layout-response-class.ts +31 -0
  157. package/models/update-notification-template-request-dto.ts +79 -0
  158. package/models/update-notification-template-response-class.ts +31 -0
  159. package/package.json +27 -0
  160. package/tsconfig.json +23 -0
@@ -0,0 +1,520 @@
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.EmailTrackingApi = exports.EmailTrackingApiFactory = exports.EmailTrackingApiFp = exports.EmailTrackingApiAxiosParamCreator = 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
+ * EmailTrackingApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var EmailTrackingApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * undefined **Required Permissions** none
97
+ * @param {string} code
98
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ closeThread: function (code, authorization, options) {
103
+ if (options === void 0) { options = {}; }
104
+ return __awaiter(_this, void 0, void 0, function () {
105
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ return __generator(this, function (_a) {
107
+ switch (_a.label) {
108
+ case 0:
109
+ // verify required parameter 'code' is not null or undefined
110
+ (0, common_1.assertParamExists)('closeThread', 'code', code);
111
+ localVarPath = "/notificationservice/v1/email-threads/{code}/close"
112
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ return [2 /*return*/, {
135
+ url: (0, common_1.toPathString)(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ }];
138
+ }
139
+ });
140
+ });
141
+ },
142
+ /**
143
+ * undefined **Required Permissions** none
144
+ * @param {string} code
145
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ getThread: function (code, authorization, options) {
150
+ if (options === void 0) { options = {}; }
151
+ return __awaiter(_this, void 0, void 0, function () {
152
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
153
+ return __generator(this, function (_a) {
154
+ switch (_a.label) {
155
+ case 0:
156
+ // verify required parameter 'code' is not null or undefined
157
+ (0, common_1.assertParamExists)('getThread', 'code', code);
158
+ localVarPath = "/notificationservice/v1/email-threads/{code}"
159
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
160
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
161
+ if (configuration) {
162
+ baseOptions = configuration.baseOptions;
163
+ baseAccessToken = configuration.accessToken;
164
+ }
165
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
166
+ localVarHeaderParameter = {};
167
+ localVarQueryParameter = {};
168
+ // authentication bearer required
169
+ // http bearer authentication required
170
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
171
+ case 1:
172
+ // authentication bearer required
173
+ // http bearer authentication required
174
+ _a.sent();
175
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
176
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
177
+ }
178
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
179
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
181
+ return [2 /*return*/, {
182
+ url: (0, common_1.toPathString)(localVarUrlObj),
183
+ options: localVarRequestOptions,
184
+ }];
185
+ }
186
+ });
187
+ });
188
+ },
189
+ /**
190
+ * undefined **Required Permissions** none
191
+ * @param {string} code
192
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ listMessages: function (code, authorization, options) {
197
+ if (options === void 0) { options = {}; }
198
+ return __awaiter(_this, void 0, void 0, function () {
199
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
200
+ return __generator(this, function (_a) {
201
+ switch (_a.label) {
202
+ case 0:
203
+ // verify required parameter 'code' is not null or undefined
204
+ (0, common_1.assertParamExists)('listMessages', 'code', code);
205
+ localVarPath = "/notificationservice/v1/email-threads/{code}/messages"
206
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
207
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
208
+ if (configuration) {
209
+ baseOptions = configuration.baseOptions;
210
+ baseAccessToken = configuration.accessToken;
211
+ }
212
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
213
+ localVarHeaderParameter = {};
214
+ localVarQueryParameter = {};
215
+ // authentication bearer required
216
+ // http bearer authentication required
217
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
218
+ case 1:
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ _a.sent();
222
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
223
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
224
+ }
225
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
226
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
227
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
228
+ return [2 /*return*/, {
229
+ url: (0, common_1.toPathString)(localVarUrlObj),
230
+ options: localVarRequestOptions,
231
+ }];
232
+ }
233
+ });
234
+ });
235
+ },
236
+ /**
237
+ * undefined **Required Permissions** none
238
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
239
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
240
+ * @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.
241
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
242
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
243
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
244
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
245
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ */
249
+ listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
250
+ if (options === void 0) { options = {}; }
251
+ return __awaiter(_this, void 0, void 0, function () {
252
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
253
+ return __generator(this, function (_a) {
254
+ switch (_a.label) {
255
+ case 0:
256
+ localVarPath = "/notificationservice/v1/email-threads";
257
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
258
+ if (configuration) {
259
+ baseOptions = configuration.baseOptions;
260
+ baseAccessToken = configuration.accessToken;
261
+ }
262
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
263
+ localVarHeaderParameter = {};
264
+ localVarQueryParameter = {};
265
+ // authentication bearer required
266
+ // http bearer authentication required
267
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
268
+ case 1:
269
+ // authentication bearer required
270
+ // http bearer authentication required
271
+ _a.sent();
272
+ if (pageSize !== undefined) {
273
+ localVarQueryParameter['pageSize'] = pageSize;
274
+ }
275
+ if (pageToken !== undefined) {
276
+ localVarQueryParameter['pageToken'] = pageToken;
277
+ }
278
+ if (filter !== undefined) {
279
+ localVarQueryParameter['filter'] = filter;
280
+ }
281
+ if (search !== undefined) {
282
+ localVarQueryParameter['search'] = search;
283
+ }
284
+ if (order !== undefined) {
285
+ localVarQueryParameter['order'] = order;
286
+ }
287
+ if (expand !== undefined) {
288
+ localVarQueryParameter['expand'] = expand;
289
+ }
290
+ if (filters !== undefined) {
291
+ localVarQueryParameter['filters'] = filters;
292
+ }
293
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
295
+ }
296
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
297
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
298
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
299
+ return [2 /*return*/, {
300
+ url: (0, common_1.toPathString)(localVarUrlObj),
301
+ options: localVarRequestOptions,
302
+ }];
303
+ }
304
+ });
305
+ });
306
+ },
307
+ };
308
+ };
309
+ exports.EmailTrackingApiAxiosParamCreator = EmailTrackingApiAxiosParamCreator;
310
+ /**
311
+ * EmailTrackingApi - functional programming interface
312
+ * @export
313
+ */
314
+ var EmailTrackingApiFp = function (configuration) {
315
+ var localVarAxiosParamCreator = (0, exports.EmailTrackingApiAxiosParamCreator)(configuration);
316
+ return {
317
+ /**
318
+ * undefined **Required Permissions** none
319
+ * @param {string} code
320
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
321
+ * @param {*} [options] Override http request option.
322
+ * @throws {RequiredError}
323
+ */
324
+ closeThread: function (code, authorization, options) {
325
+ return __awaiter(this, void 0, void 0, function () {
326
+ var localVarAxiosArgs;
327
+ return __generator(this, function (_a) {
328
+ switch (_a.label) {
329
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.closeThread(code, authorization, options)];
330
+ case 1:
331
+ localVarAxiosArgs = _a.sent();
332
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
333
+ }
334
+ });
335
+ });
336
+ },
337
+ /**
338
+ * undefined **Required Permissions** none
339
+ * @param {string} code
340
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ getThread: function (code, authorization, options) {
345
+ return __awaiter(this, void 0, void 0, function () {
346
+ var localVarAxiosArgs;
347
+ return __generator(this, function (_a) {
348
+ switch (_a.label) {
349
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getThread(code, authorization, options)];
350
+ case 1:
351
+ localVarAxiosArgs = _a.sent();
352
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
353
+ }
354
+ });
355
+ });
356
+ },
357
+ /**
358
+ * undefined **Required Permissions** none
359
+ * @param {string} code
360
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ */
364
+ listMessages: function (code, authorization, options) {
365
+ return __awaiter(this, void 0, void 0, function () {
366
+ var localVarAxiosArgs;
367
+ return __generator(this, function (_a) {
368
+ switch (_a.label) {
369
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listMessages(code, authorization, options)];
370
+ case 1:
371
+ localVarAxiosArgs = _a.sent();
372
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
373
+ }
374
+ });
375
+ });
376
+ },
377
+ /**
378
+ * undefined **Required Permissions** none
379
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
380
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
381
+ * @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.
382
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
383
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
384
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
385
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
386
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
391
+ return __awaiter(this, void 0, void 0, function () {
392
+ var localVarAxiosArgs;
393
+ return __generator(this, function (_a) {
394
+ switch (_a.label) {
395
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
396
+ case 1:
397
+ localVarAxiosArgs = _a.sent();
398
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
399
+ }
400
+ });
401
+ });
402
+ },
403
+ };
404
+ };
405
+ exports.EmailTrackingApiFp = EmailTrackingApiFp;
406
+ /**
407
+ * EmailTrackingApi - factory interface
408
+ * @export
409
+ */
410
+ var EmailTrackingApiFactory = function (configuration, basePath, axios) {
411
+ var localVarFp = (0, exports.EmailTrackingApiFp)(configuration);
412
+ return {
413
+ /**
414
+ * undefined **Required Permissions** none
415
+ * @param {string} code
416
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ closeThread: function (code, authorization, options) {
421
+ return localVarFp.closeThread(code, authorization, options).then(function (request) { return request(axios, basePath); });
422
+ },
423
+ /**
424
+ * undefined **Required Permissions** none
425
+ * @param {string} code
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
+ getThread: function (code, authorization, options) {
431
+ return localVarFp.getThread(code, authorization, options).then(function (request) { return request(axios, basePath); });
432
+ },
433
+ /**
434
+ * undefined **Required Permissions** none
435
+ * @param {string} code
436
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ */
440
+ listMessages: function (code, authorization, options) {
441
+ return localVarFp.listMessages(code, authorization, options).then(function (request) { return request(axios, basePath); });
442
+ },
443
+ /**
444
+ * undefined **Required Permissions** none
445
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
446
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
447
+ * @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.
448
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
449
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
450
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
451
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
452
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
457
+ return localVarFp.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
458
+ },
459
+ };
460
+ };
461
+ exports.EmailTrackingApiFactory = EmailTrackingApiFactory;
462
+ /**
463
+ * EmailTrackingApi - object-oriented interface
464
+ * @export
465
+ * @class EmailTrackingApi
466
+ * @extends {BaseAPI}
467
+ */
468
+ var EmailTrackingApi = /** @class */ (function (_super) {
469
+ __extends(EmailTrackingApi, _super);
470
+ function EmailTrackingApi() {
471
+ return _super !== null && _super.apply(this, arguments) || this;
472
+ }
473
+ /**
474
+ * undefined **Required Permissions** none
475
+ * @param {EmailTrackingApiCloseThreadRequest} requestParameters Request parameters.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ * @memberof EmailTrackingApi
479
+ */
480
+ EmailTrackingApi.prototype.closeThread = function (requestParameters, options) {
481
+ var _this = this;
482
+ return (0, exports.EmailTrackingApiFp)(this.configuration).closeThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
483
+ };
484
+ /**
485
+ * undefined **Required Permissions** none
486
+ * @param {EmailTrackingApiGetThreadRequest} requestParameters Request parameters.
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ * @memberof EmailTrackingApi
490
+ */
491
+ EmailTrackingApi.prototype.getThread = function (requestParameters, options) {
492
+ var _this = this;
493
+ return (0, exports.EmailTrackingApiFp)(this.configuration).getThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
494
+ };
495
+ /**
496
+ * undefined **Required Permissions** none
497
+ * @param {EmailTrackingApiListMessagesRequest} requestParameters Request parameters.
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ * @memberof EmailTrackingApi
501
+ */
502
+ EmailTrackingApi.prototype.listMessages = function (requestParameters, options) {
503
+ var _this = this;
504
+ return (0, exports.EmailTrackingApiFp)(this.configuration).listMessages(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
505
+ };
506
+ /**
507
+ * undefined **Required Permissions** none
508
+ * @param {EmailTrackingApiListThreadsRequest} requestParameters Request parameters.
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ * @memberof EmailTrackingApi
512
+ */
513
+ EmailTrackingApi.prototype.listThreads = function (requestParameters, options) {
514
+ var _this = this;
515
+ if (requestParameters === void 0) { requestParameters = {}; }
516
+ return (0, exports.EmailTrackingApiFp)(this.configuration).listThreads(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); });
517
+ };
518
+ return EmailTrackingApi;
519
+ }(base_1.BaseAPI));
520
+ exports.EmailTrackingApi = EmailTrackingApi;