@emilgroup/customer-sdk-node 1.1.1 → 1.3.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 +1 -0
- package/README.md +22 -5
- package/api/customers-api.ts +186 -8
- package/base.ts +150 -9
- package/dist/api/customers-api.d.ts +109 -8
- package/dist/api/customers-api.js +130 -8
- package/dist/base.d.ts +12 -3
- package/dist/base.js +192 -13
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/initiate-auth-response-class.d.ts +4 -4
- package/dist/models/request-policy-update-response-class.d.ts +25 -0
- package/dist/models/request-policy-update-response-class.js +15 -0
- package/dist/models/respond-to-auth-challenge-class.d.ts +4 -4
- package/models/index.ts +1 -0
- package/models/initiate-auth-response-class.ts +4 -4
- package/models/request-policy-update-response-class.ts +31 -0
- package/models/respond-to-auth-challenge-class.ts +4 -4
- package/package.json +4 -3
|
@@ -24,6 +24,7 @@ import { InviteByTenantResponseClass } from '../models';
|
|
|
24
24
|
import { ListInvoicesResponseClass } from '../models';
|
|
25
25
|
import { ListPoliciesResponseClass } from '../models';
|
|
26
26
|
import { RefreshTokenDto } from '../models';
|
|
27
|
+
import { RequestPolicyUpdateResponseClass } from '../models';
|
|
27
28
|
import { ResetPasswordByCustomerRequestDto } from '../models';
|
|
28
29
|
import { RespondToAuthChallengeClass } from '../models';
|
|
29
30
|
import { RespondToAuthChallengeRequestDto } from '../models';
|
|
@@ -70,7 +71,7 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
|
|
|
70
71
|
initiateAuth: (initiateAuthRequestDto: InitiateAuthRequestDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
71
72
|
/**
|
|
72
73
|
* 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.
|
|
73
|
-
* @summary Invite by
|
|
74
|
+
* @summary Invite a customer by self
|
|
74
75
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
75
76
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
76
77
|
* @param {*} [options] Override http request option.
|
|
@@ -79,7 +80,7 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
|
|
|
79
80
|
inviteByCustomer: (inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
80
81
|
/**
|
|
81
82
|
* 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.
|
|
82
|
-
* @summary Invite by tenant
|
|
83
|
+
* @summary Invite a customer by tenant
|
|
83
84
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
84
85
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
85
86
|
* @param {*} [options] Override http request option.
|
|
@@ -125,6 +126,20 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
|
|
|
125
126
|
* @throws {RequiredError}
|
|
126
127
|
*/
|
|
127
128
|
refreshToken: (refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
129
|
+
/**
|
|
130
|
+
* Request to update an existing policy by customer
|
|
131
|
+
* @summary Request policy update by customer
|
|
132
|
+
* @param {string} policyCode The policy code
|
|
133
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
134
|
+
* @param {string} code Policy code
|
|
135
|
+
* @param {Array<string>} policyObjects Policy objects
|
|
136
|
+
* @param {string} from Update from
|
|
137
|
+
* @param {string} [to] Update to
|
|
138
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
*/
|
|
142
|
+
requestPolicyUpdate: (policyCode: string, customerCode: string, code: string, policyObjects: Array<string>, from: string, to?: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
128
143
|
/**
|
|
129
144
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
130
145
|
* @summary Change password by customer
|
|
@@ -200,7 +215,7 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
|
|
|
200
215
|
initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateAuthResponseClass>>;
|
|
201
216
|
/**
|
|
202
217
|
* 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.
|
|
203
|
-
* @summary Invite by
|
|
218
|
+
* @summary Invite a customer by self
|
|
204
219
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
205
220
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
206
221
|
* @param {*} [options] Override http request option.
|
|
@@ -209,7 +224,7 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
|
|
|
209
224
|
inviteByCustomer(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InviteByCustomerResponseClass>>;
|
|
210
225
|
/**
|
|
211
226
|
* 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.
|
|
212
|
-
* @summary Invite by tenant
|
|
227
|
+
* @summary Invite a customer by tenant
|
|
213
228
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
214
229
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
215
230
|
* @param {*} [options] Override http request option.
|
|
@@ -255,6 +270,20 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
|
|
|
255
270
|
* @throws {RequiredError}
|
|
256
271
|
*/
|
|
257
272
|
refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
273
|
+
/**
|
|
274
|
+
* Request to update an existing policy by customer
|
|
275
|
+
* @summary Request policy update by customer
|
|
276
|
+
* @param {string} policyCode The policy code
|
|
277
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
278
|
+
* @param {string} code Policy code
|
|
279
|
+
* @param {Array<string>} policyObjects Policy objects
|
|
280
|
+
* @param {string} from Update from
|
|
281
|
+
* @param {string} [to] Update to
|
|
282
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
283
|
+
* @param {*} [options] Override http request option.
|
|
284
|
+
* @throws {RequiredError}
|
|
285
|
+
*/
|
|
286
|
+
requestPolicyUpdate(policyCode: string, customerCode: string, code: string, policyObjects: Array<string>, from: string, to?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestPolicyUpdateResponseClass>>;
|
|
258
287
|
/**
|
|
259
288
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
260
289
|
* @summary Change password by customer
|
|
@@ -330,7 +359,7 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
|
|
|
330
359
|
initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: any): AxiosPromise<InitiateAuthResponseClass>;
|
|
331
360
|
/**
|
|
332
361
|
* 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.
|
|
333
|
-
* @summary Invite by
|
|
362
|
+
* @summary Invite a customer by self
|
|
334
363
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
335
364
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
336
365
|
* @param {*} [options] Override http request option.
|
|
@@ -339,7 +368,7 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
|
|
|
339
368
|
inviteByCustomer(inviteByCustomerRequestDto: InviteByCustomerRequestDto, authorization?: string, options?: any): AxiosPromise<InviteByCustomerResponseClass>;
|
|
340
369
|
/**
|
|
341
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.
|
|
342
|
-
* @summary Invite by tenant
|
|
371
|
+
* @summary Invite a customer by tenant
|
|
343
372
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
344
373
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
345
374
|
* @param {*} [options] Override http request option.
|
|
@@ -385,6 +414,20 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
|
|
|
385
414
|
* @throws {RequiredError}
|
|
386
415
|
*/
|
|
387
416
|
refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: any): AxiosPromise<void>;
|
|
417
|
+
/**
|
|
418
|
+
* Request to update an existing policy by customer
|
|
419
|
+
* @summary Request policy update by customer
|
|
420
|
+
* @param {string} policyCode The policy code
|
|
421
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
422
|
+
* @param {string} code Policy code
|
|
423
|
+
* @param {Array<string>} policyObjects Policy objects
|
|
424
|
+
* @param {string} from Update from
|
|
425
|
+
* @param {string} [to] Update to
|
|
426
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
427
|
+
* @param {*} [options] Override http request option.
|
|
428
|
+
* @throws {RequiredError}
|
|
429
|
+
*/
|
|
430
|
+
requestPolicyUpdate(policyCode: string, customerCode: string, code: string, policyObjects: Array<string>, from: string, to?: string, authorization?: string, options?: any): AxiosPromise<RequestPolicyUpdateResponseClass>;
|
|
388
431
|
/**
|
|
389
432
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
390
433
|
* @summary Change password by customer
|
|
@@ -655,6 +698,55 @@ export interface CustomersApiRefreshTokenRequest {
|
|
|
655
698
|
*/
|
|
656
699
|
readonly cookie?: string;
|
|
657
700
|
}
|
|
701
|
+
/**
|
|
702
|
+
* Request parameters for requestPolicyUpdate operation in CustomersApi.
|
|
703
|
+
* @export
|
|
704
|
+
* @interface CustomersApiRequestPolicyUpdateRequest
|
|
705
|
+
*/
|
|
706
|
+
export interface CustomersApiRequestPolicyUpdateRequest {
|
|
707
|
+
/**
|
|
708
|
+
* The policy code
|
|
709
|
+
* @type {string}
|
|
710
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
711
|
+
*/
|
|
712
|
+
readonly policyCode: string;
|
|
713
|
+
/**
|
|
714
|
+
* The customer code or \"me\" for the currently logged in customer
|
|
715
|
+
* @type {string}
|
|
716
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
717
|
+
*/
|
|
718
|
+
readonly customerCode: string;
|
|
719
|
+
/**
|
|
720
|
+
* Policy code
|
|
721
|
+
* @type {string}
|
|
722
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
723
|
+
*/
|
|
724
|
+
readonly code: string;
|
|
725
|
+
/**
|
|
726
|
+
* Policy objects
|
|
727
|
+
* @type {Array<string>}
|
|
728
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
729
|
+
*/
|
|
730
|
+
readonly policyObjects: Array<string>;
|
|
731
|
+
/**
|
|
732
|
+
* Update from
|
|
733
|
+
* @type {string}
|
|
734
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
735
|
+
*/
|
|
736
|
+
readonly from: string;
|
|
737
|
+
/**
|
|
738
|
+
* Update to
|
|
739
|
+
* @type {string}
|
|
740
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
741
|
+
*/
|
|
742
|
+
readonly to?: string;
|
|
743
|
+
/**
|
|
744
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
745
|
+
* @type {string}
|
|
746
|
+
* @memberof CustomersApiRequestPolicyUpdate
|
|
747
|
+
*/
|
|
748
|
+
readonly authorization?: string;
|
|
749
|
+
}
|
|
658
750
|
/**
|
|
659
751
|
* Request parameters for resetPassword operation in CustomersApi.
|
|
660
752
|
* @export
|
|
@@ -752,7 +844,7 @@ export declare class CustomersApi extends BaseAPI {
|
|
|
752
844
|
initiateAuth(requestParameters: CustomersApiInitiateAuthRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiateAuthResponseClass, any>>;
|
|
753
845
|
/**
|
|
754
846
|
* 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.
|
|
755
|
-
* @summary Invite by
|
|
847
|
+
* @summary Invite a customer by self
|
|
756
848
|
* @param {CustomersApiInviteByCustomerRequest} requestParameters Request parameters.
|
|
757
849
|
* @param {*} [options] Override http request option.
|
|
758
850
|
* @throws {RequiredError}
|
|
@@ -761,7 +853,7 @@ export declare class CustomersApi extends BaseAPI {
|
|
|
761
853
|
inviteByCustomer(requestParameters: CustomersApiInviteByCustomerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InviteByCustomerResponseClass, any>>;
|
|
762
854
|
/**
|
|
763
855
|
* 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.
|
|
764
|
-
* @summary Invite by tenant
|
|
856
|
+
* @summary Invite a customer by tenant
|
|
765
857
|
* @param {CustomersApiInviteByTenantRequest} requestParameters Request parameters.
|
|
766
858
|
* @param {*} [options] Override http request option.
|
|
767
859
|
* @throws {RequiredError}
|
|
@@ -795,6 +887,15 @@ export declare class CustomersApi extends BaseAPI {
|
|
|
795
887
|
* @memberof CustomersApi
|
|
796
888
|
*/
|
|
797
889
|
refreshToken(requestParameters: CustomersApiRefreshTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
890
|
+
/**
|
|
891
|
+
* Request to update an existing policy by customer
|
|
892
|
+
* @summary Request policy update by customer
|
|
893
|
+
* @param {CustomersApiRequestPolicyUpdateRequest} requestParameters Request parameters.
|
|
894
|
+
* @param {*} [options] Override http request option.
|
|
895
|
+
* @throws {RequiredError}
|
|
896
|
+
* @memberof CustomersApi
|
|
897
|
+
*/
|
|
898
|
+
requestPolicyUpdate(requestParameters: CustomersApiRequestPolicyUpdateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RequestPolicyUpdateResponseClass, any>>;
|
|
798
899
|
/**
|
|
799
900
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
800
901
|
* @summary Change password by customer
|
|
@@ -249,7 +249,7 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
249
249
|
},
|
|
250
250
|
/**
|
|
251
251
|
* 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.
|
|
252
|
-
* @summary Invite by
|
|
252
|
+
* @summary Invite a customer by self
|
|
253
253
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
254
254
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
255
255
|
* @param {*} [options] Override http request option.
|
|
@@ -288,7 +288,7 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
288
288
|
},
|
|
289
289
|
/**
|
|
290
290
|
* 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.
|
|
291
|
-
* @summary Invite by tenant
|
|
291
|
+
* @summary Invite a customer by tenant
|
|
292
292
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
293
293
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
294
294
|
* @param {*} [options] Override http request option.
|
|
@@ -488,6 +488,74 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
488
488
|
});
|
|
489
489
|
});
|
|
490
490
|
},
|
|
491
|
+
/**
|
|
492
|
+
* Request to update an existing policy by customer
|
|
493
|
+
* @summary Request policy update by customer
|
|
494
|
+
* @param {string} policyCode The policy code
|
|
495
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
496
|
+
* @param {string} code Policy code
|
|
497
|
+
* @param {Array<string>} policyObjects Policy objects
|
|
498
|
+
* @param {string} from Update from
|
|
499
|
+
* @param {string} [to] Update to
|
|
500
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
501
|
+
* @param {*} [options] Override http request option.
|
|
502
|
+
* @throws {RequiredError}
|
|
503
|
+
*/
|
|
504
|
+
requestPolicyUpdate: function (policyCode, customerCode, code, policyObjects, from, to, authorization, options) {
|
|
505
|
+
if (options === void 0) { options = {}; }
|
|
506
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
507
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
508
|
+
return __generator(this, function (_a) {
|
|
509
|
+
// verify required parameter 'policyCode' is not null or undefined
|
|
510
|
+
(0, common_1.assertParamExists)('requestPolicyUpdate', 'policyCode', policyCode);
|
|
511
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
512
|
+
(0, common_1.assertParamExists)('requestPolicyUpdate', 'customerCode', customerCode);
|
|
513
|
+
// verify required parameter 'code' is not null or undefined
|
|
514
|
+
(0, common_1.assertParamExists)('requestPolicyUpdate', 'code', code);
|
|
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);
|
|
519
|
+
localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/request-update"
|
|
520
|
+
.replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
|
|
521
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
522
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
523
|
+
if (configuration) {
|
|
524
|
+
baseOptions = configuration.baseOptions;
|
|
525
|
+
baseAccessToken = configuration.accessToken;
|
|
526
|
+
}
|
|
527
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
528
|
+
localVarHeaderParameter = {};
|
|
529
|
+
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
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
547
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
548
|
+
}
|
|
549
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
550
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
551
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
552
|
+
return [2 /*return*/, {
|
|
553
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
554
|
+
options: localVarRequestOptions,
|
|
555
|
+
}];
|
|
556
|
+
});
|
|
557
|
+
});
|
|
558
|
+
},
|
|
491
559
|
/**
|
|
492
560
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
493
561
|
* @summary Change password by customer
|
|
@@ -725,7 +793,7 @@ var CustomersApiFp = function (configuration) {
|
|
|
725
793
|
},
|
|
726
794
|
/**
|
|
727
795
|
* 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.
|
|
728
|
-
* @summary Invite by
|
|
796
|
+
* @summary Invite a customer by self
|
|
729
797
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
730
798
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
731
799
|
* @param {*} [options] Override http request option.
|
|
@@ -746,7 +814,7 @@ var CustomersApiFp = function (configuration) {
|
|
|
746
814
|
},
|
|
747
815
|
/**
|
|
748
816
|
* 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.
|
|
749
|
-
* @summary Invite by tenant
|
|
817
|
+
* @summary Invite a customer by tenant
|
|
750
818
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
751
819
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
752
820
|
* @param {*} [options] Override http request option.
|
|
@@ -840,6 +908,32 @@ var CustomersApiFp = function (configuration) {
|
|
|
840
908
|
});
|
|
841
909
|
});
|
|
842
910
|
},
|
|
911
|
+
/**
|
|
912
|
+
* Request to update an existing policy by customer
|
|
913
|
+
* @summary Request policy update by customer
|
|
914
|
+
* @param {string} policyCode The policy code
|
|
915
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
916
|
+
* @param {string} code Policy code
|
|
917
|
+
* @param {Array<string>} policyObjects Policy objects
|
|
918
|
+
* @param {string} from Update from
|
|
919
|
+
* @param {string} [to] Update to
|
|
920
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
921
|
+
* @param {*} [options] Override http request option.
|
|
922
|
+
* @throws {RequiredError}
|
|
923
|
+
*/
|
|
924
|
+
requestPolicyUpdate: function (policyCode, customerCode, code, policyObjects, from, to, authorization, options) {
|
|
925
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
926
|
+
var localVarAxiosArgs;
|
|
927
|
+
return __generator(this, function (_a) {
|
|
928
|
+
switch (_a.label) {
|
|
929
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode, code, policyObjects, from, to, authorization, options)];
|
|
930
|
+
case 1:
|
|
931
|
+
localVarAxiosArgs = _a.sent();
|
|
932
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
});
|
|
936
|
+
},
|
|
843
937
|
/**
|
|
844
938
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
845
939
|
* @summary Change password by customer
|
|
@@ -975,7 +1069,7 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
975
1069
|
},
|
|
976
1070
|
/**
|
|
977
1071
|
* 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.
|
|
978
|
-
* @summary Invite by
|
|
1072
|
+
* @summary Invite a customer by self
|
|
979
1073
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
980
1074
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
981
1075
|
* @param {*} [options] Override http request option.
|
|
@@ -986,7 +1080,7 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
986
1080
|
},
|
|
987
1081
|
/**
|
|
988
1082
|
* 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.
|
|
989
|
-
* @summary Invite by tenant
|
|
1083
|
+
* @summary Invite a customer by tenant
|
|
990
1084
|
* @param {InviteByCustomerRequestDto} inviteByCustomerRequestDto
|
|
991
1085
|
* @param {string} [authorization] Bearer Token: provided by the Emil Insurance Suite\'s Auth login endpoint under the name accessToken
|
|
992
1086
|
* @param {*} [options] Override http request option.
|
|
@@ -1040,6 +1134,22 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
1040
1134
|
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
1041
1135
|
return localVarFp.refreshToken(refreshTokenDto, cookie, options).then(function (request) { return request(axios, basePath); });
|
|
1042
1136
|
},
|
|
1137
|
+
/**
|
|
1138
|
+
* Request to update an existing policy by customer
|
|
1139
|
+
* @summary Request policy update by customer
|
|
1140
|
+
* @param {string} policyCode The policy code
|
|
1141
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer
|
|
1142
|
+
* @param {string} code Policy code
|
|
1143
|
+
* @param {Array<string>} policyObjects Policy objects
|
|
1144
|
+
* @param {string} from Update from
|
|
1145
|
+
* @param {string} [to] Update to
|
|
1146
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1147
|
+
* @param {*} [options] Override http request option.
|
|
1148
|
+
* @throws {RequiredError}
|
|
1149
|
+
*/
|
|
1150
|
+
requestPolicyUpdate: function (policyCode, customerCode, code, policyObjects, from, to, authorization, options) {
|
|
1151
|
+
return localVarFp.requestPolicyUpdate(policyCode, customerCode, code, policyObjects, from, to, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
1152
|
+
},
|
|
1043
1153
|
/**
|
|
1044
1154
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
1045
1155
|
* @summary Change password by customer
|
|
@@ -1144,7 +1254,7 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1144
1254
|
};
|
|
1145
1255
|
/**
|
|
1146
1256
|
* 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.
|
|
1147
|
-
* @summary Invite by
|
|
1257
|
+
* @summary Invite a customer by self
|
|
1148
1258
|
* @param {CustomersApiInviteByCustomerRequest} requestParameters Request parameters.
|
|
1149
1259
|
* @param {*} [options] Override http request option.
|
|
1150
1260
|
* @throws {RequiredError}
|
|
@@ -1156,7 +1266,7 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1156
1266
|
};
|
|
1157
1267
|
/**
|
|
1158
1268
|
* 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.
|
|
1159
|
-
* @summary Invite by tenant
|
|
1269
|
+
* @summary Invite a customer by tenant
|
|
1160
1270
|
* @param {CustomersApiInviteByTenantRequest} requestParameters Request parameters.
|
|
1161
1271
|
* @param {*} [options] Override http request option.
|
|
1162
1272
|
* @throws {RequiredError}
|
|
@@ -1202,6 +1312,18 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
1202
1312
|
var _this = this;
|
|
1203
1313
|
return (0, exports.CustomersApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1204
1314
|
};
|
|
1315
|
+
/**
|
|
1316
|
+
* Request to update an existing policy by customer
|
|
1317
|
+
* @summary Request policy update by customer
|
|
1318
|
+
* @param {CustomersApiRequestPolicyUpdateRequest} requestParameters Request parameters.
|
|
1319
|
+
* @param {*} [options] Override http request option.
|
|
1320
|
+
* @throws {RequiredError}
|
|
1321
|
+
* @memberof CustomersApi
|
|
1322
|
+
*/
|
|
1323
|
+
CustomersApi.prototype.requestPolicyUpdate = function (requestParameters, options) {
|
|
1324
|
+
var _this = this;
|
|
1325
|
+
return (0, exports.CustomersApiFp)(this.configuration).requestPolicyUpdate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.code, requestParameters.policyObjects, requestParameters.from, requestParameters.to, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1326
|
+
};
|
|
1205
1327
|
/**
|
|
1206
1328
|
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
1207
1329
|
* @summary Change password by customer
|
package/dist/base.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { Configuration } from "./configuration";
|
|
13
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
14
|
+
import { InitiateAuthResponseClass, RespondToAuthChallengeClass, RespondToAuthChallengeRequestDto } from "./models";
|
|
14
15
|
export declare const BASE_PATH: string;
|
|
15
16
|
/**
|
|
16
17
|
*
|
|
@@ -51,10 +52,18 @@ export declare class BaseAPI {
|
|
|
51
52
|
protected configuration: Configuration | undefined;
|
|
52
53
|
private username?;
|
|
53
54
|
private password?;
|
|
55
|
+
private isCustomerToken;
|
|
54
56
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
57
|
+
initialize(env?: Environment): Promise<void>;
|
|
58
|
+
private loadCredentials;
|
|
59
|
+
private readConfigFile;
|
|
60
|
+
private readEnvVariables;
|
|
55
61
|
selectEnvironment(env: Environment): void;
|
|
56
|
-
authorize(username: string, password: string
|
|
57
|
-
|
|
62
|
+
authorize(username: string, password: string): Promise<void>;
|
|
63
|
+
initiateAuthorization(username: string, password: string, tenantSlug: string): Promise<AxiosResponse<InitiateAuthResponseClass>>;
|
|
64
|
+
respondToAuthorizationChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto): Promise<AxiosResponse<RespondToAuthChallengeClass>>;
|
|
65
|
+
refreshTokenTenant(): Promise<string>;
|
|
66
|
+
refreshTokenCustomer(): Promise<string>;
|
|
58
67
|
private extractRefreshToken;
|
|
59
68
|
private attachInterceptor;
|
|
60
69
|
}
|