@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
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 +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const CatalogApplicationValidator = require("./CatalogApplicationValidator");
|
|
6
|
+
const CatalogApplicationModel = require("./CatalogApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -79,16 +79,18 @@ class Catalog {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* @param {
|
|
83
|
-
* @param {
|
|
84
|
-
*
|
|
85
|
-
* @
|
|
86
|
-
* @returns {Promise<FollowPostResponse>} - Success response
|
|
82
|
+
* @param {CatalogApplicationValidator.FollowByIdParam} arg - Arg object.
|
|
83
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
84
|
+
* @returns {Promise<CatalogApplicationModel.FollowPostResponse>} - Success response
|
|
85
|
+
* @name followById
|
|
87
86
|
* @summary: Follow an entity (product/brand/collection)
|
|
88
|
-
* @description: Follow a particular entity such as product, brand, collection specified by its ID.
|
|
87
|
+
* @description: Follow a particular entity such as product, brand, collection specified by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/).
|
|
89
88
|
*/
|
|
90
|
-
async followById(
|
|
91
|
-
|
|
89
|
+
async followById(
|
|
90
|
+
{ collectionType, collectionId } = {},
|
|
91
|
+
{ headers } = { headers: false }
|
|
92
|
+
) {
|
|
93
|
+
const { error } = CatalogApplicationValidator.followById().validate(
|
|
92
94
|
{ collectionType, collectionId },
|
|
93
95
|
{ abortEarly: false, allowUnknown: true }
|
|
94
96
|
);
|
|
@@ -97,16 +99,17 @@ class Catalog {
|
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
// Showing warrnings if extra unknown parameters are found
|
|
100
|
-
const {
|
|
102
|
+
const {
|
|
103
|
+
error: warrning,
|
|
104
|
+
} = CatalogApplicationValidator.followById().validate(
|
|
101
105
|
{ collectionType, collectionId },
|
|
102
106
|
{ abortEarly: false, allowUnknown: false }
|
|
103
107
|
);
|
|
104
108
|
if (warrning) {
|
|
105
109
|
Logger({
|
|
106
110
|
level: "WARN",
|
|
107
|
-
message:
|
|
111
|
+
message: `Parameter Validation warrnings for application > Catalog > followById \n ${warrning}`,
|
|
108
112
|
});
|
|
109
|
-
Logger({ level: "WARN", message: warrning });
|
|
110
113
|
}
|
|
111
114
|
|
|
112
115
|
const query_params = {};
|
|
@@ -122,12 +125,18 @@ class Catalog {
|
|
|
122
125
|
}),
|
|
123
126
|
query_params,
|
|
124
127
|
undefined,
|
|
125
|
-
xHeaders
|
|
128
|
+
xHeaders,
|
|
129
|
+
{ headers }
|
|
126
130
|
);
|
|
127
131
|
|
|
132
|
+
let responseData = response;
|
|
133
|
+
if (headers) {
|
|
134
|
+
responseData = response[0];
|
|
135
|
+
}
|
|
136
|
+
|
|
128
137
|
const {
|
|
129
138
|
error: res_error,
|
|
130
|
-
} =
|
|
139
|
+
} = CatalogApplicationModel.FollowPostResponse().validate(responseData, {
|
|
131
140
|
abortEarly: false,
|
|
132
141
|
allowUnknown: false,
|
|
133
142
|
});
|
|
@@ -135,25 +144,25 @@ class Catalog {
|
|
|
135
144
|
if (res_error) {
|
|
136
145
|
Logger({
|
|
137
146
|
level: "WARN",
|
|
138
|
-
message:
|
|
147
|
+
message: `Response Validation Warnnings for application > Catalog > followById \n ${res_error}`,
|
|
139
148
|
});
|
|
140
|
-
Logger({ level: "WARN", message: res_error });
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
return response;
|
|
144
152
|
}
|
|
145
153
|
|
|
146
154
|
/**
|
|
147
|
-
* @param {
|
|
148
|
-
* @param {
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @returns {Promise<BrandDetailResponse>} - Success response
|
|
155
|
+
* @param {CatalogApplicationValidator.GetBrandDetailBySlugParam} arg - Arg object.
|
|
156
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
157
|
+
* @returns {Promise<CatalogApplicationModel.BrandDetailResponse>} - Success response
|
|
158
|
+
* @name getBrandDetailBySlug
|
|
152
159
|
* @summary: Get metadata of a brand
|
|
153
|
-
* @description: Fetch metadata of a brand such as name, information, logo, banner, etc.
|
|
160
|
+
* @description: Fetch metadata of a brand such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrandDetailBySlug/).
|
|
154
161
|
*/
|
|
155
|
-
async getBrandDetailBySlug({ slug } = {}) {
|
|
156
|
-
const {
|
|
162
|
+
async getBrandDetailBySlug({ slug } = {}, { headers } = { headers: false }) {
|
|
163
|
+
const {
|
|
164
|
+
error,
|
|
165
|
+
} = CatalogApplicationValidator.getBrandDetailBySlug().validate(
|
|
157
166
|
{ slug },
|
|
158
167
|
{ abortEarly: false, allowUnknown: true }
|
|
159
168
|
);
|
|
@@ -164,16 +173,15 @@ class Catalog {
|
|
|
164
173
|
// Showing warrnings if extra unknown parameters are found
|
|
165
174
|
const {
|
|
166
175
|
error: warrning,
|
|
167
|
-
} =
|
|
176
|
+
} = CatalogApplicationValidator.getBrandDetailBySlug().validate(
|
|
168
177
|
{ slug },
|
|
169
178
|
{ abortEarly: false, allowUnknown: false }
|
|
170
179
|
);
|
|
171
180
|
if (warrning) {
|
|
172
181
|
Logger({
|
|
173
182
|
level: "WARN",
|
|
174
|
-
message:
|
|
183
|
+
message: `Parameter Validation warrnings for application > Catalog > getBrandDetailBySlug \n ${warrning}`,
|
|
175
184
|
});
|
|
176
|
-
Logger({ level: "WARN", message: warrning });
|
|
177
185
|
}
|
|
178
186
|
|
|
179
187
|
const query_params = {};
|
|
@@ -189,12 +197,18 @@ class Catalog {
|
|
|
189
197
|
}),
|
|
190
198
|
query_params,
|
|
191
199
|
undefined,
|
|
192
|
-
xHeaders
|
|
200
|
+
xHeaders,
|
|
201
|
+
{ headers }
|
|
193
202
|
);
|
|
194
203
|
|
|
204
|
+
let responseData = response;
|
|
205
|
+
if (headers) {
|
|
206
|
+
responseData = response[0];
|
|
207
|
+
}
|
|
208
|
+
|
|
195
209
|
const {
|
|
196
210
|
error: res_error,
|
|
197
|
-
} =
|
|
211
|
+
} = CatalogApplicationModel.BrandDetailResponse().validate(responseData, {
|
|
198
212
|
abortEarly: false,
|
|
199
213
|
allowUnknown: false,
|
|
200
214
|
});
|
|
@@ -202,29 +216,26 @@ class Catalog {
|
|
|
202
216
|
if (res_error) {
|
|
203
217
|
Logger({
|
|
204
218
|
level: "WARN",
|
|
205
|
-
message:
|
|
219
|
+
message: `Response Validation Warnnings for application > Catalog > getBrandDetailBySlug \n ${res_error}`,
|
|
206
220
|
});
|
|
207
|
-
Logger({ level: "WARN", message: res_error });
|
|
208
221
|
}
|
|
209
222
|
|
|
210
223
|
return response;
|
|
211
224
|
}
|
|
212
225
|
|
|
213
226
|
/**
|
|
214
|
-
* @param {
|
|
215
|
-
* @param {
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
* from the endpoint /service/application/catalog/v1.0/departments/
|
|
219
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
220
|
-
* given set of results.
|
|
221
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
222
|
-
* @returns {Promise<BrandListingResponse>} - Success response
|
|
227
|
+
* @param {CatalogApplicationValidator.GetBrandsParam} arg - Arg object.
|
|
228
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
229
|
+
* @returns {Promise<CatalogApplicationModel.BrandListingResponse>} - Success response
|
|
230
|
+
* @name getBrands
|
|
223
231
|
* @summary: Get all the brands
|
|
224
|
-
* @description: A brand is the name under which a product is sold. Use this API to list all the brands. You can also filter the brands by department.
|
|
232
|
+
* @description: A brand is the name under which a product is sold. Use this API to list all the brands. You can also filter the brands by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrands/).
|
|
225
233
|
*/
|
|
226
|
-
async getBrands(
|
|
227
|
-
|
|
234
|
+
async getBrands(
|
|
235
|
+
{ department, pageNo, pageSize } = {},
|
|
236
|
+
{ headers } = { headers: false }
|
|
237
|
+
) {
|
|
238
|
+
const { error } = CatalogApplicationValidator.getBrands().validate(
|
|
228
239
|
{ department, pageNo, pageSize },
|
|
229
240
|
{ abortEarly: false, allowUnknown: true }
|
|
230
241
|
);
|
|
@@ -233,16 +244,17 @@ class Catalog {
|
|
|
233
244
|
}
|
|
234
245
|
|
|
235
246
|
// Showing warrnings if extra unknown parameters are found
|
|
236
|
-
const {
|
|
247
|
+
const {
|
|
248
|
+
error: warrning,
|
|
249
|
+
} = CatalogApplicationValidator.getBrands().validate(
|
|
237
250
|
{ department, pageNo, pageSize },
|
|
238
251
|
{ abortEarly: false, allowUnknown: false }
|
|
239
252
|
);
|
|
240
253
|
if (warrning) {
|
|
241
254
|
Logger({
|
|
242
255
|
level: "WARN",
|
|
243
|
-
message:
|
|
256
|
+
message: `Parameter Validation warrnings for application > Catalog > getBrands \n ${warrning}`,
|
|
244
257
|
});
|
|
245
|
-
Logger({ level: "WARN", message: warrning });
|
|
246
258
|
}
|
|
247
259
|
|
|
248
260
|
const query_params = {};
|
|
@@ -261,12 +273,18 @@ class Catalog {
|
|
|
261
273
|
}),
|
|
262
274
|
query_params,
|
|
263
275
|
undefined,
|
|
264
|
-
xHeaders
|
|
276
|
+
xHeaders,
|
|
277
|
+
{ headers }
|
|
265
278
|
);
|
|
266
279
|
|
|
280
|
+
let responseData = response;
|
|
281
|
+
if (headers) {
|
|
282
|
+
responseData = response[0];
|
|
283
|
+
}
|
|
284
|
+
|
|
267
285
|
const {
|
|
268
286
|
error: res_error,
|
|
269
|
-
} =
|
|
287
|
+
} = CatalogApplicationModel.BrandListingResponse().validate(responseData, {
|
|
270
288
|
abortEarly: false,
|
|
271
289
|
allowUnknown: false,
|
|
272
290
|
});
|
|
@@ -274,9 +292,8 @@ class Catalog {
|
|
|
274
292
|
if (res_error) {
|
|
275
293
|
Logger({
|
|
276
294
|
level: "WARN",
|
|
277
|
-
message:
|
|
295
|
+
message: `Response Validation Warnnings for application > Catalog > getBrands \n ${res_error}`,
|
|
278
296
|
});
|
|
279
|
-
Logger({ level: "WARN", message: res_error });
|
|
280
297
|
}
|
|
281
298
|
|
|
282
299
|
return response;
|
|
@@ -289,6 +306,7 @@ class Catalog {
|
|
|
289
306
|
* of available departments below. Also, you can get available departments
|
|
290
307
|
* from the endpoint /service/application/catalog/v1.0/departments/
|
|
291
308
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
309
|
+
* @returns {Paginator<CatalogApplicationModel.BrandListingResponse>}
|
|
292
310
|
* @summary: Get all the brands
|
|
293
311
|
* @description: A brand is the name under which a product is sold. Use this API to list all the brands. You can also filter the brands by department.
|
|
294
312
|
*/
|
|
@@ -314,17 +332,16 @@ class Catalog {
|
|
|
314
332
|
}
|
|
315
333
|
|
|
316
334
|
/**
|
|
317
|
-
* @param {
|
|
318
|
-
* @param {
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
* @returns {Promise<CategoryListingResponse>} - Success response
|
|
335
|
+
* @param {CatalogApplicationValidator.GetCategoriesParam} arg - Arg object.
|
|
336
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
337
|
+
* @returns {Promise<CatalogApplicationModel.CategoryListingResponse>} -
|
|
338
|
+
* Success response
|
|
339
|
+
* @name getCategories
|
|
323
340
|
* @summary: List all the categories
|
|
324
|
-
* @description: Use this API to list all the categories. You can also filter the categories by department.
|
|
341
|
+
* @description: Use this API to list all the categories. You can also filter the categories by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategories/).
|
|
325
342
|
*/
|
|
326
|
-
async getCategories({ department } = {}) {
|
|
327
|
-
const { error } =
|
|
343
|
+
async getCategories({ department } = {}, { headers } = { headers: false }) {
|
|
344
|
+
const { error } = CatalogApplicationValidator.getCategories().validate(
|
|
328
345
|
{ department },
|
|
329
346
|
{ abortEarly: false, allowUnknown: true }
|
|
330
347
|
);
|
|
@@ -333,16 +350,17 @@ class Catalog {
|
|
|
333
350
|
}
|
|
334
351
|
|
|
335
352
|
// Showing warrnings if extra unknown parameters are found
|
|
336
|
-
const {
|
|
353
|
+
const {
|
|
354
|
+
error: warrning,
|
|
355
|
+
} = CatalogApplicationValidator.getCategories().validate(
|
|
337
356
|
{ department },
|
|
338
357
|
{ abortEarly: false, allowUnknown: false }
|
|
339
358
|
);
|
|
340
359
|
if (warrning) {
|
|
341
360
|
Logger({
|
|
342
361
|
level: "WARN",
|
|
343
|
-
message:
|
|
362
|
+
message: `Parameter Validation warrnings for application > Catalog > getCategories \n ${warrning}`,
|
|
344
363
|
});
|
|
345
|
-
Logger({ level: "WARN", message: warrning });
|
|
346
364
|
}
|
|
347
365
|
|
|
348
366
|
const query_params = {};
|
|
@@ -359,38 +377,47 @@ class Catalog {
|
|
|
359
377
|
}),
|
|
360
378
|
query_params,
|
|
361
379
|
undefined,
|
|
362
|
-
xHeaders
|
|
380
|
+
xHeaders,
|
|
381
|
+
{ headers }
|
|
363
382
|
);
|
|
364
383
|
|
|
384
|
+
let responseData = response;
|
|
385
|
+
if (headers) {
|
|
386
|
+
responseData = response[0];
|
|
387
|
+
}
|
|
388
|
+
|
|
365
389
|
const {
|
|
366
390
|
error: res_error,
|
|
367
|
-
} =
|
|
368
|
-
|
|
369
|
-
allowUnknown: false
|
|
370
|
-
|
|
391
|
+
} = CatalogApplicationModel.CategoryListingResponse().validate(
|
|
392
|
+
responseData,
|
|
393
|
+
{ abortEarly: false, allowUnknown: false }
|
|
394
|
+
);
|
|
371
395
|
|
|
372
396
|
if (res_error) {
|
|
373
397
|
Logger({
|
|
374
398
|
level: "WARN",
|
|
375
|
-
message:
|
|
399
|
+
message: `Response Validation Warnnings for application > Catalog > getCategories \n ${res_error}`,
|
|
376
400
|
});
|
|
377
|
-
Logger({ level: "WARN", message: res_error });
|
|
378
401
|
}
|
|
379
402
|
|
|
380
403
|
return response;
|
|
381
404
|
}
|
|
382
405
|
|
|
383
406
|
/**
|
|
384
|
-
* @param {
|
|
385
|
-
* @param {
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* @returns {Promise<CategoryMetaResponse>} - Success response
|
|
407
|
+
* @param {CatalogApplicationValidator.GetCategoryDetailBySlugParam} arg - Arg object.
|
|
408
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
409
|
+
* @returns {Promise<CatalogApplicationModel.CategoryMetaResponse>} - Success response
|
|
410
|
+
* @name getCategoryDetailBySlug
|
|
389
411
|
* @summary: Get metadata of a category
|
|
390
|
-
* @description: Fetch metadata of a category such as name, information, logo, banner, etc.
|
|
412
|
+
* @description: Fetch metadata of a category such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategoryDetailBySlug/).
|
|
391
413
|
*/
|
|
392
|
-
async getCategoryDetailBySlug(
|
|
393
|
-
|
|
414
|
+
async getCategoryDetailBySlug(
|
|
415
|
+
{ slug } = {},
|
|
416
|
+
{ headers } = { headers: false }
|
|
417
|
+
) {
|
|
418
|
+
const {
|
|
419
|
+
error,
|
|
420
|
+
} = CatalogApplicationValidator.getCategoryDetailBySlug().validate(
|
|
394
421
|
{ slug },
|
|
395
422
|
{ abortEarly: false, allowUnknown: true }
|
|
396
423
|
);
|
|
@@ -401,16 +428,15 @@ class Catalog {
|
|
|
401
428
|
// Showing warrnings if extra unknown parameters are found
|
|
402
429
|
const {
|
|
403
430
|
error: warrning,
|
|
404
|
-
} =
|
|
431
|
+
} = CatalogApplicationValidator.getCategoryDetailBySlug().validate(
|
|
405
432
|
{ slug },
|
|
406
433
|
{ abortEarly: false, allowUnknown: false }
|
|
407
434
|
);
|
|
408
435
|
if (warrning) {
|
|
409
436
|
Logger({
|
|
410
437
|
level: "WARN",
|
|
411
|
-
message:
|
|
438
|
+
message: `Parameter Validation warrnings for application > Catalog > getCategoryDetailBySlug \n ${warrning}`,
|
|
412
439
|
});
|
|
413
|
-
Logger({ level: "WARN", message: warrning });
|
|
414
440
|
}
|
|
415
441
|
|
|
416
442
|
const query_params = {};
|
|
@@ -426,12 +452,18 @@ class Catalog {
|
|
|
426
452
|
}),
|
|
427
453
|
query_params,
|
|
428
454
|
undefined,
|
|
429
|
-
xHeaders
|
|
455
|
+
xHeaders,
|
|
456
|
+
{ headers }
|
|
430
457
|
);
|
|
431
458
|
|
|
459
|
+
let responseData = response;
|
|
460
|
+
if (headers) {
|
|
461
|
+
responseData = response[0];
|
|
462
|
+
}
|
|
463
|
+
|
|
432
464
|
const {
|
|
433
465
|
error: res_error,
|
|
434
|
-
} =
|
|
466
|
+
} = CatalogApplicationModel.CategoryMetaResponse().validate(responseData, {
|
|
435
467
|
abortEarly: false,
|
|
436
468
|
allowUnknown: false,
|
|
437
469
|
});
|
|
@@ -439,25 +471,31 @@ class Catalog {
|
|
|
439
471
|
if (res_error) {
|
|
440
472
|
Logger({
|
|
441
473
|
level: "WARN",
|
|
442
|
-
message:
|
|
474
|
+
message: `Response Validation Warnnings for application > Catalog > getCategoryDetailBySlug \n ${res_error}`,
|
|
443
475
|
});
|
|
444
|
-
Logger({ level: "WARN", message: res_error });
|
|
445
476
|
}
|
|
446
477
|
|
|
447
478
|
return response;
|
|
448
479
|
}
|
|
449
480
|
|
|
450
481
|
/**
|
|
451
|
-
* @param {
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
* @returns {Promise<CollectionDetailResponse>} -
|
|
482
|
+
* @param {CatalogApplicationValidator.GetCollectionDetailBySlugParam} arg
|
|
483
|
+
* - Arg object.
|
|
484
|
+
*
|
|
485
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
486
|
+
* @returns {Promise<CatalogApplicationModel.CollectionDetailResponse>} -
|
|
487
|
+
* Success response
|
|
488
|
+
* @name getCollectionDetailBySlug
|
|
456
489
|
* @summary: Get a particular collection
|
|
457
|
-
* @description: Get the details of a collection by its `slug`.
|
|
490
|
+
* @description: Get the details of a collection by its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/).
|
|
458
491
|
*/
|
|
459
|
-
async getCollectionDetailBySlug(
|
|
460
|
-
|
|
492
|
+
async getCollectionDetailBySlug(
|
|
493
|
+
{ slug } = {},
|
|
494
|
+
{ headers } = { headers: false }
|
|
495
|
+
) {
|
|
496
|
+
const {
|
|
497
|
+
error,
|
|
498
|
+
} = CatalogApplicationValidator.getCollectionDetailBySlug().validate(
|
|
461
499
|
{ slug },
|
|
462
500
|
{ abortEarly: false, allowUnknown: true }
|
|
463
501
|
);
|
|
@@ -468,16 +506,15 @@ class Catalog {
|
|
|
468
506
|
// Showing warrnings if extra unknown parameters are found
|
|
469
507
|
const {
|
|
470
508
|
error: warrning,
|
|
471
|
-
} =
|
|
509
|
+
} = CatalogApplicationValidator.getCollectionDetailBySlug().validate(
|
|
472
510
|
{ slug },
|
|
473
511
|
{ abortEarly: false, allowUnknown: false }
|
|
474
512
|
);
|
|
475
513
|
if (warrning) {
|
|
476
514
|
Logger({
|
|
477
515
|
level: "WARN",
|
|
478
|
-
message:
|
|
516
|
+
message: `Parameter Validation warrnings for application > Catalog > getCollectionDetailBySlug \n ${warrning}`,
|
|
479
517
|
});
|
|
480
|
-
Logger({ level: "WARN", message: warrning });
|
|
481
518
|
}
|
|
482
519
|
|
|
483
520
|
const query_params = {};
|
|
@@ -493,64 +530,49 @@ class Catalog {
|
|
|
493
530
|
}),
|
|
494
531
|
query_params,
|
|
495
532
|
undefined,
|
|
496
|
-
xHeaders
|
|
533
|
+
xHeaders,
|
|
534
|
+
{ headers }
|
|
497
535
|
);
|
|
498
536
|
|
|
537
|
+
let responseData = response;
|
|
538
|
+
if (headers) {
|
|
539
|
+
responseData = response[0];
|
|
540
|
+
}
|
|
541
|
+
|
|
499
542
|
const {
|
|
500
543
|
error: res_error,
|
|
501
|
-
} =
|
|
502
|
-
|
|
503
|
-
allowUnknown: false
|
|
504
|
-
|
|
544
|
+
} = CatalogApplicationModel.CollectionDetailResponse().validate(
|
|
545
|
+
responseData,
|
|
546
|
+
{ abortEarly: false, allowUnknown: false }
|
|
547
|
+
);
|
|
505
548
|
|
|
506
549
|
if (res_error) {
|
|
507
550
|
Logger({
|
|
508
551
|
level: "WARN",
|
|
509
|
-
message:
|
|
552
|
+
message: `Response Validation Warnnings for application > Catalog > getCollectionDetailBySlug \n ${res_error}`,
|
|
510
553
|
});
|
|
511
|
-
Logger({ level: "WARN", message: res_error });
|
|
512
554
|
}
|
|
513
555
|
|
|
514
556
|
return response;
|
|
515
557
|
}
|
|
516
558
|
|
|
517
559
|
/**
|
|
518
|
-
* @param {
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
* Pipe (||) denotes the OR condition, whereas Triple-colon (:::)
|
|
525
|
-
* indicates a new filter paramater applied as an AND condition.
|
|
526
|
-
* @param {string} [arg.q] - The search query for entering partial or full
|
|
527
|
-
* name of product, brand, category, or collection.
|
|
528
|
-
* @param {boolean} [arg.filters] - This is a boolean value, True for
|
|
529
|
-
* fetching all filter parameters and False for disabling the filter parameters.
|
|
530
|
-
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
531
|
-
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
532
|
-
* either ascending or descending order. See the supported values below.
|
|
533
|
-
* @param {string} [arg.pageId] - Page ID to retrieve next set of results.
|
|
534
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
535
|
-
* @param {number} [arg.pageNo] - Page Number to retrieve next set of results.
|
|
536
|
-
* @param {string} [arg.pageType] - Page Type to retrieve set of results can
|
|
537
|
-
* be cursor or number.
|
|
538
|
-
* @returns {Promise<ProductListingResponse>} - Success response
|
|
560
|
+
* @param {CatalogApplicationValidator.GetCollectionItemsBySlugParam} arg -
|
|
561
|
+
* Arg object.
|
|
562
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
563
|
+
* @returns {Promise<CatalogApplicationModel.ProductListingResponse>} -
|
|
564
|
+
* Success response
|
|
565
|
+
* @name getCollectionItemsBySlug
|
|
539
566
|
* @summary: Get the items in a collection
|
|
540
|
-
* @description: Get items in a collection specified by its `slug`.
|
|
567
|
+
* @description: Get items in a collection specified by its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/).
|
|
541
568
|
*/
|
|
542
|
-
async getCollectionItemsBySlug(
|
|
543
|
-
slug,
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
pageSize,
|
|
550
|
-
pageNo,
|
|
551
|
-
pageType,
|
|
552
|
-
} = {}) {
|
|
553
|
-
const { error } = CatalogValidator.getCollectionItemsBySlug().validate(
|
|
569
|
+
async getCollectionItemsBySlug(
|
|
570
|
+
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType } = {},
|
|
571
|
+
{ headers } = { headers: false }
|
|
572
|
+
) {
|
|
573
|
+
const {
|
|
574
|
+
error,
|
|
575
|
+
} = CatalogApplicationValidator.getCollectionItemsBySlug().validate(
|
|
554
576
|
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
555
577
|
{ abortEarly: false, allowUnknown: true }
|
|
556
578
|
);
|
|
@@ -561,16 +583,15 @@ class Catalog {
|
|
|
561
583
|
// Showing warrnings if extra unknown parameters are found
|
|
562
584
|
const {
|
|
563
585
|
error: warrning,
|
|
564
|
-
} =
|
|
586
|
+
} = CatalogApplicationValidator.getCollectionItemsBySlug().validate(
|
|
565
587
|
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
566
588
|
{ abortEarly: false, allowUnknown: false }
|
|
567
589
|
);
|
|
568
590
|
if (warrning) {
|
|
569
591
|
Logger({
|
|
570
592
|
level: "WARN",
|
|
571
|
-
message:
|
|
593
|
+
message: `Parameter Validation warrnings for application > Catalog > getCollectionItemsBySlug \n ${warrning}`,
|
|
572
594
|
});
|
|
573
|
-
Logger({ level: "WARN", message: warrning });
|
|
574
595
|
}
|
|
575
596
|
|
|
576
597
|
const query_params = {};
|
|
@@ -594,22 +615,27 @@ class Catalog {
|
|
|
594
615
|
}),
|
|
595
616
|
query_params,
|
|
596
617
|
undefined,
|
|
597
|
-
xHeaders
|
|
618
|
+
xHeaders,
|
|
619
|
+
{ headers }
|
|
598
620
|
);
|
|
599
621
|
|
|
622
|
+
let responseData = response;
|
|
623
|
+
if (headers) {
|
|
624
|
+
responseData = response[0];
|
|
625
|
+
}
|
|
626
|
+
|
|
600
627
|
const {
|
|
601
628
|
error: res_error,
|
|
602
|
-
} =
|
|
603
|
-
|
|
604
|
-
allowUnknown: false
|
|
605
|
-
|
|
629
|
+
} = CatalogApplicationModel.ProductListingResponse().validate(
|
|
630
|
+
responseData,
|
|
631
|
+
{ abortEarly: false, allowUnknown: false }
|
|
632
|
+
);
|
|
606
633
|
|
|
607
634
|
if (res_error) {
|
|
608
635
|
Logger({
|
|
609
636
|
level: "WARN",
|
|
610
|
-
message:
|
|
637
|
+
message: `Response Validation Warnnings for application > Catalog > getCollectionItemsBySlug \n ${res_error}`,
|
|
611
638
|
});
|
|
612
|
-
Logger({ level: "WARN", message: res_error });
|
|
613
639
|
}
|
|
614
640
|
|
|
615
641
|
return response;
|
|
@@ -632,6 +658,7 @@ class Catalog {
|
|
|
632
658
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
633
659
|
* either ascending or descending order. See the supported values below.
|
|
634
660
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
661
|
+
* @returns {Paginator<CatalogApplicationModel.ProductListingResponse>}
|
|
635
662
|
* @summary: Get the items in a collection
|
|
636
663
|
* @description: Get items in a collection specified by its `slug`.
|
|
637
664
|
*/
|
|
@@ -670,18 +697,20 @@ class Catalog {
|
|
|
670
697
|
}
|
|
671
698
|
|
|
672
699
|
/**
|
|
673
|
-
* @param {
|
|
674
|
-
* @param {
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
* @
|
|
679
|
-
* @returns {Promise<GetCollectionListingResponse>} - Success response
|
|
700
|
+
* @param {CatalogApplicationValidator.GetCollectionsParam} arg - Arg object.
|
|
701
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
702
|
+
* @returns {Promise<CatalogApplicationModel.GetCollectionListingResponse>}
|
|
703
|
+
* - Success response
|
|
704
|
+
*
|
|
705
|
+
* @name getCollections
|
|
680
706
|
* @summary: List all the collections
|
|
681
|
-
* @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently.
|
|
707
|
+
* @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/).
|
|
682
708
|
*/
|
|
683
|
-
async getCollections(
|
|
684
|
-
|
|
709
|
+
async getCollections(
|
|
710
|
+
{ pageNo, pageSize, tag, q } = {},
|
|
711
|
+
{ headers } = { headers: false }
|
|
712
|
+
) {
|
|
713
|
+
const { error } = CatalogApplicationValidator.getCollections().validate(
|
|
685
714
|
{ pageNo, pageSize, tag, q },
|
|
686
715
|
{ abortEarly: false, allowUnknown: true }
|
|
687
716
|
);
|
|
@@ -690,16 +719,17 @@ class Catalog {
|
|
|
690
719
|
}
|
|
691
720
|
|
|
692
721
|
// Showing warrnings if extra unknown parameters are found
|
|
693
|
-
const {
|
|
722
|
+
const {
|
|
723
|
+
error: warrning,
|
|
724
|
+
} = CatalogApplicationValidator.getCollections().validate(
|
|
694
725
|
{ pageNo, pageSize, tag, q },
|
|
695
726
|
{ abortEarly: false, allowUnknown: false }
|
|
696
727
|
);
|
|
697
728
|
if (warrning) {
|
|
698
729
|
Logger({
|
|
699
730
|
level: "WARN",
|
|
700
|
-
message:
|
|
731
|
+
message: `Parameter Validation warrnings for application > Catalog > getCollections \n ${warrning}`,
|
|
701
732
|
});
|
|
702
|
-
Logger({ level: "WARN", message: warrning });
|
|
703
733
|
}
|
|
704
734
|
|
|
705
735
|
const query_params = {};
|
|
@@ -719,22 +749,27 @@ class Catalog {
|
|
|
719
749
|
}),
|
|
720
750
|
query_params,
|
|
721
751
|
undefined,
|
|
722
|
-
xHeaders
|
|
752
|
+
xHeaders,
|
|
753
|
+
{ headers }
|
|
723
754
|
);
|
|
724
755
|
|
|
756
|
+
let responseData = response;
|
|
757
|
+
if (headers) {
|
|
758
|
+
responseData = response[0];
|
|
759
|
+
}
|
|
760
|
+
|
|
725
761
|
const {
|
|
726
762
|
error: res_error,
|
|
727
|
-
} =
|
|
728
|
-
|
|
729
|
-
allowUnknown: false
|
|
730
|
-
|
|
763
|
+
} = CatalogApplicationModel.GetCollectionListingResponse().validate(
|
|
764
|
+
responseData,
|
|
765
|
+
{ abortEarly: false, allowUnknown: false }
|
|
766
|
+
);
|
|
731
767
|
|
|
732
768
|
if (res_error) {
|
|
733
769
|
Logger({
|
|
734
770
|
level: "WARN",
|
|
735
|
-
message:
|
|
771
|
+
message: `Response Validation Warnnings for application > Catalog > getCollections \n ${res_error}`,
|
|
736
772
|
});
|
|
737
|
-
Logger({ level: "WARN", message: res_error });
|
|
738
773
|
}
|
|
739
774
|
|
|
740
775
|
return response;
|
|
@@ -745,6 +780,7 @@ class Catalog {
|
|
|
745
780
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
746
781
|
* @param {string[]} [arg.tag] - List of tags to filter collections
|
|
747
782
|
* @param {string} [arg.q] - Name of the collection to filter collection
|
|
783
|
+
* @returns {Paginator<CatalogApplicationModel.GetCollectionListingResponse>}
|
|
748
784
|
* @summary: List all the collections
|
|
749
785
|
* @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently.
|
|
750
786
|
*/
|
|
@@ -771,18 +807,24 @@ class Catalog {
|
|
|
771
807
|
}
|
|
772
808
|
|
|
773
809
|
/**
|
|
774
|
-
* @param {
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
* @returns {Promise<ProductFrequentlyComparedSimilarResponse>}
|
|
810
|
+
* @param {CatalogApplicationValidator.GetComparedFrequentlyProductBySlugParam} arg
|
|
811
|
+
* - Arg object.
|
|
812
|
+
*
|
|
813
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
814
|
+
* @returns {Promise<CatalogApplicationModel.ProductFrequentlyComparedSimilarResponse>}
|
|
815
|
+
* - Success response
|
|
816
|
+
*
|
|
817
|
+
* @name getComparedFrequentlyProductBySlug
|
|
779
818
|
* @summary: Get comparison between frequently compared products with the given product
|
|
780
|
-
* @description: Use this API to compare a given product automatically with products that are frequently compared with it. Only one slug is needed.
|
|
819
|
+
* @description: Use this API to compare a given product automatically with products that are frequently compared with it. Only one slug is needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/).
|
|
781
820
|
*/
|
|
782
|
-
async getComparedFrequentlyProductBySlug(
|
|
821
|
+
async getComparedFrequentlyProductBySlug(
|
|
822
|
+
{ slug } = {},
|
|
823
|
+
{ headers } = { headers: false }
|
|
824
|
+
) {
|
|
783
825
|
const {
|
|
784
826
|
error,
|
|
785
|
-
} =
|
|
827
|
+
} = CatalogApplicationValidator.getComparedFrequentlyProductBySlug().validate(
|
|
786
828
|
{ slug },
|
|
787
829
|
{ abortEarly: false, allowUnknown: true }
|
|
788
830
|
);
|
|
@@ -793,17 +835,15 @@ class Catalog {
|
|
|
793
835
|
// Showing warrnings if extra unknown parameters are found
|
|
794
836
|
const {
|
|
795
837
|
error: warrning,
|
|
796
|
-
} =
|
|
838
|
+
} = CatalogApplicationValidator.getComparedFrequentlyProductBySlug().validate(
|
|
797
839
|
{ slug },
|
|
798
840
|
{ abortEarly: false, allowUnknown: false }
|
|
799
841
|
);
|
|
800
842
|
if (warrning) {
|
|
801
843
|
Logger({
|
|
802
844
|
level: "WARN",
|
|
803
|
-
message:
|
|
804
|
-
"Parameter Validation warrnings for getComparedFrequentlyProductBySlug",
|
|
845
|
+
message: `Parameter Validation warrnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${warrning}`,
|
|
805
846
|
});
|
|
806
|
-
Logger({ level: "WARN", message: warrning });
|
|
807
847
|
}
|
|
808
848
|
|
|
809
849
|
const query_params = {};
|
|
@@ -819,36 +859,41 @@ class Catalog {
|
|
|
819
859
|
}),
|
|
820
860
|
query_params,
|
|
821
861
|
undefined,
|
|
822
|
-
xHeaders
|
|
862
|
+
xHeaders,
|
|
863
|
+
{ headers }
|
|
823
864
|
);
|
|
824
865
|
|
|
866
|
+
let responseData = response;
|
|
867
|
+
if (headers) {
|
|
868
|
+
responseData = response[0];
|
|
869
|
+
}
|
|
870
|
+
|
|
825
871
|
const {
|
|
826
872
|
error: res_error,
|
|
827
|
-
} =
|
|
828
|
-
|
|
873
|
+
} = CatalogApplicationModel.ProductFrequentlyComparedSimilarResponse().validate(
|
|
874
|
+
responseData,
|
|
829
875
|
{ abortEarly: false, allowUnknown: false }
|
|
830
876
|
);
|
|
831
877
|
|
|
832
878
|
if (res_error) {
|
|
833
879
|
Logger({
|
|
834
880
|
level: "WARN",
|
|
835
|
-
message:
|
|
836
|
-
"Response Validation Warnnings for getComparedFrequentlyProductBySlug",
|
|
881
|
+
message: `Response Validation Warnnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${res_error}`,
|
|
837
882
|
});
|
|
838
|
-
Logger({ level: "WARN", message: res_error });
|
|
839
883
|
}
|
|
840
884
|
|
|
841
885
|
return response;
|
|
842
886
|
}
|
|
843
887
|
|
|
844
888
|
/**
|
|
845
|
-
* @param {
|
|
846
|
-
* @returns {Promise<DepartmentResponse>} - Success response
|
|
889
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
890
|
+
* @returns {Promise<CatalogApplicationModel.DepartmentResponse>} - Success response
|
|
891
|
+
* @name getDepartments
|
|
847
892
|
* @summary: List all the departments
|
|
848
|
-
* @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the departments. If successful, returns the list of departments specified in `DepartmentResponse`
|
|
893
|
+
* @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the departments. If successful, returns the list of departments specified in `DepartmentResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/).
|
|
849
894
|
*/
|
|
850
|
-
async getDepartments({} = {}) {
|
|
851
|
-
const { error } =
|
|
895
|
+
async getDepartments({ headers } = { headers: false }) {
|
|
896
|
+
const { error } = CatalogApplicationValidator.getDepartments().validate(
|
|
852
897
|
{},
|
|
853
898
|
{ abortEarly: false, allowUnknown: true }
|
|
854
899
|
);
|
|
@@ -857,16 +902,17 @@ class Catalog {
|
|
|
857
902
|
}
|
|
858
903
|
|
|
859
904
|
// Showing warrnings if extra unknown parameters are found
|
|
860
|
-
const {
|
|
905
|
+
const {
|
|
906
|
+
error: warrning,
|
|
907
|
+
} = CatalogApplicationValidator.getDepartments().validate(
|
|
861
908
|
{},
|
|
862
909
|
{ abortEarly: false, allowUnknown: false }
|
|
863
910
|
);
|
|
864
911
|
if (warrning) {
|
|
865
912
|
Logger({
|
|
866
913
|
level: "WARN",
|
|
867
|
-
message:
|
|
914
|
+
message: `Parameter Validation warrnings for application > Catalog > getDepartments \n ${warrning}`,
|
|
868
915
|
});
|
|
869
|
-
Logger({ level: "WARN", message: warrning });
|
|
870
916
|
}
|
|
871
917
|
|
|
872
918
|
const query_params = {};
|
|
@@ -882,12 +928,18 @@ class Catalog {
|
|
|
882
928
|
}),
|
|
883
929
|
query_params,
|
|
884
930
|
undefined,
|
|
885
|
-
xHeaders
|
|
931
|
+
xHeaders,
|
|
932
|
+
{ headers }
|
|
886
933
|
);
|
|
887
934
|
|
|
935
|
+
let responseData = response;
|
|
936
|
+
if (headers) {
|
|
937
|
+
responseData = response[0];
|
|
938
|
+
}
|
|
939
|
+
|
|
888
940
|
const {
|
|
889
941
|
error: res_error,
|
|
890
|
-
} =
|
|
942
|
+
} = CatalogApplicationModel.DepartmentResponse().validate(responseData, {
|
|
891
943
|
abortEarly: false,
|
|
892
944
|
allowUnknown: false,
|
|
893
945
|
});
|
|
@@ -895,24 +947,26 @@ class Catalog {
|
|
|
895
947
|
if (res_error) {
|
|
896
948
|
Logger({
|
|
897
949
|
level: "WARN",
|
|
898
|
-
message:
|
|
950
|
+
message: `Response Validation Warnnings for application > Catalog > getDepartments \n ${res_error}`,
|
|
899
951
|
});
|
|
900
|
-
Logger({ level: "WARN", message: res_error });
|
|
901
952
|
}
|
|
902
953
|
|
|
903
954
|
return response;
|
|
904
955
|
}
|
|
905
956
|
|
|
906
957
|
/**
|
|
907
|
-
* @param {
|
|
908
|
-
* @param {
|
|
909
|
-
*
|
|
910
|
-
* @
|
|
958
|
+
* @param {CatalogApplicationValidator.GetFollowIdsParam} arg - Arg object.
|
|
959
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
960
|
+
* @returns {Promise<CatalogApplicationModel.FollowIdsResponse>} - Success response
|
|
961
|
+
* @name getFollowIds
|
|
911
962
|
* @summary: Get the IDs of followed products, brands and collections.
|
|
912
|
-
* @description: You can get the IDs of all the followed Products, Brands and Collections. Pass collection_type as query parameter to fetch specific Ids
|
|
963
|
+
* @description: You can get the IDs of all the followed Products, Brands and Collections. Pass collection_type as query parameter to fetch specific Ids - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowIds/).
|
|
913
964
|
*/
|
|
914
|
-
async getFollowIds(
|
|
915
|
-
|
|
965
|
+
async getFollowIds(
|
|
966
|
+
{ collectionType } = {},
|
|
967
|
+
{ headers } = { headers: false }
|
|
968
|
+
) {
|
|
969
|
+
const { error } = CatalogApplicationValidator.getFollowIds().validate(
|
|
916
970
|
{ collectionType },
|
|
917
971
|
{ abortEarly: false, allowUnknown: true }
|
|
918
972
|
);
|
|
@@ -921,16 +975,17 @@ class Catalog {
|
|
|
921
975
|
}
|
|
922
976
|
|
|
923
977
|
// Showing warrnings if extra unknown parameters are found
|
|
924
|
-
const {
|
|
978
|
+
const {
|
|
979
|
+
error: warrning,
|
|
980
|
+
} = CatalogApplicationValidator.getFollowIds().validate(
|
|
925
981
|
{ collectionType },
|
|
926
982
|
{ abortEarly: false, allowUnknown: false }
|
|
927
983
|
);
|
|
928
984
|
if (warrning) {
|
|
929
985
|
Logger({
|
|
930
986
|
level: "WARN",
|
|
931
|
-
message:
|
|
987
|
+
message: `Parameter Validation warrnings for application > Catalog > getFollowIds \n ${warrning}`,
|
|
932
988
|
});
|
|
933
|
-
Logger({ level: "WARN", message: warrning });
|
|
934
989
|
}
|
|
935
990
|
|
|
936
991
|
const query_params = {};
|
|
@@ -947,12 +1002,18 @@ class Catalog {
|
|
|
947
1002
|
}),
|
|
948
1003
|
query_params,
|
|
949
1004
|
undefined,
|
|
950
|
-
xHeaders
|
|
1005
|
+
xHeaders,
|
|
1006
|
+
{ headers }
|
|
951
1007
|
);
|
|
952
1008
|
|
|
1009
|
+
let responseData = response;
|
|
1010
|
+
if (headers) {
|
|
1011
|
+
responseData = response[0];
|
|
1012
|
+
}
|
|
1013
|
+
|
|
953
1014
|
const {
|
|
954
1015
|
error: res_error,
|
|
955
|
-
} =
|
|
1016
|
+
} = CatalogApplicationModel.FollowIdsResponse().validate(responseData, {
|
|
956
1017
|
abortEarly: false,
|
|
957
1018
|
allowUnknown: false,
|
|
958
1019
|
});
|
|
@@ -960,26 +1021,27 @@ class Catalog {
|
|
|
960
1021
|
if (res_error) {
|
|
961
1022
|
Logger({
|
|
962
1023
|
level: "WARN",
|
|
963
|
-
message:
|
|
1024
|
+
message: `Response Validation Warnnings for application > Catalog > getFollowIds \n ${res_error}`,
|
|
964
1025
|
});
|
|
965
|
-
Logger({ level: "WARN", message: res_error });
|
|
966
1026
|
}
|
|
967
1027
|
|
|
968
1028
|
return response;
|
|
969
1029
|
}
|
|
970
1030
|
|
|
971
1031
|
/**
|
|
972
|
-
* @param {
|
|
973
|
-
* @param {
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
* @
|
|
977
|
-
* @returns {Promise<GetFollowListingResponse>} - Success response
|
|
1032
|
+
* @param {CatalogApplicationValidator.GetFollowedListingParam} arg - Arg object.
|
|
1033
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1034
|
+
* @returns {Promise<CatalogApplicationModel.GetFollowListingResponse>} -
|
|
1035
|
+
* Success response
|
|
1036
|
+
* @name getFollowedListing
|
|
978
1037
|
* @summary: Get a list of followed Products, Brands, Collections
|
|
979
|
-
* @description: Users can follow a product they like. This API retrieves the products the user have followed.
|
|
1038
|
+
* @description: Users can follow a product they like. This API retrieves the products the user have followed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
|
|
980
1039
|
*/
|
|
981
|
-
async getFollowedListing(
|
|
982
|
-
|
|
1040
|
+
async getFollowedListing(
|
|
1041
|
+
{ collectionType, pageId, pageSize } = {},
|
|
1042
|
+
{ headers } = { headers: false }
|
|
1043
|
+
) {
|
|
1044
|
+
const { error } = CatalogApplicationValidator.getFollowedListing().validate(
|
|
983
1045
|
{ collectionType, pageId, pageSize },
|
|
984
1046
|
{ abortEarly: false, allowUnknown: true }
|
|
985
1047
|
);
|
|
@@ -988,16 +1050,17 @@ class Catalog {
|
|
|
988
1050
|
}
|
|
989
1051
|
|
|
990
1052
|
// Showing warrnings if extra unknown parameters are found
|
|
991
|
-
const {
|
|
1053
|
+
const {
|
|
1054
|
+
error: warrning,
|
|
1055
|
+
} = CatalogApplicationValidator.getFollowedListing().validate(
|
|
992
1056
|
{ collectionType, pageId, pageSize },
|
|
993
1057
|
{ abortEarly: false, allowUnknown: false }
|
|
994
1058
|
);
|
|
995
1059
|
if (warrning) {
|
|
996
1060
|
Logger({
|
|
997
1061
|
level: "WARN",
|
|
998
|
-
message:
|
|
1062
|
+
message: `Parameter Validation warrnings for application > Catalog > getFollowedListing \n ${warrning}`,
|
|
999
1063
|
});
|
|
1000
|
-
Logger({ level: "WARN", message: warrning });
|
|
1001
1064
|
}
|
|
1002
1065
|
|
|
1003
1066
|
const query_params = {};
|
|
@@ -1015,22 +1078,27 @@ class Catalog {
|
|
|
1015
1078
|
}),
|
|
1016
1079
|
query_params,
|
|
1017
1080
|
undefined,
|
|
1018
|
-
xHeaders
|
|
1081
|
+
xHeaders,
|
|
1082
|
+
{ headers }
|
|
1019
1083
|
);
|
|
1020
1084
|
|
|
1085
|
+
let responseData = response;
|
|
1086
|
+
if (headers) {
|
|
1087
|
+
responseData = response[0];
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1021
1090
|
const {
|
|
1022
1091
|
error: res_error,
|
|
1023
|
-
} =
|
|
1024
|
-
|
|
1025
|
-
allowUnknown: false
|
|
1026
|
-
|
|
1092
|
+
} = CatalogApplicationModel.GetFollowListingResponse().validate(
|
|
1093
|
+
responseData,
|
|
1094
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1095
|
+
);
|
|
1027
1096
|
|
|
1028
1097
|
if (res_error) {
|
|
1029
1098
|
Logger({
|
|
1030
1099
|
level: "WARN",
|
|
1031
|
-
message:
|
|
1100
|
+
message: `Response Validation Warnnings for application > Catalog > getFollowedListing \n ${res_error}`,
|
|
1032
1101
|
});
|
|
1033
|
-
Logger({ level: "WARN", message: res_error });
|
|
1034
1102
|
}
|
|
1035
1103
|
|
|
1036
1104
|
return response;
|
|
@@ -1041,6 +1109,7 @@ class Catalog {
|
|
|
1041
1109
|
* @param {string} arg.collectionType - Type of collection followed, i.e.
|
|
1042
1110
|
* products, brands, or collections.
|
|
1043
1111
|
* @param {number} [arg.pageSize] - Page ID to retrieve next set of results.
|
|
1112
|
+
* @returns {Paginator<CatalogApplicationModel.GetFollowListingResponse>}
|
|
1044
1113
|
* @summary: Get a list of followed Products, Brands, Collections
|
|
1045
1114
|
* @description: Users can follow a product they like. This API retrieves the products the user have followed.
|
|
1046
1115
|
*/
|
|
@@ -1066,16 +1135,21 @@ class Catalog {
|
|
|
1066
1135
|
}
|
|
1067
1136
|
|
|
1068
1137
|
/**
|
|
1069
|
-
* @param {
|
|
1070
|
-
* @param {
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1073
|
-
* @
|
|
1138
|
+
* @param {CatalogApplicationValidator.GetFollowerCountByIdParam} arg - Arg object.
|
|
1139
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1140
|
+
* @returns {Promise<CatalogApplicationModel.FollowerCountResponse>} -
|
|
1141
|
+
* Success response
|
|
1142
|
+
* @name getFollowerCountById
|
|
1074
1143
|
* @summary: Get Follow Count
|
|
1075
|
-
* @description: Get the total count of followers for a given collection type and collection ID.
|
|
1144
|
+
* @description: Get the total count of followers for a given collection type and collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/).
|
|
1076
1145
|
*/
|
|
1077
|
-
async getFollowerCountById(
|
|
1078
|
-
|
|
1146
|
+
async getFollowerCountById(
|
|
1147
|
+
{ collectionType, collectionId } = {},
|
|
1148
|
+
{ headers } = { headers: false }
|
|
1149
|
+
) {
|
|
1150
|
+
const {
|
|
1151
|
+
error,
|
|
1152
|
+
} = CatalogApplicationValidator.getFollowerCountById().validate(
|
|
1079
1153
|
{ collectionType, collectionId },
|
|
1080
1154
|
{ abortEarly: false, allowUnknown: true }
|
|
1081
1155
|
);
|
|
@@ -1086,16 +1160,15 @@ class Catalog {
|
|
|
1086
1160
|
// Showing warrnings if extra unknown parameters are found
|
|
1087
1161
|
const {
|
|
1088
1162
|
error: warrning,
|
|
1089
|
-
} =
|
|
1163
|
+
} = CatalogApplicationValidator.getFollowerCountById().validate(
|
|
1090
1164
|
{ collectionType, collectionId },
|
|
1091
1165
|
{ abortEarly: false, allowUnknown: false }
|
|
1092
1166
|
);
|
|
1093
1167
|
if (warrning) {
|
|
1094
1168
|
Logger({
|
|
1095
1169
|
level: "WARN",
|
|
1096
|
-
message:
|
|
1170
|
+
message: `Parameter Validation warrnings for application > Catalog > getFollowerCountById \n ${warrning}`,
|
|
1097
1171
|
});
|
|
1098
|
-
Logger({ level: "WARN", message: warrning });
|
|
1099
1172
|
}
|
|
1100
1173
|
|
|
1101
1174
|
const query_params = {};
|
|
@@ -1111,12 +1184,18 @@ class Catalog {
|
|
|
1111
1184
|
}),
|
|
1112
1185
|
query_params,
|
|
1113
1186
|
undefined,
|
|
1114
|
-
xHeaders
|
|
1187
|
+
xHeaders,
|
|
1188
|
+
{ headers }
|
|
1115
1189
|
);
|
|
1116
1190
|
|
|
1191
|
+
let responseData = response;
|
|
1192
|
+
if (headers) {
|
|
1193
|
+
responseData = response[0];
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1117
1196
|
const {
|
|
1118
1197
|
error: res_error,
|
|
1119
|
-
} =
|
|
1198
|
+
} = CatalogApplicationModel.FollowerCountResponse().validate(responseData, {
|
|
1120
1199
|
abortEarly: false,
|
|
1121
1200
|
allowUnknown: false,
|
|
1122
1201
|
});
|
|
@@ -1124,27 +1203,26 @@ class Catalog {
|
|
|
1124
1203
|
if (res_error) {
|
|
1125
1204
|
Logger({
|
|
1126
1205
|
level: "WARN",
|
|
1127
|
-
message:
|
|
1206
|
+
message: `Response Validation Warnnings for application > Catalog > getFollowerCountById \n ${res_error}`,
|
|
1128
1207
|
});
|
|
1129
|
-
Logger({ level: "WARN", message: res_error });
|
|
1130
1208
|
}
|
|
1131
1209
|
|
|
1132
1210
|
return response;
|
|
1133
1211
|
}
|
|
1134
1212
|
|
|
1135
1213
|
/**
|
|
1136
|
-
* @param {
|
|
1137
|
-
* @param {
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1140
|
-
* @param {string} [arg.pageId] - Page ID to retrieve next set of results.
|
|
1141
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1142
|
-
* @returns {Promise<HomeListingResponse>} - Success response
|
|
1214
|
+
* @param {CatalogApplicationValidator.GetHomeProductsParam} arg - Arg object.
|
|
1215
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1216
|
+
* @returns {Promise<CatalogApplicationModel.HomeListingResponse>} - Success response
|
|
1217
|
+
* @name getHomeProducts
|
|
1143
1218
|
* @summary: List the products
|
|
1144
|
-
* @description: List all the products associated with a brand, collection or category in a random order.
|
|
1219
|
+
* @description: List all the products associated with a brand, collection or category in a random order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getHomeProducts/).
|
|
1145
1220
|
*/
|
|
1146
|
-
async getHomeProducts(
|
|
1147
|
-
|
|
1221
|
+
async getHomeProducts(
|
|
1222
|
+
{ sortOn, pageId, pageSize } = {},
|
|
1223
|
+
{ headers } = { headers: false }
|
|
1224
|
+
) {
|
|
1225
|
+
const { error } = CatalogApplicationValidator.getHomeProducts().validate(
|
|
1148
1226
|
{ sortOn, pageId, pageSize },
|
|
1149
1227
|
{ abortEarly: false, allowUnknown: true }
|
|
1150
1228
|
);
|
|
@@ -1153,16 +1231,17 @@ class Catalog {
|
|
|
1153
1231
|
}
|
|
1154
1232
|
|
|
1155
1233
|
// Showing warrnings if extra unknown parameters are found
|
|
1156
|
-
const {
|
|
1234
|
+
const {
|
|
1235
|
+
error: warrning,
|
|
1236
|
+
} = CatalogApplicationValidator.getHomeProducts().validate(
|
|
1157
1237
|
{ sortOn, pageId, pageSize },
|
|
1158
1238
|
{ abortEarly: false, allowUnknown: false }
|
|
1159
1239
|
);
|
|
1160
1240
|
if (warrning) {
|
|
1161
1241
|
Logger({
|
|
1162
1242
|
level: "WARN",
|
|
1163
|
-
message:
|
|
1243
|
+
message: `Parameter Validation warrnings for application > Catalog > getHomeProducts \n ${warrning}`,
|
|
1164
1244
|
});
|
|
1165
|
-
Logger({ level: "WARN", message: warrning });
|
|
1166
1245
|
}
|
|
1167
1246
|
|
|
1168
1247
|
const query_params = {};
|
|
@@ -1181,12 +1260,18 @@ class Catalog {
|
|
|
1181
1260
|
}),
|
|
1182
1261
|
query_params,
|
|
1183
1262
|
undefined,
|
|
1184
|
-
xHeaders
|
|
1263
|
+
xHeaders,
|
|
1264
|
+
{ headers }
|
|
1185
1265
|
);
|
|
1186
1266
|
|
|
1267
|
+
let responseData = response;
|
|
1268
|
+
if (headers) {
|
|
1269
|
+
responseData = response[0];
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1187
1272
|
const {
|
|
1188
1273
|
error: res_error,
|
|
1189
|
-
} =
|
|
1274
|
+
} = CatalogApplicationModel.HomeListingResponse().validate(responseData, {
|
|
1190
1275
|
abortEarly: false,
|
|
1191
1276
|
allowUnknown: false,
|
|
1192
1277
|
});
|
|
@@ -1194,9 +1279,8 @@ class Catalog {
|
|
|
1194
1279
|
if (res_error) {
|
|
1195
1280
|
Logger({
|
|
1196
1281
|
level: "WARN",
|
|
1197
|
-
message:
|
|
1282
|
+
message: `Response Validation Warnnings for application > Catalog > getHomeProducts \n ${res_error}`,
|
|
1198
1283
|
});
|
|
1199
|
-
Logger({ level: "WARN", message: res_error });
|
|
1200
1284
|
}
|
|
1201
1285
|
|
|
1202
1286
|
return response;
|
|
@@ -1208,6 +1292,7 @@ class Catalog {
|
|
|
1208
1292
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
1209
1293
|
* either ascending or descending order.
|
|
1210
1294
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1295
|
+
* @returns {Paginator<CatalogApplicationModel.HomeListingResponse>}
|
|
1211
1296
|
* @summary: List the products
|
|
1212
1297
|
* @description: List all the products associated with a brand, collection or category in a random order.
|
|
1213
1298
|
*/
|
|
@@ -1233,32 +1318,21 @@ class Catalog {
|
|
|
1233
1318
|
}
|
|
1234
1319
|
|
|
1235
1320
|
/**
|
|
1236
|
-
* @param {
|
|
1237
|
-
* @param {
|
|
1238
|
-
*
|
|
1239
|
-
*
|
|
1240
|
-
* @
|
|
1241
|
-
* @param {string} [arg.city] - Search stores by the city in which they are situated.
|
|
1242
|
-
* @param {number} [arg.range] - Use this to retrieve stores within a
|
|
1243
|
-
* particular range in meters, e.g. 10000, to indicate a 10km range
|
|
1244
|
-
* @param {number} [arg.latitude] - Latitude of the location from where one
|
|
1245
|
-
* wants to retreive the nearest stores, e.g. 72.8691788
|
|
1246
|
-
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
1247
|
-
* one wants to retreive the nearest stores, e.g. 19.1174114
|
|
1248
|
-
* @returns {Promise<ApplicationStoreListing>} - Success response
|
|
1321
|
+
* @param {CatalogApplicationValidator.GetInStockLocationsParam} arg - Arg object.
|
|
1322
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1323
|
+
* @returns {Promise<CatalogApplicationModel.ApplicationStoreListing>} -
|
|
1324
|
+
* Success response
|
|
1325
|
+
* @name getInStockLocations
|
|
1249
1326
|
* @summary: Get store meta information.
|
|
1250
|
-
* @description: Use this API to get a list of stores in a specific application.
|
|
1327
|
+
* @description: Use this API to get a list of stores in a specific application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getInStockLocations/).
|
|
1251
1328
|
*/
|
|
1252
|
-
async getInStockLocations(
|
|
1253
|
-
pageNo,
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
longitude,
|
|
1260
|
-
} = {}) {
|
|
1261
|
-
const { error } = CatalogValidator.getInStockLocations().validate(
|
|
1329
|
+
async getInStockLocations(
|
|
1330
|
+
{ pageNo, pageSize, q, city, range, latitude, longitude } = {},
|
|
1331
|
+
{ headers } = { headers: false }
|
|
1332
|
+
) {
|
|
1333
|
+
const {
|
|
1334
|
+
error,
|
|
1335
|
+
} = CatalogApplicationValidator.getInStockLocations().validate(
|
|
1262
1336
|
{ pageNo, pageSize, q, city, range, latitude, longitude },
|
|
1263
1337
|
{ abortEarly: false, allowUnknown: true }
|
|
1264
1338
|
);
|
|
@@ -1267,16 +1341,17 @@ class Catalog {
|
|
|
1267
1341
|
}
|
|
1268
1342
|
|
|
1269
1343
|
// Showing warrnings if extra unknown parameters are found
|
|
1270
|
-
const {
|
|
1344
|
+
const {
|
|
1345
|
+
error: warrning,
|
|
1346
|
+
} = CatalogApplicationValidator.getInStockLocations().validate(
|
|
1271
1347
|
{ pageNo, pageSize, q, city, range, latitude, longitude },
|
|
1272
1348
|
{ abortEarly: false, allowUnknown: false }
|
|
1273
1349
|
);
|
|
1274
1350
|
if (warrning) {
|
|
1275
1351
|
Logger({
|
|
1276
1352
|
level: "WARN",
|
|
1277
|
-
message:
|
|
1353
|
+
message: `Parameter Validation warrnings for application > Catalog > getInStockLocations \n ${warrning}`,
|
|
1278
1354
|
});
|
|
1279
|
-
Logger({ level: "WARN", message: warrning });
|
|
1280
1355
|
}
|
|
1281
1356
|
|
|
1282
1357
|
const query_params = {};
|
|
@@ -1299,22 +1374,27 @@ class Catalog {
|
|
|
1299
1374
|
}),
|
|
1300
1375
|
query_params,
|
|
1301
1376
|
undefined,
|
|
1302
|
-
xHeaders
|
|
1377
|
+
xHeaders,
|
|
1378
|
+
{ headers }
|
|
1303
1379
|
);
|
|
1304
1380
|
|
|
1381
|
+
let responseData = response;
|
|
1382
|
+
if (headers) {
|
|
1383
|
+
responseData = response[0];
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1305
1386
|
const {
|
|
1306
1387
|
error: res_error,
|
|
1307
|
-
} =
|
|
1308
|
-
|
|
1309
|
-
allowUnknown: false
|
|
1310
|
-
|
|
1388
|
+
} = CatalogApplicationModel.ApplicationStoreListing().validate(
|
|
1389
|
+
responseData,
|
|
1390
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1391
|
+
);
|
|
1311
1392
|
|
|
1312
1393
|
if (res_error) {
|
|
1313
1394
|
Logger({
|
|
1314
1395
|
level: "WARN",
|
|
1315
|
-
message:
|
|
1396
|
+
message: `Response Validation Warnnings for application > Catalog > getInStockLocations \n ${res_error}`,
|
|
1316
1397
|
});
|
|
1317
|
-
Logger({ level: "WARN", message: res_error });
|
|
1318
1398
|
}
|
|
1319
1399
|
|
|
1320
1400
|
return response;
|
|
@@ -1331,6 +1411,7 @@ class Catalog {
|
|
|
1331
1411
|
* wants to retreive the nearest stores, e.g. 72.8691788
|
|
1332
1412
|
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
1333
1413
|
* one wants to retreive the nearest stores, e.g. 19.1174114
|
|
1414
|
+
* @returns {Paginator<CatalogApplicationModel.ApplicationStoreListing>}
|
|
1334
1415
|
* @summary: Get store meta information.
|
|
1335
1416
|
* @description: Use this API to get a list of stores in a specific application.
|
|
1336
1417
|
*/
|
|
@@ -1367,14 +1448,20 @@ class Catalog {
|
|
|
1367
1448
|
}
|
|
1368
1449
|
|
|
1369
1450
|
/**
|
|
1370
|
-
* @param {
|
|
1371
|
-
* @param {
|
|
1372
|
-
* @returns {Promise<StoreDetails>} - Success response
|
|
1451
|
+
* @param {CatalogApplicationValidator.GetLocationDetailsByIdParam} arg - Arg object.
|
|
1452
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1453
|
+
* @returns {Promise<CatalogApplicationModel.StoreDetails>} - Success response
|
|
1454
|
+
* @name getLocationDetailsById
|
|
1373
1455
|
* @summary: Get store meta information.
|
|
1374
|
-
* @description: Use this API to get meta details for a store.
|
|
1456
|
+
* @description: Use this API to get meta details for a store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getLocationDetailsById/).
|
|
1375
1457
|
*/
|
|
1376
|
-
async getLocationDetailsById(
|
|
1377
|
-
|
|
1458
|
+
async getLocationDetailsById(
|
|
1459
|
+
{ locationId } = {},
|
|
1460
|
+
{ headers } = { headers: false }
|
|
1461
|
+
) {
|
|
1462
|
+
const {
|
|
1463
|
+
error,
|
|
1464
|
+
} = CatalogApplicationValidator.getLocationDetailsById().validate(
|
|
1378
1465
|
{ locationId },
|
|
1379
1466
|
{ abortEarly: false, allowUnknown: true }
|
|
1380
1467
|
);
|
|
@@ -1385,16 +1472,15 @@ class Catalog {
|
|
|
1385
1472
|
// Showing warrnings if extra unknown parameters are found
|
|
1386
1473
|
const {
|
|
1387
1474
|
error: warrning,
|
|
1388
|
-
} =
|
|
1475
|
+
} = CatalogApplicationValidator.getLocationDetailsById().validate(
|
|
1389
1476
|
{ locationId },
|
|
1390
1477
|
{ abortEarly: false, allowUnknown: false }
|
|
1391
1478
|
);
|
|
1392
1479
|
if (warrning) {
|
|
1393
1480
|
Logger({
|
|
1394
1481
|
level: "WARN",
|
|
1395
|
-
message:
|
|
1482
|
+
message: `Parameter Validation warrnings for application > Catalog > getLocationDetailsById \n ${warrning}`,
|
|
1396
1483
|
});
|
|
1397
|
-
Logger({ level: "WARN", message: warrning });
|
|
1398
1484
|
}
|
|
1399
1485
|
|
|
1400
1486
|
const query_params = {};
|
|
@@ -1410,35 +1496,47 @@ class Catalog {
|
|
|
1410
1496
|
}),
|
|
1411
1497
|
query_params,
|
|
1412
1498
|
undefined,
|
|
1413
|
-
xHeaders
|
|
1499
|
+
xHeaders,
|
|
1500
|
+
{ headers }
|
|
1414
1501
|
);
|
|
1415
1502
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1503
|
+
let responseData = response;
|
|
1504
|
+
if (headers) {
|
|
1505
|
+
responseData = response[0];
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
const {
|
|
1509
|
+
error: res_error,
|
|
1510
|
+
} = CatalogApplicationModel.StoreDetails().validate(responseData, {
|
|
1511
|
+
abortEarly: false,
|
|
1512
|
+
allowUnknown: false,
|
|
1513
|
+
});
|
|
1420
1514
|
|
|
1421
1515
|
if (res_error) {
|
|
1422
1516
|
Logger({
|
|
1423
1517
|
level: "WARN",
|
|
1424
|
-
message:
|
|
1518
|
+
message: `Response Validation Warnnings for application > Catalog > getLocationDetailsById \n ${res_error}`,
|
|
1425
1519
|
});
|
|
1426
|
-
Logger({ level: "WARN", message: res_error });
|
|
1427
1520
|
}
|
|
1428
1521
|
|
|
1429
1522
|
return response;
|
|
1430
1523
|
}
|
|
1431
1524
|
|
|
1432
1525
|
/**
|
|
1433
|
-
* @param {
|
|
1434
|
-
* @param {
|
|
1435
|
-
* @
|
|
1436
|
-
* @
|
|
1526
|
+
* @param {CatalogApplicationValidator.GetProductBundlesBySlugParam} arg - Arg object.
|
|
1527
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1528
|
+
* @returns {Promise<CatalogApplicationModel.ProductBundle>} - Success response
|
|
1529
|
+
* @name getProductBundlesBySlug
|
|
1437
1530
|
* @summary: Get product bundles
|
|
1438
|
-
* @description: Use this API to retrieve products bundles to the one specified by its slug.
|
|
1531
|
+
* @description: Use this API to retrieve products bundles to the one specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductBundlesBySlug/).
|
|
1439
1532
|
*/
|
|
1440
|
-
async getProductBundlesBySlug(
|
|
1441
|
-
|
|
1533
|
+
async getProductBundlesBySlug(
|
|
1534
|
+
{ slug, id } = {},
|
|
1535
|
+
{ headers } = { headers: false }
|
|
1536
|
+
) {
|
|
1537
|
+
const {
|
|
1538
|
+
error,
|
|
1539
|
+
} = CatalogApplicationValidator.getProductBundlesBySlug().validate(
|
|
1442
1540
|
{ slug, id },
|
|
1443
1541
|
{ abortEarly: false, allowUnknown: true }
|
|
1444
1542
|
);
|
|
@@ -1449,16 +1547,15 @@ class Catalog {
|
|
|
1449
1547
|
// Showing warrnings if extra unknown parameters are found
|
|
1450
1548
|
const {
|
|
1451
1549
|
error: warrning,
|
|
1452
|
-
} =
|
|
1550
|
+
} = CatalogApplicationValidator.getProductBundlesBySlug().validate(
|
|
1453
1551
|
{ slug, id },
|
|
1454
1552
|
{ abortEarly: false, allowUnknown: false }
|
|
1455
1553
|
);
|
|
1456
1554
|
if (warrning) {
|
|
1457
1555
|
Logger({
|
|
1458
1556
|
level: "WARN",
|
|
1459
|
-
message:
|
|
1557
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductBundlesBySlug \n ${warrning}`,
|
|
1460
1558
|
});
|
|
1461
|
-
Logger({ level: "WARN", message: warrning });
|
|
1462
1559
|
}
|
|
1463
1560
|
|
|
1464
1561
|
const query_params = {};
|
|
@@ -1476,36 +1573,50 @@ class Catalog {
|
|
|
1476
1573
|
}),
|
|
1477
1574
|
query_params,
|
|
1478
1575
|
undefined,
|
|
1479
|
-
xHeaders
|
|
1576
|
+
xHeaders,
|
|
1577
|
+
{ headers }
|
|
1480
1578
|
);
|
|
1481
1579
|
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1580
|
+
let responseData = response;
|
|
1581
|
+
if (headers) {
|
|
1582
|
+
responseData = response[0];
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
const {
|
|
1586
|
+
error: res_error,
|
|
1587
|
+
} = CatalogApplicationModel.ProductBundle().validate(responseData, {
|
|
1588
|
+
abortEarly: false,
|
|
1589
|
+
allowUnknown: false,
|
|
1590
|
+
});
|
|
1486
1591
|
|
|
1487
1592
|
if (res_error) {
|
|
1488
1593
|
Logger({
|
|
1489
1594
|
level: "WARN",
|
|
1490
|
-
message:
|
|
1595
|
+
message: `Response Validation Warnnings for application > Catalog > getProductBundlesBySlug \n ${res_error}`,
|
|
1491
1596
|
});
|
|
1492
|
-
Logger({ level: "WARN", message: res_error });
|
|
1493
1597
|
}
|
|
1494
1598
|
|
|
1495
1599
|
return response;
|
|
1496
1600
|
}
|
|
1497
1601
|
|
|
1498
1602
|
/**
|
|
1499
|
-
* @param {
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
* @returns {Promise<ProductsComparisonResponse>} -
|
|
1603
|
+
* @param {CatalogApplicationValidator.GetProductComparisonBySlugsParam} arg
|
|
1604
|
+
* - Arg object.
|
|
1605
|
+
*
|
|
1606
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1607
|
+
* @returns {Promise<CatalogApplicationModel.ProductsComparisonResponse>} -
|
|
1608
|
+
* Success response
|
|
1609
|
+
* @name getProductComparisonBySlugs
|
|
1504
1610
|
* @summary: Compare products
|
|
1505
|
-
* @description: Use this API to compare the features of products belonging to the same category. Note that at least one slug is mandatory in the request query.
|
|
1611
|
+
* @description: Use this API to compare the features of products belonging to the same category. Note that at least one slug is mandatory in the request query. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/).
|
|
1506
1612
|
*/
|
|
1507
|
-
async getProductComparisonBySlugs(
|
|
1508
|
-
|
|
1613
|
+
async getProductComparisonBySlugs(
|
|
1614
|
+
{ slug } = {},
|
|
1615
|
+
{ headers } = { headers: false }
|
|
1616
|
+
) {
|
|
1617
|
+
const {
|
|
1618
|
+
error,
|
|
1619
|
+
} = CatalogApplicationValidator.getProductComparisonBySlugs().validate(
|
|
1509
1620
|
{ slug },
|
|
1510
1621
|
{ abortEarly: false, allowUnknown: true }
|
|
1511
1622
|
);
|
|
@@ -1516,17 +1627,15 @@ class Catalog {
|
|
|
1516
1627
|
// Showing warrnings if extra unknown parameters are found
|
|
1517
1628
|
const {
|
|
1518
1629
|
error: warrning,
|
|
1519
|
-
} =
|
|
1630
|
+
} = CatalogApplicationValidator.getProductComparisonBySlugs().validate(
|
|
1520
1631
|
{ slug },
|
|
1521
1632
|
{ abortEarly: false, allowUnknown: false }
|
|
1522
1633
|
);
|
|
1523
1634
|
if (warrning) {
|
|
1524
1635
|
Logger({
|
|
1525
1636
|
level: "WARN",
|
|
1526
|
-
message:
|
|
1527
|
-
"Parameter Validation warrnings for getProductComparisonBySlugs",
|
|
1637
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductComparisonBySlugs \n ${warrning}`,
|
|
1528
1638
|
});
|
|
1529
|
-
Logger({ level: "WARN", message: warrning });
|
|
1530
1639
|
}
|
|
1531
1640
|
|
|
1532
1641
|
const query_params = {};
|
|
@@ -1543,39 +1652,47 @@ class Catalog {
|
|
|
1543
1652
|
}),
|
|
1544
1653
|
query_params,
|
|
1545
1654
|
undefined,
|
|
1546
|
-
xHeaders
|
|
1655
|
+
xHeaders,
|
|
1656
|
+
{ headers }
|
|
1547
1657
|
);
|
|
1548
1658
|
|
|
1659
|
+
let responseData = response;
|
|
1660
|
+
if (headers) {
|
|
1661
|
+
responseData = response[0];
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1549
1664
|
const {
|
|
1550
1665
|
error: res_error,
|
|
1551
|
-
} =
|
|
1552
|
-
|
|
1553
|
-
allowUnknown: false
|
|
1554
|
-
|
|
1666
|
+
} = CatalogApplicationModel.ProductsComparisonResponse().validate(
|
|
1667
|
+
responseData,
|
|
1668
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1669
|
+
);
|
|
1555
1670
|
|
|
1556
1671
|
if (res_error) {
|
|
1557
1672
|
Logger({
|
|
1558
1673
|
level: "WARN",
|
|
1559
|
-
message:
|
|
1560
|
-
"Response Validation Warnnings for getProductComparisonBySlugs",
|
|
1674
|
+
message: `Response Validation Warnnings for application > Catalog > getProductComparisonBySlugs \n ${res_error}`,
|
|
1561
1675
|
});
|
|
1562
|
-
Logger({ level: "WARN", message: res_error });
|
|
1563
1676
|
}
|
|
1564
1677
|
|
|
1565
1678
|
return response;
|
|
1566
1679
|
}
|
|
1567
1680
|
|
|
1568
1681
|
/**
|
|
1569
|
-
* @param {
|
|
1570
|
-
* @param {
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1573
|
-
* @returns {Promise<ProductDetail>} - Success response
|
|
1682
|
+
* @param {CatalogApplicationValidator.GetProductDetailBySlugParam} arg - Arg object.
|
|
1683
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1684
|
+
* @returns {Promise<CatalogApplicationModel.ProductDetail>} - Success response
|
|
1685
|
+
* @name getProductDetailBySlug
|
|
1574
1686
|
* @summary: Get a product
|
|
1575
|
-
* @description: Use this API to retrieve a product by its slug value.
|
|
1687
|
+
* @description: Use this API to retrieve a product by its slug value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductDetailBySlug/).
|
|
1576
1688
|
*/
|
|
1577
|
-
async getProductDetailBySlug(
|
|
1578
|
-
|
|
1689
|
+
async getProductDetailBySlug(
|
|
1690
|
+
{ slug } = {},
|
|
1691
|
+
{ headers } = { headers: false }
|
|
1692
|
+
) {
|
|
1693
|
+
const {
|
|
1694
|
+
error,
|
|
1695
|
+
} = CatalogApplicationValidator.getProductDetailBySlug().validate(
|
|
1579
1696
|
{ slug },
|
|
1580
1697
|
{ abortEarly: false, allowUnknown: true }
|
|
1581
1698
|
);
|
|
@@ -1586,16 +1703,15 @@ class Catalog {
|
|
|
1586
1703
|
// Showing warrnings if extra unknown parameters are found
|
|
1587
1704
|
const {
|
|
1588
1705
|
error: warrning,
|
|
1589
|
-
} =
|
|
1706
|
+
} = CatalogApplicationValidator.getProductDetailBySlug().validate(
|
|
1590
1707
|
{ slug },
|
|
1591
1708
|
{ abortEarly: false, allowUnknown: false }
|
|
1592
1709
|
);
|
|
1593
1710
|
if (warrning) {
|
|
1594
1711
|
Logger({
|
|
1595
1712
|
level: "WARN",
|
|
1596
|
-
message:
|
|
1713
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductDetailBySlug \n ${warrning}`,
|
|
1597
1714
|
});
|
|
1598
|
-
Logger({ level: "WARN", message: warrning });
|
|
1599
1715
|
}
|
|
1600
1716
|
|
|
1601
1717
|
const query_params = {};
|
|
@@ -1611,45 +1727,48 @@ class Catalog {
|
|
|
1611
1727
|
}),
|
|
1612
1728
|
query_params,
|
|
1613
1729
|
undefined,
|
|
1614
|
-
xHeaders
|
|
1730
|
+
xHeaders,
|
|
1731
|
+
{ headers }
|
|
1615
1732
|
);
|
|
1616
1733
|
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1734
|
+
let responseData = response;
|
|
1735
|
+
if (headers) {
|
|
1736
|
+
responseData = response[0];
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
const {
|
|
1740
|
+
error: res_error,
|
|
1741
|
+
} = CatalogApplicationModel.ProductDetail().validate(responseData, {
|
|
1742
|
+
abortEarly: false,
|
|
1743
|
+
allowUnknown: false,
|
|
1744
|
+
});
|
|
1621
1745
|
|
|
1622
1746
|
if (res_error) {
|
|
1623
1747
|
Logger({
|
|
1624
1748
|
level: "WARN",
|
|
1625
|
-
message:
|
|
1749
|
+
message: `Response Validation Warnnings for application > Catalog > getProductDetailBySlug \n ${res_error}`,
|
|
1626
1750
|
});
|
|
1627
|
-
Logger({ level: "WARN", message: res_error });
|
|
1628
1751
|
}
|
|
1629
1752
|
|
|
1630
1753
|
return response;
|
|
1631
1754
|
}
|
|
1632
1755
|
|
|
1633
1756
|
/**
|
|
1634
|
-
* @param {
|
|
1635
|
-
* @param {
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
* @
|
|
1639
|
-
* e.g. S, M, XL. You can get slug value from the endpoint
|
|
1640
|
-
* /service/application/catalog/v1.0/products/sizes
|
|
1641
|
-
* @param {number} [arg.storeId] - The ID of the store that is selling the
|
|
1642
|
-
* product, e.g. 1,2,3.
|
|
1643
|
-
* @param {string} [arg.pincode] - The PIN Code of the area near which the
|
|
1644
|
-
* selling locations should be searched, e.g. 400059.
|
|
1645
|
-
* @param {number} [arg.moq] - An Integer indication the Minimum Order
|
|
1646
|
-
* Quantity of a product, e.g. 100.
|
|
1647
|
-
* @returns {Promise<ProductSizePriceResponseV3>} - Success response
|
|
1757
|
+
* @param {CatalogApplicationValidator.GetProductPriceBySlugParam} arg - Arg object.
|
|
1758
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1759
|
+
* @returns {Promise<CatalogApplicationModel.ProductSizePriceResponseV3>} -
|
|
1760
|
+
* Success response
|
|
1761
|
+
* @name getProductPriceBySlug
|
|
1648
1762
|
* @summary: Get the price of a product size at a PIN Code
|
|
1649
|
-
* @description: Prices may vary for different sizes of a product. Use this API to retrieve the price of a product size at all the selling locations near to a PIN Code.
|
|
1763
|
+
* @description: Prices may vary for different sizes of a product. Use this API to retrieve the price of a product size at all the selling locations near to a PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductPriceBySlug/).
|
|
1650
1764
|
*/
|
|
1651
|
-
async getProductPriceBySlug(
|
|
1652
|
-
|
|
1765
|
+
async getProductPriceBySlug(
|
|
1766
|
+
{ slug, size, storeId, pincode, moq } = {},
|
|
1767
|
+
{ headers } = { headers: false }
|
|
1768
|
+
) {
|
|
1769
|
+
const {
|
|
1770
|
+
error,
|
|
1771
|
+
} = CatalogApplicationValidator.getProductPriceBySlug().validate(
|
|
1653
1772
|
{ slug, size, storeId, pincode, moq },
|
|
1654
1773
|
{ abortEarly: false, allowUnknown: true }
|
|
1655
1774
|
);
|
|
@@ -1660,16 +1779,15 @@ class Catalog {
|
|
|
1660
1779
|
// Showing warrnings if extra unknown parameters are found
|
|
1661
1780
|
const {
|
|
1662
1781
|
error: warrning,
|
|
1663
|
-
} =
|
|
1782
|
+
} = CatalogApplicationValidator.getProductPriceBySlug().validate(
|
|
1664
1783
|
{ slug, size, storeId, pincode, moq },
|
|
1665
1784
|
{ abortEarly: false, allowUnknown: false }
|
|
1666
1785
|
);
|
|
1667
1786
|
if (warrning) {
|
|
1668
1787
|
Logger({
|
|
1669
1788
|
level: "WARN",
|
|
1670
|
-
message:
|
|
1789
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductPriceBySlug \n ${warrning}`,
|
|
1671
1790
|
});
|
|
1672
|
-
Logger({ level: "WARN", message: warrning });
|
|
1673
1791
|
}
|
|
1674
1792
|
|
|
1675
1793
|
const query_params = {};
|
|
@@ -1688,55 +1806,49 @@ class Catalog {
|
|
|
1688
1806
|
}),
|
|
1689
1807
|
query_params,
|
|
1690
1808
|
undefined,
|
|
1691
|
-
xHeaders
|
|
1809
|
+
xHeaders,
|
|
1810
|
+
{ headers }
|
|
1692
1811
|
);
|
|
1693
1812
|
|
|
1813
|
+
let responseData = response;
|
|
1814
|
+
if (headers) {
|
|
1815
|
+
responseData = response[0];
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1694
1818
|
const {
|
|
1695
1819
|
error: res_error,
|
|
1696
|
-
} =
|
|
1697
|
-
|
|
1698
|
-
allowUnknown: false
|
|
1699
|
-
|
|
1820
|
+
} = CatalogApplicationModel.ProductSizePriceResponseV3().validate(
|
|
1821
|
+
responseData,
|
|
1822
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1823
|
+
);
|
|
1700
1824
|
|
|
1701
1825
|
if (res_error) {
|
|
1702
1826
|
Logger({
|
|
1703
1827
|
level: "WARN",
|
|
1704
|
-
message:
|
|
1828
|
+
message: `Response Validation Warnnings for application > Catalog > getProductPriceBySlug \n ${res_error}`,
|
|
1705
1829
|
});
|
|
1706
|
-
Logger({ level: "WARN", message: res_error });
|
|
1707
1830
|
}
|
|
1708
1831
|
|
|
1709
1832
|
return response;
|
|
1710
1833
|
}
|
|
1711
1834
|
|
|
1712
1835
|
/**
|
|
1713
|
-
* @param {
|
|
1714
|
-
* @param {
|
|
1715
|
-
*
|
|
1716
|
-
*
|
|
1717
|
-
*
|
|
1718
|
-
*
|
|
1719
|
-
* /service/application/catalog/v1.0/products/sizes
|
|
1720
|
-
* @param {string} [arg.pincode] - The 6-digit PIN Code of the area near
|
|
1721
|
-
* which the selling locations should be searched, e.g. 400059
|
|
1722
|
-
* @param {string} [arg.strategy] - Sort stores on the basis of strategy.
|
|
1723
|
-
* eg, fast-delivery, low-price, optimal.
|
|
1724
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
1725
|
-
* given set of results.
|
|
1726
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1727
|
-
* @returns {Promise<ProductSizeSellersResponseV3>} - Success response
|
|
1836
|
+
* @param {CatalogApplicationValidator.GetProductSellersBySlugParam} arg - Arg object.
|
|
1837
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1838
|
+
* @returns {Promise<CatalogApplicationModel.ProductSizeSellersResponseV3>}
|
|
1839
|
+
* - Success response
|
|
1840
|
+
*
|
|
1841
|
+
* @name getProductSellersBySlug
|
|
1728
1842
|
* @summary: Get the sellers of a product size at a PIN Code
|
|
1729
|
-
* @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code.
|
|
1843
|
+
* @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/).
|
|
1730
1844
|
*/
|
|
1731
|
-
async getProductSellersBySlug(
|
|
1732
|
-
slug,
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
} = {}) {
|
|
1739
|
-
const { error } = CatalogValidator.getProductSellersBySlug().validate(
|
|
1845
|
+
async getProductSellersBySlug(
|
|
1846
|
+
{ slug, size, pincode, strategy, pageNo, pageSize } = {},
|
|
1847
|
+
{ headers } = { headers: false }
|
|
1848
|
+
) {
|
|
1849
|
+
const {
|
|
1850
|
+
error,
|
|
1851
|
+
} = CatalogApplicationValidator.getProductSellersBySlug().validate(
|
|
1740
1852
|
{ slug, size, pincode, strategy, pageNo, pageSize },
|
|
1741
1853
|
{ abortEarly: false, allowUnknown: true }
|
|
1742
1854
|
);
|
|
@@ -1747,16 +1859,15 @@ class Catalog {
|
|
|
1747
1859
|
// Showing warrnings if extra unknown parameters are found
|
|
1748
1860
|
const {
|
|
1749
1861
|
error: warrning,
|
|
1750
|
-
} =
|
|
1862
|
+
} = CatalogApplicationValidator.getProductSellersBySlug().validate(
|
|
1751
1863
|
{ slug, size, pincode, strategy, pageNo, pageSize },
|
|
1752
1864
|
{ abortEarly: false, allowUnknown: false }
|
|
1753
1865
|
);
|
|
1754
1866
|
if (warrning) {
|
|
1755
1867
|
Logger({
|
|
1756
1868
|
level: "WARN",
|
|
1757
|
-
message:
|
|
1869
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductSellersBySlug \n ${warrning}`,
|
|
1758
1870
|
});
|
|
1759
|
-
Logger({ level: "WARN", message: warrning });
|
|
1760
1871
|
}
|
|
1761
1872
|
|
|
1762
1873
|
const query_params = {};
|
|
@@ -1776,22 +1887,27 @@ class Catalog {
|
|
|
1776
1887
|
}),
|
|
1777
1888
|
query_params,
|
|
1778
1889
|
undefined,
|
|
1779
|
-
xHeaders
|
|
1890
|
+
xHeaders,
|
|
1891
|
+
{ headers }
|
|
1780
1892
|
);
|
|
1781
1893
|
|
|
1894
|
+
let responseData = response;
|
|
1895
|
+
if (headers) {
|
|
1896
|
+
responseData = response[0];
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1782
1899
|
const {
|
|
1783
1900
|
error: res_error,
|
|
1784
|
-
} =
|
|
1785
|
-
|
|
1786
|
-
allowUnknown: false
|
|
1787
|
-
|
|
1901
|
+
} = CatalogApplicationModel.ProductSizeSellersResponseV3().validate(
|
|
1902
|
+
responseData,
|
|
1903
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1904
|
+
);
|
|
1788
1905
|
|
|
1789
1906
|
if (res_error) {
|
|
1790
1907
|
Logger({
|
|
1791
1908
|
level: "WARN",
|
|
1792
|
-
message:
|
|
1909
|
+
message: `Response Validation Warnnings for application > Catalog > getProductSellersBySlug \n ${res_error}`,
|
|
1793
1910
|
});
|
|
1794
|
-
Logger({ level: "WARN", message: res_error });
|
|
1795
1911
|
}
|
|
1796
1912
|
|
|
1797
1913
|
return response;
|
|
@@ -1810,6 +1926,7 @@ class Catalog {
|
|
|
1810
1926
|
* @param {string} [arg.strategy] - Sort stores on the basis of strategy.
|
|
1811
1927
|
* eg, fast-delivery, low-price, optimal.
|
|
1812
1928
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1929
|
+
* @returns {Paginator<CatalogApplicationModel.ProductSizeSellersResponseV3>}
|
|
1813
1930
|
* @summary: Get the sellers of a product size at a PIN Code
|
|
1814
1931
|
* @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code.
|
|
1815
1932
|
*/
|
|
@@ -1844,18 +1961,20 @@ class Catalog {
|
|
|
1844
1961
|
}
|
|
1845
1962
|
|
|
1846
1963
|
/**
|
|
1847
|
-
* @param {
|
|
1848
|
-
* @param {
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
* @param {number} [arg.storeId] - The ID of the store that is selling the
|
|
1852
|
-
* product, e.g. 1,2,3.
|
|
1853
|
-
* @returns {Promise<ProductSizes>} - Success response
|
|
1964
|
+
* @param {CatalogApplicationValidator.GetProductSizesBySlugParam} arg - Arg object.
|
|
1965
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1966
|
+
* @returns {Promise<CatalogApplicationModel.ProductSizes>} - Success response
|
|
1967
|
+
* @name getProductSizesBySlug
|
|
1854
1968
|
* @summary: Get the sizes of a product
|
|
1855
|
-
* @description: A product can have multiple sizes. Use this API to fetch all the available sizes of a product.
|
|
1969
|
+
* @description: A product can have multiple sizes. Use this API to fetch all the available sizes of a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSizesBySlug/).
|
|
1856
1970
|
*/
|
|
1857
|
-
async getProductSizesBySlug(
|
|
1858
|
-
|
|
1971
|
+
async getProductSizesBySlug(
|
|
1972
|
+
{ slug, storeId } = {},
|
|
1973
|
+
{ headers } = { headers: false }
|
|
1974
|
+
) {
|
|
1975
|
+
const {
|
|
1976
|
+
error,
|
|
1977
|
+
} = CatalogApplicationValidator.getProductSizesBySlug().validate(
|
|
1859
1978
|
{ slug, storeId },
|
|
1860
1979
|
{ abortEarly: false, allowUnknown: true }
|
|
1861
1980
|
);
|
|
@@ -1866,16 +1985,15 @@ class Catalog {
|
|
|
1866
1985
|
// Showing warrnings if extra unknown parameters are found
|
|
1867
1986
|
const {
|
|
1868
1987
|
error: warrning,
|
|
1869
|
-
} =
|
|
1988
|
+
} = CatalogApplicationValidator.getProductSizesBySlug().validate(
|
|
1870
1989
|
{ slug, storeId },
|
|
1871
1990
|
{ abortEarly: false, allowUnknown: false }
|
|
1872
1991
|
);
|
|
1873
1992
|
if (warrning) {
|
|
1874
1993
|
Logger({
|
|
1875
1994
|
level: "WARN",
|
|
1876
|
-
message:
|
|
1995
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductSizesBySlug \n ${warrning}`,
|
|
1877
1996
|
});
|
|
1878
|
-
Logger({ level: "WARN", message: warrning });
|
|
1879
1997
|
}
|
|
1880
1998
|
|
|
1881
1999
|
const query_params = {};
|
|
@@ -1892,42 +2010,48 @@ class Catalog {
|
|
|
1892
2010
|
}),
|
|
1893
2011
|
query_params,
|
|
1894
2012
|
undefined,
|
|
1895
|
-
xHeaders
|
|
2013
|
+
xHeaders,
|
|
2014
|
+
{ headers }
|
|
1896
2015
|
);
|
|
1897
2016
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
2017
|
+
let responseData = response;
|
|
2018
|
+
if (headers) {
|
|
2019
|
+
responseData = response[0];
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
const {
|
|
2023
|
+
error: res_error,
|
|
2024
|
+
} = CatalogApplicationModel.ProductSizes().validate(responseData, {
|
|
2025
|
+
abortEarly: false,
|
|
2026
|
+
allowUnknown: false,
|
|
2027
|
+
});
|
|
1902
2028
|
|
|
1903
2029
|
if (res_error) {
|
|
1904
2030
|
Logger({
|
|
1905
2031
|
level: "WARN",
|
|
1906
|
-
message:
|
|
2032
|
+
message: `Response Validation Warnnings for application > Catalog > getProductSizesBySlug \n ${res_error}`,
|
|
1907
2033
|
});
|
|
1908
|
-
Logger({ level: "WARN", message: res_error });
|
|
1909
2034
|
}
|
|
1910
2035
|
|
|
1911
2036
|
return response;
|
|
1912
2037
|
}
|
|
1913
2038
|
|
|
1914
2039
|
/**
|
|
1915
|
-
* @param {
|
|
1916
|
-
* @param {
|
|
1917
|
-
* @
|
|
1918
|
-
*
|
|
1919
|
-
* @
|
|
1920
|
-
* (limited upto 50 SKU Code in a single request)
|
|
1921
|
-
* @param {string} [arg.ean] - European Article Number of the product
|
|
1922
|
-
* (limited upto 50 EAN identifier in a single request)
|
|
1923
|
-
* @param {string} [arg.upc] - Universal Product Code of the product
|
|
1924
|
-
* (limited upto 50 UPC identifier in a single request)
|
|
1925
|
-
* @returns {Promise<ProductStockStatusResponse>} - Success response
|
|
2040
|
+
* @param {CatalogApplicationValidator.GetProductStockByIdsParam} arg - Arg object.
|
|
2041
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2042
|
+
* @returns {Promise<CatalogApplicationModel.ProductStockStatusResponse>} -
|
|
2043
|
+
* Success response
|
|
2044
|
+
* @name getProductStockByIds
|
|
1926
2045
|
* @summary: Get the stock of a product
|
|
1927
|
-
* @description: Retrieve the available stock of the products. Use this API to retrieve stock of multiple products (up to 50) at a time.
|
|
2046
|
+
* @description: Retrieve the available stock of the products. Use this API to retrieve stock of multiple products (up to 50) at a time. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockByIds/).
|
|
1928
2047
|
*/
|
|
1929
|
-
async getProductStockByIds(
|
|
1930
|
-
|
|
2048
|
+
async getProductStockByIds(
|
|
2049
|
+
{ itemId, alu, skuCode, ean, upc } = {},
|
|
2050
|
+
{ headers } = { headers: false }
|
|
2051
|
+
) {
|
|
2052
|
+
const {
|
|
2053
|
+
error,
|
|
2054
|
+
} = CatalogApplicationValidator.getProductStockByIds().validate(
|
|
1931
2055
|
{ itemId, alu, skuCode, ean, upc },
|
|
1932
2056
|
{ abortEarly: false, allowUnknown: true }
|
|
1933
2057
|
);
|
|
@@ -1938,16 +2062,15 @@ class Catalog {
|
|
|
1938
2062
|
// Showing warrnings if extra unknown parameters are found
|
|
1939
2063
|
const {
|
|
1940
2064
|
error: warrning,
|
|
1941
|
-
} =
|
|
2065
|
+
} = CatalogApplicationValidator.getProductStockByIds().validate(
|
|
1942
2066
|
{ itemId, alu, skuCode, ean, upc },
|
|
1943
2067
|
{ abortEarly: false, allowUnknown: false }
|
|
1944
2068
|
);
|
|
1945
2069
|
if (warrning) {
|
|
1946
2070
|
Logger({
|
|
1947
2071
|
level: "WARN",
|
|
1948
|
-
message:
|
|
2072
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductStockByIds \n ${warrning}`,
|
|
1949
2073
|
});
|
|
1950
|
-
Logger({ level: "WARN", message: warrning });
|
|
1951
2074
|
}
|
|
1952
2075
|
|
|
1953
2076
|
const query_params = {};
|
|
@@ -1968,38 +2091,49 @@ class Catalog {
|
|
|
1968
2091
|
}),
|
|
1969
2092
|
query_params,
|
|
1970
2093
|
undefined,
|
|
1971
|
-
xHeaders
|
|
2094
|
+
xHeaders,
|
|
2095
|
+
{ headers }
|
|
1972
2096
|
);
|
|
1973
2097
|
|
|
2098
|
+
let responseData = response;
|
|
2099
|
+
if (headers) {
|
|
2100
|
+
responseData = response[0];
|
|
2101
|
+
}
|
|
2102
|
+
|
|
1974
2103
|
const {
|
|
1975
2104
|
error: res_error,
|
|
1976
|
-
} =
|
|
1977
|
-
|
|
1978
|
-
allowUnknown: false
|
|
1979
|
-
|
|
2105
|
+
} = CatalogApplicationModel.ProductStockStatusResponse().validate(
|
|
2106
|
+
responseData,
|
|
2107
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2108
|
+
);
|
|
1980
2109
|
|
|
1981
2110
|
if (res_error) {
|
|
1982
2111
|
Logger({
|
|
1983
2112
|
level: "WARN",
|
|
1984
|
-
message:
|
|
2113
|
+
message: `Response Validation Warnnings for application > Catalog > getProductStockByIds \n ${res_error}`,
|
|
1985
2114
|
});
|
|
1986
|
-
Logger({ level: "WARN", message: res_error });
|
|
1987
2115
|
}
|
|
1988
2116
|
|
|
1989
2117
|
return response;
|
|
1990
2118
|
}
|
|
1991
2119
|
|
|
1992
2120
|
/**
|
|
1993
|
-
* @param {
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1996
|
-
* @param {
|
|
1997
|
-
* @returns {Promise<ProductStockPolling>} - Success response
|
|
2121
|
+
* @param {CatalogApplicationValidator.GetProductStockForTimeByIdsParam} arg
|
|
2122
|
+
* - Arg object.
|
|
2123
|
+
*
|
|
2124
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2125
|
+
* @returns {Promise<CatalogApplicationModel.ProductStockPolling>} - Success response
|
|
2126
|
+
* @name getProductStockForTimeByIds
|
|
1998
2127
|
* @summary: Get the stock of a product
|
|
1999
|
-
* @description: Retrieve the available stock of the products. Use this API to get the stock status of products whose inventory is updated at the specified time
|
|
2128
|
+
* @description: Retrieve the available stock of the products. Use this API to get the stock status of products whose inventory is updated at the specified time - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockForTimeByIds/).
|
|
2000
2129
|
*/
|
|
2001
|
-
async getProductStockForTimeByIds(
|
|
2002
|
-
|
|
2130
|
+
async getProductStockForTimeByIds(
|
|
2131
|
+
{ timestamp, pageSize, pageId } = {},
|
|
2132
|
+
{ headers } = { headers: false }
|
|
2133
|
+
) {
|
|
2134
|
+
const {
|
|
2135
|
+
error,
|
|
2136
|
+
} = CatalogApplicationValidator.getProductStockForTimeByIds().validate(
|
|
2003
2137
|
{ timestamp, pageSize, pageId },
|
|
2004
2138
|
{ abortEarly: false, allowUnknown: true }
|
|
2005
2139
|
);
|
|
@@ -2010,17 +2144,15 @@ class Catalog {
|
|
|
2010
2144
|
// Showing warrnings if extra unknown parameters are found
|
|
2011
2145
|
const {
|
|
2012
2146
|
error: warrning,
|
|
2013
|
-
} =
|
|
2147
|
+
} = CatalogApplicationValidator.getProductStockForTimeByIds().validate(
|
|
2014
2148
|
{ timestamp, pageSize, pageId },
|
|
2015
2149
|
{ abortEarly: false, allowUnknown: false }
|
|
2016
2150
|
);
|
|
2017
2151
|
if (warrning) {
|
|
2018
2152
|
Logger({
|
|
2019
2153
|
level: "WARN",
|
|
2020
|
-
message:
|
|
2021
|
-
"Parameter Validation warrnings for getProductStockForTimeByIds",
|
|
2154
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductStockForTimeByIds \n ${warrning}`,
|
|
2022
2155
|
});
|
|
2023
|
-
Logger({ level: "WARN", message: warrning });
|
|
2024
2156
|
}
|
|
2025
2157
|
|
|
2026
2158
|
const query_params = {};
|
|
@@ -2039,12 +2171,18 @@ class Catalog {
|
|
|
2039
2171
|
}),
|
|
2040
2172
|
query_params,
|
|
2041
2173
|
undefined,
|
|
2042
|
-
xHeaders
|
|
2174
|
+
xHeaders,
|
|
2175
|
+
{ headers }
|
|
2043
2176
|
);
|
|
2044
2177
|
|
|
2178
|
+
let responseData = response;
|
|
2179
|
+
if (headers) {
|
|
2180
|
+
responseData = response[0];
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2045
2183
|
const {
|
|
2046
2184
|
error: res_error,
|
|
2047
|
-
} =
|
|
2185
|
+
} = CatalogApplicationModel.ProductStockPolling().validate(responseData, {
|
|
2048
2186
|
abortEarly: false,
|
|
2049
2187
|
allowUnknown: false,
|
|
2050
2188
|
});
|
|
@@ -2052,10 +2190,8 @@ class Catalog {
|
|
|
2052
2190
|
if (res_error) {
|
|
2053
2191
|
Logger({
|
|
2054
2192
|
level: "WARN",
|
|
2055
|
-
message:
|
|
2056
|
-
"Response Validation Warnnings for getProductStockForTimeByIds",
|
|
2193
|
+
message: `Response Validation Warnnings for application > Catalog > getProductStockForTimeByIds \n ${res_error}`,
|
|
2057
2194
|
});
|
|
2058
|
-
Logger({ level: "WARN", message: res_error });
|
|
2059
2195
|
}
|
|
2060
2196
|
|
|
2061
2197
|
return response;
|
|
@@ -2065,6 +2201,7 @@ class Catalog {
|
|
|
2065
2201
|
* @param {Object} arg - Arg object.
|
|
2066
2202
|
* @param {string} arg.timestamp - Timestamp in UTC format (2020-07-23T10:27:50Z)
|
|
2067
2203
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
2204
|
+
* @returns {Paginator<CatalogApplicationModel.ProductStockPolling>}
|
|
2068
2205
|
* @summary: Get the stock of a product
|
|
2069
2206
|
* @description: Retrieve the available stock of the products. Use this API to get the stock status of products whose inventory is updated at the specified time
|
|
2070
2207
|
*/
|
|
@@ -2090,16 +2227,22 @@ class Catalog {
|
|
|
2090
2227
|
}
|
|
2091
2228
|
|
|
2092
2229
|
/**
|
|
2093
|
-
* @param {
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
2096
|
-
*
|
|
2097
|
-
*
|
|
2230
|
+
* @param {CatalogApplicationValidator.GetProductVariantsBySlugParam} arg -
|
|
2231
|
+
* Arg object.
|
|
2232
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2233
|
+
* @returns {Promise<CatalogApplicationModel.ProductVariantsResponse>} -
|
|
2234
|
+
* Success response
|
|
2235
|
+
* @name getProductVariantsBySlug
|
|
2098
2236
|
* @summary: Get variant of a particular product
|
|
2099
|
-
* @description: A product can have a different type of variants such as colour, shade, memory. Use this API to fetch all the available variants of a product using its slug.
|
|
2237
|
+
* @description: A product can have a different type of variants such as colour, shade, memory. Use this API to fetch all the available variants of a product using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/).
|
|
2100
2238
|
*/
|
|
2101
|
-
async getProductVariantsBySlug(
|
|
2102
|
-
|
|
2239
|
+
async getProductVariantsBySlug(
|
|
2240
|
+
{ slug } = {},
|
|
2241
|
+
{ headers } = { headers: false }
|
|
2242
|
+
) {
|
|
2243
|
+
const {
|
|
2244
|
+
error,
|
|
2245
|
+
} = CatalogApplicationValidator.getProductVariantsBySlug().validate(
|
|
2103
2246
|
{ slug },
|
|
2104
2247
|
{ abortEarly: false, allowUnknown: true }
|
|
2105
2248
|
);
|
|
@@ -2110,16 +2253,15 @@ class Catalog {
|
|
|
2110
2253
|
// Showing warrnings if extra unknown parameters are found
|
|
2111
2254
|
const {
|
|
2112
2255
|
error: warrning,
|
|
2113
|
-
} =
|
|
2256
|
+
} = CatalogApplicationValidator.getProductVariantsBySlug().validate(
|
|
2114
2257
|
{ slug },
|
|
2115
2258
|
{ abortEarly: false, allowUnknown: false }
|
|
2116
2259
|
);
|
|
2117
2260
|
if (warrning) {
|
|
2118
2261
|
Logger({
|
|
2119
2262
|
level: "WARN",
|
|
2120
|
-
message:
|
|
2263
|
+
message: `Parameter Validation warrnings for application > Catalog > getProductVariantsBySlug \n ${warrning}`,
|
|
2121
2264
|
});
|
|
2122
|
-
Logger({ level: "WARN", message: warrning });
|
|
2123
2265
|
}
|
|
2124
2266
|
|
|
2125
2267
|
const query_params = {};
|
|
@@ -2135,60 +2277,46 @@ class Catalog {
|
|
|
2135
2277
|
}),
|
|
2136
2278
|
query_params,
|
|
2137
2279
|
undefined,
|
|
2138
|
-
xHeaders
|
|
2280
|
+
xHeaders,
|
|
2281
|
+
{ headers }
|
|
2139
2282
|
);
|
|
2140
2283
|
|
|
2284
|
+
let responseData = response;
|
|
2285
|
+
if (headers) {
|
|
2286
|
+
responseData = response[0];
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2141
2289
|
const {
|
|
2142
2290
|
error: res_error,
|
|
2143
|
-
} =
|
|
2144
|
-
|
|
2145
|
-
allowUnknown: false
|
|
2146
|
-
|
|
2291
|
+
} = CatalogApplicationModel.ProductVariantsResponse().validate(
|
|
2292
|
+
responseData,
|
|
2293
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2294
|
+
);
|
|
2147
2295
|
|
|
2148
2296
|
if (res_error) {
|
|
2149
2297
|
Logger({
|
|
2150
2298
|
level: "WARN",
|
|
2151
|
-
message:
|
|
2299
|
+
message: `Response Validation Warnnings for application > Catalog > getProductVariantsBySlug \n ${res_error}`,
|
|
2152
2300
|
});
|
|
2153
|
-
Logger({ level: "WARN", message: res_error });
|
|
2154
2301
|
}
|
|
2155
2302
|
|
|
2156
2303
|
return response;
|
|
2157
2304
|
}
|
|
2158
2305
|
|
|
2159
2306
|
/**
|
|
2160
|
-
* @param {
|
|
2161
|
-
* @param {
|
|
2162
|
-
*
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
* Pipe (||) denotes the OR condition, whereas Triple-colon (:::)
|
|
2166
|
-
* indicates a new filter paramater applied as an AND condition.
|
|
2167
|
-
* @param {boolean} [arg.filters] - This is a boolean value, True for
|
|
2168
|
-
* fetching all filter parameters and False for disabling the filter parameters.
|
|
2169
|
-
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
2170
|
-
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
2171
|
-
* either ascending or descending order. See the supported values below.
|
|
2172
|
-
* @param {string} [arg.pageId] - Page ID to retrieve next set of results.
|
|
2173
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
2174
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
2175
|
-
* given set of results.
|
|
2176
|
-
* @param {string} [arg.pageType] - Available pagination types are cursor or number.
|
|
2177
|
-
* @returns {Promise<ProductListingResponse>} - Success response
|
|
2307
|
+
* @param {CatalogApplicationValidator.GetProductsParam} arg - Arg object.
|
|
2308
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2309
|
+
* @returns {Promise<CatalogApplicationModel.ProductListingResponse>} -
|
|
2310
|
+
* Success response
|
|
2311
|
+
* @name getProducts
|
|
2178
2312
|
* @summary: Get all the products
|
|
2179
|
-
* @description: Use this API to list all the products. You may choose a sort order or make arbitrary search queries by entering the product name, brand, category or collection.
|
|
2313
|
+
* @description: Use this API to list all the products. You may choose a sort order or make arbitrary search queries by entering the product name, brand, category or collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProducts/).
|
|
2180
2314
|
*/
|
|
2181
|
-
async getProducts(
|
|
2182
|
-
q,
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
pageId,
|
|
2187
|
-
pageSize,
|
|
2188
|
-
pageNo,
|
|
2189
|
-
pageType,
|
|
2190
|
-
} = {}) {
|
|
2191
|
-
const { error } = CatalogValidator.getProducts().validate(
|
|
2315
|
+
async getProducts(
|
|
2316
|
+
{ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType } = {},
|
|
2317
|
+
{ headers } = { headers: false }
|
|
2318
|
+
) {
|
|
2319
|
+
const { error } = CatalogApplicationValidator.getProducts().validate(
|
|
2192
2320
|
{ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
2193
2321
|
{ abortEarly: false, allowUnknown: true }
|
|
2194
2322
|
);
|
|
@@ -2197,16 +2325,17 @@ class Catalog {
|
|
|
2197
2325
|
}
|
|
2198
2326
|
|
|
2199
2327
|
// Showing warrnings if extra unknown parameters are found
|
|
2200
|
-
const {
|
|
2328
|
+
const {
|
|
2329
|
+
error: warrning,
|
|
2330
|
+
} = CatalogApplicationValidator.getProducts().validate(
|
|
2201
2331
|
{ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
2202
2332
|
{ abortEarly: false, allowUnknown: false }
|
|
2203
2333
|
);
|
|
2204
2334
|
if (warrning) {
|
|
2205
2335
|
Logger({
|
|
2206
2336
|
level: "WARN",
|
|
2207
|
-
message:
|
|
2337
|
+
message: `Parameter Validation warrnings for application > Catalog > getProducts \n ${warrning}`,
|
|
2208
2338
|
});
|
|
2209
|
-
Logger({ level: "WARN", message: warrning });
|
|
2210
2339
|
}
|
|
2211
2340
|
|
|
2212
2341
|
const query_params = {};
|
|
@@ -2230,22 +2359,27 @@ class Catalog {
|
|
|
2230
2359
|
}),
|
|
2231
2360
|
query_params,
|
|
2232
2361
|
undefined,
|
|
2233
|
-
xHeaders
|
|
2362
|
+
xHeaders,
|
|
2363
|
+
{ headers }
|
|
2234
2364
|
);
|
|
2235
2365
|
|
|
2366
|
+
let responseData = response;
|
|
2367
|
+
if (headers) {
|
|
2368
|
+
responseData = response[0];
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2236
2371
|
const {
|
|
2237
2372
|
error: res_error,
|
|
2238
|
-
} =
|
|
2239
|
-
|
|
2240
|
-
allowUnknown: false
|
|
2241
|
-
|
|
2373
|
+
} = CatalogApplicationModel.ProductListingResponse().validate(
|
|
2374
|
+
responseData,
|
|
2375
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2376
|
+
);
|
|
2242
2377
|
|
|
2243
2378
|
if (res_error) {
|
|
2244
2379
|
Logger({
|
|
2245
2380
|
level: "WARN",
|
|
2246
|
-
message:
|
|
2381
|
+
message: `Response Validation Warnnings for application > Catalog > getProducts \n ${res_error}`,
|
|
2247
2382
|
});
|
|
2248
|
-
Logger({ level: "WARN", message: res_error });
|
|
2249
2383
|
}
|
|
2250
2384
|
|
|
2251
2385
|
return response;
|
|
@@ -2265,6 +2399,7 @@ class Catalog {
|
|
|
2265
2399
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
2266
2400
|
* either ascending or descending order. See the supported values below.
|
|
2267
2401
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
2402
|
+
* @returns {Paginator<CatalogApplicationModel.ProductListingResponse>}
|
|
2268
2403
|
* @summary: Get all the products
|
|
2269
2404
|
* @description: Use this API to list all the products. You may choose a sort order or make arbitrary search queries by entering the product name, brand, category or collection.
|
|
2270
2405
|
*/
|
|
@@ -2295,17 +2430,15 @@ class Catalog {
|
|
|
2295
2430
|
}
|
|
2296
2431
|
|
|
2297
2432
|
/**
|
|
2298
|
-
* @param {
|
|
2299
|
-
* @param {
|
|
2300
|
-
*
|
|
2301
|
-
*
|
|
2302
|
-
* _ski shoes_, __skin cream_ etc.
|
|
2303
|
-
* @returns {Promise<AutoCompleteResponse>} - Success response
|
|
2433
|
+
* @param {CatalogApplicationValidator.GetSearchResultsParam} arg - Arg object.
|
|
2434
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2435
|
+
* @returns {Promise<CatalogApplicationModel.AutoCompleteResponse>} - Success response
|
|
2436
|
+
* @name getSearchResults
|
|
2304
2437
|
* @summary: Get relevant suggestions for a search query
|
|
2305
|
-
* @description: Retrieves a list of suggestions for a given search query. Each suggestion is a valid search term that's generated on the basis of query. This is particularly useful to enhance the user experience while using the search tool.
|
|
2438
|
+
* @description: Retrieves a list of suggestions for a given search query. Each suggestion is a valid search term that's generated on the basis of query. This is particularly useful to enhance the user experience while using the search tool. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSearchResults/).
|
|
2306
2439
|
*/
|
|
2307
|
-
async getSearchResults({ q } = {}) {
|
|
2308
|
-
const { error } =
|
|
2440
|
+
async getSearchResults({ q } = {}, { headers } = { headers: false }) {
|
|
2441
|
+
const { error } = CatalogApplicationValidator.getSearchResults().validate(
|
|
2309
2442
|
{ q },
|
|
2310
2443
|
{ abortEarly: false, allowUnknown: true }
|
|
2311
2444
|
);
|
|
@@ -2314,16 +2447,17 @@ class Catalog {
|
|
|
2314
2447
|
}
|
|
2315
2448
|
|
|
2316
2449
|
// Showing warrnings if extra unknown parameters are found
|
|
2317
|
-
const {
|
|
2450
|
+
const {
|
|
2451
|
+
error: warrning,
|
|
2452
|
+
} = CatalogApplicationValidator.getSearchResults().validate(
|
|
2318
2453
|
{ q },
|
|
2319
2454
|
{ abortEarly: false, allowUnknown: false }
|
|
2320
2455
|
);
|
|
2321
2456
|
if (warrning) {
|
|
2322
2457
|
Logger({
|
|
2323
2458
|
level: "WARN",
|
|
2324
|
-
message:
|
|
2459
|
+
message: `Parameter Validation warrnings for application > Catalog > getSearchResults \n ${warrning}`,
|
|
2325
2460
|
});
|
|
2326
|
-
Logger({ level: "WARN", message: warrning });
|
|
2327
2461
|
}
|
|
2328
2462
|
|
|
2329
2463
|
const query_params = {};
|
|
@@ -2340,12 +2474,18 @@ class Catalog {
|
|
|
2340
2474
|
}),
|
|
2341
2475
|
query_params,
|
|
2342
2476
|
undefined,
|
|
2343
|
-
xHeaders
|
|
2477
|
+
xHeaders,
|
|
2478
|
+
{ headers }
|
|
2344
2479
|
);
|
|
2345
2480
|
|
|
2481
|
+
let responseData = response;
|
|
2482
|
+
if (headers) {
|
|
2483
|
+
responseData = response[0];
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2346
2486
|
const {
|
|
2347
2487
|
error: res_error,
|
|
2348
|
-
} =
|
|
2488
|
+
} = CatalogApplicationModel.AutoCompleteResponse().validate(responseData, {
|
|
2349
2489
|
abortEarly: false,
|
|
2350
2490
|
allowUnknown: false,
|
|
2351
2491
|
});
|
|
@@ -2353,27 +2493,31 @@ class Catalog {
|
|
|
2353
2493
|
if (res_error) {
|
|
2354
2494
|
Logger({
|
|
2355
2495
|
level: "WARN",
|
|
2356
|
-
message:
|
|
2496
|
+
message: `Response Validation Warnnings for application > Catalog > getSearchResults \n ${res_error}`,
|
|
2357
2497
|
});
|
|
2358
|
-
Logger({ level: "WARN", message: res_error });
|
|
2359
2498
|
}
|
|
2360
2499
|
|
|
2361
2500
|
return response;
|
|
2362
2501
|
}
|
|
2363
2502
|
|
|
2364
2503
|
/**
|
|
2365
|
-
* @param {
|
|
2366
|
-
*
|
|
2367
|
-
*
|
|
2368
|
-
*
|
|
2369
|
-
* @returns {Promise<ProductCompareResponse>} -
|
|
2504
|
+
* @param {CatalogApplicationValidator.GetSimilarComparisonProductBySlugParam} arg
|
|
2505
|
+
* - Arg object.
|
|
2506
|
+
*
|
|
2507
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2508
|
+
* @returns {Promise<CatalogApplicationModel.ProductCompareResponse>} -
|
|
2509
|
+
* Success response
|
|
2510
|
+
* @name getSimilarComparisonProductBySlug
|
|
2370
2511
|
* @summary: Get comparison between similar products
|
|
2371
|
-
* @description: Use this API to compare a given product automatically with similar products. Only one slug is needed.
|
|
2512
|
+
* @description: Use this API to compare a given product automatically with similar products. Only one slug is needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/).
|
|
2372
2513
|
*/
|
|
2373
|
-
async getSimilarComparisonProductBySlug(
|
|
2514
|
+
async getSimilarComparisonProductBySlug(
|
|
2515
|
+
{ slug } = {},
|
|
2516
|
+
{ headers } = { headers: false }
|
|
2517
|
+
) {
|
|
2374
2518
|
const {
|
|
2375
2519
|
error,
|
|
2376
|
-
} =
|
|
2520
|
+
} = CatalogApplicationValidator.getSimilarComparisonProductBySlug().validate(
|
|
2377
2521
|
{ slug },
|
|
2378
2522
|
{ abortEarly: false, allowUnknown: true }
|
|
2379
2523
|
);
|
|
@@ -2384,17 +2528,15 @@ class Catalog {
|
|
|
2384
2528
|
// Showing warrnings if extra unknown parameters are found
|
|
2385
2529
|
const {
|
|
2386
2530
|
error: warrning,
|
|
2387
|
-
} =
|
|
2531
|
+
} = CatalogApplicationValidator.getSimilarComparisonProductBySlug().validate(
|
|
2388
2532
|
{ slug },
|
|
2389
2533
|
{ abortEarly: false, allowUnknown: false }
|
|
2390
2534
|
);
|
|
2391
2535
|
if (warrning) {
|
|
2392
2536
|
Logger({
|
|
2393
2537
|
level: "WARN",
|
|
2394
|
-
message:
|
|
2395
|
-
"Parameter Validation warrnings for getSimilarComparisonProductBySlug",
|
|
2538
|
+
message: `Parameter Validation warrnings for application > Catalog > getSimilarComparisonProductBySlug \n ${warrning}`,
|
|
2396
2539
|
});
|
|
2397
|
-
Logger({ level: "WARN", message: warrning });
|
|
2398
2540
|
}
|
|
2399
2541
|
|
|
2400
2542
|
const query_params = {};
|
|
@@ -2410,55 +2552,45 @@ class Catalog {
|
|
|
2410
2552
|
}),
|
|
2411
2553
|
query_params,
|
|
2412
2554
|
undefined,
|
|
2413
|
-
xHeaders
|
|
2555
|
+
xHeaders,
|
|
2556
|
+
{ headers }
|
|
2414
2557
|
);
|
|
2415
2558
|
|
|
2559
|
+
let responseData = response;
|
|
2560
|
+
if (headers) {
|
|
2561
|
+
responseData = response[0];
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2416
2564
|
const {
|
|
2417
2565
|
error: res_error,
|
|
2418
|
-
} =
|
|
2419
|
-
|
|
2420
|
-
allowUnknown: false
|
|
2421
|
-
|
|
2566
|
+
} = CatalogApplicationModel.ProductCompareResponse().validate(
|
|
2567
|
+
responseData,
|
|
2568
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2569
|
+
);
|
|
2422
2570
|
|
|
2423
2571
|
if (res_error) {
|
|
2424
2572
|
Logger({
|
|
2425
2573
|
level: "WARN",
|
|
2426
|
-
message:
|
|
2427
|
-
"Response Validation Warnnings for getSimilarComparisonProductBySlug",
|
|
2574
|
+
message: `Response Validation Warnnings for application > Catalog > getSimilarComparisonProductBySlug \n ${res_error}`,
|
|
2428
2575
|
});
|
|
2429
|
-
Logger({ level: "WARN", message: res_error });
|
|
2430
2576
|
}
|
|
2431
2577
|
|
|
2432
2578
|
return response;
|
|
2433
2579
|
}
|
|
2434
2580
|
|
|
2435
2581
|
/**
|
|
2436
|
-
* @param {
|
|
2437
|
-
* @param {
|
|
2438
|
-
*
|
|
2439
|
-
* @
|
|
2440
|
-
* @param {string} [arg.q] - Search a store by its name or store_code.
|
|
2441
|
-
* @param {string} [arg.city] - Search stores by the city in which they are situated.
|
|
2442
|
-
* @param {number} [arg.range] - Use this to retrieve stores within a
|
|
2443
|
-
* particular range in meters, e.g. 10000, to indicate a 10km range
|
|
2444
|
-
* @param {number} [arg.latitude] - Latitude of the location from where one
|
|
2445
|
-
* wants to retreive the nearest stores, e.g. 72.8691788
|
|
2446
|
-
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
2447
|
-
* one wants to retreive the nearest stores, e.g. 19.1174114
|
|
2448
|
-
* @returns {Promise<StoreListingResponse>} - Success response
|
|
2582
|
+
* @param {CatalogApplicationValidator.GetStoresParam} arg - Arg object.
|
|
2583
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2584
|
+
* @returns {Promise<CatalogApplicationModel.StoreListingResponse>} - Success response
|
|
2585
|
+
* @name getStores
|
|
2449
2586
|
* @summary: Get store meta information.
|
|
2450
|
-
* @description: Use this API to get a list of stores in a specific application.
|
|
2587
|
+
* @description: Use this API to get a list of stores in a specific application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/).
|
|
2451
2588
|
*/
|
|
2452
|
-
async getStores(
|
|
2453
|
-
pageNo,
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
range,
|
|
2458
|
-
latitude,
|
|
2459
|
-
longitude,
|
|
2460
|
-
} = {}) {
|
|
2461
|
-
const { error } = CatalogValidator.getStores().validate(
|
|
2589
|
+
async getStores(
|
|
2590
|
+
{ pageNo, pageSize, q, city, range, latitude, longitude } = {},
|
|
2591
|
+
{ headers } = { headers: false }
|
|
2592
|
+
) {
|
|
2593
|
+
const { error } = CatalogApplicationValidator.getStores().validate(
|
|
2462
2594
|
{ pageNo, pageSize, q, city, range, latitude, longitude },
|
|
2463
2595
|
{ abortEarly: false, allowUnknown: true }
|
|
2464
2596
|
);
|
|
@@ -2467,16 +2599,17 @@ class Catalog {
|
|
|
2467
2599
|
}
|
|
2468
2600
|
|
|
2469
2601
|
// Showing warrnings if extra unknown parameters are found
|
|
2470
|
-
const {
|
|
2602
|
+
const {
|
|
2603
|
+
error: warrning,
|
|
2604
|
+
} = CatalogApplicationValidator.getStores().validate(
|
|
2471
2605
|
{ pageNo, pageSize, q, city, range, latitude, longitude },
|
|
2472
2606
|
{ abortEarly: false, allowUnknown: false }
|
|
2473
2607
|
);
|
|
2474
2608
|
if (warrning) {
|
|
2475
2609
|
Logger({
|
|
2476
2610
|
level: "WARN",
|
|
2477
|
-
message:
|
|
2611
|
+
message: `Parameter Validation warrnings for application > Catalog > getStores \n ${warrning}`,
|
|
2478
2612
|
});
|
|
2479
|
-
Logger({ level: "WARN", message: warrning });
|
|
2480
2613
|
}
|
|
2481
2614
|
|
|
2482
2615
|
const query_params = {};
|
|
@@ -2499,12 +2632,18 @@ class Catalog {
|
|
|
2499
2632
|
}),
|
|
2500
2633
|
query_params,
|
|
2501
2634
|
undefined,
|
|
2502
|
-
xHeaders
|
|
2635
|
+
xHeaders,
|
|
2636
|
+
{ headers }
|
|
2503
2637
|
);
|
|
2504
2638
|
|
|
2639
|
+
let responseData = response;
|
|
2640
|
+
if (headers) {
|
|
2641
|
+
responseData = response[0];
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2505
2644
|
const {
|
|
2506
2645
|
error: res_error,
|
|
2507
|
-
} =
|
|
2646
|
+
} = CatalogApplicationModel.StoreListingResponse().validate(responseData, {
|
|
2508
2647
|
abortEarly: false,
|
|
2509
2648
|
allowUnknown: false,
|
|
2510
2649
|
});
|
|
@@ -2512,9 +2651,8 @@ class Catalog {
|
|
|
2512
2651
|
if (res_error) {
|
|
2513
2652
|
Logger({
|
|
2514
2653
|
level: "WARN",
|
|
2515
|
-
message:
|
|
2654
|
+
message: `Response Validation Warnnings for application > Catalog > getStores \n ${res_error}`,
|
|
2516
2655
|
});
|
|
2517
|
-
Logger({ level: "WARN", message: res_error });
|
|
2518
2656
|
}
|
|
2519
2657
|
|
|
2520
2658
|
return response;
|
|
@@ -2531,6 +2669,7 @@ class Catalog {
|
|
|
2531
2669
|
* wants to retreive the nearest stores, e.g. 72.8691788
|
|
2532
2670
|
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
2533
2671
|
* one wants to retreive the nearest stores, e.g. 19.1174114
|
|
2672
|
+
* @returns {Paginator<CatalogApplicationModel.StoreListingResponse>}
|
|
2534
2673
|
* @summary: Get store meta information.
|
|
2535
2674
|
* @description: Use this API to get a list of stores in a specific application.
|
|
2536
2675
|
*/
|
|
@@ -2560,16 +2699,18 @@ class Catalog {
|
|
|
2560
2699
|
}
|
|
2561
2700
|
|
|
2562
2701
|
/**
|
|
2563
|
-
* @param {
|
|
2564
|
-
* @param {
|
|
2565
|
-
*
|
|
2566
|
-
* @
|
|
2567
|
-
* @returns {Promise<FollowPostResponse>} - Success response
|
|
2702
|
+
* @param {CatalogApplicationValidator.UnfollowByIdParam} arg - Arg object.
|
|
2703
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2704
|
+
* @returns {Promise<CatalogApplicationModel.FollowPostResponse>} - Success response
|
|
2705
|
+
* @name unfollowById
|
|
2568
2706
|
* @summary: Unfollow an entity (product/brand/collection)
|
|
2569
|
-
* @description: You can undo a followed product, brand or collection by its ID. This action is referred as _unfollow_.
|
|
2707
|
+
* @description: You can undo a followed product, brand or collection by its ID. This action is referred as _unfollow_. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/).
|
|
2570
2708
|
*/
|
|
2571
|
-
async unfollowById(
|
|
2572
|
-
|
|
2709
|
+
async unfollowById(
|
|
2710
|
+
{ collectionType, collectionId } = {},
|
|
2711
|
+
{ headers } = { headers: false }
|
|
2712
|
+
) {
|
|
2713
|
+
const { error } = CatalogApplicationValidator.unfollowById().validate(
|
|
2573
2714
|
{ collectionType, collectionId },
|
|
2574
2715
|
{ abortEarly: false, allowUnknown: true }
|
|
2575
2716
|
);
|
|
@@ -2578,16 +2719,17 @@ class Catalog {
|
|
|
2578
2719
|
}
|
|
2579
2720
|
|
|
2580
2721
|
// Showing warrnings if extra unknown parameters are found
|
|
2581
|
-
const {
|
|
2722
|
+
const {
|
|
2723
|
+
error: warrning,
|
|
2724
|
+
} = CatalogApplicationValidator.unfollowById().validate(
|
|
2582
2725
|
{ collectionType, collectionId },
|
|
2583
2726
|
{ abortEarly: false, allowUnknown: false }
|
|
2584
2727
|
);
|
|
2585
2728
|
if (warrning) {
|
|
2586
2729
|
Logger({
|
|
2587
2730
|
level: "WARN",
|
|
2588
|
-
message:
|
|
2731
|
+
message: `Parameter Validation warrnings for application > Catalog > unfollowById \n ${warrning}`,
|
|
2589
2732
|
});
|
|
2590
|
-
Logger({ level: "WARN", message: warrning });
|
|
2591
2733
|
}
|
|
2592
2734
|
|
|
2593
2735
|
const query_params = {};
|
|
@@ -2603,12 +2745,18 @@ class Catalog {
|
|
|
2603
2745
|
}),
|
|
2604
2746
|
query_params,
|
|
2605
2747
|
undefined,
|
|
2606
|
-
xHeaders
|
|
2748
|
+
xHeaders,
|
|
2749
|
+
{ headers }
|
|
2607
2750
|
);
|
|
2608
2751
|
|
|
2752
|
+
let responseData = response;
|
|
2753
|
+
if (headers) {
|
|
2754
|
+
responseData = response[0];
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2609
2757
|
const {
|
|
2610
2758
|
error: res_error,
|
|
2611
|
-
} =
|
|
2759
|
+
} = CatalogApplicationModel.FollowPostResponse().validate(responseData, {
|
|
2612
2760
|
abortEarly: false,
|
|
2613
2761
|
allowUnknown: false,
|
|
2614
2762
|
});
|
|
@@ -2616,9 +2764,8 @@ class Catalog {
|
|
|
2616
2764
|
if (res_error) {
|
|
2617
2765
|
Logger({
|
|
2618
2766
|
level: "WARN",
|
|
2619
|
-
message:
|
|
2767
|
+
message: `Response Validation Warnnings for application > Catalog > unfollowById \n ${res_error}`,
|
|
2620
2768
|
});
|
|
2621
|
-
Logger({ level: "WARN", message: res_error });
|
|
2622
2769
|
}
|
|
2623
2770
|
|
|
2624
2771
|
return response;
|