@gofynd/fdk-client-javascript 1.6.4 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
- package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -21,8 +21,8 @@ class Configuration {
|
|
|
21
21
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
22
|
* @returns {Promise<ConfigurationPlatformModel.Domain>} - Success response
|
|
23
23
|
* @name addDomain
|
|
24
|
-
* @summary:
|
|
25
|
-
* @description:
|
|
24
|
+
* @summary: Add domain.
|
|
25
|
+
* @description: Add a new domain. Add a new domain to current sales channel, including pre-defined domain (free domain) or custom domain (owned by the brand) - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/addDomain/).
|
|
26
26
|
*/
|
|
27
27
|
async addDomain(
|
|
28
28
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -100,10 +100,9 @@ class Configuration {
|
|
|
100
100
|
*
|
|
101
101
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
102
102
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
103
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
104
|
-
* Success response
|
|
103
|
+
* @returns {Promise<ConfigurationPlatformModel.DomainsResponse>} - Success response
|
|
105
104
|
* @name changeDomainType
|
|
106
|
-
* @summary:
|
|
105
|
+
* @summary: Change domain type.
|
|
107
106
|
* @description: Modify the type of a specific domain. Primary domain is used as the URL of your website. Short link domain is comparatively smaller and used while generating short links. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/changeDomainType/).
|
|
108
107
|
*/
|
|
109
108
|
async changeDomainType(
|
|
@@ -157,10 +156,10 @@ class Configuration {
|
|
|
157
156
|
|
|
158
157
|
const {
|
|
159
158
|
error: res_error,
|
|
160
|
-
} = ConfigurationPlatformModel.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
);
|
|
159
|
+
} = ConfigurationPlatformModel.DomainsResponse().validate(responseData, {
|
|
160
|
+
abortEarly: false,
|
|
161
|
+
allowUnknown: true,
|
|
162
|
+
});
|
|
164
163
|
|
|
165
164
|
if (res_error) {
|
|
166
165
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -177,25 +176,27 @@ class Configuration {
|
|
|
177
176
|
}
|
|
178
177
|
|
|
179
178
|
/**
|
|
180
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
179
|
+
* @param {ConfigurationPlatformApplicationValidator.CreateAppCurrencyConfigParam} arg
|
|
181
180
|
* - Arg object
|
|
182
181
|
*
|
|
183
182
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
184
183
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
185
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
184
|
+
* @returns {Promise<ConfigurationPlatformModel.AppSupportedCurrency>} -
|
|
186
185
|
* Success response
|
|
187
|
-
* @name
|
|
188
|
-
* @summary:
|
|
189
|
-
* @description:
|
|
186
|
+
* @name createAppCurrencyConfig
|
|
187
|
+
* @summary: Update application currency configuration.
|
|
188
|
+
* @description: Modify currency configuration settings for the application. Add and edit the currencies supported in the application. Initially, INR will be enabled by default. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createAppCurrencyConfig/).
|
|
190
189
|
*/
|
|
191
|
-
async
|
|
192
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
190
|
+
async createAppCurrencyConfig(
|
|
191
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
193
192
|
{ responseHeaders } = { responseHeaders: false }
|
|
194
193
|
) {
|
|
195
194
|
const {
|
|
196
195
|
error,
|
|
197
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
198
|
-
{
|
|
196
|
+
} = ConfigurationPlatformApplicationValidator.createAppCurrencyConfig().validate(
|
|
197
|
+
{
|
|
198
|
+
body,
|
|
199
|
+
},
|
|
199
200
|
{ abortEarly: false, allowUnknown: true }
|
|
200
201
|
);
|
|
201
202
|
if (error) {
|
|
@@ -205,14 +206,16 @@ class Configuration {
|
|
|
205
206
|
// Showing warrnings if extra unknown parameters are found
|
|
206
207
|
const {
|
|
207
208
|
error: warrning,
|
|
208
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
209
|
-
{
|
|
209
|
+
} = ConfigurationPlatformApplicationValidator.createAppCurrencyConfig().validate(
|
|
210
|
+
{
|
|
211
|
+
body,
|
|
212
|
+
},
|
|
210
213
|
{ abortEarly: false, allowUnknown: false }
|
|
211
214
|
);
|
|
212
215
|
if (warrning) {
|
|
213
216
|
Logger({
|
|
214
217
|
level: "WARN",
|
|
215
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
218
|
+
message: `Parameter Validation warrnings for platform > Configuration > createAppCurrencyConfig \n ${warrning}`,
|
|
216
219
|
});
|
|
217
220
|
}
|
|
218
221
|
|
|
@@ -220,10 +223,10 @@ class Configuration {
|
|
|
220
223
|
|
|
221
224
|
const response = await PlatformAPIClient.execute(
|
|
222
225
|
this.config,
|
|
223
|
-
"
|
|
224
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
226
|
+
"post",
|
|
227
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
225
228
|
query_params,
|
|
226
|
-
|
|
229
|
+
body,
|
|
227
230
|
requestHeaders,
|
|
228
231
|
{ responseHeaders }
|
|
229
232
|
);
|
|
@@ -235,7 +238,7 @@ class Configuration {
|
|
|
235
238
|
|
|
236
239
|
const {
|
|
237
240
|
error: res_error,
|
|
238
|
-
} = ConfigurationPlatformModel.
|
|
241
|
+
} = ConfigurationPlatformModel.AppSupportedCurrency().validate(
|
|
239
242
|
responseData,
|
|
240
243
|
{ abortEarly: false, allowUnknown: true }
|
|
241
244
|
);
|
|
@@ -246,7 +249,7 @@ class Configuration {
|
|
|
246
249
|
} else {
|
|
247
250
|
Logger({
|
|
248
251
|
level: "WARN",
|
|
249
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
252
|
+
message: `Response Validation Warnings for platform > Configuration > createAppCurrencyConfig \n ${res_error}`,
|
|
250
253
|
});
|
|
251
254
|
}
|
|
252
255
|
}
|
|
@@ -255,23 +258,23 @@ class Configuration {
|
|
|
255
258
|
}
|
|
256
259
|
|
|
257
260
|
/**
|
|
258
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
261
|
+
* @param {ConfigurationPlatformApplicationValidator.CreateTokensParam} arg
|
|
259
262
|
* - Arg object
|
|
260
263
|
*
|
|
261
264
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
262
265
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
263
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
264
|
-
* @name
|
|
265
|
-
* @summary:
|
|
266
|
-
* @description:
|
|
266
|
+
* @returns {Promise<ConfigurationPlatformModel.Application>} - Success response
|
|
267
|
+
* @name createTokens
|
|
268
|
+
* @summary: Create tokens for application
|
|
269
|
+
* @description: Create new tokens for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createTokens/).
|
|
267
270
|
*/
|
|
268
|
-
async
|
|
271
|
+
async createTokens(
|
|
269
272
|
{ requestHeaders } = { requestHeaders: {} },
|
|
270
273
|
{ responseHeaders } = { responseHeaders: false }
|
|
271
274
|
) {
|
|
272
275
|
const {
|
|
273
276
|
error,
|
|
274
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
277
|
+
} = ConfigurationPlatformApplicationValidator.createTokens().validate(
|
|
275
278
|
{},
|
|
276
279
|
{ abortEarly: false, allowUnknown: true }
|
|
277
280
|
);
|
|
@@ -282,14 +285,14 @@ class Configuration {
|
|
|
282
285
|
// Showing warrnings if extra unknown parameters are found
|
|
283
286
|
const {
|
|
284
287
|
error: warrning,
|
|
285
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
288
|
+
} = ConfigurationPlatformApplicationValidator.createTokens().validate(
|
|
286
289
|
{},
|
|
287
290
|
{ abortEarly: false, allowUnknown: false }
|
|
288
291
|
);
|
|
289
292
|
if (warrning) {
|
|
290
293
|
Logger({
|
|
291
294
|
level: "WARN",
|
|
292
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
295
|
+
message: `Parameter Validation warrnings for platform > Configuration > createTokens \n ${warrning}`,
|
|
293
296
|
});
|
|
294
297
|
}
|
|
295
298
|
|
|
@@ -297,8 +300,8 @@ class Configuration {
|
|
|
297
300
|
|
|
298
301
|
const response = await PlatformAPIClient.execute(
|
|
299
302
|
this.config,
|
|
300
|
-
"
|
|
301
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
303
|
+
"post",
|
|
304
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tokens`,
|
|
302
305
|
query_params,
|
|
303
306
|
undefined,
|
|
304
307
|
requestHeaders,
|
|
@@ -312,7 +315,7 @@ class Configuration {
|
|
|
312
315
|
|
|
313
316
|
const {
|
|
314
317
|
error: res_error,
|
|
315
|
-
} = ConfigurationPlatformModel.
|
|
318
|
+
} = ConfigurationPlatformModel.Application().validate(responseData, {
|
|
316
319
|
abortEarly: false,
|
|
317
320
|
allowUnknown: true,
|
|
318
321
|
});
|
|
@@ -323,7 +326,7 @@ class Configuration {
|
|
|
323
326
|
} else {
|
|
324
327
|
Logger({
|
|
325
328
|
level: "WARN",
|
|
326
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
329
|
+
message: `Response Validation Warnings for platform > Configuration > createTokens \n ${res_error}`,
|
|
327
330
|
});
|
|
328
331
|
}
|
|
329
332
|
}
|
|
@@ -332,28 +335,25 @@ class Configuration {
|
|
|
332
335
|
}
|
|
333
336
|
|
|
334
337
|
/**
|
|
335
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
338
|
+
* @param {ConfigurationPlatformApplicationValidator.CreateUrlRedirectionParam} arg
|
|
336
339
|
* - Arg object
|
|
337
340
|
*
|
|
338
341
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
339
342
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
340
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
341
|
-
*
|
|
342
|
-
* @
|
|
343
|
-
* @
|
|
344
|
-
* @description: Retrieve info of all the companies (e.g. name, uid, and company type) whose inventory is fetched into the current sales channel sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppCompanies/).
|
|
343
|
+
* @returns {Promise<ConfigurationPlatformModel.UrlRedirection>} - Success response
|
|
344
|
+
* @name createUrlRedirection
|
|
345
|
+
* @summary: Create a URL redirection
|
|
346
|
+
* @description: Creates a new URL redirection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createUrlRedirection/).
|
|
345
347
|
*/
|
|
346
|
-
async
|
|
347
|
-
{
|
|
348
|
+
async createUrlRedirection(
|
|
349
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
348
350
|
{ responseHeaders } = { responseHeaders: false }
|
|
349
351
|
) {
|
|
350
352
|
const {
|
|
351
353
|
error,
|
|
352
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
354
|
+
} = ConfigurationPlatformApplicationValidator.createUrlRedirection().validate(
|
|
353
355
|
{
|
|
354
|
-
|
|
355
|
-
pageNo,
|
|
356
|
-
pageSize,
|
|
356
|
+
body,
|
|
357
357
|
},
|
|
358
358
|
{ abortEarly: false, allowUnknown: true }
|
|
359
359
|
);
|
|
@@ -364,32 +364,27 @@ class Configuration {
|
|
|
364
364
|
// Showing warrnings if extra unknown parameters are found
|
|
365
365
|
const {
|
|
366
366
|
error: warrning,
|
|
367
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
367
|
+
} = ConfigurationPlatformApplicationValidator.createUrlRedirection().validate(
|
|
368
368
|
{
|
|
369
|
-
|
|
370
|
-
pageNo,
|
|
371
|
-
pageSize,
|
|
369
|
+
body,
|
|
372
370
|
},
|
|
373
371
|
{ abortEarly: false, allowUnknown: false }
|
|
374
372
|
);
|
|
375
373
|
if (warrning) {
|
|
376
374
|
Logger({
|
|
377
375
|
level: "WARN",
|
|
378
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
376
|
+
message: `Parameter Validation warrnings for platform > Configuration > createUrlRedirection \n ${warrning}`,
|
|
379
377
|
});
|
|
380
378
|
}
|
|
381
379
|
|
|
382
380
|
const query_params = {};
|
|
383
|
-
query_params["uid"] = uid;
|
|
384
|
-
query_params["page_no"] = pageNo;
|
|
385
|
-
query_params["page_size"] = pageSize;
|
|
386
381
|
|
|
387
382
|
const response = await PlatformAPIClient.execute(
|
|
388
383
|
this.config,
|
|
389
|
-
"
|
|
390
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
384
|
+
"post",
|
|
385
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/url-redirection`,
|
|
391
386
|
query_params,
|
|
392
|
-
|
|
387
|
+
body,
|
|
393
388
|
requestHeaders,
|
|
394
389
|
{ responseHeaders }
|
|
395
390
|
);
|
|
@@ -401,10 +396,10 @@ class Configuration {
|
|
|
401
396
|
|
|
402
397
|
const {
|
|
403
398
|
error: res_error,
|
|
404
|
-
} = ConfigurationPlatformModel.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
);
|
|
399
|
+
} = ConfigurationPlatformModel.UrlRedirection().validate(responseData, {
|
|
400
|
+
abortEarly: false,
|
|
401
|
+
allowUnknown: true,
|
|
402
|
+
});
|
|
408
403
|
|
|
409
404
|
if (res_error) {
|
|
410
405
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -412,7 +407,7 @@ class Configuration {
|
|
|
412
407
|
} else {
|
|
413
408
|
Logger({
|
|
414
409
|
level: "WARN",
|
|
415
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
410
|
+
message: `Response Validation Warnings for platform > Configuration > createUrlRedirection \n ${res_error}`,
|
|
416
411
|
});
|
|
417
412
|
}
|
|
418
413
|
}
|
|
@@ -421,25 +416,26 @@ class Configuration {
|
|
|
421
416
|
}
|
|
422
417
|
|
|
423
418
|
/**
|
|
424
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
419
|
+
* @param {ConfigurationPlatformApplicationValidator.DeleteTokenParam} arg
|
|
425
420
|
* - Arg object
|
|
426
421
|
*
|
|
427
422
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
428
423
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
429
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
430
|
-
*
|
|
431
|
-
* @
|
|
432
|
-
* @
|
|
433
|
-
* @description: Fetch data such as social links, copyright text, business highlights, address and contact information of the company/seller/brand operating the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppContactInfo/).
|
|
424
|
+
* @returns {Promise<ConfigurationPlatformModel.Application>} - Success response
|
|
425
|
+
* @name deleteToken
|
|
426
|
+
* @summary: Delete tokens for application
|
|
427
|
+
* @description: Delete new tokens for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/deleteToken/).
|
|
434
428
|
*/
|
|
435
|
-
async
|
|
436
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
429
|
+
async deleteToken(
|
|
430
|
+
{ token, requestHeaders } = { requestHeaders: {} },
|
|
437
431
|
{ responseHeaders } = { responseHeaders: false }
|
|
438
432
|
) {
|
|
439
433
|
const {
|
|
440
434
|
error,
|
|
441
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
442
|
-
{
|
|
435
|
+
} = ConfigurationPlatformApplicationValidator.deleteToken().validate(
|
|
436
|
+
{
|
|
437
|
+
token,
|
|
438
|
+
},
|
|
443
439
|
{ abortEarly: false, allowUnknown: true }
|
|
444
440
|
);
|
|
445
441
|
if (error) {
|
|
@@ -449,14 +445,16 @@ class Configuration {
|
|
|
449
445
|
// Showing warrnings if extra unknown parameters are found
|
|
450
446
|
const {
|
|
451
447
|
error: warrning,
|
|
452
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
453
|
-
{
|
|
448
|
+
} = ConfigurationPlatformApplicationValidator.deleteToken().validate(
|
|
449
|
+
{
|
|
450
|
+
token,
|
|
451
|
+
},
|
|
454
452
|
{ abortEarly: false, allowUnknown: false }
|
|
455
453
|
);
|
|
456
454
|
if (warrning) {
|
|
457
455
|
Logger({
|
|
458
456
|
level: "WARN",
|
|
459
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
457
|
+
message: `Parameter Validation warrnings for platform > Configuration > deleteToken \n ${warrning}`,
|
|
460
458
|
});
|
|
461
459
|
}
|
|
462
460
|
|
|
@@ -464,8 +462,8 @@ class Configuration {
|
|
|
464
462
|
|
|
465
463
|
const response = await PlatformAPIClient.execute(
|
|
466
464
|
this.config,
|
|
467
|
-
"
|
|
468
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
465
|
+
"delete",
|
|
466
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tokens/${token}`,
|
|
469
467
|
query_params,
|
|
470
468
|
undefined,
|
|
471
469
|
requestHeaders,
|
|
@@ -479,10 +477,10 @@ class Configuration {
|
|
|
479
477
|
|
|
480
478
|
const {
|
|
481
479
|
error: res_error,
|
|
482
|
-
} = ConfigurationPlatformModel.
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
);
|
|
480
|
+
} = ConfigurationPlatformModel.Application().validate(responseData, {
|
|
481
|
+
abortEarly: false,
|
|
482
|
+
allowUnknown: true,
|
|
483
|
+
});
|
|
486
484
|
|
|
487
485
|
if (res_error) {
|
|
488
486
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -490,7 +488,7 @@ class Configuration {
|
|
|
490
488
|
} else {
|
|
491
489
|
Logger({
|
|
492
490
|
level: "WARN",
|
|
493
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
491
|
+
message: `Response Validation Warnings for platform > Configuration > deleteToken \n ${res_error}`,
|
|
494
492
|
});
|
|
495
493
|
}
|
|
496
494
|
}
|
|
@@ -499,25 +497,25 @@ class Configuration {
|
|
|
499
497
|
}
|
|
500
498
|
|
|
501
499
|
/**
|
|
502
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
500
|
+
* @param {ConfigurationPlatformApplicationValidator.DeleteUrlRedirectionParam} arg
|
|
503
501
|
* - Arg object
|
|
504
502
|
*
|
|
505
503
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
506
504
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
507
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
505
|
+
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
508
506
|
* Success response
|
|
509
|
-
* @name
|
|
510
|
-
* @summary:
|
|
511
|
-
* @description:
|
|
507
|
+
* @name deleteUrlRedirection
|
|
508
|
+
* @summary: Delete a URL redirection
|
|
509
|
+
* @description: Delete a URL redirection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/deleteUrlRedirection/).
|
|
512
510
|
*/
|
|
513
|
-
async
|
|
514
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
511
|
+
async deleteUrlRedirection(
|
|
512
|
+
{ redirectionDomainId, requestHeaders } = { requestHeaders: {} },
|
|
515
513
|
{ responseHeaders } = { responseHeaders: false }
|
|
516
514
|
) {
|
|
517
515
|
const {
|
|
518
516
|
error,
|
|
519
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
520
|
-
{},
|
|
517
|
+
} = ConfigurationPlatformApplicationValidator.deleteUrlRedirection().validate(
|
|
518
|
+
{ redirectionDomainId },
|
|
521
519
|
{ abortEarly: false, allowUnknown: true }
|
|
522
520
|
);
|
|
523
521
|
if (error) {
|
|
@@ -527,14 +525,14 @@ class Configuration {
|
|
|
527
525
|
// Showing warrnings if extra unknown parameters are found
|
|
528
526
|
const {
|
|
529
527
|
error: warrning,
|
|
530
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
531
|
-
{},
|
|
528
|
+
} = ConfigurationPlatformApplicationValidator.deleteUrlRedirection().validate(
|
|
529
|
+
{ redirectionDomainId },
|
|
532
530
|
{ abortEarly: false, allowUnknown: false }
|
|
533
531
|
);
|
|
534
532
|
if (warrning) {
|
|
535
533
|
Logger({
|
|
536
534
|
level: "WARN",
|
|
537
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
535
|
+
message: `Parameter Validation warrnings for platform > Configuration > deleteUrlRedirection \n ${warrning}`,
|
|
538
536
|
});
|
|
539
537
|
}
|
|
540
538
|
|
|
@@ -542,8 +540,8 @@ class Configuration {
|
|
|
542
540
|
|
|
543
541
|
const response = await PlatformAPIClient.execute(
|
|
544
542
|
this.config,
|
|
545
|
-
"
|
|
546
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
543
|
+
"delete",
|
|
544
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/url-redirection/${redirectionDomainId}`,
|
|
547
545
|
query_params,
|
|
548
546
|
undefined,
|
|
549
547
|
requestHeaders,
|
|
@@ -557,7 +555,7 @@ class Configuration {
|
|
|
557
555
|
|
|
558
556
|
const {
|
|
559
557
|
error: res_error,
|
|
560
|
-
} = ConfigurationPlatformModel.
|
|
558
|
+
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
561
559
|
responseData,
|
|
562
560
|
{ abortEarly: false, allowUnknown: true }
|
|
563
561
|
);
|
|
@@ -568,7 +566,7 @@ class Configuration {
|
|
|
568
566
|
} else {
|
|
569
567
|
Logger({
|
|
570
568
|
level: "WARN",
|
|
571
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
569
|
+
message: `Response Validation Warnings for platform > Configuration > deleteUrlRedirection \n ${res_error}`,
|
|
572
570
|
});
|
|
573
571
|
}
|
|
574
572
|
}
|
|
@@ -577,25 +575,23 @@ class Configuration {
|
|
|
577
575
|
}
|
|
578
576
|
|
|
579
577
|
/**
|
|
580
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
578
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppApiTokensParam} arg
|
|
581
579
|
* - Arg object
|
|
582
580
|
*
|
|
583
581
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
584
582
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
585
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
* @
|
|
589
|
-
* @summary: Get sales channel
|
|
590
|
-
* @description: Shows feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppFeatures/).
|
|
583
|
+
* @returns {Promise<ConfigurationPlatformModel.TokenResponse>} - Success response
|
|
584
|
+
* @name getAppApiTokens
|
|
585
|
+
* @summary: Get application API tokens.
|
|
586
|
+
* @description: Retrieve the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google, and Facebook auth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppApiTokens/).
|
|
591
587
|
*/
|
|
592
|
-
async
|
|
588
|
+
async getAppApiTokens(
|
|
593
589
|
{ requestHeaders } = { requestHeaders: {} },
|
|
594
590
|
{ responseHeaders } = { responseHeaders: false }
|
|
595
591
|
) {
|
|
596
592
|
const {
|
|
597
593
|
error,
|
|
598
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
594
|
+
} = ConfigurationPlatformApplicationValidator.getAppApiTokens().validate(
|
|
599
595
|
{},
|
|
600
596
|
{ abortEarly: false, allowUnknown: true }
|
|
601
597
|
);
|
|
@@ -606,14 +602,14 @@ class Configuration {
|
|
|
606
602
|
// Showing warrnings if extra unknown parameters are found
|
|
607
603
|
const {
|
|
608
604
|
error: warrning,
|
|
609
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
605
|
+
} = ConfigurationPlatformApplicationValidator.getAppApiTokens().validate(
|
|
610
606
|
{},
|
|
611
607
|
{ abortEarly: false, allowUnknown: false }
|
|
612
608
|
);
|
|
613
609
|
if (warrning) {
|
|
614
610
|
Logger({
|
|
615
611
|
level: "WARN",
|
|
616
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
612
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppApiTokens \n ${warrning}`,
|
|
617
613
|
});
|
|
618
614
|
}
|
|
619
615
|
|
|
@@ -622,7 +618,7 @@ class Configuration {
|
|
|
622
618
|
const response = await PlatformAPIClient.execute(
|
|
623
619
|
this.config,
|
|
624
620
|
"get",
|
|
625
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
621
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
|
|
626
622
|
query_params,
|
|
627
623
|
undefined,
|
|
628
624
|
requestHeaders,
|
|
@@ -636,10 +632,10 @@ class Configuration {
|
|
|
636
632
|
|
|
637
633
|
const {
|
|
638
634
|
error: res_error,
|
|
639
|
-
} = ConfigurationPlatformModel.
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
);
|
|
635
|
+
} = ConfigurationPlatformModel.TokenResponse().validate(responseData, {
|
|
636
|
+
abortEarly: false,
|
|
637
|
+
allowUnknown: true,
|
|
638
|
+
});
|
|
643
639
|
|
|
644
640
|
if (res_error) {
|
|
645
641
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -647,7 +643,7 @@ class Configuration {
|
|
|
647
643
|
} else {
|
|
648
644
|
Logger({
|
|
649
645
|
level: "WARN",
|
|
650
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
646
|
+
message: `Response Validation Warnings for platform > Configuration > getAppApiTokens \n ${res_error}`,
|
|
651
647
|
});
|
|
652
648
|
}
|
|
653
649
|
}
|
|
@@ -656,28 +652,24 @@ class Configuration {
|
|
|
656
652
|
}
|
|
657
653
|
|
|
658
654
|
/**
|
|
659
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
655
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppBasicDetailsParam} arg
|
|
660
656
|
* - Arg object
|
|
661
657
|
*
|
|
662
658
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
663
659
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
664
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
665
|
-
*
|
|
666
|
-
* @
|
|
667
|
-
* @
|
|
668
|
-
* @description: Retrieve information of all the companies (e.g. uid, name, display name, store type, store code and company id) whose inventory is fetched into the current sales channel sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppStores/).
|
|
660
|
+
* @returns {Promise<ConfigurationPlatformModel.ApplicationDetail>} - Success response
|
|
661
|
+
* @name getAppBasicDetails
|
|
662
|
+
* @summary: Get application basic details.
|
|
663
|
+
* @description: Shows basic sales channel details like name, description, logo, domain, company ID, and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppBasicDetails/).
|
|
669
664
|
*/
|
|
670
|
-
async
|
|
671
|
-
{
|
|
665
|
+
async getAppBasicDetails(
|
|
666
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
672
667
|
{ responseHeaders } = { responseHeaders: false }
|
|
673
668
|
) {
|
|
674
669
|
const {
|
|
675
670
|
error,
|
|
676
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
677
|
-
{
|
|
678
|
-
pageNo,
|
|
679
|
-
pageSize,
|
|
680
|
-
},
|
|
671
|
+
} = ConfigurationPlatformApplicationValidator.getAppBasicDetails().validate(
|
|
672
|
+
{},
|
|
681
673
|
{ abortEarly: false, allowUnknown: true }
|
|
682
674
|
);
|
|
683
675
|
if (error) {
|
|
@@ -687,28 +679,23 @@ class Configuration {
|
|
|
687
679
|
// Showing warrnings if extra unknown parameters are found
|
|
688
680
|
const {
|
|
689
681
|
error: warrning,
|
|
690
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
691
|
-
{
|
|
692
|
-
pageNo,
|
|
693
|
-
pageSize,
|
|
694
|
-
},
|
|
682
|
+
} = ConfigurationPlatformApplicationValidator.getAppBasicDetails().validate(
|
|
683
|
+
{},
|
|
695
684
|
{ abortEarly: false, allowUnknown: false }
|
|
696
685
|
);
|
|
697
686
|
if (warrning) {
|
|
698
687
|
Logger({
|
|
699
688
|
level: "WARN",
|
|
700
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
689
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppBasicDetails \n ${warrning}`,
|
|
701
690
|
});
|
|
702
691
|
}
|
|
703
692
|
|
|
704
693
|
const query_params = {};
|
|
705
|
-
query_params["page_no"] = pageNo;
|
|
706
|
-
query_params["page_size"] = pageSize;
|
|
707
694
|
|
|
708
695
|
const response = await PlatformAPIClient.execute(
|
|
709
696
|
this.config,
|
|
710
697
|
"get",
|
|
711
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
698
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
|
|
712
699
|
query_params,
|
|
713
700
|
undefined,
|
|
714
701
|
requestHeaders,
|
|
@@ -722,10 +709,10 @@ class Configuration {
|
|
|
722
709
|
|
|
723
710
|
const {
|
|
724
711
|
error: res_error,
|
|
725
|
-
} = ConfigurationPlatformModel.
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
);
|
|
712
|
+
} = ConfigurationPlatformModel.ApplicationDetail().validate(responseData, {
|
|
713
|
+
abortEarly: false,
|
|
714
|
+
allowUnknown: true,
|
|
715
|
+
});
|
|
729
716
|
|
|
730
717
|
if (res_error) {
|
|
731
718
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -733,7 +720,7 @@ class Configuration {
|
|
|
733
720
|
} else {
|
|
734
721
|
Logger({
|
|
735
722
|
level: "WARN",
|
|
736
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
723
|
+
message: `Response Validation Warnings for platform > Configuration > getAppBasicDetails \n ${res_error}`,
|
|
737
724
|
});
|
|
738
725
|
}
|
|
739
726
|
}
|
|
@@ -742,26 +729,28 @@ class Configuration {
|
|
|
742
729
|
}
|
|
743
730
|
|
|
744
731
|
/**
|
|
745
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
732
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppCompaniesParam} arg
|
|
746
733
|
* - Arg object
|
|
747
734
|
*
|
|
748
735
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
749
736
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
750
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* @name
|
|
754
|
-
* @summary: List supported currencies
|
|
755
|
-
* @description: Retrieve a list of supported currencies for the sales channel. A list of currencies allowed in the current sales channel. Moreover, get the name, code, symbol, and the decimal digits of the currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppSupportedCurrency/).
|
|
737
|
+
* @returns {Promise<ConfigurationPlatformModel.CompaniesResponse>} - Success response
|
|
738
|
+
* @name getAppCompanies
|
|
739
|
+
* @summary: Get application companies.
|
|
740
|
+
* @description: Retrieve info of all the companies (e.g. name, uid, and company type) whose inventory is fetched into the current sales channel application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppCompanies/).
|
|
756
741
|
*/
|
|
757
|
-
async
|
|
758
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
742
|
+
async getAppCompanies(
|
|
743
|
+
{ uid, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
759
744
|
{ responseHeaders } = { responseHeaders: false }
|
|
760
745
|
) {
|
|
761
746
|
const {
|
|
762
747
|
error,
|
|
763
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
764
|
-
{
|
|
748
|
+
} = ConfigurationPlatformApplicationValidator.getAppCompanies().validate(
|
|
749
|
+
{
|
|
750
|
+
uid,
|
|
751
|
+
pageNo,
|
|
752
|
+
pageSize,
|
|
753
|
+
},
|
|
765
754
|
{ abortEarly: false, allowUnknown: true }
|
|
766
755
|
);
|
|
767
756
|
if (error) {
|
|
@@ -771,23 +760,30 @@ class Configuration {
|
|
|
771
760
|
// Showing warrnings if extra unknown parameters are found
|
|
772
761
|
const {
|
|
773
762
|
error: warrning,
|
|
774
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
775
|
-
{
|
|
763
|
+
} = ConfigurationPlatformApplicationValidator.getAppCompanies().validate(
|
|
764
|
+
{
|
|
765
|
+
uid,
|
|
766
|
+
pageNo,
|
|
767
|
+
pageSize,
|
|
768
|
+
},
|
|
776
769
|
{ abortEarly: false, allowUnknown: false }
|
|
777
770
|
);
|
|
778
771
|
if (warrning) {
|
|
779
772
|
Logger({
|
|
780
773
|
level: "WARN",
|
|
781
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
774
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppCompanies \n ${warrning}`,
|
|
782
775
|
});
|
|
783
776
|
}
|
|
784
777
|
|
|
785
778
|
const query_params = {};
|
|
779
|
+
query_params["uid"] = uid;
|
|
780
|
+
query_params["page_no"] = pageNo;
|
|
781
|
+
query_params["page_size"] = pageSize;
|
|
786
782
|
|
|
787
783
|
const response = await PlatformAPIClient.execute(
|
|
788
784
|
this.config,
|
|
789
785
|
"get",
|
|
790
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
786
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/companies`,
|
|
791
787
|
query_params,
|
|
792
788
|
undefined,
|
|
793
789
|
requestHeaders,
|
|
@@ -801,10 +797,10 @@ class Configuration {
|
|
|
801
797
|
|
|
802
798
|
const {
|
|
803
799
|
error: res_error,
|
|
804
|
-
} = ConfigurationPlatformModel.
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
);
|
|
800
|
+
} = ConfigurationPlatformModel.CompaniesResponse().validate(responseData, {
|
|
801
|
+
abortEarly: false,
|
|
802
|
+
allowUnknown: true,
|
|
803
|
+
});
|
|
808
804
|
|
|
809
805
|
if (res_error) {
|
|
810
806
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -812,7 +808,7 @@ class Configuration {
|
|
|
812
808
|
} else {
|
|
813
809
|
Logger({
|
|
814
810
|
level: "WARN",
|
|
815
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
811
|
+
message: `Response Validation Warnings for platform > Configuration > getAppCompanies \n ${res_error}`,
|
|
816
812
|
});
|
|
817
813
|
}
|
|
818
814
|
}
|
|
@@ -821,23 +817,60 @@ class Configuration {
|
|
|
821
817
|
}
|
|
822
818
|
|
|
823
819
|
/**
|
|
824
|
-
* @param {
|
|
820
|
+
* @param {Object} arg - Arg object.
|
|
821
|
+
* @param {number} arg.companyId - Numeric ID allotted to a business account
|
|
822
|
+
* on Fynd Platform
|
|
823
|
+
* @param {string} arg.applicationId - Alphanumeric ID allotted to an
|
|
824
|
+
* application (sales channel website) created within a business account
|
|
825
|
+
* @param {number} [arg.uid] - UID of companies to be fetched
|
|
826
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
827
|
+
* page. Default value is 10.
|
|
828
|
+
* @returns {Paginator<ConfigurationPlatformModel.CompaniesResponse>}
|
|
829
|
+
* @summary: Get application companies.
|
|
830
|
+
* @description: Retrieve info of all the companies (e.g. name, uid, and company type) whose inventory is fetched into the current sales channel application
|
|
831
|
+
*/
|
|
832
|
+
getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize } = {}) {
|
|
833
|
+
const paginator = new Paginator();
|
|
834
|
+
const callback = async () => {
|
|
835
|
+
const pageId = paginator.nextId;
|
|
836
|
+
const pageNo = paginator.pageNo;
|
|
837
|
+
const pageType = "number";
|
|
838
|
+
const data = await this.getAppCompanies({
|
|
839
|
+
companyId: companyId,
|
|
840
|
+
applicationId: applicationId,
|
|
841
|
+
uid: uid,
|
|
842
|
+
pageNo: pageNo,
|
|
843
|
+
pageSize: pageSize,
|
|
844
|
+
});
|
|
845
|
+
paginator.setPaginator({
|
|
846
|
+
hasNext: data.page.has_next ? true : false,
|
|
847
|
+
nextId: data.page.next_id,
|
|
848
|
+
});
|
|
849
|
+
return data;
|
|
850
|
+
};
|
|
851
|
+
paginator.setCallback(callback.bind(this));
|
|
852
|
+
return paginator;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppContactInfoParam} arg
|
|
825
857
|
* - Arg object
|
|
826
858
|
*
|
|
827
859
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
828
860
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
829
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
830
|
-
*
|
|
831
|
-
* @
|
|
832
|
-
* @
|
|
861
|
+
* @returns {Promise<ConfigurationPlatformModel.ApplicationInformation>} -
|
|
862
|
+
* Success response
|
|
863
|
+
* @name getAppContactInfo
|
|
864
|
+
* @summary: Get application contact information.
|
|
865
|
+
* @description: Fetch data such as social links, copyright text, business highlights, address and contact information of the company/seller/brand operating the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppContactInfo/).
|
|
833
866
|
*/
|
|
834
|
-
async
|
|
867
|
+
async getAppContactInfo(
|
|
835
868
|
{ requestHeaders } = { requestHeaders: {} },
|
|
836
869
|
{ responseHeaders } = { responseHeaders: false }
|
|
837
870
|
) {
|
|
838
871
|
const {
|
|
839
872
|
error,
|
|
840
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
873
|
+
} = ConfigurationPlatformApplicationValidator.getAppContactInfo().validate(
|
|
841
874
|
{},
|
|
842
875
|
{ abortEarly: false, allowUnknown: true }
|
|
843
876
|
);
|
|
@@ -848,14 +881,14 @@ class Configuration {
|
|
|
848
881
|
// Showing warrnings if extra unknown parameters are found
|
|
849
882
|
const {
|
|
850
883
|
error: warrning,
|
|
851
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
884
|
+
} = ConfigurationPlatformApplicationValidator.getAppContactInfo().validate(
|
|
852
885
|
{},
|
|
853
886
|
{ abortEarly: false, allowUnknown: false }
|
|
854
887
|
);
|
|
855
888
|
if (warrning) {
|
|
856
889
|
Logger({
|
|
857
890
|
level: "WARN",
|
|
858
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
891
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppContactInfo \n ${warrning}`,
|
|
859
892
|
});
|
|
860
893
|
}
|
|
861
894
|
|
|
@@ -864,7 +897,7 @@ class Configuration {
|
|
|
864
897
|
const response = await PlatformAPIClient.execute(
|
|
865
898
|
this.config,
|
|
866
899
|
"get",
|
|
867
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
900
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
|
|
868
901
|
query_params,
|
|
869
902
|
undefined,
|
|
870
903
|
requestHeaders,
|
|
@@ -878,10 +911,10 @@ class Configuration {
|
|
|
878
911
|
|
|
879
912
|
const {
|
|
880
913
|
error: res_error,
|
|
881
|
-
} = ConfigurationPlatformModel.
|
|
882
|
-
|
|
883
|
-
allowUnknown: true
|
|
884
|
-
|
|
914
|
+
} = ConfigurationPlatformModel.ApplicationInformation().validate(
|
|
915
|
+
responseData,
|
|
916
|
+
{ abortEarly: false, allowUnknown: true }
|
|
917
|
+
);
|
|
885
918
|
|
|
886
919
|
if (res_error) {
|
|
887
920
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -889,7 +922,7 @@ class Configuration {
|
|
|
889
922
|
} else {
|
|
890
923
|
Logger({
|
|
891
924
|
level: "WARN",
|
|
892
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
925
|
+
message: `Response Validation Warnings for platform > Configuration > getAppContactInfo \n ${res_error}`,
|
|
893
926
|
});
|
|
894
927
|
}
|
|
895
928
|
}
|
|
@@ -898,27 +931,25 @@ class Configuration {
|
|
|
898
931
|
}
|
|
899
932
|
|
|
900
933
|
/**
|
|
901
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
934
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppCurrencyConfigParam} arg
|
|
902
935
|
* - Arg object
|
|
903
936
|
*
|
|
904
937
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
905
938
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
906
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
939
|
+
* @returns {Promise<ConfigurationPlatformModel.AppSupportedCurrency>} -
|
|
907
940
|
* Success response
|
|
908
|
-
* @name
|
|
909
|
-
* @summary: Get
|
|
910
|
-
* @description: Retrieve
|
|
941
|
+
* @name getAppCurrencyConfig
|
|
942
|
+
* @summary: Get application currency configuration.
|
|
943
|
+
* @description: Retrieve a list of currencies supported in the current sales channel. Moreover, get the cuurency that is set as the default one in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppCurrencyConfig/).
|
|
911
944
|
*/
|
|
912
|
-
async
|
|
913
|
-
{
|
|
945
|
+
async getAppCurrencyConfig(
|
|
946
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
914
947
|
{ responseHeaders } = { responseHeaders: false }
|
|
915
948
|
) {
|
|
916
949
|
const {
|
|
917
950
|
error,
|
|
918
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
919
|
-
{
|
|
920
|
-
platformType,
|
|
921
|
-
},
|
|
951
|
+
} = ConfigurationPlatformApplicationValidator.getAppCurrencyConfig().validate(
|
|
952
|
+
{},
|
|
922
953
|
{ abortEarly: false, allowUnknown: true }
|
|
923
954
|
);
|
|
924
955
|
if (error) {
|
|
@@ -928,16 +959,14 @@ class Configuration {
|
|
|
928
959
|
// Showing warrnings if extra unknown parameters are found
|
|
929
960
|
const {
|
|
930
961
|
error: warrning,
|
|
931
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
932
|
-
{
|
|
933
|
-
platformType,
|
|
934
|
-
},
|
|
962
|
+
} = ConfigurationPlatformApplicationValidator.getAppCurrencyConfig().validate(
|
|
963
|
+
{},
|
|
935
964
|
{ abortEarly: false, allowUnknown: false }
|
|
936
965
|
);
|
|
937
966
|
if (warrning) {
|
|
938
967
|
Logger({
|
|
939
968
|
level: "WARN",
|
|
940
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
969
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppCurrencyConfig \n ${warrning}`,
|
|
941
970
|
});
|
|
942
971
|
}
|
|
943
972
|
|
|
@@ -946,7 +975,7 @@ class Configuration {
|
|
|
946
975
|
const response = await PlatformAPIClient.execute(
|
|
947
976
|
this.config,
|
|
948
977
|
"get",
|
|
949
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
978
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
950
979
|
query_params,
|
|
951
980
|
undefined,
|
|
952
981
|
requestHeaders,
|
|
@@ -960,7 +989,7 @@ class Configuration {
|
|
|
960
989
|
|
|
961
990
|
const {
|
|
962
991
|
error: res_error,
|
|
963
|
-
} = ConfigurationPlatformModel.
|
|
992
|
+
} = ConfigurationPlatformModel.AppSupportedCurrency().validate(
|
|
964
993
|
responseData,
|
|
965
994
|
{ abortEarly: false, allowUnknown: true }
|
|
966
995
|
);
|
|
@@ -971,7 +1000,7 @@ class Configuration {
|
|
|
971
1000
|
} else {
|
|
972
1001
|
Logger({
|
|
973
1002
|
level: "WARN",
|
|
974
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
1003
|
+
message: `Response Validation Warnings for platform > Configuration > getAppCurrencyConfig \n ${res_error}`,
|
|
975
1004
|
});
|
|
976
1005
|
}
|
|
977
1006
|
}
|
|
@@ -980,27 +1009,104 @@ class Configuration {
|
|
|
980
1009
|
}
|
|
981
1010
|
|
|
982
1011
|
/**
|
|
983
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
1012
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppFeaturesParam} arg
|
|
984
1013
|
* - Arg object
|
|
985
1014
|
*
|
|
986
1015
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
987
1016
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
988
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
989
|
-
*
|
|
1017
|
+
* @returns {Promise<ConfigurationPlatformModel.AppFeatureResponse>} -
|
|
1018
|
+
* Success response
|
|
1019
|
+
* @name getAppFeatures
|
|
1020
|
+
* @summary: Get application features.
|
|
1021
|
+
* @description: Shows feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppFeatures/).
|
|
1022
|
+
*/
|
|
1023
|
+
async getAppFeatures(
|
|
1024
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1025
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1026
|
+
) {
|
|
1027
|
+
const {
|
|
1028
|
+
error,
|
|
1029
|
+
} = ConfigurationPlatformApplicationValidator.getAppFeatures().validate(
|
|
1030
|
+
{},
|
|
1031
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1032
|
+
);
|
|
1033
|
+
if (error) {
|
|
1034
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1038
|
+
const {
|
|
1039
|
+
error: warrning,
|
|
1040
|
+
} = ConfigurationPlatformApplicationValidator.getAppFeatures().validate(
|
|
1041
|
+
{},
|
|
1042
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1043
|
+
);
|
|
1044
|
+
if (warrning) {
|
|
1045
|
+
Logger({
|
|
1046
|
+
level: "WARN",
|
|
1047
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppFeatures \n ${warrning}`,
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
const query_params = {};
|
|
1052
|
+
|
|
1053
|
+
const response = await PlatformAPIClient.execute(
|
|
1054
|
+
this.config,
|
|
1055
|
+
"get",
|
|
1056
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
|
|
1057
|
+
query_params,
|
|
1058
|
+
undefined,
|
|
1059
|
+
requestHeaders,
|
|
1060
|
+
{ responseHeaders }
|
|
1061
|
+
);
|
|
1062
|
+
|
|
1063
|
+
let responseData = response;
|
|
1064
|
+
if (responseHeaders) {
|
|
1065
|
+
responseData = response[0];
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
const {
|
|
1069
|
+
error: res_error,
|
|
1070
|
+
} = ConfigurationPlatformModel.AppFeatureResponse().validate(responseData, {
|
|
1071
|
+
abortEarly: false,
|
|
1072
|
+
allowUnknown: true,
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
if (res_error) {
|
|
1076
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1077
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1078
|
+
} else {
|
|
1079
|
+
Logger({
|
|
1080
|
+
level: "WARN",
|
|
1081
|
+
message: `Response Validation Warnings for platform > Configuration > getAppFeatures \n ${res_error}`,
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
return response;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppStoresParam} arg
|
|
1091
|
+
* - Arg object
|
|
990
1092
|
*
|
|
991
|
-
* @
|
|
992
|
-
* @
|
|
993
|
-
* @
|
|
1093
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1094
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1095
|
+
* @returns {Promise<ConfigurationPlatformModel.StoresResponse>} - Success response
|
|
1096
|
+
* @name getAppStores
|
|
1097
|
+
* @summary: Get application stores.
|
|
1098
|
+
* @description: Retrieve information of all the companies (e.g. uid, name, display name, store type, store code and company id) whose inventory is fetched into the current sales channel application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppStores/).
|
|
994
1099
|
*/
|
|
995
|
-
async
|
|
996
|
-
{
|
|
1100
|
+
async getAppStores(
|
|
1101
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
997
1102
|
{ responseHeaders } = { responseHeaders: false }
|
|
998
1103
|
) {
|
|
999
1104
|
const {
|
|
1000
1105
|
error,
|
|
1001
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1106
|
+
} = ConfigurationPlatformApplicationValidator.getAppStores().validate(
|
|
1002
1107
|
{
|
|
1003
|
-
|
|
1108
|
+
pageNo,
|
|
1109
|
+
pageSize,
|
|
1004
1110
|
},
|
|
1005
1111
|
{ abortEarly: false, allowUnknown: true }
|
|
1006
1112
|
);
|
|
@@ -1011,27 +1117,30 @@ class Configuration {
|
|
|
1011
1117
|
// Showing warrnings if extra unknown parameters are found
|
|
1012
1118
|
const {
|
|
1013
1119
|
error: warrning,
|
|
1014
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1120
|
+
} = ConfigurationPlatformApplicationValidator.getAppStores().validate(
|
|
1015
1121
|
{
|
|
1016
|
-
|
|
1122
|
+
pageNo,
|
|
1123
|
+
pageSize,
|
|
1017
1124
|
},
|
|
1018
1125
|
{ abortEarly: false, allowUnknown: false }
|
|
1019
1126
|
);
|
|
1020
1127
|
if (warrning) {
|
|
1021
1128
|
Logger({
|
|
1022
1129
|
level: "WARN",
|
|
1023
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
1130
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppStores \n ${warrning}`,
|
|
1024
1131
|
});
|
|
1025
1132
|
}
|
|
1026
1133
|
|
|
1027
1134
|
const query_params = {};
|
|
1135
|
+
query_params["page_no"] = pageNo;
|
|
1136
|
+
query_params["page_size"] = pageSize;
|
|
1028
1137
|
|
|
1029
1138
|
const response = await PlatformAPIClient.execute(
|
|
1030
1139
|
this.config,
|
|
1031
|
-
"
|
|
1032
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1140
|
+
"get",
|
|
1141
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/stores`,
|
|
1033
1142
|
query_params,
|
|
1034
|
-
|
|
1143
|
+
undefined,
|
|
1035
1144
|
requestHeaders,
|
|
1036
1145
|
{ responseHeaders }
|
|
1037
1146
|
);
|
|
@@ -1043,10 +1152,10 @@ class Configuration {
|
|
|
1043
1152
|
|
|
1044
1153
|
const {
|
|
1045
1154
|
error: res_error,
|
|
1046
|
-
} = ConfigurationPlatformModel.
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
);
|
|
1155
|
+
} = ConfigurationPlatformModel.StoresResponse().validate(responseData, {
|
|
1156
|
+
abortEarly: false,
|
|
1157
|
+
allowUnknown: true,
|
|
1158
|
+
});
|
|
1050
1159
|
|
|
1051
1160
|
if (res_error) {
|
|
1052
1161
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1054,7 +1163,7 @@ class Configuration {
|
|
|
1054
1163
|
} else {
|
|
1055
1164
|
Logger({
|
|
1056
1165
|
level: "WARN",
|
|
1057
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
1166
|
+
message: `Response Validation Warnings for platform > Configuration > getAppStores \n ${res_error}`,
|
|
1058
1167
|
});
|
|
1059
1168
|
}
|
|
1060
1169
|
}
|
|
@@ -1063,22 +1172,58 @@ class Configuration {
|
|
|
1063
1172
|
}
|
|
1064
1173
|
|
|
1065
1174
|
/**
|
|
1066
|
-
* @param {
|
|
1175
|
+
* @param {Object} arg - Arg object.
|
|
1176
|
+
* @param {number} arg.companyId - Numeric ID allotted to a business account
|
|
1177
|
+
* on Fynd Platform
|
|
1178
|
+
* @param {string} arg.applicationId - Alphanumeric ID allotted to an
|
|
1179
|
+
* application (sales channel website) created within a business account
|
|
1180
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
1181
|
+
* page. Default value is 10.
|
|
1182
|
+
* @returns {Paginator<ConfigurationPlatformModel.StoresResponse>}
|
|
1183
|
+
* @summary: Get application stores.
|
|
1184
|
+
* @description: Retrieve information of all the companies (e.g. uid, name, display name, store type, store code and company id) whose inventory is fetched into the current sales channel application
|
|
1185
|
+
*/
|
|
1186
|
+
getAppStoresPaginator({ companyId, applicationId, pageSize } = {}) {
|
|
1187
|
+
const paginator = new Paginator();
|
|
1188
|
+
const callback = async () => {
|
|
1189
|
+
const pageId = paginator.nextId;
|
|
1190
|
+
const pageNo = paginator.pageNo;
|
|
1191
|
+
const pageType = "number";
|
|
1192
|
+
const data = await this.getAppStores({
|
|
1193
|
+
companyId: companyId,
|
|
1194
|
+
applicationId: applicationId,
|
|
1195
|
+
pageNo: pageNo,
|
|
1196
|
+
pageSize: pageSize,
|
|
1197
|
+
});
|
|
1198
|
+
paginator.setPaginator({
|
|
1199
|
+
hasNext: data.page.has_next ? true : false,
|
|
1200
|
+
nextId: data.page.next_id,
|
|
1201
|
+
});
|
|
1202
|
+
return data;
|
|
1203
|
+
};
|
|
1204
|
+
paginator.setCallback(callback.bind(this));
|
|
1205
|
+
return paginator;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* @param {ConfigurationPlatformApplicationValidator.GetAppSupportedCurrencyParam} arg
|
|
1210
|
+
* - Arg object
|
|
1211
|
+
*
|
|
1067
1212
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1068
1213
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1069
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1214
|
+
* @returns {Promise<ConfigurationPlatformModel.AppCurrencyResponse>} -
|
|
1070
1215
|
* Success response
|
|
1071
|
-
* @name
|
|
1072
|
-
* @summary:
|
|
1073
|
-
* @description: Retrieve a list of
|
|
1216
|
+
* @name getAppSupportedCurrency
|
|
1217
|
+
* @summary: Get supported currencies.
|
|
1218
|
+
* @description: Retrieve a list of supported currencies for the application. A list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppSupportedCurrency/).
|
|
1074
1219
|
*/
|
|
1075
|
-
async
|
|
1220
|
+
async getAppSupportedCurrency(
|
|
1076
1221
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1077
1222
|
{ responseHeaders } = { responseHeaders: false }
|
|
1078
1223
|
) {
|
|
1079
1224
|
const {
|
|
1080
1225
|
error,
|
|
1081
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1226
|
+
} = ConfigurationPlatformApplicationValidator.getAppSupportedCurrency().validate(
|
|
1082
1227
|
{},
|
|
1083
1228
|
{ abortEarly: false, allowUnknown: true }
|
|
1084
1229
|
);
|
|
@@ -1089,14 +1234,14 @@ class Configuration {
|
|
|
1089
1234
|
// Showing warrnings if extra unknown parameters are found
|
|
1090
1235
|
const {
|
|
1091
1236
|
error: warrning,
|
|
1092
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1237
|
+
} = ConfigurationPlatformApplicationValidator.getAppSupportedCurrency().validate(
|
|
1093
1238
|
{},
|
|
1094
1239
|
{ abortEarly: false, allowUnknown: false }
|
|
1095
1240
|
);
|
|
1096
1241
|
if (warrning) {
|
|
1097
1242
|
Logger({
|
|
1098
1243
|
level: "WARN",
|
|
1099
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
1244
|
+
message: `Parameter Validation warrnings for platform > Configuration > getAppSupportedCurrency \n ${warrning}`,
|
|
1100
1245
|
});
|
|
1101
1246
|
}
|
|
1102
1247
|
|
|
@@ -1105,7 +1250,7 @@ class Configuration {
|
|
|
1105
1250
|
const response = await PlatformAPIClient.execute(
|
|
1106
1251
|
this.config,
|
|
1107
1252
|
"get",
|
|
1108
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1253
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency/supported`,
|
|
1109
1254
|
query_params,
|
|
1110
1255
|
undefined,
|
|
1111
1256
|
requestHeaders,
|
|
@@ -1119,7 +1264,7 @@ class Configuration {
|
|
|
1119
1264
|
|
|
1120
1265
|
const {
|
|
1121
1266
|
error: res_error,
|
|
1122
|
-
} = ConfigurationPlatformModel.
|
|
1267
|
+
} = ConfigurationPlatformModel.AppCurrencyResponse().validate(
|
|
1123
1268
|
responseData,
|
|
1124
1269
|
{ abortEarly: false, allowUnknown: true }
|
|
1125
1270
|
);
|
|
@@ -1130,7 +1275,7 @@ class Configuration {
|
|
|
1130
1275
|
} else {
|
|
1131
1276
|
Logger({
|
|
1132
1277
|
level: "WARN",
|
|
1133
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
1278
|
+
message: `Response Validation Warnings for platform > Configuration > getAppSupportedCurrency \n ${res_error}`,
|
|
1134
1279
|
});
|
|
1135
1280
|
}
|
|
1136
1281
|
}
|
|
@@ -1139,24 +1284,23 @@ class Configuration {
|
|
|
1139
1284
|
}
|
|
1140
1285
|
|
|
1141
1286
|
/**
|
|
1142
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
1287
|
+
* @param {ConfigurationPlatformApplicationValidator.GetApplicationByIdParam} arg
|
|
1143
1288
|
* - Arg object
|
|
1144
1289
|
*
|
|
1145
1290
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1146
1291
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1147
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1148
|
-
*
|
|
1149
|
-
* @
|
|
1150
|
-
* @
|
|
1151
|
-
* @description: Retrieve configuration details of authentication, inventory, article assignment rules, reward points, cart, payment, order, logistics, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getInventoryConfig/).
|
|
1292
|
+
* @returns {Promise<ConfigurationPlatformModel.Application>} - Success response
|
|
1293
|
+
* @name getApplicationById
|
|
1294
|
+
* @summary: Get application by ID.
|
|
1295
|
+
* @description: Retrieve detailed information about a specific application. Use application ID to get the current sales channel details which includes channel name, description, banner, logo, favicon, domain details, token, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplicationById/).
|
|
1152
1296
|
*/
|
|
1153
|
-
async
|
|
1297
|
+
async getApplicationById(
|
|
1154
1298
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1155
1299
|
{ responseHeaders } = { responseHeaders: false }
|
|
1156
1300
|
) {
|
|
1157
1301
|
const {
|
|
1158
1302
|
error,
|
|
1159
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1303
|
+
} = ConfigurationPlatformApplicationValidator.getApplicationById().validate(
|
|
1160
1304
|
{},
|
|
1161
1305
|
{ abortEarly: false, allowUnknown: true }
|
|
1162
1306
|
);
|
|
@@ -1167,14 +1311,14 @@ class Configuration {
|
|
|
1167
1311
|
// Showing warrnings if extra unknown parameters are found
|
|
1168
1312
|
const {
|
|
1169
1313
|
error: warrning,
|
|
1170
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1314
|
+
} = ConfigurationPlatformApplicationValidator.getApplicationById().validate(
|
|
1171
1315
|
{},
|
|
1172
1316
|
{ abortEarly: false, allowUnknown: false }
|
|
1173
1317
|
);
|
|
1174
1318
|
if (warrning) {
|
|
1175
1319
|
Logger({
|
|
1176
1320
|
level: "WARN",
|
|
1177
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
1321
|
+
message: `Parameter Validation warrnings for platform > Configuration > getApplicationById \n ${warrning}`,
|
|
1178
1322
|
});
|
|
1179
1323
|
}
|
|
1180
1324
|
|
|
@@ -1183,7 +1327,7 @@ class Configuration {
|
|
|
1183
1327
|
const response = await PlatformAPIClient.execute(
|
|
1184
1328
|
this.config,
|
|
1185
1329
|
"get",
|
|
1186
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}
|
|
1330
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
1187
1331
|
query_params,
|
|
1188
1332
|
undefined,
|
|
1189
1333
|
requestHeaders,
|
|
@@ -1197,10 +1341,10 @@ class Configuration {
|
|
|
1197
1341
|
|
|
1198
1342
|
const {
|
|
1199
1343
|
error: res_error,
|
|
1200
|
-
} = ConfigurationPlatformModel.
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
);
|
|
1344
|
+
} = ConfigurationPlatformModel.Application().validate(responseData, {
|
|
1345
|
+
abortEarly: false,
|
|
1346
|
+
allowUnknown: true,
|
|
1347
|
+
});
|
|
1204
1348
|
|
|
1205
1349
|
if (res_error) {
|
|
1206
1350
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1208,7 +1352,7 @@ class Configuration {
|
|
|
1208
1352
|
} else {
|
|
1209
1353
|
Logger({
|
|
1210
1354
|
level: "WARN",
|
|
1211
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
1355
|
+
message: `Response Validation Warnings for platform > Configuration > getApplicationById \n ${res_error}`,
|
|
1212
1356
|
});
|
|
1213
1357
|
}
|
|
1214
1358
|
}
|
|
@@ -1217,24 +1361,23 @@ class Configuration {
|
|
|
1217
1361
|
}
|
|
1218
1362
|
|
|
1219
1363
|
/**
|
|
1220
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
1364
|
+
* @param {ConfigurationPlatformApplicationValidator.GetApplicationConfigurationParam} arg
|
|
1221
1365
|
* - Arg object
|
|
1222
1366
|
*
|
|
1223
1367
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1224
1368
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1225
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1226
|
-
*
|
|
1227
|
-
* @
|
|
1228
|
-
* @
|
|
1229
|
-
* @description: Retrieve configuration settings for ordering stores. Retrieve the details of the deployment stores (the selling locations where the sales channel will be utilised for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoreConfig/).
|
|
1369
|
+
* @returns {Promise<ConfigurationPlatformModel.OwnerAppConfig>} - Success response
|
|
1370
|
+
* @name getApplicationConfiguration
|
|
1371
|
+
* @summary: Get Application configuration.
|
|
1372
|
+
* @description: Retrieve configuration details of inventory pricing_strategy. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplicationConfiguration/).
|
|
1230
1373
|
*/
|
|
1231
|
-
async
|
|
1374
|
+
async getApplicationConfiguration(
|
|
1232
1375
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1233
1376
|
{ responseHeaders } = { responseHeaders: false }
|
|
1234
1377
|
) {
|
|
1235
1378
|
const {
|
|
1236
1379
|
error,
|
|
1237
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1380
|
+
} = ConfigurationPlatformApplicationValidator.getApplicationConfiguration().validate(
|
|
1238
1381
|
{},
|
|
1239
1382
|
{ abortEarly: false, allowUnknown: true }
|
|
1240
1383
|
);
|
|
@@ -1245,14 +1388,14 @@ class Configuration {
|
|
|
1245
1388
|
// Showing warrnings if extra unknown parameters are found
|
|
1246
1389
|
const {
|
|
1247
1390
|
error: warrning,
|
|
1248
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1391
|
+
} = ConfigurationPlatformApplicationValidator.getApplicationConfiguration().validate(
|
|
1249
1392
|
{},
|
|
1250
1393
|
{ abortEarly: false, allowUnknown: false }
|
|
1251
1394
|
);
|
|
1252
1395
|
if (warrning) {
|
|
1253
1396
|
Logger({
|
|
1254
1397
|
level: "WARN",
|
|
1255
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
1398
|
+
message: `Parameter Validation warrnings for platform > Configuration > getApplicationConfiguration \n ${warrning}`,
|
|
1256
1399
|
});
|
|
1257
1400
|
}
|
|
1258
1401
|
|
|
@@ -1261,7 +1404,7 @@ class Configuration {
|
|
|
1261
1404
|
const response = await PlatformAPIClient.execute(
|
|
1262
1405
|
this.config,
|
|
1263
1406
|
"get",
|
|
1264
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1407
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/owner-application/${this.applicationId}/configuration`,
|
|
1265
1408
|
query_params,
|
|
1266
1409
|
undefined,
|
|
1267
1410
|
requestHeaders,
|
|
@@ -1275,10 +1418,10 @@ class Configuration {
|
|
|
1275
1418
|
|
|
1276
1419
|
const {
|
|
1277
1420
|
error: res_error,
|
|
1278
|
-
} = ConfigurationPlatformModel.
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
);
|
|
1421
|
+
} = ConfigurationPlatformModel.OwnerAppConfig().validate(responseData, {
|
|
1422
|
+
abortEarly: false,
|
|
1423
|
+
allowUnknown: true,
|
|
1424
|
+
});
|
|
1282
1425
|
|
|
1283
1426
|
if (res_error) {
|
|
1284
1427
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1286,7 +1429,7 @@ class Configuration {
|
|
|
1286
1429
|
} else {
|
|
1287
1430
|
Logger({
|
|
1288
1431
|
level: "WARN",
|
|
1289
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
1432
|
+
message: `Response Validation Warnings for platform > Configuration > getApplicationConfiguration \n ${res_error}`,
|
|
1290
1433
|
});
|
|
1291
1434
|
}
|
|
1292
1435
|
}
|
|
@@ -1295,27 +1438,758 @@ class Configuration {
|
|
|
1295
1438
|
}
|
|
1296
1439
|
|
|
1297
1440
|
/**
|
|
1298
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
1441
|
+
* @param {ConfigurationPlatformApplicationValidator.GetApplicationDomainAvailibilityParam} arg
|
|
1442
|
+
* - Arg object
|
|
1443
|
+
*
|
|
1444
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1445
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1446
|
+
* @returns {Promise<ConfigurationPlatformModel.DomainSuggestionsResponse>}
|
|
1447
|
+
* - Success response
|
|
1448
|
+
*
|
|
1449
|
+
* @name getApplicationDomainAvailibility
|
|
1450
|
+
* @summary: Get domain availability.
|
|
1451
|
+
* @description: Check the availability of a specific domain. Use this API to check the domain availability before linking it to application. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplicationDomainAvailibility/).
|
|
1452
|
+
*/
|
|
1453
|
+
async getApplicationDomainAvailibility(
|
|
1454
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1455
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1456
|
+
) {
|
|
1457
|
+
const {
|
|
1458
|
+
error,
|
|
1459
|
+
} = ConfigurationPlatformApplicationValidator.getApplicationDomainAvailibility().validate(
|
|
1460
|
+
{
|
|
1461
|
+
body,
|
|
1462
|
+
},
|
|
1463
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1464
|
+
);
|
|
1465
|
+
if (error) {
|
|
1466
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1470
|
+
const {
|
|
1471
|
+
error: warrning,
|
|
1472
|
+
} = ConfigurationPlatformApplicationValidator.getApplicationDomainAvailibility().validate(
|
|
1473
|
+
{
|
|
1474
|
+
body,
|
|
1475
|
+
},
|
|
1476
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1477
|
+
);
|
|
1478
|
+
if (warrning) {
|
|
1479
|
+
Logger({
|
|
1480
|
+
level: "WARN",
|
|
1481
|
+
message: `Parameter Validation warrnings for platform > Configuration > getApplicationDomainAvailibility \n ${warrning}`,
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
const query_params = {};
|
|
1486
|
+
|
|
1487
|
+
const response = await PlatformAPIClient.execute(
|
|
1488
|
+
this.config,
|
|
1489
|
+
"post",
|
|
1490
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/suggestions`,
|
|
1491
|
+
query_params,
|
|
1492
|
+
body,
|
|
1493
|
+
requestHeaders,
|
|
1494
|
+
{ responseHeaders }
|
|
1495
|
+
);
|
|
1496
|
+
|
|
1497
|
+
let responseData = response;
|
|
1498
|
+
if (responseHeaders) {
|
|
1499
|
+
responseData = response[0];
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
const {
|
|
1503
|
+
error: res_error,
|
|
1504
|
+
} = ConfigurationPlatformModel.DomainSuggestionsResponse().validate(
|
|
1505
|
+
responseData,
|
|
1506
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1507
|
+
);
|
|
1508
|
+
|
|
1509
|
+
if (res_error) {
|
|
1510
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1511
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1512
|
+
} else {
|
|
1513
|
+
Logger({
|
|
1514
|
+
level: "WARN",
|
|
1515
|
+
message: `Response Validation Warnings for platform > Configuration > getApplicationDomainAvailibility \n ${res_error}`,
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
return response;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* @param {ConfigurationPlatformApplicationValidator.GetDomainStatusParam} arg
|
|
1525
|
+
* - Arg object
|
|
1526
|
+
*
|
|
1527
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1528
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1529
|
+
* @returns {Promise<ConfigurationPlatformModel.DomainStatusResponse>} -
|
|
1530
|
+
* Success response
|
|
1531
|
+
* @name getDomainStatus
|
|
1532
|
+
* @summary: Get domain status.
|
|
1533
|
+
* @description: Retrieve the status of a specific domain. Shows if the A records and TXT records of the domain correctly points to appropriate IP on Fynd Servers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomainStatus/).
|
|
1534
|
+
*/
|
|
1535
|
+
async getDomainStatus(
|
|
1536
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1537
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1538
|
+
) {
|
|
1539
|
+
const {
|
|
1540
|
+
error,
|
|
1541
|
+
} = ConfigurationPlatformApplicationValidator.getDomainStatus().validate(
|
|
1542
|
+
{
|
|
1543
|
+
body,
|
|
1544
|
+
},
|
|
1545
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1546
|
+
);
|
|
1547
|
+
if (error) {
|
|
1548
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1552
|
+
const {
|
|
1553
|
+
error: warrning,
|
|
1554
|
+
} = ConfigurationPlatformApplicationValidator.getDomainStatus().validate(
|
|
1555
|
+
{
|
|
1556
|
+
body,
|
|
1557
|
+
},
|
|
1558
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1559
|
+
);
|
|
1560
|
+
if (warrning) {
|
|
1561
|
+
Logger({
|
|
1562
|
+
level: "WARN",
|
|
1563
|
+
message: `Parameter Validation warrnings for platform > Configuration > getDomainStatus \n ${warrning}`,
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
const query_params = {};
|
|
1568
|
+
|
|
1569
|
+
const response = await PlatformAPIClient.execute(
|
|
1570
|
+
this.config,
|
|
1571
|
+
"post",
|
|
1572
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/domain-status`,
|
|
1573
|
+
query_params,
|
|
1574
|
+
body,
|
|
1575
|
+
requestHeaders,
|
|
1576
|
+
{ responseHeaders }
|
|
1577
|
+
);
|
|
1578
|
+
|
|
1579
|
+
let responseData = response;
|
|
1580
|
+
if (responseHeaders) {
|
|
1581
|
+
responseData = response[0];
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
const {
|
|
1585
|
+
error: res_error,
|
|
1586
|
+
} = ConfigurationPlatformModel.DomainStatusResponse().validate(
|
|
1587
|
+
responseData,
|
|
1588
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1589
|
+
);
|
|
1590
|
+
|
|
1591
|
+
if (res_error) {
|
|
1592
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1593
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1594
|
+
} else {
|
|
1595
|
+
Logger({
|
|
1596
|
+
level: "WARN",
|
|
1597
|
+
message: `Response Validation Warnings for platform > Configuration > getDomainStatus \n ${res_error}`,
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
return response;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* @param {ConfigurationPlatformApplicationValidator.GetDomainsParam} arg - Arg object
|
|
1607
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1608
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1609
|
+
* @returns {Promise<ConfigurationPlatformModel.DomainsResponse>} - Success response
|
|
1610
|
+
* @name getDomains
|
|
1611
|
+
* @summary: Get domains.
|
|
1612
|
+
* @description: Get list of domains. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomains/).
|
|
1613
|
+
*/
|
|
1614
|
+
async getDomains(
|
|
1615
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1616
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1617
|
+
) {
|
|
1618
|
+
const {
|
|
1619
|
+
error,
|
|
1620
|
+
} = ConfigurationPlatformApplicationValidator.getDomains().validate(
|
|
1621
|
+
{},
|
|
1622
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1623
|
+
);
|
|
1624
|
+
if (error) {
|
|
1625
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1629
|
+
const {
|
|
1630
|
+
error: warrning,
|
|
1631
|
+
} = ConfigurationPlatformApplicationValidator.getDomains().validate(
|
|
1632
|
+
{},
|
|
1633
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1634
|
+
);
|
|
1635
|
+
if (warrning) {
|
|
1636
|
+
Logger({
|
|
1637
|
+
level: "WARN",
|
|
1638
|
+
message: `Parameter Validation warrnings for platform > Configuration > getDomains \n ${warrning}`,
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
const query_params = {};
|
|
1643
|
+
|
|
1644
|
+
const response = await PlatformAPIClient.execute(
|
|
1645
|
+
this.config,
|
|
1646
|
+
"get",
|
|
1647
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
|
|
1648
|
+
query_params,
|
|
1649
|
+
undefined,
|
|
1650
|
+
requestHeaders,
|
|
1651
|
+
{ responseHeaders }
|
|
1652
|
+
);
|
|
1653
|
+
|
|
1654
|
+
let responseData = response;
|
|
1655
|
+
if (responseHeaders) {
|
|
1656
|
+
responseData = response[0];
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
const {
|
|
1660
|
+
error: res_error,
|
|
1661
|
+
} = ConfigurationPlatformModel.DomainsResponse().validate(responseData, {
|
|
1662
|
+
abortEarly: false,
|
|
1663
|
+
allowUnknown: true,
|
|
1664
|
+
});
|
|
1665
|
+
|
|
1666
|
+
if (res_error) {
|
|
1667
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1668
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1669
|
+
} else {
|
|
1670
|
+
Logger({
|
|
1671
|
+
level: "WARN",
|
|
1672
|
+
message: `Response Validation Warnings for platform > Configuration > getDomains \n ${res_error}`,
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
return response;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* @param {ConfigurationPlatformApplicationValidator.GetInventoryConfigParam} arg
|
|
1682
|
+
* - Arg object
|
|
1683
|
+
*
|
|
1684
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1685
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1686
|
+
* @returns {Promise<ConfigurationPlatformModel.ApplicationInventory>} -
|
|
1687
|
+
* Success response
|
|
1688
|
+
* @name getInventoryConfig
|
|
1689
|
+
* @summary: Get inventory configuration.
|
|
1690
|
+
* @description: Retrieve configuration details of authentication, inventory, article assignment rules, reward points, cart, payment, order, logistics, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getInventoryConfig/).
|
|
1691
|
+
*/
|
|
1692
|
+
async getInventoryConfig(
|
|
1693
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1694
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1695
|
+
) {
|
|
1696
|
+
const {
|
|
1697
|
+
error,
|
|
1698
|
+
} = ConfigurationPlatformApplicationValidator.getInventoryConfig().validate(
|
|
1699
|
+
{},
|
|
1700
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1701
|
+
);
|
|
1702
|
+
if (error) {
|
|
1703
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1707
|
+
const {
|
|
1708
|
+
error: warrning,
|
|
1709
|
+
} = ConfigurationPlatformApplicationValidator.getInventoryConfig().validate(
|
|
1710
|
+
{},
|
|
1711
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1712
|
+
);
|
|
1713
|
+
if (warrning) {
|
|
1714
|
+
Logger({
|
|
1715
|
+
level: "WARN",
|
|
1716
|
+
message: `Parameter Validation warrnings for platform > Configuration > getInventoryConfig \n ${warrning}`,
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
const query_params = {};
|
|
1721
|
+
|
|
1722
|
+
const response = await PlatformAPIClient.execute(
|
|
1723
|
+
this.config,
|
|
1724
|
+
"get",
|
|
1725
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
1726
|
+
query_params,
|
|
1727
|
+
undefined,
|
|
1728
|
+
requestHeaders,
|
|
1729
|
+
{ responseHeaders }
|
|
1730
|
+
);
|
|
1731
|
+
|
|
1732
|
+
let responseData = response;
|
|
1733
|
+
if (responseHeaders) {
|
|
1734
|
+
responseData = response[0];
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
const {
|
|
1738
|
+
error: res_error,
|
|
1739
|
+
} = ConfigurationPlatformModel.ApplicationInventory().validate(
|
|
1740
|
+
responseData,
|
|
1741
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1742
|
+
);
|
|
1743
|
+
|
|
1744
|
+
if (res_error) {
|
|
1745
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1746
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1747
|
+
} else {
|
|
1748
|
+
Logger({
|
|
1749
|
+
level: "WARN",
|
|
1750
|
+
message: `Response Validation Warnings for platform > Configuration > getInventoryConfig \n ${res_error}`,
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
return response;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* @param {ConfigurationPlatformApplicationValidator.GetOrderingStoreConfigParam} arg
|
|
1760
|
+
* - Arg object
|
|
1761
|
+
*
|
|
1762
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1763
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1764
|
+
* @returns {Promise<ConfigurationPlatformModel.OrderingStoreConfig>} -
|
|
1765
|
+
* Success response
|
|
1766
|
+
* @name getOrderingStoreConfig
|
|
1767
|
+
* @summary: Get ordering store configuration.
|
|
1768
|
+
* @description: Retrieve configuration settings for ordering stores. Retrieve the details of the deployment stores (the selling locations where the application will be utilised for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoreConfig/).
|
|
1769
|
+
*/
|
|
1770
|
+
async getOrderingStoreConfig(
|
|
1771
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1772
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1773
|
+
) {
|
|
1774
|
+
const {
|
|
1775
|
+
error,
|
|
1776
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStoreConfig().validate(
|
|
1777
|
+
{},
|
|
1778
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1779
|
+
);
|
|
1780
|
+
if (error) {
|
|
1781
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1785
|
+
const {
|
|
1786
|
+
error: warrning,
|
|
1787
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStoreConfig().validate(
|
|
1788
|
+
{},
|
|
1789
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1790
|
+
);
|
|
1791
|
+
if (warrning) {
|
|
1792
|
+
Logger({
|
|
1793
|
+
level: "WARN",
|
|
1794
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOrderingStoreConfig \n ${warrning}`,
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
const query_params = {};
|
|
1799
|
+
|
|
1800
|
+
const response = await PlatformAPIClient.execute(
|
|
1801
|
+
this.config,
|
|
1802
|
+
"get",
|
|
1803
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store`,
|
|
1804
|
+
query_params,
|
|
1805
|
+
undefined,
|
|
1806
|
+
requestHeaders,
|
|
1807
|
+
{ responseHeaders }
|
|
1808
|
+
);
|
|
1809
|
+
|
|
1810
|
+
let responseData = response;
|
|
1811
|
+
if (responseHeaders) {
|
|
1812
|
+
responseData = response[0];
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
const {
|
|
1816
|
+
error: res_error,
|
|
1817
|
+
} = ConfigurationPlatformModel.OrderingStoreConfig().validate(
|
|
1818
|
+
responseData,
|
|
1819
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1820
|
+
);
|
|
1821
|
+
|
|
1822
|
+
if (res_error) {
|
|
1823
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1824
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1825
|
+
} else {
|
|
1826
|
+
Logger({
|
|
1827
|
+
level: "WARN",
|
|
1828
|
+
message: `Response Validation Warnings for platform > Configuration > getOrderingStoreConfig \n ${res_error}`,
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
return response;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* @param {ConfigurationPlatformApplicationValidator.GetOrderingStoreCookieParam} arg
|
|
1838
|
+
* - Arg object
|
|
1839
|
+
*
|
|
1840
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1841
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1842
|
+
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
1843
|
+
* Success response
|
|
1844
|
+
* @name getOrderingStoreCookie
|
|
1845
|
+
* @summary: Get an Ordering Store signed cookie on selection of ordering store.
|
|
1846
|
+
* @description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoreCookie/).
|
|
1847
|
+
*/
|
|
1848
|
+
async getOrderingStoreCookie(
|
|
1849
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1850
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1851
|
+
) {
|
|
1852
|
+
const {
|
|
1853
|
+
error,
|
|
1854
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStoreCookie().validate(
|
|
1855
|
+
{
|
|
1856
|
+
body,
|
|
1857
|
+
},
|
|
1858
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1859
|
+
);
|
|
1860
|
+
if (error) {
|
|
1861
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1865
|
+
const {
|
|
1866
|
+
error: warrning,
|
|
1867
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStoreCookie().validate(
|
|
1868
|
+
{
|
|
1869
|
+
body,
|
|
1870
|
+
},
|
|
1871
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1872
|
+
);
|
|
1873
|
+
if (warrning) {
|
|
1874
|
+
Logger({
|
|
1875
|
+
level: "WARN",
|
|
1876
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOrderingStoreCookie \n ${warrning}`,
|
|
1877
|
+
});
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
const query_params = {};
|
|
1881
|
+
|
|
1882
|
+
const response = await PlatformAPIClient.execute(
|
|
1883
|
+
this.config,
|
|
1884
|
+
"post",
|
|
1885
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/select`,
|
|
1886
|
+
query_params,
|
|
1887
|
+
body,
|
|
1888
|
+
requestHeaders,
|
|
1889
|
+
{ responseHeaders }
|
|
1890
|
+
);
|
|
1891
|
+
|
|
1892
|
+
let responseData = response;
|
|
1893
|
+
if (responseHeaders) {
|
|
1894
|
+
responseData = response[0];
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
const {
|
|
1898
|
+
error: res_error,
|
|
1899
|
+
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
1900
|
+
responseData,
|
|
1901
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1902
|
+
);
|
|
1903
|
+
|
|
1904
|
+
if (res_error) {
|
|
1905
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1906
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1907
|
+
} else {
|
|
1908
|
+
Logger({
|
|
1909
|
+
level: "WARN",
|
|
1910
|
+
message: `Response Validation Warnings for platform > Configuration > getOrderingStoreCookie \n ${res_error}`,
|
|
1911
|
+
});
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
return response;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
/**
|
|
1919
|
+
* @param {ConfigurationPlatformApplicationValidator.GetOrderingStoresParam} arg
|
|
1920
|
+
* - Arg object
|
|
1921
|
+
*
|
|
1922
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1923
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1924
|
+
* @returns {Promise<ConfigurationPlatformModel.OrderingStores>} - Success response
|
|
1925
|
+
* @name getOrderingStores
|
|
1926
|
+
* @summary: Get all deployment stores
|
|
1927
|
+
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStores/).
|
|
1928
|
+
*/
|
|
1929
|
+
async getOrderingStores(
|
|
1930
|
+
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
1931
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1932
|
+
) {
|
|
1933
|
+
const {
|
|
1934
|
+
error,
|
|
1935
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStores().validate(
|
|
1936
|
+
{
|
|
1937
|
+
pageNo,
|
|
1938
|
+
pageSize,
|
|
1939
|
+
q,
|
|
1940
|
+
},
|
|
1941
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1942
|
+
);
|
|
1943
|
+
if (error) {
|
|
1944
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1948
|
+
const {
|
|
1949
|
+
error: warrning,
|
|
1950
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStores().validate(
|
|
1951
|
+
{
|
|
1952
|
+
pageNo,
|
|
1953
|
+
pageSize,
|
|
1954
|
+
q,
|
|
1955
|
+
},
|
|
1956
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1957
|
+
);
|
|
1958
|
+
if (warrning) {
|
|
1959
|
+
Logger({
|
|
1960
|
+
level: "WARN",
|
|
1961
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOrderingStores \n ${warrning}`,
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
const query_params = {};
|
|
1966
|
+
query_params["page_no"] = pageNo;
|
|
1967
|
+
query_params["page_size"] = pageSize;
|
|
1968
|
+
query_params["q"] = q;
|
|
1969
|
+
|
|
1970
|
+
const response = await PlatformAPIClient.execute(
|
|
1971
|
+
this.config,
|
|
1972
|
+
"get",
|
|
1973
|
+
`/service/platform/configuration/v2.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores`,
|
|
1974
|
+
query_params,
|
|
1975
|
+
undefined,
|
|
1976
|
+
requestHeaders,
|
|
1977
|
+
{ responseHeaders }
|
|
1978
|
+
);
|
|
1979
|
+
|
|
1980
|
+
let responseData = response;
|
|
1981
|
+
if (responseHeaders) {
|
|
1982
|
+
responseData = response[0];
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
const {
|
|
1986
|
+
error: res_error,
|
|
1987
|
+
} = ConfigurationPlatformModel.OrderingStores().validate(responseData, {
|
|
1988
|
+
abortEarly: false,
|
|
1989
|
+
allowUnknown: true,
|
|
1990
|
+
});
|
|
1991
|
+
|
|
1992
|
+
if (res_error) {
|
|
1993
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1994
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1995
|
+
} else {
|
|
1996
|
+
Logger({
|
|
1997
|
+
level: "WARN",
|
|
1998
|
+
message: `Response Validation Warnings for platform > Configuration > getOrderingStores \n ${res_error}`,
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
return response;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* @param {Object} arg - Arg object.
|
|
2008
|
+
* @param {number} arg.companyId - Numeric ID allotted to a business account
|
|
2009
|
+
* on Fynd Platform
|
|
2010
|
+
* @param {string} arg.applicationId - Alphanumeric ID allotted to an
|
|
2011
|
+
* application (sales channel website) created within a business account
|
|
2012
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
2013
|
+
* page. Default value is 10.
|
|
2014
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
2015
|
+
* @returns {Paginator<ConfigurationPlatformModel.OrderingStores>}
|
|
2016
|
+
* @summary: Get all deployment stores
|
|
2017
|
+
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
2018
|
+
*/
|
|
2019
|
+
getOrderingStoresPaginator({ companyId, applicationId, pageSize, q } = {}) {
|
|
2020
|
+
const paginator = new Paginator();
|
|
2021
|
+
const callback = async () => {
|
|
2022
|
+
const pageId = paginator.nextId;
|
|
2023
|
+
const pageNo = paginator.pageNo;
|
|
2024
|
+
const pageType = "number";
|
|
2025
|
+
const data = await this.getOrderingStores({
|
|
2026
|
+
companyId: companyId,
|
|
2027
|
+
applicationId: applicationId,
|
|
2028
|
+
pageNo: pageNo,
|
|
2029
|
+
pageSize: pageSize,
|
|
2030
|
+
q: q,
|
|
2031
|
+
});
|
|
2032
|
+
paginator.setPaginator({
|
|
2033
|
+
hasNext: data.page.has_next ? true : false,
|
|
2034
|
+
nextId: data.page.next_id,
|
|
2035
|
+
});
|
|
2036
|
+
return data;
|
|
2037
|
+
};
|
|
2038
|
+
paginator.setCallback(callback.bind(this));
|
|
2039
|
+
return paginator;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* @param {ConfigurationPlatformApplicationValidator.GetOrderingStoresByFilterParam} arg
|
|
2044
|
+
* - Arg object
|
|
2045
|
+
*
|
|
2046
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2047
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2048
|
+
* @returns {Promise<ConfigurationPlatformModel.OrderingStores>} - Success response
|
|
2049
|
+
* @name getOrderingStoresByFilter
|
|
2050
|
+
* @summary: Get ordering store by filter
|
|
2051
|
+
* @description: Use this API to use filters and retrieve the details of the deployment stores (the selling locations where the application will be utilised for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoresByFilter/).
|
|
2052
|
+
*/
|
|
2053
|
+
async getOrderingStoresByFilter(
|
|
2054
|
+
{ body, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2055
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2056
|
+
) {
|
|
2057
|
+
const {
|
|
2058
|
+
error,
|
|
2059
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStoresByFilter().validate(
|
|
2060
|
+
{
|
|
2061
|
+
body,
|
|
2062
|
+
pageNo,
|
|
2063
|
+
pageSize,
|
|
2064
|
+
},
|
|
2065
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2066
|
+
);
|
|
2067
|
+
if (error) {
|
|
2068
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2072
|
+
const {
|
|
2073
|
+
error: warrning,
|
|
2074
|
+
} = ConfigurationPlatformApplicationValidator.getOrderingStoresByFilter().validate(
|
|
2075
|
+
{
|
|
2076
|
+
body,
|
|
2077
|
+
pageNo,
|
|
2078
|
+
pageSize,
|
|
2079
|
+
},
|
|
2080
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2081
|
+
);
|
|
2082
|
+
if (warrning) {
|
|
2083
|
+
Logger({
|
|
2084
|
+
level: "WARN",
|
|
2085
|
+
message: `Parameter Validation warrnings for platform > Configuration > getOrderingStoresByFilter \n ${warrning}`,
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
const query_params = {};
|
|
2090
|
+
query_params["page_no"] = pageNo;
|
|
2091
|
+
query_params["page_size"] = pageSize;
|
|
2092
|
+
|
|
2093
|
+
const response = await PlatformAPIClient.execute(
|
|
2094
|
+
this.config,
|
|
2095
|
+
"post",
|
|
2096
|
+
`/service/platform/configuration/v2.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores/filter`,
|
|
2097
|
+
query_params,
|
|
2098
|
+
body,
|
|
2099
|
+
requestHeaders,
|
|
2100
|
+
{ responseHeaders }
|
|
2101
|
+
);
|
|
2102
|
+
|
|
2103
|
+
let responseData = response;
|
|
2104
|
+
if (responseHeaders) {
|
|
2105
|
+
responseData = response[0];
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
const {
|
|
2109
|
+
error: res_error,
|
|
2110
|
+
} = ConfigurationPlatformModel.OrderingStores().validate(responseData, {
|
|
2111
|
+
abortEarly: false,
|
|
2112
|
+
allowUnknown: true,
|
|
2113
|
+
});
|
|
2114
|
+
|
|
2115
|
+
if (res_error) {
|
|
2116
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2117
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2118
|
+
} else {
|
|
2119
|
+
Logger({
|
|
2120
|
+
level: "WARN",
|
|
2121
|
+
message: `Response Validation Warnings for platform > Configuration > getOrderingStoresByFilter \n ${res_error}`,
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
return response;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* @param {Object} arg - Arg object.
|
|
2131
|
+
* @param {number} arg.companyId - Numeric ID allotted to a business account
|
|
2132
|
+
* on Fynd Platform
|
|
2133
|
+
* @param {string} arg.applicationId - Alphanumeric ID allotted to an
|
|
2134
|
+
* application (sales channel website) created within a business account
|
|
2135
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
2136
|
+
* page. Default value is 10.
|
|
2137
|
+
* @param {ConfigurationPlatformModel.FilterOrderingStoreRequest} arg.body
|
|
2138
|
+
* @returns {Paginator<ConfigurationPlatformModel.OrderingStores>}
|
|
2139
|
+
* @summary: Get ordering store by filter
|
|
2140
|
+
* @description: Use this API to use filters and retrieve the details of the deployment stores (the selling locations where the application will be utilised for placing orders).
|
|
2141
|
+
*/
|
|
2142
|
+
getOrderingStoresByFilterPaginator({
|
|
2143
|
+
companyId,
|
|
2144
|
+
applicationId,
|
|
2145
|
+
pageSize,
|
|
2146
|
+
body,
|
|
2147
|
+
} = {}) {
|
|
2148
|
+
const paginator = new Paginator();
|
|
2149
|
+
const callback = async () => {
|
|
2150
|
+
const pageId = paginator.nextId;
|
|
2151
|
+
const pageNo = paginator.pageNo;
|
|
2152
|
+
const pageType = "number";
|
|
2153
|
+
const data = await this.getOrderingStoresByFilter({
|
|
2154
|
+
companyId: companyId,
|
|
2155
|
+
applicationId: applicationId,
|
|
2156
|
+
body: body,
|
|
2157
|
+
pageNo: pageNo,
|
|
2158
|
+
pageSize: pageSize,
|
|
2159
|
+
});
|
|
2160
|
+
paginator.setPaginator({
|
|
2161
|
+
hasNext: data.page.has_next ? true : false,
|
|
2162
|
+
nextId: data.page.next_id,
|
|
2163
|
+
});
|
|
2164
|
+
return data;
|
|
2165
|
+
};
|
|
2166
|
+
paginator.setCallback(callback.bind(this));
|
|
2167
|
+
return paginator;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* @param {ConfigurationPlatformApplicationValidator.GetStaffOrderingStoresParam} arg
|
|
1299
2172
|
* - Arg object
|
|
1300
2173
|
*
|
|
1301
2174
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1302
2175
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1303
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1304
|
-
*
|
|
1305
|
-
*
|
|
1306
|
-
* @
|
|
1307
|
-
* @
|
|
1308
|
-
* @description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoreCookie/).
|
|
2176
|
+
* @returns {Promise<ConfigurationPlatformModel.OrderingStoresResponse>} -
|
|
2177
|
+
* Success response
|
|
2178
|
+
* @name getStaffOrderingStores
|
|
2179
|
+
* @summary: Get deployment stores
|
|
2180
|
+
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStaffOrderingStores/).
|
|
1309
2181
|
*/
|
|
1310
|
-
async
|
|
1311
|
-
{
|
|
2182
|
+
async getStaffOrderingStores(
|
|
2183
|
+
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
1312
2184
|
{ responseHeaders } = { responseHeaders: false }
|
|
1313
2185
|
) {
|
|
1314
2186
|
const {
|
|
1315
2187
|
error,
|
|
1316
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
2188
|
+
} = ConfigurationPlatformApplicationValidator.getStaffOrderingStores().validate(
|
|
1317
2189
|
{
|
|
1318
|
-
|
|
2190
|
+
pageNo,
|
|
2191
|
+
pageSize,
|
|
2192
|
+
q,
|
|
1319
2193
|
},
|
|
1320
2194
|
{ abortEarly: false, allowUnknown: true }
|
|
1321
2195
|
);
|
|
@@ -1326,27 +2200,32 @@ class Configuration {
|
|
|
1326
2200
|
// Showing warrnings if extra unknown parameters are found
|
|
1327
2201
|
const {
|
|
1328
2202
|
error: warrning,
|
|
1329
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
2203
|
+
} = ConfigurationPlatformApplicationValidator.getStaffOrderingStores().validate(
|
|
1330
2204
|
{
|
|
1331
|
-
|
|
2205
|
+
pageNo,
|
|
2206
|
+
pageSize,
|
|
2207
|
+
q,
|
|
1332
2208
|
},
|
|
1333
2209
|
{ abortEarly: false, allowUnknown: false }
|
|
1334
2210
|
);
|
|
1335
2211
|
if (warrning) {
|
|
1336
2212
|
Logger({
|
|
1337
2213
|
level: "WARN",
|
|
1338
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
2214
|
+
message: `Parameter Validation warrnings for platform > Configuration > getStaffOrderingStores \n ${warrning}`,
|
|
1339
2215
|
});
|
|
1340
2216
|
}
|
|
1341
2217
|
|
|
1342
2218
|
const query_params = {};
|
|
2219
|
+
query_params["page_no"] = pageNo;
|
|
2220
|
+
query_params["page_size"] = pageSize;
|
|
2221
|
+
query_params["q"] = q;
|
|
1343
2222
|
|
|
1344
2223
|
const response = await PlatformAPIClient.execute(
|
|
1345
2224
|
this.config,
|
|
1346
|
-
"
|
|
1347
|
-
`/service/platform/configuration/
|
|
2225
|
+
"get",
|
|
2226
|
+
`/service/platform/configuration/v2.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/staff-stores`,
|
|
1348
2227
|
query_params,
|
|
1349
|
-
|
|
2228
|
+
undefined,
|
|
1350
2229
|
requestHeaders,
|
|
1351
2230
|
{ responseHeaders }
|
|
1352
2231
|
);
|
|
@@ -1358,7 +2237,7 @@ class Configuration {
|
|
|
1358
2237
|
|
|
1359
2238
|
const {
|
|
1360
2239
|
error: res_error,
|
|
1361
|
-
} = ConfigurationPlatformModel.
|
|
2240
|
+
} = ConfigurationPlatformModel.OrderingStoresResponse().validate(
|
|
1362
2241
|
responseData,
|
|
1363
2242
|
{ abortEarly: false, allowUnknown: true }
|
|
1364
2243
|
);
|
|
@@ -1369,7 +2248,7 @@ class Configuration {
|
|
|
1369
2248
|
} else {
|
|
1370
2249
|
Logger({
|
|
1371
2250
|
level: "WARN",
|
|
1372
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
2251
|
+
message: `Response Validation Warnings for platform > Configuration > getStaffOrderingStores \n ${res_error}`,
|
|
1373
2252
|
});
|
|
1374
2253
|
}
|
|
1375
2254
|
}
|
|
@@ -1378,27 +2257,66 @@ class Configuration {
|
|
|
1378
2257
|
}
|
|
1379
2258
|
|
|
1380
2259
|
/**
|
|
1381
|
-
* @param {
|
|
2260
|
+
* @param {Object} arg - Arg object.
|
|
2261
|
+
* @param {number} arg.companyId - Numeric ID allotted to a business account
|
|
2262
|
+
* on Fynd Platform
|
|
2263
|
+
* @param {string} arg.applicationId - Alphanumeric ID allotted to an
|
|
2264
|
+
* application (sales channel website) created within a business account
|
|
2265
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
2266
|
+
* page. Default value is 10.
|
|
2267
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
2268
|
+
* @returns {Paginator<ConfigurationPlatformModel.OrderingStoresResponse>}
|
|
2269
|
+
* @summary: Get deployment stores
|
|
2270
|
+
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
2271
|
+
*/
|
|
2272
|
+
getStaffOrderingStoresPaginator({
|
|
2273
|
+
companyId,
|
|
2274
|
+
applicationId,
|
|
2275
|
+
pageSize,
|
|
2276
|
+
q,
|
|
2277
|
+
} = {}) {
|
|
2278
|
+
const paginator = new Paginator();
|
|
2279
|
+
const callback = async () => {
|
|
2280
|
+
const pageId = paginator.nextId;
|
|
2281
|
+
const pageNo = paginator.pageNo;
|
|
2282
|
+
const pageType = "number";
|
|
2283
|
+
const data = await this.getStaffOrderingStores({
|
|
2284
|
+
companyId: companyId,
|
|
2285
|
+
applicationId: applicationId,
|
|
2286
|
+
pageNo: pageNo,
|
|
2287
|
+
pageSize: pageSize,
|
|
2288
|
+
q: q,
|
|
2289
|
+
});
|
|
2290
|
+
paginator.setPaginator({
|
|
2291
|
+
hasNext: data.page.has_next ? true : false,
|
|
2292
|
+
nextId: data.page.next_id,
|
|
2293
|
+
});
|
|
2294
|
+
return data;
|
|
2295
|
+
};
|
|
2296
|
+
paginator.setCallback(callback.bind(this));
|
|
2297
|
+
return paginator;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* @param {ConfigurationPlatformApplicationValidator.GetStoreDetailByIdParam} arg
|
|
1382
2302
|
* - Arg object
|
|
1383
2303
|
*
|
|
1384
2304
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1385
2305
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1386
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1387
|
-
* @name
|
|
1388
|
-
* @summary:
|
|
1389
|
-
* @description:
|
|
2306
|
+
* @returns {Promise<ConfigurationPlatformModel.OrderingStore>} - Success response
|
|
2307
|
+
* @name getStoreDetailById
|
|
2308
|
+
* @summary: Get ordering store details
|
|
2309
|
+
* @description: Use this API to retrieve the details of given stores uid (the selling locations where the application will be utilized for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreDetailById/).
|
|
1390
2310
|
*/
|
|
1391
|
-
async
|
|
1392
|
-
{
|
|
2311
|
+
async getStoreDetailById(
|
|
2312
|
+
{ storeId, requestHeaders } = { requestHeaders: {} },
|
|
1393
2313
|
{ responseHeaders } = { responseHeaders: false }
|
|
1394
2314
|
) {
|
|
1395
2315
|
const {
|
|
1396
2316
|
error,
|
|
1397
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
2317
|
+
} = ConfigurationPlatformApplicationValidator.getStoreDetailById().validate(
|
|
1398
2318
|
{
|
|
1399
|
-
|
|
1400
|
-
pageNo,
|
|
1401
|
-
pageSize,
|
|
2319
|
+
storeId,
|
|
1402
2320
|
},
|
|
1403
2321
|
{ abortEarly: false, allowUnknown: true }
|
|
1404
2322
|
);
|
|
@@ -1409,31 +2327,27 @@ class Configuration {
|
|
|
1409
2327
|
// Showing warrnings if extra unknown parameters are found
|
|
1410
2328
|
const {
|
|
1411
2329
|
error: warrning,
|
|
1412
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
2330
|
+
} = ConfigurationPlatformApplicationValidator.getStoreDetailById().validate(
|
|
1413
2331
|
{
|
|
1414
|
-
|
|
1415
|
-
pageNo,
|
|
1416
|
-
pageSize,
|
|
2332
|
+
storeId,
|
|
1417
2333
|
},
|
|
1418
2334
|
{ abortEarly: false, allowUnknown: false }
|
|
1419
2335
|
);
|
|
1420
2336
|
if (warrning) {
|
|
1421
2337
|
Logger({
|
|
1422
2338
|
level: "WARN",
|
|
1423
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
2339
|
+
message: `Parameter Validation warrnings for platform > Configuration > getStoreDetailById \n ${warrning}`,
|
|
1424
2340
|
});
|
|
1425
2341
|
}
|
|
1426
2342
|
|
|
1427
2343
|
const query_params = {};
|
|
1428
|
-
query_params["page_no"] = pageNo;
|
|
1429
|
-
query_params["page_size"] = pageSize;
|
|
1430
2344
|
|
|
1431
2345
|
const response = await PlatformAPIClient.execute(
|
|
1432
2346
|
this.config,
|
|
1433
|
-
"
|
|
1434
|
-
`/service/platform/configuration/
|
|
2347
|
+
"get",
|
|
2348
|
+
`/service/platform/configuration/v2.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores/${storeId}`,
|
|
1435
2349
|
query_params,
|
|
1436
|
-
|
|
2350
|
+
undefined,
|
|
1437
2351
|
requestHeaders,
|
|
1438
2352
|
{ responseHeaders }
|
|
1439
2353
|
);
|
|
@@ -1445,7 +2359,7 @@ class Configuration {
|
|
|
1445
2359
|
|
|
1446
2360
|
const {
|
|
1447
2361
|
error: res_error,
|
|
1448
|
-
} = ConfigurationPlatformModel.
|
|
2362
|
+
} = ConfigurationPlatformModel.OrderingStore().validate(responseData, {
|
|
1449
2363
|
abortEarly: false,
|
|
1450
2364
|
allowUnknown: true,
|
|
1451
2365
|
});
|
|
@@ -1456,7 +2370,7 @@ class Configuration {
|
|
|
1456
2370
|
} else {
|
|
1457
2371
|
Logger({
|
|
1458
2372
|
level: "WARN",
|
|
1459
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
2373
|
+
message: `Response Validation Warnings for platform > Configuration > getStoreDetailById \n ${res_error}`,
|
|
1460
2374
|
});
|
|
1461
2375
|
}
|
|
1462
2376
|
}
|
|
@@ -1465,26 +2379,25 @@ class Configuration {
|
|
|
1465
2379
|
}
|
|
1466
2380
|
|
|
1467
2381
|
/**
|
|
1468
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
2382
|
+
* @param {ConfigurationPlatformApplicationValidator.GetUrlRedirectionParam} arg
|
|
1469
2383
|
* - Arg object
|
|
1470
2384
|
*
|
|
1471
2385
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1472
2386
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1473
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1474
|
-
*
|
|
1475
|
-
* @
|
|
1476
|
-
* @
|
|
1477
|
-
* @description: Retrieve version details of the app, this includes the build status, build date, version name, latest version, and a lot more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getPreviousVersions/).
|
|
2387
|
+
* @returns {Promise<ConfigurationPlatformModel.UrlRedirection>} - Success response
|
|
2388
|
+
* @name getUrlRedirection
|
|
2389
|
+
* @summary: Get URL redirections
|
|
2390
|
+
* @description: Retrieves the URL redirections for a specific application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getUrlRedirection/).
|
|
1478
2391
|
*/
|
|
1479
|
-
async
|
|
1480
|
-
{
|
|
2392
|
+
async getUrlRedirection(
|
|
2393
|
+
{ redirectionDomainId, requestHeaders } = { requestHeaders: {} },
|
|
1481
2394
|
{ responseHeaders } = { responseHeaders: false }
|
|
1482
2395
|
) {
|
|
1483
2396
|
const {
|
|
1484
2397
|
error,
|
|
1485
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
2398
|
+
} = ConfigurationPlatformApplicationValidator.getUrlRedirection().validate(
|
|
1486
2399
|
{
|
|
1487
|
-
|
|
2400
|
+
redirectionDomainId,
|
|
1488
2401
|
},
|
|
1489
2402
|
{ abortEarly: false, allowUnknown: true }
|
|
1490
2403
|
);
|
|
@@ -1495,16 +2408,16 @@ class Configuration {
|
|
|
1495
2408
|
// Showing warrnings if extra unknown parameters are found
|
|
1496
2409
|
const {
|
|
1497
2410
|
error: warrning,
|
|
1498
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
2411
|
+
} = ConfigurationPlatformApplicationValidator.getUrlRedirection().validate(
|
|
1499
2412
|
{
|
|
1500
|
-
|
|
2413
|
+
redirectionDomainId,
|
|
1501
2414
|
},
|
|
1502
2415
|
{ abortEarly: false, allowUnknown: false }
|
|
1503
2416
|
);
|
|
1504
2417
|
if (warrning) {
|
|
1505
2418
|
Logger({
|
|
1506
2419
|
level: "WARN",
|
|
1507
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
2420
|
+
message: `Parameter Validation warrnings for platform > Configuration > getUrlRedirection \n ${warrning}`,
|
|
1508
2421
|
});
|
|
1509
2422
|
}
|
|
1510
2423
|
|
|
@@ -1513,7 +2426,7 @@ class Configuration {
|
|
|
1513
2426
|
const response = await PlatformAPIClient.execute(
|
|
1514
2427
|
this.config,
|
|
1515
2428
|
"get",
|
|
1516
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
2429
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/url-redirection/${redirectionDomainId}`,
|
|
1517
2430
|
query_params,
|
|
1518
2431
|
undefined,
|
|
1519
2432
|
requestHeaders,
|
|
@@ -1527,10 +2440,10 @@ class Configuration {
|
|
|
1527
2440
|
|
|
1528
2441
|
const {
|
|
1529
2442
|
error: res_error,
|
|
1530
|
-
} = ConfigurationPlatformModel.
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
);
|
|
2443
|
+
} = ConfigurationPlatformModel.UrlRedirection().validate(responseData, {
|
|
2444
|
+
abortEarly: false,
|
|
2445
|
+
allowUnknown: true,
|
|
2446
|
+
});
|
|
1534
2447
|
|
|
1535
2448
|
if (res_error) {
|
|
1536
2449
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1538,7 +2451,7 @@ class Configuration {
|
|
|
1538
2451
|
} else {
|
|
1539
2452
|
Logger({
|
|
1540
2453
|
level: "WARN",
|
|
1541
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
2454
|
+
message: `Response Validation Warnings for platform > Configuration > getUrlRedirection \n ${res_error}`,
|
|
1542
2455
|
});
|
|
1543
2456
|
}
|
|
1544
2457
|
}
|
|
@@ -1547,30 +2460,25 @@ class Configuration {
|
|
|
1547
2460
|
}
|
|
1548
2461
|
|
|
1549
2462
|
/**
|
|
1550
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
2463
|
+
* @param {ConfigurationPlatformApplicationValidator.GetUrlRedirectionsParam} arg
|
|
1551
2464
|
* - Arg object
|
|
1552
2465
|
*
|
|
1553
2466
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1554
2467
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1555
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1558
|
-
* @
|
|
1559
|
-
* @
|
|
1560
|
-
* @description: Retrieve ordering stores accessible to staff members. Retrieve the details of all stores access given to the staff member (the selling locations where the sales channel will be utilized for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStaffOrderingStores/).
|
|
2468
|
+
* @returns {Promise<ConfigurationPlatformModel.UrlRedirectionResponse>} -
|
|
2469
|
+
* Success response
|
|
2470
|
+
* @name getUrlRedirections
|
|
2471
|
+
* @summary: Get URL redirections
|
|
2472
|
+
* @description: Retrieves the URL redirections for a specific application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getUrlRedirections/).
|
|
1561
2473
|
*/
|
|
1562
|
-
async
|
|
1563
|
-
{
|
|
2474
|
+
async getUrlRedirections(
|
|
2475
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1564
2476
|
{ responseHeaders } = { responseHeaders: false }
|
|
1565
2477
|
) {
|
|
1566
2478
|
const {
|
|
1567
2479
|
error,
|
|
1568
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1569
|
-
{
|
|
1570
|
-
pageNo,
|
|
1571
|
-
pageSize,
|
|
1572
|
-
q,
|
|
1573
|
-
},
|
|
2480
|
+
} = ConfigurationPlatformApplicationValidator.getUrlRedirections().validate(
|
|
2481
|
+
{},
|
|
1574
2482
|
{ abortEarly: false, allowUnknown: true }
|
|
1575
2483
|
);
|
|
1576
2484
|
if (error) {
|
|
@@ -1580,30 +2488,23 @@ class Configuration {
|
|
|
1580
2488
|
// Showing warrnings if extra unknown parameters are found
|
|
1581
2489
|
const {
|
|
1582
2490
|
error: warrning,
|
|
1583
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
1584
|
-
{
|
|
1585
|
-
pageNo,
|
|
1586
|
-
pageSize,
|
|
1587
|
-
q,
|
|
1588
|
-
},
|
|
2491
|
+
} = ConfigurationPlatformApplicationValidator.getUrlRedirections().validate(
|
|
2492
|
+
{},
|
|
1589
2493
|
{ abortEarly: false, allowUnknown: false }
|
|
1590
2494
|
);
|
|
1591
2495
|
if (warrning) {
|
|
1592
2496
|
Logger({
|
|
1593
2497
|
level: "WARN",
|
|
1594
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
2498
|
+
message: `Parameter Validation warrnings for platform > Configuration > getUrlRedirections \n ${warrning}`,
|
|
1595
2499
|
});
|
|
1596
2500
|
}
|
|
1597
2501
|
|
|
1598
2502
|
const query_params = {};
|
|
1599
|
-
query_params["page_no"] = pageNo;
|
|
1600
|
-
query_params["page_size"] = pageSize;
|
|
1601
|
-
query_params["q"] = q;
|
|
1602
2503
|
|
|
1603
2504
|
const response = await PlatformAPIClient.execute(
|
|
1604
2505
|
this.config,
|
|
1605
2506
|
"get",
|
|
1606
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
2507
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/url-redirection`,
|
|
1607
2508
|
query_params,
|
|
1608
2509
|
undefined,
|
|
1609
2510
|
requestHeaders,
|
|
@@ -1617,7 +2518,7 @@ class Configuration {
|
|
|
1617
2518
|
|
|
1618
2519
|
const {
|
|
1619
2520
|
error: res_error,
|
|
1620
|
-
} = ConfigurationPlatformModel.
|
|
2521
|
+
} = ConfigurationPlatformModel.UrlRedirectionResponse().validate(
|
|
1621
2522
|
responseData,
|
|
1622
2523
|
{ abortEarly: false, allowUnknown: true }
|
|
1623
2524
|
);
|
|
@@ -1628,7 +2529,7 @@ class Configuration {
|
|
|
1628
2529
|
} else {
|
|
1629
2530
|
Logger({
|
|
1630
2531
|
level: "WARN",
|
|
1631
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
2532
|
+
message: `Response Validation Warnings for platform > Configuration > getUrlRedirections \n ${res_error}`,
|
|
1632
2533
|
});
|
|
1633
2534
|
}
|
|
1634
2535
|
}
|
|
@@ -1644,8 +2545,8 @@ class Configuration {
|
|
|
1644
2545
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1645
2546
|
* @returns {Promise<ConfigurationPlatformModel.AppFeature>} - Success response
|
|
1646
2547
|
* @name modifyAppFeatures
|
|
1647
|
-
* @summary:
|
|
1648
|
-
* @description:
|
|
2548
|
+
* @summary: Modify application features.
|
|
2549
|
+
* @description: Update features of application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/modifyAppFeatures/).
|
|
1649
2550
|
*/
|
|
1650
2551
|
async modifyAppFeatures(
|
|
1651
2552
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1726,8 +2627,8 @@ class Configuration {
|
|
|
1726
2627
|
* @returns {Promise<ConfigurationPlatformModel.ApplicationInventory>} -
|
|
1727
2628
|
* Success response
|
|
1728
2629
|
* @name partiallyUpdateInventoryConfig
|
|
1729
|
-
* @summary: Partially update inventory configuration
|
|
1730
|
-
* @description:
|
|
2630
|
+
* @summary: Partially update inventory configuration.
|
|
2631
|
+
* @description: Partially update the configuration details of authentication, inventory, article assignment rules, reward points, cart, payment, order, logistics, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/partiallyUpdateInventoryConfig/).
|
|
1731
2632
|
*/
|
|
1732
2633
|
async partiallyUpdateInventoryConfig(
|
|
1733
2634
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1805,22 +2706,21 @@ class Configuration {
|
|
|
1805
2706
|
*
|
|
1806
2707
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1807
2708
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1808
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1809
|
-
*
|
|
1810
|
-
*
|
|
2709
|
+
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
2710
|
+
* Success response
|
|
1811
2711
|
* @name removeDomainById
|
|
1812
|
-
* @summary: Remove domain
|
|
1813
|
-
* @description: Delete a specific domain from the
|
|
2712
|
+
* @summary: Remove domain by ID.
|
|
2713
|
+
* @description: Delete a specific domain from the application. Delete a domain (secondary or shortlink domain) added to a sales channel. It will disable user's access to website, shared links, and other features associated with this domain. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/removeDomainById/).
|
|
1814
2714
|
*/
|
|
1815
2715
|
async removeDomainById(
|
|
1816
|
-
{
|
|
2716
|
+
{ domainId, requestHeaders } = { requestHeaders: {} },
|
|
1817
2717
|
{ responseHeaders } = { responseHeaders: false }
|
|
1818
2718
|
) {
|
|
1819
2719
|
const {
|
|
1820
2720
|
error,
|
|
1821
2721
|
} = ConfigurationPlatformApplicationValidator.removeDomainById().validate(
|
|
1822
2722
|
{
|
|
1823
|
-
|
|
2723
|
+
domainId,
|
|
1824
2724
|
},
|
|
1825
2725
|
{ abortEarly: false, allowUnknown: true }
|
|
1826
2726
|
);
|
|
@@ -1833,7 +2733,7 @@ class Configuration {
|
|
|
1833
2733
|
error: warrning,
|
|
1834
2734
|
} = ConfigurationPlatformApplicationValidator.removeDomainById().validate(
|
|
1835
2735
|
{
|
|
1836
|
-
|
|
2736
|
+
domainId,
|
|
1837
2737
|
},
|
|
1838
2738
|
{ abortEarly: false, allowUnknown: false }
|
|
1839
2739
|
);
|
|
@@ -1849,7 +2749,7 @@ class Configuration {
|
|
|
1849
2749
|
const response = await PlatformAPIClient.execute(
|
|
1850
2750
|
this.config,
|
|
1851
2751
|
"delete",
|
|
1852
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${
|
|
2752
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${domainId}`,
|
|
1853
2753
|
query_params,
|
|
1854
2754
|
undefined,
|
|
1855
2755
|
requestHeaders,
|
|
@@ -1863,7 +2763,7 @@ class Configuration {
|
|
|
1863
2763
|
|
|
1864
2764
|
const {
|
|
1865
2765
|
error: res_error,
|
|
1866
|
-
} = ConfigurationPlatformModel.
|
|
2766
|
+
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
1867
2767
|
responseData,
|
|
1868
2768
|
{ abortEarly: false, allowUnknown: true }
|
|
1869
2769
|
);
|
|
@@ -1888,11 +2788,10 @@ class Configuration {
|
|
|
1888
2788
|
*
|
|
1889
2789
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1890
2790
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1891
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
2791
|
+
* @returns {Promise<ConfigurationPlatformModel.SuccessMessageResponse>} -
|
|
2792
|
+
* Success response
|
|
1894
2793
|
* @name removeOrderingStoreCookie
|
|
1895
|
-
* @summary:
|
|
2794
|
+
* @summary: Unset the Ordering Store signed cookie.
|
|
1896
2795
|
* @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/removeOrderingStoreCookie/).
|
|
1897
2796
|
*/
|
|
1898
2797
|
async removeOrderingStoreCookie(
|
|
@@ -1942,7 +2841,7 @@ class Configuration {
|
|
|
1942
2841
|
|
|
1943
2842
|
const {
|
|
1944
2843
|
error: res_error,
|
|
1945
|
-
} = ConfigurationPlatformModel.
|
|
2844
|
+
} = ConfigurationPlatformModel.SuccessMessageResponse().validate(
|
|
1946
2845
|
responseData,
|
|
1947
2846
|
{ abortEarly: false, allowUnknown: true }
|
|
1948
2847
|
);
|
|
@@ -1967,11 +2866,10 @@ class Configuration {
|
|
|
1967
2866
|
*
|
|
1968
2867
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1969
2868
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1970
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
1971
|
-
* Success response
|
|
2869
|
+
* @returns {Promise<ConfigurationPlatformModel.TokenResponse>} - Success response
|
|
1972
2870
|
* @name updateAppApiTokens
|
|
1973
|
-
* @summary: Update
|
|
1974
|
-
* @description: Add
|
|
2871
|
+
* @summary: Update application API tokens.
|
|
2872
|
+
* @description: Add or edit the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google and Facebook auth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppApiTokens/).
|
|
1975
2873
|
*/
|
|
1976
2874
|
async updateAppApiTokens(
|
|
1977
2875
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2024,10 +2922,10 @@ class Configuration {
|
|
|
2024
2922
|
|
|
2025
2923
|
const {
|
|
2026
2924
|
error: res_error,
|
|
2027
|
-
} = ConfigurationPlatformModel.
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
);
|
|
2925
|
+
} = ConfigurationPlatformModel.TokenResponse().validate(responseData, {
|
|
2926
|
+
abortEarly: false,
|
|
2927
|
+
allowUnknown: true,
|
|
2928
|
+
});
|
|
2031
2929
|
|
|
2032
2930
|
if (res_error) {
|
|
2033
2931
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2051,7 +2949,7 @@ class Configuration {
|
|
|
2051
2949
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2052
2950
|
* @returns {Promise<ConfigurationPlatformModel.ApplicationDetail>} - Success response
|
|
2053
2951
|
* @name updateAppBasicDetails
|
|
2054
|
-
* @summary: Update
|
|
2952
|
+
* @summary: Update application basic details.
|
|
2055
2953
|
* @description: Modify sales channel details like name, description, logo, domain, company ID, and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppBasicDetails/).
|
|
2056
2954
|
*/
|
|
2057
2955
|
async updateAppBasicDetails(
|
|
@@ -2133,8 +3031,8 @@ class Configuration {
|
|
|
2133
3031
|
* @returns {Promise<ConfigurationPlatformModel.ApplicationInformation>} -
|
|
2134
3032
|
* Success response
|
|
2135
3033
|
* @name updateAppContactInfo
|
|
2136
|
-
* @summary: Update
|
|
2137
|
-
* @description: Modify the social links, copyright text, business highlights, address and contact information of the company/seller/brand operating the
|
|
3034
|
+
* @summary: Update application contact information.
|
|
3035
|
+
* @description: Modify the social links, copyright text, business highlights, address and contact information of the company/seller/brand operating the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppContactInfo/).
|
|
2138
3036
|
*/
|
|
2139
3037
|
async updateAppContactInfo(
|
|
2140
3038
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2215,8 +3113,8 @@ class Configuration {
|
|
|
2215
3113
|
* @returns {Promise<ConfigurationPlatformModel.AppSupportedCurrency>} -
|
|
2216
3114
|
* Success response
|
|
2217
3115
|
* @name updateAppCurrencyConfig
|
|
2218
|
-
* @summary: Update
|
|
2219
|
-
* @description: Modify currency configuration settings for the
|
|
3116
|
+
* @summary: Update application currency configuration.
|
|
3117
|
+
* @description: Modify currency configuration settings for the application. Add and edit the currencies supported in the application. Initially, INR will be enabled by default. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppCurrencyConfig/).
|
|
2220
3118
|
*/
|
|
2221
3119
|
async updateAppCurrencyConfig(
|
|
2222
3120
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2254,7 +3152,7 @@ class Configuration {
|
|
|
2254
3152
|
|
|
2255
3153
|
const response = await PlatformAPIClient.execute(
|
|
2256
3154
|
this.config,
|
|
2257
|
-
"
|
|
3155
|
+
"put",
|
|
2258
3156
|
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
2259
3157
|
query_params,
|
|
2260
3158
|
body,
|
|
@@ -2296,7 +3194,7 @@ class Configuration {
|
|
|
2296
3194
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2297
3195
|
* @returns {Promise<ConfigurationPlatformModel.AppFeature>} - Success response
|
|
2298
3196
|
* @name updateAppFeatures
|
|
2299
|
-
* @summary: Update
|
|
3197
|
+
* @summary: Update application features.
|
|
2300
3198
|
* @description: Modify the feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppFeatures/).
|
|
2301
3199
|
*/
|
|
2302
3200
|
async updateAppFeatures(
|
|
@@ -2370,26 +3268,24 @@ class Configuration {
|
|
|
2370
3268
|
}
|
|
2371
3269
|
|
|
2372
3270
|
/**
|
|
2373
|
-
* @param {ConfigurationPlatformApplicationValidator.
|
|
3271
|
+
* @param {ConfigurationPlatformApplicationValidator.UpdateApplicationParam} arg
|
|
2374
3272
|
* - Arg object
|
|
2375
3273
|
*
|
|
2376
3274
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2377
3275
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2378
|
-
* @returns {Promise<ConfigurationPlatformModel.
|
|
2379
|
-
*
|
|
2380
|
-
* @
|
|
2381
|
-
* @
|
|
2382
|
-
* @description: Modify the existing build configuration, such as app name, landing page image, splash image used in a mobile build. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateBuildConfig/).
|
|
3276
|
+
* @returns {Promise<ConfigurationPlatformModel.Application>} - Success response
|
|
3277
|
+
* @name updateApplication
|
|
3278
|
+
* @summary: Get application by ID.
|
|
3279
|
+
* @description: Update detailed information about a specific application. Use application ID to update the current sales channel details which includes channel name, description, banner, logo, favicon, domain details, token, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateApplication/).
|
|
2383
3280
|
*/
|
|
2384
|
-
async
|
|
2385
|
-
{
|
|
3281
|
+
async updateApplication(
|
|
3282
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2386
3283
|
{ responseHeaders } = { responseHeaders: false }
|
|
2387
3284
|
) {
|
|
2388
3285
|
const {
|
|
2389
3286
|
error,
|
|
2390
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
3287
|
+
} = ConfigurationPlatformApplicationValidator.updateApplication().validate(
|
|
2391
3288
|
{
|
|
2392
|
-
platformType,
|
|
2393
3289
|
body,
|
|
2394
3290
|
},
|
|
2395
3291
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2401,9 +3297,8 @@ class Configuration {
|
|
|
2401
3297
|
// Showing warrnings if extra unknown parameters are found
|
|
2402
3298
|
const {
|
|
2403
3299
|
error: warrning,
|
|
2404
|
-
} = ConfigurationPlatformApplicationValidator.
|
|
3300
|
+
} = ConfigurationPlatformApplicationValidator.updateApplication().validate(
|
|
2405
3301
|
{
|
|
2406
|
-
platformType,
|
|
2407
3302
|
body,
|
|
2408
3303
|
},
|
|
2409
3304
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2411,7 +3306,7 @@ class Configuration {
|
|
|
2411
3306
|
if (warrning) {
|
|
2412
3307
|
Logger({
|
|
2413
3308
|
level: "WARN",
|
|
2414
|
-
message: `Parameter Validation warrnings for platform > Configuration >
|
|
3309
|
+
message: `Parameter Validation warrnings for platform > Configuration > updateApplication \n ${warrning}`,
|
|
2415
3310
|
});
|
|
2416
3311
|
}
|
|
2417
3312
|
|
|
@@ -2420,7 +3315,7 @@ class Configuration {
|
|
|
2420
3315
|
const response = await PlatformAPIClient.execute(
|
|
2421
3316
|
this.config,
|
|
2422
3317
|
"put",
|
|
2423
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}
|
|
3318
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
2424
3319
|
query_params,
|
|
2425
3320
|
body,
|
|
2426
3321
|
requestHeaders,
|
|
@@ -2434,10 +3329,91 @@ class Configuration {
|
|
|
2434
3329
|
|
|
2435
3330
|
const {
|
|
2436
3331
|
error: res_error,
|
|
2437
|
-
} = ConfigurationPlatformModel.
|
|
2438
|
-
|
|
3332
|
+
} = ConfigurationPlatformModel.Application().validate(responseData, {
|
|
3333
|
+
abortEarly: false,
|
|
3334
|
+
allowUnknown: true,
|
|
3335
|
+
});
|
|
3336
|
+
|
|
3337
|
+
if (res_error) {
|
|
3338
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3339
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3340
|
+
} else {
|
|
3341
|
+
Logger({
|
|
3342
|
+
level: "WARN",
|
|
3343
|
+
message: `Response Validation Warnings for platform > Configuration > updateApplication \n ${res_error}`,
|
|
3344
|
+
});
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
return response;
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* @param {ConfigurationPlatformApplicationValidator.UpdateApplicationVersionParam} arg
|
|
3353
|
+
* - Arg object
|
|
3354
|
+
*
|
|
3355
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3356
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3357
|
+
* @returns {Promise<ConfigurationPlatformModel.PlatformVersion>} - Success response
|
|
3358
|
+
* @name updateApplicationVersion
|
|
3359
|
+
* @summary: Update Application Version
|
|
3360
|
+
* @description: Updates the version details of an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateApplicationVersion/).
|
|
3361
|
+
*/
|
|
3362
|
+
async updateApplicationVersion(
|
|
3363
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3364
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3365
|
+
) {
|
|
3366
|
+
const {
|
|
3367
|
+
error,
|
|
3368
|
+
} = ConfigurationPlatformApplicationValidator.updateApplicationVersion().validate(
|
|
3369
|
+
{
|
|
3370
|
+
body,
|
|
3371
|
+
},
|
|
2439
3372
|
{ abortEarly: false, allowUnknown: true }
|
|
2440
3373
|
);
|
|
3374
|
+
if (error) {
|
|
3375
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3379
|
+
const {
|
|
3380
|
+
error: warrning,
|
|
3381
|
+
} = ConfigurationPlatformApplicationValidator.updateApplicationVersion().validate(
|
|
3382
|
+
{
|
|
3383
|
+
body,
|
|
3384
|
+
},
|
|
3385
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3386
|
+
);
|
|
3387
|
+
if (warrning) {
|
|
3388
|
+
Logger({
|
|
3389
|
+
level: "WARN",
|
|
3390
|
+
message: `Parameter Validation warrnings for platform > Configuration > updateApplicationVersion \n ${warrning}`,
|
|
3391
|
+
});
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
const query_params = {};
|
|
3395
|
+
|
|
3396
|
+
const response = await PlatformAPIClient.execute(
|
|
3397
|
+
this.config,
|
|
3398
|
+
"put",
|
|
3399
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/version`,
|
|
3400
|
+
query_params,
|
|
3401
|
+
body,
|
|
3402
|
+
requestHeaders,
|
|
3403
|
+
{ responseHeaders }
|
|
3404
|
+
);
|
|
3405
|
+
|
|
3406
|
+
let responseData = response;
|
|
3407
|
+
if (responseHeaders) {
|
|
3408
|
+
responseData = response[0];
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
const {
|
|
3412
|
+
error: res_error,
|
|
3413
|
+
} = ConfigurationPlatformModel.PlatformVersion().validate(responseData, {
|
|
3414
|
+
abortEarly: false,
|
|
3415
|
+
allowUnknown: true,
|
|
3416
|
+
});
|
|
2441
3417
|
|
|
2442
3418
|
if (res_error) {
|
|
2443
3419
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2445,7 +3421,7 @@ class Configuration {
|
|
|
2445
3421
|
} else {
|
|
2446
3422
|
Logger({
|
|
2447
3423
|
level: "WARN",
|
|
2448
|
-
message: `Response Validation Warnings for platform > Configuration >
|
|
3424
|
+
message: `Response Validation Warnings for platform > Configuration > updateApplicationVersion \n ${res_error}`,
|
|
2449
3425
|
});
|
|
2450
3426
|
}
|
|
2451
3427
|
}
|
|
@@ -2462,7 +3438,7 @@ class Configuration {
|
|
|
2462
3438
|
* @returns {Promise<ConfigurationPlatformModel.ApplicationInventory>} -
|
|
2463
3439
|
* Success response
|
|
2464
3440
|
* @name updateInventoryConfig
|
|
2465
|
-
* @summary: Update inventory configuration
|
|
3441
|
+
* @summary: Update inventory configuration.
|
|
2466
3442
|
* @description: Modify the configuration details of authentication, inventory, article assignment rules, reward points, cart, payment, order, logistics, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateInventoryConfig/).
|
|
2467
3443
|
*/
|
|
2468
3444
|
async updateInventoryConfig(
|
|
@@ -2543,8 +3519,8 @@ class Configuration {
|
|
|
2543
3519
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2544
3520
|
* @returns {Promise<ConfigurationPlatformModel.DeploymentMeta>} - Success response
|
|
2545
3521
|
* @name updateOrderingStoreConfig
|
|
2546
|
-
* @summary: Update ordering store configuration
|
|
2547
|
-
* @description: Modify configuration settings for ordering stores. Edit the details of the deployment stores (the selling locations where the
|
|
3522
|
+
* @summary: Update ordering store configuration.
|
|
3523
|
+
* @description: Modify configuration settings for ordering stores. Edit the details of the deployment stores (the selling locations where the application will be utilised for placing orders) - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateOrderingStoreConfig/).
|
|
2548
3524
|
*/
|
|
2549
3525
|
async updateOrderingStoreConfig(
|
|
2550
3526
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2615,6 +3591,91 @@ class Configuration {
|
|
|
2615
3591
|
|
|
2616
3592
|
return response;
|
|
2617
3593
|
}
|
|
3594
|
+
|
|
3595
|
+
/**
|
|
3596
|
+
* @param {ConfigurationPlatformApplicationValidator.UpdateUrlRedirectionParam} arg
|
|
3597
|
+
* - Arg object
|
|
3598
|
+
*
|
|
3599
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3600
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3601
|
+
* @returns {Promise<ConfigurationPlatformModel.UrlRedirection>} - Success response
|
|
3602
|
+
* @name updateUrlRedirection
|
|
3603
|
+
* @summary: Update a URL redirection
|
|
3604
|
+
* @description: Update a new URL redirection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateUrlRedirection/).
|
|
3605
|
+
*/
|
|
3606
|
+
async updateUrlRedirection(
|
|
3607
|
+
{ redirectionDomainId, body, requestHeaders } = { requestHeaders: {} },
|
|
3608
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3609
|
+
) {
|
|
3610
|
+
const {
|
|
3611
|
+
error,
|
|
3612
|
+
} = ConfigurationPlatformApplicationValidator.updateUrlRedirection().validate(
|
|
3613
|
+
{
|
|
3614
|
+
redirectionDomainId,
|
|
3615
|
+
|
|
3616
|
+
body,
|
|
3617
|
+
},
|
|
3618
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3619
|
+
);
|
|
3620
|
+
if (error) {
|
|
3621
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3625
|
+
const {
|
|
3626
|
+
error: warrning,
|
|
3627
|
+
} = ConfigurationPlatformApplicationValidator.updateUrlRedirection().validate(
|
|
3628
|
+
{
|
|
3629
|
+
redirectionDomainId,
|
|
3630
|
+
|
|
3631
|
+
body,
|
|
3632
|
+
},
|
|
3633
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3634
|
+
);
|
|
3635
|
+
if (warrning) {
|
|
3636
|
+
Logger({
|
|
3637
|
+
level: "WARN",
|
|
3638
|
+
message: `Parameter Validation warrnings for platform > Configuration > updateUrlRedirection \n ${warrning}`,
|
|
3639
|
+
});
|
|
3640
|
+
}
|
|
3641
|
+
|
|
3642
|
+
const query_params = {};
|
|
3643
|
+
|
|
3644
|
+
const response = await PlatformAPIClient.execute(
|
|
3645
|
+
this.config,
|
|
3646
|
+
"put",
|
|
3647
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/url-redirection/${redirectionDomainId}`,
|
|
3648
|
+
query_params,
|
|
3649
|
+
body,
|
|
3650
|
+
requestHeaders,
|
|
3651
|
+
{ responseHeaders }
|
|
3652
|
+
);
|
|
3653
|
+
|
|
3654
|
+
let responseData = response;
|
|
3655
|
+
if (responseHeaders) {
|
|
3656
|
+
responseData = response[0];
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3659
|
+
const {
|
|
3660
|
+
error: res_error,
|
|
3661
|
+
} = ConfigurationPlatformModel.UrlRedirection().validate(responseData, {
|
|
3662
|
+
abortEarly: false,
|
|
3663
|
+
allowUnknown: true,
|
|
3664
|
+
});
|
|
3665
|
+
|
|
3666
|
+
if (res_error) {
|
|
3667
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3668
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3669
|
+
} else {
|
|
3670
|
+
Logger({
|
|
3671
|
+
level: "WARN",
|
|
3672
|
+
message: `Response Validation Warnings for platform > Configuration > updateUrlRedirection \n ${res_error}`,
|
|
3673
|
+
});
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3676
|
+
|
|
3677
|
+
return response;
|
|
3678
|
+
}
|
|
2618
3679
|
}
|
|
2619
3680
|
|
|
2620
3681
|
module.exports = Configuration;
|