@gofynd/fdk-client-javascript 1.1.0 → 1.1.1
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 +0 -1
- package/package.json +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +11 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
- package/sdk/application/Content/ContentApplicationModel.js +0 -4
- package/sdk/application/Lead/LeadApplicationModel.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +0 -15
- package/sdk/application/Order/OrderApplicationClient.js +0 -68
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -17
- package/sdk/application/Order/OrderApplicationModel.js +0 -111
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -1
- package/sdk/application/Order/OrderApplicationValidator.js +0 -7
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/common/Constant.d.ts +0 -18
- package/sdk/common/Constant.js +0 -22
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +181 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformModel.js +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +5 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +0 -183
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +0 -417
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +0 -10
- package/sdk/platform/Communication/CommunicationPlatformClient.js +0 -26
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +4 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -22
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +0 -56
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +12 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +62 -2
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Content/ContentPlatformModel.js +0 -4
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +1 -1
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +1 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +15 -0
- package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +1 -1
- package/sdk/platform/Lead/LeadPlatformModel.js +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -47
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -201
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -3
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -26
- package/sdk/platform/Order/OrderPlatformClient.d.ts +51 -183
- package/sdk/platform/Order/OrderPlatformClient.js +243 -931
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -20
- package/sdk/platform/Order/OrderPlatformModel.js +38 -182
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +3 -12
- package/sdk/platform/Order/OrderPlatformValidator.js +19 -95
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +24 -10
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +111 -44
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +2 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +13 -5
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +12 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +12 -41
- package/sdk/platform/PlatformApplicationClient.js +13 -45
- package/sdk/platform/PlatformClient.d.ts +90 -264
- package/sdk/platform/PlatformClient.js +110 -316
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +11 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +61 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
- package/sdk/platform/Share/SharePlatformModel.js +11 -0
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -109
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -558
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -56
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +0 -88
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +0 -361
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -23
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -169
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.d.ts +0 -7
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +0 -38
|
@@ -86,6 +86,30 @@ declare class Payment {
|
|
|
86
86
|
getUserOrderBeneficiaries({ orderId }?: {
|
|
87
87
|
orderId: string;
|
|
88
88
|
}): Promise<OrderBeneficiaryResponse>;
|
|
89
|
+
/**
|
|
90
|
+
* @param {Object} arg - Arg object.
|
|
91
|
+
* @param {string} arg.aggregator - Aggregator
|
|
92
|
+
* @param {string} [arg.successRedirectUrl] -
|
|
93
|
+
* @param {string} [arg.failureRedirectUrl] -
|
|
94
|
+
* @returns {Promise<GetOauthUrlResponse>} - Success response
|
|
95
|
+
* @summary: API to Get the url to call for oauth
|
|
96
|
+
* @description: Use this API to Get the url to call for oauth.
|
|
97
|
+
*/
|
|
98
|
+
oauthGetUrl({ aggregator, successRedirectUrl, failureRedirectUrl, }?: {
|
|
99
|
+
aggregator: string;
|
|
100
|
+
successRedirectUrl?: string;
|
|
101
|
+
failureRedirectUrl?: string;
|
|
102
|
+
}): Promise<GetOauthUrlResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* @param {Object} arg - Arg object.
|
|
105
|
+
* @param {string} arg.aggregator - Aggregator_slug
|
|
106
|
+
* @returns {Promise<RevokeOAuthToken>} - Success response
|
|
107
|
+
* @summary: API to Revoke oauth for razorpay partnership
|
|
108
|
+
* @description: Use this API to Revoke oauth for razorpay partnership
|
|
109
|
+
*/
|
|
110
|
+
revokeOauthToken({ aggregator }?: {
|
|
111
|
+
aggregator: string;
|
|
112
|
+
}): Promise<RevokeOAuthToken>;
|
|
89
113
|
/**
|
|
90
114
|
* @param {Object} arg - Arg object.
|
|
91
115
|
* @param {PaymentGatewayConfigRequest} arg.body
|
|
@@ -106,14 +130,4 @@ declare class Payment {
|
|
|
106
130
|
setUserCODlimitRoutes({ body }?: {
|
|
107
131
|
body: SetCODForUserRequest;
|
|
108
132
|
}): Promise<SetCODOptionResponse>;
|
|
109
|
-
/**
|
|
110
|
-
* @param {Object} arg - Arg object.
|
|
111
|
-
* @param {PaymentGatewayConfigRequest} arg.body
|
|
112
|
-
* @returns {Promise<PaymentGatewayToBeReviewed>} - Success response
|
|
113
|
-
* @summary: Save Config Secret For Brand Payment Gateway
|
|
114
|
-
* @description: Save Config Secret For Brand Payment Gateway
|
|
115
|
-
*/
|
|
116
|
-
updateBrandPaymentGatewayConfig({ body }?: {
|
|
117
|
-
body: PaymentGatewayConfigRequest;
|
|
118
|
-
}): Promise<PaymentGatewayToBeReviewed>;
|
|
119
133
|
}
|
|
@@ -532,15 +532,23 @@ class Payment {
|
|
|
532
532
|
|
|
533
533
|
/**
|
|
534
534
|
* @param {Object} arg - Arg object.
|
|
535
|
-
* @param {
|
|
536
|
-
* @
|
|
537
|
-
* @
|
|
538
|
-
* @
|
|
535
|
+
* @param {string} arg.aggregator - Aggregator
|
|
536
|
+
* @param {string} [arg.successRedirectUrl] -
|
|
537
|
+
* @param {string} [arg.failureRedirectUrl] -
|
|
538
|
+
* @returns {Promise<GetOauthUrlResponse>} - Success response
|
|
539
|
+
* @summary: API to Get the url to call for oauth
|
|
540
|
+
* @description: Use this API to Get the url to call for oauth.
|
|
539
541
|
*/
|
|
540
|
-
async
|
|
541
|
-
|
|
542
|
+
async oauthGetUrl({
|
|
543
|
+
aggregator,
|
|
544
|
+
successRedirectUrl,
|
|
545
|
+
failureRedirectUrl,
|
|
546
|
+
} = {}) {
|
|
547
|
+
const { error } = PaymentValidator.oauthGetUrl().validate(
|
|
542
548
|
{
|
|
543
|
-
|
|
549
|
+
aggregator,
|
|
550
|
+
successRedirectUrl,
|
|
551
|
+
failureRedirectUrl,
|
|
544
552
|
},
|
|
545
553
|
{ abortEarly: false, allowUnknown: true }
|
|
546
554
|
);
|
|
@@ -549,36 +557,37 @@ class Payment {
|
|
|
549
557
|
}
|
|
550
558
|
|
|
551
559
|
// Showing warrnings if extra unknown parameters are found
|
|
552
|
-
const {
|
|
553
|
-
error: warrning,
|
|
554
|
-
} = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
|
|
560
|
+
const { error: warrning } = PaymentValidator.oauthGetUrl().validate(
|
|
555
561
|
{
|
|
556
|
-
|
|
562
|
+
aggregator,
|
|
563
|
+
successRedirectUrl,
|
|
564
|
+
failureRedirectUrl,
|
|
557
565
|
},
|
|
558
566
|
{ abortEarly: false, allowUnknown: false }
|
|
559
567
|
);
|
|
560
568
|
if (warrning) {
|
|
561
569
|
Logger({
|
|
562
570
|
level: "WARN",
|
|
563
|
-
message:
|
|
564
|
-
"Parameter Validation warrnings for saveBrandPaymentGatewayConfig",
|
|
571
|
+
message: "Parameter Validation warrnings for oauthGetUrl",
|
|
565
572
|
});
|
|
566
573
|
Logger({ level: "WARN", message: warrning });
|
|
567
574
|
}
|
|
568
575
|
|
|
569
576
|
const query_params = {};
|
|
577
|
+
query_params["success_redirect_url"] = successRedirectUrl;
|
|
578
|
+
query_params["failure_redirect_url"] = failureRedirectUrl;
|
|
570
579
|
|
|
571
580
|
const response = await PlatformAPIClient.execute(
|
|
572
581
|
this.config,
|
|
573
|
-
"
|
|
574
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator
|
|
582
|
+
"get",
|
|
583
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/onboard/${aggregator}/`,
|
|
575
584
|
query_params,
|
|
576
|
-
|
|
585
|
+
undefined
|
|
577
586
|
);
|
|
578
587
|
|
|
579
588
|
const {
|
|
580
589
|
error: res_error,
|
|
581
|
-
} = PaymentModel.
|
|
590
|
+
} = PaymentModel.GetOauthUrlResponse().validate(response, {
|
|
582
591
|
abortEarly: false,
|
|
583
592
|
allowUnknown: false,
|
|
584
593
|
});
|
|
@@ -586,8 +595,7 @@ class Payment {
|
|
|
586
595
|
if (res_error) {
|
|
587
596
|
Logger({
|
|
588
597
|
level: "WARN",
|
|
589
|
-
message:
|
|
590
|
-
"Response Validation Warnnings for saveBrandPaymentGatewayConfig",
|
|
598
|
+
message: "Response Validation Warnnings for oauthGetUrl",
|
|
591
599
|
});
|
|
592
600
|
Logger({ level: "WARN", message: res_error });
|
|
593
601
|
}
|
|
@@ -597,15 +605,15 @@ class Payment {
|
|
|
597
605
|
|
|
598
606
|
/**
|
|
599
607
|
* @param {Object} arg - Arg object.
|
|
600
|
-
* @param {
|
|
601
|
-
* @returns {Promise<
|
|
602
|
-
* @summary:
|
|
603
|
-
* @description: Use this API to
|
|
608
|
+
* @param {string} arg.aggregator - Aggregator_slug
|
|
609
|
+
* @returns {Promise<RevokeOAuthToken>} - Success response
|
|
610
|
+
* @summary: API to Revoke oauth for razorpay partnership
|
|
611
|
+
* @description: Use this API to Revoke oauth for razorpay partnership
|
|
604
612
|
*/
|
|
605
|
-
async
|
|
606
|
-
const { error } = PaymentValidator.
|
|
613
|
+
async revokeOauthToken({ aggregator } = {}) {
|
|
614
|
+
const { error } = PaymentValidator.revokeOauthToken().validate(
|
|
607
615
|
{
|
|
608
|
-
|
|
616
|
+
aggregator,
|
|
609
617
|
},
|
|
610
618
|
{ abortEarly: false, allowUnknown: true }
|
|
611
619
|
);
|
|
@@ -614,18 +622,16 @@ class Payment {
|
|
|
614
622
|
}
|
|
615
623
|
|
|
616
624
|
// Showing warrnings if extra unknown parameters are found
|
|
617
|
-
const {
|
|
618
|
-
error: warrning,
|
|
619
|
-
} = PaymentValidator.setUserCODlimitRoutes().validate(
|
|
625
|
+
const { error: warrning } = PaymentValidator.revokeOauthToken().validate(
|
|
620
626
|
{
|
|
621
|
-
|
|
627
|
+
aggregator,
|
|
622
628
|
},
|
|
623
629
|
{ abortEarly: false, allowUnknown: false }
|
|
624
630
|
);
|
|
625
631
|
if (warrning) {
|
|
626
632
|
Logger({
|
|
627
633
|
level: "WARN",
|
|
628
|
-
message: "Parameter Validation warrnings for
|
|
634
|
+
message: "Parameter Validation warrnings for revokeOauthToken",
|
|
629
635
|
});
|
|
630
636
|
Logger({ level: "WARN", message: warrning });
|
|
631
637
|
}
|
|
@@ -634,15 +640,15 @@ class Payment {
|
|
|
634
640
|
|
|
635
641
|
const response = await PlatformAPIClient.execute(
|
|
636
642
|
this.config,
|
|
637
|
-
"
|
|
638
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
643
|
+
"post",
|
|
644
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/revoke/${aggregator}/`,
|
|
639
645
|
query_params,
|
|
640
|
-
|
|
646
|
+
undefined
|
|
641
647
|
);
|
|
642
648
|
|
|
643
649
|
const {
|
|
644
650
|
error: res_error,
|
|
645
|
-
} = PaymentModel.
|
|
651
|
+
} = PaymentModel.RevokeOAuthToken().validate(response, {
|
|
646
652
|
abortEarly: false,
|
|
647
653
|
allowUnknown: false,
|
|
648
654
|
});
|
|
@@ -650,7 +656,7 @@ class Payment {
|
|
|
650
656
|
if (res_error) {
|
|
651
657
|
Logger({
|
|
652
658
|
level: "WARN",
|
|
653
|
-
message: "Response Validation Warnnings for
|
|
659
|
+
message: "Response Validation Warnnings for revokeOauthToken",
|
|
654
660
|
});
|
|
655
661
|
Logger({ level: "WARN", message: res_error });
|
|
656
662
|
}
|
|
@@ -665,10 +671,8 @@ class Payment {
|
|
|
665
671
|
* @summary: Save Config Secret For Brand Payment Gateway
|
|
666
672
|
* @description: Save Config Secret For Brand Payment Gateway
|
|
667
673
|
*/
|
|
668
|
-
async
|
|
669
|
-
const {
|
|
670
|
-
error,
|
|
671
|
-
} = PaymentValidator.updateBrandPaymentGatewayConfig().validate(
|
|
674
|
+
async saveBrandPaymentGatewayConfig({ body } = {}) {
|
|
675
|
+
const { error } = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
|
|
672
676
|
{
|
|
673
677
|
body,
|
|
674
678
|
},
|
|
@@ -681,7 +685,7 @@ class Payment {
|
|
|
681
685
|
// Showing warrnings if extra unknown parameters are found
|
|
682
686
|
const {
|
|
683
687
|
error: warrning,
|
|
684
|
-
} = PaymentValidator.
|
|
688
|
+
} = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
|
|
685
689
|
{
|
|
686
690
|
body,
|
|
687
691
|
},
|
|
@@ -691,7 +695,7 @@ class Payment {
|
|
|
691
695
|
Logger({
|
|
692
696
|
level: "WARN",
|
|
693
697
|
message:
|
|
694
|
-
"Parameter Validation warrnings for
|
|
698
|
+
"Parameter Validation warrnings for saveBrandPaymentGatewayConfig",
|
|
695
699
|
});
|
|
696
700
|
Logger({ level: "WARN", message: warrning });
|
|
697
701
|
}
|
|
@@ -700,7 +704,7 @@ class Payment {
|
|
|
700
704
|
|
|
701
705
|
const response = await PlatformAPIClient.execute(
|
|
702
706
|
this.config,
|
|
703
|
-
"
|
|
707
|
+
"post",
|
|
704
708
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
|
|
705
709
|
query_params,
|
|
706
710
|
body
|
|
@@ -717,7 +721,70 @@ class Payment {
|
|
|
717
721
|
Logger({
|
|
718
722
|
level: "WARN",
|
|
719
723
|
message:
|
|
720
|
-
"Response Validation Warnnings for
|
|
724
|
+
"Response Validation Warnnings for saveBrandPaymentGatewayConfig",
|
|
725
|
+
});
|
|
726
|
+
Logger({ level: "WARN", message: res_error });
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
return response;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* @param {Object} arg - Arg object.
|
|
734
|
+
* @param {SetCODForUserRequest} arg.body
|
|
735
|
+
* @returns {Promise<SetCODOptionResponse>} - Success response
|
|
736
|
+
* @summary: Set COD option for user for payment
|
|
737
|
+
* @description: Use this API to set cod option as true or false for the payment
|
|
738
|
+
*/
|
|
739
|
+
async setUserCODlimitRoutes({ body } = {}) {
|
|
740
|
+
const { error } = PaymentValidator.setUserCODlimitRoutes().validate(
|
|
741
|
+
{
|
|
742
|
+
body,
|
|
743
|
+
},
|
|
744
|
+
{ abortEarly: false, allowUnknown: true }
|
|
745
|
+
);
|
|
746
|
+
if (error) {
|
|
747
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// Showing warrnings if extra unknown parameters are found
|
|
751
|
+
const {
|
|
752
|
+
error: warrning,
|
|
753
|
+
} = PaymentValidator.setUserCODlimitRoutes().validate(
|
|
754
|
+
{
|
|
755
|
+
body,
|
|
756
|
+
},
|
|
757
|
+
{ abortEarly: false, allowUnknown: false }
|
|
758
|
+
);
|
|
759
|
+
if (warrning) {
|
|
760
|
+
Logger({
|
|
761
|
+
level: "WARN",
|
|
762
|
+
message: "Parameter Validation warrnings for setUserCODlimitRoutes",
|
|
763
|
+
});
|
|
764
|
+
Logger({ level: "WARN", message: warrning });
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
const query_params = {};
|
|
768
|
+
|
|
769
|
+
const response = await PlatformAPIClient.execute(
|
|
770
|
+
this.config,
|
|
771
|
+
"put",
|
|
772
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
|
|
773
|
+
query_params,
|
|
774
|
+
body
|
|
775
|
+
);
|
|
776
|
+
|
|
777
|
+
const {
|
|
778
|
+
error: res_error,
|
|
779
|
+
} = PaymentModel.SetCODOptionResponse().validate(response, {
|
|
780
|
+
abortEarly: false,
|
|
781
|
+
allowUnknown: false,
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
if (res_error) {
|
|
785
|
+
Logger({
|
|
786
|
+
level: "WARN",
|
|
787
|
+
message: "Response Validation Warnnings for setUserCODlimitRoutes",
|
|
721
788
|
});
|
|
722
789
|
Logger({ level: "WARN", message: res_error });
|
|
723
790
|
}
|
|
@@ -8,7 +8,8 @@ declare class PaymentValidator {
|
|
|
8
8
|
static getUserBeneficiaries(): any;
|
|
9
9
|
static getUserCODlimitRoutes(): any;
|
|
10
10
|
static getUserOrderBeneficiaries(): any;
|
|
11
|
+
static oauthGetUrl(): any;
|
|
12
|
+
static revokeOauthToken(): any;
|
|
11
13
|
static saveBrandPaymentGatewayConfig(): any;
|
|
12
14
|
static setUserCODlimitRoutes(): any;
|
|
13
|
-
static updateBrandPaymentGatewayConfig(): any;
|
|
14
15
|
}
|
|
@@ -51,23 +51,31 @@ class PaymentValidator {
|
|
|
51
51
|
}).required();
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
static
|
|
54
|
+
static oauthGetUrl() {
|
|
55
55
|
return Joi.object({
|
|
56
|
-
|
|
56
|
+
aggregator: Joi.string().allow("").required(),
|
|
57
|
+
successRedirectUrl: Joi.string().allow(""),
|
|
58
|
+
failureRedirectUrl: Joi.string().allow(""),
|
|
57
59
|
}).required();
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
static
|
|
62
|
+
static revokeOauthToken() {
|
|
61
63
|
return Joi.object({
|
|
62
|
-
|
|
64
|
+
aggregator: Joi.string().allow("").required(),
|
|
63
65
|
}).required();
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
static
|
|
68
|
+
static saveBrandPaymentGatewayConfig() {
|
|
67
69
|
return Joi.object({
|
|
68
70
|
body: PaymentModel.PaymentGatewayConfigRequest().required(),
|
|
69
71
|
}).required();
|
|
70
72
|
}
|
|
73
|
+
|
|
74
|
+
static setUserCODlimitRoutes() {
|
|
75
|
+
return Joi.object({
|
|
76
|
+
body: PaymentModel.SetCODForUserRequest().required(),
|
|
77
|
+
}).required();
|
|
78
|
+
}
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
module.exports = PaymentValidator;
|
|
@@ -7,6 +7,7 @@ declare class PaymentModel {
|
|
|
7
7
|
static DeleteSubscriptionPaymentMethodResponse(): any;
|
|
8
8
|
static ErrorCodeAndDescription(): any;
|
|
9
9
|
static ErrorCodeDescription(): any;
|
|
10
|
+
static GetOauthUrlResponse(): any;
|
|
10
11
|
static GetUserCODLimitResponse(): any;
|
|
11
12
|
static HttpErrorCodeAndResponse(): any;
|
|
12
13
|
static IfscCodeResponse(): any;
|
|
@@ -32,6 +33,7 @@ declare class PaymentModel {
|
|
|
32
33
|
static PayoutResponse(): any;
|
|
33
34
|
static PayoutsResponse(): any;
|
|
34
35
|
static RefundAccountResponse(): any;
|
|
36
|
+
static RevokeOAuthToken(): any;
|
|
35
37
|
static RootPaymentMode(): any;
|
|
36
38
|
static SaveSubscriptionSetupIntentRequest(): any;
|
|
37
39
|
static SaveSubscriptionSetupIntentResponse(): any;
|
|
@@ -48,6 +48,12 @@ class PaymentModel {
|
|
|
48
48
|
success: Joi.boolean().required(),
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
+
static GetOauthUrlResponse() {
|
|
52
|
+
return Joi.object({
|
|
53
|
+
success: Joi.boolean().required(),
|
|
54
|
+
url: Joi.string().allow("").required(),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
51
57
|
static GetUserCODLimitResponse() {
|
|
52
58
|
return Joi.object({
|
|
53
59
|
success: Joi.boolean().required(),
|
|
@@ -296,6 +302,12 @@ class PaymentModel {
|
|
|
296
302
|
success: Joi.boolean().required(),
|
|
297
303
|
});
|
|
298
304
|
}
|
|
305
|
+
static RevokeOAuthToken() {
|
|
306
|
+
return Joi.object({
|
|
307
|
+
message: Joi.string().allow("").required(),
|
|
308
|
+
success: Joi.boolean().required(),
|
|
309
|
+
});
|
|
310
|
+
}
|
|
299
311
|
static RootPaymentMode() {
|
|
300
312
|
return Joi.object({
|
|
301
313
|
add_card_enabled: Joi.boolean().allow(null),
|