@emilgroup/customer-sdk-node 1.3.0 → 1.6.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 +15 -1
- package/README.md +2 -2
- package/api/customers-api.ts +798 -82
- package/base.ts +56 -13
- package/dist/api/customers-api.d.ts +456 -36
- package/dist/api/customers-api.js +579 -40
- package/dist/base.d.ts +1 -0
- package/dist/base.js +46 -8
- package/dist/models/account-class.d.ts +132 -0
- package/dist/models/account-class.js +15 -0
- package/dist/models/create-customer-request-dto.d.ts +0 -7
- package/dist/models/create-customer-response-class.d.ts +3 -2
- package/dist/models/customer-class.d.ts +67 -0
- package/dist/models/customer-class.js +15 -0
- package/dist/models/customer-document-class.d.ts +99 -0
- package/dist/models/customer-document-class.js +36 -0
- package/dist/models/get-customer-document-download-url-response-class.d.ts +24 -0
- package/dist/models/get-customer-document-download-url-response-class.js +15 -0
- package/dist/models/get-customer-response-class.d.ts +25 -0
- package/dist/models/get-customer-response-class.js +15 -0
- package/dist/models/index.d.ts +15 -1
- package/dist/models/index.js +15 -1
- package/dist/models/invoice-class.d.ts +135 -0
- package/dist/models/invoice-class.js +28 -0
- package/dist/models/list-documents-response-class.d.ts +31 -0
- package/dist/models/list-documents-response-class.js +15 -0
- package/dist/models/list-invoices-response-class.d.ts +3 -2
- package/dist/models/request-policy-update-request-dto.d.ts +42 -0
- package/dist/models/request-policy-update-request-dto.js +15 -0
- package/dist/models/reset-password-by-customer-request-dto.d.ts +1 -1
- package/dist/models/shared-invoice-item-class.d.ts +102 -0
- package/dist/models/shared-invoice-item-class.js +15 -0
- package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
- package/dist/models/terminate-customer-policy-request-dto.js +15 -0
- package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
- package/dist/models/terminate-customer-policy-response-class.js +15 -0
- package/dist/models/{create-account-request-dto.d.ts → update-account-request-dto.d.ts} +26 -32
- package/dist/models/{create-account-request-dto.js → update-account-request-dto.js} +2 -2
- package/dist/models/update-customer-request-dto.d.ts +31 -0
- package/dist/models/update-customer-request-dto.js +15 -0
- package/dist/models/update-customer-response-class.d.ts +25 -0
- package/dist/models/update-customer-response-class.js +15 -0
- package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
- package/dist/models/withdraw-customer-policy-response-class.js +15 -0
- package/models/account-class.ts +138 -0
- package/models/create-customer-request-dto.ts +0 -7
- package/models/create-customer-response-class.ts +3 -2
- package/models/customer-class.ts +73 -0
- package/models/customer-document-class.ts +108 -0
- package/models/get-customer-document-download-url-response-class.ts +30 -0
- package/models/get-customer-response-class.ts +31 -0
- package/models/index.ts +15 -1
- package/models/invoice-class.ts +145 -0
- package/models/list-documents-response-class.ts +37 -0
- package/models/list-invoices-response-class.ts +3 -2
- package/models/request-policy-update-request-dto.ts +48 -0
- package/models/reset-password-by-customer-request-dto.ts +1 -1
- package/models/shared-invoice-item-class.ts +108 -0
- package/models/terminate-customer-policy-request-dto.ts +30 -0
- package/models/terminate-customer-policy-response-class.ts +31 -0
- package/models/{create-account-request-dto.ts → update-account-request-dto.ts} +26 -32
- package/models/update-customer-request-dto.ts +37 -0
- package/models/update-customer-response-class.ts +31 -0
- package/models/withdraw-customer-policy-response-class.ts +31 -0
- package/package.json +1 -1
|
@@ -166,6 +166,90 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
},
|
|
169
|
+
/**
|
|
170
|
+
* Get customer details
|
|
171
|
+
* @summary Get customer details
|
|
172
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
173
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
174
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
175
|
+
* @param {*} [options] Override http request option.
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
*/
|
|
178
|
+
getCustomer: function (customerCode, expand, authorization, options) {
|
|
179
|
+
if (options === void 0) { options = {}; }
|
|
180
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
181
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
182
|
+
return __generator(this, function (_a) {
|
|
183
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
184
|
+
(0, common_1.assertParamExists)('getCustomer', 'customerCode', customerCode);
|
|
185
|
+
localVarPath = "/v1/customers/{customerCode}"
|
|
186
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
187
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
188
|
+
if (configuration) {
|
|
189
|
+
baseOptions = configuration.baseOptions;
|
|
190
|
+
baseAccessToken = configuration.accessToken;
|
|
191
|
+
}
|
|
192
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
193
|
+
localVarHeaderParameter = {};
|
|
194
|
+
localVarQueryParameter = {};
|
|
195
|
+
if (expand !== undefined) {
|
|
196
|
+
localVarQueryParameter['expand'] = expand;
|
|
197
|
+
}
|
|
198
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
199
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
200
|
+
}
|
|
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
|
+
return [2 /*return*/, {
|
|
205
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
206
|
+
options: localVarRequestOptions,
|
|
207
|
+
}];
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
/**
|
|
212
|
+
* Get a presigned download url for document
|
|
213
|
+
* @summary Get a presigned download url for document
|
|
214
|
+
* @param {string} documentCode The document code
|
|
215
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
216
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, options) {
|
|
221
|
+
if (options === void 0) { options = {}; }
|
|
222
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
223
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
224
|
+
return __generator(this, function (_a) {
|
|
225
|
+
// verify required parameter 'documentCode' is not null or undefined
|
|
226
|
+
(0, common_1.assertParamExists)('getCustomerDocumentDownloadUrl', 'documentCode', documentCode);
|
|
227
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
228
|
+
(0, common_1.assertParamExists)('getCustomerDocumentDownloadUrl', 'customerCode', customerCode);
|
|
229
|
+
localVarPath = "/v1/customers/{customerCode}/documents/{documentCode}/download-url"
|
|
230
|
+
.replace("{".concat("documentCode", "}"), encodeURIComponent(String(documentCode)))
|
|
231
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
232
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
233
|
+
if (configuration) {
|
|
234
|
+
baseOptions = configuration.baseOptions;
|
|
235
|
+
baseAccessToken = configuration.accessToken;
|
|
236
|
+
}
|
|
237
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
238
|
+
localVarHeaderParameter = {};
|
|
239
|
+
localVarQueryParameter = {};
|
|
240
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
241
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
242
|
+
}
|
|
243
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
244
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
245
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
246
|
+
return [2 /*return*/, {
|
|
247
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
248
|
+
options: localVarRequestOptions,
|
|
249
|
+
}];
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
},
|
|
169
253
|
/**
|
|
170
254
|
* Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
|
|
171
255
|
* @summary Get policy details
|
|
@@ -325,6 +409,68 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
325
409
|
});
|
|
326
410
|
});
|
|
327
411
|
},
|
|
412
|
+
/**
|
|
413
|
+
* List all the documents of a customer
|
|
414
|
+
* @summary List documents of a customer
|
|
415
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
416
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
417
|
+
* @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.
|
|
418
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
419
|
+
* @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.
|
|
420
|
+
* @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.
|
|
421
|
+
* @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.
|
|
422
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
423
|
+
* @param {*} [options] Override http request option.
|
|
424
|
+
* @throws {RequiredError}
|
|
425
|
+
*/
|
|
426
|
+
listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
427
|
+
if (options === void 0) { options = {}; }
|
|
428
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
429
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
430
|
+
return __generator(this, function (_a) {
|
|
431
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
432
|
+
(0, common_1.assertParamExists)('listDocuments', 'customerCode', customerCode);
|
|
433
|
+
localVarPath = "/v1/customers/{customerCode}/documents"
|
|
434
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
435
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
436
|
+
if (configuration) {
|
|
437
|
+
baseOptions = configuration.baseOptions;
|
|
438
|
+
baseAccessToken = configuration.accessToken;
|
|
439
|
+
}
|
|
440
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
441
|
+
localVarHeaderParameter = {};
|
|
442
|
+
localVarQueryParameter = {};
|
|
443
|
+
if (pageSize !== undefined) {
|
|
444
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
445
|
+
}
|
|
446
|
+
if (pageToken !== undefined) {
|
|
447
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
448
|
+
}
|
|
449
|
+
if (filter !== undefined) {
|
|
450
|
+
localVarQueryParameter['filter'] = filter;
|
|
451
|
+
}
|
|
452
|
+
if (search !== undefined) {
|
|
453
|
+
localVarQueryParameter['search'] = search;
|
|
454
|
+
}
|
|
455
|
+
if (order !== undefined) {
|
|
456
|
+
localVarQueryParameter['order'] = order;
|
|
457
|
+
}
|
|
458
|
+
if (expand !== undefined) {
|
|
459
|
+
localVarQueryParameter['expand'] = expand;
|
|
460
|
+
}
|
|
461
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
462
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
463
|
+
}
|
|
464
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
465
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
466
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
467
|
+
return [2 /*return*/, {
|
|
468
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
469
|
+
options: localVarRequestOptions,
|
|
470
|
+
}];
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
},
|
|
328
474
|
/**
|
|
329
475
|
* List all the invoices of a customer
|
|
330
476
|
* @summary List invoices of a customer
|
|
@@ -493,15 +639,12 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
493
639
|
* @summary Request policy update by customer
|
|
494
640
|
* @param {string} policyCode The policy code
|
|
495
641
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
496
|
-
* @param {
|
|
497
|
-
* @param {Array<string>} policyObjects Policy objects
|
|
498
|
-
* @param {string} from Update from
|
|
499
|
-
* @param {string} [to] Update to
|
|
642
|
+
* @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
|
|
500
643
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
501
644
|
* @param {*} [options] Override http request option.
|
|
502
645
|
* @throws {RequiredError}
|
|
503
646
|
*/
|
|
504
|
-
requestPolicyUpdate: function (policyCode, customerCode,
|
|
647
|
+
requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
|
|
505
648
|
if (options === void 0) { options = {}; }
|
|
506
649
|
return __awaiter(_this, void 0, void 0, function () {
|
|
507
650
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -510,12 +653,8 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
510
653
|
(0, common_1.assertParamExists)('requestPolicyUpdate', 'policyCode', policyCode);
|
|
511
654
|
// verify required parameter 'customerCode' is not null or undefined
|
|
512
655
|
(0, common_1.assertParamExists)('requestPolicyUpdate', 'customerCode', customerCode);
|
|
513
|
-
// verify required parameter '
|
|
514
|
-
(0, common_1.assertParamExists)('requestPolicyUpdate', '
|
|
515
|
-
// verify required parameter 'policyObjects' is not null or undefined
|
|
516
|
-
(0, common_1.assertParamExists)('requestPolicyUpdate', 'policyObjects', policyObjects);
|
|
517
|
-
// verify required parameter 'from' is not null or undefined
|
|
518
|
-
(0, common_1.assertParamExists)('requestPolicyUpdate', 'from', from);
|
|
656
|
+
// verify required parameter 'requestPolicyUpdateRequestDto' is not null or undefined
|
|
657
|
+
(0, common_1.assertParamExists)('requestPolicyUpdate', 'requestPolicyUpdateRequestDto', requestPolicyUpdateRequestDto);
|
|
519
658
|
localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/request-update"
|
|
520
659
|
.replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
|
|
521
660
|
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
@@ -527,28 +666,14 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
527
666
|
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
528
667
|
localVarHeaderParameter = {};
|
|
529
668
|
localVarQueryParameter = {};
|
|
530
|
-
if (code !== undefined) {
|
|
531
|
-
localVarQueryParameter['code'] = code;
|
|
532
|
-
}
|
|
533
|
-
if (policyObjects) {
|
|
534
|
-
localVarQueryParameter['policyObjects'] = policyObjects;
|
|
535
|
-
}
|
|
536
|
-
if (from !== undefined) {
|
|
537
|
-
localVarQueryParameter['from'] = (from instanceof Date) ?
|
|
538
|
-
from.toISOString() :
|
|
539
|
-
from;
|
|
540
|
-
}
|
|
541
|
-
if (to !== undefined) {
|
|
542
|
-
localVarQueryParameter['to'] = (to instanceof Date) ?
|
|
543
|
-
to.toISOString() :
|
|
544
|
-
to;
|
|
545
|
-
}
|
|
546
669
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
547
670
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
548
671
|
}
|
|
672
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
549
673
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
550
674
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
551
675
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
676
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestPolicyUpdateRequestDto, localVarRequestOptions, configuration);
|
|
552
677
|
return [2 /*return*/, {
|
|
553
678
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
554
679
|
options: localVarRequestOptions,
|
|
@@ -626,6 +751,96 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
626
751
|
});
|
|
627
752
|
});
|
|
628
753
|
},
|
|
754
|
+
/**
|
|
755
|
+
* Request to terminate an existing policy by customer
|
|
756
|
+
* @summary Terminate a policy by customer
|
|
757
|
+
* @param {string} policyCode The policy code
|
|
758
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
759
|
+
* @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
|
|
760
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
761
|
+
* @param {*} [options] Override http request option.
|
|
762
|
+
* @throws {RequiredError}
|
|
763
|
+
*/
|
|
764
|
+
terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, 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 'policyCode' is not null or undefined
|
|
770
|
+
(0, common_1.assertParamExists)('terminateCustomerPolicy', 'policyCode', policyCode);
|
|
771
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
772
|
+
(0, common_1.assertParamExists)('terminateCustomerPolicy', 'customerCode', customerCode);
|
|
773
|
+
// verify required parameter 'terminateCustomerPolicyRequestDto' is not null or undefined
|
|
774
|
+
(0, common_1.assertParamExists)('terminateCustomerPolicy', 'terminateCustomerPolicyRequestDto', terminateCustomerPolicyRequestDto);
|
|
775
|
+
localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/terminate"
|
|
776
|
+
.replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
|
|
777
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
778
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
779
|
+
if (configuration) {
|
|
780
|
+
baseOptions = configuration.baseOptions;
|
|
781
|
+
baseAccessToken = configuration.accessToken;
|
|
782
|
+
}
|
|
783
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
784
|
+
localVarHeaderParameter = {};
|
|
785
|
+
localVarQueryParameter = {};
|
|
786
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
787
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
788
|
+
}
|
|
789
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
790
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
791
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
792
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
793
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(terminateCustomerPolicyRequestDto, localVarRequestOptions, configuration);
|
|
794
|
+
return [2 /*return*/, {
|
|
795
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
796
|
+
options: localVarRequestOptions,
|
|
797
|
+
}];
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
},
|
|
801
|
+
/**
|
|
802
|
+
* Update customer details like phone, email, names, addresses etc
|
|
803
|
+
* @summary Update customer details
|
|
804
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
805
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
806
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
807
|
+
* @param {*} [options] Override http request option.
|
|
808
|
+
* @throws {RequiredError}
|
|
809
|
+
*/
|
|
810
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
811
|
+
if (options === void 0) { options = {}; }
|
|
812
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
813
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
814
|
+
return __generator(this, function (_a) {
|
|
815
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
816
|
+
(0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
|
|
817
|
+
// verify required parameter 'updateCustomerRequestDto' is not null or undefined
|
|
818
|
+
(0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
|
|
819
|
+
localVarPath = "/v1/customers/{customerCode}"
|
|
820
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
821
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
822
|
+
if (configuration) {
|
|
823
|
+
baseOptions = configuration.baseOptions;
|
|
824
|
+
baseAccessToken = configuration.accessToken;
|
|
825
|
+
}
|
|
826
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
827
|
+
localVarHeaderParameter = {};
|
|
828
|
+
localVarQueryParameter = {};
|
|
829
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
830
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
831
|
+
}
|
|
832
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
833
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
834
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
835
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
836
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
|
|
837
|
+
return [2 /*return*/, {
|
|
838
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
839
|
+
options: localVarRequestOptions,
|
|
840
|
+
}];
|
|
841
|
+
});
|
|
842
|
+
});
|
|
843
|
+
},
|
|
629
844
|
/**
|
|
630
845
|
* Verify the invite sent to the customer via email.
|
|
631
846
|
* @summary Verify customer\'s invite token
|
|
@@ -698,6 +913,48 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
698
913
|
});
|
|
699
914
|
});
|
|
700
915
|
},
|
|
916
|
+
/**
|
|
917
|
+
* Withdraw policy by customer
|
|
918
|
+
* @summary Withdraw policy by customer
|
|
919
|
+
* @param {string} policyCode The policy code
|
|
920
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
921
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
922
|
+
* @param {*} [options] Override http request option.
|
|
923
|
+
* @throws {RequiredError}
|
|
924
|
+
*/
|
|
925
|
+
withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
|
|
926
|
+
if (options === void 0) { options = {}; }
|
|
927
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
928
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
929
|
+
return __generator(this, function (_a) {
|
|
930
|
+
// verify required parameter 'policyCode' is not null or undefined
|
|
931
|
+
(0, common_1.assertParamExists)('withdrawCustomerPolicy', 'policyCode', policyCode);
|
|
932
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
933
|
+
(0, common_1.assertParamExists)('withdrawCustomerPolicy', 'customerCode', customerCode);
|
|
934
|
+
localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/withdraw"
|
|
935
|
+
.replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
|
|
936
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
937
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
938
|
+
if (configuration) {
|
|
939
|
+
baseOptions = configuration.baseOptions;
|
|
940
|
+
baseAccessToken = configuration.accessToken;
|
|
941
|
+
}
|
|
942
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
943
|
+
localVarHeaderParameter = {};
|
|
944
|
+
localVarQueryParameter = {};
|
|
945
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
946
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
947
|
+
}
|
|
948
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
949
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
950
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
951
|
+
return [2 /*return*/, {
|
|
952
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
953
|
+
options: localVarRequestOptions,
|
|
954
|
+
}];
|
|
955
|
+
});
|
|
956
|
+
});
|
|
957
|
+
},
|
|
701
958
|
};
|
|
702
959
|
};
|
|
703
960
|
exports.CustomersApiAxiosParamCreator = CustomersApiAxiosParamCreator;
|
|
@@ -748,6 +1005,50 @@ var CustomersApiFp = function (configuration) {
|
|
|
748
1005
|
});
|
|
749
1006
|
});
|
|
750
1007
|
},
|
|
1008
|
+
/**
|
|
1009
|
+
* Get customer details
|
|
1010
|
+
* @summary Get customer details
|
|
1011
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1012
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
1013
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1014
|
+
* @param {*} [options] Override http request option.
|
|
1015
|
+
* @throws {RequiredError}
|
|
1016
|
+
*/
|
|
1017
|
+
getCustomer: function (customerCode, expand, authorization, options) {
|
|
1018
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1019
|
+
var localVarAxiosArgs;
|
|
1020
|
+
return __generator(this, function (_a) {
|
|
1021
|
+
switch (_a.label) {
|
|
1022
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options)];
|
|
1023
|
+
case 1:
|
|
1024
|
+
localVarAxiosArgs = _a.sent();
|
|
1025
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1026
|
+
}
|
|
1027
|
+
});
|
|
1028
|
+
});
|
|
1029
|
+
},
|
|
1030
|
+
/**
|
|
1031
|
+
* Get a presigned download url for document
|
|
1032
|
+
* @summary Get a presigned download url for document
|
|
1033
|
+
* @param {string} documentCode The document code
|
|
1034
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1035
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1036
|
+
* @param {*} [options] Override http request option.
|
|
1037
|
+
* @throws {RequiredError}
|
|
1038
|
+
*/
|
|
1039
|
+
getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, options) {
|
|
1040
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1041
|
+
var localVarAxiosArgs;
|
|
1042
|
+
return __generator(this, function (_a) {
|
|
1043
|
+
switch (_a.label) {
|
|
1044
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options)];
|
|
1045
|
+
case 1:
|
|
1046
|
+
localVarAxiosArgs = _a.sent();
|
|
1047
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
});
|
|
1051
|
+
},
|
|
751
1052
|
/**
|
|
752
1053
|
* Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
|
|
753
1054
|
* @summary Get policy details
|
|
@@ -833,6 +1134,33 @@ var CustomersApiFp = function (configuration) {
|
|
|
833
1134
|
});
|
|
834
1135
|
});
|
|
835
1136
|
},
|
|
1137
|
+
/**
|
|
1138
|
+
* List all the documents of a customer
|
|
1139
|
+
* @summary List documents of a customer
|
|
1140
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1141
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
1142
|
+
* @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.
|
|
1143
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
1144
|
+
* @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.
|
|
1145
|
+
* @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.
|
|
1146
|
+
* @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.
|
|
1147
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1148
|
+
* @param {*} [options] Override http request option.
|
|
1149
|
+
* @throws {RequiredError}
|
|
1150
|
+
*/
|
|
1151
|
+
listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
1152
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1153
|
+
var localVarAxiosArgs;
|
|
1154
|
+
return __generator(this, function (_a) {
|
|
1155
|
+
switch (_a.label) {
|
|
1156
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
|
|
1157
|
+
case 1:
|
|
1158
|
+
localVarAxiosArgs = _a.sent();
|
|
1159
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
});
|
|
1163
|
+
},
|
|
836
1164
|
/**
|
|
837
1165
|
* List all the invoices of a customer
|
|
838
1166
|
* @summary List invoices of a customer
|
|
@@ -913,20 +1241,17 @@ var CustomersApiFp = function (configuration) {
|
|
|
913
1241
|
* @summary Request policy update by customer
|
|
914
1242
|
* @param {string} policyCode The policy code
|
|
915
1243
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
916
|
-
* @param {
|
|
917
|
-
* @param {Array<string>} policyObjects Policy objects
|
|
918
|
-
* @param {string} from Update from
|
|
919
|
-
* @param {string} [to] Update to
|
|
1244
|
+
* @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
|
|
920
1245
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
921
1246
|
* @param {*} [options] Override http request option.
|
|
922
1247
|
* @throws {RequiredError}
|
|
923
1248
|
*/
|
|
924
|
-
requestPolicyUpdate: function (policyCode, customerCode,
|
|
1249
|
+
requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
|
|
925
1250
|
return __awaiter(this, void 0, void 0, function () {
|
|
926
1251
|
var localVarAxiosArgs;
|
|
927
1252
|
return __generator(this, function (_a) {
|
|
928
1253
|
switch (_a.label) {
|
|
929
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode,
|
|
1254
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options)];
|
|
930
1255
|
case 1:
|
|
931
1256
|
localVarAxiosArgs = _a.sent();
|
|
932
1257
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -974,6 +1299,51 @@ var CustomersApiFp = function (configuration) {
|
|
|
974
1299
|
});
|
|
975
1300
|
});
|
|
976
1301
|
},
|
|
1302
|
+
/**
|
|
1303
|
+
* Request to terminate an existing policy by customer
|
|
1304
|
+
* @summary Terminate a policy by customer
|
|
1305
|
+
* @param {string} policyCode The policy code
|
|
1306
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1307
|
+
* @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
|
|
1308
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1309
|
+
* @param {*} [options] Override http request option.
|
|
1310
|
+
* @throws {RequiredError}
|
|
1311
|
+
*/
|
|
1312
|
+
terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
|
|
1313
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1314
|
+
var localVarAxiosArgs;
|
|
1315
|
+
return __generator(this, function (_a) {
|
|
1316
|
+
switch (_a.label) {
|
|
1317
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options)];
|
|
1318
|
+
case 1:
|
|
1319
|
+
localVarAxiosArgs = _a.sent();
|
|
1320
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
});
|
|
1324
|
+
},
|
|
1325
|
+
/**
|
|
1326
|
+
* Update customer details like phone, email, names, addresses etc
|
|
1327
|
+
* @summary Update customer details
|
|
1328
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1329
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
1330
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1331
|
+
* @param {*} [options] Override http request option.
|
|
1332
|
+
* @throws {RequiredError}
|
|
1333
|
+
*/
|
|
1334
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
1335
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1336
|
+
var localVarAxiosArgs;
|
|
1337
|
+
return __generator(this, function (_a) {
|
|
1338
|
+
switch (_a.label) {
|
|
1339
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options)];
|
|
1340
|
+
case 1:
|
|
1341
|
+
localVarAxiosArgs = _a.sent();
|
|
1342
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
});
|
|
1346
|
+
},
|
|
977
1347
|
/**
|
|
978
1348
|
* Verify the invite sent to the customer via email.
|
|
979
1349
|
* @summary Verify customer\'s invite token
|
|
@@ -1014,6 +1384,28 @@ var CustomersApiFp = function (configuration) {
|
|
|
1014
1384
|
});
|
|
1015
1385
|
});
|
|
1016
1386
|
},
|
|
1387
|
+
/**
|
|
1388
|
+
* Withdraw policy by customer
|
|
1389
|
+
* @summary Withdraw policy by customer
|
|
1390
|
+
* @param {string} policyCode The policy code
|
|
1391
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1392
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1393
|
+
* @param {*} [options] Override http request option.
|
|
1394
|
+
* @throws {RequiredError}
|
|
1395
|
+
*/
|
|
1396
|
+
withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
|
|
1397
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1398
|
+
var localVarAxiosArgs;
|
|
1399
|
+
return __generator(this, function (_a) {
|
|
1400
|
+
switch (_a.label) {
|
|
1401
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawCustomerPolicy(policyCode, customerCode, authorization, options)];
|
|
1402
|
+
case 1:
|
|
1403
|
+
localVarAxiosArgs = _a.sent();
|
|
1404
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
1405
|
+
}
|
|
1406
|
+
});
|
|
1407
|
+
});
|
|
1408
|
+
},
|
|
1017
1409
|
};
|
|
1018
1410
|
};
|
|
1019
1411
|
exports.CustomersApiFp = CustomersApiFp;
|
|
@@ -1044,6 +1436,30 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1044
1436
|
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
1045
1437
|
return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1046
1438
|
},
|
|
1439
|
+
/**
|
|
1440
|
+
* Get customer details
|
|
1441
|
+
* @summary Get customer details
|
|
1442
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1443
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
1444
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1445
|
+
* @param {*} [options] Override http request option.
|
|
1446
|
+
* @throws {RequiredError}
|
|
1447
|
+
*/
|
|
1448
|
+
getCustomer: function (customerCode, expand, authorization, options) {
|
|
1449
|
+
return localVarFp.getCustomer(customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1450
|
+
},
|
|
1451
|
+
/**
|
|
1452
|
+
* Get a presigned download url for document
|
|
1453
|
+
* @summary Get a presigned download url for document
|
|
1454
|
+
* @param {string} documentCode The document code
|
|
1455
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1456
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1457
|
+
* @param {*} [options] Override http request option.
|
|
1458
|
+
* @throws {RequiredError}
|
|
1459
|
+
*/
|
|
1460
|
+
getCustomerDocumentDownloadUrl: function (documentCode, customerCode, authorization, options) {
|
|
1461
|
+
return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1462
|
+
},
|
|
1047
1463
|
/**
|
|
1048
1464
|
* Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
|
|
1049
1465
|
* @summary Get policy details
|
|
@@ -1089,6 +1505,23 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1089
1505
|
inviteByTenant: function (inviteByCustomerRequestDto, authorization, options) {
|
|
1090
1506
|
return localVarFp.inviteByTenant(inviteByCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1091
1507
|
},
|
|
1508
|
+
/**
|
|
1509
|
+
* List all the documents of a customer
|
|
1510
|
+
* @summary List documents of a customer
|
|
1511
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1512
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
1513
|
+
* @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.
|
|
1514
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
1515
|
+
* @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.
|
|
1516
|
+
* @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.
|
|
1517
|
+
* @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.
|
|
1518
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1519
|
+
* @param {*} [options] Override http request option.
|
|
1520
|
+
* @throws {RequiredError}
|
|
1521
|
+
*/
|
|
1522
|
+
listDocuments: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
1523
|
+
return localVarFp.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1524
|
+
},
|
|
1092
1525
|
/**
|
|
1093
1526
|
* List all the invoices of a customer
|
|
1094
1527
|
* @summary List invoices of a customer
|
|
@@ -1139,16 +1572,13 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1139
1572
|
* @summary Request policy update by customer
|
|
1140
1573
|
* @param {string} policyCode The policy code
|
|
1141
1574
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1142
|
-
* @param {
|
|
1143
|
-
* @param {Array<string>} policyObjects Policy objects
|
|
1144
|
-
* @param {string} from Update from
|
|
1145
|
-
* @param {string} [to] Update to
|
|
1575
|
+
* @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
|
|
1146
1576
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1147
1577
|
* @param {*} [options] Override http request option.
|
|
1148
1578
|
* @throws {RequiredError}
|
|
1149
1579
|
*/
|
|
1150
|
-
requestPolicyUpdate: function (policyCode, customerCode,
|
|
1151
|
-
return localVarFp.requestPolicyUpdate(policyCode, customerCode,
|
|
1580
|
+
requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
|
|
1581
|
+
return localVarFp.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1152
1582
|
},
|
|
1153
1583
|
/**
|
|
1154
1584
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
@@ -1170,6 +1600,31 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1170
1600
|
respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
|
|
1171
1601
|
return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
1172
1602
|
},
|
|
1603
|
+
/**
|
|
1604
|
+
* Request to terminate an existing policy by customer
|
|
1605
|
+
* @summary Terminate a policy by customer
|
|
1606
|
+
* @param {string} policyCode The policy code
|
|
1607
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1608
|
+
* @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
|
|
1609
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1610
|
+
* @param {*} [options] Override http request option.
|
|
1611
|
+
* @throws {RequiredError}
|
|
1612
|
+
*/
|
|
1613
|
+
terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
|
|
1614
|
+
return localVarFp.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1615
|
+
},
|
|
1616
|
+
/**
|
|
1617
|
+
* Update customer details like phone, email, names, addresses etc
|
|
1618
|
+
* @summary Update customer details
|
|
1619
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1620
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
1621
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1622
|
+
* @param {*} [options] Override http request option.
|
|
1623
|
+
* @throws {RequiredError}
|
|
1624
|
+
*/
|
|
1625
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
1626
|
+
return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1627
|
+
},
|
|
1173
1628
|
/**
|
|
1174
1629
|
* Verify the invite sent to the customer via email.
|
|
1175
1630
|
* @summary Verify customer\'s invite token
|
|
@@ -1190,6 +1645,18 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1190
1645
|
verifyResetPasswordToken: function (resetToken, options) {
|
|
1191
1646
|
return localVarFp.verifyResetPasswordToken(resetToken, options).then(function (request) { return request(axios, basePath); });
|
|
1192
1647
|
},
|
|
1648
|
+
/**
|
|
1649
|
+
* Withdraw policy by customer
|
|
1650
|
+
* @summary Withdraw policy by customer
|
|
1651
|
+
* @param {string} policyCode The policy code
|
|
1652
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1653
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1654
|
+
* @param {*} [options] Override http request option.
|
|
1655
|
+
* @throws {RequiredError}
|
|
1656
|
+
*/
|
|
1657
|
+
withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
|
|
1658
|
+
return localVarFp.withdrawCustomerPolicy(policyCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1659
|
+
},
|
|
1193
1660
|
};
|
|
1194
1661
|
};
|
|
1195
1662
|
exports.CustomersApiFactory = CustomersApiFactory;
|
|
@@ -1228,6 +1695,30 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1228
1695
|
var _this = this;
|
|
1229
1696
|
return (0, exports.CustomersApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1230
1697
|
};
|
|
1698
|
+
/**
|
|
1699
|
+
* Get customer details
|
|
1700
|
+
* @summary Get customer details
|
|
1701
|
+
* @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
|
|
1702
|
+
* @param {*} [options] Override http request option.
|
|
1703
|
+
* @throws {RequiredError}
|
|
1704
|
+
* @memberof CustomersApi
|
|
1705
|
+
*/
|
|
1706
|
+
CustomersApi.prototype.getCustomer = function (requestParameters, options) {
|
|
1707
|
+
var _this = this;
|
|
1708
|
+
return (0, exports.CustomersApiFp)(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1709
|
+
};
|
|
1710
|
+
/**
|
|
1711
|
+
* Get a presigned download url for document
|
|
1712
|
+
* @summary Get a presigned download url for document
|
|
1713
|
+
* @param {CustomersApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
|
|
1714
|
+
* @param {*} [options] Override http request option.
|
|
1715
|
+
* @throws {RequiredError}
|
|
1716
|
+
* @memberof CustomersApi
|
|
1717
|
+
*/
|
|
1718
|
+
CustomersApi.prototype.getCustomerDocumentDownloadUrl = function (requestParameters, options) {
|
|
1719
|
+
var _this = this;
|
|
1720
|
+
return (0, exports.CustomersApiFp)(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1721
|
+
};
|
|
1231
1722
|
/**
|
|
1232
1723
|
* Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
|
|
1233
1724
|
* @summary Get policy details
|
|
@@ -1276,6 +1767,18 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1276
1767
|
var _this = this;
|
|
1277
1768
|
return (0, exports.CustomersApiFp)(this.configuration).inviteByTenant(requestParameters.inviteByCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1278
1769
|
};
|
|
1770
|
+
/**
|
|
1771
|
+
* List all the documents of a customer
|
|
1772
|
+
* @summary List documents of a customer
|
|
1773
|
+
* @param {CustomersApiListDocumentsRequest} requestParameters Request parameters.
|
|
1774
|
+
* @param {*} [options] Override http request option.
|
|
1775
|
+
* @throws {RequiredError}
|
|
1776
|
+
* @memberof CustomersApi
|
|
1777
|
+
*/
|
|
1778
|
+
CustomersApi.prototype.listDocuments = function (requestParameters, options) {
|
|
1779
|
+
var _this = this;
|
|
1780
|
+
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); });
|
|
1781
|
+
};
|
|
1279
1782
|
/**
|
|
1280
1783
|
* List all the invoices of a customer
|
|
1281
1784
|
* @summary List invoices of a customer
|
|
@@ -1322,7 +1825,7 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1322
1825
|
*/
|
|
1323
1826
|
CustomersApi.prototype.requestPolicyUpdate = function (requestParameters, options) {
|
|
1324
1827
|
var _this = this;
|
|
1325
|
-
return (0, exports.CustomersApiFp)(this.configuration).requestPolicyUpdate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.
|
|
1828
|
+
return (0, exports.CustomersApiFp)(this.configuration).requestPolicyUpdate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.requestPolicyUpdateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1326
1829
|
};
|
|
1327
1830
|
/**
|
|
1328
1831
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
@@ -1348,6 +1851,30 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1348
1851
|
var _this = this;
|
|
1349
1852
|
return (0, exports.CustomersApiFp)(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1350
1853
|
};
|
|
1854
|
+
/**
|
|
1855
|
+
* Request to terminate an existing policy by customer
|
|
1856
|
+
* @summary Terminate a policy by customer
|
|
1857
|
+
* @param {CustomersApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
|
|
1858
|
+
* @param {*} [options] Override http request option.
|
|
1859
|
+
* @throws {RequiredError}
|
|
1860
|
+
* @memberof CustomersApi
|
|
1861
|
+
*/
|
|
1862
|
+
CustomersApi.prototype.terminateCustomerPolicy = function (requestParameters, options) {
|
|
1863
|
+
var _this = this;
|
|
1864
|
+
return (0, exports.CustomersApiFp)(this.configuration).terminateCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.terminateCustomerPolicyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1865
|
+
};
|
|
1866
|
+
/**
|
|
1867
|
+
* Update customer details like phone, email, names, addresses etc
|
|
1868
|
+
* @summary Update customer details
|
|
1869
|
+
* @param {CustomersApiUpdateCustomerRequest} requestParameters Request parameters.
|
|
1870
|
+
* @param {*} [options] Override http request option.
|
|
1871
|
+
* @throws {RequiredError}
|
|
1872
|
+
* @memberof CustomersApi
|
|
1873
|
+
*/
|
|
1874
|
+
CustomersApi.prototype.updateCustomer = function (requestParameters, options) {
|
|
1875
|
+
var _this = this;
|
|
1876
|
+
return (0, exports.CustomersApiFp)(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1877
|
+
};
|
|
1351
1878
|
/**
|
|
1352
1879
|
* Verify the invite sent to the customer via email.
|
|
1353
1880
|
* @summary Verify customer\'s invite token
|
|
@@ -1372,6 +1899,18 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1372
1899
|
var _this = this;
|
|
1373
1900
|
return (0, exports.CustomersApiFp)(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1374
1901
|
};
|
|
1902
|
+
/**
|
|
1903
|
+
* Withdraw policy by customer
|
|
1904
|
+
* @summary Withdraw policy by customer
|
|
1905
|
+
* @param {CustomersApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
|
|
1906
|
+
* @param {*} [options] Override http request option.
|
|
1907
|
+
* @throws {RequiredError}
|
|
1908
|
+
* @memberof CustomersApi
|
|
1909
|
+
*/
|
|
1910
|
+
CustomersApi.prototype.withdrawCustomerPolicy = function (requestParameters, options) {
|
|
1911
|
+
var _this = this;
|
|
1912
|
+
return (0, exports.CustomersApiFp)(this.configuration).withdrawCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1913
|
+
};
|
|
1375
1914
|
return CustomersApi;
|
|
1376
1915
|
}(base_1.BaseAPI));
|
|
1377
1916
|
exports.CustomersApi = CustomersApi;
|