@gofynd/fdk-client-javascript 1.0.4 → 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.
Files changed (121) hide show
  1. package/README.md +19 -0
  2. package/index.d.ts +4 -1
  3. package/index.js +19 -3
  4. package/package.json +13 -4
  5. package/partner.d.ts +4 -0
  6. package/partner.js +7 -0
  7. package/sdk/application/ApplicationAPIClient.js +2 -4
  8. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -1
  9. package/sdk/application/Catalog/CatalogApplicationClient.js +11 -2
  10. package/sdk/application/Catalog/CatalogApplicationModel.js +4 -2
  11. package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
  12. package/sdk/application/Content/ContentApplicationModel.js +0 -5
  13. package/sdk/application/Lead/LeadApplicationModel.js +1 -0
  14. package/sdk/application/Order/OrderApplicationClient.d.ts +0 -15
  15. package/sdk/application/Order/OrderApplicationClient.js +0 -68
  16. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -17
  17. package/sdk/application/Order/OrderApplicationModel.js +0 -111
  18. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -1
  19. package/sdk/application/Order/OrderApplicationValidator.js +0 -7
  20. package/sdk/common/AxiosHelper.js +1 -1
  21. package/sdk/common/BaseOAuthClient.d.ts +17 -0
  22. package/sdk/common/BaseOAuthClient.js +67 -0
  23. package/sdk/common/Constant.d.ts +0 -18
  24. package/sdk/common/Constant.js +0 -22
  25. package/sdk/common/RequestSigner.js +0 -5
  26. package/sdk/partner/OAuthClient.d.ts +14 -0
  27. package/sdk/partner/OAuthClient.js +112 -0
  28. package/sdk/{APIClient.d.ts → partner/PartnerAPIClient.d.ts} +2 -1
  29. package/sdk/{APIClient.js → partner/PartnerAPIClient.js} +13 -6
  30. package/sdk/{Client.d.ts → partner/PartnerClient.d.ts} +2 -2
  31. package/sdk/{Client.js → partner/PartnerClient.js} +2 -2
  32. package/sdk/partner/PartnerConfig.d.ts +30 -0
  33. package/sdk/partner/PartnerConfig.js +39 -0
  34. package/sdk/partner/index.d.ts +3 -0
  35. package/sdk/partner/index.js +5 -0
  36. package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -0
  37. package/sdk/platform/Billing/BillingPlatformClient.js +134 -0
  38. package/sdk/platform/Billing/BillingPlatformModel.d.ts +4 -0
  39. package/sdk/platform/Billing/BillingPlatformModel.js +44 -0
  40. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +2 -0
  41. package/sdk/platform/Billing/BillingPlatformValidator.js +14 -0
  42. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +29 -0
  43. package/sdk/platform/Cart/CartPlatformApplicationClient.js +181 -0
  44. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  45. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -0
  46. package/sdk/platform/Cart/CartPlatformModel.d.ts +4 -0
  47. package/sdk/platform/Cart/CartPlatformModel.js +37 -0
  48. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -1
  49. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +5 -0
  50. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  51. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
  52. package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
  53. package/sdk/platform/Catalog/CatalogPlatformModel.js +1 -5
  54. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +0 -183
  55. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +0 -417
  56. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +0 -10
  57. package/sdk/platform/Communication/CommunicationPlatformClient.js +0 -26
  58. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +4 -0
  59. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -22
  60. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +0 -56
  61. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +22 -1
  62. package/sdk/platform/Content/ContentPlatformApplicationClient.js +123 -2
  63. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +2 -0
  64. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +12 -0
  65. package/sdk/platform/Content/ContentPlatformModel.js +0 -5
  66. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  67. package/sdk/platform/Discount/DiscountPlatformClient.js +1 -1
  68. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +1 -0
  69. package/sdk/platform/Discount/DiscountPlatformModel.js +15 -0
  70. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -1
  71. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +1 -1
  72. package/sdk/platform/Lead/LeadPlatformModel.js +1 -0
  73. package/sdk/platform/OAuthClient.js +3 -9
  74. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -47
  75. package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -201
  76. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -3
  77. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -26
  78. package/sdk/platform/Order/OrderPlatformClient.d.ts +51 -183
  79. package/sdk/platform/Order/OrderPlatformClient.js +243 -931
  80. package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -20
  81. package/sdk/platform/Order/OrderPlatformModel.js +38 -182
  82. package/sdk/platform/Order/OrderPlatformValidator.d.ts +3 -12
  83. package/sdk/platform/Order/OrderPlatformValidator.js +19 -95
  84. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +24 -10
  85. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +111 -44
  86. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +2 -1
  87. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +13 -5
  88. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -0
  89. package/sdk/platform/Payment/PaymentPlatformModel.js +12 -0
  90. package/sdk/platform/PlatformApplicationClient.d.ts +16 -41
  91. package/sdk/platform/PlatformApplicationClient.js +17 -45
  92. package/sdk/platform/PlatformClient.d.ts +124 -263
  93. package/sdk/platform/PlatformClient.js +148 -315
  94. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -16
  95. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +63 -77
  96. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +1 -1
  97. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +7 -8
  98. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +11 -0
  99. package/sdk/platform/Share/SharePlatformApplicationClient.js +61 -0
  100. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -0
  101. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -0
  102. package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
  103. package/sdk/platform/Share/SharePlatformModel.js +11 -0
  104. package/sdk/platform/index.d.ts +0 -1
  105. package/sdk/platform/index.js +0 -2
  106. package/sdk/Config.d.ts +0 -9
  107. package/sdk/Config.js +0 -17
  108. package/sdk/constructUrl.d.ts +0 -5
  109. package/sdk/constructUrl.js +0 -13
  110. package/sdk/index.d.ts +0 -3
  111. package/sdk/index.js +0 -5
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -109
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -558
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -11
  115. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -56
  116. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +0 -88
  117. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +0 -361
  118. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -23
  119. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -169
  120. package/sdk/platform/Analytics/AnalyticsPlatformValidator.d.ts +0 -7
  121. 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 {PaymentGatewayConfigRequest} arg.body
536
- * @returns {Promise<PaymentGatewayToBeReviewed>} - Success response
537
- * @summary: Save Config Secret For Brand Payment Gateway
538
- * @description: Save Config Secret For Brand Payment Gateway
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 saveBrandPaymentGatewayConfig({ body } = {}) {
541
- const { error } = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
542
+ async oauthGetUrl({
543
+ aggregator,
544
+ successRedirectUrl,
545
+ failureRedirectUrl,
546
+ } = {}) {
547
+ const { error } = PaymentValidator.oauthGetUrl().validate(
542
548
  {
543
- body,
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
- body,
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
- "post",
574
- `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
582
+ "get",
583
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/onboard/${aggregator}/`,
575
584
  query_params,
576
- body
585
+ undefined
577
586
  );
578
587
 
579
588
  const {
580
589
  error: res_error,
581
- } = PaymentModel.PaymentGatewayToBeReviewed().validate(response, {
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 {SetCODForUserRequest} arg.body
601
- * @returns {Promise<SetCODOptionResponse>} - Success response
602
- * @summary: Set COD option for user for payment
603
- * @description: Use this API to set cod option as true or false for the payment
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 setUserCODlimitRoutes({ body } = {}) {
606
- const { error } = PaymentValidator.setUserCODlimitRoutes().validate(
613
+ async revokeOauthToken({ aggregator } = {}) {
614
+ const { error } = PaymentValidator.revokeOauthToken().validate(
607
615
  {
608
- body,
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
- body,
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 setUserCODlimitRoutes",
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
- "put",
638
- `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
643
+ "post",
644
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/revoke/${aggregator}/`,
639
645
  query_params,
640
- body
646
+ undefined
641
647
  );
642
648
 
643
649
  const {
644
650
  error: res_error,
645
- } = PaymentModel.SetCODOptionResponse().validate(response, {
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 setUserCODlimitRoutes",
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 updateBrandPaymentGatewayConfig({ body } = {}) {
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.updateBrandPaymentGatewayConfig().validate(
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 updateBrandPaymentGatewayConfig",
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
- "put",
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 updateBrandPaymentGatewayConfig",
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 saveBrandPaymentGatewayConfig() {
54
+ static oauthGetUrl() {
55
55
  return Joi.object({
56
- body: PaymentModel.PaymentGatewayConfigRequest().required(),
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 setUserCODlimitRoutes() {
62
+ static revokeOauthToken() {
61
63
  return Joi.object({
62
- body: PaymentModel.SetCODForUserRequest().required(),
64
+ aggregator: Joi.string().allow("").required(),
63
65
  }).required();
64
66
  }
65
67
 
66
- static updateBrandPaymentGatewayConfig() {
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),