@emilgroup/customer-sdk-node 1.57.1-beta.12 → 1.57.1-beta.14

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.
@@ -1,2168 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL CustomerService
6
- * The EMIL CustomerService 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.CustomerControllerRestApi = exports.CustomerControllerRestApiFactory = exports.CustomerControllerRestApiFp = exports.CustomerControllerRestApiAxiosParamCreator = 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
- * CustomerControllerRestApi - axios parameter creator
94
- * @export
95
- */
96
- var CustomerControllerRestApiAxiosParamCreator = function (configuration) {
97
- var _this = this;
98
- return {
99
- /**
100
- * Change customer\'s email using the token provided by the request email change endpoint.
101
- * @summary Change customer email
102
- * @param {ChangeCustomerEmailRequestDto} changeCustomerEmailRequestDto
103
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
- * @param {*} [options] Override http request option.
105
- * @throws {RequiredError}
106
- */
107
- changeCustomerEmail: function (changeCustomerEmailRequestDto, authorization, options) {
108
- if (options === void 0) { options = {}; }
109
- return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
- return __generator(this, function (_a) {
112
- // verify required parameter 'changeCustomerEmailRequestDto' is not null or undefined
113
- (0, common_1.assertParamExists)('changeCustomerEmail', 'changeCustomerEmailRequestDto', changeCustomerEmailRequestDto);
114
- localVarPath = "/v1/customers/change-email";
115
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
116
- if (configuration) {
117
- baseOptions = configuration.baseOptions;
118
- baseAccessToken = configuration.accessToken;
119
- }
120
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
121
- localVarHeaderParameter = {};
122
- localVarQueryParameter = {};
123
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
124
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
125
- }
126
- localVarHeaderParameter['Content-Type'] = 'application/json';
127
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
128
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
129
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
130
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(changeCustomerEmailRequestDto, localVarRequestOptions, configuration);
131
- return [2 /*return*/, {
132
- url: (0, common_1.toPathString)(localVarUrlObj),
133
- options: localVarRequestOptions,
134
- }];
135
- });
136
- });
137
- },
138
- /**
139
- * Change the customer password. Please use forgot-password endpoint if current password is lost.
140
- * @summary Change customer password
141
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
142
- * @param {ChangePasswordRequestDto} changePasswordRequestDto
143
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
144
- * @param {*} [options] Override http request option.
145
- * @throws {RequiredError}
146
- */
147
- changePassword: function (customerCode, changePasswordRequestDto, authorization, options) {
148
- if (options === void 0) { options = {}; }
149
- return __awaiter(_this, void 0, void 0, function () {
150
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
151
- return __generator(this, function (_a) {
152
- // verify required parameter 'customerCode' is not null or undefined
153
- (0, common_1.assertParamExists)('changePassword', 'customerCode', customerCode);
154
- // verify required parameter 'changePasswordRequestDto' is not null or undefined
155
- (0, common_1.assertParamExists)('changePassword', 'changePasswordRequestDto', changePasswordRequestDto);
156
- localVarPath = "/v1/customers/{customerCode}/change-password"
157
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
158
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
159
- if (configuration) {
160
- baseOptions = configuration.baseOptions;
161
- baseAccessToken = configuration.accessToken;
162
- }
163
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
164
- localVarHeaderParameter = {};
165
- localVarQueryParameter = {};
166
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
167
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
168
- }
169
- localVarHeaderParameter['Content-Type'] = 'application/json';
170
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
171
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
173
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(changePasswordRequestDto, localVarRequestOptions, configuration);
174
- return [2 /*return*/, {
175
- url: (0, common_1.toPathString)(localVarUrlObj),
176
- options: localVarRequestOptions,
177
- }];
178
- });
179
- });
180
- },
181
- /**
182
- * Request to complete a payment change by customer.
183
- * @summary Request payment setup complete
184
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
185
- * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
186
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
187
- * @param {*} [options] Override http request option.
188
- * @throws {RequiredError}
189
- */
190
- completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
191
- if (options === void 0) { options = {}; }
192
- return __awaiter(_this, void 0, void 0, function () {
193
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
194
- return __generator(this, function (_a) {
195
- // verify required parameter 'customerCode' is not null or undefined
196
- (0, common_1.assertParamExists)('completePaymentSetup', 'customerCode', customerCode);
197
- // verify required parameter 'completePaymentSetupPspRequest' is not null or undefined
198
- (0, common_1.assertParamExists)('completePaymentSetup', 'completePaymentSetupPspRequest', completePaymentSetupPspRequest);
199
- localVarPath = "/v1/customers/{customerCode}/payment_setup/complete"
200
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
201
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
202
- if (configuration) {
203
- baseOptions = configuration.baseOptions;
204
- baseAccessToken = configuration.accessToken;
205
- }
206
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
207
- localVarHeaderParameter = {};
208
- localVarQueryParameter = {};
209
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
210
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
211
- }
212
- localVarHeaderParameter['Content-Type'] = 'application/json';
213
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
214
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
215
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
216
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(completePaymentSetupPspRequest, localVarRequestOptions, configuration);
217
- return [2 /*return*/, {
218
- url: (0, common_1.toPathString)(localVarUrlObj),
219
- options: localVarRequestOptions,
220
- }];
221
- });
222
- });
223
- },
224
- /**
225
- * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
226
- * @summary Register a customer after invite
227
- * @param {CreateCustomerRequestDto} createCustomerRequestDto
228
- * @param {*} [options] Override http request option.
229
- * @throws {RequiredError}
230
- */
231
- createCustomer: function (createCustomerRequestDto, options) {
232
- if (options === void 0) { options = {}; }
233
- return __awaiter(_this, void 0, void 0, function () {
234
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
235
- return __generator(this, function (_a) {
236
- // verify required parameter 'createCustomerRequestDto' is not null or undefined
237
- (0, common_1.assertParamExists)('createCustomer', 'createCustomerRequestDto', createCustomerRequestDto);
238
- localVarPath = "/v1/customers/create";
239
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
240
- if (configuration) {
241
- baseOptions = configuration.baseOptions;
242
- baseAccessToken = configuration.accessToken;
243
- }
244
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
245
- localVarHeaderParameter = {};
246
- localVarQueryParameter = {};
247
- localVarHeaderParameter['Content-Type'] = 'application/json';
248
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
249
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
250
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
251
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCustomerRequestDto, localVarRequestOptions, configuration);
252
- return [2 /*return*/, {
253
- url: (0, common_1.toPathString)(localVarUrlObj),
254
- options: localVarRequestOptions,
255
- }];
256
- });
257
- });
258
- },
259
- /**
260
- * Send a customer a reset-password token via email.
261
- * @summary Forgot password by customer
262
- * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
263
- * @param {*} [options] Override http request option.
264
- * @throws {RequiredError}
265
- */
266
- forgotPassword: function (forgotPasswordRequestDto, options) {
267
- if (options === void 0) { options = {}; }
268
- return __awaiter(_this, void 0, void 0, function () {
269
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
270
- return __generator(this, function (_a) {
271
- // verify required parameter 'forgotPasswordRequestDto' is not null or undefined
272
- (0, common_1.assertParamExists)('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto);
273
- localVarPath = "/v1/customers/forgot-password";
274
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
275
- if (configuration) {
276
- baseOptions = configuration.baseOptions;
277
- baseAccessToken = configuration.accessToken;
278
- }
279
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
280
- localVarHeaderParameter = {};
281
- localVarQueryParameter = {};
282
- localVarHeaderParameter['Content-Type'] = 'application/json';
283
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
284
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
285
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
286
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(forgotPasswordRequestDto, localVarRequestOptions, configuration);
287
- return [2 /*return*/, {
288
- url: (0, common_1.toPathString)(localVarUrlObj),
289
- options: localVarRequestOptions,
290
- }];
291
- });
292
- });
293
- },
294
- /**
295
- * Get customer details.
296
- * @summary Get customer details
297
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
298
- * @param {string} [expand] Fields to expand response by - [account]
299
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
300
- * @param {*} [options] Override http request option.
301
- * @throws {RequiredError}
302
- */
303
- getCustomer: function (customerCode, expand, authorization, options) {
304
- if (options === void 0) { options = {}; }
305
- return __awaiter(_this, void 0, void 0, function () {
306
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
307
- return __generator(this, function (_a) {
308
- // verify required parameter 'customerCode' is not null or undefined
309
- (0, common_1.assertParamExists)('getCustomer', 'customerCode', customerCode);
310
- localVarPath = "/v1/customers/{customerCode}"
311
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
312
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
313
- if (configuration) {
314
- baseOptions = configuration.baseOptions;
315
- baseAccessToken = configuration.accessToken;
316
- }
317
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
318
- localVarHeaderParameter = {};
319
- localVarQueryParameter = {};
320
- if (expand !== undefined) {
321
- localVarQueryParameter['expand'] = expand;
322
- }
323
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
324
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
325
- }
326
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
327
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
328
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
329
- return [2 /*return*/, {
330
- url: (0, common_1.toPathString)(localVarUrlObj),
331
- options: localVarRequestOptions,
332
- }];
333
- });
334
- });
335
- },
336
- /**
337
- * Get a presigned download url for document.
338
- * @summary Get a download url for document
339
- * @param {string} documentCode The document code.
340
- * @param {string} customerCode
341
- * @param {GetCustomerDocumentDownloadUrlRequestDto} [contentDisposition] Content disposition override. Default will be depending on the document type.
342
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
343
- * @param {*} [options] Override http request option.
344
- * @throws {RequiredError}
345
- */
346
- getCustomerDocumentDownloadUrl: function (documentCode, customerCode, contentDisposition, authorization, options) {
347
- if (options === void 0) { options = {}; }
348
- return __awaiter(_this, void 0, void 0, function () {
349
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
350
- return __generator(this, function (_a) {
351
- // verify required parameter 'documentCode' is not null or undefined
352
- (0, common_1.assertParamExists)('getCustomerDocumentDownloadUrl', 'documentCode', documentCode);
353
- // verify required parameter 'customerCode' is not null or undefined
354
- (0, common_1.assertParamExists)('getCustomerDocumentDownloadUrl', 'customerCode', customerCode);
355
- localVarPath = "/v1/customers/{customerCode}/documents/{documentCode}/download-url"
356
- .replace("{".concat("documentCode", "}"), encodeURIComponent(String(documentCode)))
357
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
358
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
359
- if (configuration) {
360
- baseOptions = configuration.baseOptions;
361
- baseAccessToken = configuration.accessToken;
362
- }
363
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
364
- localVarHeaderParameter = {};
365
- localVarQueryParameter = {};
366
- if (contentDisposition !== undefined) {
367
- localVarQueryParameter['contentDisposition'] = contentDisposition;
368
- }
369
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
370
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
371
- }
372
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
373
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
374
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
375
- return [2 /*return*/, {
376
- url: (0, common_1.toPathString)(localVarUrlObj),
377
- options: localVarRequestOptions,
378
- }];
379
- });
380
- });
381
- },
382
- /**
383
- * Start auth process to get new access token, refresh token after successful login.
384
- * @summary Initiate auth by customer
385
- * @param {InitiateAuthRequestDto} initiateAuthRequestDto
386
- * @param {*} [options] Override http request option.
387
- * @throws {RequiredError}
388
- */
389
- initiateAuth: function (initiateAuthRequestDto, options) {
390
- if (options === void 0) { options = {}; }
391
- return __awaiter(_this, void 0, void 0, function () {
392
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
393
- return __generator(this, function (_a) {
394
- // verify required parameter 'initiateAuthRequestDto' is not null or undefined
395
- (0, common_1.assertParamExists)('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto);
396
- localVarPath = "/v1/customers/auth/initiate";
397
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
398
- if (configuration) {
399
- baseOptions = configuration.baseOptions;
400
- baseAccessToken = configuration.accessToken;
401
- }
402
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
403
- localVarHeaderParameter = {};
404
- localVarQueryParameter = {};
405
- localVarHeaderParameter['Content-Type'] = 'application/json';
406
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
407
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
408
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
409
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateAuthRequestDto, localVarRequestOptions, configuration);
410
- return [2 /*return*/, {
411
- url: (0, common_1.toPathString)(localVarUrlObj),
412
- options: localVarRequestOptions,
413
- }];
414
- });
415
- });
416
- },
417
- /**
418
- * Request to initiate a payment change by customer.
419
- * @summary Request payment setup initiation
420
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
421
- * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
422
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
423
- * @param {*} [options] Override http request option.
424
- * @throws {RequiredError}
425
- */
426
- initiatePaymentSetup: function (customerCode, initiatePaymentSetupRequestDto, authorization, options) {
427
- if (options === void 0) { options = {}; }
428
- return __awaiter(_this, void 0, void 0, function () {
429
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
430
- return __generator(this, function (_a) {
431
- // verify required parameter 'customerCode' is not null or undefined
432
- (0, common_1.assertParamExists)('initiatePaymentSetup', 'customerCode', customerCode);
433
- // verify required parameter 'initiatePaymentSetupRequestDto' is not null or undefined
434
- (0, common_1.assertParamExists)('initiatePaymentSetup', 'initiatePaymentSetupRequestDto', initiatePaymentSetupRequestDto);
435
- localVarPath = "/v1/customers/{customerCode}/payment_setup/initiate"
436
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
437
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
438
- if (configuration) {
439
- baseOptions = configuration.baseOptions;
440
- baseAccessToken = configuration.accessToken;
441
- }
442
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
443
- localVarHeaderParameter = {};
444
- localVarQueryParameter = {};
445
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
446
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
447
- }
448
- localVarHeaderParameter['Content-Type'] = 'application/json';
449
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
450
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
451
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
452
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiatePaymentSetupRequestDto, localVarRequestOptions, configuration);
453
- return [2 /*return*/, {
454
- url: (0, common_1.toPathString)(localVarUrlObj),
455
- options: localVarRequestOptions,
456
- }];
457
- });
458
- });
459
- },
460
- /**
461
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
462
- * @summary Invite a customer by self
463
- * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
464
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
465
- * @param {*} [options] Override http request option.
466
- * @throws {RequiredError}
467
- */
468
- inviteByCustomer: function (inviteByCustomerRequestDto, authorization, options) {
469
- if (options === void 0) { options = {}; }
470
- return __awaiter(_this, void 0, void 0, function () {
471
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
472
- return __generator(this, function (_a) {
473
- // verify required parameter 'inviteByCustomerRequestDto' is not null or undefined
474
- (0, common_1.assertParamExists)('inviteByCustomer', 'inviteByCustomerRequestDto', inviteByCustomerRequestDto);
475
- localVarPath = "/v1/customers/invites/by-customer";
476
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
477
- if (configuration) {
478
- baseOptions = configuration.baseOptions;
479
- baseAccessToken = configuration.accessToken;
480
- }
481
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
482
- localVarHeaderParameter = {};
483
- localVarQueryParameter = {};
484
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
485
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
486
- }
487
- localVarHeaderParameter['Content-Type'] = 'application/json';
488
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
489
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
490
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
491
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(inviteByCustomerRequestDto, localVarRequestOptions, configuration);
492
- return [2 /*return*/, {
493
- url: (0, common_1.toPathString)(localVarUrlObj),
494
- options: localVarRequestOptions,
495
- }];
496
- });
497
- });
498
- },
499
- /**
500
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported. **Required Permissions** \"customer-management.customers.create\"
501
- * @summary Invite a customer by tenant
502
- * @param {InviteByTenantRequestDto} inviteByTenantRequestDto
503
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
504
- * @param {*} [options] Override http request option.
505
- * @throws {RequiredError}
506
- */
507
- inviteByTenant: function (inviteByTenantRequestDto, authorization, options) {
508
- if (options === void 0) { options = {}; }
509
- return __awaiter(_this, void 0, void 0, function () {
510
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
511
- return __generator(this, function (_a) {
512
- // verify required parameter 'inviteByTenantRequestDto' is not null or undefined
513
- (0, common_1.assertParamExists)('inviteByTenant', 'inviteByTenantRequestDto', inviteByTenantRequestDto);
514
- localVarPath = "/v1/customers/invites/by-tenant";
515
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
516
- if (configuration) {
517
- baseOptions = configuration.baseOptions;
518
- baseAccessToken = configuration.accessToken;
519
- }
520
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
521
- localVarHeaderParameter = {};
522
- localVarQueryParameter = {};
523
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
524
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
525
- }
526
- localVarHeaderParameter['Content-Type'] = 'application/json';
527
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
528
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
529
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
530
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(inviteByTenantRequestDto, localVarRequestOptions, configuration);
531
- return [2 /*return*/, {
532
- url: (0, common_1.toPathString)(localVarUrlObj),
533
- options: localVarRequestOptions,
534
- }];
535
- });
536
- });
537
- },
538
- /**
539
- * Get customer list.
540
- * @summary Get customers list
541
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
542
- * @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.
543
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
544
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
545
- * @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.
546
- * @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.
547
- * @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.
548
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
549
- * @param {*} [options] Override http request option.
550
- * @throws {RequiredError}
551
- */
552
- listCustomers: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
553
- if (options === void 0) { options = {}; }
554
- return __awaiter(_this, void 0, void 0, function () {
555
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
556
- return __generator(this, function (_a) {
557
- localVarPath = "/v1/customers";
558
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
559
- if (configuration) {
560
- baseOptions = configuration.baseOptions;
561
- baseAccessToken = configuration.accessToken;
562
- }
563
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
564
- localVarHeaderParameter = {};
565
- localVarQueryParameter = {};
566
- if (pageSize !== undefined) {
567
- localVarQueryParameter['pageSize'] = pageSize;
568
- }
569
- if (pageToken !== undefined) {
570
- localVarQueryParameter['pageToken'] = pageToken;
571
- }
572
- if (filter !== undefined) {
573
- localVarQueryParameter['filter'] = filter;
574
- }
575
- if (search !== undefined) {
576
- localVarQueryParameter['search'] = search;
577
- }
578
- if (order !== undefined) {
579
- localVarQueryParameter['order'] = order;
580
- }
581
- if (expand !== undefined) {
582
- localVarQueryParameter['expand'] = expand;
583
- }
584
- if (filters !== undefined) {
585
- localVarQueryParameter['filters'] = filters;
586
- }
587
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
588
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
589
- }
590
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
591
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
592
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
593
- return [2 /*return*/, {
594
- url: (0, common_1.toPathString)(localVarUrlObj),
595
- options: localVarRequestOptions,
596
- }];
597
- });
598
- });
599
- },
600
- /**
601
- * List all the documents of a customer.
602
- * @summary List documents of a customer
603
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
604
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
605
- * @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.
606
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
607
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
608
- * @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.
609
- * @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.
610
- * @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.
611
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
612
- * @param {*} [options] Override http request option.
613
- * @throws {RequiredError}
614
- */
615
- listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
616
- if (options === void 0) { options = {}; }
617
- return __awaiter(_this, void 0, void 0, function () {
618
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
619
- return __generator(this, function (_a) {
620
- // verify required parameter 'customerCode' is not null or undefined
621
- (0, common_1.assertParamExists)('listDocuments', 'customerCode', customerCode);
622
- localVarPath = "/v1/customers/{customerCode}/documents"
623
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
624
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
625
- if (configuration) {
626
- baseOptions = configuration.baseOptions;
627
- baseAccessToken = configuration.accessToken;
628
- }
629
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
630
- localVarHeaderParameter = {};
631
- localVarQueryParameter = {};
632
- if (pageSize !== undefined) {
633
- localVarQueryParameter['pageSize'] = pageSize;
634
- }
635
- if (pageToken !== undefined) {
636
- localVarQueryParameter['pageToken'] = pageToken;
637
- }
638
- if (filter !== undefined) {
639
- localVarQueryParameter['filter'] = filter;
640
- }
641
- if (search !== undefined) {
642
- localVarQueryParameter['search'] = search;
643
- }
644
- if (order !== undefined) {
645
- localVarQueryParameter['order'] = order;
646
- }
647
- if (expand !== undefined) {
648
- localVarQueryParameter['expand'] = expand;
649
- }
650
- if (filters !== undefined) {
651
- localVarQueryParameter['filters'] = filters;
652
- }
653
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
654
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
655
- }
656
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
657
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
658
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
659
- return [2 /*return*/, {
660
- url: (0, common_1.toPathString)(localVarUrlObj),
661
- options: localVarRequestOptions,
662
- }];
663
- });
664
- });
665
- },
666
- /**
667
- * List all the invoices of a customer.
668
- * @summary List invoices of a customer
669
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
670
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
671
- * @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.
672
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
673
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
674
- * @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.
675
- * @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.
676
- * @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.
677
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
678
- * @param {*} [options] Override http request option.
679
- * @throws {RequiredError}
680
- */
681
- listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
682
- if (options === void 0) { options = {}; }
683
- return __awaiter(_this, void 0, void 0, function () {
684
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
685
- return __generator(this, function (_a) {
686
- // verify required parameter 'customerCode' is not null or undefined
687
- (0, common_1.assertParamExists)('listInvoices', 'customerCode', customerCode);
688
- localVarPath = "/v1/customers/{customerCode}/invoices"
689
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
690
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
691
- if (configuration) {
692
- baseOptions = configuration.baseOptions;
693
- baseAccessToken = configuration.accessToken;
694
- }
695
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
696
- localVarHeaderParameter = {};
697
- localVarQueryParameter = {};
698
- if (pageSize !== undefined) {
699
- localVarQueryParameter['pageSize'] = pageSize;
700
- }
701
- if (pageToken !== undefined) {
702
- localVarQueryParameter['pageToken'] = pageToken;
703
- }
704
- if (filter !== undefined) {
705
- localVarQueryParameter['filter'] = filter;
706
- }
707
- if (search !== undefined) {
708
- localVarQueryParameter['search'] = search;
709
- }
710
- if (order !== undefined) {
711
- localVarQueryParameter['order'] = order;
712
- }
713
- if (expand !== undefined) {
714
- localVarQueryParameter['expand'] = expand;
715
- }
716
- if (filters !== undefined) {
717
- localVarQueryParameter['filters'] = filters;
718
- }
719
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
720
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
721
- }
722
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
723
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
724
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
725
- return [2 /*return*/, {
726
- url: (0, common_1.toPathString)(localVarUrlObj),
727
- options: localVarRequestOptions,
728
- }];
729
- });
730
- });
731
- },
732
- /**
733
- * Get new access token, new refresh token.
734
- * @summary Refresh token by customer
735
- * @param {RefreshTokenDto} refreshTokenDto
736
- * @param {string} [cookie] HTTP only cookie that was sent during login.
737
- * @param {*} [options] Override http request option.
738
- * @throws {RequiredError}
739
- */
740
- refreshToken: function (refreshTokenDto, cookie, options) {
741
- if (options === void 0) { options = {}; }
742
- return __awaiter(_this, void 0, void 0, function () {
743
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
744
- return __generator(this, function (_a) {
745
- // verify required parameter 'refreshTokenDto' is not null or undefined
746
- (0, common_1.assertParamExists)('refreshToken', 'refreshTokenDto', refreshTokenDto);
747
- localVarPath = "/v1/customers/refresh-token";
748
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
749
- if (configuration) {
750
- baseOptions = configuration.baseOptions;
751
- baseAccessToken = configuration.accessToken;
752
- }
753
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
754
- localVarHeaderParameter = {};
755
- localVarQueryParameter = {};
756
- if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
757
- localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
758
- }
759
- localVarHeaderParameter['Content-Type'] = 'application/json';
760
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
761
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
762
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
763
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenDto, localVarRequestOptions, configuration);
764
- return [2 /*return*/, {
765
- url: (0, common_1.toPathString)(localVarUrlObj),
766
- options: localVarRequestOptions,
767
- }];
768
- });
769
- });
770
- },
771
- /**
772
- * Request a token to change the email address for the customer.
773
- * @summary Request customer email change
774
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
775
- * @param {RequestChangeEmailByCustomerRequestDto} requestChangeEmailByCustomerRequestDto
776
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
777
- * @param {*} [options] Override http request option.
778
- * @throws {RequiredError}
779
- */
780
- requestChangeEmailByCustomer: function (customerCode, requestChangeEmailByCustomerRequestDto, authorization, options) {
781
- if (options === void 0) { options = {}; }
782
- return __awaiter(_this, void 0, void 0, function () {
783
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
784
- return __generator(this, function (_a) {
785
- // verify required parameter 'customerCode' is not null or undefined
786
- (0, common_1.assertParamExists)('requestChangeEmailByCustomer', 'customerCode', customerCode);
787
- // verify required parameter 'requestChangeEmailByCustomerRequestDto' is not null or undefined
788
- (0, common_1.assertParamExists)('requestChangeEmailByCustomer', 'requestChangeEmailByCustomerRequestDto', requestChangeEmailByCustomerRequestDto);
789
- localVarPath = "/v1/customers/{customerCode}/request-email-change"
790
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
791
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
792
- if (configuration) {
793
- baseOptions = configuration.baseOptions;
794
- baseAccessToken = configuration.accessToken;
795
- }
796
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
797
- localVarHeaderParameter = {};
798
- localVarQueryParameter = {};
799
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
800
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
801
- }
802
- localVarHeaderParameter['Content-Type'] = 'application/json';
803
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
804
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
805
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
806
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestChangeEmailByCustomerRequestDto, localVarRequestOptions, configuration);
807
- return [2 /*return*/, {
808
- url: (0, common_1.toPathString)(localVarUrlObj),
809
- options: localVarRequestOptions,
810
- }];
811
- });
812
- });
813
- },
814
- /**
815
- * Change customer\'s password using the token provided by the reset password endpoint.
816
- * @summary Change password by customer
817
- * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
818
- * @param {*} [options] Override http request option.
819
- * @throws {RequiredError}
820
- */
821
- resetPassword: function (resetPasswordByCustomerRequestDto, options) {
822
- if (options === void 0) { options = {}; }
823
- return __awaiter(_this, void 0, void 0, function () {
824
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
825
- return __generator(this, function (_a) {
826
- // verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
827
- (0, common_1.assertParamExists)('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto);
828
- localVarPath = "/v1/customers/reset-password";
829
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
830
- if (configuration) {
831
- baseOptions = configuration.baseOptions;
832
- baseAccessToken = configuration.accessToken;
833
- }
834
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
835
- localVarHeaderParameter = {};
836
- localVarQueryParameter = {};
837
- localVarHeaderParameter['Content-Type'] = 'application/json';
838
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
839
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
840
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
841
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration);
842
- return [2 /*return*/, {
843
- url: (0, common_1.toPathString)(localVarUrlObj),
844
- options: localVarRequestOptions,
845
- }];
846
- });
847
- });
848
- },
849
- /**
850
- * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
851
- * @summary Respond to auth challenge
852
- * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
853
- * @param {*} [options] Override http request option.
854
- * @throws {RequiredError}
855
- */
856
- respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
857
- if (options === void 0) { options = {}; }
858
- return __awaiter(_this, void 0, void 0, function () {
859
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
860
- return __generator(this, function (_a) {
861
- // verify required parameter 'respondToAuthChallengeRequestDto' is not null or undefined
862
- (0, common_1.assertParamExists)('respondToAuthChallenge', 'respondToAuthChallengeRequestDto', respondToAuthChallengeRequestDto);
863
- localVarPath = "/v1/customers/auth/respond";
864
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
865
- if (configuration) {
866
- baseOptions = configuration.baseOptions;
867
- baseAccessToken = configuration.accessToken;
868
- }
869
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
870
- localVarHeaderParameter = {};
871
- localVarQueryParameter = {};
872
- localVarHeaderParameter['Content-Type'] = 'application/json';
873
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
874
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
875
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
876
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(respondToAuthChallengeRequestDto, localVarRequestOptions, configuration);
877
- return [2 /*return*/, {
878
- url: (0, common_1.toPathString)(localVarUrlObj),
879
- options: localVarRequestOptions,
880
- }];
881
- });
882
- });
883
- },
884
- /**
885
- * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
886
- * @summary Update customer details
887
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
888
- * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
889
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
890
- * @param {*} [options] Override http request option.
891
- * @throws {RequiredError}
892
- */
893
- updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
894
- if (options === void 0) { options = {}; }
895
- return __awaiter(_this, void 0, void 0, function () {
896
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
897
- return __generator(this, function (_a) {
898
- // verify required parameter 'customerCode' is not null or undefined
899
- (0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
900
- // verify required parameter 'updateCustomerRequestDto' is not null or undefined
901
- (0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
902
- localVarPath = "/v1/customers/{customerCode}"
903
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
904
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
905
- if (configuration) {
906
- baseOptions = configuration.baseOptions;
907
- baseAccessToken = configuration.accessToken;
908
- }
909
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
910
- localVarHeaderParameter = {};
911
- localVarQueryParameter = {};
912
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
913
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
914
- }
915
- localVarHeaderParameter['Content-Type'] = 'application/json';
916
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
917
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
918
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
919
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
920
- return [2 /*return*/, {
921
- url: (0, common_1.toPathString)(localVarUrlObj),
922
- options: localVarRequestOptions,
923
- }];
924
- });
925
- });
926
- },
927
- /**
928
- * API to upload and attach documents to an account.
929
- * @summary Upload account documents
930
- * @param {string} customerCode
931
- * @param {UploadAccountDocumentsRequestDto} uploadAccountDocumentsRequestDto
932
- * @param {*} [options] Override http request option.
933
- * @throws {RequiredError}
934
- */
935
- uploadAccountDocuments: function (customerCode, uploadAccountDocumentsRequestDto, options) {
936
- if (options === void 0) { options = {}; }
937
- return __awaiter(_this, void 0, void 0, function () {
938
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
939
- return __generator(this, function (_a) {
940
- // verify required parameter 'customerCode' is not null or undefined
941
- (0, common_1.assertParamExists)('uploadAccountDocuments', 'customerCode', customerCode);
942
- // verify required parameter 'uploadAccountDocumentsRequestDto' is not null or undefined
943
- (0, common_1.assertParamExists)('uploadAccountDocuments', 'uploadAccountDocumentsRequestDto', uploadAccountDocumentsRequestDto);
944
- localVarPath = "/v1/customers/{customerCode}/documents"
945
- .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
946
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
947
- if (configuration) {
948
- baseOptions = configuration.baseOptions;
949
- baseAccessToken = configuration.accessToken;
950
- }
951
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
952
- localVarHeaderParameter = {};
953
- localVarQueryParameter = {};
954
- localVarHeaderParameter['Content-Type'] = 'application/json';
955
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
956
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
957
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
958
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadAccountDocumentsRequestDto, localVarRequestOptions, configuration);
959
- return [2 /*return*/, {
960
- url: (0, common_1.toPathString)(localVarUrlObj),
961
- options: localVarRequestOptions,
962
- }];
963
- });
964
- });
965
- },
966
- /**
967
- * Verify the change email token that is sent by calling the request change email endpoint.
968
- * @summary Verify the change email token
969
- * @param {VerifyChangeEmailTokenRequestDto} verifyChangeEmailTokenRequestDto
970
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
971
- * @param {*} [options] Override http request option.
972
- * @throws {RequiredError}
973
- */
974
- verifyChangeEmailToken: function (verifyChangeEmailTokenRequestDto, authorization, options) {
975
- if (options === void 0) { options = {}; }
976
- return __awaiter(_this, void 0, void 0, function () {
977
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
978
- return __generator(this, function (_a) {
979
- // verify required parameter 'verifyChangeEmailTokenRequestDto' is not null or undefined
980
- (0, common_1.assertParamExists)('verifyChangeEmailToken', 'verifyChangeEmailTokenRequestDto', verifyChangeEmailTokenRequestDto);
981
- localVarPath = "/v1/customers/verify-change-email";
982
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
983
- if (configuration) {
984
- baseOptions = configuration.baseOptions;
985
- baseAccessToken = configuration.accessToken;
986
- }
987
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
988
- localVarHeaderParameter = {};
989
- localVarQueryParameter = {};
990
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
991
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
992
- }
993
- localVarHeaderParameter['Content-Type'] = 'application/json';
994
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
995
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
996
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
997
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(verifyChangeEmailTokenRequestDto, localVarRequestOptions, configuration);
998
- return [2 /*return*/, {
999
- url: (0, common_1.toPathString)(localVarUrlObj),
1000
- options: localVarRequestOptions,
1001
- }];
1002
- });
1003
- });
1004
- },
1005
- /**
1006
- * Verify the invite sent to the customer via email.
1007
- * @summary Verify customer\'s invite token
1008
- * @param {string} inviteToken Invite token sent to the customer
1009
- * @param {*} [options] Override http request option.
1010
- * @throws {RequiredError}
1011
- */
1012
- verifyInvite: function (inviteToken, options) {
1013
- if (options === void 0) { options = {}; }
1014
- return __awaiter(_this, void 0, void 0, function () {
1015
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1016
- return __generator(this, function (_a) {
1017
- // verify required parameter 'inviteToken' is not null or undefined
1018
- (0, common_1.assertParamExists)('verifyInvite', 'inviteToken', inviteToken);
1019
- localVarPath = "/v1/customers/invites/verify";
1020
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1021
- if (configuration) {
1022
- baseOptions = configuration.baseOptions;
1023
- baseAccessToken = configuration.accessToken;
1024
- }
1025
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1026
- localVarHeaderParameter = {};
1027
- localVarQueryParameter = {};
1028
- if (inviteToken !== undefined) {
1029
- localVarQueryParameter['inviteToken'] = inviteToken;
1030
- }
1031
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1032
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1033
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1034
- return [2 /*return*/, {
1035
- url: (0, common_1.toPathString)(localVarUrlObj),
1036
- options: localVarRequestOptions,
1037
- }];
1038
- });
1039
- });
1040
- },
1041
- /**
1042
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1043
- * @summary Verify a reset password token
1044
- * @param {string} resetToken reset password token
1045
- * @param {*} [options] Override http request option.
1046
- * @throws {RequiredError}
1047
- */
1048
- verifyResetPasswordToken: function (resetToken, options) {
1049
- if (options === void 0) { options = {}; }
1050
- return __awaiter(_this, void 0, void 0, function () {
1051
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1052
- return __generator(this, function (_a) {
1053
- // verify required parameter 'resetToken' is not null or undefined
1054
- (0, common_1.assertParamExists)('verifyResetPasswordToken', 'resetToken', resetToken);
1055
- localVarPath = "/v1/customers/verify-reset-password";
1056
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1057
- if (configuration) {
1058
- baseOptions = configuration.baseOptions;
1059
- baseAccessToken = configuration.accessToken;
1060
- }
1061
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1062
- localVarHeaderParameter = {};
1063
- localVarQueryParameter = {};
1064
- if (resetToken !== undefined) {
1065
- localVarQueryParameter['resetToken'] = resetToken;
1066
- }
1067
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1068
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1069
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1070
- return [2 /*return*/, {
1071
- url: (0, common_1.toPathString)(localVarUrlObj),
1072
- options: localVarRequestOptions,
1073
- }];
1074
- });
1075
- });
1076
- },
1077
- };
1078
- };
1079
- exports.CustomerControllerRestApiAxiosParamCreator = CustomerControllerRestApiAxiosParamCreator;
1080
- /**
1081
- * CustomerControllerRestApi - functional programming interface
1082
- * @export
1083
- */
1084
- var CustomerControllerRestApiFp = function (configuration) {
1085
- var localVarAxiosParamCreator = (0, exports.CustomerControllerRestApiAxiosParamCreator)(configuration);
1086
- return {
1087
- /**
1088
- * Change customer\'s email using the token provided by the request email change endpoint.
1089
- * @summary Change customer email
1090
- * @param {ChangeCustomerEmailRequestDto} changeCustomerEmailRequestDto
1091
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1092
- * @param {*} [options] Override http request option.
1093
- * @throws {RequiredError}
1094
- */
1095
- changeCustomerEmail: function (changeCustomerEmailRequestDto, authorization, options) {
1096
- return __awaiter(this, void 0, void 0, function () {
1097
- var localVarAxiosArgs;
1098
- return __generator(this, function (_a) {
1099
- switch (_a.label) {
1100
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.changeCustomerEmail(changeCustomerEmailRequestDto, authorization, options)];
1101
- case 1:
1102
- localVarAxiosArgs = _a.sent();
1103
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1104
- }
1105
- });
1106
- });
1107
- },
1108
- /**
1109
- * Change the customer password. Please use forgot-password endpoint if current password is lost.
1110
- * @summary Change customer password
1111
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1112
- * @param {ChangePasswordRequestDto} changePasswordRequestDto
1113
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1114
- * @param {*} [options] Override http request option.
1115
- * @throws {RequiredError}
1116
- */
1117
- changePassword: function (customerCode, changePasswordRequestDto, authorization, options) {
1118
- return __awaiter(this, void 0, void 0, function () {
1119
- var localVarAxiosArgs;
1120
- return __generator(this, function (_a) {
1121
- switch (_a.label) {
1122
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.changePassword(customerCode, changePasswordRequestDto, authorization, options)];
1123
- case 1:
1124
- localVarAxiosArgs = _a.sent();
1125
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1126
- }
1127
- });
1128
- });
1129
- },
1130
- /**
1131
- * Request to complete a payment change by customer.
1132
- * @summary Request payment setup complete
1133
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1134
- * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
1135
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1136
- * @param {*} [options] Override http request option.
1137
- * @throws {RequiredError}
1138
- */
1139
- completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
1140
- return __awaiter(this, void 0, void 0, function () {
1141
- var localVarAxiosArgs;
1142
- return __generator(this, function (_a) {
1143
- switch (_a.label) {
1144
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options)];
1145
- case 1:
1146
- localVarAxiosArgs = _a.sent();
1147
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1148
- }
1149
- });
1150
- });
1151
- },
1152
- /**
1153
- * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
1154
- * @summary Register a customer after invite
1155
- * @param {CreateCustomerRequestDto} createCustomerRequestDto
1156
- * @param {*} [options] Override http request option.
1157
- * @throws {RequiredError}
1158
- */
1159
- createCustomer: function (createCustomerRequestDto, options) {
1160
- return __awaiter(this, void 0, void 0, function () {
1161
- var localVarAxiosArgs;
1162
- return __generator(this, function (_a) {
1163
- switch (_a.label) {
1164
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCustomer(createCustomerRequestDto, options)];
1165
- case 1:
1166
- localVarAxiosArgs = _a.sent();
1167
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1168
- }
1169
- });
1170
- });
1171
- },
1172
- /**
1173
- * Send a customer a reset-password token via email.
1174
- * @summary Forgot password by customer
1175
- * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
1176
- * @param {*} [options] Override http request option.
1177
- * @throws {RequiredError}
1178
- */
1179
- forgotPassword: function (forgotPasswordRequestDto, options) {
1180
- return __awaiter(this, void 0, void 0, function () {
1181
- var localVarAxiosArgs;
1182
- return __generator(this, function (_a) {
1183
- switch (_a.label) {
1184
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options)];
1185
- case 1:
1186
- localVarAxiosArgs = _a.sent();
1187
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1188
- }
1189
- });
1190
- });
1191
- },
1192
- /**
1193
- * Get customer details.
1194
- * @summary Get customer details
1195
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1196
- * @param {string} [expand] Fields to expand response by - [account]
1197
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1198
- * @param {*} [options] Override http request option.
1199
- * @throws {RequiredError}
1200
- */
1201
- getCustomer: function (customerCode, expand, authorization, options) {
1202
- return __awaiter(this, void 0, void 0, function () {
1203
- var localVarAxiosArgs;
1204
- return __generator(this, function (_a) {
1205
- switch (_a.label) {
1206
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options)];
1207
- case 1:
1208
- localVarAxiosArgs = _a.sent();
1209
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1210
- }
1211
- });
1212
- });
1213
- },
1214
- /**
1215
- * Get a presigned download url for document.
1216
- * @summary Get a download url for document
1217
- * @param {string} documentCode The document code.
1218
- * @param {string} customerCode
1219
- * @param {GetCustomerDocumentDownloadUrlRequestDto} [contentDisposition] Content disposition override. Default will be depending on the document type.
1220
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1221
- * @param {*} [options] Override http request option.
1222
- * @throws {RequiredError}
1223
- */
1224
- getCustomerDocumentDownloadUrl: function (documentCode, customerCode, contentDisposition, authorization, options) {
1225
- return __awaiter(this, void 0, void 0, function () {
1226
- var localVarAxiosArgs;
1227
- return __generator(this, function (_a) {
1228
- switch (_a.label) {
1229
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomerDocumentDownloadUrl(documentCode, customerCode, contentDisposition, authorization, options)];
1230
- case 1:
1231
- localVarAxiosArgs = _a.sent();
1232
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1233
- }
1234
- });
1235
- });
1236
- },
1237
- /**
1238
- * Start auth process to get new access token, refresh token after successful login.
1239
- * @summary Initiate auth by customer
1240
- * @param {InitiateAuthRequestDto} initiateAuthRequestDto
1241
- * @param {*} [options] Override http request option.
1242
- * @throws {RequiredError}
1243
- */
1244
- initiateAuth: function (initiateAuthRequestDto, options) {
1245
- return __awaiter(this, void 0, void 0, function () {
1246
- var localVarAxiosArgs;
1247
- return __generator(this, function (_a) {
1248
- switch (_a.label) {
1249
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options)];
1250
- case 1:
1251
- localVarAxiosArgs = _a.sent();
1252
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1253
- }
1254
- });
1255
- });
1256
- },
1257
- /**
1258
- * Request to initiate a payment change by customer.
1259
- * @summary Request payment setup initiation
1260
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1261
- * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
1262
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1263
- * @param {*} [options] Override http request option.
1264
- * @throws {RequiredError}
1265
- */
1266
- initiatePaymentSetup: function (customerCode, initiatePaymentSetupRequestDto, authorization, options) {
1267
- return __awaiter(this, void 0, void 0, function () {
1268
- var localVarAxiosArgs;
1269
- return __generator(this, function (_a) {
1270
- switch (_a.label) {
1271
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiatePaymentSetup(customerCode, initiatePaymentSetupRequestDto, authorization, options)];
1272
- case 1:
1273
- localVarAxiosArgs = _a.sent();
1274
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1275
- }
1276
- });
1277
- });
1278
- },
1279
- /**
1280
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1281
- * @summary Invite a customer by self
1282
- * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1283
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1284
- * @param {*} [options] Override http request option.
1285
- * @throws {RequiredError}
1286
- */
1287
- inviteByCustomer: function (inviteByCustomerRequestDto, authorization, options) {
1288
- return __awaiter(this, void 0, void 0, function () {
1289
- var localVarAxiosArgs;
1290
- return __generator(this, function (_a) {
1291
- switch (_a.label) {
1292
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.inviteByCustomer(inviteByCustomerRequestDto, authorization, options)];
1293
- case 1:
1294
- localVarAxiosArgs = _a.sent();
1295
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1296
- }
1297
- });
1298
- });
1299
- },
1300
- /**
1301
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported. **Required Permissions** \"customer-management.customers.create\"
1302
- * @summary Invite a customer by tenant
1303
- * @param {InviteByTenantRequestDto} inviteByTenantRequestDto
1304
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1305
- * @param {*} [options] Override http request option.
1306
- * @throws {RequiredError}
1307
- */
1308
- inviteByTenant: function (inviteByTenantRequestDto, authorization, options) {
1309
- return __awaiter(this, void 0, void 0, function () {
1310
- var localVarAxiosArgs;
1311
- return __generator(this, function (_a) {
1312
- switch (_a.label) {
1313
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.inviteByTenant(inviteByTenantRequestDto, authorization, options)];
1314
- case 1:
1315
- localVarAxiosArgs = _a.sent();
1316
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1317
- }
1318
- });
1319
- });
1320
- },
1321
- /**
1322
- * Get customer list.
1323
- * @summary Get customers list
1324
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1325
- * @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.
1326
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1327
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1328
- * @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.
1329
- * @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.
1330
- * @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.
1331
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1332
- * @param {*} [options] Override http request option.
1333
- * @throws {RequiredError}
1334
- */
1335
- listCustomers: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1336
- return __awaiter(this, void 0, void 0, function () {
1337
- var localVarAxiosArgs;
1338
- return __generator(this, function (_a) {
1339
- switch (_a.label) {
1340
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCustomers(pageSize, pageToken, filter, search, order, expand, filters, authorization, options)];
1341
- case 1:
1342
- localVarAxiosArgs = _a.sent();
1343
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1344
- }
1345
- });
1346
- });
1347
- },
1348
- /**
1349
- * List all the documents of a customer.
1350
- * @summary List documents of a customer
1351
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1352
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1353
- * @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.
1354
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1355
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1356
- * @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.
1357
- * @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.
1358
- * @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.
1359
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1360
- * @param {*} [options] Override http request option.
1361
- * @throws {RequiredError}
1362
- */
1363
- listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1364
- return __awaiter(this, void 0, void 0, function () {
1365
- var localVarAxiosArgs;
1366
- return __generator(this, function (_a) {
1367
- switch (_a.label) {
1368
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options)];
1369
- case 1:
1370
- localVarAxiosArgs = _a.sent();
1371
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1372
- }
1373
- });
1374
- });
1375
- },
1376
- /**
1377
- * List all the invoices of a customer.
1378
- * @summary List invoices of a customer
1379
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1380
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1381
- * @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.
1382
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1383
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1384
- * @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.
1385
- * @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.
1386
- * @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.
1387
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1388
- * @param {*} [options] Override http request option.
1389
- * @throws {RequiredError}
1390
- */
1391
- listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1392
- return __awaiter(this, void 0, void 0, function () {
1393
- var localVarAxiosArgs;
1394
- return __generator(this, function (_a) {
1395
- switch (_a.label) {
1396
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options)];
1397
- case 1:
1398
- localVarAxiosArgs = _a.sent();
1399
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1400
- }
1401
- });
1402
- });
1403
- },
1404
- /**
1405
- * Get new access token, new refresh token.
1406
- * @summary Refresh token by customer
1407
- * @param {RefreshTokenDto} refreshTokenDto
1408
- * @param {string} [cookie] HTTP only cookie that was sent during login.
1409
- * @param {*} [options] Override http request option.
1410
- * @throws {RequiredError}
1411
- */
1412
- refreshToken: function (refreshTokenDto, cookie, options) {
1413
- return __awaiter(this, void 0, void 0, function () {
1414
- var localVarAxiosArgs;
1415
- return __generator(this, function (_a) {
1416
- switch (_a.label) {
1417
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options)];
1418
- case 1:
1419
- localVarAxiosArgs = _a.sent();
1420
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1421
- }
1422
- });
1423
- });
1424
- },
1425
- /**
1426
- * Request a token to change the email address for the customer.
1427
- * @summary Request customer email change
1428
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1429
- * @param {RequestChangeEmailByCustomerRequestDto} requestChangeEmailByCustomerRequestDto
1430
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1431
- * @param {*} [options] Override http request option.
1432
- * @throws {RequiredError}
1433
- */
1434
- requestChangeEmailByCustomer: function (customerCode, requestChangeEmailByCustomerRequestDto, authorization, options) {
1435
- return __awaiter(this, void 0, void 0, function () {
1436
- var localVarAxiosArgs;
1437
- return __generator(this, function (_a) {
1438
- switch (_a.label) {
1439
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestChangeEmailByCustomer(customerCode, requestChangeEmailByCustomerRequestDto, authorization, options)];
1440
- case 1:
1441
- localVarAxiosArgs = _a.sent();
1442
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1443
- }
1444
- });
1445
- });
1446
- },
1447
- /**
1448
- * Change customer\'s password using the token provided by the reset password endpoint.
1449
- * @summary Change password by customer
1450
- * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
1451
- * @param {*} [options] Override http request option.
1452
- * @throws {RequiredError}
1453
- */
1454
- resetPassword: function (resetPasswordByCustomerRequestDto, options) {
1455
- return __awaiter(this, void 0, void 0, function () {
1456
- var localVarAxiosArgs;
1457
- return __generator(this, function (_a) {
1458
- switch (_a.label) {
1459
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options)];
1460
- case 1:
1461
- localVarAxiosArgs = _a.sent();
1462
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1463
- }
1464
- });
1465
- });
1466
- },
1467
- /**
1468
- * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
1469
- * @summary Respond to auth challenge
1470
- * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
1471
- * @param {*} [options] Override http request option.
1472
- * @throws {RequiredError}
1473
- */
1474
- respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
1475
- return __awaiter(this, void 0, void 0, function () {
1476
- var localVarAxiosArgs;
1477
- return __generator(this, function (_a) {
1478
- switch (_a.label) {
1479
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.respondToAuthChallenge(respondToAuthChallengeRequestDto, options)];
1480
- case 1:
1481
- localVarAxiosArgs = _a.sent();
1482
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1483
- }
1484
- });
1485
- });
1486
- },
1487
- /**
1488
- * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
1489
- * @summary Update customer details
1490
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1491
- * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1492
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1493
- * @param {*} [options] Override http request option.
1494
- * @throws {RequiredError}
1495
- */
1496
- updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
1497
- return __awaiter(this, void 0, void 0, function () {
1498
- var localVarAxiosArgs;
1499
- return __generator(this, function (_a) {
1500
- switch (_a.label) {
1501
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options)];
1502
- case 1:
1503
- localVarAxiosArgs = _a.sent();
1504
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1505
- }
1506
- });
1507
- });
1508
- },
1509
- /**
1510
- * API to upload and attach documents to an account.
1511
- * @summary Upload account documents
1512
- * @param {string} customerCode
1513
- * @param {UploadAccountDocumentsRequestDto} uploadAccountDocumentsRequestDto
1514
- * @param {*} [options] Override http request option.
1515
- * @throws {RequiredError}
1516
- */
1517
- uploadAccountDocuments: function (customerCode, uploadAccountDocumentsRequestDto, options) {
1518
- return __awaiter(this, void 0, void 0, function () {
1519
- var localVarAxiosArgs;
1520
- return __generator(this, function (_a) {
1521
- switch (_a.label) {
1522
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadAccountDocuments(customerCode, uploadAccountDocumentsRequestDto, options)];
1523
- case 1:
1524
- localVarAxiosArgs = _a.sent();
1525
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1526
- }
1527
- });
1528
- });
1529
- },
1530
- /**
1531
- * Verify the change email token that is sent by calling the request change email endpoint.
1532
- * @summary Verify the change email token
1533
- * @param {VerifyChangeEmailTokenRequestDto} verifyChangeEmailTokenRequestDto
1534
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1535
- * @param {*} [options] Override http request option.
1536
- * @throws {RequiredError}
1537
- */
1538
- verifyChangeEmailToken: function (verifyChangeEmailTokenRequestDto, authorization, options) {
1539
- return __awaiter(this, void 0, void 0, function () {
1540
- var localVarAxiosArgs;
1541
- return __generator(this, function (_a) {
1542
- switch (_a.label) {
1543
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyChangeEmailToken(verifyChangeEmailTokenRequestDto, authorization, options)];
1544
- case 1:
1545
- localVarAxiosArgs = _a.sent();
1546
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1547
- }
1548
- });
1549
- });
1550
- },
1551
- /**
1552
- * Verify the invite sent to the customer via email.
1553
- * @summary Verify customer\'s invite token
1554
- * @param {string} inviteToken Invite token sent to the customer
1555
- * @param {*} [options] Override http request option.
1556
- * @throws {RequiredError}
1557
- */
1558
- verifyInvite: function (inviteToken, options) {
1559
- return __awaiter(this, void 0, void 0, function () {
1560
- var localVarAxiosArgs;
1561
- return __generator(this, function (_a) {
1562
- switch (_a.label) {
1563
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyInvite(inviteToken, options)];
1564
- case 1:
1565
- localVarAxiosArgs = _a.sent();
1566
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1567
- }
1568
- });
1569
- });
1570
- },
1571
- /**
1572
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1573
- * @summary Verify a reset password token
1574
- * @param {string} resetToken reset password token
1575
- * @param {*} [options] Override http request option.
1576
- * @throws {RequiredError}
1577
- */
1578
- verifyResetPasswordToken: function (resetToken, options) {
1579
- return __awaiter(this, void 0, void 0, function () {
1580
- var localVarAxiosArgs;
1581
- return __generator(this, function (_a) {
1582
- switch (_a.label) {
1583
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options)];
1584
- case 1:
1585
- localVarAxiosArgs = _a.sent();
1586
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1587
- }
1588
- });
1589
- });
1590
- },
1591
- };
1592
- };
1593
- exports.CustomerControllerRestApiFp = CustomerControllerRestApiFp;
1594
- /**
1595
- * CustomerControllerRestApi - factory interface
1596
- * @export
1597
- */
1598
- var CustomerControllerRestApiFactory = function (configuration, basePath, axios) {
1599
- var localVarFp = (0, exports.CustomerControllerRestApiFp)(configuration);
1600
- return {
1601
- /**
1602
- * Change customer\'s email using the token provided by the request email change endpoint.
1603
- * @summary Change customer email
1604
- * @param {ChangeCustomerEmailRequestDto} changeCustomerEmailRequestDto
1605
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1606
- * @param {*} [options] Override http request option.
1607
- * @throws {RequiredError}
1608
- */
1609
- changeCustomerEmail: function (changeCustomerEmailRequestDto, authorization, options) {
1610
- return localVarFp.changeCustomerEmail(changeCustomerEmailRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1611
- },
1612
- /**
1613
- * Change the customer password. Please use forgot-password endpoint if current password is lost.
1614
- * @summary Change customer password
1615
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1616
- * @param {ChangePasswordRequestDto} changePasswordRequestDto
1617
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1618
- * @param {*} [options] Override http request option.
1619
- * @throws {RequiredError}
1620
- */
1621
- changePassword: function (customerCode, changePasswordRequestDto, authorization, options) {
1622
- return localVarFp.changePassword(customerCode, changePasswordRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1623
- },
1624
- /**
1625
- * Request to complete a payment change by customer.
1626
- * @summary Request payment setup complete
1627
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1628
- * @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
1629
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1630
- * @param {*} [options] Override http request option.
1631
- * @throws {RequiredError}
1632
- */
1633
- completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
1634
- return localVarFp.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options).then(function (request) { return request(axios, basePath); });
1635
- },
1636
- /**
1637
- * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
1638
- * @summary Register a customer after invite
1639
- * @param {CreateCustomerRequestDto} createCustomerRequestDto
1640
- * @param {*} [options] Override http request option.
1641
- * @throws {RequiredError}
1642
- */
1643
- createCustomer: function (createCustomerRequestDto, options) {
1644
- return localVarFp.createCustomer(createCustomerRequestDto, options).then(function (request) { return request(axios, basePath); });
1645
- },
1646
- /**
1647
- * Send a customer a reset-password token via email.
1648
- * @summary Forgot password by customer
1649
- * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
1650
- * @param {*} [options] Override http request option.
1651
- * @throws {RequiredError}
1652
- */
1653
- forgotPassword: function (forgotPasswordRequestDto, options) {
1654
- return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
1655
- },
1656
- /**
1657
- * Get customer details.
1658
- * @summary Get customer details
1659
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1660
- * @param {string} [expand] Fields to expand response by - [account]
1661
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1662
- * @param {*} [options] Override http request option.
1663
- * @throws {RequiredError}
1664
- */
1665
- getCustomer: function (customerCode, expand, authorization, options) {
1666
- return localVarFp.getCustomer(customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
1667
- },
1668
- /**
1669
- * Get a presigned download url for document.
1670
- * @summary Get a download url for document
1671
- * @param {string} documentCode The document code.
1672
- * @param {string} customerCode
1673
- * @param {GetCustomerDocumentDownloadUrlRequestDto} [contentDisposition] Content disposition override. Default will be depending on the document type.
1674
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1675
- * @param {*} [options] Override http request option.
1676
- * @throws {RequiredError}
1677
- */
1678
- getCustomerDocumentDownloadUrl: function (documentCode, customerCode, contentDisposition, authorization, options) {
1679
- return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
1680
- },
1681
- /**
1682
- * Start auth process to get new access token, refresh token after successful login.
1683
- * @summary Initiate auth by customer
1684
- * @param {InitiateAuthRequestDto} initiateAuthRequestDto
1685
- * @param {*} [options] Override http request option.
1686
- * @throws {RequiredError}
1687
- */
1688
- initiateAuth: function (initiateAuthRequestDto, options) {
1689
- return localVarFp.initiateAuth(initiateAuthRequestDto, options).then(function (request) { return request(axios, basePath); });
1690
- },
1691
- /**
1692
- * Request to initiate a payment change by customer.
1693
- * @summary Request payment setup initiation
1694
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1695
- * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
1696
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1697
- * @param {*} [options] Override http request option.
1698
- * @throws {RequiredError}
1699
- */
1700
- initiatePaymentSetup: function (customerCode, initiatePaymentSetupRequestDto, authorization, options) {
1701
- return localVarFp.initiatePaymentSetup(customerCode, initiatePaymentSetupRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1702
- },
1703
- /**
1704
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1705
- * @summary Invite a customer by self
1706
- * @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
1707
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1708
- * @param {*} [options] Override http request option.
1709
- * @throws {RequiredError}
1710
- */
1711
- inviteByCustomer: function (inviteByCustomerRequestDto, authorization, options) {
1712
- return localVarFp.inviteByCustomer(inviteByCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1713
- },
1714
- /**
1715
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported. **Required Permissions** \"customer-management.customers.create\"
1716
- * @summary Invite a customer by tenant
1717
- * @param {InviteByTenantRequestDto} inviteByTenantRequestDto
1718
- * @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\&#39;s Auth login endpoint under the name accessToken.
1719
- * @param {*} [options] Override http request option.
1720
- * @throws {RequiredError}
1721
- */
1722
- inviteByTenant: function (inviteByTenantRequestDto, authorization, options) {
1723
- return localVarFp.inviteByTenant(inviteByTenantRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1724
- },
1725
- /**
1726
- * Get customer list.
1727
- * @summary Get customers list
1728
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1729
- * @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.
1730
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1731
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1732
- * @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.
1733
- * @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.
1734
- * @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.
1735
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1736
- * @param {*} [options] Override http request option.
1737
- * @throws {RequiredError}
1738
- */
1739
- listCustomers: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1740
- return localVarFp.listCustomers(pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then(function (request) { return request(axios, basePath); });
1741
- },
1742
- /**
1743
- * List all the documents of a customer.
1744
- * @summary List documents of a customer
1745
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1746
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1747
- * @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.
1748
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1749
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1750
- * @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.
1751
- * @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.
1752
- * @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.
1753
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1754
- * @param {*} [options] Override http request option.
1755
- * @throws {RequiredError}
1756
- */
1757
- listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1758
- return localVarFp.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then(function (request) { return request(axios, basePath); });
1759
- },
1760
- /**
1761
- * List all the invoices of a customer.
1762
- * @summary List invoices of a customer
1763
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1764
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1765
- * @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.
1766
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
1767
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1768
- * @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.
1769
- * @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.
1770
- * @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.
1771
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1772
- * @param {*} [options] Override http request option.
1773
- * @throws {RequiredError}
1774
- */
1775
- listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
1776
- return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then(function (request) { return request(axios, basePath); });
1777
- },
1778
- /**
1779
- * Get new access token, new refresh token.
1780
- * @summary Refresh token by customer
1781
- * @param {RefreshTokenDto} refreshTokenDto
1782
- * @param {string} [cookie] HTTP only cookie that was sent during login.
1783
- * @param {*} [options] Override http request option.
1784
- * @throws {RequiredError}
1785
- */
1786
- refreshToken: function (refreshTokenDto, cookie, options) {
1787
- return localVarFp.refreshToken(refreshTokenDto, cookie, options).then(function (request) { return request(axios, basePath); });
1788
- },
1789
- /**
1790
- * Request a token to change the email address for the customer.
1791
- * @summary Request customer email change
1792
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1793
- * @param {RequestChangeEmailByCustomerRequestDto} requestChangeEmailByCustomerRequestDto
1794
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1795
- * @param {*} [options] Override http request option.
1796
- * @throws {RequiredError}
1797
- */
1798
- requestChangeEmailByCustomer: function (customerCode, requestChangeEmailByCustomerRequestDto, authorization, options) {
1799
- return localVarFp.requestChangeEmailByCustomer(customerCode, requestChangeEmailByCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1800
- },
1801
- /**
1802
- * Change customer\'s password using the token provided by the reset password endpoint.
1803
- * @summary Change password by customer
1804
- * @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
1805
- * @param {*} [options] Override http request option.
1806
- * @throws {RequiredError}
1807
- */
1808
- resetPassword: function (resetPasswordByCustomerRequestDto, options) {
1809
- return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then(function (request) { return request(axios, basePath); });
1810
- },
1811
- /**
1812
- * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
1813
- * @summary Respond to auth challenge
1814
- * @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
1815
- * @param {*} [options] Override http request option.
1816
- * @throws {RequiredError}
1817
- */
1818
- respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
1819
- return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then(function (request) { return request(axios, basePath); });
1820
- },
1821
- /**
1822
- * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
1823
- * @summary Update customer details
1824
- * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
1825
- * @param {UpdateCustomerRequestDto} updateCustomerRequestDto
1826
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1827
- * @param {*} [options] Override http request option.
1828
- * @throws {RequiredError}
1829
- */
1830
- updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
1831
- return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1832
- },
1833
- /**
1834
- * API to upload and attach documents to an account.
1835
- * @summary Upload account documents
1836
- * @param {string} customerCode
1837
- * @param {UploadAccountDocumentsRequestDto} uploadAccountDocumentsRequestDto
1838
- * @param {*} [options] Override http request option.
1839
- * @throws {RequiredError}
1840
- */
1841
- uploadAccountDocuments: function (customerCode, uploadAccountDocumentsRequestDto, options) {
1842
- return localVarFp.uploadAccountDocuments(customerCode, uploadAccountDocumentsRequestDto, options).then(function (request) { return request(axios, basePath); });
1843
- },
1844
- /**
1845
- * Verify the change email token that is sent by calling the request change email endpoint.
1846
- * @summary Verify the change email token
1847
- * @param {VerifyChangeEmailTokenRequestDto} verifyChangeEmailTokenRequestDto
1848
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1849
- * @param {*} [options] Override http request option.
1850
- * @throws {RequiredError}
1851
- */
1852
- verifyChangeEmailToken: function (verifyChangeEmailTokenRequestDto, authorization, options) {
1853
- return localVarFp.verifyChangeEmailToken(verifyChangeEmailTokenRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1854
- },
1855
- /**
1856
- * Verify the invite sent to the customer via email.
1857
- * @summary Verify customer\'s invite token
1858
- * @param {string} inviteToken Invite token sent to the customer
1859
- * @param {*} [options] Override http request option.
1860
- * @throws {RequiredError}
1861
- */
1862
- verifyInvite: function (inviteToken, options) {
1863
- return localVarFp.verifyInvite(inviteToken, options).then(function (request) { return request(axios, basePath); });
1864
- },
1865
- /**
1866
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1867
- * @summary Verify a reset password token
1868
- * @param {string} resetToken reset password token
1869
- * @param {*} [options] Override http request option.
1870
- * @throws {RequiredError}
1871
- */
1872
- verifyResetPasswordToken: function (resetToken, options) {
1873
- return localVarFp.verifyResetPasswordToken(resetToken, options).then(function (request) { return request(axios, basePath); });
1874
- },
1875
- };
1876
- };
1877
- exports.CustomerControllerRestApiFactory = CustomerControllerRestApiFactory;
1878
- /**
1879
- * CustomerControllerRestApi - object-oriented interface
1880
- * @export
1881
- * @class CustomerControllerRestApi
1882
- * @extends {BaseAPI}
1883
- */
1884
- var CustomerControllerRestApi = /** @class */ (function (_super) {
1885
- __extends(CustomerControllerRestApi, _super);
1886
- function CustomerControllerRestApi() {
1887
- return _super !== null && _super.apply(this, arguments) || this;
1888
- }
1889
- /**
1890
- * Change customer\'s email using the token provided by the request email change endpoint.
1891
- * @summary Change customer email
1892
- * @param {CustomerControllerRestApiChangeCustomerEmailRequest} requestParameters Request parameters.
1893
- * @param {*} [options] Override http request option.
1894
- * @throws {RequiredError}
1895
- * @memberof CustomerControllerRestApi
1896
- */
1897
- CustomerControllerRestApi.prototype.changeCustomerEmail = function (requestParameters, options) {
1898
- var _this = this;
1899
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).changeCustomerEmail(requestParameters.changeCustomerEmailRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1900
- };
1901
- /**
1902
- * Change the customer password. Please use forgot-password endpoint if current password is lost.
1903
- * @summary Change customer password
1904
- * @param {CustomerControllerRestApiChangePasswordRequest} requestParameters Request parameters.
1905
- * @param {*} [options] Override http request option.
1906
- * @throws {RequiredError}
1907
- * @memberof CustomerControllerRestApi
1908
- */
1909
- CustomerControllerRestApi.prototype.changePassword = function (requestParameters, options) {
1910
- var _this = this;
1911
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).changePassword(requestParameters.customerCode, requestParameters.changePasswordRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1912
- };
1913
- /**
1914
- * Request to complete a payment change by customer.
1915
- * @summary Request payment setup complete
1916
- * @param {CustomerControllerRestApiCompletePaymentSetupRequest} requestParameters Request parameters.
1917
- * @param {*} [options] Override http request option.
1918
- * @throws {RequiredError}
1919
- * @memberof CustomerControllerRestApi
1920
- */
1921
- CustomerControllerRestApi.prototype.completePaymentSetup = function (requestParameters, options) {
1922
- var _this = this;
1923
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).completePaymentSetup(requestParameters.customerCode, requestParameters.completePaymentSetupPspRequest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1924
- };
1925
- /**
1926
- * Register a customer using the invite token sent to customer\'s email address. Customer can set a new password for his account created during booking a policy.
1927
- * @summary Register a customer after invite
1928
- * @param {CustomerControllerRestApiCreateCustomerRequest} requestParameters Request parameters.
1929
- * @param {*} [options] Override http request option.
1930
- * @throws {RequiredError}
1931
- * @memberof CustomerControllerRestApi
1932
- */
1933
- CustomerControllerRestApi.prototype.createCustomer = function (requestParameters, options) {
1934
- var _this = this;
1935
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).createCustomer(requestParameters.createCustomerRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1936
- };
1937
- /**
1938
- * Send a customer a reset-password token via email.
1939
- * @summary Forgot password by customer
1940
- * @param {CustomerControllerRestApiForgotPasswordRequest} requestParameters Request parameters.
1941
- * @param {*} [options] Override http request option.
1942
- * @throws {RequiredError}
1943
- * @memberof CustomerControllerRestApi
1944
- */
1945
- CustomerControllerRestApi.prototype.forgotPassword = function (requestParameters, options) {
1946
- var _this = this;
1947
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1948
- };
1949
- /**
1950
- * Get customer details.
1951
- * @summary Get customer details
1952
- * @param {CustomerControllerRestApiGetCustomerRequest} requestParameters Request parameters.
1953
- * @param {*} [options] Override http request option.
1954
- * @throws {RequiredError}
1955
- * @memberof CustomerControllerRestApi
1956
- */
1957
- CustomerControllerRestApi.prototype.getCustomer = function (requestParameters, options) {
1958
- var _this = this;
1959
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1960
- };
1961
- /**
1962
- * Get a presigned download url for document.
1963
- * @summary Get a download url for document
1964
- * @param {CustomerControllerRestApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
1965
- * @param {*} [options] Override http request option.
1966
- * @throws {RequiredError}
1967
- * @memberof CustomerControllerRestApi
1968
- */
1969
- CustomerControllerRestApi.prototype.getCustomerDocumentDownloadUrl = function (requestParameters, options) {
1970
- var _this = this;
1971
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1972
- };
1973
- /**
1974
- * Start auth process to get new access token, refresh token after successful login.
1975
- * @summary Initiate auth by customer
1976
- * @param {CustomerControllerRestApiInitiateAuthRequest} requestParameters Request parameters.
1977
- * @param {*} [options] Override http request option.
1978
- * @throws {RequiredError}
1979
- * @memberof CustomerControllerRestApi
1980
- */
1981
- CustomerControllerRestApi.prototype.initiateAuth = function (requestParameters, options) {
1982
- var _this = this;
1983
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1984
- };
1985
- /**
1986
- * Request to initiate a payment change by customer.
1987
- * @summary Request payment setup initiation
1988
- * @param {CustomerControllerRestApiInitiatePaymentSetupRequest} requestParameters Request parameters.
1989
- * @param {*} [options] Override http request option.
1990
- * @throws {RequiredError}
1991
- * @memberof CustomerControllerRestApi
1992
- */
1993
- CustomerControllerRestApi.prototype.initiatePaymentSetup = function (requestParameters, options) {
1994
- var _this = this;
1995
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).initiatePaymentSetup(requestParameters.customerCode, requestParameters.initiatePaymentSetupRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1996
- };
1997
- /**
1998
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported.
1999
- * @summary Invite a customer by self
2000
- * @param {CustomerControllerRestApiInviteByCustomerRequest} requestParameters Request parameters.
2001
- * @param {*} [options] Override http request option.
2002
- * @throws {RequiredError}
2003
- * @memberof CustomerControllerRestApi
2004
- */
2005
- CustomerControllerRestApi.prototype.inviteByCustomer = function (requestParameters, options) {
2006
- var _this = this;
2007
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).inviteByCustomer(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2008
- };
2009
- /**
2010
- * Send a customer an invite via email to register. An account should have been created before inviting the customer. To invite users without accounts and policies is not yet supported. **Required Permissions** \"customer-management.customers.create\"
2011
- * @summary Invite a customer by tenant
2012
- * @param {CustomerControllerRestApiInviteByTenantRequest} requestParameters Request parameters.
2013
- * @param {*} [options] Override http request option.
2014
- * @throws {RequiredError}
2015
- * @memberof CustomerControllerRestApi
2016
- */
2017
- CustomerControllerRestApi.prototype.inviteByTenant = function (requestParameters, options) {
2018
- var _this = this;
2019
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).inviteByTenant(requestParameters.inviteByTenantRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2020
- };
2021
- /**
2022
- * Get customer list.
2023
- * @summary Get customers list
2024
- * @param {CustomerControllerRestApiListCustomersRequest} requestParameters Request parameters.
2025
- * @param {*} [options] Override http request option.
2026
- * @throws {RequiredError}
2027
- * @memberof CustomerControllerRestApi
2028
- */
2029
- CustomerControllerRestApi.prototype.listCustomers = function (requestParameters, options) {
2030
- var _this = this;
2031
- if (requestParameters === void 0) { requestParameters = {}; }
2032
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).listCustomers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2033
- };
2034
- /**
2035
- * List all the documents of a customer.
2036
- * @summary List documents of a customer
2037
- * @param {CustomerControllerRestApiListDocumentsRequest} requestParameters Request parameters.
2038
- * @param {*} [options] Override http request option.
2039
- * @throws {RequiredError}
2040
- * @memberof CustomerControllerRestApi
2041
- */
2042
- CustomerControllerRestApi.prototype.listDocuments = function (requestParameters, options) {
2043
- var _this = this;
2044
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).listDocuments(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2045
- };
2046
- /**
2047
- * List all the invoices of a customer.
2048
- * @summary List invoices of a customer
2049
- * @param {CustomerControllerRestApiListInvoicesRequest} requestParameters Request parameters.
2050
- * @param {*} [options] Override http request option.
2051
- * @throws {RequiredError}
2052
- * @memberof CustomerControllerRestApi
2053
- */
2054
- CustomerControllerRestApi.prototype.listInvoices = function (requestParameters, options) {
2055
- var _this = this;
2056
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2057
- };
2058
- /**
2059
- * Get new access token, new refresh token.
2060
- * @summary Refresh token by customer
2061
- * @param {CustomerControllerRestApiRefreshTokenRequest} requestParameters Request parameters.
2062
- * @param {*} [options] Override http request option.
2063
- * @throws {RequiredError}
2064
- * @memberof CustomerControllerRestApi
2065
- */
2066
- CustomerControllerRestApi.prototype.refreshToken = function (requestParameters, options) {
2067
- var _this = this;
2068
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then(function (request) { return request(_this.axios, _this.basePath); });
2069
- };
2070
- /**
2071
- * Request a token to change the email address for the customer.
2072
- * @summary Request customer email change
2073
- * @param {CustomerControllerRestApiRequestChangeEmailByCustomerRequest} requestParameters Request parameters.
2074
- * @param {*} [options] Override http request option.
2075
- * @throws {RequiredError}
2076
- * @memberof CustomerControllerRestApi
2077
- */
2078
- CustomerControllerRestApi.prototype.requestChangeEmailByCustomer = function (requestParameters, options) {
2079
- var _this = this;
2080
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).requestChangeEmailByCustomer(requestParameters.customerCode, requestParameters.requestChangeEmailByCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2081
- };
2082
- /**
2083
- * Change customer\'s password using the token provided by the reset password endpoint.
2084
- * @summary Change password by customer
2085
- * @param {CustomerControllerRestApiResetPasswordRequest} requestParameters Request parameters.
2086
- * @param {*} [options] Override http request option.
2087
- * @throws {RequiredError}
2088
- * @memberof CustomerControllerRestApi
2089
- */
2090
- CustomerControllerRestApi.prototype.resetPassword = function (requestParameters, options) {
2091
- var _this = this;
2092
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
2093
- };
2094
- /**
2095
- * Respond to the auth challenge by customer to get new access token, refresh token after successful login.
2096
- * @summary Respond to auth challenge
2097
- * @param {CustomerControllerRestApiRespondToAuthChallengeRequest} requestParameters Request parameters.
2098
- * @param {*} [options] Override http request option.
2099
- * @throws {RequiredError}
2100
- * @memberof CustomerControllerRestApi
2101
- */
2102
- CustomerControllerRestApi.prototype.respondToAuthChallenge = function (requestParameters, options) {
2103
- var _this = this;
2104
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
2105
- };
2106
- /**
2107
- * Update customer details like phone, names, addresses etc. To change email, please use Request customer email change endpoint instead.
2108
- * @summary Update customer details
2109
- * @param {CustomerControllerRestApiUpdateCustomerRequest} requestParameters Request parameters.
2110
- * @param {*} [options] Override http request option.
2111
- * @throws {RequiredError}
2112
- * @memberof CustomerControllerRestApi
2113
- */
2114
- CustomerControllerRestApi.prototype.updateCustomer = function (requestParameters, options) {
2115
- var _this = this;
2116
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2117
- };
2118
- /**
2119
- * API to upload and attach documents to an account.
2120
- * @summary Upload account documents
2121
- * @param {CustomerControllerRestApiUploadAccountDocumentsRequest} requestParameters Request parameters.
2122
- * @param {*} [options] Override http request option.
2123
- * @throws {RequiredError}
2124
- * @memberof CustomerControllerRestApi
2125
- */
2126
- CustomerControllerRestApi.prototype.uploadAccountDocuments = function (requestParameters, options) {
2127
- var _this = this;
2128
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).uploadAccountDocuments(requestParameters.customerCode, requestParameters.uploadAccountDocumentsRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
2129
- };
2130
- /**
2131
- * Verify the change email token that is sent by calling the request change email endpoint.
2132
- * @summary Verify the change email token
2133
- * @param {CustomerControllerRestApiVerifyChangeEmailTokenRequest} requestParameters Request parameters.
2134
- * @param {*} [options] Override http request option.
2135
- * @throws {RequiredError}
2136
- * @memberof CustomerControllerRestApi
2137
- */
2138
- CustomerControllerRestApi.prototype.verifyChangeEmailToken = function (requestParameters, options) {
2139
- var _this = this;
2140
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).verifyChangeEmailToken(requestParameters.verifyChangeEmailTokenRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2141
- };
2142
- /**
2143
- * Verify the invite sent to the customer via email.
2144
- * @summary Verify customer\'s invite token
2145
- * @param {CustomerControllerRestApiVerifyInviteRequest} requestParameters Request parameters.
2146
- * @param {*} [options] Override http request option.
2147
- * @throws {RequiredError}
2148
- * @memberof CustomerControllerRestApi
2149
- */
2150
- CustomerControllerRestApi.prototype.verifyInvite = function (requestParameters, options) {
2151
- var _this = this;
2152
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).verifyInvite(requestParameters.inviteToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
2153
- };
2154
- /**
2155
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
2156
- * @summary Verify a reset password token
2157
- * @param {CustomerControllerRestApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
2158
- * @param {*} [options] Override http request option.
2159
- * @throws {RequiredError}
2160
- * @memberof CustomerControllerRestApi
2161
- */
2162
- CustomerControllerRestApi.prototype.verifyResetPasswordToken = function (requestParameters, options) {
2163
- var _this = this;
2164
- return (0, exports.CustomerControllerRestApiFp)(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
2165
- };
2166
- return CustomerControllerRestApi;
2167
- }(base_1.BaseAPI));
2168
- exports.CustomerControllerRestApi = CustomerControllerRestApi;