@emilgroup/customer-sdk-node 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/authentication-api.ts +601 -0
- package/api/claims-api.ts +16 -16
- package/api/customers-api.ts +72 -1770
- package/api/documents-api.ts +442 -0
- package/api/invites-api.ts +443 -0
- package/api/invoices-api.ts +245 -0
- package/api/payments-api.ts +277 -0
- package/api/policies-api.ts +16 -16
- package/api/products-api.ts +19 -19
- package/api.ts +10 -0
- package/dist/api/authentication-api.d.ts +332 -0
- package/dist/api/authentication-api.js +604 -0
- package/dist/api/claims-api.d.ts +16 -16
- package/dist/api/claims-api.js +12 -12
- package/dist/api/customers-api.d.ts +0 -954
- package/dist/api/customers-api.js +20 -1381
- package/dist/api/documents-api.d.ts +262 -0
- package/dist/api/documents-api.js +417 -0
- package/dist/api/invites-api.d.ts +248 -0
- package/dist/api/invites-api.js +456 -0
- package/dist/api/invoices-api.d.ts +150 -0
- package/dist/api/invoices-api.js +253 -0
- package/dist/api/payments-api.d.ts +162 -0
- package/dist/api/payments-api.js +306 -0
- package/dist/api/policies-api.d.ts +16 -16
- package/dist/api/policies-api.js +12 -12
- package/dist/api/products-api.d.ts +20 -20
- package/dist/api/products-api.js +12 -12
- package/dist/api.d.ts +5 -0
- package/dist/api.js +5 -0
- package/dist/models/account-class.d.ts +26 -1
- package/dist/models/account-class.js +7 -0
- package/dist/models/create-account-request-dto.d.ts +39 -9
- package/dist/models/create-account-request-dto.js +11 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/list-policies-response-class.d.ts +4 -4
- package/dist/models/list-products-response-class.d.ts +31 -0
- package/dist/models/list-products-response-class.js +15 -0
- package/models/account-class.ts +29 -1
- package/models/create-account-request-dto.ts +41 -9
- package/models/index.ts +1 -0
- package/models/list-policies-response-class.ts +4 -4
- package/models/list-products-response-class.ts +37 -0
- package/package.json +2 -2
|
@@ -96,119 +96,6 @@ var FormData = require('form-data');
|
|
|
96
96
|
var CustomersApiAxiosParamCreator = function (configuration) {
|
|
97
97
|
var _this = this;
|
|
98
98
|
return {
|
|
99
|
-
/**
|
|
100
|
-
* Request to complete a payment change by customer.
|
|
101
|
-
* @summary Request payment setup complete by customer
|
|
102
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
103
|
-
* @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
|
|
104
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
105
|
-
* @param {*} [options] Override http request option.
|
|
106
|
-
* @throws {RequiredError}
|
|
107
|
-
*/
|
|
108
|
-
completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
|
|
109
|
-
if (options === void 0) { options = {}; }
|
|
110
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
-
return __generator(this, function (_a) {
|
|
113
|
-
// verify required parameter 'customerCode' is not null or undefined
|
|
114
|
-
(0, common_1.assertParamExists)('completePaymentSetup', 'customerCode', customerCode);
|
|
115
|
-
// verify required parameter 'completePaymentSetupPspRequest' is not null or undefined
|
|
116
|
-
(0, common_1.assertParamExists)('completePaymentSetup', 'completePaymentSetupPspRequest', completePaymentSetupPspRequest);
|
|
117
|
-
localVarPath = "/v1/customers/{customerCode}/payment_setup/complete"
|
|
118
|
-
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
119
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
120
|
-
if (configuration) {
|
|
121
|
-
baseOptions = configuration.baseOptions;
|
|
122
|
-
baseAccessToken = configuration.accessToken;
|
|
123
|
-
}
|
|
124
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
125
|
-
localVarHeaderParameter = {};
|
|
126
|
-
localVarQueryParameter = {};
|
|
127
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
128
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
129
|
-
}
|
|
130
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
131
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
132
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
133
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
134
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(completePaymentSetupPspRequest, localVarRequestOptions, configuration);
|
|
135
|
-
return [2 /*return*/, {
|
|
136
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
137
|
-
options: localVarRequestOptions,
|
|
138
|
-
}];
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
},
|
|
142
|
-
/**
|
|
143
|
-
* 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.
|
|
144
|
-
* @summary Register a customer after invite
|
|
145
|
-
* @param {CreateCustomerRequestDto} createCustomerRequestDto
|
|
146
|
-
* @param {*} [options] Override http request option.
|
|
147
|
-
* @throws {RequiredError}
|
|
148
|
-
*/
|
|
149
|
-
createCustomer: function (createCustomerRequestDto, options) {
|
|
150
|
-
if (options === void 0) { options = {}; }
|
|
151
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
152
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
153
|
-
return __generator(this, function (_a) {
|
|
154
|
-
// verify required parameter 'createCustomerRequestDto' is not null or undefined
|
|
155
|
-
(0, common_1.assertParamExists)('createCustomer', 'createCustomerRequestDto', createCustomerRequestDto);
|
|
156
|
-
localVarPath = "/v1/customers/create";
|
|
157
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
158
|
-
if (configuration) {
|
|
159
|
-
baseOptions = configuration.baseOptions;
|
|
160
|
-
baseAccessToken = configuration.accessToken;
|
|
161
|
-
}
|
|
162
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
163
|
-
localVarHeaderParameter = {};
|
|
164
|
-
localVarQueryParameter = {};
|
|
165
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
166
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
167
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
168
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
169
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCustomerRequestDto, localVarRequestOptions, configuration);
|
|
170
|
-
return [2 /*return*/, {
|
|
171
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
172
|
-
options: localVarRequestOptions,
|
|
173
|
-
}];
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
},
|
|
177
|
-
/**
|
|
178
|
-
* Send a customer a reset-password token via email.
|
|
179
|
-
* @summary Forgot password by customer
|
|
180
|
-
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
181
|
-
* @param {*} [options] Override http request option.
|
|
182
|
-
* @throws {RequiredError}
|
|
183
|
-
*/
|
|
184
|
-
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
185
|
-
if (options === void 0) { options = {}; }
|
|
186
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
187
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
188
|
-
return __generator(this, function (_a) {
|
|
189
|
-
// verify required parameter 'forgotPasswordRequestDto' is not null or undefined
|
|
190
|
-
(0, common_1.assertParamExists)('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto);
|
|
191
|
-
localVarPath = "/v1/customers/forgot-password";
|
|
192
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
193
|
-
if (configuration) {
|
|
194
|
-
baseOptions = configuration.baseOptions;
|
|
195
|
-
baseAccessToken = configuration.accessToken;
|
|
196
|
-
}
|
|
197
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
198
|
-
localVarHeaderParameter = {};
|
|
199
|
-
localVarQueryParameter = {};
|
|
200
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
201
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
202
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
203
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
204
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(forgotPasswordRequestDto, localVarRequestOptions, configuration);
|
|
205
|
-
return [2 /*return*/, {
|
|
206
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
207
|
-
options: localVarRequestOptions,
|
|
208
|
-
}];
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
},
|
|
212
99
|
/**
|
|
213
100
|
* Get customer details.
|
|
214
101
|
* @summary Get customer details
|
|
@@ -252,181 +139,31 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
252
139
|
});
|
|
253
140
|
},
|
|
254
141
|
/**
|
|
255
|
-
*
|
|
256
|
-
* @summary
|
|
257
|
-
* @param {string} documentCode The document code.
|
|
258
|
-
* @param {string} customerCode
|
|
259
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
260
|
-
* @param {*} [options] Override http request option.
|
|
261
|
-
* @throws {RequiredError}
|
|
262
|
-
*/
|
|
263
|
-
getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, 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 'documentCode' is not null or undefined
|
|
269
|
-
(0, common_1.assertParamExists)('getCustomerDocumentDownloadUrl', 'documentCode', documentCode);
|
|
270
|
-
// verify required parameter 'customerCode' is not null or undefined
|
|
271
|
-
(0, common_1.assertParamExists)('getCustomerDocumentDownloadUrl', 'customerCode', customerCode);
|
|
272
|
-
localVarPath = "/v1/customers/{customerCode}/documents/{documentCode}/download-url"
|
|
273
|
-
.replace("{".concat("documentCode", "}"), encodeURIComponent(String(documentCode)))
|
|
274
|
-
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
275
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
276
|
-
if (configuration) {
|
|
277
|
-
baseOptions = configuration.baseOptions;
|
|
278
|
-
baseAccessToken = configuration.accessToken;
|
|
279
|
-
}
|
|
280
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
281
|
-
localVarHeaderParameter = {};
|
|
282
|
-
localVarQueryParameter = {};
|
|
283
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
284
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
285
|
-
}
|
|
286
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
287
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
288
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
289
|
-
return [2 /*return*/, {
|
|
290
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
291
|
-
options: localVarRequestOptions,
|
|
292
|
-
}];
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
},
|
|
296
|
-
/**
|
|
297
|
-
* Start auth process to get new access token, refresh token after successful login.
|
|
298
|
-
* @summary Initiate auth by customer
|
|
299
|
-
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
300
|
-
* @param {*} [options] Override http request option.
|
|
301
|
-
* @throws {RequiredError}
|
|
302
|
-
*/
|
|
303
|
-
initiateAuth: function (initiateAuthRequestDto, options) {
|
|
304
|
-
if (options === void 0) { options = {}; }
|
|
305
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
306
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
307
|
-
return __generator(this, function (_a) {
|
|
308
|
-
// verify required parameter 'initiateAuthRequestDto' is not null or undefined
|
|
309
|
-
(0, common_1.assertParamExists)('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto);
|
|
310
|
-
localVarPath = "/v1/customers/auth/initiate";
|
|
311
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
312
|
-
if (configuration) {
|
|
313
|
-
baseOptions = configuration.baseOptions;
|
|
314
|
-
baseAccessToken = configuration.accessToken;
|
|
315
|
-
}
|
|
316
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
317
|
-
localVarHeaderParameter = {};
|
|
318
|
-
localVarQueryParameter = {};
|
|
319
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
320
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
321
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
322
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
323
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateAuthRequestDto, localVarRequestOptions, configuration);
|
|
324
|
-
return [2 /*return*/, {
|
|
325
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
326
|
-
options: localVarRequestOptions,
|
|
327
|
-
}];
|
|
328
|
-
});
|
|
329
|
-
});
|
|
330
|
-
},
|
|
331
|
-
/**
|
|
332
|
-
* Request to initiate a payment change by customer.
|
|
333
|
-
* @summary Request payment setup initiation by customer
|
|
142
|
+
* Update customer details like phone, email, names, addresses etc.
|
|
143
|
+
* @summary Update customer details
|
|
334
144
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
145
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
335
146
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
336
147
|
* @param {*} [options] Override http request option.
|
|
337
148
|
* @throws {RequiredError}
|
|
338
149
|
*/
|
|
339
|
-
|
|
150
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
340
151
|
if (options === void 0) { options = {}; }
|
|
341
152
|
return __awaiter(_this, void 0, void 0, function () {
|
|
342
153
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
343
154
|
return __generator(this, function (_a) {
|
|
344
155
|
// verify required parameter 'customerCode' is not null or undefined
|
|
345
|
-
(0, common_1.assertParamExists)('
|
|
346
|
-
|
|
156
|
+
(0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
|
|
157
|
+
// verify required parameter 'updateCustomerRequestDto' is not null or undefined
|
|
158
|
+
(0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
|
|
159
|
+
localVarPath = "/v1/customers/{customerCode}"
|
|
347
160
|
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
348
161
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
349
162
|
if (configuration) {
|
|
350
163
|
baseOptions = configuration.baseOptions;
|
|
351
164
|
baseAccessToken = configuration.accessToken;
|
|
352
165
|
}
|
|
353
|
-
localVarRequestOptions = __assign(__assign({ method: '
|
|
354
|
-
localVarHeaderParameter = {};
|
|
355
|
-
localVarQueryParameter = {};
|
|
356
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
357
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
358
|
-
}
|
|
359
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
360
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
361
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
362
|
-
return [2 /*return*/, {
|
|
363
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
364
|
-
options: localVarRequestOptions,
|
|
365
|
-
}];
|
|
366
|
-
});
|
|
367
|
-
});
|
|
368
|
-
},
|
|
369
|
-
/**
|
|
370
|
-
* 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.
|
|
371
|
-
* @summary Invite a customer by self
|
|
372
|
-
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
373
|
-
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
|
|
374
|
-
* @param {*} [options] Override http request option.
|
|
375
|
-
* @throws {RequiredError}
|
|
376
|
-
*/
|
|
377
|
-
inviteByCustomer: function (inviteByCustomerRequestDto, authorization, options) {
|
|
378
|
-
if (options === void 0) { options = {}; }
|
|
379
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
380
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
381
|
-
return __generator(this, function (_a) {
|
|
382
|
-
// verify required parameter 'inviteByCustomerRequestDto' is not null or undefined
|
|
383
|
-
(0, common_1.assertParamExists)('inviteByCustomer', 'inviteByCustomerRequestDto', inviteByCustomerRequestDto);
|
|
384
|
-
localVarPath = "/v1/customers/invites/by-customer";
|
|
385
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
386
|
-
if (configuration) {
|
|
387
|
-
baseOptions = configuration.baseOptions;
|
|
388
|
-
baseAccessToken = configuration.accessToken;
|
|
389
|
-
}
|
|
390
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
391
|
-
localVarHeaderParameter = {};
|
|
392
|
-
localVarQueryParameter = {};
|
|
393
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
394
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
395
|
-
}
|
|
396
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
397
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
398
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
399
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
400
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(inviteByCustomerRequestDto, localVarRequestOptions, configuration);
|
|
401
|
-
return [2 /*return*/, {
|
|
402
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
403
|
-
options: localVarRequestOptions,
|
|
404
|
-
}];
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
},
|
|
408
|
-
/**
|
|
409
|
-
* 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.
|
|
410
|
-
* @summary Invite a customer by tenant
|
|
411
|
-
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
412
|
-
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
|
|
413
|
-
* @param {*} [options] Override http request option.
|
|
414
|
-
* @throws {RequiredError}
|
|
415
|
-
*/
|
|
416
|
-
inviteByTenant: function (inviteByCustomerRequestDto, authorization, options) {
|
|
417
|
-
if (options === void 0) { options = {}; }
|
|
418
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
419
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
420
|
-
return __generator(this, function (_a) {
|
|
421
|
-
// verify required parameter 'inviteByCustomerRequestDto' is not null or undefined
|
|
422
|
-
(0, common_1.assertParamExists)('inviteByTenant', 'inviteByCustomerRequestDto', inviteByCustomerRequestDto);
|
|
423
|
-
localVarPath = "/v1/customers/invites/by-tenant";
|
|
424
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
425
|
-
if (configuration) {
|
|
426
|
-
baseOptions = configuration.baseOptions;
|
|
427
|
-
baseAccessToken = configuration.accessToken;
|
|
428
|
-
}
|
|
429
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
166
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
430
167
|
localVarHeaderParameter = {};
|
|
431
168
|
localVarQueryParameter = {};
|
|
432
169
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
@@ -436,389 +173,7 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
436
173
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
437
174
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
438
175
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
439
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
440
|
-
return [2 /*return*/, {
|
|
441
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
442
|
-
options: localVarRequestOptions,
|
|
443
|
-
}];
|
|
444
|
-
});
|
|
445
|
-
});
|
|
446
|
-
},
|
|
447
|
-
/**
|
|
448
|
-
* List all the documents of a customer.
|
|
449
|
-
* @summary List documents of a customer
|
|
450
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
451
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
452
|
-
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
453
|
-
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
454
|
-
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
455
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
456
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
457
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
458
|
-
* @param {*} [options] Override http request option.
|
|
459
|
-
* @throws {RequiredError}
|
|
460
|
-
*/
|
|
461
|
-
listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
462
|
-
if (options === void 0) { options = {}; }
|
|
463
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
464
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
465
|
-
return __generator(this, function (_a) {
|
|
466
|
-
// verify required parameter 'customerCode' is not null or undefined
|
|
467
|
-
(0, common_1.assertParamExists)('listDocuments', 'customerCode', customerCode);
|
|
468
|
-
localVarPath = "/v1/customers/{customerCode}/documents"
|
|
469
|
-
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
470
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
471
|
-
if (configuration) {
|
|
472
|
-
baseOptions = configuration.baseOptions;
|
|
473
|
-
baseAccessToken = configuration.accessToken;
|
|
474
|
-
}
|
|
475
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
476
|
-
localVarHeaderParameter = {};
|
|
477
|
-
localVarQueryParameter = {};
|
|
478
|
-
if (pageSize !== undefined) {
|
|
479
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
480
|
-
}
|
|
481
|
-
if (pageToken !== undefined) {
|
|
482
|
-
localVarQueryParameter['pageToken'] = pageToken;
|
|
483
|
-
}
|
|
484
|
-
if (filter !== undefined) {
|
|
485
|
-
localVarQueryParameter['filter'] = filter;
|
|
486
|
-
}
|
|
487
|
-
if (search !== undefined) {
|
|
488
|
-
localVarQueryParameter['search'] = search;
|
|
489
|
-
}
|
|
490
|
-
if (order !== undefined) {
|
|
491
|
-
localVarQueryParameter['order'] = order;
|
|
492
|
-
}
|
|
493
|
-
if (expand !== undefined) {
|
|
494
|
-
localVarQueryParameter['expand'] = expand;
|
|
495
|
-
}
|
|
496
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
497
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
498
|
-
}
|
|
499
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
500
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
501
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
502
|
-
return [2 /*return*/, {
|
|
503
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
504
|
-
options: localVarRequestOptions,
|
|
505
|
-
}];
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
},
|
|
509
|
-
/**
|
|
510
|
-
* List all the invoices of a customer.
|
|
511
|
-
* @summary List invoices of a customer
|
|
512
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
513
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
514
|
-
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
515
|
-
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
516
|
-
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
517
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
518
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
519
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
520
|
-
* @param {*} [options] Override http request option.
|
|
521
|
-
* @throws {RequiredError}
|
|
522
|
-
*/
|
|
523
|
-
listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
524
|
-
if (options === void 0) { options = {}; }
|
|
525
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
526
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
527
|
-
return __generator(this, function (_a) {
|
|
528
|
-
// verify required parameter 'customerCode' is not null or undefined
|
|
529
|
-
(0, common_1.assertParamExists)('listInvoices', 'customerCode', customerCode);
|
|
530
|
-
localVarPath = "/v1/customers/{customerCode}/invoices"
|
|
531
|
-
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
532
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
533
|
-
if (configuration) {
|
|
534
|
-
baseOptions = configuration.baseOptions;
|
|
535
|
-
baseAccessToken = configuration.accessToken;
|
|
536
|
-
}
|
|
537
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
538
|
-
localVarHeaderParameter = {};
|
|
539
|
-
localVarQueryParameter = {};
|
|
540
|
-
if (pageSize !== undefined) {
|
|
541
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
542
|
-
}
|
|
543
|
-
if (pageToken !== undefined) {
|
|
544
|
-
localVarQueryParameter['pageToken'] = pageToken;
|
|
545
|
-
}
|
|
546
|
-
if (filter !== undefined) {
|
|
547
|
-
localVarQueryParameter['filter'] = filter;
|
|
548
|
-
}
|
|
549
|
-
if (search !== undefined) {
|
|
550
|
-
localVarQueryParameter['search'] = search;
|
|
551
|
-
}
|
|
552
|
-
if (order !== undefined) {
|
|
553
|
-
localVarQueryParameter['order'] = order;
|
|
554
|
-
}
|
|
555
|
-
if (expand !== undefined) {
|
|
556
|
-
localVarQueryParameter['expand'] = expand;
|
|
557
|
-
}
|
|
558
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
559
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
560
|
-
}
|
|
561
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
562
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
563
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
564
|
-
return [2 /*return*/, {
|
|
565
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
566
|
-
options: localVarRequestOptions,
|
|
567
|
-
}];
|
|
568
|
-
});
|
|
569
|
-
});
|
|
570
|
-
},
|
|
571
|
-
/**
|
|
572
|
-
* Get new access token, new refresh token.
|
|
573
|
-
* @summary Refresh token by customer
|
|
574
|
-
* @param {RefreshTokenDto} refreshTokenDto
|
|
575
|
-
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
576
|
-
* @param {*} [options] Override http request option.
|
|
577
|
-
* @throws {RequiredError}
|
|
578
|
-
*/
|
|
579
|
-
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
580
|
-
if (options === void 0) { options = {}; }
|
|
581
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
582
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
583
|
-
return __generator(this, function (_a) {
|
|
584
|
-
// verify required parameter 'refreshTokenDto' is not null or undefined
|
|
585
|
-
(0, common_1.assertParamExists)('refreshToken', 'refreshTokenDto', refreshTokenDto);
|
|
586
|
-
localVarPath = "/v1/customers/refresh-token";
|
|
587
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
588
|
-
if (configuration) {
|
|
589
|
-
baseOptions = configuration.baseOptions;
|
|
590
|
-
baseAccessToken = configuration.accessToken;
|
|
591
|
-
}
|
|
592
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
593
|
-
localVarHeaderParameter = {};
|
|
594
|
-
localVarQueryParameter = {};
|
|
595
|
-
if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
596
|
-
localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
|
|
597
|
-
}
|
|
598
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
599
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
600
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
601
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
602
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenDto, localVarRequestOptions, configuration);
|
|
603
|
-
return [2 /*return*/, {
|
|
604
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
605
|
-
options: localVarRequestOptions,
|
|
606
|
-
}];
|
|
607
|
-
});
|
|
608
|
-
});
|
|
609
|
-
},
|
|
610
|
-
/**
|
|
611
|
-
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
612
|
-
* @summary Change password by customer
|
|
613
|
-
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
614
|
-
* @param {*} [options] Override http request option.
|
|
615
|
-
* @throws {RequiredError}
|
|
616
|
-
*/
|
|
617
|
-
resetPassword: function (resetPasswordByCustomerRequestDto, options) {
|
|
618
|
-
if (options === void 0) { options = {}; }
|
|
619
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
620
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
621
|
-
return __generator(this, function (_a) {
|
|
622
|
-
// verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
|
|
623
|
-
(0, common_1.assertParamExists)('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto);
|
|
624
|
-
localVarPath = "/v1/customers/reset-password";
|
|
625
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
626
|
-
if (configuration) {
|
|
627
|
-
baseOptions = configuration.baseOptions;
|
|
628
|
-
baseAccessToken = configuration.accessToken;
|
|
629
|
-
}
|
|
630
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
631
|
-
localVarHeaderParameter = {};
|
|
632
|
-
localVarQueryParameter = {};
|
|
633
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
634
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
635
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
636
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
637
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration);
|
|
638
|
-
return [2 /*return*/, {
|
|
639
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
640
|
-
options: localVarRequestOptions,
|
|
641
|
-
}];
|
|
642
|
-
});
|
|
643
|
-
});
|
|
644
|
-
},
|
|
645
|
-
/**
|
|
646
|
-
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
647
|
-
* @summary Respond to auth challenge by customer
|
|
648
|
-
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
649
|
-
* @param {*} [options] Override http request option.
|
|
650
|
-
* @throws {RequiredError}
|
|
651
|
-
*/
|
|
652
|
-
respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
|
|
653
|
-
if (options === void 0) { options = {}; }
|
|
654
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
655
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
656
|
-
return __generator(this, function (_a) {
|
|
657
|
-
// verify required parameter 'respondToAuthChallengeRequestDto' is not null or undefined
|
|
658
|
-
(0, common_1.assertParamExists)('respondToAuthChallenge', 'respondToAuthChallengeRequestDto', respondToAuthChallengeRequestDto);
|
|
659
|
-
localVarPath = "/v1/customers/auth/respond";
|
|
660
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
661
|
-
if (configuration) {
|
|
662
|
-
baseOptions = configuration.baseOptions;
|
|
663
|
-
baseAccessToken = configuration.accessToken;
|
|
664
|
-
}
|
|
665
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
666
|
-
localVarHeaderParameter = {};
|
|
667
|
-
localVarQueryParameter = {};
|
|
668
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
669
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
670
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
671
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
672
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(respondToAuthChallengeRequestDto, localVarRequestOptions, configuration);
|
|
673
|
-
return [2 /*return*/, {
|
|
674
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
675
|
-
options: localVarRequestOptions,
|
|
676
|
-
}];
|
|
677
|
-
});
|
|
678
|
-
});
|
|
679
|
-
},
|
|
680
|
-
/**
|
|
681
|
-
* Update customer details like phone, email, names, addresses etc.
|
|
682
|
-
* @summary Update customer details
|
|
683
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
684
|
-
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
685
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
686
|
-
* @param {*} [options] Override http request option.
|
|
687
|
-
* @throws {RequiredError}
|
|
688
|
-
*/
|
|
689
|
-
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
690
|
-
if (options === void 0) { options = {}; }
|
|
691
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
692
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
693
|
-
return __generator(this, function (_a) {
|
|
694
|
-
// verify required parameter 'customerCode' is not null or undefined
|
|
695
|
-
(0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
|
|
696
|
-
// verify required parameter 'updateCustomerRequestDto' is not null or undefined
|
|
697
|
-
(0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
|
|
698
|
-
localVarPath = "/v1/customers/{customerCode}"
|
|
699
|
-
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
700
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
701
|
-
if (configuration) {
|
|
702
|
-
baseOptions = configuration.baseOptions;
|
|
703
|
-
baseAccessToken = configuration.accessToken;
|
|
704
|
-
}
|
|
705
|
-
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
706
|
-
localVarHeaderParameter = {};
|
|
707
|
-
localVarQueryParameter = {};
|
|
708
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
709
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
710
|
-
}
|
|
711
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
712
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
713
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
714
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
715
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
|
|
716
|
-
return [2 /*return*/, {
|
|
717
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
718
|
-
options: localVarRequestOptions,
|
|
719
|
-
}];
|
|
720
|
-
});
|
|
721
|
-
});
|
|
722
|
-
},
|
|
723
|
-
/**
|
|
724
|
-
* API to upload and attach documents to an account.
|
|
725
|
-
* @summary Upload account documents
|
|
726
|
-
* @param {string} customerCode
|
|
727
|
-
* @param {*} [options] Override http request option.
|
|
728
|
-
* @throws {RequiredError}
|
|
729
|
-
*/
|
|
730
|
-
uploadAccountDocuments: function (customerCode, options) {
|
|
731
|
-
if (options === void 0) { options = {}; }
|
|
732
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
733
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
734
|
-
return __generator(this, function (_a) {
|
|
735
|
-
// verify required parameter 'customerCode' is not null or undefined
|
|
736
|
-
(0, common_1.assertParamExists)('uploadAccountDocuments', 'customerCode', customerCode);
|
|
737
|
-
localVarPath = "/v1/customers/{customerCode}/documents"
|
|
738
|
-
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
739
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
740
|
-
if (configuration) {
|
|
741
|
-
baseOptions = configuration.baseOptions;
|
|
742
|
-
baseAccessToken = configuration.accessToken;
|
|
743
|
-
}
|
|
744
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
745
|
-
localVarHeaderParameter = {};
|
|
746
|
-
localVarQueryParameter = {};
|
|
747
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
748
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
749
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
750
|
-
return [2 /*return*/, {
|
|
751
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
752
|
-
options: localVarRequestOptions,
|
|
753
|
-
}];
|
|
754
|
-
});
|
|
755
|
-
});
|
|
756
|
-
},
|
|
757
|
-
/**
|
|
758
|
-
* Verify the invite sent to the customer via email.
|
|
759
|
-
* @summary Verify customer\'s invite token
|
|
760
|
-
* @param {string} inviteToken Invite token sent to the customer
|
|
761
|
-
* @param {*} [options] Override http request option.
|
|
762
|
-
* @throws {RequiredError}
|
|
763
|
-
*/
|
|
764
|
-
verifyInvite: function (inviteToken, options) {
|
|
765
|
-
if (options === void 0) { options = {}; }
|
|
766
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
767
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
768
|
-
return __generator(this, function (_a) {
|
|
769
|
-
// verify required parameter 'inviteToken' is not null or undefined
|
|
770
|
-
(0, common_1.assertParamExists)('verifyInvite', 'inviteToken', inviteToken);
|
|
771
|
-
localVarPath = "/v1/customers/invites/verify";
|
|
772
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
773
|
-
if (configuration) {
|
|
774
|
-
baseOptions = configuration.baseOptions;
|
|
775
|
-
baseAccessToken = configuration.accessToken;
|
|
776
|
-
}
|
|
777
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
778
|
-
localVarHeaderParameter = {};
|
|
779
|
-
localVarQueryParameter = {};
|
|
780
|
-
if (inviteToken !== undefined) {
|
|
781
|
-
localVarQueryParameter['inviteToken'] = inviteToken;
|
|
782
|
-
}
|
|
783
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
784
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
785
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
786
|
-
return [2 /*return*/, {
|
|
787
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
788
|
-
options: localVarRequestOptions,
|
|
789
|
-
}];
|
|
790
|
-
});
|
|
791
|
-
});
|
|
792
|
-
},
|
|
793
|
-
/**
|
|
794
|
-
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
795
|
-
* @summary Verify a reset password token
|
|
796
|
-
* @param {string} resetToken reset password token
|
|
797
|
-
* @param {*} [options] Override http request option.
|
|
798
|
-
* @throws {RequiredError}
|
|
799
|
-
*/
|
|
800
|
-
verifyResetPasswordToken: function (resetToken, options) {
|
|
801
|
-
if (options === void 0) { options = {}; }
|
|
802
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
803
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
804
|
-
return __generator(this, function (_a) {
|
|
805
|
-
// verify required parameter 'resetToken' is not null or undefined
|
|
806
|
-
(0, common_1.assertParamExists)('verifyResetPasswordToken', 'resetToken', resetToken);
|
|
807
|
-
localVarPath = "/v1/customers/verify-reset-password";
|
|
808
|
-
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
809
|
-
if (configuration) {
|
|
810
|
-
baseOptions = configuration.baseOptions;
|
|
811
|
-
baseAccessToken = configuration.accessToken;
|
|
812
|
-
}
|
|
813
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
814
|
-
localVarHeaderParameter = {};
|
|
815
|
-
localVarQueryParameter = {};
|
|
816
|
-
if (resetToken !== undefined) {
|
|
817
|
-
localVarQueryParameter['resetToken'] = resetToken;
|
|
818
|
-
}
|
|
819
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
820
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
821
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
176
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
|
|
822
177
|
return [2 /*return*/, {
|
|
823
178
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
824
179
|
options: localVarRequestOptions,
|
|
@@ -833,306 +188,24 @@ exports.CustomersApiAxiosParamCreator = CustomersApiAxiosParamCreator;
|
|
|
833
188
|
* CustomersApi - functional programming interface
|
|
834
189
|
* @export
|
|
835
190
|
*/
|
|
836
|
-
var CustomersApiFp = function (configuration) {
|
|
837
|
-
var localVarAxiosParamCreator = (0, exports.CustomersApiAxiosParamCreator)(configuration);
|
|
838
|
-
return {
|
|
839
|
-
/**
|
|
840
|
-
* Request to complete a payment change by customer.
|
|
841
|
-
* @summary Request payment setup complete by customer
|
|
842
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
843
|
-
* @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
|
|
844
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
845
|
-
* @param {*} [options] Override http request option.
|
|
846
|
-
* @throws {RequiredError}
|
|
847
|
-
*/
|
|
848
|
-
completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
|
|
849
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
850
|
-
var localVarAxiosArgs;
|
|
851
|
-
return __generator(this, function (_a) {
|
|
852
|
-
switch (_a.label) {
|
|
853
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options)];
|
|
854
|
-
case 1:
|
|
855
|
-
localVarAxiosArgs = _a.sent();
|
|
856
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
});
|
|
860
|
-
},
|
|
861
|
-
/**
|
|
862
|
-
* 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.
|
|
863
|
-
* @summary Register a customer after invite
|
|
864
|
-
* @param {CreateCustomerRequestDto} createCustomerRequestDto
|
|
865
|
-
* @param {*} [options] Override http request option.
|
|
866
|
-
* @throws {RequiredError}
|
|
867
|
-
*/
|
|
868
|
-
createCustomer: function (createCustomerRequestDto, options) {
|
|
869
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
870
|
-
var localVarAxiosArgs;
|
|
871
|
-
return __generator(this, function (_a) {
|
|
872
|
-
switch (_a.label) {
|
|
873
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCustomer(createCustomerRequestDto, options)];
|
|
874
|
-
case 1:
|
|
875
|
-
localVarAxiosArgs = _a.sent();
|
|
876
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
877
|
-
}
|
|
878
|
-
});
|
|
879
|
-
});
|
|
880
|
-
},
|
|
881
|
-
/**
|
|
882
|
-
* Send a customer a reset-password token via email.
|
|
883
|
-
* @summary Forgot password by customer
|
|
884
|
-
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
885
|
-
* @param {*} [options] Override http request option.
|
|
886
|
-
* @throws {RequiredError}
|
|
887
|
-
*/
|
|
888
|
-
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
889
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
890
|
-
var localVarAxiosArgs;
|
|
891
|
-
return __generator(this, function (_a) {
|
|
892
|
-
switch (_a.label) {
|
|
893
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options)];
|
|
894
|
-
case 1:
|
|
895
|
-
localVarAxiosArgs = _a.sent();
|
|
896
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
|
-
});
|
|
900
|
-
},
|
|
901
|
-
/**
|
|
902
|
-
* Get customer details.
|
|
903
|
-
* @summary Get customer details
|
|
904
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
905
|
-
* @param {string} [expand] Fields to expand response by - [account]
|
|
906
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
907
|
-
* @param {*} [options] Override http request option.
|
|
908
|
-
* @throws {RequiredError}
|
|
909
|
-
*/
|
|
910
|
-
getCustomer: function (customerCode, expand, authorization, options) {
|
|
911
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
912
|
-
var localVarAxiosArgs;
|
|
913
|
-
return __generator(this, function (_a) {
|
|
914
|
-
switch (_a.label) {
|
|
915
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options)];
|
|
916
|
-
case 1:
|
|
917
|
-
localVarAxiosArgs = _a.sent();
|
|
918
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
919
|
-
}
|
|
920
|
-
});
|
|
921
|
-
});
|
|
922
|
-
},
|
|
923
|
-
/**
|
|
924
|
-
* Get a presigned download url for document.
|
|
925
|
-
* @summary Get a presigned download url for document
|
|
926
|
-
* @param {string} documentCode The document code.
|
|
927
|
-
* @param {string} customerCode
|
|
928
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
929
|
-
* @param {*} [options] Override http request option.
|
|
930
|
-
* @throws {RequiredError}
|
|
931
|
-
*/
|
|
932
|
-
getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, options) {
|
|
933
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
934
|
-
var localVarAxiosArgs;
|
|
935
|
-
return __generator(this, function (_a) {
|
|
936
|
-
switch (_a.label) {
|
|
937
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options)];
|
|
938
|
-
case 1:
|
|
939
|
-
localVarAxiosArgs = _a.sent();
|
|
940
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
941
|
-
}
|
|
942
|
-
});
|
|
943
|
-
});
|
|
944
|
-
},
|
|
945
|
-
/**
|
|
946
|
-
* Start auth process to get new access token, refresh token after successful login.
|
|
947
|
-
* @summary Initiate auth by customer
|
|
948
|
-
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
949
|
-
* @param {*} [options] Override http request option.
|
|
950
|
-
* @throws {RequiredError}
|
|
951
|
-
*/
|
|
952
|
-
initiateAuth: function (initiateAuthRequestDto, options) {
|
|
953
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
954
|
-
var localVarAxiosArgs;
|
|
955
|
-
return __generator(this, function (_a) {
|
|
956
|
-
switch (_a.label) {
|
|
957
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options)];
|
|
958
|
-
case 1:
|
|
959
|
-
localVarAxiosArgs = _a.sent();
|
|
960
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
961
|
-
}
|
|
962
|
-
});
|
|
963
|
-
});
|
|
964
|
-
},
|
|
965
|
-
/**
|
|
966
|
-
* Request to initiate a payment change by customer.
|
|
967
|
-
* @summary Request payment setup initiation by customer
|
|
968
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
969
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
970
|
-
* @param {*} [options] Override http request option.
|
|
971
|
-
* @throws {RequiredError}
|
|
972
|
-
*/
|
|
973
|
-
initiatePaymentSetup: function (customerCode, authorization, options) {
|
|
974
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
975
|
-
var localVarAxiosArgs;
|
|
976
|
-
return __generator(this, function (_a) {
|
|
977
|
-
switch (_a.label) {
|
|
978
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiatePaymentSetup(customerCode, authorization, options)];
|
|
979
|
-
case 1:
|
|
980
|
-
localVarAxiosArgs = _a.sent();
|
|
981
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
982
|
-
}
|
|
983
|
-
});
|
|
984
|
-
});
|
|
985
|
-
},
|
|
986
|
-
/**
|
|
987
|
-
* 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.
|
|
988
|
-
* @summary Invite a customer by self
|
|
989
|
-
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
990
|
-
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
|
|
991
|
-
* @param {*} [options] Override http request option.
|
|
992
|
-
* @throws {RequiredError}
|
|
993
|
-
*/
|
|
994
|
-
inviteByCustomer: function (inviteByCustomerRequestDto, authorization, options) {
|
|
995
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
996
|
-
var localVarAxiosArgs;
|
|
997
|
-
return __generator(this, function (_a) {
|
|
998
|
-
switch (_a.label) {
|
|
999
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.inviteByCustomer(inviteByCustomerRequestDto, authorization, options)];
|
|
1000
|
-
case 1:
|
|
1001
|
-
localVarAxiosArgs = _a.sent();
|
|
1002
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1003
|
-
}
|
|
1004
|
-
});
|
|
1005
|
-
});
|
|
1006
|
-
},
|
|
1007
|
-
/**
|
|
1008
|
-
* 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.
|
|
1009
|
-
* @summary Invite a customer by tenant
|
|
1010
|
-
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
1011
|
-
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
|
|
1012
|
-
* @param {*} [options] Override http request option.
|
|
1013
|
-
* @throws {RequiredError}
|
|
1014
|
-
*/
|
|
1015
|
-
inviteByTenant: function (inviteByCustomerRequestDto, authorization, options) {
|
|
1016
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1017
|
-
var localVarAxiosArgs;
|
|
1018
|
-
return __generator(this, function (_a) {
|
|
1019
|
-
switch (_a.label) {
|
|
1020
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.inviteByTenant(inviteByCustomerRequestDto, authorization, options)];
|
|
1021
|
-
case 1:
|
|
1022
|
-
localVarAxiosArgs = _a.sent();
|
|
1023
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1024
|
-
}
|
|
1025
|
-
});
|
|
1026
|
-
});
|
|
1027
|
-
},
|
|
1028
|
-
/**
|
|
1029
|
-
* List all the documents of a customer.
|
|
1030
|
-
* @summary List documents of a customer
|
|
1031
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
1032
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
1033
|
-
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
1034
|
-
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
1035
|
-
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
1036
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
1037
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
1038
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1039
|
-
* @param {*} [options] Override http request option.
|
|
1040
|
-
* @throws {RequiredError}
|
|
1041
|
-
*/
|
|
1042
|
-
listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
1043
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1044
|
-
var localVarAxiosArgs;
|
|
1045
|
-
return __generator(this, function (_a) {
|
|
1046
|
-
switch (_a.label) {
|
|
1047
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
|
|
1048
|
-
case 1:
|
|
1049
|
-
localVarAxiosArgs = _a.sent();
|
|
1050
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1051
|
-
}
|
|
1052
|
-
});
|
|
1053
|
-
});
|
|
1054
|
-
},
|
|
1055
|
-
/**
|
|
1056
|
-
* List all the invoices of a customer.
|
|
1057
|
-
* @summary List invoices of a customer
|
|
1058
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
1059
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
1060
|
-
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
1061
|
-
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
1062
|
-
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
1063
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
1064
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
1065
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1066
|
-
* @param {*} [options] Override http request option.
|
|
1067
|
-
* @throws {RequiredError}
|
|
1068
|
-
*/
|
|
1069
|
-
listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
1070
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1071
|
-
var localVarAxiosArgs;
|
|
1072
|
-
return __generator(this, function (_a) {
|
|
1073
|
-
switch (_a.label) {
|
|
1074
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
|
|
1075
|
-
case 1:
|
|
1076
|
-
localVarAxiosArgs = _a.sent();
|
|
1077
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1078
|
-
}
|
|
1079
|
-
});
|
|
1080
|
-
});
|
|
1081
|
-
},
|
|
1082
|
-
/**
|
|
1083
|
-
* Get new access token, new refresh token.
|
|
1084
|
-
* @summary Refresh token by customer
|
|
1085
|
-
* @param {RefreshTokenDto} refreshTokenDto
|
|
1086
|
-
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
1087
|
-
* @param {*} [options] Override http request option.
|
|
1088
|
-
* @throws {RequiredError}
|
|
1089
|
-
*/
|
|
1090
|
-
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
1091
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1092
|
-
var localVarAxiosArgs;
|
|
1093
|
-
return __generator(this, function (_a) {
|
|
1094
|
-
switch (_a.label) {
|
|
1095
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options)];
|
|
1096
|
-
case 1:
|
|
1097
|
-
localVarAxiosArgs = _a.sent();
|
|
1098
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1099
|
-
}
|
|
1100
|
-
});
|
|
1101
|
-
});
|
|
1102
|
-
},
|
|
1103
|
-
/**
|
|
1104
|
-
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
1105
|
-
* @summary Change password by customer
|
|
1106
|
-
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
1107
|
-
* @param {*} [options] Override http request option.
|
|
1108
|
-
* @throws {RequiredError}
|
|
1109
|
-
*/
|
|
1110
|
-
resetPassword: function (resetPasswordByCustomerRequestDto, options) {
|
|
1111
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1112
|
-
var localVarAxiosArgs;
|
|
1113
|
-
return __generator(this, function (_a) {
|
|
1114
|
-
switch (_a.label) {
|
|
1115
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options)];
|
|
1116
|
-
case 1:
|
|
1117
|
-
localVarAxiosArgs = _a.sent();
|
|
1118
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1119
|
-
}
|
|
1120
|
-
});
|
|
1121
|
-
});
|
|
1122
|
-
},
|
|
191
|
+
var CustomersApiFp = function (configuration) {
|
|
192
|
+
var localVarAxiosParamCreator = (0, exports.CustomersApiAxiosParamCreator)(configuration);
|
|
193
|
+
return {
|
|
1123
194
|
/**
|
|
1124
|
-
*
|
|
1125
|
-
* @summary
|
|
1126
|
-
* @param {
|
|
195
|
+
* Get customer details.
|
|
196
|
+
* @summary Get customer details
|
|
197
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
198
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
199
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1127
200
|
* @param {*} [options] Override http request option.
|
|
1128
201
|
* @throws {RequiredError}
|
|
1129
202
|
*/
|
|
1130
|
-
|
|
203
|
+
getCustomer: function (customerCode, expand, authorization, options) {
|
|
1131
204
|
return __awaiter(this, void 0, void 0, function () {
|
|
1132
205
|
var localVarAxiosArgs;
|
|
1133
206
|
return __generator(this, function (_a) {
|
|
1134
207
|
switch (_a.label) {
|
|
1135
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.
|
|
208
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options)];
|
|
1136
209
|
case 1:
|
|
1137
210
|
localVarAxiosArgs = _a.sent();
|
|
1138
211
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -1162,66 +235,6 @@ var CustomersApiFp = function (configuration) {
|
|
|
1162
235
|
});
|
|
1163
236
|
});
|
|
1164
237
|
},
|
|
1165
|
-
/**
|
|
1166
|
-
* API to upload and attach documents to an account.
|
|
1167
|
-
* @summary Upload account documents
|
|
1168
|
-
* @param {string} customerCode
|
|
1169
|
-
* @param {*} [options] Override http request option.
|
|
1170
|
-
* @throws {RequiredError}
|
|
1171
|
-
*/
|
|
1172
|
-
uploadAccountDocuments: function (customerCode, options) {
|
|
1173
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1174
|
-
var localVarAxiosArgs;
|
|
1175
|
-
return __generator(this, function (_a) {
|
|
1176
|
-
switch (_a.label) {
|
|
1177
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadAccountDocuments(customerCode, options)];
|
|
1178
|
-
case 1:
|
|
1179
|
-
localVarAxiosArgs = _a.sent();
|
|
1180
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1181
|
-
}
|
|
1182
|
-
});
|
|
1183
|
-
});
|
|
1184
|
-
},
|
|
1185
|
-
/**
|
|
1186
|
-
* Verify the invite sent to the customer via email.
|
|
1187
|
-
* @summary Verify customer\'s invite token
|
|
1188
|
-
* @param {string} inviteToken Invite token sent to the customer
|
|
1189
|
-
* @param {*} [options] Override http request option.
|
|
1190
|
-
* @throws {RequiredError}
|
|
1191
|
-
*/
|
|
1192
|
-
verifyInvite: function (inviteToken, options) {
|
|
1193
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1194
|
-
var localVarAxiosArgs;
|
|
1195
|
-
return __generator(this, function (_a) {
|
|
1196
|
-
switch (_a.label) {
|
|
1197
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyInvite(inviteToken, options)];
|
|
1198
|
-
case 1:
|
|
1199
|
-
localVarAxiosArgs = _a.sent();
|
|
1200
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1201
|
-
}
|
|
1202
|
-
});
|
|
1203
|
-
});
|
|
1204
|
-
},
|
|
1205
|
-
/**
|
|
1206
|
-
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
1207
|
-
* @summary Verify a reset password token
|
|
1208
|
-
* @param {string} resetToken reset password token
|
|
1209
|
-
* @param {*} [options] Override http request option.
|
|
1210
|
-
* @throws {RequiredError}
|
|
1211
|
-
*/
|
|
1212
|
-
verifyResetPasswordToken: function (resetToken, options) {
|
|
1213
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1214
|
-
var localVarAxiosArgs;
|
|
1215
|
-
return __generator(this, function (_a) {
|
|
1216
|
-
switch (_a.label) {
|
|
1217
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options)];
|
|
1218
|
-
case 1:
|
|
1219
|
-
localVarAxiosArgs = _a.sent();
|
|
1220
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1221
|
-
}
|
|
1222
|
-
});
|
|
1223
|
-
});
|
|
1224
|
-
},
|
|
1225
238
|
};
|
|
1226
239
|
};
|
|
1227
240
|
exports.CustomersApiFp = CustomersApiFp;
|
|
@@ -1232,38 +245,6 @@ exports.CustomersApiFp = CustomersApiFp;
|
|
|
1232
245
|
var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
1233
246
|
var localVarFp = (0, exports.CustomersApiFp)(configuration);
|
|
1234
247
|
return {
|
|
1235
|
-
/**
|
|
1236
|
-
* Request to complete a payment change by customer.
|
|
1237
|
-
* @summary Request payment setup complete by customer
|
|
1238
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
1239
|
-
* @param {CompletePaymentSetupPspRequest} completePaymentSetupPspRequest
|
|
1240
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1241
|
-
* @param {*} [options] Override http request option.
|
|
1242
|
-
* @throws {RequiredError}
|
|
1243
|
-
*/
|
|
1244
|
-
completePaymentSetup: function (customerCode, completePaymentSetupPspRequest, authorization, options) {
|
|
1245
|
-
return localVarFp.completePaymentSetup(customerCode, completePaymentSetupPspRequest, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1246
|
-
},
|
|
1247
|
-
/**
|
|
1248
|
-
* 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.
|
|
1249
|
-
* @summary Register a customer after invite
|
|
1250
|
-
* @param {CreateCustomerRequestDto} createCustomerRequestDto
|
|
1251
|
-
* @param {*} [options] Override http request option.
|
|
1252
|
-
* @throws {RequiredError}
|
|
1253
|
-
*/
|
|
1254
|
-
createCustomer: function (createCustomerRequestDto, options) {
|
|
1255
|
-
return localVarFp.createCustomer(createCustomerRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1256
|
-
},
|
|
1257
|
-
/**
|
|
1258
|
-
* Send a customer a reset-password token via email.
|
|
1259
|
-
* @summary Forgot password by customer
|
|
1260
|
-
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
1261
|
-
* @param {*} [options] Override http request option.
|
|
1262
|
-
* @throws {RequiredError}
|
|
1263
|
-
*/
|
|
1264
|
-
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
1265
|
-
return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1266
|
-
},
|
|
1267
248
|
/**
|
|
1268
249
|
* Get customer details.
|
|
1269
250
|
* @summary Get customer details
|
|
@@ -1276,126 +257,6 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1276
257
|
getCustomer: function (customerCode, expand, authorization, options) {
|
|
1277
258
|
return localVarFp.getCustomer(customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1278
259
|
},
|
|
1279
|
-
/**
|
|
1280
|
-
* Get a presigned download url for document.
|
|
1281
|
-
* @summary Get a presigned download url for document
|
|
1282
|
-
* @param {string} documentCode The document code.
|
|
1283
|
-
* @param {string} customerCode
|
|
1284
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1285
|
-
* @param {*} [options] Override http request option.
|
|
1286
|
-
* @throws {RequiredError}
|
|
1287
|
-
*/
|
|
1288
|
-
getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, options) {
|
|
1289
|
-
return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1290
|
-
},
|
|
1291
|
-
/**
|
|
1292
|
-
* Start auth process to get new access token, refresh token after successful login.
|
|
1293
|
-
* @summary Initiate auth by customer
|
|
1294
|
-
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
1295
|
-
* @param {*} [options] Override http request option.
|
|
1296
|
-
* @throws {RequiredError}
|
|
1297
|
-
*/
|
|
1298
|
-
initiateAuth: function (initiateAuthRequestDto, options) {
|
|
1299
|
-
return localVarFp.initiateAuth(initiateAuthRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1300
|
-
},
|
|
1301
|
-
/**
|
|
1302
|
-
* Request to initiate a payment change by customer.
|
|
1303
|
-
* @summary Request payment setup initiation by customer
|
|
1304
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
1305
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1306
|
-
* @param {*} [options] Override http request option.
|
|
1307
|
-
* @throws {RequiredError}
|
|
1308
|
-
*/
|
|
1309
|
-
initiatePaymentSetup: function (customerCode, authorization, options) {
|
|
1310
|
-
return localVarFp.initiatePaymentSetup(customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1311
|
-
},
|
|
1312
|
-
/**
|
|
1313
|
-
* 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.
|
|
1314
|
-
* @summary Invite a customer by self
|
|
1315
|
-
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
1316
|
-
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
|
|
1317
|
-
* @param {*} [options] Override http request option.
|
|
1318
|
-
* @throws {RequiredError}
|
|
1319
|
-
*/
|
|
1320
|
-
inviteByCustomer: function (inviteByCustomerRequestDto, authorization, options) {
|
|
1321
|
-
return localVarFp.inviteByCustomer(inviteByCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1322
|
-
},
|
|
1323
|
-
/**
|
|
1324
|
-
* 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.
|
|
1325
|
-
* @summary Invite a customer by tenant
|
|
1326
|
-
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
1327
|
-
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken.
|
|
1328
|
-
* @param {*} [options] Override http request option.
|
|
1329
|
-
* @throws {RequiredError}
|
|
1330
|
-
*/
|
|
1331
|
-
inviteByTenant: function (inviteByCustomerRequestDto, authorization, options) {
|
|
1332
|
-
return localVarFp.inviteByTenant(inviteByCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1333
|
-
},
|
|
1334
|
-
/**
|
|
1335
|
-
* List all the documents of a customer.
|
|
1336
|
-
* @summary List documents of a customer
|
|
1337
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
1338
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
1339
|
-
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
1340
|
-
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
1341
|
-
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
1342
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
1343
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
1344
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1345
|
-
* @param {*} [options] Override http request option.
|
|
1346
|
-
* @throws {RequiredError}
|
|
1347
|
-
*/
|
|
1348
|
-
listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
1349
|
-
return localVarFp.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1350
|
-
},
|
|
1351
|
-
/**
|
|
1352
|
-
* List all the invoices of a customer.
|
|
1353
|
-
* @summary List invoices of a customer
|
|
1354
|
-
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
1355
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
1356
|
-
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
1357
|
-
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
1358
|
-
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
1359
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
1360
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
1361
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1362
|
-
* @param {*} [options] Override http request option.
|
|
1363
|
-
* @throws {RequiredError}
|
|
1364
|
-
*/
|
|
1365
|
-
listInvoices: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
1366
|
-
return localVarFp.listInvoices(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1367
|
-
},
|
|
1368
|
-
/**
|
|
1369
|
-
* Get new access token, new refresh token.
|
|
1370
|
-
* @summary Refresh token by customer
|
|
1371
|
-
* @param {RefreshTokenDto} refreshTokenDto
|
|
1372
|
-
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
1373
|
-
* @param {*} [options] Override http request option.
|
|
1374
|
-
* @throws {RequiredError}
|
|
1375
|
-
*/
|
|
1376
|
-
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
1377
|
-
return localVarFp.refreshToken(refreshTokenDto, cookie, options).then(function (request) { return request(axios, basePath); });
|
|
1378
|
-
},
|
|
1379
|
-
/**
|
|
1380
|
-
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
1381
|
-
* @summary Change password by customer
|
|
1382
|
-
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
1383
|
-
* @param {*} [options] Override http request option.
|
|
1384
|
-
* @throws {RequiredError}
|
|
1385
|
-
*/
|
|
1386
|
-
resetPassword: function (resetPasswordByCustomerRequestDto, options) {
|
|
1387
|
-
return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1388
|
-
},
|
|
1389
|
-
/**
|
|
1390
|
-
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
1391
|
-
* @summary Respond to auth challenge by customer
|
|
1392
|
-
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
1393
|
-
* @param {*} [options] Override http request option.
|
|
1394
|
-
* @throws {RequiredError}
|
|
1395
|
-
*/
|
|
1396
|
-
respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
|
|
1397
|
-
return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1398
|
-
},
|
|
1399
260
|
/**
|
|
1400
261
|
* Update customer details like phone, email, names, addresses etc.
|
|
1401
262
|
* @summary Update customer details
|
|
@@ -1408,36 +269,6 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1408
269
|
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
1409
270
|
return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1410
271
|
},
|
|
1411
|
-
/**
|
|
1412
|
-
* API to upload and attach documents to an account.
|
|
1413
|
-
* @summary Upload account documents
|
|
1414
|
-
* @param {string} customerCode
|
|
1415
|
-
* @param {*} [options] Override http request option.
|
|
1416
|
-
* @throws {RequiredError}
|
|
1417
|
-
*/
|
|
1418
|
-
uploadAccountDocuments: function (customerCode, options) {
|
|
1419
|
-
return localVarFp.uploadAccountDocuments(customerCode, options).then(function (request) { return request(axios, basePath); });
|
|
1420
|
-
},
|
|
1421
|
-
/**
|
|
1422
|
-
* Verify the invite sent to the customer via email.
|
|
1423
|
-
* @summary Verify customer\'s invite token
|
|
1424
|
-
* @param {string} inviteToken Invite token sent to the customer
|
|
1425
|
-
* @param {*} [options] Override http request option.
|
|
1426
|
-
* @throws {RequiredError}
|
|
1427
|
-
*/
|
|
1428
|
-
verifyInvite: function (inviteToken, options) {
|
|
1429
|
-
return localVarFp.verifyInvite(inviteToken, options).then(function (request) { return request(axios, basePath); });
|
|
1430
|
-
},
|
|
1431
|
-
/**
|
|
1432
|
-
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
1433
|
-
* @summary Verify a reset password token
|
|
1434
|
-
* @param {string} resetToken reset password token
|
|
1435
|
-
* @param {*} [options] Override http request option.
|
|
1436
|
-
* @throws {RequiredError}
|
|
1437
|
-
*/
|
|
1438
|
-
verifyResetPasswordToken: function (resetToken, options) {
|
|
1439
|
-
return localVarFp.verifyResetPasswordToken(resetToken, options).then(function (request) { return request(axios, basePath); });
|
|
1440
|
-
},
|
|
1441
272
|
};
|
|
1442
273
|
};
|
|
1443
274
|
exports.CustomersApiFactory = CustomersApiFactory;
|
|
@@ -1452,42 +283,6 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1452
283
|
function CustomersApi() {
|
|
1453
284
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1454
285
|
}
|
|
1455
|
-
/**
|
|
1456
|
-
* Request to complete a payment change by customer.
|
|
1457
|
-
* @summary Request payment setup complete by customer
|
|
1458
|
-
* @param {CustomersApiCompletePaymentSetupRequest} requestParameters Request parameters.
|
|
1459
|
-
* @param {*} [options] Override http request option.
|
|
1460
|
-
* @throws {RequiredError}
|
|
1461
|
-
* @memberof CustomersApi
|
|
1462
|
-
*/
|
|
1463
|
-
CustomersApi.prototype.completePaymentSetup = function (requestParameters, options) {
|
|
1464
|
-
var _this = this;
|
|
1465
|
-
return (0, exports.CustomersApiFp)(this.configuration).completePaymentSetup(requestParameters.customerCode, requestParameters.completePaymentSetupPspRequest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1466
|
-
};
|
|
1467
|
-
/**
|
|
1468
|
-
* 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.
|
|
1469
|
-
* @summary Register a customer after invite
|
|
1470
|
-
* @param {CustomersApiCreateCustomerRequest} requestParameters Request parameters.
|
|
1471
|
-
* @param {*} [options] Override http request option.
|
|
1472
|
-
* @throws {RequiredError}
|
|
1473
|
-
* @memberof CustomersApi
|
|
1474
|
-
*/
|
|
1475
|
-
CustomersApi.prototype.createCustomer = function (requestParameters, options) {
|
|
1476
|
-
var _this = this;
|
|
1477
|
-
return (0, exports.CustomersApiFp)(this.configuration).createCustomer(requestParameters.createCustomerRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1478
|
-
};
|
|
1479
|
-
/**
|
|
1480
|
-
* Send a customer a reset-password token via email.
|
|
1481
|
-
* @summary Forgot password by customer
|
|
1482
|
-
* @param {CustomersApiForgotPasswordRequest} requestParameters Request parameters.
|
|
1483
|
-
* @param {*} [options] Override http request option.
|
|
1484
|
-
* @throws {RequiredError}
|
|
1485
|
-
* @memberof CustomersApi
|
|
1486
|
-
*/
|
|
1487
|
-
CustomersApi.prototype.forgotPassword = function (requestParameters, options) {
|
|
1488
|
-
var _this = this;
|
|
1489
|
-
return (0, exports.CustomersApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1490
|
-
};
|
|
1491
286
|
/**
|
|
1492
287
|
* Get customer details.
|
|
1493
288
|
* @summary Get customer details
|
|
@@ -1500,126 +295,6 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1500
295
|
var _this = this;
|
|
1501
296
|
return (0, exports.CustomersApiFp)(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1502
297
|
};
|
|
1503
|
-
/**
|
|
1504
|
-
* Get a presigned download url for document.
|
|
1505
|
-
* @summary Get a presigned download url for document
|
|
1506
|
-
* @param {CustomersApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
|
|
1507
|
-
* @param {*} [options] Override http request option.
|
|
1508
|
-
* @throws {RequiredError}
|
|
1509
|
-
* @memberof CustomersApi
|
|
1510
|
-
*/
|
|
1511
|
-
CustomersApi.prototype.getCustomerDocumentDownloadUrl = function (requestParameters, options) {
|
|
1512
|
-
var _this = this;
|
|
1513
|
-
return (0, exports.CustomersApiFp)(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1514
|
-
};
|
|
1515
|
-
/**
|
|
1516
|
-
* Start auth process to get new access token, refresh token after successful login.
|
|
1517
|
-
* @summary Initiate auth by customer
|
|
1518
|
-
* @param {CustomersApiInitiateAuthRequest} requestParameters Request parameters.
|
|
1519
|
-
* @param {*} [options] Override http request option.
|
|
1520
|
-
* @throws {RequiredError}
|
|
1521
|
-
* @memberof CustomersApi
|
|
1522
|
-
*/
|
|
1523
|
-
CustomersApi.prototype.initiateAuth = function (requestParameters, options) {
|
|
1524
|
-
var _this = this;
|
|
1525
|
-
return (0, exports.CustomersApiFp)(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1526
|
-
};
|
|
1527
|
-
/**
|
|
1528
|
-
* Request to initiate a payment change by customer.
|
|
1529
|
-
* @summary Request payment setup initiation by customer
|
|
1530
|
-
* @param {CustomersApiInitiatePaymentSetupRequest} requestParameters Request parameters.
|
|
1531
|
-
* @param {*} [options] Override http request option.
|
|
1532
|
-
* @throws {RequiredError}
|
|
1533
|
-
* @memberof CustomersApi
|
|
1534
|
-
*/
|
|
1535
|
-
CustomersApi.prototype.initiatePaymentSetup = function (requestParameters, options) {
|
|
1536
|
-
var _this = this;
|
|
1537
|
-
return (0, exports.CustomersApiFp)(this.configuration).initiatePaymentSetup(requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1538
|
-
};
|
|
1539
|
-
/**
|
|
1540
|
-
* 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.
|
|
1541
|
-
* @summary Invite a customer by self
|
|
1542
|
-
* @param {CustomersApiInviteByCustomerRequest} requestParameters Request parameters.
|
|
1543
|
-
* @param {*} [options] Override http request option.
|
|
1544
|
-
* @throws {RequiredError}
|
|
1545
|
-
* @memberof CustomersApi
|
|
1546
|
-
*/
|
|
1547
|
-
CustomersApi.prototype.inviteByCustomer = function (requestParameters, options) {
|
|
1548
|
-
var _this = this;
|
|
1549
|
-
return (0, exports.CustomersApiFp)(this.configuration).inviteByCustomer(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1550
|
-
};
|
|
1551
|
-
/**
|
|
1552
|
-
* 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.
|
|
1553
|
-
* @summary Invite a customer by tenant
|
|
1554
|
-
* @param {CustomersApiInviteByTenantRequest} requestParameters Request parameters.
|
|
1555
|
-
* @param {*} [options] Override http request option.
|
|
1556
|
-
* @throws {RequiredError}
|
|
1557
|
-
* @memberof CustomersApi
|
|
1558
|
-
*/
|
|
1559
|
-
CustomersApi.prototype.inviteByTenant = function (requestParameters, options) {
|
|
1560
|
-
var _this = this;
|
|
1561
|
-
return (0, exports.CustomersApiFp)(this.configuration).inviteByTenant(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1562
|
-
};
|
|
1563
|
-
/**
|
|
1564
|
-
* List all the documents of a customer.
|
|
1565
|
-
* @summary List documents of a customer
|
|
1566
|
-
* @param {CustomersApiListDocumentsRequest} requestParameters Request parameters.
|
|
1567
|
-
* @param {*} [options] Override http request option.
|
|
1568
|
-
* @throws {RequiredError}
|
|
1569
|
-
* @memberof CustomersApi
|
|
1570
|
-
*/
|
|
1571
|
-
CustomersApi.prototype.listDocuments = function (requestParameters, options) {
|
|
1572
|
-
var _this = this;
|
|
1573
|
-
return (0, exports.CustomersApiFp)(this.configuration).listDocuments(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1574
|
-
};
|
|
1575
|
-
/**
|
|
1576
|
-
* List all the invoices of a customer.
|
|
1577
|
-
* @summary List invoices of a customer
|
|
1578
|
-
* @param {CustomersApiListInvoicesRequest} requestParameters Request parameters.
|
|
1579
|
-
* @param {*} [options] Override http request option.
|
|
1580
|
-
* @throws {RequiredError}
|
|
1581
|
-
* @memberof CustomersApi
|
|
1582
|
-
*/
|
|
1583
|
-
CustomersApi.prototype.listInvoices = function (requestParameters, options) {
|
|
1584
|
-
var _this = this;
|
|
1585
|
-
return (0, exports.CustomersApiFp)(this.configuration).listInvoices(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1586
|
-
};
|
|
1587
|
-
/**
|
|
1588
|
-
* Get new access token, new refresh token.
|
|
1589
|
-
* @summary Refresh token by customer
|
|
1590
|
-
* @param {CustomersApiRefreshTokenRequest} requestParameters Request parameters.
|
|
1591
|
-
* @param {*} [options] Override http request option.
|
|
1592
|
-
* @throws {RequiredError}
|
|
1593
|
-
* @memberof CustomersApi
|
|
1594
|
-
*/
|
|
1595
|
-
CustomersApi.prototype.refreshToken = function (requestParameters, options) {
|
|
1596
|
-
var _this = this;
|
|
1597
|
-
return (0, exports.CustomersApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1598
|
-
};
|
|
1599
|
-
/**
|
|
1600
|
-
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
1601
|
-
* @summary Change password by customer
|
|
1602
|
-
* @param {CustomersApiResetPasswordRequest} requestParameters Request parameters.
|
|
1603
|
-
* @param {*} [options] Override http request option.
|
|
1604
|
-
* @throws {RequiredError}
|
|
1605
|
-
* @memberof CustomersApi
|
|
1606
|
-
*/
|
|
1607
|
-
CustomersApi.prototype.resetPassword = function (requestParameters, options) {
|
|
1608
|
-
var _this = this;
|
|
1609
|
-
return (0, exports.CustomersApiFp)(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1610
|
-
};
|
|
1611
|
-
/**
|
|
1612
|
-
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
1613
|
-
* @summary Respond to auth challenge by customer
|
|
1614
|
-
* @param {CustomersApiRespondToAuthChallengeRequest} requestParameters Request parameters.
|
|
1615
|
-
* @param {*} [options] Override http request option.
|
|
1616
|
-
* @throws {RequiredError}
|
|
1617
|
-
* @memberof CustomersApi
|
|
1618
|
-
*/
|
|
1619
|
-
CustomersApi.prototype.respondToAuthChallenge = function (requestParameters, options) {
|
|
1620
|
-
var _this = this;
|
|
1621
|
-
return (0, exports.CustomersApiFp)(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1622
|
-
};
|
|
1623
298
|
/**
|
|
1624
299
|
* Update customer details like phone, email, names, addresses etc.
|
|
1625
300
|
* @summary Update customer details
|
|
@@ -1632,42 +307,6 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1632
307
|
var _this = this;
|
|
1633
308
|
return (0, exports.CustomersApiFp)(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1634
309
|
};
|
|
1635
|
-
/**
|
|
1636
|
-
* API to upload and attach documents to an account.
|
|
1637
|
-
* @summary Upload account documents
|
|
1638
|
-
* @param {CustomersApiUploadAccountDocumentsRequest} requestParameters Request parameters.
|
|
1639
|
-
* @param {*} [options] Override http request option.
|
|
1640
|
-
* @throws {RequiredError}
|
|
1641
|
-
* @memberof CustomersApi
|
|
1642
|
-
*/
|
|
1643
|
-
CustomersApi.prototype.uploadAccountDocuments = function (requestParameters, options) {
|
|
1644
|
-
var _this = this;
|
|
1645
|
-
return (0, exports.CustomersApiFp)(this.configuration).uploadAccountDocuments(requestParameters.customerCode, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1646
|
-
};
|
|
1647
|
-
/**
|
|
1648
|
-
* Verify the invite sent to the customer via email.
|
|
1649
|
-
* @summary Verify customer\'s invite token
|
|
1650
|
-
* @param {CustomersApiVerifyInviteRequest} requestParameters Request parameters.
|
|
1651
|
-
* @param {*} [options] Override http request option.
|
|
1652
|
-
* @throws {RequiredError}
|
|
1653
|
-
* @memberof CustomersApi
|
|
1654
|
-
*/
|
|
1655
|
-
CustomersApi.prototype.verifyInvite = function (requestParameters, options) {
|
|
1656
|
-
var _this = this;
|
|
1657
|
-
return (0, exports.CustomersApiFp)(this.configuration).verifyInvite(requestParameters.inviteToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1658
|
-
};
|
|
1659
|
-
/**
|
|
1660
|
-
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
1661
|
-
* @summary Verify a reset password token
|
|
1662
|
-
* @param {CustomersApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
|
|
1663
|
-
* @param {*} [options] Override http request option.
|
|
1664
|
-
* @throws {RequiredError}
|
|
1665
|
-
* @memberof CustomersApi
|
|
1666
|
-
*/
|
|
1667
|
-
CustomersApi.prototype.verifyResetPasswordToken = function (requestParameters, options) {
|
|
1668
|
-
var _this = this;
|
|
1669
|
-
return (0, exports.CustomersApiFp)(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1670
|
-
};
|
|
1671
310
|
return CustomersApi;
|
|
1672
311
|
}(base_1.BaseAPI));
|
|
1673
312
|
exports.CustomersApi = CustomersApi;
|