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