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