@emilgroup/customer-sdk-node 1.36.1-beta.0 → 1.38.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 +8 -0
- package/README.md +2 -2
- package/api/authentication-api.ts +116 -0
- package/api/customers-api.ts +310 -4
- package/api/leads-api.ts +38 -38
- package/base.ts +5 -5
- package/dist/api/authentication-api.d.ts +66 -0
- package/dist/api/authentication-api.js +89 -0
- package/dist/api/customers-api.d.ts +174 -4
- package/dist/api/customers-api.js +253 -4
- package/dist/api/leads-api.d.ts +24 -24
- package/dist/api/leads-api.js +34 -34
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -2
- package/dist/models/change-customer-email-request-dto.d.ts +30 -0
- package/dist/models/change-customer-email-request-dto.js +15 -0
- package/dist/models/change-password-request-dto.d.ts +30 -0
- package/dist/models/change-password-request-dto.js +15 -0
- package/dist/models/change-password-response-class.d.ts +24 -0
- package/dist/models/change-password-response-class.js +15 -0
- package/dist/models/grpc-update-lead-request-dto.d.ts +50 -0
- package/dist/models/grpc-update-lead-request-dto.js +15 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/dist/models/lead-class.d.ts +1 -1
- package/dist/models/request-change-email-by-customer-request-dto.d.ts +24 -0
- package/dist/models/request-change-email-by-customer-request-dto.js +15 -0
- package/dist/models/request-change-email-by-customer-response-class.d.ts +24 -0
- package/dist/models/request-change-email-by-customer-response-class.js +15 -0
- package/dist/models/update-account-request-dto.d.ts +0 -6
- package/dist/models/update-lead-request-dto.d.ts +0 -6
- package/dist/models/verify-change-email-token-request-dto.d.ts +24 -0
- package/dist/models/verify-change-email-token-request-dto.js +15 -0
- package/dist/models/verify-change-email-token-response-class.d.ts +36 -0
- package/dist/models/verify-change-email-token-response-class.js +15 -0
- package/models/change-customer-email-request-dto.ts +36 -0
- package/models/change-password-request-dto.ts +36 -0
- package/models/change-password-response-class.ts +30 -0
- package/models/grpc-update-lead-request-dto.ts +56 -0
- package/models/index.ts +8 -0
- package/models/lead-class.ts +1 -1
- package/models/request-change-email-by-customer-request-dto.ts +30 -0
- package/models/request-change-email-by-customer-response-class.ts +30 -0
- package/models/update-account-request-dto.ts +0 -6
- package/models/update-lead-request-dto.ts +0 -6
- package/models/verify-change-email-token-request-dto.ts +30 -0
- package/models/verify-change-email-token-response-class.ts +42 -0
- package/package.json +1 -1
package/api/leads-api.ts
CHANGED
|
@@ -94,22 +94,22 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
94
94
|
};
|
|
95
95
|
},
|
|
96
96
|
/**
|
|
97
|
-
* Retrieves the details of the lead that was previously created. Supply the unique lead code
|
|
97
|
+
* Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
|
|
98
98
|
* @summary Retrieve the lead
|
|
99
|
-
* @param {string}
|
|
99
|
+
* @param {string} code Unique identifier for the object.
|
|
100
100
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
101
101
|
* @param {string} [authorization] Bearer Token
|
|
102
102
|
* @param {string} [expand]
|
|
103
103
|
* @param {*} [options] Override http request option.
|
|
104
104
|
* @throws {RequiredError}
|
|
105
105
|
*/
|
|
106
|
-
getLead: async (
|
|
107
|
-
// verify required parameter '
|
|
108
|
-
assertParamExists('getLead', '
|
|
106
|
+
getLead: async (code: string, customerCode: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
107
|
+
// verify required parameter 'code' is not null or undefined
|
|
108
|
+
assertParamExists('getLead', 'code', code)
|
|
109
109
|
// verify required parameter 'customerCode' is not null or undefined
|
|
110
110
|
assertParamExists('getLead', 'customerCode', customerCode)
|
|
111
|
-
const localVarPath = `/v1/customers/{customerCode}/leads/{
|
|
112
|
-
.replace(`{${"
|
|
111
|
+
const localVarPath = `/v1/customers/{customerCode}/leads/{code}`
|
|
112
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)))
|
|
113
113
|
.replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
|
|
114
114
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
115
115
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -148,7 +148,7 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
148
148
|
};
|
|
149
149
|
},
|
|
150
150
|
/**
|
|
151
|
-
* Returns a list of leads you have previously created.
|
|
151
|
+
* Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
152
152
|
* @summary List leads
|
|
153
153
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
154
154
|
* @param {string} [authorization] Bearer Token
|
|
@@ -230,22 +230,22 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
230
230
|
/**
|
|
231
231
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
232
232
|
* @summary Update the lead
|
|
233
|
-
* @param {string}
|
|
233
|
+
* @param {string} code Unique identifier for the object.
|
|
234
234
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
235
235
|
* @param {UpdateLeadRequestDto} updateLeadRequestDto
|
|
236
236
|
* @param {string} [authorization] Bearer Token
|
|
237
237
|
* @param {*} [options] Override http request option.
|
|
238
238
|
* @throws {RequiredError}
|
|
239
239
|
*/
|
|
240
|
-
updateLead: async (
|
|
241
|
-
// verify required parameter '
|
|
242
|
-
assertParamExists('updateLead', '
|
|
240
|
+
updateLead: async (code: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
241
|
+
// verify required parameter 'code' is not null or undefined
|
|
242
|
+
assertParamExists('updateLead', 'code', code)
|
|
243
243
|
// verify required parameter 'customerCode' is not null or undefined
|
|
244
244
|
assertParamExists('updateLead', 'customerCode', customerCode)
|
|
245
245
|
// verify required parameter 'updateLeadRequestDto' is not null or undefined
|
|
246
246
|
assertParamExists('updateLead', 'updateLeadRequestDto', updateLeadRequestDto)
|
|
247
|
-
const localVarPath = `/v1/customers/{customerCode}/leads/{
|
|
248
|
-
.replace(`{${"
|
|
247
|
+
const localVarPath = `/v1/customers/{customerCode}/leads/{code}`
|
|
248
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)))
|
|
249
249
|
.replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
|
|
250
250
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
251
251
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -306,21 +306,21 @@ export const LeadsApiFp = function(configuration?: Configuration) {
|
|
|
306
306
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
307
307
|
},
|
|
308
308
|
/**
|
|
309
|
-
* Retrieves the details of the lead that was previously created. Supply the unique lead code
|
|
309
|
+
* Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
|
|
310
310
|
* @summary Retrieve the lead
|
|
311
|
-
* @param {string}
|
|
311
|
+
* @param {string} code Unique identifier for the object.
|
|
312
312
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
313
313
|
* @param {string} [authorization] Bearer Token
|
|
314
314
|
* @param {string} [expand]
|
|
315
315
|
* @param {*} [options] Override http request option.
|
|
316
316
|
* @throws {RequiredError}
|
|
317
317
|
*/
|
|
318
|
-
async getLead(
|
|
319
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getLead(
|
|
318
|
+
async getLead(code: string, customerCode: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadResponseClass>> {
|
|
319
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getLead(code, customerCode, authorization, expand, options);
|
|
320
320
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
321
321
|
},
|
|
322
322
|
/**
|
|
323
|
-
* Returns a list of leads you have previously created.
|
|
323
|
+
* Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
324
324
|
* @summary List leads
|
|
325
325
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
326
326
|
* @param {string} [authorization] Bearer Token
|
|
@@ -341,15 +341,15 @@ export const LeadsApiFp = function(configuration?: Configuration) {
|
|
|
341
341
|
/**
|
|
342
342
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
343
343
|
* @summary Update the lead
|
|
344
|
-
* @param {string}
|
|
344
|
+
* @param {string} code Unique identifier for the object.
|
|
345
345
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
346
346
|
* @param {UpdateLeadRequestDto} updateLeadRequestDto
|
|
347
347
|
* @param {string} [authorization] Bearer Token
|
|
348
348
|
* @param {*} [options] Override http request option.
|
|
349
349
|
* @throws {RequiredError}
|
|
350
350
|
*/
|
|
351
|
-
async updateLead(
|
|
352
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(
|
|
351
|
+
async updateLead(code: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadResponseClass>> {
|
|
352
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(code, customerCode, updateLeadRequestDto, authorization, options);
|
|
353
353
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
354
354
|
},
|
|
355
355
|
}
|
|
@@ -375,20 +375,20 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
|
|
|
375
375
|
return localVarFp.createLead(customerCode, createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
376
376
|
},
|
|
377
377
|
/**
|
|
378
|
-
* Retrieves the details of the lead that was previously created. Supply the unique lead code
|
|
378
|
+
* Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
|
|
379
379
|
* @summary Retrieve the lead
|
|
380
|
-
* @param {string}
|
|
380
|
+
* @param {string} code Unique identifier for the object.
|
|
381
381
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
382
382
|
* @param {string} [authorization] Bearer Token
|
|
383
383
|
* @param {string} [expand]
|
|
384
384
|
* @param {*} [options] Override http request option.
|
|
385
385
|
* @throws {RequiredError}
|
|
386
386
|
*/
|
|
387
|
-
getLead(
|
|
388
|
-
return localVarFp.getLead(
|
|
387
|
+
getLead(code: string, customerCode: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetLeadResponseClass> {
|
|
388
|
+
return localVarFp.getLead(code, customerCode, authorization, expand, options).then((request) => request(axios, basePath));
|
|
389
389
|
},
|
|
390
390
|
/**
|
|
391
|
-
* Returns a list of leads you have previously created.
|
|
391
|
+
* Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
392
392
|
* @summary List leads
|
|
393
393
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
394
394
|
* @param {string} [authorization] Bearer Token
|
|
@@ -408,15 +408,15 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
|
|
|
408
408
|
/**
|
|
409
409
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
410
410
|
* @summary Update the lead
|
|
411
|
-
* @param {string}
|
|
411
|
+
* @param {string} code Unique identifier for the object.
|
|
412
412
|
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
413
413
|
* @param {UpdateLeadRequestDto} updateLeadRequestDto
|
|
414
414
|
* @param {string} [authorization] Bearer Token
|
|
415
415
|
* @param {*} [options] Override http request option.
|
|
416
416
|
* @throws {RequiredError}
|
|
417
417
|
*/
|
|
418
|
-
updateLead(
|
|
419
|
-
return localVarFp.updateLead(
|
|
418
|
+
updateLead(code: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass> {
|
|
419
|
+
return localVarFp.updateLead(code, customerCode, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
420
420
|
},
|
|
421
421
|
};
|
|
422
422
|
};
|
|
@@ -456,11 +456,11 @@ export interface LeadsApiCreateLeadRequest {
|
|
|
456
456
|
*/
|
|
457
457
|
export interface LeadsApiGetLeadRequest {
|
|
458
458
|
/**
|
|
459
|
-
*
|
|
459
|
+
* Unique identifier for the object.
|
|
460
460
|
* @type {string}
|
|
461
461
|
* @memberof LeadsApiGetLead
|
|
462
462
|
*/
|
|
463
|
-
readonly
|
|
463
|
+
readonly code: string
|
|
464
464
|
|
|
465
465
|
/**
|
|
466
466
|
* The customer code or \"me\" for the currently logged in customer.
|
|
@@ -561,11 +561,11 @@ export interface LeadsApiListLeadsRequest {
|
|
|
561
561
|
*/
|
|
562
562
|
export interface LeadsApiUpdateLeadRequest {
|
|
563
563
|
/**
|
|
564
|
-
*
|
|
564
|
+
* Unique identifier for the object.
|
|
565
565
|
* @type {string}
|
|
566
566
|
* @memberof LeadsApiUpdateLead
|
|
567
567
|
*/
|
|
568
|
-
readonly
|
|
568
|
+
readonly code: string
|
|
569
569
|
|
|
570
570
|
/**
|
|
571
571
|
* The customer code or \"me\" for the currently logged in customer.
|
|
@@ -609,7 +609,7 @@ export class LeadsApi extends BaseAPI {
|
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
/**
|
|
612
|
-
* Retrieves the details of the lead that was previously created. Supply the unique lead code
|
|
612
|
+
* Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
|
|
613
613
|
* @summary Retrieve the lead
|
|
614
614
|
* @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
|
|
615
615
|
* @param {*} [options] Override http request option.
|
|
@@ -617,11 +617,11 @@ export class LeadsApi extends BaseAPI {
|
|
|
617
617
|
* @memberof LeadsApi
|
|
618
618
|
*/
|
|
619
619
|
public getLead(requestParameters: LeadsApiGetLeadRequest, options?: AxiosRequestConfig) {
|
|
620
|
-
return LeadsApiFp(this.configuration).getLead(requestParameters.
|
|
620
|
+
return LeadsApiFp(this.configuration).getLead(requestParameters.code, requestParameters.customerCode, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
/**
|
|
624
|
-
* Returns a list of leads you have previously created.
|
|
624
|
+
* Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
625
625
|
* @summary List leads
|
|
626
626
|
* @param {LeadsApiListLeadsRequest} requestParameters Request parameters.
|
|
627
627
|
* @param {*} [options] Override http request option.
|
|
@@ -641,6 +641,6 @@ export class LeadsApi extends BaseAPI {
|
|
|
641
641
|
* @memberof LeadsApi
|
|
642
642
|
*/
|
|
643
643
|
public updateLead(requestParameters: LeadsApiUpdateLeadRequest, options?: AxiosRequestConfig) {
|
|
644
|
-
return LeadsApiFp(this.configuration).updateLead(requestParameters.
|
|
644
|
+
return LeadsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.customerCode, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
645
645
|
}
|
|
646
646
|
}
|
package/base.ts
CHANGED
|
@@ -42,7 +42,7 @@ export const COLLECTION_FORMATS = {
|
|
|
42
42
|
|
|
43
43
|
export interface LoginClass {
|
|
44
44
|
accessToken: string;
|
|
45
|
-
permissions:
|
|
45
|
+
permissions: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export enum Environment {
|
|
@@ -81,7 +81,7 @@ export class BaseAPI {
|
|
|
81
81
|
private username?: string;
|
|
82
82
|
private password?: string;
|
|
83
83
|
private isCustomerToken = false;
|
|
84
|
-
private permissions
|
|
84
|
+
private permissions?: string;
|
|
85
85
|
|
|
86
86
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
87
87
|
if (configuration) {
|
|
@@ -153,7 +153,7 @@ export class BaseAPI {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
getPermissions(): Array<string> {
|
|
156
|
-
return this.permissions;
|
|
156
|
+
return this.permissions.split(',');
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
async authorize(username: string, password: string): Promise<void> {
|
|
@@ -310,7 +310,7 @@ export class BaseAPI {
|
|
|
310
310
|
originalConfig._retry = true;
|
|
311
311
|
try {
|
|
312
312
|
let tokenString: string;
|
|
313
|
-
let permissions:
|
|
313
|
+
let permissions: string;
|
|
314
314
|
if (this.isCustomerToken) {
|
|
315
315
|
({ accessToken: tokenString, permissions } = await this.refreshTokenCustomer());
|
|
316
316
|
} else {
|
|
@@ -344,7 +344,7 @@ export class BaseAPI {
|
|
|
344
344
|
_retry_count++;
|
|
345
345
|
try {
|
|
346
346
|
let tokenString: string;
|
|
347
|
-
let permissions:
|
|
347
|
+
let permissions: string;
|
|
348
348
|
if (this.isCustomerToken) {
|
|
349
349
|
({ accessToken: tokenString, permissions } = await this.refreshTokenCustomer());
|
|
350
350
|
} else {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { ChangePasswordRequestDto } from '../models';
|
|
16
|
+
import { ChangePasswordResponseClass } from '../models';
|
|
15
17
|
import { ForgotPasswordRequestDto } from '../models';
|
|
16
18
|
import { InitiateAuthRequestDto } from '../models';
|
|
17
19
|
import { InitiateAuthResponseClass } from '../models';
|
|
@@ -24,6 +26,16 @@ import { RespondToAuthChallengeRequestDto } from '../models';
|
|
|
24
26
|
* @export
|
|
25
27
|
*/
|
|
26
28
|
export declare const AuthenticationApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
29
|
+
/**
|
|
30
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
31
|
+
* @summary Change customer password
|
|
32
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
33
|
+
* @param {ChangePasswordRequestDto} changePasswordRequestDto
|
|
34
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
changePassword: (customerCode: string, changePasswordRequestDto: ChangePasswordRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
27
39
|
/**
|
|
28
40
|
* Send a customer a reset-password token via email.
|
|
29
41
|
* @summary Forgot password by customer
|
|
@@ -79,6 +91,16 @@ export declare const AuthenticationApiAxiosParamCreator: (configuration?: Config
|
|
|
79
91
|
* @export
|
|
80
92
|
*/
|
|
81
93
|
export declare const AuthenticationApiFp: (configuration?: Configuration) => {
|
|
94
|
+
/**
|
|
95
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
96
|
+
* @summary Change customer password
|
|
97
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
98
|
+
* @param {ChangePasswordRequestDto} changePasswordRequestDto
|
|
99
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
changePassword(customerCode: string, changePasswordRequestDto: ChangePasswordRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChangePasswordResponseClass>>;
|
|
82
104
|
/**
|
|
83
105
|
* Send a customer a reset-password token via email.
|
|
84
106
|
* @summary Forgot password by customer
|
|
@@ -134,6 +156,16 @@ export declare const AuthenticationApiFp: (configuration?: Configuration) => {
|
|
|
134
156
|
* @export
|
|
135
157
|
*/
|
|
136
158
|
export declare const AuthenticationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
159
|
+
/**
|
|
160
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
161
|
+
* @summary Change customer password
|
|
162
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
163
|
+
* @param {ChangePasswordRequestDto} changePasswordRequestDto
|
|
164
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
165
|
+
* @param {*} [options] Override http request option.
|
|
166
|
+
* @throws {RequiredError}
|
|
167
|
+
*/
|
|
168
|
+
changePassword(customerCode: string, changePasswordRequestDto: ChangePasswordRequestDto, authorization?: string, options?: any): AxiosPromise<ChangePasswordResponseClass>;
|
|
137
169
|
/**
|
|
138
170
|
* Send a customer a reset-password token via email.
|
|
139
171
|
* @summary Forgot password by customer
|
|
@@ -184,6 +216,31 @@ export declare const AuthenticationApiFactory: (configuration?: Configuration, b
|
|
|
184
216
|
*/
|
|
185
217
|
verifyResetPasswordToken(resetToken: string, options?: any): AxiosPromise<void>;
|
|
186
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Request parameters for changePassword operation in AuthenticationApi.
|
|
221
|
+
* @export
|
|
222
|
+
* @interface AuthenticationApiChangePasswordRequest
|
|
223
|
+
*/
|
|
224
|
+
export interface AuthenticationApiChangePasswordRequest {
|
|
225
|
+
/**
|
|
226
|
+
* The customer code or \"me\" for the currently logged in customer.
|
|
227
|
+
* @type {string}
|
|
228
|
+
* @memberof AuthenticationApiChangePassword
|
|
229
|
+
*/
|
|
230
|
+
readonly customerCode: string;
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
* @type {ChangePasswordRequestDto}
|
|
234
|
+
* @memberof AuthenticationApiChangePassword
|
|
235
|
+
*/
|
|
236
|
+
readonly changePasswordRequestDto: ChangePasswordRequestDto;
|
|
237
|
+
/**
|
|
238
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
239
|
+
* @type {string}
|
|
240
|
+
* @memberof AuthenticationApiChangePassword
|
|
241
|
+
*/
|
|
242
|
+
readonly authorization?: string;
|
|
243
|
+
}
|
|
187
244
|
/**
|
|
188
245
|
* Request parameters for forgotPassword operation in AuthenticationApi.
|
|
189
246
|
* @export
|
|
@@ -275,6 +332,15 @@ export interface AuthenticationApiVerifyResetPasswordTokenRequest {
|
|
|
275
332
|
* @extends {BaseAPI}
|
|
276
333
|
*/
|
|
277
334
|
export declare class AuthenticationApi extends BaseAPI {
|
|
335
|
+
/**
|
|
336
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
337
|
+
* @summary Change customer password
|
|
338
|
+
* @param {AuthenticationApiChangePasswordRequest} requestParameters Request parameters.
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
* @memberof AuthenticationApi
|
|
342
|
+
*/
|
|
343
|
+
changePassword(requestParameters: AuthenticationApiChangePasswordRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ChangePasswordResponseClass, any>>;
|
|
278
344
|
/**
|
|
279
345
|
* Send a customer a reset-password token via email.
|
|
280
346
|
* @summary Forgot password by customer
|
|
@@ -96,6 +96,49 @@ var FormData = require('form-data');
|
|
|
96
96
|
var AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
97
97
|
var _this = this;
|
|
98
98
|
return {
|
|
99
|
+
/**
|
|
100
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
101
|
+
* @summary Change customer password
|
|
102
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
103
|
+
* @param {ChangePasswordRequestDto} changePasswordRequestDto
|
|
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
|
+
changePassword: function (customerCode, changePasswordRequestDto, 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)('changePassword', 'customerCode', customerCode);
|
|
115
|
+
// verify required parameter 'changePasswordRequestDto' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('changePassword', 'changePasswordRequestDto', changePasswordRequestDto);
|
|
117
|
+
localVarPath = "/v1/customers/{customerCode}/change-password"
|
|
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)(changePasswordRequestDto, localVarRequestOptions, configuration);
|
|
135
|
+
return [2 /*return*/, {
|
|
136
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
137
|
+
options: localVarRequestOptions,
|
|
138
|
+
}];
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
},
|
|
99
142
|
/**
|
|
100
143
|
* Send a customer a reset-password token via email.
|
|
101
144
|
* @summary Forgot password by customer
|
|
@@ -321,6 +364,28 @@ exports.AuthenticationApiAxiosParamCreator = AuthenticationApiAxiosParamCreator;
|
|
|
321
364
|
var AuthenticationApiFp = function (configuration) {
|
|
322
365
|
var localVarAxiosParamCreator = (0, exports.AuthenticationApiAxiosParamCreator)(configuration);
|
|
323
366
|
return {
|
|
367
|
+
/**
|
|
368
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
369
|
+
* @summary Change customer password
|
|
370
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
371
|
+
* @param {ChangePasswordRequestDto} changePasswordRequestDto
|
|
372
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
373
|
+
* @param {*} [options] Override http request option.
|
|
374
|
+
* @throws {RequiredError}
|
|
375
|
+
*/
|
|
376
|
+
changePassword: function (customerCode, changePasswordRequestDto, authorization, options) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
378
|
+
var localVarAxiosArgs;
|
|
379
|
+
return __generator(this, function (_a) {
|
|
380
|
+
switch (_a.label) {
|
|
381
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.changePassword(customerCode, changePasswordRequestDto, authorization, options)];
|
|
382
|
+
case 1:
|
|
383
|
+
localVarAxiosArgs = _a.sent();
|
|
384
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
},
|
|
324
389
|
/**
|
|
325
390
|
* Send a customer a reset-password token via email.
|
|
326
391
|
* @summary Forgot password by customer
|
|
@@ -452,6 +517,18 @@ exports.AuthenticationApiFp = AuthenticationApiFp;
|
|
|
452
517
|
var AuthenticationApiFactory = function (configuration, basePath, axios) {
|
|
453
518
|
var localVarFp = (0, exports.AuthenticationApiFp)(configuration);
|
|
454
519
|
return {
|
|
520
|
+
/**
|
|
521
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
522
|
+
* @summary Change customer password
|
|
523
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
524
|
+
* @param {ChangePasswordRequestDto} changePasswordRequestDto
|
|
525
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
*/
|
|
529
|
+
changePassword: function (customerCode, changePasswordRequestDto, authorization, options) {
|
|
530
|
+
return localVarFp.changePassword(customerCode, changePasswordRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
531
|
+
},
|
|
455
532
|
/**
|
|
456
533
|
* Send a customer a reset-password token via email.
|
|
457
534
|
* @summary Forgot password by customer
|
|
@@ -527,6 +604,18 @@ var AuthenticationApi = /** @class */ (function (_super) {
|
|
|
527
604
|
function AuthenticationApi() {
|
|
528
605
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
529
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* Change the customer password. Please use forgot-password endpoint if current password is lost.
|
|
609
|
+
* @summary Change customer password
|
|
610
|
+
* @param {AuthenticationApiChangePasswordRequest} requestParameters Request parameters.
|
|
611
|
+
* @param {*} [options] Override http request option.
|
|
612
|
+
* @throws {RequiredError}
|
|
613
|
+
* @memberof AuthenticationApi
|
|
614
|
+
*/
|
|
615
|
+
AuthenticationApi.prototype.changePassword = function (requestParameters, options) {
|
|
616
|
+
var _this = this;
|
|
617
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).changePassword(requestParameters.customerCode, requestParameters.changePasswordRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
618
|
+
};
|
|
530
619
|
/**
|
|
531
620
|
* Send a customer a reset-password token via email.
|
|
532
621
|
* @summary Forgot password by customer
|