@gofynd/fdk-client-javascript 0.1.35
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/.github/workflows/on_create_release.yml +23 -0
- package/.github/workflows/on_merge_main.yml +38 -0
- package/.github/workflows/on_pull_request.yml +35 -0
- package/.prettierrc +5 -0
- package/LICENSE +21 -0
- package/README.md +118 -0
- package/application.d.ts +3 -0
- package/application.js +6 -0
- package/common.d.ts +4 -0
- package/common.js +9 -0
- package/documentation/application/CART.md +7290 -0
- package/documentation/application/CATALOG.md +9570 -0
- package/documentation/application/COMMON.md +448 -0
- package/documentation/application/COMMUNICATION.md +463 -0
- package/documentation/application/CONFIGURATION.md +2902 -0
- package/documentation/application/CONTENT.md +3350 -0
- package/documentation/application/FILESTORAGE.md +491 -0
- package/documentation/application/LEAD.md +1891 -0
- package/documentation/application/LOGISTIC.md +439 -0
- package/documentation/application/ORDER.md +3428 -0
- package/documentation/application/PAYMENT.md +5035 -0
- package/documentation/application/POSCART.md +7889 -0
- package/documentation/application/README.md +21 -0
- package/documentation/application/REWARDS.md +714 -0
- package/documentation/application/SHARE.md +729 -0
- package/documentation/application/THEME.md +5796 -0
- package/documentation/application/USER.md +4326 -0
- package/documentation/platform/ANALYTICS.md +1150 -0
- package/documentation/platform/AUDITTRAIL.md +572 -0
- package/documentation/platform/BILLING.md +2396 -0
- package/documentation/platform/CART.md +5539 -0
- package/documentation/platform/CATALOG.md +21624 -0
- package/documentation/platform/COMMON.md +448 -0
- package/documentation/platform/COMMUNICATION.md +5714 -0
- package/documentation/platform/COMPANYPROFILE.md +2141 -0
- package/documentation/platform/CONFIGURATION.md +7335 -0
- package/documentation/platform/CONTENT.md +8989 -0
- package/documentation/platform/DISCOUNT.md +773 -0
- package/documentation/platform/FILESTORAGE.md +994 -0
- package/documentation/platform/INVENTORY.md +1775 -0
- package/documentation/platform/LEAD.md +4736 -0
- package/documentation/platform/ORDER.md +3764 -0
- package/documentation/platform/PARTNER.md +216 -0
- package/documentation/platform/PAYMENT.md +3444 -0
- package/documentation/platform/README.md +27 -0
- package/documentation/platform/REWARDS.md +871 -0
- package/documentation/platform/SHARE.md +602 -0
- package/documentation/platform/THEME.md +35725 -0
- package/documentation/platform/USER.md +2305 -0
- package/documentation/platform/WEBHOOK.md +587 -0
- package/documentation/public/CONFIGURATION.md +448 -0
- package/documentation/public/INVENTORY.md +686 -0
- package/documentation/public/WEBHOOK.md +348 -0
- package/index.d.ts +10 -0
- package/index.js +18 -0
- package/jest.config.d.ts +4 -0
- package/jest.config.js +6 -0
- package/package.json +35 -0
- package/platform.d.ts +3 -0
- package/platform.js +6 -0
- package/public.d.ts +3 -0
- package/public.js +6 -0
- package/sdk/application/ApplicationAPIClient.d.ts +11 -0
- package/sdk/application/ApplicationAPIClient.js +44 -0
- package/sdk/application/ApplicationClient.d.ts +40 -0
- package/sdk/application/ApplicationClient.js +84 -0
- package/sdk/application/ApplicationConfig.d.ts +19 -0
- package/sdk/application/ApplicationConfig.js +55 -0
- package/sdk/application/ApplicationModels.d.ts +826 -0
- package/sdk/application/ApplicationModels.js +10474 -0
- package/sdk/application/client/CartApplicationClient.d.ts +432 -0
- package/sdk/application/client/CartApplicationClient.js +1066 -0
- package/sdk/application/client/CatalogApplicationClient.d.ts +694 -0
- package/sdk/application/client/CatalogApplicationClient.js +1629 -0
- package/sdk/application/client/CommonApplicationClient.d.ts +38 -0
- package/sdk/application/client/CommonApplicationClient.js +105 -0
- package/sdk/application/client/CommunicationApplicationClient.d.ts +39 -0
- package/sdk/application/client/CommunicationApplicationClient.js +131 -0
- package/sdk/application/client/ConfigurationApplicationClient.d.ts +210 -0
- package/sdk/application/client/ConfigurationApplicationClient.js +649 -0
- package/sdk/application/client/ContentApplicationClient.d.ts +256 -0
- package/sdk/application/client/ContentApplicationClient.js +785 -0
- package/sdk/application/client/FileStorageApplicationClient.d.ts +88 -0
- package/sdk/application/client/FileStorageApplicationClient.js +214 -0
- package/sdk/application/client/LeadApplicationClient.d.ts +90 -0
- package/sdk/application/client/LeadApplicationClient.js +264 -0
- package/sdk/application/client/LogisticApplicationClient.d.ts +42 -0
- package/sdk/application/client/LogisticApplicationClient.js +128 -0
- package/sdk/application/client/OrderApplicationClient.d.ts +190 -0
- package/sdk/application/client/OrderApplicationClient.js +479 -0
- package/sdk/application/client/PaymentApplicationClient.d.ts +454 -0
- package/sdk/application/client/PaymentApplicationClient.js +1378 -0
- package/sdk/application/client/PosCartApplicationClient.d.ts +449 -0
- package/sdk/application/client/PosCartApplicationClient.js +1123 -0
- package/sdk/application/client/RewardsApplicationClient.d.ts +93 -0
- package/sdk/application/client/RewardsApplicationClient.js +293 -0
- package/sdk/application/client/ShareApplicationClient.d.ts +87 -0
- package/sdk/application/client/ShareApplicationClient.js +268 -0
- package/sdk/application/client/ThemeApplicationClient.d.ts +52 -0
- package/sdk/application/client/ThemeApplicationClient.js +161 -0
- package/sdk/application/client/UserApplicationClient.d.ts +446 -0
- package/sdk/application/client/UserApplicationClient.js +1275 -0
- package/sdk/application/constructUrl.d.ts +5 -0
- package/sdk/application/constructUrl.js +13 -0
- package/sdk/application/index.d.ts +2 -0
- package/sdk/application/index.js +4 -0
- package/sdk/application/models/CartValidator.d.ts +29 -0
- package/sdk/application/models/CartValidator.js +223 -0
- package/sdk/application/models/CatalogValidator.d.ts +33 -0
- package/sdk/application/models/CatalogValidator.js +233 -0
- package/sdk/application/models/CommonValidator.d.ts +5 -0
- package/sdk/application/models/CommonValidator.js +18 -0
- package/sdk/application/models/CommunicationValidator.d.ts +6 -0
- package/sdk/application/models/CommunicationValidator.js +20 -0
- package/sdk/application/models/ConfigurationValidator.d.ts +19 -0
- package/sdk/application/models/ConfigurationValidator.js +88 -0
- package/sdk/application/models/ContentValidator.d.ts +22 -0
- package/sdk/application/models/ContentValidator.js +106 -0
- package/sdk/application/models/FileStorageValidator.d.ts +6 -0
- package/sdk/application/models/FileStorageValidator.js +24 -0
- package/sdk/application/models/LeadValidator.d.ts +10 -0
- package/sdk/application/models/LeadValidator.js +48 -0
- package/sdk/application/models/LogisticValidator.d.ts +6 -0
- package/sdk/application/models/LogisticValidator.js +22 -0
- package/sdk/application/models/OrderValidator.d.ts +15 -0
- package/sdk/application/models/OrderValidator.js +87 -0
- package/sdk/application/models/PaymentValidator.d.ts +40 -0
- package/sdk/application/models/PaymentValidator.js +235 -0
- package/sdk/application/models/PosCartValidator.d.ts +30 -0
- package/sdk/application/models/PosCartValidator.js +232 -0
- package/sdk/application/models/RewardsValidator.d.ts +10 -0
- package/sdk/application/models/RewardsValidator.js +43 -0
- package/sdk/application/models/ShareValidator.d.ts +10 -0
- package/sdk/application/models/ShareValidator.js +44 -0
- package/sdk/application/models/ThemeValidator.d.ts +7 -0
- package/sdk/application/models/ThemeValidator.js +27 -0
- package/sdk/application/models/UserValidator.d.ts +38 -0
- package/sdk/application/models/UserValidator.js +233 -0
- package/sdk/common/AxiosHelper.d.ts +1 -0
- package/sdk/common/AxiosHelper.js +141 -0
- package/sdk/common/Constant.d.ts +294 -0
- package/sdk/common/Constant.js +332 -0
- package/sdk/common/FDKError.d.ts +26 -0
- package/sdk/common/FDKError.js +51 -0
- package/sdk/common/Logger.d.ts +2 -0
- package/sdk/common/Logger.js +85 -0
- package/sdk/common/Paginator.d.ts +16 -0
- package/sdk/common/Paginator.js +26 -0
- package/sdk/common/RequestSigner.d.ts +1 -0
- package/sdk/common/RequestSigner.js +306 -0
- package/sdk/common/Utility.d.ts +9 -0
- package/sdk/common/Utility.js +86 -0
- package/sdk/common/utils.d.ts +14 -0
- package/sdk/common/utils.js +165 -0
- package/sdk/platform/OAuthClient.d.ts +26 -0
- package/sdk/platform/OAuthClient.js +221 -0
- package/sdk/platform/PlatformAPIClient.d.ts +12 -0
- package/sdk/platform/PlatformAPIClient.js +43 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +24398 -0
- package/sdk/platform/PlatformApplicationClient.js +23185 -0
- package/sdk/platform/PlatformApplicationModels.d.ts +333 -0
- package/sdk/platform/PlatformApplicationModels.js +21262 -0
- package/sdk/platform/PlatformClient.d.ts +9535 -0
- package/sdk/platform/PlatformClient.js +12336 -0
- package/sdk/platform/PlatformConfig.d.ts +29 -0
- package/sdk/platform/PlatformConfig.js +36 -0
- package/sdk/platform/PlatformModels.d.ts +1396 -0
- package/sdk/platform/PlatformModels.js +19222 -0
- package/sdk/platform/client/AnalyticsPlatformClient.d.ts +84 -0
- package/sdk/platform/client/AnalyticsPlatformClient.js +215 -0
- package/sdk/platform/client/AuditTrailPlatformClient.d.ts +38 -0
- package/sdk/platform/client/AuditTrailPlatformClient.js +133 -0
- package/sdk/platform/client/BillingPlatformClient.d.ts +109 -0
- package/sdk/platform/client/BillingPlatformClient.js +381 -0
- package/sdk/platform/client/CatalogPlatformClient.d.ts +806 -0
- package/sdk/platform/client/CatalogPlatformClient.js +2462 -0
- package/sdk/platform/client/CommonPlatformClient.d.ts +30 -0
- package/sdk/platform/client/CommonPlatformClient.js +84 -0
- package/sdk/platform/client/CommunicationPlatformClient.d.ts +26 -0
- package/sdk/platform/client/CommunicationPlatformClient.js +72 -0
- package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +182 -0
- package/sdk/platform/client/CompanyProfilePlatformClient.js +540 -0
- package/sdk/platform/client/ConfigurationPlatformClient.d.ts +277 -0
- package/sdk/platform/client/ConfigurationPlatformClient.js +806 -0
- package/sdk/platform/client/DiscountPlatformClient.d.ts +118 -0
- package/sdk/platform/client/DiscountPlatformClient.js +364 -0
- package/sdk/platform/client/FileStoragePlatformClient.d.ts +111 -0
- package/sdk/platform/client/FileStoragePlatformClient.js +268 -0
- package/sdk/platform/client/InventoryPlatformClient.d.ts +125 -0
- package/sdk/platform/client/InventoryPlatformClient.js +409 -0
- package/sdk/platform/client/LeadPlatformClient.d.ts +150 -0
- package/sdk/platform/client/LeadPlatformClient.js +439 -0
- package/sdk/platform/client/OrderPlatformClient.d.ts +190 -0
- package/sdk/platform/client/OrderPlatformClient.js +521 -0
- package/sdk/platform/client/PaymentPlatformClient.d.ts +98 -0
- package/sdk/platform/client/PaymentPlatformClient.js +331 -0
- package/sdk/platform/client/WebhookPlatformClient.d.ts +64 -0
- package/sdk/platform/client/WebhookPlatformClient.js +207 -0
- package/sdk/platform/index.d.ts +2 -0
- package/sdk/platform/index.js +4 -0
- package/sdk/platform/models/AnalyticsValidator.d.ts +7 -0
- package/sdk/platform/models/AnalyticsValidator.js +36 -0
- package/sdk/platform/models/AuditTrailValidator.d.ts +7 -0
- package/sdk/platform/models/AuditTrailValidator.js +26 -0
- package/sdk/platform/models/BillingValidator.d.ts +15 -0
- package/sdk/platform/models/BillingValidator.js +72 -0
- package/sdk/platform/models/CartValidator.d.ts +0 -0
- package/sdk/platform/models/CartValidator.js +0 -0
- package/sdk/platform/models/CatalogValidator.d.ts +74 -0
- package/sdk/platform/models/CatalogValidator.js +484 -0
- package/sdk/platform/models/CommonValidator.d.ts +5 -0
- package/sdk/platform/models/CommonValidator.js +18 -0
- package/sdk/platform/models/CommunicationValidator.d.ts +4 -0
- package/sdk/platform/models/CommunicationValidator.js +11 -0
- package/sdk/platform/models/CompanyProfileValidator.d.ts +17 -0
- package/sdk/platform/models/CompanyProfileValidator.js +93 -0
- package/sdk/platform/models/ConfigurationValidator.d.ts +21 -0
- package/sdk/platform/models/ConfigurationValidator.js +134 -0
- package/sdk/platform/models/ContentValidator.d.ts +0 -0
- package/sdk/platform/models/ContentValidator.js +0 -0
- package/sdk/platform/models/DiscountValidator.d.ts +13 -0
- package/sdk/platform/models/DiscountValidator.js +75 -0
- package/sdk/platform/models/FileStorageValidator.d.ts +9 -0
- package/sdk/platform/models/FileStorageValidator.js +44 -0
- package/sdk/platform/models/InventoryValidator.d.ts +15 -0
- package/sdk/platform/models/InventoryValidator.js +81 -0
- package/sdk/platform/models/LeadValidator.d.ts +14 -0
- package/sdk/platform/models/LeadValidator.js +78 -0
- package/sdk/platform/models/OrderValidator.d.ts +14 -0
- package/sdk/platform/models/OrderValidator.js +110 -0
- package/sdk/platform/models/PartnerValidator.d.ts +0 -0
- package/sdk/platform/models/PartnerValidator.js +0 -0
- package/sdk/platform/models/PaymentValidator.d.ts +13 -0
- package/sdk/platform/models/PaymentValidator.js +65 -0
- package/sdk/platform/models/RewardsValidator.d.ts +0 -0
- package/sdk/platform/models/RewardsValidator.js +0 -0
- package/sdk/platform/models/ShareValidator.d.ts +0 -0
- package/sdk/platform/models/ShareValidator.js +0 -0
- package/sdk/platform/models/ThemeValidator.d.ts +0 -0
- package/sdk/platform/models/ThemeValidator.js +0 -0
- package/sdk/platform/models/UserValidator.d.ts +0 -0
- package/sdk/platform/models/UserValidator.js +0 -0
- package/sdk/platform/models/WebhookValidator.d.ts +9 -0
- package/sdk/platform/models/WebhookValidator.js +42 -0
- package/sdk/public/PublicAPIClient.d.ts +11 -0
- package/sdk/public/PublicAPIClient.js +38 -0
- package/sdk/public/PublicClient.d.ts +12 -0
- package/sdk/public/PublicClient.js +24 -0
- package/sdk/public/PublicConfig.d.ts +10 -0
- package/sdk/public/PublicConfig.js +12 -0
- package/sdk/public/PublicModels.d.ts +50 -0
- package/sdk/public/PublicModels.js +712 -0
- package/sdk/public/client/ConfigurationPublicClient.d.ts +38 -0
- package/sdk/public/client/ConfigurationPublicClient.js +102 -0
- package/sdk/public/client/InventoryPublicClient.d.ts +81 -0
- package/sdk/public/client/InventoryPublicClient.js +239 -0
- package/sdk/public/client/WebhookPublicClient.d.ts +28 -0
- package/sdk/public/client/WebhookPublicClient.js +92 -0
- package/sdk/public/constructUrl.d.ts +5 -0
- package/sdk/public/constructUrl.js +13 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
- package/sdk/public/models/ConfigurationValidator.d.ts +5 -0
- package/sdk/public/models/ConfigurationValidator.js +18 -0
- package/sdk/public/models/InventoryValidator.d.ts +9 -0
- package/sdk/public/models/InventoryValidator.js +43 -0
- package/sdk/public/models/WebhookValidator.d.ts +5 -0
- package/sdk/public/models/WebhookValidator.js +14 -0
- package/tests/application/catalog.spec.js +47 -0
- package/tests/common/action-url.spec.js +35 -0
- package/tests/common/schema/action-url.json +163 -0
- package/tests/common/schema/url-action.json +667 -0
- package/tests/common/url-action.spec.js +48 -0
- package/tests/helpers/cookie.helper.js +31 -0
- package/tests/helpers/oauth.helper.js +43 -0
- package/tests/platform/catalog.spec.js +49 -0
- package/tests/public/location.spec.js +39 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
const Paginator = require("../../common/Paginator");
|
|
2
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
+
const PaymentValidator = require("../models/PaymentValidator");
|
|
5
|
+
class Payment {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.config = config;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param {Object} arg - Arg object.
|
|
12
|
+
* @param {string} [arg.uniqueExternalId] - Fetch payouts using unique external id
|
|
13
|
+
* @summary: Get All Payouts
|
|
14
|
+
* @description: Get All Payouts
|
|
15
|
+
*/
|
|
16
|
+
getAllPayouts({ uniqueExternalId } = {}) {
|
|
17
|
+
const { error } = PaymentValidator.getAllPayouts().validate(
|
|
18
|
+
{
|
|
19
|
+
uniqueExternalId,
|
|
20
|
+
},
|
|
21
|
+
{ abortEarly: false, allowUnknown: true }
|
|
22
|
+
);
|
|
23
|
+
if (error) {
|
|
24
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const query_params = {};
|
|
28
|
+
query_params["unique_external_id"] = uniqueExternalId;
|
|
29
|
+
|
|
30
|
+
const xHeaders = {};
|
|
31
|
+
|
|
32
|
+
return PlatformAPIClient.execute(
|
|
33
|
+
this.config,
|
|
34
|
+
"get",
|
|
35
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
36
|
+
query_params,
|
|
37
|
+
undefined,
|
|
38
|
+
xHeaders
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @param {Object} arg - Arg object.
|
|
44
|
+
* @param {PayoutRequest} arg.body
|
|
45
|
+
* @summary: Save Payout
|
|
46
|
+
* @description: Save Payout
|
|
47
|
+
*/
|
|
48
|
+
savePayout({ body } = {}) {
|
|
49
|
+
const { error } = PaymentValidator.savePayout().validate(
|
|
50
|
+
{
|
|
51
|
+
body,
|
|
52
|
+
},
|
|
53
|
+
{ abortEarly: false, allowUnknown: true }
|
|
54
|
+
);
|
|
55
|
+
if (error) {
|
|
56
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const query_params = {};
|
|
60
|
+
|
|
61
|
+
const xHeaders = {};
|
|
62
|
+
|
|
63
|
+
return PlatformAPIClient.execute(
|
|
64
|
+
this.config,
|
|
65
|
+
"post",
|
|
66
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
67
|
+
query_params,
|
|
68
|
+
body,
|
|
69
|
+
xHeaders
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @param {Object} arg - Arg object.
|
|
75
|
+
* @param {string} arg.uniqueTransferNo - Unique transfer id
|
|
76
|
+
* @param {PayoutRequest} arg.body
|
|
77
|
+
* @summary: Update Payout
|
|
78
|
+
* @description: Update Payout
|
|
79
|
+
*/
|
|
80
|
+
updatePayout({ uniqueTransferNo, body } = {}) {
|
|
81
|
+
const { error } = PaymentValidator.updatePayout().validate(
|
|
82
|
+
{
|
|
83
|
+
uniqueTransferNo,
|
|
84
|
+
body,
|
|
85
|
+
},
|
|
86
|
+
{ abortEarly: false, allowUnknown: true }
|
|
87
|
+
);
|
|
88
|
+
if (error) {
|
|
89
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const query_params = {};
|
|
93
|
+
|
|
94
|
+
const xHeaders = {};
|
|
95
|
+
|
|
96
|
+
return PlatformAPIClient.execute(
|
|
97
|
+
this.config,
|
|
98
|
+
"put",
|
|
99
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
100
|
+
query_params,
|
|
101
|
+
body,
|
|
102
|
+
xHeaders
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @param {Object} arg - Arg object.
|
|
108
|
+
* @param {string} arg.uniqueTransferNo - Unique transfer id
|
|
109
|
+
* @param {UpdatePayoutRequest} arg.body
|
|
110
|
+
* @summary: Partial Update Payout
|
|
111
|
+
* @description: Partial Update Payout
|
|
112
|
+
*/
|
|
113
|
+
activateAndDectivatePayout({ uniqueTransferNo, body } = {}) {
|
|
114
|
+
const { error } = PaymentValidator.activateAndDectivatePayout().validate(
|
|
115
|
+
{
|
|
116
|
+
uniqueTransferNo,
|
|
117
|
+
body,
|
|
118
|
+
},
|
|
119
|
+
{ abortEarly: false, allowUnknown: true }
|
|
120
|
+
);
|
|
121
|
+
if (error) {
|
|
122
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const query_params = {};
|
|
126
|
+
|
|
127
|
+
const xHeaders = {};
|
|
128
|
+
|
|
129
|
+
return PlatformAPIClient.execute(
|
|
130
|
+
this.config,
|
|
131
|
+
"patch",
|
|
132
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
133
|
+
query_params,
|
|
134
|
+
body,
|
|
135
|
+
xHeaders
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @param {Object} arg - Arg object.
|
|
141
|
+
* @param {string} arg.uniqueTransferNo - Unique transfer id
|
|
142
|
+
* @summary: Delete Payout
|
|
143
|
+
* @description: Delete Payout
|
|
144
|
+
*/
|
|
145
|
+
deletePayout({ uniqueTransferNo } = {}) {
|
|
146
|
+
const { error } = PaymentValidator.deletePayout().validate(
|
|
147
|
+
{
|
|
148
|
+
uniqueTransferNo,
|
|
149
|
+
},
|
|
150
|
+
{ abortEarly: false, allowUnknown: true }
|
|
151
|
+
);
|
|
152
|
+
if (error) {
|
|
153
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const query_params = {};
|
|
157
|
+
|
|
158
|
+
const xHeaders = {};
|
|
159
|
+
|
|
160
|
+
return PlatformAPIClient.execute(
|
|
161
|
+
this.config,
|
|
162
|
+
"delete",
|
|
163
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
164
|
+
query_params,
|
|
165
|
+
undefined,
|
|
166
|
+
xHeaders
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @param {Object} arg - Arg object.
|
|
172
|
+
* @param {string} [arg.uniqueExternalId] - Unique external id
|
|
173
|
+
* @summary: List Subscription Payment Method
|
|
174
|
+
* @description: Get all Subscription Payment Method
|
|
175
|
+
*/
|
|
176
|
+
getSubscriptionPaymentMethod({ uniqueExternalId } = {}) {
|
|
177
|
+
const { error } = PaymentValidator.getSubscriptionPaymentMethod().validate(
|
|
178
|
+
{
|
|
179
|
+
uniqueExternalId,
|
|
180
|
+
},
|
|
181
|
+
{ abortEarly: false, allowUnknown: true }
|
|
182
|
+
);
|
|
183
|
+
if (error) {
|
|
184
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const query_params = {};
|
|
188
|
+
query_params["unique_external_id"] = uniqueExternalId;
|
|
189
|
+
|
|
190
|
+
const xHeaders = {};
|
|
191
|
+
|
|
192
|
+
return PlatformAPIClient.execute(
|
|
193
|
+
this.config,
|
|
194
|
+
"get",
|
|
195
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/methods`,
|
|
196
|
+
query_params,
|
|
197
|
+
undefined,
|
|
198
|
+
xHeaders
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @param {Object} arg - Arg object.
|
|
204
|
+
* @param {string} arg.uniqueExternalId -
|
|
205
|
+
* @param {string} arg.paymentMethodId -
|
|
206
|
+
* @summary: Delete Subscription Payment Method
|
|
207
|
+
* @description: Uses this api to Delete Subscription Payment Method
|
|
208
|
+
*/
|
|
209
|
+
deleteSubscriptionPaymentMethod({ uniqueExternalId, paymentMethodId } = {}) {
|
|
210
|
+
const {
|
|
211
|
+
error,
|
|
212
|
+
} = PaymentValidator.deleteSubscriptionPaymentMethod().validate(
|
|
213
|
+
{
|
|
214
|
+
uniqueExternalId,
|
|
215
|
+
paymentMethodId,
|
|
216
|
+
},
|
|
217
|
+
{ abortEarly: false, allowUnknown: true }
|
|
218
|
+
);
|
|
219
|
+
if (error) {
|
|
220
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const query_params = {};
|
|
224
|
+
query_params["unique_external_id"] = uniqueExternalId;
|
|
225
|
+
query_params["payment_method_id"] = paymentMethodId;
|
|
226
|
+
|
|
227
|
+
const xHeaders = {};
|
|
228
|
+
|
|
229
|
+
return PlatformAPIClient.execute(
|
|
230
|
+
this.config,
|
|
231
|
+
"delete",
|
|
232
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/methods`,
|
|
233
|
+
query_params,
|
|
234
|
+
undefined,
|
|
235
|
+
xHeaders
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @param {Object} arg - Arg object.
|
|
241
|
+
* @summary: List Subscription Config
|
|
242
|
+
* @description: Get all Subscription Config details
|
|
243
|
+
*/
|
|
244
|
+
getSubscriptionConfig({} = {}) {
|
|
245
|
+
const { error } = PaymentValidator.getSubscriptionConfig().validate(
|
|
246
|
+
{},
|
|
247
|
+
{ abortEarly: false, allowUnknown: true }
|
|
248
|
+
);
|
|
249
|
+
if (error) {
|
|
250
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const query_params = {};
|
|
254
|
+
|
|
255
|
+
const xHeaders = {};
|
|
256
|
+
|
|
257
|
+
return PlatformAPIClient.execute(
|
|
258
|
+
this.config,
|
|
259
|
+
"get",
|
|
260
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/configs`,
|
|
261
|
+
query_params,
|
|
262
|
+
undefined,
|
|
263
|
+
xHeaders
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @param {Object} arg - Arg object.
|
|
269
|
+
* @param {SaveSubscriptionSetupIntentRequest} arg.body
|
|
270
|
+
* @summary: Save Subscription Setup Intent
|
|
271
|
+
* @description: Uses this api to Save Subscription Setup Intent
|
|
272
|
+
*/
|
|
273
|
+
saveSubscriptionSetupIntent({ body } = {}) {
|
|
274
|
+
const { error } = PaymentValidator.saveSubscriptionSetupIntent().validate(
|
|
275
|
+
{
|
|
276
|
+
body,
|
|
277
|
+
},
|
|
278
|
+
{ abortEarly: false, allowUnknown: true }
|
|
279
|
+
);
|
|
280
|
+
if (error) {
|
|
281
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const query_params = {};
|
|
285
|
+
|
|
286
|
+
const xHeaders = {};
|
|
287
|
+
|
|
288
|
+
return PlatformAPIClient.execute(
|
|
289
|
+
this.config,
|
|
290
|
+
"post",
|
|
291
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/setup/intent`,
|
|
292
|
+
query_params,
|
|
293
|
+
body,
|
|
294
|
+
xHeaders
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @param {Object} arg - Arg object.
|
|
300
|
+
* @param {string} [arg.ifscCode] -
|
|
301
|
+
* @summary: Ifsc Code Verification
|
|
302
|
+
* @description: Get True/False for correct IFSC Code for adding bank details for refund
|
|
303
|
+
*/
|
|
304
|
+
verifyIfscCode({ ifscCode } = {}) {
|
|
305
|
+
const { error } = PaymentValidator.verifyIfscCode().validate(
|
|
306
|
+
{
|
|
307
|
+
ifscCode,
|
|
308
|
+
},
|
|
309
|
+
{ abortEarly: false, allowUnknown: true }
|
|
310
|
+
);
|
|
311
|
+
if (error) {
|
|
312
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const query_params = {};
|
|
316
|
+
query_params["ifsc_code"] = ifscCode;
|
|
317
|
+
|
|
318
|
+
const xHeaders = {};
|
|
319
|
+
|
|
320
|
+
return PlatformAPIClient.execute(
|
|
321
|
+
this.config,
|
|
322
|
+
"get",
|
|
323
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/ifsc-code/verify`,
|
|
324
|
+
query_params,
|
|
325
|
+
undefined,
|
|
326
|
+
xHeaders
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
module.exports = Payment;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export = Webhook;
|
|
2
|
+
declare class Webhook {
|
|
3
|
+
constructor(config: any);
|
|
4
|
+
config: any;
|
|
5
|
+
/**
|
|
6
|
+
* @param {Object} arg - Arg object.
|
|
7
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
8
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
9
|
+
* @param {string} [arg.extensionId] - Extension ID
|
|
10
|
+
* @summary: Get Subscribers By Company ID
|
|
11
|
+
* @description: Get Subscribers By CompanyId
|
|
12
|
+
*/
|
|
13
|
+
getSubscribersByCompany({ pageNo, pageSize, extensionId }?: {
|
|
14
|
+
pageNo?: number;
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
extensionId?: string;
|
|
17
|
+
}): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* @param {Object} arg - Arg object.
|
|
20
|
+
* @param {SubscriberConfig} arg.body
|
|
21
|
+
* @summary: Register Subscriber
|
|
22
|
+
* @description: Register Subscriber
|
|
23
|
+
*/
|
|
24
|
+
registerSubscriberToEvent({ body }?: {
|
|
25
|
+
body: any;
|
|
26
|
+
}): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* @param {Object} arg - Arg object.
|
|
29
|
+
* @param {SubscriberConfig} arg.body
|
|
30
|
+
* @summary: Update Subscriber
|
|
31
|
+
* @description: Update Subscriber
|
|
32
|
+
*/
|
|
33
|
+
updateSubscriberConfig({ body }?: {
|
|
34
|
+
body: any;
|
|
35
|
+
}): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* @param {Object} arg - Arg object.
|
|
38
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
39
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
40
|
+
* @param {string} arg.extensionId - Extension ID
|
|
41
|
+
* @summary: Get Subscribers By Extension ID
|
|
42
|
+
* @description: Get Subscribers By ExtensionID
|
|
43
|
+
*/
|
|
44
|
+
getSubscribersByExtensionId({ extensionId, pageNo, pageSize }?: {
|
|
45
|
+
pageNo?: number;
|
|
46
|
+
pageSize?: number;
|
|
47
|
+
extensionId: string;
|
|
48
|
+
}): Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* @param {Object} arg - Arg object.
|
|
51
|
+
* @param {number} arg.subscriberId - Subscriber ID
|
|
52
|
+
* @summary: Get Subscriber By Subscriber ID
|
|
53
|
+
* @description: Get Subscriber By Subscriber ID
|
|
54
|
+
*/
|
|
55
|
+
getSubscriberById({ subscriberId }?: {
|
|
56
|
+
subscriberId: number;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
/**
|
|
59
|
+
* @param {Object} arg - Arg object.
|
|
60
|
+
* @summary:
|
|
61
|
+
* @description: Get All Webhook Events
|
|
62
|
+
*/
|
|
63
|
+
fetchAllEventConfigurations({}?: any): Promise<any>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
const Paginator = require("../../common/Paginator");
|
|
2
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
+
const WebhookValidator = require("../models/WebhookValidator");
|
|
5
|
+
class Webhook {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.config = config;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param {Object} arg - Arg object.
|
|
12
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
13
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
14
|
+
* @param {string} [arg.extensionId] - Extension ID
|
|
15
|
+
* @summary: Get Subscribers By Company ID
|
|
16
|
+
* @description: Get Subscribers By CompanyId
|
|
17
|
+
*/
|
|
18
|
+
getSubscribersByCompany({ pageNo, pageSize, extensionId } = {}) {
|
|
19
|
+
const { error } = WebhookValidator.getSubscribersByCompany().validate(
|
|
20
|
+
{
|
|
21
|
+
pageNo,
|
|
22
|
+
pageSize,
|
|
23
|
+
extensionId,
|
|
24
|
+
},
|
|
25
|
+
{ abortEarly: false, allowUnknown: true }
|
|
26
|
+
);
|
|
27
|
+
if (error) {
|
|
28
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const query_params = {};
|
|
32
|
+
query_params["page_no"] = pageNo;
|
|
33
|
+
query_params["page_size"] = pageSize;
|
|
34
|
+
query_params["extension_id"] = extensionId;
|
|
35
|
+
|
|
36
|
+
const xHeaders = {};
|
|
37
|
+
|
|
38
|
+
return PlatformAPIClient.execute(
|
|
39
|
+
this.config,
|
|
40
|
+
"get",
|
|
41
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
42
|
+
query_params,
|
|
43
|
+
undefined,
|
|
44
|
+
xHeaders
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @param {Object} arg - Arg object.
|
|
50
|
+
* @param {SubscriberConfig} arg.body
|
|
51
|
+
* @summary: Register Subscriber
|
|
52
|
+
* @description: Register Subscriber
|
|
53
|
+
*/
|
|
54
|
+
registerSubscriberToEvent({ body } = {}) {
|
|
55
|
+
const { error } = WebhookValidator.registerSubscriberToEvent().validate(
|
|
56
|
+
{
|
|
57
|
+
body,
|
|
58
|
+
},
|
|
59
|
+
{ abortEarly: false, allowUnknown: true }
|
|
60
|
+
);
|
|
61
|
+
if (error) {
|
|
62
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const query_params = {};
|
|
66
|
+
|
|
67
|
+
const xHeaders = {};
|
|
68
|
+
|
|
69
|
+
return PlatformAPIClient.execute(
|
|
70
|
+
this.config,
|
|
71
|
+
"post",
|
|
72
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
73
|
+
query_params,
|
|
74
|
+
body,
|
|
75
|
+
xHeaders
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @param {Object} arg - Arg object.
|
|
81
|
+
* @param {SubscriberConfig} arg.body
|
|
82
|
+
* @summary: Update Subscriber
|
|
83
|
+
* @description: Update Subscriber
|
|
84
|
+
*/
|
|
85
|
+
updateSubscriberConfig({ body } = {}) {
|
|
86
|
+
const { error } = WebhookValidator.updateSubscriberConfig().validate(
|
|
87
|
+
{
|
|
88
|
+
body,
|
|
89
|
+
},
|
|
90
|
+
{ abortEarly: false, allowUnknown: true }
|
|
91
|
+
);
|
|
92
|
+
if (error) {
|
|
93
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const query_params = {};
|
|
97
|
+
|
|
98
|
+
const xHeaders = {};
|
|
99
|
+
|
|
100
|
+
return PlatformAPIClient.execute(
|
|
101
|
+
this.config,
|
|
102
|
+
"put",
|
|
103
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
104
|
+
query_params,
|
|
105
|
+
body,
|
|
106
|
+
xHeaders
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @param {Object} arg - Arg object.
|
|
112
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
113
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
114
|
+
* @param {string} arg.extensionId - Extension ID
|
|
115
|
+
* @summary: Get Subscribers By Extension ID
|
|
116
|
+
* @description: Get Subscribers By ExtensionID
|
|
117
|
+
*/
|
|
118
|
+
getSubscribersByExtensionId({ extensionId, pageNo, pageSize } = {}) {
|
|
119
|
+
const { error } = WebhookValidator.getSubscribersByExtensionId().validate(
|
|
120
|
+
{
|
|
121
|
+
extensionId,
|
|
122
|
+
pageNo,
|
|
123
|
+
pageSize,
|
|
124
|
+
},
|
|
125
|
+
{ abortEarly: false, allowUnknown: true }
|
|
126
|
+
);
|
|
127
|
+
if (error) {
|
|
128
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const query_params = {};
|
|
132
|
+
query_params["page_no"] = pageNo;
|
|
133
|
+
query_params["page_size"] = pageSize;
|
|
134
|
+
|
|
135
|
+
const xHeaders = {};
|
|
136
|
+
|
|
137
|
+
return PlatformAPIClient.execute(
|
|
138
|
+
this.config,
|
|
139
|
+
"get",
|
|
140
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscriber`,
|
|
141
|
+
query_params,
|
|
142
|
+
undefined,
|
|
143
|
+
xHeaders
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @param {Object} arg - Arg object.
|
|
149
|
+
* @param {number} arg.subscriberId - Subscriber ID
|
|
150
|
+
* @summary: Get Subscriber By Subscriber ID
|
|
151
|
+
* @description: Get Subscriber By Subscriber ID
|
|
152
|
+
*/
|
|
153
|
+
getSubscriberById({ subscriberId } = {}) {
|
|
154
|
+
const { error } = WebhookValidator.getSubscriberById().validate(
|
|
155
|
+
{
|
|
156
|
+
subscriberId,
|
|
157
|
+
},
|
|
158
|
+
{ abortEarly: false, allowUnknown: true }
|
|
159
|
+
);
|
|
160
|
+
if (error) {
|
|
161
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const query_params = {};
|
|
165
|
+
|
|
166
|
+
const xHeaders = {};
|
|
167
|
+
|
|
168
|
+
return PlatformAPIClient.execute(
|
|
169
|
+
this.config,
|
|
170
|
+
"get",
|
|
171
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/${subscriberId}`,
|
|
172
|
+
query_params,
|
|
173
|
+
undefined,
|
|
174
|
+
xHeaders
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @param {Object} arg - Arg object.
|
|
180
|
+
* @summary:
|
|
181
|
+
* @description: Get All Webhook Events
|
|
182
|
+
*/
|
|
183
|
+
fetchAllEventConfigurations({} = {}) {
|
|
184
|
+
const { error } = WebhookValidator.fetchAllEventConfigurations().validate(
|
|
185
|
+
{},
|
|
186
|
+
{ abortEarly: false, allowUnknown: true }
|
|
187
|
+
);
|
|
188
|
+
if (error) {
|
|
189
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const query_params = {};
|
|
193
|
+
|
|
194
|
+
const xHeaders = {};
|
|
195
|
+
|
|
196
|
+
return PlatformAPIClient.execute(
|
|
197
|
+
this.config,
|
|
198
|
+
"get",
|
|
199
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/events`,
|
|
200
|
+
query_params,
|
|
201
|
+
undefined,
|
|
202
|
+
xHeaders
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
module.exports = Webhook;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
const Validator = require("../PlatformModels");
|
|
3
|
+
class AnalyticsValidator {
|
|
4
|
+
static createExportJob() {
|
|
5
|
+
return Joi.object({
|
|
6
|
+
exportType: Joi.string().allow("").required(),
|
|
7
|
+
body: Validator.ExportJobReq().required(),
|
|
8
|
+
}).required();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static getExportJobStatus() {
|
|
12
|
+
return Joi.object({
|
|
13
|
+
exportType: Joi.string().allow("").required(),
|
|
14
|
+
jobId: Joi.string().allow("").required(),
|
|
15
|
+
}).required();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static getLogsList() {
|
|
19
|
+
return Joi.object({
|
|
20
|
+
logType: Joi.string().allow("").required(),
|
|
21
|
+
pageNo: Joi.number(),
|
|
22
|
+
pageSize: Joi.number(),
|
|
23
|
+
body: Validator.GetLogsListReq().required(),
|
|
24
|
+
}).required();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static searchLogs() {
|
|
28
|
+
return Joi.object({
|
|
29
|
+
pageNo: Joi.number(),
|
|
30
|
+
pageSize: Joi.number(),
|
|
31
|
+
logType: Joi.string().allow("").required(),
|
|
32
|
+
body: Validator.SearchLogReq().required(),
|
|
33
|
+
}).required();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
module.exports = AnalyticsValidator;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
const Validator = require("../PlatformModels");
|
|
3
|
+
class AuditTrailValidator {
|
|
4
|
+
static getAuditLogs() {
|
|
5
|
+
return Joi.object({
|
|
6
|
+
qs: Joi.string().allow("").required(),
|
|
7
|
+
}).required();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static createAuditLog() {
|
|
11
|
+
return Joi.object({
|
|
12
|
+
body: Validator.RequestBodyAuditLog().required(),
|
|
13
|
+
}).required();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static getAuditLog() {
|
|
17
|
+
return Joi.object({
|
|
18
|
+
id: Joi.string().allow("").required(),
|
|
19
|
+
}).required();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getEntityTypes() {
|
|
23
|
+
return Joi.object({}).required();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
module.exports = AuditTrailValidator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export = BillingValidator;
|
|
2
|
+
declare class BillingValidator {
|
|
3
|
+
static checkCouponValidity(): any;
|
|
4
|
+
static createSubscriptionCharge(): any;
|
|
5
|
+
static getSubscriptionCharge(): any;
|
|
6
|
+
static cancelSubscriptionCharge(): any;
|
|
7
|
+
static getInvoices(): any;
|
|
8
|
+
static getInvoiceById(): any;
|
|
9
|
+
static getCustomerDetail(): any;
|
|
10
|
+
static upsertCustomerDetail(): any;
|
|
11
|
+
static getSubscription(): any;
|
|
12
|
+
static getFeatureLimitConfig(): any;
|
|
13
|
+
static activateSubscriptionPlan(): any;
|
|
14
|
+
static cancelSubscriptionPlan(): any;
|
|
15
|
+
}
|