@emilgroup/customer-sdk-node 1.35.0 → 1.36.1-beta.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.
Files changed (35) hide show
  1. package/.openapi-generator/FILES +1 -1
  2. package/README.md +2 -2
  3. package/api/leads-api.ts +38 -38
  4. package/base.ts +23 -13
  5. package/dist/api/leads-api.d.ts +24 -24
  6. package/dist/api/leads-api.js +34 -34
  7. package/dist/base.d.ts +4 -2
  8. package/dist/base.js +38 -28
  9. package/dist/models/create-customer-request-dto.d.ts +6 -0
  10. package/dist/models/create-lead-request-dto.d.ts +4 -9
  11. package/dist/models/forgot-password-request-dto.d.ts +6 -0
  12. package/dist/models/index.d.ts +1 -1
  13. package/dist/models/index.js +1 -1
  14. package/dist/models/invite-by-customer-request-dto.d.ts +6 -0
  15. package/dist/models/invite-by-tenant-request-dto.d.ts +6 -0
  16. package/dist/models/lead-class.d.ts +13 -1
  17. package/dist/models/link-lead-partner-request-dto.d.ts +36 -0
  18. package/dist/models/partner-link-class.d.ts +12 -0
  19. package/dist/models/reset-password-by-customer-request-dto.d.ts +6 -0
  20. package/dist/models/update-lead-request-dto.d.ts +6 -0
  21. package/models/create-customer-request-dto.ts +6 -0
  22. package/models/create-lead-request-dto.ts +4 -9
  23. package/models/forgot-password-request-dto.ts +6 -0
  24. package/models/index.ts +1 -1
  25. package/models/invite-by-customer-request-dto.ts +6 -0
  26. package/models/invite-by-tenant-request-dto.ts +6 -0
  27. package/models/lead-class.ts +13 -1
  28. package/models/link-lead-partner-request-dto.ts +42 -0
  29. package/models/partner-link-class.ts +12 -0
  30. package/models/reset-password-by-customer-request-dto.ts +6 -0
  31. package/models/update-lead-request-dto.ts +6 -0
  32. package/package.json +1 -1
  33. package/dist/models/grpc-update-lead-request-dto.d.ts +0 -50
  34. package/models/grpc-update-lead-request-dto.ts +0 -56
  35. /package/dist/models/{grpc-update-lead-request-dto.js → link-lead-partner-request-dto.js} +0 -0
@@ -48,7 +48,6 @@ models/get-customer-response-class.ts
48
48
  models/get-lead-response-class.ts
49
49
  models/get-policy-response-class.ts
50
50
  models/get-product-response-class.ts
51
- models/grpc-update-lead-request-dto.ts
52
51
  models/index.ts
53
52
  models/initiate-auth-request-dto.ts
54
53
  models/initiate-auth-response-class.ts
@@ -65,6 +64,7 @@ models/invite-class.ts
65
64
  models/invoice-class.ts
66
65
  models/lead-bank-account-class.ts
67
66
  models/lead-class.ts
67
+ models/link-lead-partner-request-dto.ts
68
68
  models/list-customer-claims-response-class.ts
69
69
  models/list-documents-response-class.ts
70
70
  models/list-invoices-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/customer-sdk-node@1.35.0 --save
20
+ npm install @emilgroup/customer-sdk-node@1.36.1-beta.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/customer-sdk-node@1.35.0
24
+ yarn add @emilgroup/customer-sdk-node@1.36.1-beta.0
25
25
  ```
26
26
 
27
27
  And then you can import `CustomersApi`.
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 that was returned when you created it and Emil Api will return the corresponding lead information.
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} code Unique identifier for the object.
99
+ * @param {string} leadCode The unique identification code of the lead.
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 (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)
106
+ getLead: async (leadCode: string, customerCode: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
107
+ // verify required parameter 'leadCode' is not null or undefined
108
+ assertParamExists('getLead', 'leadCode', leadCode)
109
109
  // verify required parameter 'customerCode' is not null or undefined
110
110
  assertParamExists('getLead', 'customerCode', customerCode)
111
- const localVarPath = `/v1/customers/{customerCode}/leads/{code}`
112
- .replace(`{${"code"}}`, encodeURIComponent(String(code)))
111
+ const localVarPath = `/v1/customers/{customerCode}/leads/{leadCode}`
112
+ .replace(`{${"leadCode"}}`, encodeURIComponent(String(leadCode)))
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. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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 \&quot;me\&quot; 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} code Unique identifier for the object.
233
+ * @param {string} leadCode The unique identification code of the lead.
234
234
  * @param {string} customerCode The customer code or \&quot;me\&quot; 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 (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)
240
+ updateLead: async (leadCode: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
241
+ // verify required parameter 'leadCode' is not null or undefined
242
+ assertParamExists('updateLead', 'leadCode', leadCode)
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/{code}`
248
- .replace(`{${"code"}}`, encodeURIComponent(String(code)))
247
+ const localVarPath = `/v1/customers/{customerCode}/leads/{leadCode}`
248
+ .replace(`{${"leadCode"}}`, encodeURIComponent(String(leadCode)))
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 that was returned when you created it and Emil Api will return the corresponding lead information.
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} code Unique identifier for the object.
311
+ * @param {string} leadCode The unique identification code of the lead.
312
312
  * @param {string} customerCode The customer code or \&quot;me\&quot; 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(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);
318
+ async getLead(leadCode: string, customerCode: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadResponseClass>> {
319
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLead(leadCode, 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. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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 \&quot;me\&quot; 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} code Unique identifier for the object.
344
+ * @param {string} leadCode The unique identification code of the lead.
345
345
  * @param {string} customerCode The customer code or \&quot;me\&quot; 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(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);
351
+ async updateLead(leadCode: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadResponseClass>> {
352
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(leadCode, 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 that was returned when you created it and Emil Api will return the corresponding lead information.
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} code Unique identifier for the object.
380
+ * @param {string} leadCode The unique identification code of the lead.
381
381
  * @param {string} customerCode The customer code or \&quot;me\&quot; 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(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));
387
+ getLead(leadCode: string, customerCode: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetLeadResponseClass> {
388
+ return localVarFp.getLead(leadCode, customerCode, authorization, expand, options).then((request) => request(axios, basePath));
389
389
  },
390
390
  /**
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.
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 \&quot;me\&quot; 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} code Unique identifier for the object.
411
+ * @param {string} leadCode The unique identification code of the lead.
412
412
  * @param {string} customerCode The customer code or \&quot;me\&quot; 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(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));
418
+ updateLead(leadCode: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass> {
419
+ return localVarFp.updateLead(leadCode, 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
- * Unique identifier for the object.
459
+ * The unique identification code of the lead.
460
460
  * @type {string}
461
461
  * @memberof LeadsApiGetLead
462
462
  */
463
- readonly code: string
463
+ readonly leadCode: string
464
464
 
465
465
  /**
466
466
  * The customer code or \&quot;me\&quot; for the currently logged in customer.
@@ -561,11 +561,11 @@ export interface LeadsApiListLeadsRequest {
561
561
  */
562
562
  export interface LeadsApiUpdateLeadRequest {
563
563
  /**
564
- * Unique identifier for the object.
564
+ * The unique identification code of the lead.
565
565
  * @type {string}
566
566
  * @memberof LeadsApiUpdateLead
567
567
  */
568
- readonly code: string
568
+ readonly leadCode: string
569
569
 
570
570
  /**
571
571
  * The customer code or \&quot;me\&quot; 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 that was returned when you created it and Emil Api will return the corresponding lead information.
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.code, requestParameters.customerCode, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
620
+ return LeadsApiFp(this.configuration).getLead(requestParameters.leadCode, 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. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
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.code, requestParameters.customerCode, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
644
+ return LeadsApiFp(this.configuration).updateLead(requestParameters.leadCode, requestParameters.customerCode, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
645
645
  }
646
646
  }
package/base.ts CHANGED
@@ -81,6 +81,7 @@ export class BaseAPI {
81
81
  private username?: string;
82
82
  private password?: string;
83
83
  private isCustomerToken = false;
84
+ private permissions: Array<string> = [];
84
85
 
85
86
  constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
86
87
  if (configuration) {
@@ -151,6 +152,10 @@ export class BaseAPI {
151
152
  this.configuration.basePath = env;
152
153
  }
153
154
 
155
+ getPermissions(): Array<string> {
156
+ return this.permissions;
157
+ }
158
+
154
159
  async authorize(username: string, password: string): Promise<void> {
155
160
  const options: AxiosRequestConfig = {
156
161
  method: 'POST',
@@ -165,9 +170,10 @@ export class BaseAPI {
165
170
 
166
171
  const response = await globalAxios.request<LoginClass>(options);
167
172
 
168
- const { data: { accessToken } } = response;
173
+ const { data: { accessToken, permissions } } = response;
169
174
  this.configuration.username = username;
170
175
  this.configuration.accessToken = `Bearer ${accessToken}`;
176
+ this.permissions = permissions;
171
177
 
172
178
  const refreshToken = this.extractRefreshToken(response);
173
179
  this.configuration.refreshToken = refreshToken;
@@ -234,12 +240,12 @@ export class BaseAPI {
234
240
  return response;
235
241
  }
236
242
 
237
- async refreshTokenTenant(): Promise<string> {
243
+ async refreshTokenTenant(): Promise<LoginClass> {
238
244
  const { username, refreshToken } = this.configuration;
239
245
 
240
246
 
241
247
  if (!username || !refreshToken) {
242
- return '';
248
+ throw new Error('Failed to refresh token.');
243
249
  }
244
250
 
245
251
  const options: AxiosRequestConfig = {
@@ -253,16 +259,16 @@ export class BaseAPI {
253
259
  withCredentials: true,
254
260
  };
255
261
 
256
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
262
+ const response = await globalAxios.request<LoginClass>(options);
257
263
 
258
- return accessToken;
264
+ return response.data;
259
265
  }
260
266
 
261
- async refreshTokenCustomer(): Promise<string> {
267
+ async refreshTokenCustomer(): Promise<LoginClass> {
262
268
  const { username, refreshToken, tenantSlug } = this.configuration;
263
269
 
264
270
  if (!username || !refreshToken) {
265
- return '';
271
+ throw new Error('Failed to refresh token.');
266
272
  }
267
273
 
268
274
  const options: AxiosRequestConfig = {
@@ -276,9 +282,9 @@ export class BaseAPI {
276
282
  withCredentials: true,
277
283
  };
278
284
 
279
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
285
+ const response = await globalAxios.request<LoginClass>(options);
280
286
 
281
- return accessToken;
287
+ return response.data;
282
288
  }
283
289
 
284
290
  private extractRefreshToken(response: AxiosResponse): string {
@@ -304,12 +310,14 @@ export class BaseAPI {
304
310
  originalConfig._retry = true;
305
311
  try {
306
312
  let tokenString: string;
313
+ let permissions: Array<string>;
307
314
  if (this.isCustomerToken) {
308
- tokenString = await this.refreshTokenCustomer();
315
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenCustomer());
309
316
  } else {
310
- tokenString = await this.refreshTokenTenant();
317
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenTenant());
311
318
  }
312
319
  const accessToken = `Bearer ${tokenString}`;
320
+ this.permissions = permissions;
313
321
 
314
322
  delete originalConfig.headers['Authorization']
315
323
 
@@ -336,12 +344,14 @@ export class BaseAPI {
336
344
  _retry_count++;
337
345
  try {
338
346
  let tokenString: string;
347
+ let permissions: Array<string>;
339
348
  if (this.isCustomerToken) {
340
- tokenString = await this.refreshTokenCustomer();
349
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenCustomer());
341
350
  } else {
342
- tokenString = await this.refreshTokenTenant();
351
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenTenant());
343
352
  }
344
353
  const accessToken = `Bearer ${tokenString}`;
354
+ this.permissions = permissions;
345
355
 
346
356
  _retry = true;
347
357
  originalConfig.headers['Authorization'] = accessToken;
@@ -34,18 +34,18 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
34
34
  */
35
35
  createLead: (customerCode: string, createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
36
36
  /**
37
- * 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.
37
+ * 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.
38
38
  * @summary Retrieve the lead
39
- * @param {string} code Unique identifier for the object.
39
+ * @param {string} leadCode The unique identification code of the lead.
40
40
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
41
41
  * @param {string} [authorization] Bearer Token
42
42
  * @param {string} [expand]
43
43
  * @param {*} [options] Override http request option.
44
44
  * @throws {RequiredError}
45
45
  */
46
- getLead: (code: string, customerCode: string, authorization?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
46
+ getLead: (leadCode: string, customerCode: string, authorization?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
47
47
  /**
48
- * 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.
48
+ * 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.
49
49
  * @summary List leads
50
50
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
51
51
  * @param {string} [authorization] Bearer Token
@@ -63,14 +63,14 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
63
63
  /**
64
64
  * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
65
65
  * @summary Update the lead
66
- * @param {string} code Unique identifier for the object.
66
+ * @param {string} leadCode The unique identification code of the lead.
67
67
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
68
68
  * @param {UpdateLeadRequestDto} updateLeadRequestDto
69
69
  * @param {string} [authorization] Bearer Token
70
70
  * @param {*} [options] Override http request option.
71
71
  * @throws {RequiredError}
72
72
  */
73
- updateLead: (code: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
73
+ updateLead: (leadCode: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
74
74
  };
75
75
  /**
76
76
  * LeadsApi - functional programming interface
@@ -88,18 +88,18 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
88
88
  */
89
89
  createLead(customerCode: string, createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadResponseClass>>;
90
90
  /**
91
- * 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.
91
+ * 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.
92
92
  * @summary Retrieve the lead
93
- * @param {string} code Unique identifier for the object.
93
+ * @param {string} leadCode The unique identification code of the lead.
94
94
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
95
95
  * @param {string} [authorization] Bearer Token
96
96
  * @param {string} [expand]
97
97
  * @param {*} [options] Override http request option.
98
98
  * @throws {RequiredError}
99
99
  */
100
- getLead(code: string, customerCode: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadResponseClass>>;
100
+ getLead(leadCode: string, customerCode: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadResponseClass>>;
101
101
  /**
102
- * 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.
102
+ * 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.
103
103
  * @summary List leads
104
104
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
105
105
  * @param {string} [authorization] Bearer Token
@@ -117,14 +117,14 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
117
117
  /**
118
118
  * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
119
119
  * @summary Update the lead
120
- * @param {string} code Unique identifier for the object.
120
+ * @param {string} leadCode The unique identification code of the lead.
121
121
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
122
122
  * @param {UpdateLeadRequestDto} updateLeadRequestDto
123
123
  * @param {string} [authorization] Bearer Token
124
124
  * @param {*} [options] Override http request option.
125
125
  * @throws {RequiredError}
126
126
  */
127
- updateLead(code: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadResponseClass>>;
127
+ updateLead(leadCode: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadResponseClass>>;
128
128
  };
129
129
  /**
130
130
  * LeadsApi - factory interface
@@ -142,18 +142,18 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
142
142
  */
143
143
  createLead(customerCode: string, createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass>;
144
144
  /**
145
- * 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.
145
+ * 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.
146
146
  * @summary Retrieve the lead
147
- * @param {string} code Unique identifier for the object.
147
+ * @param {string} leadCode The unique identification code of the lead.
148
148
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
149
149
  * @param {string} [authorization] Bearer Token
150
150
  * @param {string} [expand]
151
151
  * @param {*} [options] Override http request option.
152
152
  * @throws {RequiredError}
153
153
  */
154
- getLead(code: string, customerCode: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetLeadResponseClass>;
154
+ getLead(leadCode: string, customerCode: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetLeadResponseClass>;
155
155
  /**
156
- * 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.
156
+ * 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.
157
157
  * @summary List leads
158
158
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
159
159
  * @param {string} [authorization] Bearer Token
@@ -171,14 +171,14 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
171
171
  /**
172
172
  * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
173
173
  * @summary Update the lead
174
- * @param {string} code Unique identifier for the object.
174
+ * @param {string} leadCode The unique identification code of the lead.
175
175
  * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
176
176
  * @param {UpdateLeadRequestDto} updateLeadRequestDto
177
177
  * @param {string} [authorization] Bearer Token
178
178
  * @param {*} [options] Override http request option.
179
179
  * @throws {RequiredError}
180
180
  */
181
- updateLead(code: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass>;
181
+ updateLead(leadCode: string, customerCode: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass>;
182
182
  };
183
183
  /**
184
184
  * Request parameters for createLead operation in LeadsApi.
@@ -212,11 +212,11 @@ export interface LeadsApiCreateLeadRequest {
212
212
  */
213
213
  export interface LeadsApiGetLeadRequest {
214
214
  /**
215
- * Unique identifier for the object.
215
+ * The unique identification code of the lead.
216
216
  * @type {string}
217
217
  * @memberof LeadsApiGetLead
218
218
  */
219
- readonly code: string;
219
+ readonly leadCode: string;
220
220
  /**
221
221
  * The customer code or \&quot;me\&quot; for the currently logged in customer.
222
222
  * @type {string}
@@ -304,11 +304,11 @@ export interface LeadsApiListLeadsRequest {
304
304
  */
305
305
  export interface LeadsApiUpdateLeadRequest {
306
306
  /**
307
- * Unique identifier for the object.
307
+ * The unique identification code of the lead.
308
308
  * @type {string}
309
309
  * @memberof LeadsApiUpdateLead
310
310
  */
311
- readonly code: string;
311
+ readonly leadCode: string;
312
312
  /**
313
313
  * The customer code or \&quot;me\&quot; for the currently logged in customer.
314
314
  * @type {string}
@@ -345,7 +345,7 @@ export declare class LeadsApi extends BaseAPI {
345
345
  */
346
346
  createLead(requestParameters: LeadsApiCreateLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateLeadResponseClass, any>>;
347
347
  /**
348
- * 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.
348
+ * 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.
349
349
  * @summary Retrieve the lead
350
350
  * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
351
351
  * @param {*} [options] Override http request option.
@@ -354,7 +354,7 @@ export declare class LeadsApi extends BaseAPI {
354
354
  */
355
355
  getLead(requestParameters: LeadsApiGetLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetLeadResponseClass, any>>;
356
356
  /**
357
- * 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.
357
+ * 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.
358
358
  * @summary List leads
359
359
  * @param {LeadsApiListLeadsRequest} requestParameters Request parameters.
360
360
  * @param {*} [options] Override http request option.