@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,624 @@
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.LayoutsApi = exports.LayoutsApiFactory = exports.LayoutsApiFp = exports.LayoutsApiAxiosParamCreator = 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
+ * LayoutsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var LayoutsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
97
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
98
+ * @param {string} [authorization] Bearer Token
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ createLayout: function (createLayoutRequestDto, 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 'createLayoutRequestDto' is not null or undefined
110
+ (0, common_1.assertParamExists)('createLayout', 'createLayoutRequestDto', createLayoutRequestDto);
111
+ localVarPath = "/notificationservice/v1/layouts";
112
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ baseAccessToken = configuration.accessToken;
116
+ }
117
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
118
+ localVarHeaderParameter = {};
119
+ localVarQueryParameter = {};
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ case 1:
124
+ // authentication bearer required
125
+ // http bearer authentication required
126
+ _a.sent();
127
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
128
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
129
+ }
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
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
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLayoutRequestDto, localVarRequestOptions, configuration);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
143
+ /**
144
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
145
+ * @param {number} id
146
+ * @param {string} [authorization] Bearer Token
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ */
150
+ deleteLayout: function (id, authorization, options) {
151
+ if (options === void 0) { options = {}; }
152
+ return __awaiter(_this, void 0, void 0, function () {
153
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0:
157
+ // verify required parameter 'id' is not null or undefined
158
+ (0, common_1.assertParamExists)('deleteLayout', 'id', id);
159
+ localVarPath = "/notificationservice/v1/layouts/{id}"
160
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
161
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
162
+ if (configuration) {
163
+ baseOptions = configuration.baseOptions;
164
+ baseAccessToken = configuration.accessToken;
165
+ }
166
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
167
+ localVarHeaderParameter = {};
168
+ localVarQueryParameter = {};
169
+ // authentication bearer required
170
+ // http bearer authentication required
171
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
172
+ case 1:
173
+ // authentication bearer required
174
+ // http bearer authentication required
175
+ _a.sent();
176
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
177
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
178
+ }
179
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
180
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
182
+ return [2 /*return*/, {
183
+ url: (0, common_1.toPathString)(localVarUrlObj),
184
+ options: localVarRequestOptions,
185
+ }];
186
+ }
187
+ });
188
+ });
189
+ },
190
+ /**
191
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
192
+ * @param {number} id
193
+ * @param {number} id2 Layout id
194
+ * @param {string} [authorization] Bearer Token
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ getLayout: function (id, id2, authorization, options) {
199
+ if (options === void 0) { options = {}; }
200
+ return __awaiter(_this, void 0, void 0, function () {
201
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
202
+ return __generator(this, function (_a) {
203
+ switch (_a.label) {
204
+ case 0:
205
+ // verify required parameter 'id' is not null or undefined
206
+ (0, common_1.assertParamExists)('getLayout', 'id', id);
207
+ // verify required parameter 'id2' is not null or undefined
208
+ (0, common_1.assertParamExists)('getLayout', 'id2', id2);
209
+ localVarPath = "/notificationservice/v1/layouts/{id}"
210
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
211
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ baseAccessToken = configuration.accessToken;
215
+ }
216
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
217
+ localVarHeaderParameter = {};
218
+ localVarQueryParameter = {};
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
222
+ case 1:
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ _a.sent();
226
+ if (id2 !== undefined) {
227
+ localVarQueryParameter['id'] = id2;
228
+ }
229
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
230
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
231
+ }
232
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
233
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
234
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
235
+ return [2 /*return*/, {
236
+ url: (0, common_1.toPathString)(localVarUrlObj),
237
+ options: localVarRequestOptions,
238
+ }];
239
+ }
240
+ });
241
+ });
242
+ },
243
+ /**
244
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
245
+ * @param {string} [authorization] Bearer Token
246
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
247
+ * @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.
248
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
249
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
250
+ * @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.
251
+ * @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.
252
+ * @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.
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
257
+ if (options === void 0) { options = {}; }
258
+ return __awaiter(_this, void 0, void 0, function () {
259
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
260
+ return __generator(this, function (_a) {
261
+ switch (_a.label) {
262
+ case 0:
263
+ localVarPath = "/notificationservice/v1/layouts";
264
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
265
+ if (configuration) {
266
+ baseOptions = configuration.baseOptions;
267
+ baseAccessToken = configuration.accessToken;
268
+ }
269
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
270
+ localVarHeaderParameter = {};
271
+ localVarQueryParameter = {};
272
+ // authentication bearer required
273
+ // http bearer authentication required
274
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
275
+ case 1:
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ _a.sent();
279
+ if (pageSize !== undefined) {
280
+ localVarQueryParameter['pageSize'] = pageSize;
281
+ }
282
+ if (pageToken !== undefined) {
283
+ localVarQueryParameter['pageToken'] = pageToken;
284
+ }
285
+ if (filter !== undefined) {
286
+ localVarQueryParameter['filter'] = filter;
287
+ }
288
+ if (search !== undefined) {
289
+ localVarQueryParameter['search'] = search;
290
+ }
291
+ if (order !== undefined) {
292
+ localVarQueryParameter['order'] = order;
293
+ }
294
+ if (expand !== undefined) {
295
+ localVarQueryParameter['expand'] = expand;
296
+ }
297
+ if (filters !== undefined) {
298
+ localVarQueryParameter['filters'] = filters;
299
+ }
300
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
301
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
302
+ }
303
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
304
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
305
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
306
+ return [2 /*return*/, {
307
+ url: (0, common_1.toPathString)(localVarUrlObj),
308
+ options: localVarRequestOptions,
309
+ }];
310
+ }
311
+ });
312
+ });
313
+ },
314
+ /**
315
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
316
+ * @param {number} id
317
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
318
+ * @param {string} [authorization] Bearer Token
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
323
+ if (options === void 0) { options = {}; }
324
+ return __awaiter(_this, void 0, void 0, function () {
325
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
326
+ return __generator(this, function (_a) {
327
+ switch (_a.label) {
328
+ case 0:
329
+ // verify required parameter 'id' is not null or undefined
330
+ (0, common_1.assertParamExists)('updateLayout', 'id', id);
331
+ // verify required parameter 'updateLayoutRequestDto' is not null or undefined
332
+ (0, common_1.assertParamExists)('updateLayout', 'updateLayoutRequestDto', updateLayoutRequestDto);
333
+ localVarPath = "/notificationservice/v1/layouts/{id}"
334
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
335
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
336
+ if (configuration) {
337
+ baseOptions = configuration.baseOptions;
338
+ baseAccessToken = configuration.accessToken;
339
+ }
340
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
341
+ localVarHeaderParameter = {};
342
+ localVarQueryParameter = {};
343
+ // authentication bearer required
344
+ // http bearer authentication required
345
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
346
+ case 1:
347
+ // authentication bearer required
348
+ // http bearer authentication required
349
+ _a.sent();
350
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
351
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
352
+ }
353
+ localVarHeaderParameter['Content-Type'] = 'application/json';
354
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
355
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
356
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
357
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLayoutRequestDto, localVarRequestOptions, configuration);
358
+ return [2 /*return*/, {
359
+ url: (0, common_1.toPathString)(localVarUrlObj),
360
+ options: localVarRequestOptions,
361
+ }];
362
+ }
363
+ });
364
+ });
365
+ },
366
+ };
367
+ };
368
+ exports.LayoutsApiAxiosParamCreator = LayoutsApiAxiosParamCreator;
369
+ /**
370
+ * LayoutsApi - functional programming interface
371
+ * @export
372
+ */
373
+ var LayoutsApiFp = function (configuration) {
374
+ var localVarAxiosParamCreator = (0, exports.LayoutsApiAxiosParamCreator)(configuration);
375
+ return {
376
+ /**
377
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
378
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
379
+ * @param {string} [authorization] Bearer Token
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ createLayout: function (createLayoutRequestDto, authorization, options) {
384
+ return __awaiter(this, void 0, void 0, function () {
385
+ var localVarAxiosArgs;
386
+ return __generator(this, function (_a) {
387
+ switch (_a.label) {
388
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLayout(createLayoutRequestDto, authorization, options)];
389
+ case 1:
390
+ localVarAxiosArgs = _a.sent();
391
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
392
+ }
393
+ });
394
+ });
395
+ },
396
+ /**
397
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
398
+ * @param {number} id
399
+ * @param {string} [authorization] Bearer Token
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ deleteLayout: function (id, authorization, options) {
404
+ return __awaiter(this, void 0, void 0, function () {
405
+ var localVarAxiosArgs;
406
+ return __generator(this, function (_a) {
407
+ switch (_a.label) {
408
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteLayout(id, authorization, options)];
409
+ case 1:
410
+ localVarAxiosArgs = _a.sent();
411
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
412
+ }
413
+ });
414
+ });
415
+ },
416
+ /**
417
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
418
+ * @param {number} id
419
+ * @param {number} id2 Layout id
420
+ * @param {string} [authorization] Bearer Token
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ getLayout: function (id, id2, authorization, options) {
425
+ return __awaiter(this, void 0, void 0, function () {
426
+ var localVarAxiosArgs;
427
+ return __generator(this, function (_a) {
428
+ switch (_a.label) {
429
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLayout(id, id2, authorization, options)];
430
+ case 1:
431
+ localVarAxiosArgs = _a.sent();
432
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
433
+ }
434
+ });
435
+ });
436
+ },
437
+ /**
438
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
439
+ * @param {string} [authorization] Bearer Token
440
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
441
+ * @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.
442
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
443
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
444
+ * @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.
445
+ * @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.
446
+ * @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.
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
451
+ return __awaiter(this, void 0, void 0, function () {
452
+ var localVarAxiosArgs;
453
+ return __generator(this, function (_a) {
454
+ switch (_a.label) {
455
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
456
+ case 1:
457
+ localVarAxiosArgs = _a.sent();
458
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
459
+ }
460
+ });
461
+ });
462
+ },
463
+ /**
464
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
465
+ * @param {number} id
466
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
467
+ * @param {string} [authorization] Bearer Token
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ */
471
+ updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
472
+ return __awaiter(this, void 0, void 0, function () {
473
+ var localVarAxiosArgs;
474
+ return __generator(this, function (_a) {
475
+ switch (_a.label) {
476
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLayout(id, updateLayoutRequestDto, authorization, options)];
477
+ case 1:
478
+ localVarAxiosArgs = _a.sent();
479
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
480
+ }
481
+ });
482
+ });
483
+ },
484
+ };
485
+ };
486
+ exports.LayoutsApiFp = LayoutsApiFp;
487
+ /**
488
+ * LayoutsApi - factory interface
489
+ * @export
490
+ */
491
+ var LayoutsApiFactory = function (configuration, basePath, axios) {
492
+ var localVarFp = (0, exports.LayoutsApiFp)(configuration);
493
+ return {
494
+ /**
495
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
496
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
497
+ * @param {string} [authorization] Bearer Token
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ */
501
+ createLayout: function (createLayoutRequestDto, authorization, options) {
502
+ return localVarFp.createLayout(createLayoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
503
+ },
504
+ /**
505
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
506
+ * @param {number} id
507
+ * @param {string} [authorization] Bearer Token
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ deleteLayout: function (id, authorization, options) {
512
+ return localVarFp.deleteLayout(id, authorization, options).then(function (request) { return request(axios, basePath); });
513
+ },
514
+ /**
515
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
516
+ * @param {number} id
517
+ * @param {number} id2 Layout id
518
+ * @param {string} [authorization] Bearer Token
519
+ * @param {*} [options] Override http request option.
520
+ * @throws {RequiredError}
521
+ */
522
+ getLayout: function (id, id2, authorization, options) {
523
+ return localVarFp.getLayout(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
524
+ },
525
+ /**
526
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
527
+ * @param {string} [authorization] Bearer Token
528
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
529
+ * @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.
530
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
531
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
532
+ * @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.
533
+ * @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.
534
+ * @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.
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
539
+ return localVarFp.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
540
+ },
541
+ /**
542
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
543
+ * @param {number} id
544
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
545
+ * @param {string} [authorization] Bearer Token
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
550
+ return localVarFp.updateLayout(id, updateLayoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
551
+ },
552
+ };
553
+ };
554
+ exports.LayoutsApiFactory = LayoutsApiFactory;
555
+ /**
556
+ * LayoutsApi - object-oriented interface
557
+ * @export
558
+ * @class LayoutsApi
559
+ * @extends {BaseAPI}
560
+ */
561
+ var LayoutsApi = /** @class */ (function (_super) {
562
+ __extends(LayoutsApi, _super);
563
+ function LayoutsApi() {
564
+ return _super !== null && _super.apply(this, arguments) || this;
565
+ }
566
+ /**
567
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
568
+ * @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ * @memberof LayoutsApi
572
+ */
573
+ LayoutsApi.prototype.createLayout = function (requestParameters, options) {
574
+ var _this = this;
575
+ return (0, exports.LayoutsApiFp)(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
576
+ };
577
+ /**
578
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
579
+ * @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
580
+ * @param {*} [options] Override http request option.
581
+ * @throws {RequiredError}
582
+ * @memberof LayoutsApi
583
+ */
584
+ LayoutsApi.prototype.deleteLayout = function (requestParameters, options) {
585
+ var _this = this;
586
+ return (0, exports.LayoutsApiFp)(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
587
+ };
588
+ /**
589
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
590
+ * @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
591
+ * @param {*} [options] Override http request option.
592
+ * @throws {RequiredError}
593
+ * @memberof LayoutsApi
594
+ */
595
+ LayoutsApi.prototype.getLayout = function (requestParameters, options) {
596
+ var _this = this;
597
+ return (0, exports.LayoutsApiFp)(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
598
+ };
599
+ /**
600
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
601
+ * @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ * @memberof LayoutsApi
605
+ */
606
+ LayoutsApi.prototype.listLayouts = function (requestParameters, options) {
607
+ var _this = this;
608
+ if (requestParameters === void 0) { requestParameters = {}; }
609
+ return (0, exports.LayoutsApiFp)(this.configuration).listLayouts(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); });
610
+ };
611
+ /**
612
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
613
+ * @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ * @memberof LayoutsApi
617
+ */
618
+ LayoutsApi.prototype.updateLayout = function (requestParameters, options) {
619
+ var _this = this;
620
+ return (0, exports.LayoutsApiFp)(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
621
+ };
622
+ return LayoutsApi;
623
+ }(base_1.BaseAPI));
624
+ exports.LayoutsApi = LayoutsApi;