@emilgroup/notification-sdk-node 1.0.0-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 (100) hide show
  1. package/.openapi-generator/FILES +38 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +68 -0
  5. package/api/layouts-api.ts +663 -0
  6. package/api/notification-templates-api.ts +677 -0
  7. package/api/notifications-api.ts +165 -0
  8. package/api.ts +35 -0
  9. package/base.ts +284 -0
  10. package/common.ts +199 -0
  11. package/configuration.ts +109 -0
  12. package/dist/api/layouts-api.d.ts +364 -0
  13. package/dist/api/layouts-api.js +622 -0
  14. package/dist/api/notification-templates-api.d.ts +373 -0
  15. package/dist/api/notification-templates-api.js +628 -0
  16. package/dist/api/notifications-api.d.ts +93 -0
  17. package/dist/api/notifications-api.js +224 -0
  18. package/dist/api.d.ts +14 -0
  19. package/dist/api.js +32 -0
  20. package/dist/base.d.ts +77 -0
  21. package/dist/base.js +393 -0
  22. package/dist/common.d.ts +92 -0
  23. package/dist/common.js +277 -0
  24. package/dist/configuration.d.ts +90 -0
  25. package/dist/configuration.js +44 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.js +36 -0
  28. package/dist/models/create-layout-request-dto.d.ts +48 -0
  29. package/dist/models/create-layout-request-dto.js +15 -0
  30. package/dist/models/create-layout-response-class.d.ts +25 -0
  31. package/dist/models/create-layout-response-class.js +15 -0
  32. package/dist/models/create-notification-template-request-dto.d.ts +66 -0
  33. package/dist/models/create-notification-template-request-dto.js +15 -0
  34. package/dist/models/create-notification-template-response-class.d.ts +25 -0
  35. package/dist/models/create-notification-template-response-class.js +15 -0
  36. package/dist/models/delete-layout-request-dto.d.ts +24 -0
  37. package/dist/models/delete-layout-request-dto.js +15 -0
  38. package/dist/models/delete-notification-template-request-dto.d.ts +24 -0
  39. package/dist/models/delete-notification-template-request-dto.js +15 -0
  40. package/dist/models/get-layout-request-dto.d.ts +24 -0
  41. package/dist/models/get-layout-request-dto.js +15 -0
  42. package/dist/models/get-layout-response-class.d.ts +25 -0
  43. package/dist/models/get-layout-response-class.js +15 -0
  44. package/dist/models/get-notification-template-request-dto.d.ts +30 -0
  45. package/dist/models/get-notification-template-request-dto.js +15 -0
  46. package/dist/models/get-notification-template-response-class.d.ts +25 -0
  47. package/dist/models/get-notification-template-response-class.js +15 -0
  48. package/dist/models/html-template-class.d.ts +60 -0
  49. package/dist/models/html-template-class.js +15 -0
  50. package/dist/models/index.d.ts +22 -0
  51. package/dist/models/index.js +38 -0
  52. package/dist/models/layout-class.d.ts +73 -0
  53. package/dist/models/layout-class.js +15 -0
  54. package/dist/models/list-layouts-response-class.d.ts +30 -0
  55. package/dist/models/list-layouts-response-class.js +15 -0
  56. package/dist/models/list-notification-templates-response-class.d.ts +30 -0
  57. package/dist/models/list-notification-templates-response-class.js +15 -0
  58. package/dist/models/notification-template-class.d.ts +98 -0
  59. package/dist/models/notification-template-class.js +15 -0
  60. package/dist/models/send-notification-request-dto.d.ts +66 -0
  61. package/dist/models/send-notification-request-dto.js +15 -0
  62. package/dist/models/send-notification-response-class.d.ts +24 -0
  63. package/dist/models/send-notification-response-class.js +15 -0
  64. package/dist/models/update-html-template-request-dto.d.ts +42 -0
  65. package/dist/models/update-html-template-request-dto.js +21 -0
  66. package/dist/models/update-layout-request-dto.d.ts +55 -0
  67. package/dist/models/update-layout-request-dto.js +15 -0
  68. package/dist/models/update-layout-response-class.d.ts +25 -0
  69. package/dist/models/update-layout-response-class.js +15 -0
  70. package/dist/models/update-notification-template-request-dto.d.ts +73 -0
  71. package/dist/models/update-notification-template-request-dto.js +15 -0
  72. package/dist/models/update-notification-template-response-class.d.ts +25 -0
  73. package/dist/models/update-notification-template-response-class.js +15 -0
  74. package/git_push.sh +57 -0
  75. package/index.ts +19 -0
  76. package/models/create-layout-request-dto.ts +54 -0
  77. package/models/create-layout-response-class.ts +31 -0
  78. package/models/create-notification-template-request-dto.ts +72 -0
  79. package/models/create-notification-template-response-class.ts +31 -0
  80. package/models/delete-layout-request-dto.ts +30 -0
  81. package/models/delete-notification-template-request-dto.ts +30 -0
  82. package/models/get-layout-request-dto.ts +30 -0
  83. package/models/get-layout-response-class.ts +31 -0
  84. package/models/get-notification-template-request-dto.ts +36 -0
  85. package/models/get-notification-template-response-class.ts +31 -0
  86. package/models/html-template-class.ts +66 -0
  87. package/models/index.ts +22 -0
  88. package/models/layout-class.ts +79 -0
  89. package/models/list-layouts-response-class.ts +36 -0
  90. package/models/list-notification-templates-response-class.ts +36 -0
  91. package/models/notification-template-class.ts +104 -0
  92. package/models/send-notification-request-dto.ts +72 -0
  93. package/models/send-notification-response-class.ts +30 -0
  94. package/models/update-html-template-request-dto.ts +51 -0
  95. package/models/update-layout-request-dto.ts +61 -0
  96. package/models/update-layout-response-class.ts +31 -0
  97. package/models/update-notification-template-request-dto.ts +79 -0
  98. package/models/update-notification-template-response-class.ts +31 -0
  99. package/package.json +29 -0
  100. package/tsconfig.json +22 -0
@@ -0,0 +1,622 @@
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
+ *
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
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * LayoutsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var LayoutsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ *
101
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
102
+ * @param {string} [authorization] Bearer Token
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ createLayout: function (createLayoutRequestDto, authorization, options) {
107
+ if (options === void 0) { options = {}; }
108
+ return __awaiter(_this, void 0, void 0, function () {
109
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0:
113
+ // verify required parameter 'createLayoutRequestDto' is not null or undefined
114
+ (0, common_1.assertParamExists)('createLayout', 'createLayoutRequestDto', createLayoutRequestDto);
115
+ localVarPath = "/notificationservice/v1/layouts";
116
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
117
+ if (configuration) {
118
+ baseOptions = configuration.baseOptions;
119
+ baseAccessToken = configuration.accessToken;
120
+ }
121
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
122
+ localVarHeaderParameter = {};
123
+ localVarQueryParameter = {};
124
+ // authentication bearer required
125
+ // http bearer authentication required
126
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
127
+ case 1:
128
+ // authentication bearer required
129
+ // http bearer authentication required
130
+ _a.sent();
131
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
132
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
133
+ }
134
+ localVarHeaderParameter['Content-Type'] = 'application/json';
135
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
136
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLayoutRequestDto, localVarRequestOptions, configuration);
139
+ return [2 /*return*/, {
140
+ url: (0, common_1.toPathString)(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ }];
143
+ }
144
+ });
145
+ });
146
+ },
147
+ /**
148
+ *
149
+ * @param {number} id
150
+ * @param {string} [authorization] Bearer Token
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ deleteLayout: function (id, authorization, options) {
155
+ if (options === void 0) { options = {}; }
156
+ return __awaiter(_this, void 0, void 0, function () {
157
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
158
+ return __generator(this, function (_a) {
159
+ switch (_a.label) {
160
+ case 0:
161
+ // verify required parameter 'id' is not null or undefined
162
+ (0, common_1.assertParamExists)('deleteLayout', 'id', id);
163
+ localVarPath = "/notificationservice/v1/layouts/{id}"
164
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
165
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
166
+ if (configuration) {
167
+ baseOptions = configuration.baseOptions;
168
+ baseAccessToken = configuration.accessToken;
169
+ }
170
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, 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 (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
181
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
182
+ }
183
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
184
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
185
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
186
+ return [2 /*return*/, {
187
+ url: (0, common_1.toPathString)(localVarUrlObj),
188
+ options: localVarRequestOptions,
189
+ }];
190
+ }
191
+ });
192
+ });
193
+ },
194
+ /**
195
+ *
196
+ * @param {number} id
197
+ * @param {number} id2 Layout id
198
+ * @param {string} [authorization] Bearer Token
199
+ * @param {*} [options] Override http request option.
200
+ * @throws {RequiredError}
201
+ */
202
+ getLayout: function (id, id2, authorization, options) {
203
+ if (options === void 0) { options = {}; }
204
+ return __awaiter(_this, void 0, void 0, function () {
205
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
206
+ return __generator(this, function (_a) {
207
+ switch (_a.label) {
208
+ case 0:
209
+ // verify required parameter 'id' is not null or undefined
210
+ (0, common_1.assertParamExists)('getLayout', 'id', id);
211
+ // verify required parameter 'id2' is not null or undefined
212
+ (0, common_1.assertParamExists)('getLayout', 'id2', id2);
213
+ localVarPath = "/notificationservice/v1/layouts/{id}"
214
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
215
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ baseAccessToken = configuration.accessToken;
219
+ }
220
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
221
+ localVarHeaderParameter = {};
222
+ localVarQueryParameter = {};
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
226
+ case 1:
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ _a.sent();
230
+ if (id2 !== undefined) {
231
+ localVarQueryParameter['id'] = id2;
232
+ }
233
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
234
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
235
+ }
236
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
237
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
238
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
239
+ return [2 /*return*/, {
240
+ url: (0, common_1.toPathString)(localVarUrlObj),
241
+ options: localVarRequestOptions,
242
+ }];
243
+ }
244
+ });
245
+ });
246
+ },
247
+ /**
248
+ *
249
+ * @param {string} [authorization] Bearer Token
250
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
251
+ * @param {any} [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.
252
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
253
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
254
+ * @param {any} [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.
255
+ * @param {any} [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.
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ */
259
+ listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
260
+ if (options === void 0) { options = {}; }
261
+ return __awaiter(_this, void 0, void 0, function () {
262
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
263
+ return __generator(this, function (_a) {
264
+ switch (_a.label) {
265
+ case 0:
266
+ localVarPath = "/notificationservice/v1/layouts";
267
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
268
+ if (configuration) {
269
+ baseOptions = configuration.baseOptions;
270
+ baseAccessToken = configuration.accessToken;
271
+ }
272
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
273
+ localVarHeaderParameter = {};
274
+ localVarQueryParameter = {};
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
278
+ case 1:
279
+ // authentication bearer required
280
+ // http bearer authentication required
281
+ _a.sent();
282
+ if (pageSize !== undefined) {
283
+ localVarQueryParameter['pageSize'] = pageSize;
284
+ }
285
+ if (pageToken !== undefined) {
286
+ localVarQueryParameter['pageToken'] = pageToken;
287
+ }
288
+ if (filter !== undefined) {
289
+ localVarQueryParameter['filter'] = filter;
290
+ }
291
+ if (search !== undefined) {
292
+ localVarQueryParameter['search'] = search;
293
+ }
294
+ if (order !== undefined) {
295
+ localVarQueryParameter['order'] = order;
296
+ }
297
+ if (expand !== undefined) {
298
+ localVarQueryParameter['expand'] = expand;
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
+ *
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_1.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
+ *
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
+ *
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
+ *
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
+ *
439
+ * @param {string} [authorization] Bearer Token
440
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
441
+ * @param {any} [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 {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
443
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
444
+ * @param {any} [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 {any} [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 {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
450
+ return __awaiter(this, void 0, void 0, function () {
451
+ var localVarAxiosArgs;
452
+ return __generator(this, function (_a) {
453
+ switch (_a.label) {
454
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, options)];
455
+ case 1:
456
+ localVarAxiosArgs = _a.sent();
457
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
458
+ }
459
+ });
460
+ });
461
+ },
462
+ /**
463
+ *
464
+ * @param {number} id
465
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
466
+ * @param {string} [authorization] Bearer Token
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ */
470
+ updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
471
+ return __awaiter(this, void 0, void 0, function () {
472
+ var localVarAxiosArgs;
473
+ return __generator(this, function (_a) {
474
+ switch (_a.label) {
475
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLayout(id, updateLayoutRequestDto, authorization, options)];
476
+ case 1:
477
+ localVarAxiosArgs = _a.sent();
478
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
479
+ }
480
+ });
481
+ });
482
+ },
483
+ };
484
+ };
485
+ exports.LayoutsApiFp = LayoutsApiFp;
486
+ /**
487
+ * LayoutsApi - factory interface
488
+ * @export
489
+ */
490
+ var LayoutsApiFactory = function (configuration, basePath, axios) {
491
+ var localVarFp = (0, exports.LayoutsApiFp)(configuration);
492
+ return {
493
+ /**
494
+ *
495
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
496
+ * @param {string} [authorization] Bearer Token
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ createLayout: function (createLayoutRequestDto, authorization, options) {
501
+ return localVarFp.createLayout(createLayoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
502
+ },
503
+ /**
504
+ *
505
+ * @param {number} id
506
+ * @param {string} [authorization] Bearer Token
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ deleteLayout: function (id, authorization, options) {
511
+ return localVarFp.deleteLayout(id, authorization, options).then(function (request) { return request(axios, basePath); });
512
+ },
513
+ /**
514
+ *
515
+ * @param {number} id
516
+ * @param {number} id2 Layout id
517
+ * @param {string} [authorization] Bearer Token
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ getLayout: function (id, id2, authorization, options) {
522
+ return localVarFp.getLayout(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
523
+ },
524
+ /**
525
+ *
526
+ * @param {string} [authorization] Bearer Token
527
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
528
+ * @param {any} [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.
529
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
530
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
531
+ * @param {any} [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.
532
+ * @param {any} [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.
533
+ * @param {*} [options] Override http request option.
534
+ * @throws {RequiredError}
535
+ */
536
+ listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
537
+ return localVarFp.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
538
+ },
539
+ /**
540
+ *
541
+ * @param {number} id
542
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
543
+ * @param {string} [authorization] Bearer Token
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
548
+ return localVarFp.updateLayout(id, updateLayoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
549
+ },
550
+ };
551
+ };
552
+ exports.LayoutsApiFactory = LayoutsApiFactory;
553
+ /**
554
+ * LayoutsApi - object-oriented interface
555
+ * @export
556
+ * @class LayoutsApi
557
+ * @extends {BaseAPI}
558
+ */
559
+ var LayoutsApi = /** @class */ (function (_super) {
560
+ __extends(LayoutsApi, _super);
561
+ function LayoutsApi() {
562
+ return _super !== null && _super.apply(this, arguments) || this;
563
+ }
564
+ /**
565
+ *
566
+ * @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ * @memberof LayoutsApi
570
+ */
571
+ LayoutsApi.prototype.createLayout = function (requestParameters, options) {
572
+ var _this = this;
573
+ return (0, exports.LayoutsApiFp)(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
574
+ };
575
+ /**
576
+ *
577
+ * @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ * @memberof LayoutsApi
581
+ */
582
+ LayoutsApi.prototype.deleteLayout = function (requestParameters, options) {
583
+ var _this = this;
584
+ return (0, exports.LayoutsApiFp)(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
585
+ };
586
+ /**
587
+ *
588
+ * @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ * @memberof LayoutsApi
592
+ */
593
+ LayoutsApi.prototype.getLayout = function (requestParameters, options) {
594
+ var _this = this;
595
+ return (0, exports.LayoutsApiFp)(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
596
+ };
597
+ /**
598
+ *
599
+ * @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ * @memberof LayoutsApi
603
+ */
604
+ LayoutsApi.prototype.listLayouts = function (requestParameters, options) {
605
+ var _this = this;
606
+ if (requestParameters === void 0) { requestParameters = {}; }
607
+ return (0, exports.LayoutsApiFp)(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
608
+ };
609
+ /**
610
+ *
611
+ * @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ * @memberof LayoutsApi
615
+ */
616
+ LayoutsApi.prototype.updateLayout = function (requestParameters, options) {
617
+ var _this = this;
618
+ return (0, exports.LayoutsApiFp)(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
619
+ };
620
+ return LayoutsApi;
621
+ }(base_1.BaseAPI));
622
+ exports.LayoutsApi = LayoutsApi;