@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +75 -90
- package/sdk/application/Cart/CartApplicationClient.js +108 -1199
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +81 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +41 -1344
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +2 -92
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
- package/sdk/application/Content/ContentApplicationClient.d.ts +48 -111
- package/sdk/application/Content/ContentApplicationClient.js +43 -1065
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -13
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -138
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +105 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +5 -217
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +42 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +91 -493
- package/sdk/application/Order/OrderApplicationClient.d.ts +36 -46
- package/sdk/application/Order/OrderApplicationClient.js +52 -507
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +103 -213
- package/sdk/application/Payment/PaymentApplicationClient.js +84 -2105
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -29
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -312
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +7 -309
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -176
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +44 -1820
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -52
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +157 -30
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1177 -56
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1662 -249
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +774 -162
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +141 -12
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5060 -1300
- package/sdk/platform/Cart/CartPlatformModel.js +1985 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +178 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +468 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6554 -1772
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3264 -1690
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +116 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +85 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +122 -191
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +447 -831
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +174 -220
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +164 -199
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1233 -476
- package/sdk/platform/Content/ContentPlatformModel.js +514 -487
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +424 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7747 -1342
- package/sdk/platform/Order/OrderPlatformModel.js +3960 -1262
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +292 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +145 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +132 -44
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +681 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2458 -650
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1266 -572
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +176 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -7
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +795 -7
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Partner/PartnerPublicClient.js +4 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +12 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
- package/sdk/application/Cart/CartApplicationModel.js +0 -2497
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
- package/sdk/application/Cart/CartApplicationValidator.js +0 -530
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
- package/sdk/application/Content/ContentApplicationModel.js +0 -1589
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
- package/sdk/application/Content/ContentApplicationValidator.js +0 -264
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
- package/sdk/application/Order/OrderApplicationModel.js +0 -1471
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
- package/sdk/application/Order/OrderApplicationValidator.js +0 -197
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
2
|
const constructUrl = require("../constructUrl");
|
|
7
3
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const CatalogApplicationValidator = require("./CatalogApplicationValidator");
|
|
9
|
-
const CatalogApplicationModel = require("./CatalogApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
12
4
|
|
|
13
5
|
class Catalog {
|
|
14
6
|
constructor(_conf) {
|
|
@@ -82,10 +74,9 @@ class Catalog {
|
|
|
82
74
|
}
|
|
83
75
|
|
|
84
76
|
/**
|
|
85
|
-
* @param {CatalogApplicationValidator.FollowByIdParam} arg - Arg object.
|
|
86
77
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
87
78
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
88
|
-
* @returns {Promise<
|
|
79
|
+
* @returns {Promise<FollowPostResponseSchema>} - Success response
|
|
89
80
|
* @name followById
|
|
90
81
|
* @summary: Create item, brand, product
|
|
91
82
|
* @description: Add a product, brand, or item to the user's followed list by collection Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/).
|
|
@@ -94,28 +85,6 @@ class Catalog {
|
|
|
94
85
|
{ collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
|
|
95
86
|
{ responseHeaders } = { responseHeaders: false }
|
|
96
87
|
) {
|
|
97
|
-
const { error } = CatalogApplicationValidator.followById().validate(
|
|
98
|
-
{ collectionType, collectionId },
|
|
99
|
-
{ abortEarly: false, allowUnknown: true }
|
|
100
|
-
);
|
|
101
|
-
if (error) {
|
|
102
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Showing warrnings if extra unknown parameters are found
|
|
106
|
-
const {
|
|
107
|
-
error: warrning,
|
|
108
|
-
} = CatalogApplicationValidator.followById().validate(
|
|
109
|
-
{ collectionType, collectionId },
|
|
110
|
-
{ abortEarly: false, allowUnknown: false }
|
|
111
|
-
);
|
|
112
|
-
if (warrning) {
|
|
113
|
-
Logger({
|
|
114
|
-
level: "WARN",
|
|
115
|
-
message: `Parameter Validation warrnings for application > Catalog > followById \n ${warrning}`,
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
88
|
const query_params = {};
|
|
120
89
|
|
|
121
90
|
const xHeaders = {};
|
|
@@ -138,32 +107,13 @@ class Catalog {
|
|
|
138
107
|
responseData = response[0];
|
|
139
108
|
}
|
|
140
109
|
|
|
141
|
-
const {
|
|
142
|
-
error: res_error,
|
|
143
|
-
} = CatalogApplicationModel.FollowPostResponse().validate(responseData, {
|
|
144
|
-
abortEarly: false,
|
|
145
|
-
allowUnknown: true,
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
if (res_error) {
|
|
149
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
150
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
151
|
-
} else {
|
|
152
|
-
Logger({
|
|
153
|
-
level: "WARN",
|
|
154
|
-
message: `Response Validation Warnings for application > Catalog > followById \n ${res_error}`,
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
110
|
return response;
|
|
160
111
|
}
|
|
161
112
|
|
|
162
113
|
/**
|
|
163
|
-
* @param {CatalogApplicationValidator.GetBrandDetailBySlugParam} arg - Arg object.
|
|
164
114
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
165
115
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
166
|
-
* @returns {Promise<
|
|
116
|
+
* @returns {Promise<BrandDetailResponseSchema>} - Success response
|
|
167
117
|
* @name getBrandDetailBySlug
|
|
168
118
|
* @summary: Get a brand
|
|
169
119
|
* @description: Get 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/).
|
|
@@ -172,30 +122,6 @@ class Catalog {
|
|
|
172
122
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
173
123
|
{ responseHeaders } = { responseHeaders: false }
|
|
174
124
|
) {
|
|
175
|
-
const {
|
|
176
|
-
error,
|
|
177
|
-
} = CatalogApplicationValidator.getBrandDetailBySlug().validate(
|
|
178
|
-
{ slug },
|
|
179
|
-
{ abortEarly: false, allowUnknown: true }
|
|
180
|
-
);
|
|
181
|
-
if (error) {
|
|
182
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// Showing warrnings if extra unknown parameters are found
|
|
186
|
-
const {
|
|
187
|
-
error: warrning,
|
|
188
|
-
} = CatalogApplicationValidator.getBrandDetailBySlug().validate(
|
|
189
|
-
{ slug },
|
|
190
|
-
{ abortEarly: false, allowUnknown: false }
|
|
191
|
-
);
|
|
192
|
-
if (warrning) {
|
|
193
|
-
Logger({
|
|
194
|
-
level: "WARN",
|
|
195
|
-
message: `Parameter Validation warrnings for application > Catalog > getBrandDetailBySlug \n ${warrning}`,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
125
|
const query_params = {};
|
|
200
126
|
|
|
201
127
|
const xHeaders = {};
|
|
@@ -218,32 +144,13 @@ class Catalog {
|
|
|
218
144
|
responseData = response[0];
|
|
219
145
|
}
|
|
220
146
|
|
|
221
|
-
const {
|
|
222
|
-
error: res_error,
|
|
223
|
-
} = CatalogApplicationModel.BrandDetailResponse().validate(responseData, {
|
|
224
|
-
abortEarly: false,
|
|
225
|
-
allowUnknown: true,
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
if (res_error) {
|
|
229
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
230
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
231
|
-
} else {
|
|
232
|
-
Logger({
|
|
233
|
-
level: "WARN",
|
|
234
|
-
message: `Response Validation Warnings for application > Catalog > getBrandDetailBySlug \n ${res_error}`,
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
147
|
return response;
|
|
240
148
|
}
|
|
241
149
|
|
|
242
150
|
/**
|
|
243
|
-
* @param {CatalogApplicationValidator.GetBrandsParam} arg - Arg object.
|
|
244
151
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
245
152
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
246
|
-
* @returns {Promise<
|
|
153
|
+
* @returns {Promise<BrandListingResponseSchema>} - Success response
|
|
247
154
|
* @name getBrands
|
|
248
155
|
* @summary: List brands
|
|
249
156
|
* @description: Get a list of all the available brands. Filtering can be applied to the department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrands/).
|
|
@@ -252,28 +159,6 @@ class Catalog {
|
|
|
252
159
|
{ department, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
253
160
|
{ responseHeaders } = { responseHeaders: false }
|
|
254
161
|
) {
|
|
255
|
-
const { error } = CatalogApplicationValidator.getBrands().validate(
|
|
256
|
-
{ department, pageNo, pageSize },
|
|
257
|
-
{ abortEarly: false, allowUnknown: true }
|
|
258
|
-
);
|
|
259
|
-
if (error) {
|
|
260
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// Showing warrnings if extra unknown parameters are found
|
|
264
|
-
const {
|
|
265
|
-
error: warrning,
|
|
266
|
-
} = CatalogApplicationValidator.getBrands().validate(
|
|
267
|
-
{ department, pageNo, pageSize },
|
|
268
|
-
{ abortEarly: false, allowUnknown: false }
|
|
269
|
-
);
|
|
270
|
-
if (warrning) {
|
|
271
|
-
Logger({
|
|
272
|
-
level: "WARN",
|
|
273
|
-
message: `Parameter Validation warrnings for application > Catalog > getBrands \n ${warrning}`,
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
162
|
const query_params = {};
|
|
278
163
|
query_params["department"] = department;
|
|
279
164
|
query_params["page_no"] = pageNo;
|
|
@@ -299,24 +184,6 @@ class Catalog {
|
|
|
299
184
|
responseData = response[0];
|
|
300
185
|
}
|
|
301
186
|
|
|
302
|
-
const {
|
|
303
|
-
error: res_error,
|
|
304
|
-
} = CatalogApplicationModel.BrandListingResponse().validate(responseData, {
|
|
305
|
-
abortEarly: false,
|
|
306
|
-
allowUnknown: true,
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
if (res_error) {
|
|
310
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
311
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
312
|
-
} else {
|
|
313
|
-
Logger({
|
|
314
|
-
level: "WARN",
|
|
315
|
-
message: `Response Validation Warnings for application > Catalog > getBrands \n ${res_error}`,
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
187
|
return response;
|
|
321
188
|
}
|
|
322
189
|
|
|
@@ -327,7 +194,7 @@ class Catalog {
|
|
|
327
194
|
* of available departments below. Also, you can get available departments
|
|
328
195
|
* from the endpoint /service/application/catalog/v1.0/departments/.
|
|
329
196
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
330
|
-
* @returns {Paginator<
|
|
197
|
+
* @returns {Paginator<BrandListingResponseSchema>}
|
|
331
198
|
* @summary: List brands
|
|
332
199
|
* @description: Get a list of all the available brands. Filtering can be applied to the department.
|
|
333
200
|
*/
|
|
@@ -353,11 +220,9 @@ class Catalog {
|
|
|
353
220
|
}
|
|
354
221
|
|
|
355
222
|
/**
|
|
356
|
-
* @param {CatalogApplicationValidator.GetCategoriesParam} arg - Arg object.
|
|
357
223
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
358
224
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
359
|
-
* @returns {Promise<
|
|
360
|
-
* Success response
|
|
225
|
+
* @returns {Promise<CategoryListingResponseSchema>} - Success response
|
|
361
226
|
* @name getCategories
|
|
362
227
|
* @summary: List product categories
|
|
363
228
|
* @description: List all available product categories. Also, users can filter the categories by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategories/).
|
|
@@ -366,28 +231,6 @@ class Catalog {
|
|
|
366
231
|
{ department, requestHeaders } = { requestHeaders: {} },
|
|
367
232
|
{ responseHeaders } = { responseHeaders: false }
|
|
368
233
|
) {
|
|
369
|
-
const { error } = CatalogApplicationValidator.getCategories().validate(
|
|
370
|
-
{ department },
|
|
371
|
-
{ abortEarly: false, allowUnknown: true }
|
|
372
|
-
);
|
|
373
|
-
if (error) {
|
|
374
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// Showing warrnings if extra unknown parameters are found
|
|
378
|
-
const {
|
|
379
|
-
error: warrning,
|
|
380
|
-
} = CatalogApplicationValidator.getCategories().validate(
|
|
381
|
-
{ department },
|
|
382
|
-
{ abortEarly: false, allowUnknown: false }
|
|
383
|
-
);
|
|
384
|
-
if (warrning) {
|
|
385
|
-
Logger({
|
|
386
|
-
level: "WARN",
|
|
387
|
-
message: `Parameter Validation warrnings for application > Catalog > getCategories \n ${warrning}`,
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
|
|
391
234
|
const query_params = {};
|
|
392
235
|
query_params["department"] = department;
|
|
393
236
|
|
|
@@ -411,32 +254,13 @@ class Catalog {
|
|
|
411
254
|
responseData = response[0];
|
|
412
255
|
}
|
|
413
256
|
|
|
414
|
-
const {
|
|
415
|
-
error: res_error,
|
|
416
|
-
} = CatalogApplicationModel.CategoryListingResponse().validate(
|
|
417
|
-
responseData,
|
|
418
|
-
{ abortEarly: false, allowUnknown: true }
|
|
419
|
-
);
|
|
420
|
-
|
|
421
|
-
if (res_error) {
|
|
422
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
423
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
424
|
-
} else {
|
|
425
|
-
Logger({
|
|
426
|
-
level: "WARN",
|
|
427
|
-
message: `Response Validation Warnings for application > Catalog > getCategories \n ${res_error}`,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
257
|
return response;
|
|
433
258
|
}
|
|
434
259
|
|
|
435
260
|
/**
|
|
436
|
-
* @param {CatalogApplicationValidator.GetCategoryDetailBySlugParam} arg - Arg object.
|
|
437
261
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
438
262
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
439
|
-
* @returns {Promise<
|
|
263
|
+
* @returns {Promise<CategoryMetaResponseSchema>} - Success response
|
|
440
264
|
* @name getCategoryDetailBySlug
|
|
441
265
|
* @summary: Get category by slug
|
|
442
266
|
* @description: Get detailed information about a specific product category using its slug and get 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/).
|
|
@@ -445,30 +269,6 @@ class Catalog {
|
|
|
445
269
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
446
270
|
{ responseHeaders } = { responseHeaders: false }
|
|
447
271
|
) {
|
|
448
|
-
const {
|
|
449
|
-
error,
|
|
450
|
-
} = CatalogApplicationValidator.getCategoryDetailBySlug().validate(
|
|
451
|
-
{ slug },
|
|
452
|
-
{ abortEarly: false, allowUnknown: true }
|
|
453
|
-
);
|
|
454
|
-
if (error) {
|
|
455
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
// Showing warrnings if extra unknown parameters are found
|
|
459
|
-
const {
|
|
460
|
-
error: warrning,
|
|
461
|
-
} = CatalogApplicationValidator.getCategoryDetailBySlug().validate(
|
|
462
|
-
{ slug },
|
|
463
|
-
{ abortEarly: false, allowUnknown: false }
|
|
464
|
-
);
|
|
465
|
-
if (warrning) {
|
|
466
|
-
Logger({
|
|
467
|
-
level: "WARN",
|
|
468
|
-
message: `Parameter Validation warrnings for application > Catalog > getCategoryDetailBySlug \n ${warrning}`,
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
|
|
472
272
|
const query_params = {};
|
|
473
273
|
|
|
474
274
|
const xHeaders = {};
|
|
@@ -491,35 +291,13 @@ class Catalog {
|
|
|
491
291
|
responseData = response[0];
|
|
492
292
|
}
|
|
493
293
|
|
|
494
|
-
const {
|
|
495
|
-
error: res_error,
|
|
496
|
-
} = CatalogApplicationModel.CategoryMetaResponse().validate(responseData, {
|
|
497
|
-
abortEarly: false,
|
|
498
|
-
allowUnknown: true,
|
|
499
|
-
});
|
|
500
|
-
|
|
501
|
-
if (res_error) {
|
|
502
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
503
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
504
|
-
} else {
|
|
505
|
-
Logger({
|
|
506
|
-
level: "WARN",
|
|
507
|
-
message: `Response Validation Warnings for application > Catalog > getCategoryDetailBySlug \n ${res_error}`,
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
294
|
return response;
|
|
513
295
|
}
|
|
514
296
|
|
|
515
297
|
/**
|
|
516
|
-
* @param {CatalogApplicationValidator.GetCollectionDetailBySlugParam} arg
|
|
517
|
-
* - Arg object.
|
|
518
|
-
*
|
|
519
298
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
520
299
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
521
|
-
* @returns {Promise<
|
|
522
|
-
* Success response
|
|
300
|
+
* @returns {Promise<CollectionDetailResponseSchema>} - Success response
|
|
523
301
|
* @name getCollectionDetailBySlug
|
|
524
302
|
* @summary: Get a collection
|
|
525
303
|
* @description: Get detailed information about a specific collection using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/).
|
|
@@ -528,30 +306,6 @@ class Catalog {
|
|
|
528
306
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
529
307
|
{ responseHeaders } = { responseHeaders: false }
|
|
530
308
|
) {
|
|
531
|
-
const {
|
|
532
|
-
error,
|
|
533
|
-
} = CatalogApplicationValidator.getCollectionDetailBySlug().validate(
|
|
534
|
-
{ slug },
|
|
535
|
-
{ abortEarly: false, allowUnknown: true }
|
|
536
|
-
);
|
|
537
|
-
if (error) {
|
|
538
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// Showing warrnings if extra unknown parameters are found
|
|
542
|
-
const {
|
|
543
|
-
error: warrning,
|
|
544
|
-
} = CatalogApplicationValidator.getCollectionDetailBySlug().validate(
|
|
545
|
-
{ slug },
|
|
546
|
-
{ abortEarly: false, allowUnknown: false }
|
|
547
|
-
);
|
|
548
|
-
if (warrning) {
|
|
549
|
-
Logger({
|
|
550
|
-
level: "WARN",
|
|
551
|
-
message: `Parameter Validation warrnings for application > Catalog > getCollectionDetailBySlug \n ${warrning}`,
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
|
|
555
309
|
const query_params = {};
|
|
556
310
|
|
|
557
311
|
const xHeaders = {};
|
|
@@ -574,34 +328,13 @@ class Catalog {
|
|
|
574
328
|
responseData = response[0];
|
|
575
329
|
}
|
|
576
330
|
|
|
577
|
-
const {
|
|
578
|
-
error: res_error,
|
|
579
|
-
} = CatalogApplicationModel.CollectionDetailResponse().validate(
|
|
580
|
-
responseData,
|
|
581
|
-
{ abortEarly: false, allowUnknown: true }
|
|
582
|
-
);
|
|
583
|
-
|
|
584
|
-
if (res_error) {
|
|
585
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
586
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
587
|
-
} else {
|
|
588
|
-
Logger({
|
|
589
|
-
level: "WARN",
|
|
590
|
-
message: `Response Validation Warnings for application > Catalog > getCollectionDetailBySlug \n ${res_error}`,
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
|
|
595
331
|
return response;
|
|
596
332
|
}
|
|
597
333
|
|
|
598
334
|
/**
|
|
599
|
-
* @param {CatalogApplicationValidator.GetCollectionItemsBySlugParam} arg -
|
|
600
|
-
* Arg object.
|
|
601
335
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
602
336
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
603
|
-
* @returns {Promise<
|
|
604
|
-
* Success response
|
|
337
|
+
* @returns {Promise<ProductListingResponseSchema>} - Success response
|
|
605
338
|
* @name getCollectionItemsBySlug
|
|
606
339
|
* @summary: Lists items of collection
|
|
607
340
|
* @description: Fetch items within a particular collection identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/).
|
|
@@ -621,30 +354,6 @@ class Catalog {
|
|
|
621
354
|
} = { requestHeaders: {} },
|
|
622
355
|
{ responseHeaders } = { responseHeaders: false }
|
|
623
356
|
) {
|
|
624
|
-
const {
|
|
625
|
-
error,
|
|
626
|
-
} = CatalogApplicationValidator.getCollectionItemsBySlug().validate(
|
|
627
|
-
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
628
|
-
{ abortEarly: false, allowUnknown: true }
|
|
629
|
-
);
|
|
630
|
-
if (error) {
|
|
631
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// Showing warrnings if extra unknown parameters are found
|
|
635
|
-
const {
|
|
636
|
-
error: warrning,
|
|
637
|
-
} = CatalogApplicationValidator.getCollectionItemsBySlug().validate(
|
|
638
|
-
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
639
|
-
{ abortEarly: false, allowUnknown: false }
|
|
640
|
-
);
|
|
641
|
-
if (warrning) {
|
|
642
|
-
Logger({
|
|
643
|
-
level: "WARN",
|
|
644
|
-
message: `Parameter Validation warrnings for application > Catalog > getCollectionItemsBySlug \n ${warrning}`,
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
|
|
648
357
|
const query_params = {};
|
|
649
358
|
query_params["f"] = f;
|
|
650
359
|
query_params["q"] = q;
|
|
@@ -675,24 +384,6 @@ class Catalog {
|
|
|
675
384
|
responseData = response[0];
|
|
676
385
|
}
|
|
677
386
|
|
|
678
|
-
const {
|
|
679
|
-
error: res_error,
|
|
680
|
-
} = CatalogApplicationModel.ProductListingResponse().validate(
|
|
681
|
-
responseData,
|
|
682
|
-
{ abortEarly: false, allowUnknown: true }
|
|
683
|
-
);
|
|
684
|
-
|
|
685
|
-
if (res_error) {
|
|
686
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
687
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
688
|
-
} else {
|
|
689
|
-
Logger({
|
|
690
|
-
level: "WARN",
|
|
691
|
-
message: `Response Validation Warnings for application > Catalog > getCollectionItemsBySlug \n ${res_error}`,
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
|
|
696
387
|
return response;
|
|
697
388
|
}
|
|
698
389
|
|
|
@@ -713,7 +404,7 @@ class Catalog {
|
|
|
713
404
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
714
405
|
* either ascending or descending order. See the supported values below.
|
|
715
406
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
716
|
-
* @returns {Paginator<
|
|
407
|
+
* @returns {Paginator<ProductListingResponseSchema>}
|
|
717
408
|
* @summary: Lists items of collection
|
|
718
409
|
* @description: Fetch items within a particular collection identified by its slug.
|
|
719
410
|
*/
|
|
@@ -752,12 +443,9 @@ class Catalog {
|
|
|
752
443
|
}
|
|
753
444
|
|
|
754
445
|
/**
|
|
755
|
-
* @param {CatalogApplicationValidator.GetCollectionsParam} arg - Arg object.
|
|
756
446
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
757
447
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
758
|
-
* @returns {Promise<
|
|
759
|
-
* - Success response
|
|
760
|
-
*
|
|
448
|
+
* @returns {Promise<GetCollectionListingResponseSchema>} - Success response
|
|
761
449
|
* @name getCollections
|
|
762
450
|
* @summary: List collections
|
|
763
451
|
* @description: List of curated product collections with filtering options based on tags and collection names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/).
|
|
@@ -766,28 +454,6 @@ class Catalog {
|
|
|
766
454
|
{ pageNo, pageSize, tag, q, requestHeaders } = { requestHeaders: {} },
|
|
767
455
|
{ responseHeaders } = { responseHeaders: false }
|
|
768
456
|
) {
|
|
769
|
-
const { error } = CatalogApplicationValidator.getCollections().validate(
|
|
770
|
-
{ pageNo, pageSize, tag, q },
|
|
771
|
-
{ abortEarly: false, allowUnknown: true }
|
|
772
|
-
);
|
|
773
|
-
if (error) {
|
|
774
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
// Showing warrnings if extra unknown parameters are found
|
|
778
|
-
const {
|
|
779
|
-
error: warrning,
|
|
780
|
-
} = CatalogApplicationValidator.getCollections().validate(
|
|
781
|
-
{ pageNo, pageSize, tag, q },
|
|
782
|
-
{ abortEarly: false, allowUnknown: false }
|
|
783
|
-
);
|
|
784
|
-
if (warrning) {
|
|
785
|
-
Logger({
|
|
786
|
-
level: "WARN",
|
|
787
|
-
message: `Parameter Validation warrnings for application > Catalog > getCollections \n ${warrning}`,
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
|
|
791
457
|
const query_params = {};
|
|
792
458
|
query_params["page_no"] = pageNo;
|
|
793
459
|
query_params["page_size"] = pageSize;
|
|
@@ -814,24 +480,6 @@ class Catalog {
|
|
|
814
480
|
responseData = response[0];
|
|
815
481
|
}
|
|
816
482
|
|
|
817
|
-
const {
|
|
818
|
-
error: res_error,
|
|
819
|
-
} = CatalogApplicationModel.GetCollectionListingResponse().validate(
|
|
820
|
-
responseData,
|
|
821
|
-
{ abortEarly: false, allowUnknown: true }
|
|
822
|
-
);
|
|
823
|
-
|
|
824
|
-
if (res_error) {
|
|
825
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
826
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
827
|
-
} else {
|
|
828
|
-
Logger({
|
|
829
|
-
level: "WARN",
|
|
830
|
-
message: `Response Validation Warnings for application > Catalog > getCollections \n ${res_error}`,
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
|
|
835
483
|
return response;
|
|
836
484
|
}
|
|
837
485
|
|
|
@@ -840,7 +488,7 @@ class Catalog {
|
|
|
840
488
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
841
489
|
* @param {string[]} [arg.tag] - List of tags to filter collections.
|
|
842
490
|
* @param {string} [arg.q] - Name of the collection to filter collection.
|
|
843
|
-
* @returns {Paginator<
|
|
491
|
+
* @returns {Paginator<GetCollectionListingResponseSchema>}
|
|
844
492
|
* @summary: List collections
|
|
845
493
|
* @description: List of curated product collections with filtering options based on tags and collection names.
|
|
846
494
|
*/
|
|
@@ -867,14 +515,10 @@ class Catalog {
|
|
|
867
515
|
}
|
|
868
516
|
|
|
869
517
|
/**
|
|
870
|
-
* @param {CatalogApplicationValidator.GetComparedFrequentlyProductBySlugParam} arg
|
|
871
|
-
* - Arg object.
|
|
872
|
-
*
|
|
873
518
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
874
519
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
875
|
-
* @returns {Promise<
|
|
876
|
-
*
|
|
877
|
-
*
|
|
520
|
+
* @returns {Promise<ProductFrequentlyComparedSimilarResponseSchema>} -
|
|
521
|
+
* Success response
|
|
878
522
|
* @name getComparedFrequentlyProductBySlug
|
|
879
523
|
* @summary: List frequent products
|
|
880
524
|
* @description: Get products that are often compared to the product specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/).
|
|
@@ -883,30 +527,6 @@ class Catalog {
|
|
|
883
527
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
884
528
|
{ responseHeaders } = { responseHeaders: false }
|
|
885
529
|
) {
|
|
886
|
-
const {
|
|
887
|
-
error,
|
|
888
|
-
} = CatalogApplicationValidator.getComparedFrequentlyProductBySlug().validate(
|
|
889
|
-
{ slug },
|
|
890
|
-
{ abortEarly: false, allowUnknown: true }
|
|
891
|
-
);
|
|
892
|
-
if (error) {
|
|
893
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
// Showing warrnings if extra unknown parameters are found
|
|
897
|
-
const {
|
|
898
|
-
error: warrning,
|
|
899
|
-
} = CatalogApplicationValidator.getComparedFrequentlyProductBySlug().validate(
|
|
900
|
-
{ slug },
|
|
901
|
-
{ abortEarly: false, allowUnknown: false }
|
|
902
|
-
);
|
|
903
|
-
if (warrning) {
|
|
904
|
-
Logger({
|
|
905
|
-
level: "WARN",
|
|
906
|
-
message: `Parameter Validation warrnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${warrning}`,
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
|
|
910
530
|
const query_params = {};
|
|
911
531
|
|
|
912
532
|
const xHeaders = {};
|
|
@@ -929,32 +549,13 @@ class Catalog {
|
|
|
929
549
|
responseData = response[0];
|
|
930
550
|
}
|
|
931
551
|
|
|
932
|
-
const {
|
|
933
|
-
error: res_error,
|
|
934
|
-
} = CatalogApplicationModel.ProductFrequentlyComparedSimilarResponse().validate(
|
|
935
|
-
responseData,
|
|
936
|
-
{ abortEarly: false, allowUnknown: true }
|
|
937
|
-
);
|
|
938
|
-
|
|
939
|
-
if (res_error) {
|
|
940
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
941
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
942
|
-
} else {
|
|
943
|
-
Logger({
|
|
944
|
-
level: "WARN",
|
|
945
|
-
message: `Response Validation Warnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${res_error}`,
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
|
|
950
552
|
return response;
|
|
951
553
|
}
|
|
952
554
|
|
|
953
555
|
/**
|
|
954
|
-
* @param {CatalogApplicationValidator.GetDepartmentsParam} arg - Arg object.
|
|
955
556
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
956
557
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
957
|
-
* @returns {Promise<
|
|
558
|
+
* @returns {Promise<DepartmentResponseSchema>} - Success response
|
|
958
559
|
* @name getDepartments
|
|
959
560
|
* @summary: List departments
|
|
960
561
|
* @description: List all departments associated with available products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/).
|
|
@@ -963,28 +564,6 @@ class Catalog {
|
|
|
963
564
|
{ requestHeaders } = { requestHeaders: {} },
|
|
964
565
|
{ responseHeaders } = { responseHeaders: false }
|
|
965
566
|
) {
|
|
966
|
-
const { error } = CatalogApplicationValidator.getDepartments().validate(
|
|
967
|
-
{},
|
|
968
|
-
{ abortEarly: false, allowUnknown: true }
|
|
969
|
-
);
|
|
970
|
-
if (error) {
|
|
971
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
// Showing warrnings if extra unknown parameters are found
|
|
975
|
-
const {
|
|
976
|
-
error: warrning,
|
|
977
|
-
} = CatalogApplicationValidator.getDepartments().validate(
|
|
978
|
-
{},
|
|
979
|
-
{ abortEarly: false, allowUnknown: false }
|
|
980
|
-
);
|
|
981
|
-
if (warrning) {
|
|
982
|
-
Logger({
|
|
983
|
-
level: "WARN",
|
|
984
|
-
message: `Parameter Validation warrnings for application > Catalog > getDepartments \n ${warrning}`,
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
|
|
988
567
|
const query_params = {};
|
|
989
568
|
|
|
990
569
|
const xHeaders = {};
|
|
@@ -1007,32 +586,13 @@ class Catalog {
|
|
|
1007
586
|
responseData = response[0];
|
|
1008
587
|
}
|
|
1009
588
|
|
|
1010
|
-
const {
|
|
1011
|
-
error: res_error,
|
|
1012
|
-
} = CatalogApplicationModel.DepartmentResponse().validate(responseData, {
|
|
1013
|
-
abortEarly: false,
|
|
1014
|
-
allowUnknown: true,
|
|
1015
|
-
});
|
|
1016
|
-
|
|
1017
|
-
if (res_error) {
|
|
1018
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1019
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1020
|
-
} else {
|
|
1021
|
-
Logger({
|
|
1022
|
-
level: "WARN",
|
|
1023
|
-
message: `Response Validation Warnings for application > Catalog > getDepartments \n ${res_error}`,
|
|
1024
|
-
});
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
589
|
return response;
|
|
1029
590
|
}
|
|
1030
591
|
|
|
1031
592
|
/**
|
|
1032
|
-
* @param {CatalogApplicationValidator.GetFollowIdsParam} arg - Arg object.
|
|
1033
593
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1034
594
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1035
|
-
* @returns {Promise<
|
|
595
|
+
* @returns {Promise<FollowIdsResponseSchema>} - Success response
|
|
1036
596
|
* @name getFollowIds
|
|
1037
597
|
* @summary: List Ids of followed item, brand, product
|
|
1038
598
|
* @description: Get the IDs of all items the user is currently following, such as Products, Brands, and Collections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowIds/).
|
|
@@ -1041,28 +601,6 @@ class Catalog {
|
|
|
1041
601
|
{ collectionType, requestHeaders } = { requestHeaders: {} },
|
|
1042
602
|
{ responseHeaders } = { responseHeaders: false }
|
|
1043
603
|
) {
|
|
1044
|
-
const { error } = CatalogApplicationValidator.getFollowIds().validate(
|
|
1045
|
-
{ collectionType },
|
|
1046
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1047
|
-
);
|
|
1048
|
-
if (error) {
|
|
1049
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1053
|
-
const {
|
|
1054
|
-
error: warrning,
|
|
1055
|
-
} = CatalogApplicationValidator.getFollowIds().validate(
|
|
1056
|
-
{ collectionType },
|
|
1057
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1058
|
-
);
|
|
1059
|
-
if (warrning) {
|
|
1060
|
-
Logger({
|
|
1061
|
-
level: "WARN",
|
|
1062
|
-
message: `Parameter Validation warrnings for application > Catalog > getFollowIds \n ${warrning}`,
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
604
|
const query_params = {};
|
|
1067
605
|
query_params["collection_type"] = collectionType;
|
|
1068
606
|
|
|
@@ -1086,33 +624,13 @@ class Catalog {
|
|
|
1086
624
|
responseData = response[0];
|
|
1087
625
|
}
|
|
1088
626
|
|
|
1089
|
-
const {
|
|
1090
|
-
error: res_error,
|
|
1091
|
-
} = CatalogApplicationModel.FollowIdsResponse().validate(responseData, {
|
|
1092
|
-
abortEarly: false,
|
|
1093
|
-
allowUnknown: true,
|
|
1094
|
-
});
|
|
1095
|
-
|
|
1096
|
-
if (res_error) {
|
|
1097
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1098
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1099
|
-
} else {
|
|
1100
|
-
Logger({
|
|
1101
|
-
level: "WARN",
|
|
1102
|
-
message: `Response Validation Warnings for application > Catalog > getFollowIds \n ${res_error}`,
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
627
|
return response;
|
|
1108
628
|
}
|
|
1109
629
|
|
|
1110
630
|
/**
|
|
1111
|
-
* @param {CatalogApplicationValidator.GetFollowedListingParam} arg - Arg object.
|
|
1112
631
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1113
632
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1114
|
-
* @returns {Promise<
|
|
1115
|
-
* Success response
|
|
633
|
+
* @returns {Promise<GetFollowListingResponseSchema>} - Success response
|
|
1116
634
|
* @name getFollowedListing
|
|
1117
635
|
* @summary: List followed products, brands
|
|
1118
636
|
* @description: Get a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
|
|
@@ -1123,28 +641,6 @@ class Catalog {
|
|
|
1123
641
|
},
|
|
1124
642
|
{ responseHeaders } = { responseHeaders: false }
|
|
1125
643
|
) {
|
|
1126
|
-
const { error } = CatalogApplicationValidator.getFollowedListing().validate(
|
|
1127
|
-
{ collectionType, pageId, pageSize },
|
|
1128
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1129
|
-
);
|
|
1130
|
-
if (error) {
|
|
1131
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1135
|
-
const {
|
|
1136
|
-
error: warrning,
|
|
1137
|
-
} = CatalogApplicationValidator.getFollowedListing().validate(
|
|
1138
|
-
{ collectionType, pageId, pageSize },
|
|
1139
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1140
|
-
);
|
|
1141
|
-
if (warrning) {
|
|
1142
|
-
Logger({
|
|
1143
|
-
level: "WARN",
|
|
1144
|
-
message: `Parameter Validation warrnings for application > Catalog > getFollowedListing \n ${warrning}`,
|
|
1145
|
-
});
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
644
|
const query_params = {};
|
|
1149
645
|
query_params["page_id"] = pageId;
|
|
1150
646
|
query_params["page_size"] = pageSize;
|
|
@@ -1169,24 +665,6 @@ class Catalog {
|
|
|
1169
665
|
responseData = response[0];
|
|
1170
666
|
}
|
|
1171
667
|
|
|
1172
|
-
const {
|
|
1173
|
-
error: res_error,
|
|
1174
|
-
} = CatalogApplicationModel.GetFollowListingResponse().validate(
|
|
1175
|
-
responseData,
|
|
1176
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1177
|
-
);
|
|
1178
|
-
|
|
1179
|
-
if (res_error) {
|
|
1180
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1181
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1182
|
-
} else {
|
|
1183
|
-
Logger({
|
|
1184
|
-
level: "WARN",
|
|
1185
|
-
message: `Response Validation Warnings for application > Catalog > getFollowedListing \n ${res_error}`,
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
668
|
return response;
|
|
1191
669
|
}
|
|
1192
670
|
|
|
@@ -1195,7 +673,7 @@ class Catalog {
|
|
|
1195
673
|
* @param {string} arg.collectionType - Type of collection followed, i.e.
|
|
1196
674
|
* products, brands, or collections.
|
|
1197
675
|
* @param {number} [arg.pageSize] - Page ID to retrieve next set of results.
|
|
1198
|
-
* @returns {Paginator<
|
|
676
|
+
* @returns {Paginator<GetFollowListingResponseSchema>}
|
|
1199
677
|
* @summary: List followed products, brands
|
|
1200
678
|
* @description: Get a list of products or brands the user is following.
|
|
1201
679
|
*/
|
|
@@ -1221,11 +699,9 @@ class Catalog {
|
|
|
1221
699
|
}
|
|
1222
700
|
|
|
1223
701
|
/**
|
|
1224
|
-
* @param {CatalogApplicationValidator.GetFollowerCountByIdParam} arg - Arg object.
|
|
1225
702
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1226
703
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1227
|
-
* @returns {Promise<
|
|
1228
|
-
* Success response
|
|
704
|
+
* @returns {Promise<FollowerCountResponseSchema>} - Success response
|
|
1229
705
|
* @name getFollowerCountById
|
|
1230
706
|
* @summary: Get follower count
|
|
1231
707
|
* @description: Get the total number of followers for a specific item by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/).
|
|
@@ -1234,30 +710,6 @@ class Catalog {
|
|
|
1234
710
|
{ collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
|
|
1235
711
|
{ responseHeaders } = { responseHeaders: false }
|
|
1236
712
|
) {
|
|
1237
|
-
const {
|
|
1238
|
-
error,
|
|
1239
|
-
} = CatalogApplicationValidator.getFollowerCountById().validate(
|
|
1240
|
-
{ collectionType, collectionId },
|
|
1241
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1242
|
-
);
|
|
1243
|
-
if (error) {
|
|
1244
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1248
|
-
const {
|
|
1249
|
-
error: warrning,
|
|
1250
|
-
} = CatalogApplicationValidator.getFollowerCountById().validate(
|
|
1251
|
-
{ collectionType, collectionId },
|
|
1252
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1253
|
-
);
|
|
1254
|
-
if (warrning) {
|
|
1255
|
-
Logger({
|
|
1256
|
-
level: "WARN",
|
|
1257
|
-
message: `Parameter Validation warrnings for application > Catalog > getFollowerCountById \n ${warrning}`,
|
|
1258
|
-
});
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
713
|
const query_params = {};
|
|
1262
714
|
|
|
1263
715
|
const xHeaders = {};
|
|
@@ -1280,32 +732,13 @@ class Catalog {
|
|
|
1280
732
|
responseData = response[0];
|
|
1281
733
|
}
|
|
1282
734
|
|
|
1283
|
-
const {
|
|
1284
|
-
error: res_error,
|
|
1285
|
-
} = CatalogApplicationModel.FollowerCountResponse().validate(responseData, {
|
|
1286
|
-
abortEarly: false,
|
|
1287
|
-
allowUnknown: true,
|
|
1288
|
-
});
|
|
1289
|
-
|
|
1290
|
-
if (res_error) {
|
|
1291
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1292
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1293
|
-
} else {
|
|
1294
|
-
Logger({
|
|
1295
|
-
level: "WARN",
|
|
1296
|
-
message: `Response Validation Warnings for application > Catalog > getFollowerCountById \n ${res_error}`,
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
735
|
return response;
|
|
1302
736
|
}
|
|
1303
737
|
|
|
1304
738
|
/**
|
|
1305
|
-
* @param {CatalogApplicationValidator.GetHomeProductsParam} arg - Arg object.
|
|
1306
739
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1307
740
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1308
|
-
* @returns {Promise<
|
|
741
|
+
* @returns {Promise<HomeListingResponseSchema>} - Success response
|
|
1309
742
|
* @name getHomeProducts
|
|
1310
743
|
* @summary: List homepage-featured products
|
|
1311
744
|
* @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/).
|
|
@@ -1314,28 +747,6 @@ class Catalog {
|
|
|
1314
747
|
{ sortOn, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1315
748
|
{ responseHeaders } = { responseHeaders: false }
|
|
1316
749
|
) {
|
|
1317
|
-
const { error } = CatalogApplicationValidator.getHomeProducts().validate(
|
|
1318
|
-
{ sortOn, pageId, pageSize },
|
|
1319
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1320
|
-
);
|
|
1321
|
-
if (error) {
|
|
1322
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1326
|
-
const {
|
|
1327
|
-
error: warrning,
|
|
1328
|
-
} = CatalogApplicationValidator.getHomeProducts().validate(
|
|
1329
|
-
{ sortOn, pageId, pageSize },
|
|
1330
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1331
|
-
);
|
|
1332
|
-
if (warrning) {
|
|
1333
|
-
Logger({
|
|
1334
|
-
level: "WARN",
|
|
1335
|
-
message: `Parameter Validation warrnings for application > Catalog > getHomeProducts \n ${warrning}`,
|
|
1336
|
-
});
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
750
|
const query_params = {};
|
|
1340
751
|
query_params["sort_on"] = sortOn;
|
|
1341
752
|
query_params["page_id"] = pageId;
|
|
@@ -1361,24 +772,6 @@ class Catalog {
|
|
|
1361
772
|
responseData = response[0];
|
|
1362
773
|
}
|
|
1363
774
|
|
|
1364
|
-
const {
|
|
1365
|
-
error: res_error,
|
|
1366
|
-
} = CatalogApplicationModel.HomeListingResponse().validate(responseData, {
|
|
1367
|
-
abortEarly: false,
|
|
1368
|
-
allowUnknown: true,
|
|
1369
|
-
});
|
|
1370
|
-
|
|
1371
|
-
if (res_error) {
|
|
1372
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1373
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1374
|
-
} else {
|
|
1375
|
-
Logger({
|
|
1376
|
-
level: "WARN",
|
|
1377
|
-
message: `Response Validation Warnings for application > Catalog > getHomeProducts \n ${res_error}`,
|
|
1378
|
-
});
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
775
|
return response;
|
|
1383
776
|
}
|
|
1384
777
|
|
|
@@ -1388,7 +781,7 @@ class Catalog {
|
|
|
1388
781
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
1389
782
|
* either ascending or descending order.
|
|
1390
783
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1391
|
-
* @returns {Paginator<
|
|
784
|
+
* @returns {Paginator<HomeListingResponseSchema>}
|
|
1392
785
|
* @summary: List homepage-featured products
|
|
1393
786
|
* @description: List all the products associated with a brand, collection or category in a random order.
|
|
1394
787
|
*/
|
|
@@ -1414,11 +807,9 @@ class Catalog {
|
|
|
1414
807
|
}
|
|
1415
808
|
|
|
1416
809
|
/**
|
|
1417
|
-
* @param {CatalogApplicationValidator.GetInStockLocationsParam} arg - Arg object.
|
|
1418
810
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1419
811
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1420
|
-
* @returns {Promise<
|
|
1421
|
-
* Success response
|
|
812
|
+
* @returns {Promise<ApplicationStoreListing>} - Success response
|
|
1422
813
|
* @name getInStockLocations
|
|
1423
814
|
* @summary: List stores with inventory
|
|
1424
815
|
* @description: List stores where specified products are currently in stock. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getInStockLocations/).
|
|
@@ -1436,30 +827,6 @@ class Catalog {
|
|
|
1436
827
|
} = { requestHeaders: {} },
|
|
1437
828
|
{ responseHeaders } = { responseHeaders: false }
|
|
1438
829
|
) {
|
|
1439
|
-
const {
|
|
1440
|
-
error,
|
|
1441
|
-
} = CatalogApplicationValidator.getInStockLocations().validate(
|
|
1442
|
-
{ pageNo, pageSize, q, city, range, latitude, longitude },
|
|
1443
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1444
|
-
);
|
|
1445
|
-
if (error) {
|
|
1446
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1450
|
-
const {
|
|
1451
|
-
error: warrning,
|
|
1452
|
-
} = CatalogApplicationValidator.getInStockLocations().validate(
|
|
1453
|
-
{ pageNo, pageSize, q, city, range, latitude, longitude },
|
|
1454
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1455
|
-
);
|
|
1456
|
-
if (warrning) {
|
|
1457
|
-
Logger({
|
|
1458
|
-
level: "WARN",
|
|
1459
|
-
message: `Parameter Validation warrnings for application > Catalog > getInStockLocations \n ${warrning}`,
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
830
|
const query_params = {};
|
|
1464
831
|
query_params["page_no"] = pageNo;
|
|
1465
832
|
query_params["page_size"] = pageSize;
|
|
@@ -1489,24 +856,6 @@ class Catalog {
|
|
|
1489
856
|
responseData = response[0];
|
|
1490
857
|
}
|
|
1491
858
|
|
|
1492
|
-
const {
|
|
1493
|
-
error: res_error,
|
|
1494
|
-
} = CatalogApplicationModel.ApplicationStoreListing().validate(
|
|
1495
|
-
responseData,
|
|
1496
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1497
|
-
);
|
|
1498
|
-
|
|
1499
|
-
if (res_error) {
|
|
1500
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1501
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1502
|
-
} else {
|
|
1503
|
-
Logger({
|
|
1504
|
-
level: "WARN",
|
|
1505
|
-
message: `Response Validation Warnings for application > Catalog > getInStockLocations \n ${res_error}`,
|
|
1506
|
-
});
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
859
|
return response;
|
|
1511
860
|
}
|
|
1512
861
|
|
|
@@ -1521,7 +870,7 @@ class Catalog {
|
|
|
1521
870
|
* wants to retrieve the nearest stores, e.g. 72.8691788.
|
|
1522
871
|
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
1523
872
|
* one wants to retrieve the nearest stores, e.g. 19.1174114.
|
|
1524
|
-
* @returns {Paginator<
|
|
873
|
+
* @returns {Paginator<ApplicationStoreListing>}
|
|
1525
874
|
* @summary: List stores with inventory
|
|
1526
875
|
* @description: List stores where specified products are currently in stock.
|
|
1527
876
|
*/
|
|
@@ -1558,10 +907,9 @@ class Catalog {
|
|
|
1558
907
|
}
|
|
1559
908
|
|
|
1560
909
|
/**
|
|
1561
|
-
* @param {CatalogApplicationValidator.GetLocationDetailsByIdParam} arg - Arg object.
|
|
1562
910
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1563
911
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1564
|
-
* @returns {Promise<
|
|
912
|
+
* @returns {Promise<StoreDetails>} - Success response
|
|
1565
913
|
* @name getLocationDetailsById
|
|
1566
914
|
* @summary: Get selling location
|
|
1567
915
|
* @description: Get details about a store based on its location Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getLocationDetailsById/).
|
|
@@ -1570,30 +918,6 @@ class Catalog {
|
|
|
1570
918
|
{ locationId, requestHeaders } = { requestHeaders: {} },
|
|
1571
919
|
{ responseHeaders } = { responseHeaders: false }
|
|
1572
920
|
) {
|
|
1573
|
-
const {
|
|
1574
|
-
error,
|
|
1575
|
-
} = CatalogApplicationValidator.getLocationDetailsById().validate(
|
|
1576
|
-
{ locationId },
|
|
1577
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1578
|
-
);
|
|
1579
|
-
if (error) {
|
|
1580
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1584
|
-
const {
|
|
1585
|
-
error: warrning,
|
|
1586
|
-
} = CatalogApplicationValidator.getLocationDetailsById().validate(
|
|
1587
|
-
{ locationId },
|
|
1588
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1589
|
-
);
|
|
1590
|
-
if (warrning) {
|
|
1591
|
-
Logger({
|
|
1592
|
-
level: "WARN",
|
|
1593
|
-
message: `Parameter Validation warrnings for application > Catalog > getLocationDetailsById \n ${warrning}`,
|
|
1594
|
-
});
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
921
|
const query_params = {};
|
|
1598
922
|
|
|
1599
923
|
const xHeaders = {};
|
|
@@ -1616,32 +940,13 @@ class Catalog {
|
|
|
1616
940
|
responseData = response[0];
|
|
1617
941
|
}
|
|
1618
942
|
|
|
1619
|
-
const {
|
|
1620
|
-
error: res_error,
|
|
1621
|
-
} = CatalogApplicationModel.StoreDetails().validate(responseData, {
|
|
1622
|
-
abortEarly: false,
|
|
1623
|
-
allowUnknown: true,
|
|
1624
|
-
});
|
|
1625
|
-
|
|
1626
|
-
if (res_error) {
|
|
1627
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1628
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1629
|
-
} else {
|
|
1630
|
-
Logger({
|
|
1631
|
-
level: "WARN",
|
|
1632
|
-
message: `Response Validation Warnings for application > Catalog > getLocationDetailsById \n ${res_error}`,
|
|
1633
|
-
});
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
943
|
return response;
|
|
1638
944
|
}
|
|
1639
945
|
|
|
1640
946
|
/**
|
|
1641
|
-
* @param {CatalogApplicationValidator.GetProductBundlesBySlugParam} arg - Arg object.
|
|
1642
947
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1643
948
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1644
|
-
* @returns {Promise<
|
|
949
|
+
* @returns {Promise<ProductBundle>} - Success response
|
|
1645
950
|
* @name getProductBundlesBySlug
|
|
1646
951
|
* @summary: List product bundles
|
|
1647
952
|
* @description: Get products bundles to the one specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductBundlesBySlug/).
|
|
@@ -1650,30 +955,6 @@ class Catalog {
|
|
|
1650
955
|
{ slug, id, requestHeaders } = { requestHeaders: {} },
|
|
1651
956
|
{ responseHeaders } = { responseHeaders: false }
|
|
1652
957
|
) {
|
|
1653
|
-
const {
|
|
1654
|
-
error,
|
|
1655
|
-
} = CatalogApplicationValidator.getProductBundlesBySlug().validate(
|
|
1656
|
-
{ slug, id },
|
|
1657
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1658
|
-
);
|
|
1659
|
-
if (error) {
|
|
1660
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1664
|
-
const {
|
|
1665
|
-
error: warrning,
|
|
1666
|
-
} = CatalogApplicationValidator.getProductBundlesBySlug().validate(
|
|
1667
|
-
{ slug, id },
|
|
1668
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1669
|
-
);
|
|
1670
|
-
if (warrning) {
|
|
1671
|
-
Logger({
|
|
1672
|
-
level: "WARN",
|
|
1673
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductBundlesBySlug \n ${warrning}`,
|
|
1674
|
-
});
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
958
|
const query_params = {};
|
|
1678
959
|
query_params["slug"] = slug;
|
|
1679
960
|
query_params["id"] = id;
|
|
@@ -1698,35 +979,13 @@ class Catalog {
|
|
|
1698
979
|
responseData = response[0];
|
|
1699
980
|
}
|
|
1700
981
|
|
|
1701
|
-
const {
|
|
1702
|
-
error: res_error,
|
|
1703
|
-
} = CatalogApplicationModel.ProductBundle().validate(responseData, {
|
|
1704
|
-
abortEarly: false,
|
|
1705
|
-
allowUnknown: true,
|
|
1706
|
-
});
|
|
1707
|
-
|
|
1708
|
-
if (res_error) {
|
|
1709
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1710
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1711
|
-
} else {
|
|
1712
|
-
Logger({
|
|
1713
|
-
level: "WARN",
|
|
1714
|
-
message: `Response Validation Warnings for application > Catalog > getProductBundlesBySlug \n ${res_error}`,
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
982
|
return response;
|
|
1720
983
|
}
|
|
1721
984
|
|
|
1722
985
|
/**
|
|
1723
|
-
* @param {CatalogApplicationValidator.GetProductComparisonBySlugsParam} arg
|
|
1724
|
-
* - Arg object.
|
|
1725
|
-
*
|
|
1726
986
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1727
987
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1728
|
-
* @returns {Promise<
|
|
1729
|
-
* Success response
|
|
988
|
+
* @returns {Promise<ProductsComparisonResponseSchema>} - Success response
|
|
1730
989
|
* @name getProductComparisonBySlugs
|
|
1731
990
|
* @summary: List products for comparison
|
|
1732
991
|
* @description: Get all the products that have the same category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/).
|
|
@@ -1735,30 +994,6 @@ class Catalog {
|
|
|
1735
994
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1736
995
|
{ responseHeaders } = { responseHeaders: false }
|
|
1737
996
|
) {
|
|
1738
|
-
const {
|
|
1739
|
-
error,
|
|
1740
|
-
} = CatalogApplicationValidator.getProductComparisonBySlugs().validate(
|
|
1741
|
-
{ slug },
|
|
1742
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1743
|
-
);
|
|
1744
|
-
if (error) {
|
|
1745
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1749
|
-
const {
|
|
1750
|
-
error: warrning,
|
|
1751
|
-
} = CatalogApplicationValidator.getProductComparisonBySlugs().validate(
|
|
1752
|
-
{ slug },
|
|
1753
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1754
|
-
);
|
|
1755
|
-
if (warrning) {
|
|
1756
|
-
Logger({
|
|
1757
|
-
level: "WARN",
|
|
1758
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductComparisonBySlugs \n ${warrning}`,
|
|
1759
|
-
});
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
997
|
const query_params = {};
|
|
1763
998
|
query_params["slug"] = slug;
|
|
1764
999
|
|
|
@@ -1782,32 +1017,13 @@ class Catalog {
|
|
|
1782
1017
|
responseData = response[0];
|
|
1783
1018
|
}
|
|
1784
1019
|
|
|
1785
|
-
const {
|
|
1786
|
-
error: res_error,
|
|
1787
|
-
} = CatalogApplicationModel.ProductsComparisonResponse().validate(
|
|
1788
|
-
responseData,
|
|
1789
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1790
|
-
);
|
|
1791
|
-
|
|
1792
|
-
if (res_error) {
|
|
1793
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1794
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1795
|
-
} else {
|
|
1796
|
-
Logger({
|
|
1797
|
-
level: "WARN",
|
|
1798
|
-
message: `Response Validation Warnings for application > Catalog > getProductComparisonBySlugs \n ${res_error}`,
|
|
1799
|
-
});
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
1020
|
return response;
|
|
1804
1021
|
}
|
|
1805
1022
|
|
|
1806
1023
|
/**
|
|
1807
|
-
* @param {CatalogApplicationValidator.GetProductDetailBySlugParam} arg - Arg object.
|
|
1808
1024
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1809
1025
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1810
|
-
* @returns {Promise<
|
|
1026
|
+
* @returns {Promise<ProductDetail>} - Success response
|
|
1811
1027
|
* @name getProductDetailBySlug
|
|
1812
1028
|
* @summary: Get a product
|
|
1813
1029
|
* @description: Get product details such as price, attributes, HSN code, SKU code, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductDetailBySlug/).
|
|
@@ -1816,30 +1032,6 @@ class Catalog {
|
|
|
1816
1032
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1817
1033
|
{ responseHeaders } = { responseHeaders: false }
|
|
1818
1034
|
) {
|
|
1819
|
-
const {
|
|
1820
|
-
error,
|
|
1821
|
-
} = CatalogApplicationValidator.getProductDetailBySlug().validate(
|
|
1822
|
-
{ slug },
|
|
1823
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1824
|
-
);
|
|
1825
|
-
if (error) {
|
|
1826
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1830
|
-
const {
|
|
1831
|
-
error: warrning,
|
|
1832
|
-
} = CatalogApplicationValidator.getProductDetailBySlug().validate(
|
|
1833
|
-
{ slug },
|
|
1834
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1835
|
-
);
|
|
1836
|
-
if (warrning) {
|
|
1837
|
-
Logger({
|
|
1838
|
-
level: "WARN",
|
|
1839
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductDetailBySlug \n ${warrning}`,
|
|
1840
|
-
});
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
1035
|
const query_params = {};
|
|
1844
1036
|
|
|
1845
1037
|
const xHeaders = {};
|
|
@@ -1862,33 +1054,13 @@ class Catalog {
|
|
|
1862
1054
|
responseData = response[0];
|
|
1863
1055
|
}
|
|
1864
1056
|
|
|
1865
|
-
const {
|
|
1866
|
-
error: res_error,
|
|
1867
|
-
} = CatalogApplicationModel.ProductDetail().validate(responseData, {
|
|
1868
|
-
abortEarly: false,
|
|
1869
|
-
allowUnknown: true,
|
|
1870
|
-
});
|
|
1871
|
-
|
|
1872
|
-
if (res_error) {
|
|
1873
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1874
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1875
|
-
} else {
|
|
1876
|
-
Logger({
|
|
1877
|
-
level: "WARN",
|
|
1878
|
-
message: `Response Validation Warnings for application > Catalog > getProductDetailBySlug \n ${res_error}`,
|
|
1879
|
-
});
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
1057
|
return response;
|
|
1884
1058
|
}
|
|
1885
1059
|
|
|
1886
1060
|
/**
|
|
1887
|
-
* @param {CatalogApplicationValidator.GetProductPriceBySlugParam} arg - Arg object.
|
|
1888
1061
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1889
1062
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1890
|
-
* @returns {Promise<
|
|
1891
|
-
* Success response
|
|
1063
|
+
* @returns {Promise<ProductSizePriceResponseV3>} - Success response
|
|
1892
1064
|
* @name getProductPriceBySlug
|
|
1893
1065
|
* @summary: Get product price
|
|
1894
1066
|
* @description: Get 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/).
|
|
@@ -1897,30 +1069,6 @@ class Catalog {
|
|
|
1897
1069
|
{ slug, size, storeId, moq, requestHeaders } = { requestHeaders: {} },
|
|
1898
1070
|
{ responseHeaders } = { responseHeaders: false }
|
|
1899
1071
|
) {
|
|
1900
|
-
const {
|
|
1901
|
-
error,
|
|
1902
|
-
} = CatalogApplicationValidator.getProductPriceBySlug().validate(
|
|
1903
|
-
{ slug, size, storeId, moq },
|
|
1904
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1905
|
-
);
|
|
1906
|
-
if (error) {
|
|
1907
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1911
|
-
const {
|
|
1912
|
-
error: warrning,
|
|
1913
|
-
} = CatalogApplicationValidator.getProductPriceBySlug().validate(
|
|
1914
|
-
{ slug, size, storeId, moq },
|
|
1915
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1916
|
-
);
|
|
1917
|
-
if (warrning) {
|
|
1918
|
-
Logger({
|
|
1919
|
-
level: "WARN",
|
|
1920
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductPriceBySlug \n ${warrning}`,
|
|
1921
|
-
});
|
|
1922
|
-
}
|
|
1923
|
-
|
|
1924
1072
|
const query_params = {};
|
|
1925
1073
|
query_params["store_id"] = storeId;
|
|
1926
1074
|
query_params["moq"] = moq;
|
|
@@ -1945,34 +1093,13 @@ class Catalog {
|
|
|
1945
1093
|
responseData = response[0];
|
|
1946
1094
|
}
|
|
1947
1095
|
|
|
1948
|
-
const {
|
|
1949
|
-
error: res_error,
|
|
1950
|
-
} = CatalogApplicationModel.ProductSizePriceResponseV3().validate(
|
|
1951
|
-
responseData,
|
|
1952
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1953
|
-
);
|
|
1954
|
-
|
|
1955
|
-
if (res_error) {
|
|
1956
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1957
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1958
|
-
} else {
|
|
1959
|
-
Logger({
|
|
1960
|
-
level: "WARN",
|
|
1961
|
-
message: `Response Validation Warnings for application > Catalog > getProductPriceBySlug \n ${res_error}`,
|
|
1962
|
-
});
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
1096
|
return response;
|
|
1967
1097
|
}
|
|
1968
1098
|
|
|
1969
1099
|
/**
|
|
1970
|
-
* @param {CatalogApplicationValidator.GetProductSellersBySlugParam} arg - Arg object.
|
|
1971
1100
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1972
1101
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1973
|
-
* @returns {Promise<
|
|
1974
|
-
* - Success response
|
|
1975
|
-
*
|
|
1102
|
+
* @returns {Promise<ProductSizeSellersResponseV3>} - Success response
|
|
1976
1103
|
* @name getProductSellersBySlug
|
|
1977
1104
|
* @summary: List sellers
|
|
1978
1105
|
* @description: List all sellers offering a specific product identified by its slug and size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/).
|
|
@@ -1983,30 +1110,6 @@ class Catalog {
|
|
|
1983
1110
|
},
|
|
1984
1111
|
{ responseHeaders } = { responseHeaders: false }
|
|
1985
1112
|
) {
|
|
1986
|
-
const {
|
|
1987
|
-
error,
|
|
1988
|
-
} = CatalogApplicationValidator.getProductSellersBySlug().validate(
|
|
1989
|
-
{ slug, size, strategy, pageNo, pageSize },
|
|
1990
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1991
|
-
);
|
|
1992
|
-
if (error) {
|
|
1993
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1997
|
-
const {
|
|
1998
|
-
error: warrning,
|
|
1999
|
-
} = CatalogApplicationValidator.getProductSellersBySlug().validate(
|
|
2000
|
-
{ slug, size, strategy, pageNo, pageSize },
|
|
2001
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2002
|
-
);
|
|
2003
|
-
if (warrning) {
|
|
2004
|
-
Logger({
|
|
2005
|
-
level: "WARN",
|
|
2006
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductSellersBySlug \n ${warrning}`,
|
|
2007
|
-
});
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
1113
|
const query_params = {};
|
|
2011
1114
|
query_params["strategy"] = strategy;
|
|
2012
1115
|
query_params["page_no"] = pageNo;
|
|
@@ -2032,24 +1135,6 @@ class Catalog {
|
|
|
2032
1135
|
responseData = response[0];
|
|
2033
1136
|
}
|
|
2034
1137
|
|
|
2035
|
-
const {
|
|
2036
|
-
error: res_error,
|
|
2037
|
-
} = CatalogApplicationModel.ProductSizeSellersResponseV3().validate(
|
|
2038
|
-
responseData,
|
|
2039
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2040
|
-
);
|
|
2041
|
-
|
|
2042
|
-
if (res_error) {
|
|
2043
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2044
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2045
|
-
} else {
|
|
2046
|
-
Logger({
|
|
2047
|
-
level: "WARN",
|
|
2048
|
-
message: `Response Validation Warnings for application > Catalog > getProductSellersBySlug \n ${res_error}`,
|
|
2049
|
-
});
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
1138
|
return response;
|
|
2054
1139
|
}
|
|
2055
1140
|
|
|
@@ -2064,7 +1149,7 @@ class Catalog {
|
|
|
2064
1149
|
* @param {string} [arg.strategy] - Sort stores on the basis of strategy.
|
|
2065
1150
|
* eg, fast-delivery, low-price, optimal.
|
|
2066
1151
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
2067
|
-
* @returns {Paginator<
|
|
1152
|
+
* @returns {Paginator<ProductSizeSellersResponseV3>}
|
|
2068
1153
|
* @summary: List sellers
|
|
2069
1154
|
* @description: List all sellers offering a specific product identified by its slug and size.
|
|
2070
1155
|
*/
|
|
@@ -2092,10 +1177,9 @@ class Catalog {
|
|
|
2092
1177
|
}
|
|
2093
1178
|
|
|
2094
1179
|
/**
|
|
2095
|
-
* @param {CatalogApplicationValidator.GetProductSizesBySlugParam} arg - Arg object.
|
|
2096
1180
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2097
1181
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2098
|
-
* @returns {Promise<
|
|
1182
|
+
* @returns {Promise<ProductSizes>} - Success response
|
|
2099
1183
|
* @name getProductSizesBySlug
|
|
2100
1184
|
* @summary: List sizes
|
|
2101
1185
|
* @description: Provides detailed information about a product, including its availability (sellable), available sizes with quantities, dimensions, weight, availability status, price details (marked, effective, selling), minimum order quantity (MOQ). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSizesBySlug/).
|
|
@@ -2104,30 +1188,6 @@ class Catalog {
|
|
|
2104
1188
|
{ slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
2105
1189
|
{ responseHeaders } = { responseHeaders: false }
|
|
2106
1190
|
) {
|
|
2107
|
-
const {
|
|
2108
|
-
error,
|
|
2109
|
-
} = CatalogApplicationValidator.getProductSizesBySlug().validate(
|
|
2110
|
-
{ slug, storeId },
|
|
2111
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2112
|
-
);
|
|
2113
|
-
if (error) {
|
|
2114
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2118
|
-
const {
|
|
2119
|
-
error: warrning,
|
|
2120
|
-
} = CatalogApplicationValidator.getProductSizesBySlug().validate(
|
|
2121
|
-
{ slug, storeId },
|
|
2122
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2123
|
-
);
|
|
2124
|
-
if (warrning) {
|
|
2125
|
-
Logger({
|
|
2126
|
-
level: "WARN",
|
|
2127
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductSizesBySlug \n ${warrning}`,
|
|
2128
|
-
});
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
1191
|
const query_params = {};
|
|
2132
1192
|
query_params["store_id"] = storeId;
|
|
2133
1193
|
|
|
@@ -2151,33 +1211,13 @@ class Catalog {
|
|
|
2151
1211
|
responseData = response[0];
|
|
2152
1212
|
}
|
|
2153
1213
|
|
|
2154
|
-
const {
|
|
2155
|
-
error: res_error,
|
|
2156
|
-
} = CatalogApplicationModel.ProductSizes().validate(responseData, {
|
|
2157
|
-
abortEarly: false,
|
|
2158
|
-
allowUnknown: true,
|
|
2159
|
-
});
|
|
2160
|
-
|
|
2161
|
-
if (res_error) {
|
|
2162
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2163
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2164
|
-
} else {
|
|
2165
|
-
Logger({
|
|
2166
|
-
level: "WARN",
|
|
2167
|
-
message: `Response Validation Warnings for application > Catalog > getProductSizesBySlug \n ${res_error}`,
|
|
2168
|
-
});
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
1214
|
return response;
|
|
2173
1215
|
}
|
|
2174
1216
|
|
|
2175
1217
|
/**
|
|
2176
|
-
* @param {CatalogApplicationValidator.GetProductStockByIdsParam} arg - Arg object.
|
|
2177
1218
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2178
1219
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2179
|
-
* @returns {Promise<
|
|
2180
|
-
* Success response
|
|
1220
|
+
* @returns {Promise<ProductStockStatusResponseSchema>} - Success response
|
|
2181
1221
|
* @name getProductStockByIds
|
|
2182
1222
|
* @summary: Get product stocks
|
|
2183
1223
|
* @description: Get the current stock status for products identified by their IDs, such as SKU, ALU, EAN, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockByIds/).
|
|
@@ -2186,30 +1226,6 @@ class Catalog {
|
|
|
2186
1226
|
{ itemId, alu, skuCode, ean, upc, requestHeaders } = { requestHeaders: {} },
|
|
2187
1227
|
{ responseHeaders } = { responseHeaders: false }
|
|
2188
1228
|
) {
|
|
2189
|
-
const {
|
|
2190
|
-
error,
|
|
2191
|
-
} = CatalogApplicationValidator.getProductStockByIds().validate(
|
|
2192
|
-
{ itemId, alu, skuCode, ean, upc },
|
|
2193
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2194
|
-
);
|
|
2195
|
-
if (error) {
|
|
2196
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2200
|
-
const {
|
|
2201
|
-
error: warrning,
|
|
2202
|
-
} = CatalogApplicationValidator.getProductStockByIds().validate(
|
|
2203
|
-
{ itemId, alu, skuCode, ean, upc },
|
|
2204
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2205
|
-
);
|
|
2206
|
-
if (warrning) {
|
|
2207
|
-
Logger({
|
|
2208
|
-
level: "WARN",
|
|
2209
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductStockByIds \n ${warrning}`,
|
|
2210
|
-
});
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2213
1229
|
const query_params = {};
|
|
2214
1230
|
query_params["item_id"] = itemId;
|
|
2215
1231
|
query_params["alu"] = alu;
|
|
@@ -2237,34 +1253,13 @@ class Catalog {
|
|
|
2237
1253
|
responseData = response[0];
|
|
2238
1254
|
}
|
|
2239
1255
|
|
|
2240
|
-
const {
|
|
2241
|
-
error: res_error,
|
|
2242
|
-
} = CatalogApplicationModel.ProductStockStatusResponse().validate(
|
|
2243
|
-
responseData,
|
|
2244
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2245
|
-
);
|
|
2246
|
-
|
|
2247
|
-
if (res_error) {
|
|
2248
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2249
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2250
|
-
} else {
|
|
2251
|
-
Logger({
|
|
2252
|
-
level: "WARN",
|
|
2253
|
-
message: `Response Validation Warnings for application > Catalog > getProductStockByIds \n ${res_error}`,
|
|
2254
|
-
});
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
1256
|
return response;
|
|
2259
1257
|
}
|
|
2260
1258
|
|
|
2261
1259
|
/**
|
|
2262
|
-
* @param {CatalogApplicationValidator.GetProductStockForTimeByIdsParam} arg
|
|
2263
|
-
* - Arg object.
|
|
2264
|
-
*
|
|
2265
1260
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2266
1261
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2267
|
-
* @returns {Promise<
|
|
1262
|
+
* @returns {Promise<ProductStockPolling>} - Success response
|
|
2268
1263
|
* @name getProductStockForTimeByIds
|
|
2269
1264
|
* @summary: List future stock
|
|
2270
1265
|
* @description: Get the available stock levels for all products associated with a particular sales channel at a specified future time. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockForTimeByIds/).
|
|
@@ -2273,30 +1268,6 @@ class Catalog {
|
|
|
2273
1268
|
{ timestamp, pageSize, pageId, requestHeaders } = { requestHeaders: {} },
|
|
2274
1269
|
{ responseHeaders } = { responseHeaders: false }
|
|
2275
1270
|
) {
|
|
2276
|
-
const {
|
|
2277
|
-
error,
|
|
2278
|
-
} = CatalogApplicationValidator.getProductStockForTimeByIds().validate(
|
|
2279
|
-
{ timestamp, pageSize, pageId },
|
|
2280
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2281
|
-
);
|
|
2282
|
-
if (error) {
|
|
2283
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2287
|
-
const {
|
|
2288
|
-
error: warrning,
|
|
2289
|
-
} = CatalogApplicationValidator.getProductStockForTimeByIds().validate(
|
|
2290
|
-
{ timestamp, pageSize, pageId },
|
|
2291
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2292
|
-
);
|
|
2293
|
-
if (warrning) {
|
|
2294
|
-
Logger({
|
|
2295
|
-
level: "WARN",
|
|
2296
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductStockForTimeByIds \n ${warrning}`,
|
|
2297
|
-
});
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
1271
|
const query_params = {};
|
|
2301
1272
|
query_params["timestamp"] = timestamp;
|
|
2302
1273
|
query_params["page_size"] = pageSize;
|
|
@@ -2322,24 +1293,6 @@ class Catalog {
|
|
|
2322
1293
|
responseData = response[0];
|
|
2323
1294
|
}
|
|
2324
1295
|
|
|
2325
|
-
const {
|
|
2326
|
-
error: res_error,
|
|
2327
|
-
} = CatalogApplicationModel.ProductStockPolling().validate(responseData, {
|
|
2328
|
-
abortEarly: false,
|
|
2329
|
-
allowUnknown: true,
|
|
2330
|
-
});
|
|
2331
|
-
|
|
2332
|
-
if (res_error) {
|
|
2333
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2334
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2335
|
-
} else {
|
|
2336
|
-
Logger({
|
|
2337
|
-
level: "WARN",
|
|
2338
|
-
message: `Response Validation Warnings for application > Catalog > getProductStockForTimeByIds \n ${res_error}`,
|
|
2339
|
-
});
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
1296
|
return response;
|
|
2344
1297
|
}
|
|
2345
1298
|
|
|
@@ -2347,7 +1300,7 @@ class Catalog {
|
|
|
2347
1300
|
* @param {Object} arg - Arg object.
|
|
2348
1301
|
* @param {string} arg.timestamp - Timestamp in UTC format (2020-07-23T10:27:50Z).
|
|
2349
1302
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
2350
|
-
* @returns {Paginator<
|
|
1303
|
+
* @returns {Paginator<ProductStockPolling>}
|
|
2351
1304
|
* @summary: List future stock
|
|
2352
1305
|
* @description: Get the available stock levels for all products associated with a particular sales channel at a specified future time.
|
|
2353
1306
|
*/
|
|
@@ -2373,12 +1326,9 @@ class Catalog {
|
|
|
2373
1326
|
}
|
|
2374
1327
|
|
|
2375
1328
|
/**
|
|
2376
|
-
* @param {CatalogApplicationValidator.GetProductVariantsBySlugParam} arg -
|
|
2377
|
-
* Arg object.
|
|
2378
1329
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2379
1330
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2380
|
-
* @returns {Promise<
|
|
2381
|
-
* Success response
|
|
1331
|
+
* @returns {Promise<ProductVariantsResponseSchema>} - Success response
|
|
2382
1332
|
* @name getProductVariantsBySlug
|
|
2383
1333
|
* @summary: List product variants
|
|
2384
1334
|
* @description: Get all available variants of a specific product identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/).
|
|
@@ -2387,30 +1337,6 @@ class Catalog {
|
|
|
2387
1337
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
2388
1338
|
{ responseHeaders } = { responseHeaders: false }
|
|
2389
1339
|
) {
|
|
2390
|
-
const {
|
|
2391
|
-
error,
|
|
2392
|
-
} = CatalogApplicationValidator.getProductVariantsBySlug().validate(
|
|
2393
|
-
{ slug },
|
|
2394
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2395
|
-
);
|
|
2396
|
-
if (error) {
|
|
2397
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2401
|
-
const {
|
|
2402
|
-
error: warrning,
|
|
2403
|
-
} = CatalogApplicationValidator.getProductVariantsBySlug().validate(
|
|
2404
|
-
{ slug },
|
|
2405
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2406
|
-
);
|
|
2407
|
-
if (warrning) {
|
|
2408
|
-
Logger({
|
|
2409
|
-
level: "WARN",
|
|
2410
|
-
message: `Parameter Validation warrnings for application > Catalog > getProductVariantsBySlug \n ${warrning}`,
|
|
2411
|
-
});
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
1340
|
const query_params = {};
|
|
2415
1341
|
|
|
2416
1342
|
const xHeaders = {};
|
|
@@ -2433,33 +1359,13 @@ class Catalog {
|
|
|
2433
1359
|
responseData = response[0];
|
|
2434
1360
|
}
|
|
2435
1361
|
|
|
2436
|
-
const {
|
|
2437
|
-
error: res_error,
|
|
2438
|
-
} = CatalogApplicationModel.ProductVariantsResponse().validate(
|
|
2439
|
-
responseData,
|
|
2440
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2441
|
-
);
|
|
2442
|
-
|
|
2443
|
-
if (res_error) {
|
|
2444
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2445
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2446
|
-
} else {
|
|
2447
|
-
Logger({
|
|
2448
|
-
level: "WARN",
|
|
2449
|
-
message: `Response Validation Warnings for application > Catalog > getProductVariantsBySlug \n ${res_error}`,
|
|
2450
|
-
});
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
1362
|
return response;
|
|
2455
1363
|
}
|
|
2456
1364
|
|
|
2457
1365
|
/**
|
|
2458
|
-
* @param {CatalogApplicationValidator.GetProductsParam} arg - Arg object.
|
|
2459
1366
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2460
1367
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2461
|
-
* @returns {Promise<
|
|
2462
|
-
* Success response
|
|
1368
|
+
* @returns {Promise<ProductListingResponseSchema>} - Success response
|
|
2463
1369
|
* @name getProducts
|
|
2464
1370
|
* @summary: List products
|
|
2465
1371
|
* @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProducts/).
|
|
@@ -2478,28 +1384,6 @@ class Catalog {
|
|
|
2478
1384
|
} = { requestHeaders: {} },
|
|
2479
1385
|
{ responseHeaders } = { responseHeaders: false }
|
|
2480
1386
|
) {
|
|
2481
|
-
const { error } = CatalogApplicationValidator.getProducts().validate(
|
|
2482
|
-
{ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
2483
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2484
|
-
);
|
|
2485
|
-
if (error) {
|
|
2486
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2490
|
-
const {
|
|
2491
|
-
error: warrning,
|
|
2492
|
-
} = CatalogApplicationValidator.getProducts().validate(
|
|
2493
|
-
{ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
2494
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2495
|
-
);
|
|
2496
|
-
if (warrning) {
|
|
2497
|
-
Logger({
|
|
2498
|
-
level: "WARN",
|
|
2499
|
-
message: `Parameter Validation warrnings for application > Catalog > getProducts \n ${warrning}`,
|
|
2500
|
-
});
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
1387
|
const query_params = {};
|
|
2504
1388
|
query_params["q"] = q;
|
|
2505
1389
|
query_params["f"] = f;
|
|
@@ -2530,24 +1414,6 @@ class Catalog {
|
|
|
2530
1414
|
responseData = response[0];
|
|
2531
1415
|
}
|
|
2532
1416
|
|
|
2533
|
-
const {
|
|
2534
|
-
error: res_error,
|
|
2535
|
-
} = CatalogApplicationModel.ProductListingResponse().validate(
|
|
2536
|
-
responseData,
|
|
2537
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2538
|
-
);
|
|
2539
|
-
|
|
2540
|
-
if (res_error) {
|
|
2541
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2542
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2543
|
-
} else {
|
|
2544
|
-
Logger({
|
|
2545
|
-
level: "WARN",
|
|
2546
|
-
message: `Response Validation Warnings for application > Catalog > getProducts \n ${res_error}`,
|
|
2547
|
-
});
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
1417
|
return response;
|
|
2552
1418
|
}
|
|
2553
1419
|
|
|
@@ -2565,7 +1431,7 @@ class Catalog {
|
|
|
2565
1431
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
2566
1432
|
* either ascending or descending order. See the supported values below.
|
|
2567
1433
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
2568
|
-
* @returns {Paginator<
|
|
1434
|
+
* @returns {Paginator<ProductListingResponseSchema>}
|
|
2569
1435
|
* @summary: List products
|
|
2570
1436
|
* @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria.
|
|
2571
1437
|
*/
|
|
@@ -2596,10 +1462,9 @@ class Catalog {
|
|
|
2596
1462
|
}
|
|
2597
1463
|
|
|
2598
1464
|
/**
|
|
2599
|
-
* @param {CatalogApplicationValidator.GetSearchResultsParam} arg - Arg object.
|
|
2600
1465
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2601
1466
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2602
|
-
* @returns {Promise<
|
|
1467
|
+
* @returns {Promise<AutoCompleteResponseSchema>} - Success response
|
|
2603
1468
|
* @name getSearchResults
|
|
2604
1469
|
* @summary: List product, brand, category
|
|
2605
1470
|
* @description: Get products, brands, or categories based on a search query, which can be a partial or full name match. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSearchResults/).
|
|
@@ -2608,28 +1473,6 @@ class Catalog {
|
|
|
2608
1473
|
{ q, requestHeaders } = { requestHeaders: {} },
|
|
2609
1474
|
{ responseHeaders } = { responseHeaders: false }
|
|
2610
1475
|
) {
|
|
2611
|
-
const { error } = CatalogApplicationValidator.getSearchResults().validate(
|
|
2612
|
-
{ q },
|
|
2613
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2614
|
-
);
|
|
2615
|
-
if (error) {
|
|
2616
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2620
|
-
const {
|
|
2621
|
-
error: warrning,
|
|
2622
|
-
} = CatalogApplicationValidator.getSearchResults().validate(
|
|
2623
|
-
{ q },
|
|
2624
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2625
|
-
);
|
|
2626
|
-
if (warrning) {
|
|
2627
|
-
Logger({
|
|
2628
|
-
level: "WARN",
|
|
2629
|
-
message: `Parameter Validation warrnings for application > Catalog > getSearchResults \n ${warrning}`,
|
|
2630
|
-
});
|
|
2631
|
-
}
|
|
2632
|
-
|
|
2633
1476
|
const query_params = {};
|
|
2634
1477
|
query_params["q"] = q;
|
|
2635
1478
|
|
|
@@ -2653,35 +1496,13 @@ class Catalog {
|
|
|
2653
1496
|
responseData = response[0];
|
|
2654
1497
|
}
|
|
2655
1498
|
|
|
2656
|
-
const {
|
|
2657
|
-
error: res_error,
|
|
2658
|
-
} = CatalogApplicationModel.AutoCompleteResponse().validate(responseData, {
|
|
2659
|
-
abortEarly: false,
|
|
2660
|
-
allowUnknown: true,
|
|
2661
|
-
});
|
|
2662
|
-
|
|
2663
|
-
if (res_error) {
|
|
2664
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2665
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2666
|
-
} else {
|
|
2667
|
-
Logger({
|
|
2668
|
-
level: "WARN",
|
|
2669
|
-
message: `Response Validation Warnings for application > Catalog > getSearchResults \n ${res_error}`,
|
|
2670
|
-
});
|
|
2671
|
-
}
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
1499
|
return response;
|
|
2675
1500
|
}
|
|
2676
1501
|
|
|
2677
1502
|
/**
|
|
2678
|
-
* @param {CatalogApplicationValidator.GetSimilarComparisonProductBySlugParam} arg
|
|
2679
|
-
* - Arg object.
|
|
2680
|
-
*
|
|
2681
1503
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2682
1504
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2683
|
-
* @returns {Promise<
|
|
2684
|
-
* Success response
|
|
1505
|
+
* @returns {Promise<ProductCompareResponseSchema>} - Success response
|
|
2685
1506
|
* @name getSimilarComparisonProductBySlug
|
|
2686
1507
|
* @summary: List similar products
|
|
2687
1508
|
* @description: Get all products within the same category as the one specified by the provided slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/).
|
|
@@ -2690,30 +1511,6 @@ class Catalog {
|
|
|
2690
1511
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
2691
1512
|
{ responseHeaders } = { responseHeaders: false }
|
|
2692
1513
|
) {
|
|
2693
|
-
const {
|
|
2694
|
-
error,
|
|
2695
|
-
} = CatalogApplicationValidator.getSimilarComparisonProductBySlug().validate(
|
|
2696
|
-
{ slug },
|
|
2697
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2698
|
-
);
|
|
2699
|
-
if (error) {
|
|
2700
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2704
|
-
const {
|
|
2705
|
-
error: warrning,
|
|
2706
|
-
} = CatalogApplicationValidator.getSimilarComparisonProductBySlug().validate(
|
|
2707
|
-
{ slug },
|
|
2708
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2709
|
-
);
|
|
2710
|
-
if (warrning) {
|
|
2711
|
-
Logger({
|
|
2712
|
-
level: "WARN",
|
|
2713
|
-
message: `Parameter Validation warrnings for application > Catalog > getSimilarComparisonProductBySlug \n ${warrning}`,
|
|
2714
|
-
});
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
1514
|
const query_params = {};
|
|
2718
1515
|
|
|
2719
1516
|
const xHeaders = {};
|
|
@@ -2736,32 +1533,13 @@ class Catalog {
|
|
|
2736
1533
|
responseData = response[0];
|
|
2737
1534
|
}
|
|
2738
1535
|
|
|
2739
|
-
const {
|
|
2740
|
-
error: res_error,
|
|
2741
|
-
} = CatalogApplicationModel.ProductCompareResponse().validate(
|
|
2742
|
-
responseData,
|
|
2743
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2744
|
-
);
|
|
2745
|
-
|
|
2746
|
-
if (res_error) {
|
|
2747
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2748
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2749
|
-
} else {
|
|
2750
|
-
Logger({
|
|
2751
|
-
level: "WARN",
|
|
2752
|
-
message: `Response Validation Warnings for application > Catalog > getSimilarComparisonProductBySlug \n ${res_error}`,
|
|
2753
|
-
});
|
|
2754
|
-
}
|
|
2755
|
-
}
|
|
2756
|
-
|
|
2757
1536
|
return response;
|
|
2758
1537
|
}
|
|
2759
1538
|
|
|
2760
1539
|
/**
|
|
2761
|
-
* @param {CatalogApplicationValidator.GetStoresParam} arg - Arg object.
|
|
2762
1540
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2763
1541
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2764
|
-
* @returns {Promise<
|
|
1542
|
+
* @returns {Promise<StoreListingResponseSchema>} - Success response
|
|
2765
1543
|
* @name getStores
|
|
2766
1544
|
* @summary: List available stores
|
|
2767
1545
|
* @description: List all stores associated with the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/).
|
|
@@ -2780,28 +1558,6 @@ class Catalog {
|
|
|
2780
1558
|
} = { requestHeaders: {} },
|
|
2781
1559
|
{ responseHeaders } = { responseHeaders: false }
|
|
2782
1560
|
) {
|
|
2783
|
-
const { error } = CatalogApplicationValidator.getStores().validate(
|
|
2784
|
-
{ pageNo, pageSize, q, city, range, latitude, longitude, tags },
|
|
2785
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2786
|
-
);
|
|
2787
|
-
if (error) {
|
|
2788
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2792
|
-
const {
|
|
2793
|
-
error: warrning,
|
|
2794
|
-
} = CatalogApplicationValidator.getStores().validate(
|
|
2795
|
-
{ pageNo, pageSize, q, city, range, latitude, longitude, tags },
|
|
2796
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2797
|
-
);
|
|
2798
|
-
if (warrning) {
|
|
2799
|
-
Logger({
|
|
2800
|
-
level: "WARN",
|
|
2801
|
-
message: `Parameter Validation warrnings for application > Catalog > getStores \n ${warrning}`,
|
|
2802
|
-
});
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
1561
|
const query_params = {};
|
|
2806
1562
|
query_params["page_no"] = pageNo;
|
|
2807
1563
|
query_params["page_size"] = pageSize;
|
|
@@ -2832,24 +1588,6 @@ class Catalog {
|
|
|
2832
1588
|
responseData = response[0];
|
|
2833
1589
|
}
|
|
2834
1590
|
|
|
2835
|
-
const {
|
|
2836
|
-
error: res_error,
|
|
2837
|
-
} = CatalogApplicationModel.StoreListingResponse().validate(responseData, {
|
|
2838
|
-
abortEarly: false,
|
|
2839
|
-
allowUnknown: true,
|
|
2840
|
-
});
|
|
2841
|
-
|
|
2842
|
-
if (res_error) {
|
|
2843
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2844
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2845
|
-
} else {
|
|
2846
|
-
Logger({
|
|
2847
|
-
level: "WARN",
|
|
2848
|
-
message: `Response Validation Warnings for application > Catalog > getStores \n ${res_error}`,
|
|
2849
|
-
});
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
|
-
|
|
2853
1591
|
return response;
|
|
2854
1592
|
}
|
|
2855
1593
|
|
|
@@ -2865,7 +1603,7 @@ class Catalog {
|
|
|
2865
1603
|
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
2866
1604
|
* one wants to retrieve the nearest stores, e.g. 19.1174114.
|
|
2867
1605
|
* @param {string} [arg.tags] - Search stores based on tags.
|
|
2868
|
-
* @returns {Paginator<
|
|
1606
|
+
* @returns {Paginator<StoreListingResponseSchema>}
|
|
2869
1607
|
* @summary: List available stores
|
|
2870
1608
|
* @description: List all stores associated with the sales channel.
|
|
2871
1609
|
*/
|
|
@@ -2904,10 +1642,9 @@ class Catalog {
|
|
|
2904
1642
|
}
|
|
2905
1643
|
|
|
2906
1644
|
/**
|
|
2907
|
-
* @param {CatalogApplicationValidator.UnfollowByIdParam} arg - Arg object.
|
|
2908
1645
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2909
1646
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2910
|
-
* @returns {Promise<
|
|
1647
|
+
* @returns {Promise<FollowPostResponseSchema>} - Success response
|
|
2911
1648
|
* @name unfollowById
|
|
2912
1649
|
* @summary: Delete item, brand, product
|
|
2913
1650
|
* @description: Remove a followed item, brand, or product using its collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/).
|
|
@@ -2916,28 +1653,6 @@ class Catalog {
|
|
|
2916
1653
|
{ collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
|
|
2917
1654
|
{ responseHeaders } = { responseHeaders: false }
|
|
2918
1655
|
) {
|
|
2919
|
-
const { error } = CatalogApplicationValidator.unfollowById().validate(
|
|
2920
|
-
{ collectionType, collectionId },
|
|
2921
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2922
|
-
);
|
|
2923
|
-
if (error) {
|
|
2924
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2925
|
-
}
|
|
2926
|
-
|
|
2927
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2928
|
-
const {
|
|
2929
|
-
error: warrning,
|
|
2930
|
-
} = CatalogApplicationValidator.unfollowById().validate(
|
|
2931
|
-
{ collectionType, collectionId },
|
|
2932
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2933
|
-
);
|
|
2934
|
-
if (warrning) {
|
|
2935
|
-
Logger({
|
|
2936
|
-
level: "WARN",
|
|
2937
|
-
message: `Parameter Validation warrnings for application > Catalog > unfollowById \n ${warrning}`,
|
|
2938
|
-
});
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
1656
|
const query_params = {};
|
|
2942
1657
|
|
|
2943
1658
|
const xHeaders = {};
|
|
@@ -2960,24 +1675,6 @@ class Catalog {
|
|
|
2960
1675
|
responseData = response[0];
|
|
2961
1676
|
}
|
|
2962
1677
|
|
|
2963
|
-
const {
|
|
2964
|
-
error: res_error,
|
|
2965
|
-
} = CatalogApplicationModel.FollowPostResponse().validate(responseData, {
|
|
2966
|
-
abortEarly: false,
|
|
2967
|
-
allowUnknown: true,
|
|
2968
|
-
});
|
|
2969
|
-
|
|
2970
|
-
if (res_error) {
|
|
2971
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2972
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2973
|
-
} else {
|
|
2974
|
-
Logger({
|
|
2975
|
-
level: "WARN",
|
|
2976
|
-
message: `Response Validation Warnings for application > Catalog > unfollowById \n ${res_error}`,
|
|
2977
|
-
});
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
1678
|
return response;
|
|
2982
1679
|
}
|
|
2983
1680
|
}
|