@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.3.11-beta.8
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 +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3630 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +342 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +401 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2000 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1094 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1356 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +238 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +310 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -5
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +18 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1032 -470
- package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -104,7 +104,7 @@ declare class Billing {
|
|
|
104
104
|
* @summary: Get subscription subscription limits
|
|
105
105
|
* @description: Get subscription subscription limits. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
|
|
106
106
|
*/
|
|
107
|
-
getFeatureLimitConfig({ requestHeaders }?:
|
|
107
|
+
getFeatureLimitConfig({ productSuite, type, requestHeaders }?: BillingPlatformValidator.GetFeatureLimitConfigParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
|
|
108
108
|
/**
|
|
109
109
|
* @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object
|
|
110
110
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -146,6 +146,16 @@ declare class Billing {
|
|
|
146
146
|
* @description: Get created subscription charge details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getSubscriptionCharge/).
|
|
147
147
|
*/
|
|
148
148
|
getSubscriptionCharge({ extensionId, subscriptionId, requestHeaders }?: BillingPlatformValidator.GetSubscriptionChargeParam, { responseHeaders }?: object): Promise<BillingPlatformModel.EntitySubscription>;
|
|
149
|
+
/**
|
|
150
|
+
* @param {BillingPlatformValidator.GetentityDetailParam} arg - Arg object
|
|
151
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
152
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
153
|
+
* @returns {Promise<BillingPlatformModel.EntityResponse>} - Success response
|
|
154
|
+
* @name getentityDetail
|
|
155
|
+
* @summary: Generic api to get the entity detail
|
|
156
|
+
* @description: Generic api to get the entity detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getentityDetail/).
|
|
157
|
+
*/
|
|
158
|
+
getentityDetail({ entityName, channel, entityId, component, componentName, requestHeaders, }?: BillingPlatformValidator.GetentityDetailParam, { responseHeaders }?: object): Promise<BillingPlatformModel.EntityResponse>;
|
|
149
159
|
/**
|
|
150
160
|
* @param {BillingPlatformValidator.PlanStatusUpdateParam} arg - Arg object
|
|
151
161
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -747,11 +747,14 @@ class Billing {
|
|
|
747
747
|
* @description: Get subscription subscription limits. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
|
|
748
748
|
*/
|
|
749
749
|
async getFeatureLimitConfig(
|
|
750
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
750
|
+
{ productSuite, type, requestHeaders } = { requestHeaders: {} },
|
|
751
751
|
{ responseHeaders } = { responseHeaders: false }
|
|
752
752
|
) {
|
|
753
753
|
const { error } = BillingPlatformValidator.getFeatureLimitConfig().validate(
|
|
754
|
-
{
|
|
754
|
+
{
|
|
755
|
+
productSuite,
|
|
756
|
+
type,
|
|
757
|
+
},
|
|
755
758
|
{ abortEarly: false, allowUnknown: true }
|
|
756
759
|
);
|
|
757
760
|
if (error) {
|
|
@@ -762,7 +765,10 @@ class Billing {
|
|
|
762
765
|
const {
|
|
763
766
|
error: warrning,
|
|
764
767
|
} = BillingPlatformValidator.getFeatureLimitConfig().validate(
|
|
765
|
-
{
|
|
768
|
+
{
|
|
769
|
+
productSuite,
|
|
770
|
+
type,
|
|
771
|
+
},
|
|
766
772
|
{ abortEarly: false, allowUnknown: false }
|
|
767
773
|
);
|
|
768
774
|
if (warrning) {
|
|
@@ -773,6 +779,8 @@ class Billing {
|
|
|
773
779
|
}
|
|
774
780
|
|
|
775
781
|
const query_params = {};
|
|
782
|
+
query_params["product_suite"] = productSuite;
|
|
783
|
+
query_params["type"] = type;
|
|
776
784
|
|
|
777
785
|
const xHeaders = {};
|
|
778
786
|
|
|
@@ -1121,6 +1129,105 @@ class Billing {
|
|
|
1121
1129
|
return response;
|
|
1122
1130
|
}
|
|
1123
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* @param {BillingPlatformValidator.GetentityDetailParam} arg - Arg object
|
|
1134
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1135
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1136
|
+
* @returns {Promise<BillingPlatformModel.EntityResponse>} - Success response
|
|
1137
|
+
* @name getentityDetail
|
|
1138
|
+
* @summary: Generic api to get the entity detail
|
|
1139
|
+
* @description: Generic api to get the entity detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getentityDetail/).
|
|
1140
|
+
*/
|
|
1141
|
+
async getentityDetail(
|
|
1142
|
+
{
|
|
1143
|
+
entityName,
|
|
1144
|
+
channel,
|
|
1145
|
+
entityId,
|
|
1146
|
+
component,
|
|
1147
|
+
componentName,
|
|
1148
|
+
requestHeaders,
|
|
1149
|
+
} = { requestHeaders: {} },
|
|
1150
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1151
|
+
) {
|
|
1152
|
+
const { error } = BillingPlatformValidator.getentityDetail().validate(
|
|
1153
|
+
{
|
|
1154
|
+
entityName,
|
|
1155
|
+
channel,
|
|
1156
|
+
entityId,
|
|
1157
|
+
component,
|
|
1158
|
+
componentName,
|
|
1159
|
+
},
|
|
1160
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1161
|
+
);
|
|
1162
|
+
if (error) {
|
|
1163
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1167
|
+
const {
|
|
1168
|
+
error: warrning,
|
|
1169
|
+
} = BillingPlatformValidator.getentityDetail().validate(
|
|
1170
|
+
{
|
|
1171
|
+
entityName,
|
|
1172
|
+
channel,
|
|
1173
|
+
entityId,
|
|
1174
|
+
component,
|
|
1175
|
+
componentName,
|
|
1176
|
+
},
|
|
1177
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1178
|
+
);
|
|
1179
|
+
if (warrning) {
|
|
1180
|
+
Logger({
|
|
1181
|
+
level: "WARN",
|
|
1182
|
+
message: `Parameter Validation warrnings for platform > Billing > getentityDetail \n ${warrning}`,
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
const query_params = {};
|
|
1187
|
+
query_params["entity_name"] = entityName;
|
|
1188
|
+
query_params["entity_id"] = entityId;
|
|
1189
|
+
query_params["channel"] = channel;
|
|
1190
|
+
query_params["component"] = component;
|
|
1191
|
+
query_params["component_name"] = componentName;
|
|
1192
|
+
|
|
1193
|
+
const xHeaders = {};
|
|
1194
|
+
|
|
1195
|
+
const response = await PlatformAPIClient.execute(
|
|
1196
|
+
this.config,
|
|
1197
|
+
"get",
|
|
1198
|
+
`/service/platform/billing/v1.0/company/${this.config.companyId}/entity/detail`,
|
|
1199
|
+
query_params,
|
|
1200
|
+
undefined,
|
|
1201
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1202
|
+
{ responseHeaders }
|
|
1203
|
+
);
|
|
1204
|
+
|
|
1205
|
+
let responseData = response;
|
|
1206
|
+
if (responseHeaders) {
|
|
1207
|
+
responseData = response[0];
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
const {
|
|
1211
|
+
error: res_error,
|
|
1212
|
+
} = BillingPlatformModel.EntityResponse().validate(responseData, {
|
|
1213
|
+
abortEarly: false,
|
|
1214
|
+
allowUnknown: true,
|
|
1215
|
+
});
|
|
1216
|
+
|
|
1217
|
+
if (res_error) {
|
|
1218
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1219
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1220
|
+
} else {
|
|
1221
|
+
Logger({
|
|
1222
|
+
level: "WARN",
|
|
1223
|
+
message: `Response Validation Warnings for platform > Billing > getentityDetail \n ${res_error}`,
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
return response;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1124
1231
|
/**
|
|
1125
1232
|
* @param {BillingPlatformValidator.PlanStatusUpdateParam} arg - Arg object
|
|
1126
1233
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -62,6 +62,11 @@ export = BillingPlatformModel;
|
|
|
62
62
|
* @property {string} [end_date]
|
|
63
63
|
* @property {string} [start_date]
|
|
64
64
|
*/
|
|
65
|
+
/**
|
|
66
|
+
* @typedef Details
|
|
67
|
+
* @property {Features[]} [features]
|
|
68
|
+
* @property {FeeComponents[]} [fee_components]
|
|
69
|
+
*/
|
|
65
70
|
/**
|
|
66
71
|
* @typedef EntityChargePrice
|
|
67
72
|
* @property {number} amount - Amount for price. Minimum value 1
|
|
@@ -71,6 +76,13 @@ export = BillingPlatformModel;
|
|
|
71
76
|
* @typedef EntityChargeRecurring
|
|
72
77
|
* @property {string} interval
|
|
73
78
|
*/
|
|
79
|
+
/**
|
|
80
|
+
* @typedef EntityResponse
|
|
81
|
+
* @property {Details[]} [items]
|
|
82
|
+
* @property {number} [page]
|
|
83
|
+
* @property {number} [page_size]
|
|
84
|
+
* @property {boolean} [success]
|
|
85
|
+
*/
|
|
74
86
|
/**
|
|
75
87
|
* @typedef EntitySubscription
|
|
76
88
|
* @property {string} [_id]
|
|
@@ -84,6 +96,25 @@ export = BillingPlatformModel;
|
|
|
84
96
|
* @property {number} [trial_days]
|
|
85
97
|
* @property {SubscriptionTrialPeriod} [trial_period]
|
|
86
98
|
*/
|
|
99
|
+
/**
|
|
100
|
+
* @typedef Features
|
|
101
|
+
* @property {string} [description]
|
|
102
|
+
* @property {string} [display_text]
|
|
103
|
+
* @property {boolean} [enabled]
|
|
104
|
+
* @property {string} [group]
|
|
105
|
+
* @property {string} [name]
|
|
106
|
+
* @property {string} [slug]
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* @typedef FeeComponents
|
|
110
|
+
* @property {string[]} [brand]
|
|
111
|
+
* @property {string} [business_lead]
|
|
112
|
+
* @property {Object[]} [channel]
|
|
113
|
+
* @property {Object[]} [components]
|
|
114
|
+
* @property {string[]} [location]
|
|
115
|
+
* @property {Object} [settle_cycle_period]
|
|
116
|
+
* @property {string} [settlement_type]
|
|
117
|
+
*/
|
|
87
118
|
/**
|
|
88
119
|
* @typedef InternalServerError
|
|
89
120
|
* @property {string} [code] - Error code
|
|
@@ -496,7 +527,7 @@ export = BillingPlatformModel;
|
|
|
496
527
|
declare class BillingPlatformModel {
|
|
497
528
|
}
|
|
498
529
|
declare namespace BillingPlatformModel {
|
|
499
|
-
export { BadRequest, CancelSubscriptionReq, CancelSubscriptionRes, ChargeLineItem, CheckValidityResponse, CreateOneTimeCharge, CreateOneTimeChargeResponse, CreateSubscriptionCharge, CreateSubscriptionResponse, CurrentPeriod, EntityChargePrice, EntityChargeRecurring, EntitySubscription, InternalServerError, Invoice, InvoiceDetails, InvoiceDetailsClient, InvoiceDetailsPeriod, InvoiceDetailsStatusTrail, InvoiceItems, InvoiceItemsPeriod, InvoiceItemsPlan, InvoiceItemsPlanRecurring, InvoicePaymentMethod, Invoices, InvoicesData, InvoicesDataClient, InvoicesDataPaymentMethod, InvoicesDataPeriod, Meta, OneTimeChargeEntity, OneTimeChargeItem, Phone, Plan, PlanRecurring, PlanStatusUpdateReq, ResourceNotFound, SubscribePlanRes, Subscription, SubscriptionActivateReq, SubscriptionActivateRes, SubscriptionBillingAddress, SubscriptionCharge, SubscriptionCurrentPeriod, SubscriptionCustomer, SubscriptionCustomerCreate, SubscriptionInvoiceSettings, SubscriptionLimit, SubscriptionLimitApplication, SubscriptionLimitExtensions, SubscriptionLimitIntegrations, SubscriptionLimitMarketplace, SubscriptionLimitOtherPlatform, SubscriptionLimitProducts, SubscriptionLimitTeam, SubscriptionPauseCollection, SubscriptionStatus, SubscriptionTrial, SubscriptionTrialPeriod, SunscribePlan };
|
|
530
|
+
export { BadRequest, CancelSubscriptionReq, CancelSubscriptionRes, ChargeLineItem, CheckValidityResponse, CreateOneTimeCharge, CreateOneTimeChargeResponse, CreateSubscriptionCharge, CreateSubscriptionResponse, CurrentPeriod, Details, EntityChargePrice, EntityChargeRecurring, EntityResponse, EntitySubscription, Features, FeeComponents, InternalServerError, Invoice, InvoiceDetails, InvoiceDetailsClient, InvoiceDetailsPeriod, InvoiceDetailsStatusTrail, InvoiceItems, InvoiceItemsPeriod, InvoiceItemsPlan, InvoiceItemsPlanRecurring, InvoicePaymentMethod, Invoices, InvoicesData, InvoicesDataClient, InvoicesDataPaymentMethod, InvoicesDataPeriod, Meta, OneTimeChargeEntity, OneTimeChargeItem, Phone, Plan, PlanRecurring, PlanStatusUpdateReq, ResourceNotFound, SubscribePlanRes, Subscription, SubscriptionActivateReq, SubscriptionActivateRes, SubscriptionBillingAddress, SubscriptionCharge, SubscriptionCurrentPeriod, SubscriptionCustomer, SubscriptionCustomerCreate, SubscriptionInvoiceSettings, SubscriptionLimit, SubscriptionLimitApplication, SubscriptionLimitExtensions, SubscriptionLimitIntegrations, SubscriptionLimitMarketplace, SubscriptionLimitOtherPlatform, SubscriptionLimitProducts, SubscriptionLimitTeam, SubscriptionPauseCollection, SubscriptionStatus, SubscriptionTrial, SubscriptionTrialPeriod, SunscribePlan };
|
|
500
531
|
}
|
|
501
532
|
/** @returns {BadRequest} */
|
|
502
533
|
declare function BadRequest(): BadRequest;
|
|
@@ -574,6 +605,12 @@ type CurrentPeriod = {
|
|
|
574
605
|
end_date?: string;
|
|
575
606
|
start_date?: string;
|
|
576
607
|
};
|
|
608
|
+
/** @returns {Details} */
|
|
609
|
+
declare function Details(): Details;
|
|
610
|
+
type Details = {
|
|
611
|
+
features?: Features[];
|
|
612
|
+
fee_components?: FeeComponents[];
|
|
613
|
+
};
|
|
577
614
|
/** @returns {EntityChargePrice} */
|
|
578
615
|
declare function EntityChargePrice(): EntityChargePrice;
|
|
579
616
|
type EntityChargePrice = {
|
|
@@ -588,6 +625,14 @@ declare function EntityChargeRecurring(): EntityChargeRecurring;
|
|
|
588
625
|
type EntityChargeRecurring = {
|
|
589
626
|
interval: string;
|
|
590
627
|
};
|
|
628
|
+
/** @returns {EntityResponse} */
|
|
629
|
+
declare function EntityResponse(): EntityResponse;
|
|
630
|
+
type EntityResponse = {
|
|
631
|
+
items?: Details[];
|
|
632
|
+
page?: number;
|
|
633
|
+
page_size?: number;
|
|
634
|
+
success?: boolean;
|
|
635
|
+
};
|
|
591
636
|
/** @returns {EntitySubscription} */
|
|
592
637
|
declare function EntitySubscription(): EntitySubscription;
|
|
593
638
|
type EntitySubscription = {
|
|
@@ -602,6 +647,27 @@ type EntitySubscription = {
|
|
|
602
647
|
trial_days?: number;
|
|
603
648
|
trial_period?: SubscriptionTrialPeriod;
|
|
604
649
|
};
|
|
650
|
+
/** @returns {Features} */
|
|
651
|
+
declare function Features(): Features;
|
|
652
|
+
type Features = {
|
|
653
|
+
description?: string;
|
|
654
|
+
display_text?: string;
|
|
655
|
+
enabled?: boolean;
|
|
656
|
+
group?: string;
|
|
657
|
+
name?: string;
|
|
658
|
+
slug?: string;
|
|
659
|
+
};
|
|
660
|
+
/** @returns {FeeComponents} */
|
|
661
|
+
declare function FeeComponents(): FeeComponents;
|
|
662
|
+
type FeeComponents = {
|
|
663
|
+
brand?: string[];
|
|
664
|
+
business_lead?: string;
|
|
665
|
+
channel?: any[];
|
|
666
|
+
components?: any[];
|
|
667
|
+
location?: string[];
|
|
668
|
+
settle_cycle_period?: any;
|
|
669
|
+
settlement_type?: string;
|
|
670
|
+
};
|
|
605
671
|
/** @returns {InternalServerError} */
|
|
606
672
|
declare function InternalServerError(): InternalServerError;
|
|
607
673
|
type InternalServerError = {
|
|
@@ -73,6 +73,12 @@ const Joi = require("joi");
|
|
|
73
73
|
* @property {string} [start_date]
|
|
74
74
|
*/
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @typedef Details
|
|
78
|
+
* @property {Features[]} [features]
|
|
79
|
+
* @property {FeeComponents[]} [fee_components]
|
|
80
|
+
*/
|
|
81
|
+
|
|
76
82
|
/**
|
|
77
83
|
* @typedef EntityChargePrice
|
|
78
84
|
* @property {number} amount - Amount for price. Minimum value 1
|
|
@@ -84,6 +90,14 @@ const Joi = require("joi");
|
|
|
84
90
|
* @property {string} interval
|
|
85
91
|
*/
|
|
86
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @typedef EntityResponse
|
|
95
|
+
* @property {Details[]} [items]
|
|
96
|
+
* @property {number} [page]
|
|
97
|
+
* @property {number} [page_size]
|
|
98
|
+
* @property {boolean} [success]
|
|
99
|
+
*/
|
|
100
|
+
|
|
87
101
|
/**
|
|
88
102
|
* @typedef EntitySubscription
|
|
89
103
|
* @property {string} [_id]
|
|
@@ -98,6 +112,27 @@ const Joi = require("joi");
|
|
|
98
112
|
* @property {SubscriptionTrialPeriod} [trial_period]
|
|
99
113
|
*/
|
|
100
114
|
|
|
115
|
+
/**
|
|
116
|
+
* @typedef Features
|
|
117
|
+
* @property {string} [description]
|
|
118
|
+
* @property {string} [display_text]
|
|
119
|
+
* @property {boolean} [enabled]
|
|
120
|
+
* @property {string} [group]
|
|
121
|
+
* @property {string} [name]
|
|
122
|
+
* @property {string} [slug]
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @typedef FeeComponents
|
|
127
|
+
* @property {string[]} [brand]
|
|
128
|
+
* @property {string} [business_lead]
|
|
129
|
+
* @property {Object[]} [channel]
|
|
130
|
+
* @property {Object[]} [components]
|
|
131
|
+
* @property {string[]} [location]
|
|
132
|
+
* @property {Object} [settle_cycle_period]
|
|
133
|
+
* @property {string} [settlement_type]
|
|
134
|
+
*/
|
|
135
|
+
|
|
101
136
|
/**
|
|
102
137
|
* @typedef InternalServerError
|
|
103
138
|
* @property {string} [code] - Error code
|
|
@@ -650,6 +685,14 @@ class BillingPlatformModel {
|
|
|
650
685
|
});
|
|
651
686
|
}
|
|
652
687
|
|
|
688
|
+
/** @returns {Details} */
|
|
689
|
+
static Details() {
|
|
690
|
+
return Joi.object({
|
|
691
|
+
features: Joi.array().items(BillingPlatformModel.Features()),
|
|
692
|
+
fee_components: Joi.array().items(BillingPlatformModel.FeeComponents()),
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
|
|
653
696
|
/** @returns {EntityChargePrice} */
|
|
654
697
|
static EntityChargePrice() {
|
|
655
698
|
return Joi.object({
|
|
@@ -665,6 +708,16 @@ class BillingPlatformModel {
|
|
|
665
708
|
});
|
|
666
709
|
}
|
|
667
710
|
|
|
711
|
+
/** @returns {EntityResponse} */
|
|
712
|
+
static EntityResponse() {
|
|
713
|
+
return Joi.object({
|
|
714
|
+
items: Joi.array().items(BillingPlatformModel.Details()),
|
|
715
|
+
page: Joi.number(),
|
|
716
|
+
page_size: Joi.number(),
|
|
717
|
+
success: Joi.boolean(),
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
|
|
668
721
|
/** @returns {EntitySubscription} */
|
|
669
722
|
static EntitySubscription() {
|
|
670
723
|
return Joi.object({
|
|
@@ -681,6 +734,31 @@ class BillingPlatformModel {
|
|
|
681
734
|
});
|
|
682
735
|
}
|
|
683
736
|
|
|
737
|
+
/** @returns {Features} */
|
|
738
|
+
static Features() {
|
|
739
|
+
return Joi.object({
|
|
740
|
+
description: Joi.string().allow(""),
|
|
741
|
+
display_text: Joi.string().allow(""),
|
|
742
|
+
enabled: Joi.boolean(),
|
|
743
|
+
group: Joi.string().allow(""),
|
|
744
|
+
name: Joi.string().allow(""),
|
|
745
|
+
slug: Joi.string().allow(""),
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/** @returns {FeeComponents} */
|
|
750
|
+
static FeeComponents() {
|
|
751
|
+
return Joi.object({
|
|
752
|
+
brand: Joi.array().items(Joi.string().allow("")),
|
|
753
|
+
business_lead: Joi.string().allow(""),
|
|
754
|
+
channel: Joi.array().items(Joi.any()),
|
|
755
|
+
components: Joi.array().items(Joi.any()),
|
|
756
|
+
location: Joi.array().items(Joi.string().allow("")),
|
|
757
|
+
settle_cycle_period: Joi.any(),
|
|
758
|
+
settlement_type: Joi.string().allow(""),
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
|
|
684
762
|
/** @returns {InternalServerError} */
|
|
685
763
|
static InternalServerError() {
|
|
686
764
|
return Joi.object({
|
|
@@ -34,7 +34,11 @@ export = BillingPlatformValidator;
|
|
|
34
34
|
*/
|
|
35
35
|
/** @typedef GetCustomerDetailParam */
|
|
36
36
|
/** @typedef GetEnterprisePlansParam */
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* @typedef GetFeatureLimitConfigParam
|
|
39
|
+
* @property {string} [productSuite]
|
|
40
|
+
* @property {string} [type]
|
|
41
|
+
*/
|
|
38
42
|
/**
|
|
39
43
|
* @typedef GetInvoiceByIdParam
|
|
40
44
|
* @property {string} invoiceId - Invoice id
|
|
@@ -46,6 +50,14 @@ export = BillingPlatformValidator;
|
|
|
46
50
|
* @property {string} extensionId - Extension _id
|
|
47
51
|
* @property {string} subscriptionId - Subscription charge _id
|
|
48
52
|
*/
|
|
53
|
+
/**
|
|
54
|
+
* @typedef GetentityDetailParam
|
|
55
|
+
* @property {string} entityName - Entity name.
|
|
56
|
+
* @property {string} [entityId] - Entity unique id.
|
|
57
|
+
* @property {string} channel - Ordering channel.
|
|
58
|
+
* @property {string} [component] - The coponents the user would like to know.
|
|
59
|
+
* @property {string} [componentName] - The name of component the preferred to be fetched.
|
|
60
|
+
*/
|
|
49
61
|
/**
|
|
50
62
|
* @typedef PlanStatusUpdateParam
|
|
51
63
|
* @property {BillingPlatformModel.PlanStatusUpdateReq} body
|
|
@@ -78,7 +90,7 @@ declare class BillingPlatformValidator {
|
|
|
78
90
|
/** @returns {GetEnterprisePlansParam} */
|
|
79
91
|
static getEnterprisePlans(): any;
|
|
80
92
|
/** @returns {GetFeatureLimitConfigParam} */
|
|
81
|
-
static getFeatureLimitConfig():
|
|
93
|
+
static getFeatureLimitConfig(): GetFeatureLimitConfigParam;
|
|
82
94
|
/** @returns {GetInvoiceByIdParam} */
|
|
83
95
|
static getInvoiceById(): GetInvoiceByIdParam;
|
|
84
96
|
/** @returns {GetInvoicesParam} */
|
|
@@ -87,6 +99,8 @@ declare class BillingPlatformValidator {
|
|
|
87
99
|
static getSubscription(): any;
|
|
88
100
|
/** @returns {GetSubscriptionChargeParam} */
|
|
89
101
|
static getSubscriptionCharge(): GetSubscriptionChargeParam;
|
|
102
|
+
/** @returns {GetentityDetailParam} */
|
|
103
|
+
static getentityDetail(): GetentityDetailParam;
|
|
90
104
|
/** @returns {PlanStatusUpdateParam} */
|
|
91
105
|
static planStatusUpdate(): PlanStatusUpdateParam;
|
|
92
106
|
/** @returns {SubscripePlanParam} */
|
|
@@ -95,7 +109,7 @@ declare class BillingPlatformValidator {
|
|
|
95
109
|
static upsertCustomerDetail(): UpsertCustomerDetailParam;
|
|
96
110
|
}
|
|
97
111
|
declare namespace BillingPlatformValidator {
|
|
98
|
-
export { ActivateSubscriptionPlanParam, CancelSubscriptionChargeParam, CancelSubscriptionPlanParam, CheckCouponValidityParam, CreateOneTimeChargeParam, CreateSubscriptionChargeParam, GetChargeDetailsParam, GetCustomerDetailParam, GetEnterprisePlansParam, GetFeatureLimitConfigParam, GetInvoiceByIdParam, GetInvoicesParam, GetSubscriptionParam, GetSubscriptionChargeParam, PlanStatusUpdateParam, SubscripePlanParam, UpsertCustomerDetailParam };
|
|
112
|
+
export { ActivateSubscriptionPlanParam, CancelSubscriptionChargeParam, CancelSubscriptionPlanParam, CheckCouponValidityParam, CreateOneTimeChargeParam, CreateSubscriptionChargeParam, GetChargeDetailsParam, GetCustomerDetailParam, GetEnterprisePlansParam, GetFeatureLimitConfigParam, GetInvoiceByIdParam, GetInvoicesParam, GetSubscriptionParam, GetSubscriptionChargeParam, GetentityDetailParam, PlanStatusUpdateParam, SubscripePlanParam, UpsertCustomerDetailParam };
|
|
99
113
|
}
|
|
100
114
|
type ActivateSubscriptionPlanParam = {
|
|
101
115
|
body: BillingPlatformModel.SubscriptionActivateReq;
|
|
@@ -147,6 +161,10 @@ type GetChargeDetailsParam = {
|
|
|
147
161
|
*/
|
|
148
162
|
chargeId: string;
|
|
149
163
|
};
|
|
164
|
+
type GetFeatureLimitConfigParam = {
|
|
165
|
+
productSuite?: string;
|
|
166
|
+
type?: string;
|
|
167
|
+
};
|
|
150
168
|
type GetInvoiceByIdParam = {
|
|
151
169
|
/**
|
|
152
170
|
* - Invoice id
|
|
@@ -163,6 +181,28 @@ type GetSubscriptionChargeParam = {
|
|
|
163
181
|
*/
|
|
164
182
|
subscriptionId: string;
|
|
165
183
|
};
|
|
184
|
+
type GetentityDetailParam = {
|
|
185
|
+
/**
|
|
186
|
+
* - Entity name.
|
|
187
|
+
*/
|
|
188
|
+
entityName: string;
|
|
189
|
+
/**
|
|
190
|
+
* - Entity unique id.
|
|
191
|
+
*/
|
|
192
|
+
entityId?: string;
|
|
193
|
+
/**
|
|
194
|
+
* - Ordering channel.
|
|
195
|
+
*/
|
|
196
|
+
channel: string;
|
|
197
|
+
/**
|
|
198
|
+
* - The coponents the user would like to know.
|
|
199
|
+
*/
|
|
200
|
+
component?: string;
|
|
201
|
+
/**
|
|
202
|
+
* - The name of component the preferred to be fetched.
|
|
203
|
+
*/
|
|
204
|
+
componentName?: string;
|
|
205
|
+
};
|
|
166
206
|
type PlanStatusUpdateParam = {
|
|
167
207
|
body: BillingPlatformModel.PlanStatusUpdateReq;
|
|
168
208
|
};
|
|
@@ -174,7 +214,6 @@ type UpsertCustomerDetailParam = {
|
|
|
174
214
|
};
|
|
175
215
|
type GetCustomerDetailParam = any;
|
|
176
216
|
type GetEnterprisePlansParam = any;
|
|
177
|
-
type GetFeatureLimitConfigParam = any;
|
|
178
217
|
type GetInvoicesParam = any;
|
|
179
218
|
type GetSubscriptionParam = any;
|
|
180
219
|
import BillingPlatformModel = require("./BillingPlatformModel");
|
|
@@ -46,7 +46,11 @@ const BillingPlatformModel = require("./BillingPlatformModel");
|
|
|
46
46
|
|
|
47
47
|
/** @typedef GetEnterprisePlansParam */
|
|
48
48
|
|
|
49
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* @typedef GetFeatureLimitConfigParam
|
|
51
|
+
* @property {string} [productSuite]
|
|
52
|
+
* @property {string} [type]
|
|
53
|
+
*/
|
|
50
54
|
|
|
51
55
|
/**
|
|
52
56
|
* @typedef GetInvoiceByIdParam
|
|
@@ -63,6 +67,15 @@ const BillingPlatformModel = require("./BillingPlatformModel");
|
|
|
63
67
|
* @property {string} subscriptionId - Subscription charge _id
|
|
64
68
|
*/
|
|
65
69
|
|
|
70
|
+
/**
|
|
71
|
+
* @typedef GetentityDetailParam
|
|
72
|
+
* @property {string} entityName - Entity name.
|
|
73
|
+
* @property {string} [entityId] - Entity unique id.
|
|
74
|
+
* @property {string} channel - Ordering channel.
|
|
75
|
+
* @property {string} [component] - The coponents the user would like to know.
|
|
76
|
+
* @property {string} [componentName] - The name of component the preferred to be fetched.
|
|
77
|
+
*/
|
|
78
|
+
|
|
66
79
|
/**
|
|
67
80
|
* @typedef PlanStatusUpdateParam
|
|
68
81
|
* @property {BillingPlatformModel.PlanStatusUpdateReq} body
|
|
@@ -145,7 +158,10 @@ class BillingPlatformValidator {
|
|
|
145
158
|
|
|
146
159
|
/** @returns {GetFeatureLimitConfigParam} */
|
|
147
160
|
static getFeatureLimitConfig() {
|
|
148
|
-
return Joi.object({
|
|
161
|
+
return Joi.object({
|
|
162
|
+
productSuite: Joi.string().allow(""),
|
|
163
|
+
type: Joi.string().allow(""),
|
|
164
|
+
}).required();
|
|
149
165
|
}
|
|
150
166
|
|
|
151
167
|
/** @returns {GetInvoiceByIdParam} */
|
|
@@ -173,6 +189,17 @@ class BillingPlatformValidator {
|
|
|
173
189
|
}).required();
|
|
174
190
|
}
|
|
175
191
|
|
|
192
|
+
/** @returns {GetentityDetailParam} */
|
|
193
|
+
static getentityDetail() {
|
|
194
|
+
return Joi.object({
|
|
195
|
+
entityName: Joi.string().allow("").required(),
|
|
196
|
+
entityId: Joi.string().allow(""),
|
|
197
|
+
channel: Joi.string().allow("").required(),
|
|
198
|
+
component: Joi.string().allow(""),
|
|
199
|
+
componentName: Joi.string().allow(""),
|
|
200
|
+
}).required();
|
|
201
|
+
}
|
|
202
|
+
|
|
176
203
|
/** @returns {PlanStatusUpdateParam} */
|
|
177
204
|
static planStatusUpdate() {
|
|
178
205
|
return Joi.object({
|
|
@@ -207,7 +207,7 @@ declare class Cart {
|
|
|
207
207
|
* @summary: Fetch Coupon
|
|
208
208
|
* @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/).
|
|
209
209
|
*/
|
|
210
|
-
getAppCoupons({ id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetAppCouponsParam, { responseHeaders }?: object): Promise<CartPlatformModel.GetCouponResponse>;
|
|
210
|
+
getAppCoupons({ id, buyNow, slug, storeId, requestHeaders }?: CartPlatformApplicationValidator.GetAppCouponsParam, { responseHeaders }?: object): Promise<CartPlatformModel.GetCouponResponse>;
|
|
211
211
|
/**
|
|
212
212
|
* @param {CartPlatformApplicationValidator.GetAvailableDeliveryModesParam} arg
|
|
213
213
|
* - Arg object
|
|
@@ -1449,13 +1449,15 @@ class Cart {
|
|
|
1449
1449
|
* @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/).
|
|
1450
1450
|
*/
|
|
1451
1451
|
async getAppCoupons(
|
|
1452
|
-
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1452
|
+
{ id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
1453
1453
|
{ responseHeaders } = { responseHeaders: false }
|
|
1454
1454
|
) {
|
|
1455
1455
|
const { error } = CartPlatformApplicationValidator.getAppCoupons().validate(
|
|
1456
1456
|
{
|
|
1457
1457
|
id,
|
|
1458
1458
|
buyNow,
|
|
1459
|
+
slug,
|
|
1460
|
+
storeId,
|
|
1459
1461
|
},
|
|
1460
1462
|
{ abortEarly: false, allowUnknown: true }
|
|
1461
1463
|
);
|
|
@@ -1470,6 +1472,8 @@ class Cart {
|
|
|
1470
1472
|
{
|
|
1471
1473
|
id,
|
|
1472
1474
|
buyNow,
|
|
1475
|
+
slug,
|
|
1476
|
+
storeId,
|
|
1473
1477
|
},
|
|
1474
1478
|
{ abortEarly: false, allowUnknown: false }
|
|
1475
1479
|
);
|
|
@@ -1483,6 +1487,8 @@ class Cart {
|
|
|
1483
1487
|
const query_params = {};
|
|
1484
1488
|
query_params["id"] = id;
|
|
1485
1489
|
query_params["buy_now"] = buyNow;
|
|
1490
|
+
query_params["slug"] = slug;
|
|
1491
|
+
query_params["store_id"] = storeId;
|
|
1486
1492
|
|
|
1487
1493
|
const response = await PlatformAPIClient.execute(
|
|
1488
1494
|
this.config,
|
|
@@ -94,6 +94,8 @@ export = CartPlatformApplicationValidator;
|
|
|
94
94
|
* @typedef GetAppCouponsParam
|
|
95
95
|
* @property {string} [id]
|
|
96
96
|
* @property {boolean} [buyNow]
|
|
97
|
+
* @property {string} [slug]
|
|
98
|
+
* @property {string} [storeId]
|
|
97
99
|
*/
|
|
98
100
|
/**
|
|
99
101
|
* @typedef GetAvailableDeliveryModesParam
|
|
@@ -546,6 +548,8 @@ type GetAddressesParam = {
|
|
|
546
548
|
type GetAppCouponsParam = {
|
|
547
549
|
id?: string;
|
|
548
550
|
buyNow?: boolean;
|
|
551
|
+
slug?: string;
|
|
552
|
+
storeId?: string;
|
|
549
553
|
};
|
|
550
554
|
type GetAvailableDeliveryModesParam = {
|
|
551
555
|
areaCode: string;
|
|
@@ -113,6 +113,8 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
113
113
|
* @typedef GetAppCouponsParam
|
|
114
114
|
* @property {string} [id]
|
|
115
115
|
* @property {boolean} [buyNow]
|
|
116
|
+
* @property {string} [slug]
|
|
117
|
+
* @property {string} [storeId]
|
|
116
118
|
*/
|
|
117
119
|
|
|
118
120
|
/**
|
|
@@ -549,6 +551,8 @@ class CartPlatformApplicationValidator {
|
|
|
549
551
|
return Joi.object({
|
|
550
552
|
id: Joi.string().allow(""),
|
|
551
553
|
buyNow: Joi.boolean(),
|
|
554
|
+
slug: Joi.string().allow(""),
|
|
555
|
+
storeId: Joi.string().allow(""),
|
|
552
556
|
}).required();
|
|
553
557
|
}
|
|
554
558
|
|