@emilgroup/public-api-sdk-node 1.30.0 → 1.31.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/README.md +2 -2
- package/api/leads-api.ts +21 -8
- package/api/payments-setup-api.ts +21 -8
- package/base.ts +3 -3
- package/dist/api/leads-api.d.ts +13 -4
- package/dist/api/leads-api.js +13 -8
- package/dist/api/payments-setup-api.d.ts +13 -4
- package/dist/api/payments-setup-api.js +13 -8
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -2
- package/dist/models/complete-payment-setup-request-dto.d.ts +6 -0
- package/dist/models/initiate-payment-setup-request-dto.d.ts +6 -0
- package/dist/models/partner-class.d.ts +1 -1
- package/dist/models/update-lead-request-dto.d.ts +7 -0
- package/models/complete-payment-setup-request-dto.ts +6 -0
- package/models/initiate-payment-setup-request-dto.ts +6 -0
- package/models/partner-class.ts +1 -1
- package/models/update-lead-request-dto.ts +7 -0
- package/package.json +1 -1
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/public-api-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/public-api-sdk-node@1.31.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/public-api-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/public-api-sdk-node@1.31.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PublicApi`.
|
package/api/leads-api.ts
CHANGED
|
@@ -233,12 +233,16 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
233
233
|
/**
|
|
234
234
|
* This will initiate a lead code.
|
|
235
235
|
* @summary Initiate a lead code
|
|
236
|
+
* @param {string} productSlug
|
|
236
237
|
* @param {string} [authorization] Bearer Token
|
|
237
238
|
* @param {*} [options] Override http request option.
|
|
238
239
|
* @throws {RequiredError}
|
|
239
240
|
*/
|
|
240
|
-
initiateLead: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
241
|
-
|
|
241
|
+
initiateLead: async (productSlug: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
242
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
243
|
+
assertParamExists('initiateLead', 'productSlug', productSlug)
|
|
244
|
+
const localVarPath = `/publicapi/v1/leads/initiate/{productSlug}`
|
|
245
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
242
246
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
243
247
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
244
248
|
let baseOptions;
|
|
@@ -434,12 +438,13 @@ export const LeadsApiFp = function(configuration?: Configuration) {
|
|
|
434
438
|
/**
|
|
435
439
|
* This will initiate a lead code.
|
|
436
440
|
* @summary Initiate a lead code
|
|
441
|
+
* @param {string} productSlug
|
|
437
442
|
* @param {string} [authorization] Bearer Token
|
|
438
443
|
* @param {*} [options] Override http request option.
|
|
439
444
|
* @throws {RequiredError}
|
|
440
445
|
*/
|
|
441
|
-
async initiateLead(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateLeadResponseClass>> {
|
|
442
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLead(authorization, options);
|
|
446
|
+
async initiateLead(productSlug: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateLeadResponseClass>> {
|
|
447
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLead(productSlug, authorization, options);
|
|
443
448
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
444
449
|
},
|
|
445
450
|
/**
|
|
@@ -525,12 +530,13 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
|
|
|
525
530
|
/**
|
|
526
531
|
* This will initiate a lead code.
|
|
527
532
|
* @summary Initiate a lead code
|
|
533
|
+
* @param {string} productSlug
|
|
528
534
|
* @param {string} [authorization] Bearer Token
|
|
529
535
|
* @param {*} [options] Override http request option.
|
|
530
536
|
* @throws {RequiredError}
|
|
531
537
|
*/
|
|
532
|
-
initiateLead(authorization?: string, options?: any): AxiosPromise<InitiateLeadResponseClass> {
|
|
533
|
-
return localVarFp.initiateLead(authorization, options).then((request) => request(axios, basePath));
|
|
538
|
+
initiateLead(productSlug: string, authorization?: string, options?: any): AxiosPromise<InitiateLeadResponseClass> {
|
|
539
|
+
return localVarFp.initiateLead(productSlug, authorization, options).then((request) => request(axios, basePath));
|
|
534
540
|
},
|
|
535
541
|
/**
|
|
536
542
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
@@ -649,6 +655,13 @@ export interface LeadsApiGetLeadRequest {
|
|
|
649
655
|
* @interface LeadsApiInitiateLeadRequest
|
|
650
656
|
*/
|
|
651
657
|
export interface LeadsApiInitiateLeadRequest {
|
|
658
|
+
/**
|
|
659
|
+
*
|
|
660
|
+
* @type {string}
|
|
661
|
+
* @memberof LeadsApiInitiateLead
|
|
662
|
+
*/
|
|
663
|
+
readonly productSlug: string
|
|
664
|
+
|
|
652
665
|
/**
|
|
653
666
|
* Bearer Token
|
|
654
667
|
* @type {string}
|
|
@@ -776,8 +789,8 @@ export class LeadsApi extends BaseAPI {
|
|
|
776
789
|
* @throws {RequiredError}
|
|
777
790
|
* @memberof LeadsApi
|
|
778
791
|
*/
|
|
779
|
-
public initiateLead(requestParameters: LeadsApiInitiateLeadRequest
|
|
780
|
-
return LeadsApiFp(this.configuration).initiateLead(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
792
|
+
public initiateLead(requestParameters: LeadsApiInitiateLeadRequest, options?: AxiosRequestConfig) {
|
|
793
|
+
return LeadsApiFp(this.configuration).initiateLead(requestParameters.productSlug, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
781
794
|
}
|
|
782
795
|
|
|
783
796
|
/**
|
|
@@ -95,13 +95,17 @@ export const PaymentsSetupApiAxiosParamCreator = function (configuration?: Confi
|
|
|
95
95
|
/**
|
|
96
96
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
97
97
|
* @summary Get public key and psp
|
|
98
|
+
* @param {string} productSlug
|
|
98
99
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
99
100
|
* @param {string} [authorization] Bearer Token
|
|
100
101
|
* @param {*} [options] Override http request option.
|
|
101
102
|
* @throws {RequiredError}
|
|
102
103
|
*/
|
|
103
|
-
getPublicPSPConfig: async (idempotencyKey?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
104
|
-
|
|
104
|
+
getPublicPSPConfig: async (productSlug: string, idempotencyKey?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
105
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
106
|
+
assertParamExists('getPublicPSPConfig', 'productSlug', productSlug)
|
|
107
|
+
const localVarPath = `/publicapi/v1/payment-setup/get-psp-config/{productSlug}`
|
|
108
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
105
109
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
106
110
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
107
111
|
let baseOptions;
|
|
@@ -216,13 +220,14 @@ export const PaymentsSetupApiFp = function(configuration?: Configuration) {
|
|
|
216
220
|
/**
|
|
217
221
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
218
222
|
* @summary Get public key and psp
|
|
223
|
+
* @param {string} productSlug
|
|
219
224
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
220
225
|
* @param {string} [authorization] Bearer Token
|
|
221
226
|
* @param {*} [options] Override http request option.
|
|
222
227
|
* @throws {RequiredError}
|
|
223
228
|
*/
|
|
224
|
-
async getPublicPSPConfig(idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPublicPspSettingsResponseClass>> {
|
|
225
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicPSPConfig(idempotencyKey, authorization, options);
|
|
229
|
+
async getPublicPSPConfig(productSlug: string, idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPublicPspSettingsResponseClass>> {
|
|
230
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicPSPConfig(productSlug, idempotencyKey, authorization, options);
|
|
226
231
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
227
232
|
},
|
|
228
233
|
/**
|
|
@@ -263,13 +268,14 @@ export const PaymentsSetupApiFactory = function (configuration?: Configuration,
|
|
|
263
268
|
/**
|
|
264
269
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
265
270
|
* @summary Get public key and psp
|
|
271
|
+
* @param {string} productSlug
|
|
266
272
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
267
273
|
* @param {string} [authorization] Bearer Token
|
|
268
274
|
* @param {*} [options] Override http request option.
|
|
269
275
|
* @throws {RequiredError}
|
|
270
276
|
*/
|
|
271
|
-
getPublicPSPConfig(idempotencyKey?: string, authorization?: string, options?: any): AxiosPromise<GetPublicPspSettingsResponseClass> {
|
|
272
|
-
return localVarFp.getPublicPSPConfig(idempotencyKey, authorization, options).then((request) => request(axios, basePath));
|
|
277
|
+
getPublicPSPConfig(productSlug: string, idempotencyKey?: string, authorization?: string, options?: any): AxiosPromise<GetPublicPspSettingsResponseClass> {
|
|
278
|
+
return localVarFp.getPublicPSPConfig(productSlug, idempotencyKey, authorization, options).then((request) => request(axios, basePath));
|
|
273
279
|
},
|
|
274
280
|
/**
|
|
275
281
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
@@ -320,6 +326,13 @@ export interface PaymentsSetupApiCompletePaymentSetupRequest {
|
|
|
320
326
|
* @interface PaymentsSetupApiGetPublicPSPConfigRequest
|
|
321
327
|
*/
|
|
322
328
|
export interface PaymentsSetupApiGetPublicPSPConfigRequest {
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
* @type {string}
|
|
332
|
+
* @memberof PaymentsSetupApiGetPublicPSPConfig
|
|
333
|
+
*/
|
|
334
|
+
readonly productSlug: string
|
|
335
|
+
|
|
323
336
|
/**
|
|
324
337
|
* An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
325
338
|
* @type {string}
|
|
@@ -390,8 +403,8 @@ export class PaymentsSetupApi extends BaseAPI {
|
|
|
390
403
|
* @throws {RequiredError}
|
|
391
404
|
* @memberof PaymentsSetupApi
|
|
392
405
|
*/
|
|
393
|
-
public getPublicPSPConfig(requestParameters: PaymentsSetupApiGetPublicPSPConfigRequest
|
|
394
|
-
return PaymentsSetupApiFp(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
406
|
+
public getPublicPSPConfig(requestParameters: PaymentsSetupApiGetPublicPSPConfigRequest, options?: AxiosRequestConfig) {
|
|
407
|
+
return PaymentsSetupApiFp(this.configuration).getPublicPSPConfig(requestParameters.productSlug, requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
395
408
|
}
|
|
396
409
|
|
|
397
410
|
/**
|
package/base.ts
CHANGED
|
@@ -41,7 +41,7 @@ export const COLLECTION_FORMATS = {
|
|
|
41
41
|
|
|
42
42
|
export interface LoginClass {
|
|
43
43
|
accessToken: string;
|
|
44
|
-
permissions:
|
|
44
|
+
permissions: string;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export enum Environment {
|
|
@@ -79,7 +79,7 @@ export class BaseAPI {
|
|
|
79
79
|
protected configuration: Configuration;
|
|
80
80
|
private username?: string;
|
|
81
81
|
private password?: string;
|
|
82
|
-
private permissions
|
|
82
|
+
private permissions?: string;
|
|
83
83
|
|
|
84
84
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
85
85
|
if (configuration) {
|
|
@@ -151,7 +151,7 @@ export class BaseAPI {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
getPermissions(): Array<string> {
|
|
154
|
-
return this.permissions;
|
|
154
|
+
return this.permissions.split(',');
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
async authorize(username: string, password: string): Promise<void> {
|
package/dist/api/leads-api.d.ts
CHANGED
|
@@ -63,11 +63,12 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
63
63
|
/**
|
|
64
64
|
* This will initiate a lead code.
|
|
65
65
|
* @summary Initiate a lead code
|
|
66
|
+
* @param {string} productSlug
|
|
66
67
|
* @param {string} [authorization] Bearer Token
|
|
67
68
|
* @param {*} [options] Override http request option.
|
|
68
69
|
* @throws {RequiredError}
|
|
69
70
|
*/
|
|
70
|
-
initiateLead: (authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
71
|
+
initiateLead: (productSlug: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
71
72
|
/**
|
|
72
73
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
73
74
|
* @summary Update the lead
|
|
@@ -133,11 +134,12 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
|
|
|
133
134
|
/**
|
|
134
135
|
* This will initiate a lead code.
|
|
135
136
|
* @summary Initiate a lead code
|
|
137
|
+
* @param {string} productSlug
|
|
136
138
|
* @param {string} [authorization] Bearer Token
|
|
137
139
|
* @param {*} [options] Override http request option.
|
|
138
140
|
* @throws {RequiredError}
|
|
139
141
|
*/
|
|
140
|
-
initiateLead(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateLeadResponseClass>>;
|
|
142
|
+
initiateLead(productSlug: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateLeadResponseClass>>;
|
|
141
143
|
/**
|
|
142
144
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
143
145
|
* @summary Update the lead
|
|
@@ -203,11 +205,12 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
203
205
|
/**
|
|
204
206
|
* This will initiate a lead code.
|
|
205
207
|
* @summary Initiate a lead code
|
|
208
|
+
* @param {string} productSlug
|
|
206
209
|
* @param {string} [authorization] Bearer Token
|
|
207
210
|
* @param {*} [options] Override http request option.
|
|
208
211
|
* @throws {RequiredError}
|
|
209
212
|
*/
|
|
210
|
-
initiateLead(authorization?: string, options?: any): AxiosPromise<InitiateLeadResponseClass>;
|
|
213
|
+
initiateLead(productSlug: string, authorization?: string, options?: any): AxiosPromise<InitiateLeadResponseClass>;
|
|
211
214
|
/**
|
|
212
215
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
213
216
|
* @summary Update the lead
|
|
@@ -311,6 +314,12 @@ export interface LeadsApiGetLeadRequest {
|
|
|
311
314
|
* @interface LeadsApiInitiateLeadRequest
|
|
312
315
|
*/
|
|
313
316
|
export interface LeadsApiInitiateLeadRequest {
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @type {string}
|
|
320
|
+
* @memberof LeadsApiInitiateLead
|
|
321
|
+
*/
|
|
322
|
+
readonly productSlug: string;
|
|
314
323
|
/**
|
|
315
324
|
* Bearer Token
|
|
316
325
|
* @type {string}
|
|
@@ -419,7 +428,7 @@ export declare class LeadsApi extends BaseAPI {
|
|
|
419
428
|
* @throws {RequiredError}
|
|
420
429
|
* @memberof LeadsApi
|
|
421
430
|
*/
|
|
422
|
-
initiateLead(requestParameters
|
|
431
|
+
initiateLead(requestParameters: LeadsApiInitiateLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiateLeadResponseClass, any>>;
|
|
423
432
|
/**
|
|
424
433
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
425
434
|
* @summary Update the lead
|
package/dist/api/leads-api.js
CHANGED
|
@@ -294,18 +294,22 @@ var LeadsApiAxiosParamCreator = function (configuration) {
|
|
|
294
294
|
/**
|
|
295
295
|
* This will initiate a lead code.
|
|
296
296
|
* @summary Initiate a lead code
|
|
297
|
+
* @param {string} productSlug
|
|
297
298
|
* @param {string} [authorization] Bearer Token
|
|
298
299
|
* @param {*} [options] Override http request option.
|
|
299
300
|
* @throws {RequiredError}
|
|
300
301
|
*/
|
|
301
|
-
initiateLead: function (authorization, options) {
|
|
302
|
+
initiateLead: function (productSlug, authorization, options) {
|
|
302
303
|
if (options === void 0) { options = {}; }
|
|
303
304
|
return __awaiter(_this, void 0, void 0, function () {
|
|
304
305
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
305
306
|
return __generator(this, function (_a) {
|
|
306
307
|
switch (_a.label) {
|
|
307
308
|
case 0:
|
|
308
|
-
|
|
309
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
310
|
+
(0, common_1.assertParamExists)('initiateLead', 'productSlug', productSlug);
|
|
311
|
+
localVarPath = "/publicapi/v1/leads/initiate/{productSlug}"
|
|
312
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
309
313
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
310
314
|
if (configuration) {
|
|
311
315
|
baseOptions = configuration.baseOptions;
|
|
@@ -538,16 +542,17 @@ var LeadsApiFp = function (configuration) {
|
|
|
538
542
|
/**
|
|
539
543
|
* This will initiate a lead code.
|
|
540
544
|
* @summary Initiate a lead code
|
|
545
|
+
* @param {string} productSlug
|
|
541
546
|
* @param {string} [authorization] Bearer Token
|
|
542
547
|
* @param {*} [options] Override http request option.
|
|
543
548
|
* @throws {RequiredError}
|
|
544
549
|
*/
|
|
545
|
-
initiateLead: function (authorization, options) {
|
|
550
|
+
initiateLead: function (productSlug, authorization, options) {
|
|
546
551
|
return __awaiter(this, void 0, void 0, function () {
|
|
547
552
|
var localVarAxiosArgs;
|
|
548
553
|
return __generator(this, function (_a) {
|
|
549
554
|
switch (_a.label) {
|
|
550
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateLead(authorization, options)];
|
|
555
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateLead(productSlug, authorization, options)];
|
|
551
556
|
case 1:
|
|
552
557
|
localVarAxiosArgs = _a.sent();
|
|
553
558
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -656,12 +661,13 @@ var LeadsApiFactory = function (configuration, basePath, axios) {
|
|
|
656
661
|
/**
|
|
657
662
|
* This will initiate a lead code.
|
|
658
663
|
* @summary Initiate a lead code
|
|
664
|
+
* @param {string} productSlug
|
|
659
665
|
* @param {string} [authorization] Bearer Token
|
|
660
666
|
* @param {*} [options] Override http request option.
|
|
661
667
|
* @throws {RequiredError}
|
|
662
668
|
*/
|
|
663
|
-
initiateLead: function (authorization, options) {
|
|
664
|
-
return localVarFp.initiateLead(authorization, options).then(function (request) { return request(axios, basePath); });
|
|
669
|
+
initiateLead: function (productSlug, authorization, options) {
|
|
670
|
+
return localVarFp.initiateLead(productSlug, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
665
671
|
},
|
|
666
672
|
/**
|
|
667
673
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
@@ -759,8 +765,7 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
759
765
|
*/
|
|
760
766
|
LeadsApi.prototype.initiateLead = function (requestParameters, options) {
|
|
761
767
|
var _this = this;
|
|
762
|
-
|
|
763
|
-
return (0, exports.LeadsApiFp)(this.configuration).initiateLead(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
768
|
+
return (0, exports.LeadsApiFp)(this.configuration).initiateLead(requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
764
769
|
};
|
|
765
770
|
/**
|
|
766
771
|
* Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
@@ -35,12 +35,13 @@ export declare const PaymentsSetupApiAxiosParamCreator: (configuration?: Configu
|
|
|
35
35
|
/**
|
|
36
36
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
37
37
|
* @summary Get public key and psp
|
|
38
|
+
* @param {string} productSlug
|
|
38
39
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
39
40
|
* @param {string} [authorization] Bearer Token
|
|
40
41
|
* @param {*} [options] Override http request option.
|
|
41
42
|
* @throws {RequiredError}
|
|
42
43
|
*/
|
|
43
|
-
getPublicPSPConfig: (idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
44
|
+
getPublicPSPConfig: (productSlug: string, idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
44
45
|
/**
|
|
45
46
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
46
47
|
* @summary Initiate a payment setup
|
|
@@ -70,12 +71,13 @@ export declare const PaymentsSetupApiFp: (configuration?: Configuration) => {
|
|
|
70
71
|
/**
|
|
71
72
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
72
73
|
* @summary Get public key and psp
|
|
74
|
+
* @param {string} productSlug
|
|
73
75
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
74
76
|
* @param {string} [authorization] Bearer Token
|
|
75
77
|
* @param {*} [options] Override http request option.
|
|
76
78
|
* @throws {RequiredError}
|
|
77
79
|
*/
|
|
78
|
-
getPublicPSPConfig(idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPublicPspSettingsResponseClass>>;
|
|
80
|
+
getPublicPSPConfig(productSlug: string, idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPublicPspSettingsResponseClass>>;
|
|
79
81
|
/**
|
|
80
82
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
81
83
|
* @summary Initiate a payment setup
|
|
@@ -105,12 +107,13 @@ export declare const PaymentsSetupApiFactory: (configuration?: Configuration, ba
|
|
|
105
107
|
/**
|
|
106
108
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
107
109
|
* @summary Get public key and psp
|
|
110
|
+
* @param {string} productSlug
|
|
108
111
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
109
112
|
* @param {string} [authorization] Bearer Token
|
|
110
113
|
* @param {*} [options] Override http request option.
|
|
111
114
|
* @throws {RequiredError}
|
|
112
115
|
*/
|
|
113
|
-
getPublicPSPConfig(idempotencyKey?: string, authorization?: string, options?: any): AxiosPromise<GetPublicPspSettingsResponseClass>;
|
|
116
|
+
getPublicPSPConfig(productSlug: string, idempotencyKey?: string, authorization?: string, options?: any): AxiosPromise<GetPublicPspSettingsResponseClass>;
|
|
114
117
|
/**
|
|
115
118
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
116
119
|
* @summary Initiate a payment setup
|
|
@@ -153,6 +156,12 @@ export interface PaymentsSetupApiCompletePaymentSetupRequest {
|
|
|
153
156
|
* @interface PaymentsSetupApiGetPublicPSPConfigRequest
|
|
154
157
|
*/
|
|
155
158
|
export interface PaymentsSetupApiGetPublicPSPConfigRequest {
|
|
159
|
+
/**
|
|
160
|
+
*
|
|
161
|
+
* @type {string}
|
|
162
|
+
* @memberof PaymentsSetupApiGetPublicPSPConfig
|
|
163
|
+
*/
|
|
164
|
+
readonly productSlug: string;
|
|
156
165
|
/**
|
|
157
166
|
* An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
158
167
|
* @type {string}
|
|
@@ -215,7 +224,7 @@ export declare class PaymentsSetupApi extends BaseAPI {
|
|
|
215
224
|
* @throws {RequiredError}
|
|
216
225
|
* @memberof PaymentsSetupApi
|
|
217
226
|
*/
|
|
218
|
-
getPublicPSPConfig(requestParameters
|
|
227
|
+
getPublicPSPConfig(requestParameters: PaymentsSetupApiGetPublicPSPConfigRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPublicPspSettingsResponseClass, any>>;
|
|
219
228
|
/**
|
|
220
229
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
221
230
|
* @summary Initiate a payment setup
|
|
@@ -152,19 +152,23 @@ var PaymentsSetupApiAxiosParamCreator = function (configuration) {
|
|
|
152
152
|
/**
|
|
153
153
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
154
154
|
* @summary Get public key and psp
|
|
155
|
+
* @param {string} productSlug
|
|
155
156
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
156
157
|
* @param {string} [authorization] Bearer Token
|
|
157
158
|
* @param {*} [options] Override http request option.
|
|
158
159
|
* @throws {RequiredError}
|
|
159
160
|
*/
|
|
160
|
-
getPublicPSPConfig: function (idempotencyKey, authorization, options) {
|
|
161
|
+
getPublicPSPConfig: function (productSlug, idempotencyKey, authorization, options) {
|
|
161
162
|
if (options === void 0) { options = {}; }
|
|
162
163
|
return __awaiter(_this, void 0, void 0, function () {
|
|
163
164
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
164
165
|
return __generator(this, function (_a) {
|
|
165
166
|
switch (_a.label) {
|
|
166
167
|
case 0:
|
|
167
|
-
|
|
168
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
169
|
+
(0, common_1.assertParamExists)('getPublicPSPConfig', 'productSlug', productSlug);
|
|
170
|
+
localVarPath = "/publicapi/v1/payment-setup/get-psp-config/{productSlug}"
|
|
171
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
168
172
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
169
173
|
if (configuration) {
|
|
170
174
|
baseOptions = configuration.baseOptions;
|
|
@@ -285,17 +289,18 @@ var PaymentsSetupApiFp = function (configuration) {
|
|
|
285
289
|
/**
|
|
286
290
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
287
291
|
* @summary Get public key and psp
|
|
292
|
+
* @param {string} productSlug
|
|
288
293
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
289
294
|
* @param {string} [authorization] Bearer Token
|
|
290
295
|
* @param {*} [options] Override http request option.
|
|
291
296
|
* @throws {RequiredError}
|
|
292
297
|
*/
|
|
293
|
-
getPublicPSPConfig: function (idempotencyKey, authorization, options) {
|
|
298
|
+
getPublicPSPConfig: function (productSlug, idempotencyKey, authorization, options) {
|
|
294
299
|
return __awaiter(this, void 0, void 0, function () {
|
|
295
300
|
var localVarAxiosArgs;
|
|
296
301
|
return __generator(this, function (_a) {
|
|
297
302
|
switch (_a.label) {
|
|
298
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPublicPSPConfig(idempotencyKey, authorization, options)];
|
|
303
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPublicPSPConfig(productSlug, idempotencyKey, authorization, options)];
|
|
299
304
|
case 1:
|
|
300
305
|
localVarAxiosArgs = _a.sent();
|
|
301
306
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -350,13 +355,14 @@ var PaymentsSetupApiFactory = function (configuration, basePath, axios) {
|
|
|
350
355
|
/**
|
|
351
356
|
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
352
357
|
* @summary Get public key and psp
|
|
358
|
+
* @param {string} productSlug
|
|
353
359
|
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
354
360
|
* @param {string} [authorization] Bearer Token
|
|
355
361
|
* @param {*} [options] Override http request option.
|
|
356
362
|
* @throws {RequiredError}
|
|
357
363
|
*/
|
|
358
|
-
getPublicPSPConfig: function (idempotencyKey, authorization, options) {
|
|
359
|
-
return localVarFp.getPublicPSPConfig(idempotencyKey, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
364
|
+
getPublicPSPConfig: function (productSlug, idempotencyKey, authorization, options) {
|
|
365
|
+
return localVarFp.getPublicPSPConfig(productSlug, idempotencyKey, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
360
366
|
},
|
|
361
367
|
/**
|
|
362
368
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
@@ -406,8 +412,7 @@ var PaymentsSetupApi = /** @class */ (function (_super) {
|
|
|
406
412
|
*/
|
|
407
413
|
PaymentsSetupApi.prototype.getPublicPSPConfig = function (requestParameters, options) {
|
|
408
414
|
var _this = this;
|
|
409
|
-
|
|
410
|
-
return (0, exports.PaymentsSetupApiFp)(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
415
|
+
return (0, exports.PaymentsSetupApiFp)(this.configuration).getPublicPSPConfig(requestParameters.productSlug, requestParameters.idempotencyKey, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
411
416
|
};
|
|
412
417
|
/**
|
|
413
418
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
package/dist/base.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
24
24
|
};
|
|
25
25
|
export interface LoginClass {
|
|
26
26
|
accessToken: string;
|
|
27
|
-
permissions:
|
|
27
|
+
permissions: string;
|
|
28
28
|
}
|
|
29
29
|
export declare enum Environment {
|
|
30
30
|
Production = "https://apiv2.emil.de",
|
|
@@ -53,7 +53,7 @@ export declare class BaseAPI {
|
|
|
53
53
|
protected configuration: Configuration;
|
|
54
54
|
private username?;
|
|
55
55
|
private password?;
|
|
56
|
-
private permissions
|
|
56
|
+
private permissions?;
|
|
57
57
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
58
58
|
initialize(env?: Environment): Promise<void>;
|
|
59
59
|
private loadCredentials;
|
package/dist/base.js
CHANGED
|
@@ -150,7 +150,6 @@ var BaseAPI = /** @class */ (function () {
|
|
|
150
150
|
if (axios === void 0) { axios = axios_1.default; }
|
|
151
151
|
this.basePath = basePath;
|
|
152
152
|
this.axios = axios;
|
|
153
|
-
this.permissions = [];
|
|
154
153
|
if (configuration) {
|
|
155
154
|
this.configuration = configuration;
|
|
156
155
|
this.basePath = configuration.basePath || this.basePath;
|
|
@@ -244,7 +243,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
244
243
|
this.configuration.basePath = env;
|
|
245
244
|
};
|
|
246
245
|
BaseAPI.prototype.getPermissions = function () {
|
|
247
|
-
return this.permissions;
|
|
246
|
+
return this.permissions.split(',');
|
|
248
247
|
};
|
|
249
248
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
250
249
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -29,4 +29,10 @@ export interface CompletePaymentSetupRequestDto {
|
|
|
29
29
|
* @memberof CompletePaymentSetupRequestDto
|
|
30
30
|
*/
|
|
31
31
|
'braintree'?: CompleteBraintreePaymentSetupRequestDto;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof CompletePaymentSetupRequestDto
|
|
36
|
+
*/
|
|
37
|
+
'productSlug'?: string;
|
|
32
38
|
}
|
|
@@ -29,4 +29,10 @@ export interface InitiatePaymentSetupRequestDto {
|
|
|
29
29
|
* @memberof InitiatePaymentSetupRequestDto
|
|
30
30
|
*/
|
|
31
31
|
'braintree'?: InitiateBraintreePaymentSetupRequestDto;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof InitiatePaymentSetupRequestDto
|
|
36
|
+
*/
|
|
37
|
+
'productSlug'?: string;
|
|
32
38
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { CreateAccountRequestDto } from './create-account-request-dto';
|
|
13
13
|
import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
|
|
14
14
|
import { CreatePaymentMethodRequestDto } from './create-payment-method-request-dto';
|
|
15
|
+
import { LinkLeadPartnerRequestDto } from './link-lead-partner-request-dto';
|
|
15
16
|
import { PolicyObjectRequestDto } from './policy-object-request-dto';
|
|
16
17
|
import { UploadedDocumentDto } from './uploaded-document-dto';
|
|
17
18
|
/**
|
|
@@ -92,4 +93,10 @@ export interface UpdateLeadRequestDto {
|
|
|
92
93
|
* @memberof UpdateLeadRequestDto
|
|
93
94
|
*/
|
|
94
95
|
'validate'?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {LinkLeadPartnerRequestDto}
|
|
99
|
+
* @memberof UpdateLeadRequestDto
|
|
100
|
+
*/
|
|
101
|
+
'partner'?: LinkLeadPartnerRequestDto;
|
|
95
102
|
}
|
|
@@ -34,5 +34,11 @@ export interface CompletePaymentSetupRequestDto {
|
|
|
34
34
|
* @memberof CompletePaymentSetupRequestDto
|
|
35
35
|
*/
|
|
36
36
|
'braintree'?: CompleteBraintreePaymentSetupRequestDto;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CompletePaymentSetupRequestDto
|
|
41
|
+
*/
|
|
42
|
+
'productSlug'?: string;
|
|
37
43
|
}
|
|
38
44
|
|
|
@@ -34,5 +34,11 @@ export interface InitiatePaymentSetupRequestDto {
|
|
|
34
34
|
* @memberof InitiatePaymentSetupRequestDto
|
|
35
35
|
*/
|
|
36
36
|
'braintree'?: InitiateBraintreePaymentSetupRequestDto;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof InitiatePaymentSetupRequestDto
|
|
41
|
+
*/
|
|
42
|
+
'productSlug'?: string;
|
|
37
43
|
}
|
|
38
44
|
|
package/models/partner-class.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { CreateAccountRequestDto } from './create-account-request-dto';
|
|
17
17
|
import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
|
|
18
18
|
import { CreatePaymentMethodRequestDto } from './create-payment-method-request-dto';
|
|
19
|
+
import { LinkLeadPartnerRequestDto } from './link-lead-partner-request-dto';
|
|
19
20
|
import { PolicyObjectRequestDto } from './policy-object-request-dto';
|
|
20
21
|
import { UploadedDocumentDto } from './uploaded-document-dto';
|
|
21
22
|
|
|
@@ -97,5 +98,11 @@ export interface UpdateLeadRequestDto {
|
|
|
97
98
|
* @memberof UpdateLeadRequestDto
|
|
98
99
|
*/
|
|
99
100
|
'validate'?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {LinkLeadPartnerRequestDto}
|
|
104
|
+
* @memberof UpdateLeadRequestDto
|
|
105
|
+
*/
|
|
106
|
+
'partner'?: LinkLeadPartnerRequestDto;
|
|
100
107
|
}
|
|
101
108
|
|