@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- 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 +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- 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 +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- 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/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- 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 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -6,61 +6,62 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Catalog {
|
|
11
12
|
constructor(_conf) {
|
|
12
13
|
this._conf = _conf;
|
|
13
14
|
this._relativeUrls = {
|
|
14
15
|
followById:
|
|
15
|
-
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}",
|
|
16
|
-
getBrandDetailBySlug: "/service/application/catalog/v1.0/brands/{slug}",
|
|
17
|
-
getBrands: "/service/application/catalog/v1.0/brands",
|
|
18
|
-
getCategories: "/service/application/catalog/v1.0/categories",
|
|
16
|
+
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/",
|
|
17
|
+
getBrandDetailBySlug: "/service/application/catalog/v1.0/brands/{slug}/",
|
|
18
|
+
getBrands: "/service/application/catalog/v1.0/brands/",
|
|
19
|
+
getCategories: "/service/application/catalog/v1.0/categories/",
|
|
19
20
|
getCategoryDetailBySlug:
|
|
20
|
-
"/service/application/catalog/v1.0/categories/{slug}",
|
|
21
|
+
"/service/application/catalog/v1.0/categories/{slug}/",
|
|
21
22
|
getCollectionDetailBySlug:
|
|
22
|
-
"/service/application/catalog/v1.0/collections/{slug}",
|
|
23
|
+
"/service/application/catalog/v1.0/collections/{slug}/",
|
|
23
24
|
getCollectionItemsBySlug:
|
|
24
|
-
"/service/application/catalog/v1.0/collections/{slug}/items",
|
|
25
|
-
getCollections: "/service/application/catalog/v1.0/collections",
|
|
25
|
+
"/service/application/catalog/v1.0/collections/{slug}/items/",
|
|
26
|
+
getCollections: "/service/application/catalog/v1.0/collections/",
|
|
26
27
|
getComparedFrequentlyProductBySlug:
|
|
27
|
-
"/service/application/catalog/v1.0/products/{slug}/similar/compared-frequently",
|
|
28
|
-
getDepartments: "/service/application/catalog/v1.0/departments",
|
|
29
|
-
getFollowIds: "/service/application/catalog/v1.0/follow/ids",
|
|
28
|
+
"/service/application/catalog/v1.0/products/{slug}/similar/compared-frequently/",
|
|
29
|
+
getDepartments: "/service/application/catalog/v1.0/departments/",
|
|
30
|
+
getFollowIds: "/service/application/catalog/v1.0/follow/ids/",
|
|
30
31
|
getFollowedListing:
|
|
31
|
-
"/service/application/catalog/v1.0/follow/{collection_type}",
|
|
32
|
+
"/service/application/catalog/v1.0/follow/{collection_type}/",
|
|
32
33
|
getFollowerCountById:
|
|
33
|
-
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/count",
|
|
34
|
-
getHomeProducts: "/service/application/catalog/v1.0/home/listing",
|
|
34
|
+
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/count/",
|
|
35
|
+
getHomeProducts: "/service/application/catalog/v1.0/home/listing/",
|
|
35
36
|
getInStockLocations:
|
|
36
|
-
"/service/application/catalog/v2.0/in-stock/locations",
|
|
37
|
+
"/service/application/catalog/v2.0/in-stock/locations/",
|
|
37
38
|
getLocationDetailsById:
|
|
38
|
-
"/service/application/catalog/v2.0/locations/{location_id}",
|
|
39
|
+
"/service/application/catalog/v2.0/locations/{location_id}/",
|
|
39
40
|
getProductBundlesBySlug:
|
|
40
|
-
"/service/application/catalog/
|
|
41
|
+
"/service/application/catalog/v1.0/product-grouping/",
|
|
41
42
|
getProductComparisonBySlugs:
|
|
42
|
-
"/service/application/catalog/v1.0/products/compare",
|
|
43
|
+
"/service/application/catalog/v1.0/products/compare/",
|
|
43
44
|
getProductDetailBySlug:
|
|
44
|
-
"/service/application/catalog/v1.0/products/{slug}",
|
|
45
|
+
"/service/application/catalog/v1.0/products/{slug}/",
|
|
45
46
|
getProductPriceBySlug:
|
|
46
|
-
"/service/application/catalog/
|
|
47
|
+
"/service/application/catalog/v4.0/products/{slug}/sizes/{size}/price/",
|
|
47
48
|
getProductSellersBySlug:
|
|
48
|
-
"/service/application/catalog/v4.0/products/{slug}/sizes/{size}/sellers",
|
|
49
|
+
"/service/application/catalog/v4.0/products/{slug}/sizes/{size}/sellers/",
|
|
49
50
|
getProductSizesBySlug:
|
|
50
|
-
"/service/application/catalog/v1.0/products/{slug}/sizes",
|
|
51
|
+
"/service/application/catalog/v1.0/products/{slug}/sizes/",
|
|
51
52
|
getProductStockByIds:
|
|
52
|
-
"/service/application/catalog/v1.0/products/stock-status",
|
|
53
|
+
"/service/application/catalog/v1.0/products/stock-status/",
|
|
53
54
|
getProductStockForTimeByIds:
|
|
54
|
-
"/service/application/catalog/v1.0/products/stock-status/poll",
|
|
55
|
+
"/service/application/catalog/v1.0/products/stock-status/poll/",
|
|
55
56
|
getProductVariantsBySlug:
|
|
56
|
-
"/service/application/catalog/v1.0/products/{slug}/variants",
|
|
57
|
-
getProducts: "/service/application/catalog/v1.0/products",
|
|
58
|
-
getSearchResults: "/service/application/catalog/v1.0/auto-complete",
|
|
57
|
+
"/service/application/catalog/v1.0/products/{slug}/variants/",
|
|
58
|
+
getProducts: "/service/application/catalog/v1.0/products/",
|
|
59
|
+
getSearchResults: "/service/application/catalog/v1.0/auto-complete/",
|
|
59
60
|
getSimilarComparisonProductBySlug:
|
|
60
|
-
"/service/application/catalog/v1.0/products/{slug}/similar/compare",
|
|
61
|
-
getStores: "/service/application/catalog/v2.0/locations",
|
|
61
|
+
"/service/application/catalog/v1.0/products/{slug}/similar/compare/",
|
|
62
|
+
getStores: "/service/application/catalog/v2.0/locations/",
|
|
62
63
|
unfollowById:
|
|
63
|
-
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}",
|
|
64
|
+
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/",
|
|
64
65
|
};
|
|
65
66
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
66
67
|
(urls, [method, relativeUrl]) => {
|
|
@@ -81,33 +82,24 @@ class Catalog {
|
|
|
81
82
|
/**
|
|
82
83
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
83
84
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
84
|
-
* @returns {Promise<
|
|
85
|
+
* @returns {Promise<FollowPostResponseSchema>} - Success response
|
|
85
86
|
* @name followById
|
|
86
|
-
* @summary:
|
|
87
|
+
* @summary: Create item, brand, product
|
|
87
88
|
* @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/).
|
|
88
89
|
*/
|
|
89
90
|
async followById(
|
|
90
91
|
{ collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
|
|
91
92
|
{ responseHeaders } = { responseHeaders: false }
|
|
92
93
|
) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (!collectionId) {
|
|
102
|
-
invalidInput.push({
|
|
103
|
-
message: `The 'collectionId' field is required.`,
|
|
104
|
-
path: ["collectionId"],
|
|
94
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
95
|
+
"collectionType",
|
|
96
|
+
"collectionId",
|
|
97
|
+
]);
|
|
98
|
+
if (errors.length > 0) {
|
|
99
|
+
const error = new FDKClientValidationError({
|
|
100
|
+
message: "Missing required field",
|
|
101
|
+
details: errors,
|
|
105
102
|
});
|
|
106
|
-
}
|
|
107
|
-
if (invalidInput.length) {
|
|
108
|
-
const error = new Error();
|
|
109
|
-
error.message = "Missing required field";
|
|
110
|
-
error.details = invalidInput;
|
|
111
103
|
return Promise.reject(new FDKClientValidationError(error));
|
|
112
104
|
}
|
|
113
105
|
|
|
@@ -139,27 +131,21 @@ class Catalog {
|
|
|
139
131
|
/**
|
|
140
132
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
141
133
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
142
|
-
* @returns {Promise<
|
|
134
|
+
* @returns {Promise<BrandDetailResponseSchema>} - Success response
|
|
143
135
|
* @name getBrandDetailBySlug
|
|
144
|
-
* @summary:
|
|
136
|
+
* @summary: Get a brand
|
|
145
137
|
* @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/).
|
|
146
138
|
*/
|
|
147
139
|
async getBrandDetailBySlug(
|
|
148
140
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
149
141
|
{ responseHeaders } = { responseHeaders: false }
|
|
150
142
|
) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
path: ["slug"],
|
|
143
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
144
|
+
if (errors.length > 0) {
|
|
145
|
+
const error = new FDKClientValidationError({
|
|
146
|
+
message: "Missing required field",
|
|
147
|
+
details: errors,
|
|
157
148
|
});
|
|
158
|
-
}
|
|
159
|
-
if (invalidInput.length) {
|
|
160
|
-
const error = new Error();
|
|
161
|
-
error.message = "Missing required field";
|
|
162
|
-
error.details = invalidInput;
|
|
163
149
|
return Promise.reject(new FDKClientValidationError(error));
|
|
164
150
|
}
|
|
165
151
|
|
|
@@ -191,23 +177,15 @@ class Catalog {
|
|
|
191
177
|
/**
|
|
192
178
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
193
179
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
194
|
-
* @returns {Promise<
|
|
180
|
+
* @returns {Promise<BrandListingResponseSchema>} - Success response
|
|
195
181
|
* @name getBrands
|
|
196
|
-
* @summary:
|
|
182
|
+
* @summary: List brands
|
|
197
183
|
* @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/).
|
|
198
184
|
*/
|
|
199
185
|
async getBrands(
|
|
200
186
|
{ department, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
201
187
|
{ responseHeaders } = { responseHeaders: false }
|
|
202
188
|
) {
|
|
203
|
-
let invalidInput = [];
|
|
204
|
-
if (invalidInput.length) {
|
|
205
|
-
const error = new Error();
|
|
206
|
-
error.message = "Missing required field";
|
|
207
|
-
error.details = invalidInput;
|
|
208
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
189
|
const query_params = {};
|
|
212
190
|
query_params["department"] = department;
|
|
213
191
|
query_params["page_no"] = pageNo;
|
|
@@ -243,8 +221,8 @@ class Catalog {
|
|
|
243
221
|
* of available departments below. Also, you can get available departments
|
|
244
222
|
* from the endpoint /service/application/catalog/v1.0/departments/.
|
|
245
223
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
246
|
-
* @returns {Paginator<
|
|
247
|
-
* @summary:
|
|
224
|
+
* @returns {Paginator<BrandListingResponseSchema>}
|
|
225
|
+
* @summary: List brands
|
|
248
226
|
* @description: Get a list of all the available brands. Filtering can be applied to the department.
|
|
249
227
|
*/
|
|
250
228
|
getBrandsPaginator({ department, pageSize } = {}) {
|
|
@@ -271,23 +249,15 @@ class Catalog {
|
|
|
271
249
|
/**
|
|
272
250
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
273
251
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
274
|
-
* @returns {Promise<
|
|
252
|
+
* @returns {Promise<CategoryListingResponseSchema>} - Success response
|
|
275
253
|
* @name getCategories
|
|
276
|
-
* @summary:
|
|
254
|
+
* @summary: List product categories
|
|
277
255
|
* @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/).
|
|
278
256
|
*/
|
|
279
257
|
async getCategories(
|
|
280
258
|
{ department, requestHeaders } = { requestHeaders: {} },
|
|
281
259
|
{ responseHeaders } = { responseHeaders: false }
|
|
282
260
|
) {
|
|
283
|
-
let invalidInput = [];
|
|
284
|
-
if (invalidInput.length) {
|
|
285
|
-
const error = new Error();
|
|
286
|
-
error.message = "Missing required field";
|
|
287
|
-
error.details = invalidInput;
|
|
288
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
289
|
-
}
|
|
290
|
-
|
|
291
261
|
const query_params = {};
|
|
292
262
|
query_params["department"] = department;
|
|
293
263
|
|
|
@@ -317,27 +287,21 @@ class Catalog {
|
|
|
317
287
|
/**
|
|
318
288
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
319
289
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
320
|
-
* @returns {Promise<
|
|
290
|
+
* @returns {Promise<CategoryMetaResponseSchema>} - Success response
|
|
321
291
|
* @name getCategoryDetailBySlug
|
|
322
|
-
* @summary:
|
|
292
|
+
* @summary: Get category by slug
|
|
323
293
|
* @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/).
|
|
324
294
|
*/
|
|
325
295
|
async getCategoryDetailBySlug(
|
|
326
296
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
327
297
|
{ responseHeaders } = { responseHeaders: false }
|
|
328
298
|
) {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
path: ["slug"],
|
|
299
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
300
|
+
if (errors.length > 0) {
|
|
301
|
+
const error = new FDKClientValidationError({
|
|
302
|
+
message: "Missing required field",
|
|
303
|
+
details: errors,
|
|
335
304
|
});
|
|
336
|
-
}
|
|
337
|
-
if (invalidInput.length) {
|
|
338
|
-
const error = new Error();
|
|
339
|
-
error.message = "Missing required field";
|
|
340
|
-
error.details = invalidInput;
|
|
341
305
|
return Promise.reject(new FDKClientValidationError(error));
|
|
342
306
|
}
|
|
343
307
|
|
|
@@ -369,27 +333,21 @@ class Catalog {
|
|
|
369
333
|
/**
|
|
370
334
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
371
335
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
372
|
-
* @returns {Promise<
|
|
336
|
+
* @returns {Promise<CollectionDetailResponseSchema>} - Success response
|
|
373
337
|
* @name getCollectionDetailBySlug
|
|
374
|
-
* @summary:
|
|
338
|
+
* @summary: Get a collection
|
|
375
339
|
* @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/).
|
|
376
340
|
*/
|
|
377
341
|
async getCollectionDetailBySlug(
|
|
378
342
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
379
343
|
{ responseHeaders } = { responseHeaders: false }
|
|
380
344
|
) {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
path: ["slug"],
|
|
345
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
346
|
+
if (errors.length > 0) {
|
|
347
|
+
const error = new FDKClientValidationError({
|
|
348
|
+
message: "Missing required field",
|
|
349
|
+
details: errors,
|
|
387
350
|
});
|
|
388
|
-
}
|
|
389
|
-
if (invalidInput.length) {
|
|
390
|
-
const error = new Error();
|
|
391
|
-
error.message = "Missing required field";
|
|
392
|
-
error.details = invalidInput;
|
|
393
351
|
return Promise.reject(new FDKClientValidationError(error));
|
|
394
352
|
}
|
|
395
353
|
|
|
@@ -421,9 +379,9 @@ class Catalog {
|
|
|
421
379
|
/**
|
|
422
380
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
423
381
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
424
|
-
* @returns {Promise<
|
|
382
|
+
* @returns {Promise<ProductListingResponseSchema>} - Success response
|
|
425
383
|
* @name getCollectionItemsBySlug
|
|
426
|
-
* @summary: Lists items
|
|
384
|
+
* @summary: Lists items of collection
|
|
427
385
|
* @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/).
|
|
428
386
|
*/
|
|
429
387
|
async getCollectionItemsBySlug(
|
|
@@ -441,18 +399,12 @@ class Catalog {
|
|
|
441
399
|
} = { requestHeaders: {} },
|
|
442
400
|
{ responseHeaders } = { responseHeaders: false }
|
|
443
401
|
) {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
path: ["slug"],
|
|
402
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
403
|
+
if (errors.length > 0) {
|
|
404
|
+
const error = new FDKClientValidationError({
|
|
405
|
+
message: "Missing required field",
|
|
406
|
+
details: errors,
|
|
450
407
|
});
|
|
451
|
-
}
|
|
452
|
-
if (invalidInput.length) {
|
|
453
|
-
const error = new Error();
|
|
454
|
-
error.message = "Missing required field";
|
|
455
|
-
error.details = invalidInput;
|
|
456
408
|
return Promise.reject(new FDKClientValidationError(error));
|
|
457
409
|
}
|
|
458
410
|
|
|
@@ -506,8 +458,8 @@ class Catalog {
|
|
|
506
458
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
507
459
|
* either ascending or descending order. See the supported values below.
|
|
508
460
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
509
|
-
* @returns {Paginator<
|
|
510
|
-
* @summary: Lists items
|
|
461
|
+
* @returns {Paginator<ProductListingResponseSchema>}
|
|
462
|
+
* @summary: Lists items of collection
|
|
511
463
|
* @description: Fetch items within a particular collection identified by its slug.
|
|
512
464
|
*/
|
|
513
465
|
getCollectionItemsBySlugPaginator({
|
|
@@ -547,23 +499,15 @@ class Catalog {
|
|
|
547
499
|
/**
|
|
548
500
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
549
501
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
550
|
-
* @returns {Promise<
|
|
502
|
+
* @returns {Promise<GetCollectionListingResponseSchema>} - Success response
|
|
551
503
|
* @name getCollections
|
|
552
|
-
* @summary:
|
|
504
|
+
* @summary: List collections
|
|
553
505
|
* @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/).
|
|
554
506
|
*/
|
|
555
507
|
async getCollections(
|
|
556
508
|
{ pageNo, pageSize, tag, q, requestHeaders } = { requestHeaders: {} },
|
|
557
509
|
{ responseHeaders } = { responseHeaders: false }
|
|
558
510
|
) {
|
|
559
|
-
let invalidInput = [];
|
|
560
|
-
if (invalidInput.length) {
|
|
561
|
-
const error = new Error();
|
|
562
|
-
error.message = "Missing required field";
|
|
563
|
-
error.details = invalidInput;
|
|
564
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
565
|
-
}
|
|
566
|
-
|
|
567
511
|
const query_params = {};
|
|
568
512
|
query_params["page_no"] = pageNo;
|
|
569
513
|
query_params["page_size"] = pageSize;
|
|
@@ -598,8 +542,8 @@ class Catalog {
|
|
|
598
542
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
599
543
|
* @param {string[]} [arg.tag] - List of tags to filter collections.
|
|
600
544
|
* @param {string} [arg.q] - Name of the collection to filter collection.
|
|
601
|
-
* @returns {Paginator<
|
|
602
|
-
* @summary:
|
|
545
|
+
* @returns {Paginator<GetCollectionListingResponseSchema>}
|
|
546
|
+
* @summary: List collections
|
|
603
547
|
* @description: List of curated product collections with filtering options based on tags and collection names.
|
|
604
548
|
*/
|
|
605
549
|
getCollectionsPaginator({ pageSize, tag, q } = {}) {
|
|
@@ -627,27 +571,22 @@ class Catalog {
|
|
|
627
571
|
/**
|
|
628
572
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
629
573
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
630
|
-
* @returns {Promise<
|
|
574
|
+
* @returns {Promise<ProductFrequentlyComparedSimilarResponseSchema>} -
|
|
575
|
+
* Success response
|
|
631
576
|
* @name getComparedFrequentlyProductBySlug
|
|
632
|
-
* @summary:
|
|
577
|
+
* @summary: List frequent products
|
|
633
578
|
* @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/).
|
|
634
579
|
*/
|
|
635
580
|
async getComparedFrequentlyProductBySlug(
|
|
636
581
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
637
582
|
{ responseHeaders } = { responseHeaders: false }
|
|
638
583
|
) {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
path: ["slug"],
|
|
584
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
585
|
+
if (errors.length > 0) {
|
|
586
|
+
const error = new FDKClientValidationError({
|
|
587
|
+
message: "Missing required field",
|
|
588
|
+
details: errors,
|
|
645
589
|
});
|
|
646
|
-
}
|
|
647
|
-
if (invalidInput.length) {
|
|
648
|
-
const error = new Error();
|
|
649
|
-
error.message = "Missing required field";
|
|
650
|
-
error.details = invalidInput;
|
|
651
590
|
return Promise.reject(new FDKClientValidationError(error));
|
|
652
591
|
}
|
|
653
592
|
|
|
@@ -679,23 +618,15 @@ class Catalog {
|
|
|
679
618
|
/**
|
|
680
619
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
681
620
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
682
|
-
* @returns {Promise<
|
|
621
|
+
* @returns {Promise<DepartmentResponseSchema>} - Success response
|
|
683
622
|
* @name getDepartments
|
|
684
|
-
* @summary:
|
|
623
|
+
* @summary: List departments
|
|
685
624
|
* @description: List all departments associated with available products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/).
|
|
686
625
|
*/
|
|
687
626
|
async getDepartments(
|
|
688
627
|
{ requestHeaders } = { requestHeaders: {} },
|
|
689
628
|
{ responseHeaders } = { responseHeaders: false }
|
|
690
629
|
) {
|
|
691
|
-
let invalidInput = [];
|
|
692
|
-
if (invalidInput.length) {
|
|
693
|
-
const error = new Error();
|
|
694
|
-
error.message = "Missing required field";
|
|
695
|
-
error.details = invalidInput;
|
|
696
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
697
|
-
}
|
|
698
|
-
|
|
699
630
|
const query_params = {};
|
|
700
631
|
|
|
701
632
|
const xHeaders = {};
|
|
@@ -724,23 +655,15 @@ class Catalog {
|
|
|
724
655
|
/**
|
|
725
656
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
726
657
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
727
|
-
* @returns {Promise<
|
|
658
|
+
* @returns {Promise<FollowIdsResponseSchema>} - Success response
|
|
728
659
|
* @name getFollowIds
|
|
729
|
-
* @summary:
|
|
660
|
+
* @summary: List Ids of followed item, brand, product
|
|
730
661
|
* @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/).
|
|
731
662
|
*/
|
|
732
663
|
async getFollowIds(
|
|
733
664
|
{ collectionType, requestHeaders } = { requestHeaders: {} },
|
|
734
665
|
{ responseHeaders } = { responseHeaders: false }
|
|
735
666
|
) {
|
|
736
|
-
let invalidInput = [];
|
|
737
|
-
if (invalidInput.length) {
|
|
738
|
-
const error = new Error();
|
|
739
|
-
error.message = "Missing required field";
|
|
740
|
-
error.details = invalidInput;
|
|
741
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
742
|
-
}
|
|
743
|
-
|
|
744
667
|
const query_params = {};
|
|
745
668
|
query_params["collection_type"] = collectionType;
|
|
746
669
|
|
|
@@ -770,9 +693,9 @@ class Catalog {
|
|
|
770
693
|
/**
|
|
771
694
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
772
695
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
773
|
-
* @returns {Promise<
|
|
696
|
+
* @returns {Promise<GetFollowListingResponseSchema>} - Success response
|
|
774
697
|
* @name getFollowedListing
|
|
775
|
-
* @summary:
|
|
698
|
+
* @summary: List followed products, brands
|
|
776
699
|
* @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/).
|
|
777
700
|
*/
|
|
778
701
|
async getFollowedListing(
|
|
@@ -781,18 +704,12 @@ class Catalog {
|
|
|
781
704
|
},
|
|
782
705
|
{ responseHeaders } = { responseHeaders: false }
|
|
783
706
|
) {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
path: ["collectionType"],
|
|
707
|
+
const errors = validateRequiredParams(arguments[0], ["collectionType"]);
|
|
708
|
+
if (errors.length > 0) {
|
|
709
|
+
const error = new FDKClientValidationError({
|
|
710
|
+
message: "Missing required field",
|
|
711
|
+
details: errors,
|
|
790
712
|
});
|
|
791
|
-
}
|
|
792
|
-
if (invalidInput.length) {
|
|
793
|
-
const error = new Error();
|
|
794
|
-
error.message = "Missing required field";
|
|
795
|
-
error.details = invalidInput;
|
|
796
713
|
return Promise.reject(new FDKClientValidationError(error));
|
|
797
714
|
}
|
|
798
715
|
|
|
@@ -828,8 +745,8 @@ class Catalog {
|
|
|
828
745
|
* @param {string} arg.collectionType - Type of collection followed, i.e.
|
|
829
746
|
* products, brands, or collections.
|
|
830
747
|
* @param {number} [arg.pageSize] - Page ID to retrieve next set of results.
|
|
831
|
-
* @returns {Paginator<
|
|
832
|
-
* @summary:
|
|
748
|
+
* @returns {Paginator<GetFollowListingResponseSchema>}
|
|
749
|
+
* @summary: List followed products, brands
|
|
833
750
|
* @description: Get a list of products or brands the user is following.
|
|
834
751
|
*/
|
|
835
752
|
getFollowedListingPaginator({ collectionType, pageSize } = {}) {
|
|
@@ -856,33 +773,24 @@ class Catalog {
|
|
|
856
773
|
/**
|
|
857
774
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
858
775
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
859
|
-
* @returns {Promise<
|
|
776
|
+
* @returns {Promise<FollowerCountResponseSchema>} - Success response
|
|
860
777
|
* @name getFollowerCountById
|
|
861
|
-
* @summary:
|
|
778
|
+
* @summary: Get follower count
|
|
862
779
|
* @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/).
|
|
863
780
|
*/
|
|
864
781
|
async getFollowerCountById(
|
|
865
782
|
{ collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
|
|
866
783
|
{ responseHeaders } = { responseHeaders: false }
|
|
867
784
|
) {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
if (!collectionId) {
|
|
877
|
-
invalidInput.push({
|
|
878
|
-
message: `The 'collectionId' field is required.`,
|
|
879
|
-
path: ["collectionId"],
|
|
785
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
786
|
+
"collectionType",
|
|
787
|
+
"collectionId",
|
|
788
|
+
]);
|
|
789
|
+
if (errors.length > 0) {
|
|
790
|
+
const error = new FDKClientValidationError({
|
|
791
|
+
message: "Missing required field",
|
|
792
|
+
details: errors,
|
|
880
793
|
});
|
|
881
|
-
}
|
|
882
|
-
if (invalidInput.length) {
|
|
883
|
-
const error = new Error();
|
|
884
|
-
error.message = "Missing required field";
|
|
885
|
-
error.details = invalidInput;
|
|
886
794
|
return Promise.reject(new FDKClientValidationError(error));
|
|
887
795
|
}
|
|
888
796
|
|
|
@@ -914,23 +822,15 @@ class Catalog {
|
|
|
914
822
|
/**
|
|
915
823
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
916
824
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
917
|
-
* @returns {Promise<
|
|
825
|
+
* @returns {Promise<HomeListingResponseSchema>} - Success response
|
|
918
826
|
* @name getHomeProducts
|
|
919
|
-
* @summary:
|
|
827
|
+
* @summary: List homepage-featured products
|
|
920
828
|
* @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/).
|
|
921
829
|
*/
|
|
922
830
|
async getHomeProducts(
|
|
923
831
|
{ sortOn, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
924
832
|
{ responseHeaders } = { responseHeaders: false }
|
|
925
833
|
) {
|
|
926
|
-
let invalidInput = [];
|
|
927
|
-
if (invalidInput.length) {
|
|
928
|
-
const error = new Error();
|
|
929
|
-
error.message = "Missing required field";
|
|
930
|
-
error.details = invalidInput;
|
|
931
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
932
|
-
}
|
|
933
|
-
|
|
934
834
|
const query_params = {};
|
|
935
835
|
query_params["sort_on"] = sortOn;
|
|
936
836
|
query_params["page_id"] = pageId;
|
|
@@ -965,8 +865,8 @@ class Catalog {
|
|
|
965
865
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
966
866
|
* either ascending or descending order.
|
|
967
867
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
968
|
-
* @returns {Paginator<
|
|
969
|
-
* @summary:
|
|
868
|
+
* @returns {Paginator<HomeListingResponseSchema>}
|
|
869
|
+
* @summary: List homepage-featured products
|
|
970
870
|
* @description: List all the products associated with a brand, collection or category in a random order.
|
|
971
871
|
*/
|
|
972
872
|
getHomeProductsPaginator({ sortOn, pageSize } = {}) {
|
|
@@ -995,7 +895,7 @@ class Catalog {
|
|
|
995
895
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
996
896
|
* @returns {Promise<ApplicationStoreListing>} - Success response
|
|
997
897
|
* @name getInStockLocations
|
|
998
|
-
* @summary:
|
|
898
|
+
* @summary: List stores with inventory
|
|
999
899
|
* @description: List stores where specified products are currently in stock. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getInStockLocations/).
|
|
1000
900
|
*/
|
|
1001
901
|
async getInStockLocations(
|
|
@@ -1011,14 +911,6 @@ class Catalog {
|
|
|
1011
911
|
} = { requestHeaders: {} },
|
|
1012
912
|
{ responseHeaders } = { responseHeaders: false }
|
|
1013
913
|
) {
|
|
1014
|
-
let invalidInput = [];
|
|
1015
|
-
if (invalidInput.length) {
|
|
1016
|
-
const error = new Error();
|
|
1017
|
-
error.message = "Missing required field";
|
|
1018
|
-
error.details = invalidInput;
|
|
1019
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
914
|
const query_params = {};
|
|
1023
915
|
query_params["page_no"] = pageNo;
|
|
1024
916
|
query_params["page_size"] = pageSize;
|
|
@@ -1063,7 +955,7 @@ class Catalog {
|
|
|
1063
955
|
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
1064
956
|
* one wants to retrieve the nearest stores, e.g. 19.1174114.
|
|
1065
957
|
* @returns {Paginator<ApplicationStoreListing>}
|
|
1066
|
-
* @summary:
|
|
958
|
+
* @summary: List stores with inventory
|
|
1067
959
|
* @description: List stores where specified products are currently in stock.
|
|
1068
960
|
*/
|
|
1069
961
|
getInStockLocationsPaginator({
|
|
@@ -1103,25 +995,19 @@ class Catalog {
|
|
|
1103
995
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1104
996
|
* @returns {Promise<StoreDetails>} - Success response
|
|
1105
997
|
* @name getLocationDetailsById
|
|
1106
|
-
* @summary: Get
|
|
998
|
+
* @summary: Get selling location
|
|
1107
999
|
* @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/).
|
|
1108
1000
|
*/
|
|
1109
1001
|
async getLocationDetailsById(
|
|
1110
1002
|
{ locationId, requestHeaders } = { requestHeaders: {} },
|
|
1111
1003
|
{ responseHeaders } = { responseHeaders: false }
|
|
1112
1004
|
) {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
path: ["locationId"],
|
|
1005
|
+
const errors = validateRequiredParams(arguments[0], ["locationId"]);
|
|
1006
|
+
if (errors.length > 0) {
|
|
1007
|
+
const error = new FDKClientValidationError({
|
|
1008
|
+
message: "Missing required field",
|
|
1009
|
+
details: errors,
|
|
1119
1010
|
});
|
|
1120
|
-
}
|
|
1121
|
-
if (invalidInput.length) {
|
|
1122
|
-
const error = new Error();
|
|
1123
|
-
error.message = "Missing required field";
|
|
1124
|
-
error.details = invalidInput;
|
|
1125
1011
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1126
1012
|
}
|
|
1127
1013
|
|
|
@@ -1155,26 +1041,16 @@ class Catalog {
|
|
|
1155
1041
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1156
1042
|
* @returns {Promise<ProductBundle>} - Success response
|
|
1157
1043
|
* @name getProductBundlesBySlug
|
|
1158
|
-
* @summary:
|
|
1044
|
+
* @summary: List product bundles
|
|
1159
1045
|
* @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/).
|
|
1160
1046
|
*/
|
|
1161
1047
|
async getProductBundlesBySlug(
|
|
1162
|
-
{ slug, id,
|
|
1048
|
+
{ slug, id, requestHeaders } = { requestHeaders: {} },
|
|
1163
1049
|
{ responseHeaders } = { responseHeaders: false }
|
|
1164
1050
|
) {
|
|
1165
|
-
let invalidInput = [];
|
|
1166
|
-
if (invalidInput.length) {
|
|
1167
|
-
const error = new Error();
|
|
1168
|
-
error.message = "Missing required field";
|
|
1169
|
-
error.details = invalidInput;
|
|
1170
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
1051
|
const query_params = {};
|
|
1174
1052
|
query_params["slug"] = slug;
|
|
1175
1053
|
query_params["id"] = id;
|
|
1176
|
-
query_params["size"] = size;
|
|
1177
|
-
query_params["seller_id"] = sellerId;
|
|
1178
1054
|
|
|
1179
1055
|
const xHeaders = {};
|
|
1180
1056
|
|
|
@@ -1202,30 +1078,15 @@ class Catalog {
|
|
|
1202
1078
|
/**
|
|
1203
1079
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1204
1080
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1205
|
-
* @returns {Promise<
|
|
1081
|
+
* @returns {Promise<ProductsComparisonResponseSchema>} - Success response
|
|
1206
1082
|
* @name getProductComparisonBySlugs
|
|
1207
|
-
* @summary:
|
|
1083
|
+
* @summary: List products for comparison
|
|
1208
1084
|
* @description: Get all the products that have the same category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/).
|
|
1209
1085
|
*/
|
|
1210
1086
|
async getProductComparisonBySlugs(
|
|
1211
1087
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1212
1088
|
{ responseHeaders } = { responseHeaders: false }
|
|
1213
1089
|
) {
|
|
1214
|
-
let invalidInput = [];
|
|
1215
|
-
|
|
1216
|
-
if (!slug) {
|
|
1217
|
-
invalidInput.push({
|
|
1218
|
-
message: `The 'slug' field is required.`,
|
|
1219
|
-
path: ["slug"],
|
|
1220
|
-
});
|
|
1221
|
-
}
|
|
1222
|
-
if (invalidInput.length) {
|
|
1223
|
-
const error = new Error();
|
|
1224
|
-
error.message = "Missing required field";
|
|
1225
|
-
error.details = invalidInput;
|
|
1226
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
1090
|
const query_params = {};
|
|
1230
1091
|
query_params["slug"] = slug;
|
|
1231
1092
|
|
|
@@ -1257,25 +1118,19 @@ class Catalog {
|
|
|
1257
1118
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1258
1119
|
* @returns {Promise<ProductDetail>} - Success response
|
|
1259
1120
|
* @name getProductDetailBySlug
|
|
1260
|
-
* @summary:
|
|
1121
|
+
* @summary: Get a product
|
|
1261
1122
|
* @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/).
|
|
1262
1123
|
*/
|
|
1263
1124
|
async getProductDetailBySlug(
|
|
1264
1125
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1265
1126
|
{ responseHeaders } = { responseHeaders: false }
|
|
1266
1127
|
) {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
path: ["slug"],
|
|
1128
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
1129
|
+
if (errors.length > 0) {
|
|
1130
|
+
const error = new FDKClientValidationError({
|
|
1131
|
+
message: "Missing required field",
|
|
1132
|
+
details: errors,
|
|
1273
1133
|
});
|
|
1274
|
-
}
|
|
1275
|
-
if (invalidInput.length) {
|
|
1276
|
-
const error = new Error();
|
|
1277
|
-
error.message = "Missing required field";
|
|
1278
|
-
error.details = invalidInput;
|
|
1279
1134
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1280
1135
|
}
|
|
1281
1136
|
|
|
@@ -1307,36 +1162,39 @@ class Catalog {
|
|
|
1307
1162
|
/**
|
|
1308
1163
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1309
1164
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1310
|
-
* @returns {Promise<
|
|
1165
|
+
* @returns {Promise<ProductSizePriceResponseV4>} - Success response
|
|
1311
1166
|
* @name getProductPriceBySlug
|
|
1312
|
-
* @summary:
|
|
1167
|
+
* @summary: Get product price
|
|
1313
1168
|
* @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/).
|
|
1314
1169
|
*/
|
|
1315
1170
|
async getProductPriceBySlug(
|
|
1316
|
-
{
|
|
1171
|
+
{ slug, size, storeId, moq, requestHeaders } = { requestHeaders: {} },
|
|
1317
1172
|
{ responseHeaders } = { responseHeaders: false }
|
|
1318
1173
|
) {
|
|
1319
|
-
|
|
1320
|
-
if (
|
|
1321
|
-
const error = new
|
|
1322
|
-
|
|
1323
|
-
|
|
1174
|
+
const errors = validateRequiredParams(arguments[0], ["slug", "size"]);
|
|
1175
|
+
if (errors.length > 0) {
|
|
1176
|
+
const error = new FDKClientValidationError({
|
|
1177
|
+
message: "Missing required field",
|
|
1178
|
+
details: errors,
|
|
1179
|
+
});
|
|
1324
1180
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1325
1181
|
}
|
|
1326
1182
|
|
|
1327
1183
|
const query_params = {};
|
|
1184
|
+
query_params["store_id"] = storeId;
|
|
1185
|
+
query_params["moq"] = moq;
|
|
1328
1186
|
|
|
1329
1187
|
const xHeaders = {};
|
|
1330
1188
|
|
|
1331
1189
|
const response = await ApplicationAPIClient.execute(
|
|
1332
1190
|
this._conf,
|
|
1333
|
-
"
|
|
1191
|
+
"get",
|
|
1334
1192
|
constructUrl({
|
|
1335
1193
|
url: this._urls["getProductPriceBySlug"],
|
|
1336
|
-
params: {},
|
|
1194
|
+
params: { slug, size },
|
|
1337
1195
|
}),
|
|
1338
1196
|
query_params,
|
|
1339
|
-
|
|
1197
|
+
undefined,
|
|
1340
1198
|
{ ...xHeaders, ...requestHeaders },
|
|
1341
1199
|
{ responseHeaders }
|
|
1342
1200
|
);
|
|
@@ -1354,38 +1212,25 @@ class Catalog {
|
|
|
1354
1212
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1355
1213
|
* @returns {Promise<ProductSizeSellersResponseV4>} - Success response
|
|
1356
1214
|
* @name getProductSellersBySlug
|
|
1357
|
-
* @summary:
|
|
1215
|
+
* @summary: List sellers
|
|
1358
1216
|
* @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/).
|
|
1359
1217
|
*/
|
|
1360
1218
|
async getProductSellersBySlug(
|
|
1361
|
-
{ slug, size,
|
|
1219
|
+
{ slug, size, strategy, pageNo, pageSize, requestHeaders } = {
|
|
1362
1220
|
requestHeaders: {},
|
|
1363
1221
|
},
|
|
1364
1222
|
{ responseHeaders } = { responseHeaders: false }
|
|
1365
1223
|
) {
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
path: ["slug"],
|
|
1372
|
-
});
|
|
1373
|
-
}
|
|
1374
|
-
if (!size) {
|
|
1375
|
-
invalidInput.push({
|
|
1376
|
-
message: `The 'size' field is required.`,
|
|
1377
|
-
path: ["size"],
|
|
1224
|
+
const errors = validateRequiredParams(arguments[0], ["slug", "size"]);
|
|
1225
|
+
if (errors.length > 0) {
|
|
1226
|
+
const error = new FDKClientValidationError({
|
|
1227
|
+
message: "Missing required field",
|
|
1228
|
+
details: errors,
|
|
1378
1229
|
});
|
|
1379
|
-
}
|
|
1380
|
-
if (invalidInput.length) {
|
|
1381
|
-
const error = new Error();
|
|
1382
|
-
error.message = "Missing required field";
|
|
1383
|
-
error.details = invalidInput;
|
|
1384
1230
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1385
1231
|
}
|
|
1386
1232
|
|
|
1387
1233
|
const query_params = {};
|
|
1388
|
-
query_params["pincode"] = pincode;
|
|
1389
1234
|
query_params["strategy"] = strategy;
|
|
1390
1235
|
query_params["page_no"] = pageNo;
|
|
1391
1236
|
query_params["page_size"] = pageSize;
|
|
@@ -1421,22 +1266,14 @@ class Catalog {
|
|
|
1421
1266
|
* @param {string} arg.size - A string indicating the size of the product,
|
|
1422
1267
|
* e.g. S, M, XL. You can get slug value from the endpoint
|
|
1423
1268
|
* /service/application/catalog/v1.0/products/sizes.
|
|
1424
|
-
* @param {string} [arg.pincode] - The 6-digit PIN Code of the area near
|
|
1425
|
-
* which the selling locations should be searched, e.g. 400059
|
|
1426
1269
|
* @param {string} [arg.strategy] - Sort stores on the basis of strategy.
|
|
1427
1270
|
* eg, fast-delivery, low-price, optimal.
|
|
1428
1271
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1429
1272
|
* @returns {Paginator<ProductSizeSellersResponseV4>}
|
|
1430
|
-
* @summary:
|
|
1273
|
+
* @summary: List sellers
|
|
1431
1274
|
* @description: List all sellers offering a specific product identified by its slug and size.
|
|
1432
1275
|
*/
|
|
1433
|
-
getProductSellersBySlugPaginator({
|
|
1434
|
-
slug,
|
|
1435
|
-
size,
|
|
1436
|
-
pincode,
|
|
1437
|
-
strategy,
|
|
1438
|
-
pageSize,
|
|
1439
|
-
} = {}) {
|
|
1276
|
+
getProductSellersBySlugPaginator({ slug, size, strategy, pageSize } = {}) {
|
|
1440
1277
|
const paginator = new Paginator();
|
|
1441
1278
|
const callback = async () => {
|
|
1442
1279
|
const pageId = paginator.nextId;
|
|
@@ -1445,7 +1282,6 @@ class Catalog {
|
|
|
1445
1282
|
const data = await this.getProductSellersBySlug({
|
|
1446
1283
|
slug: slug,
|
|
1447
1284
|
size: size,
|
|
1448
|
-
pincode: pincode,
|
|
1449
1285
|
strategy: strategy,
|
|
1450
1286
|
pageNo: pageNo,
|
|
1451
1287
|
pageSize: pageSize,
|
|
@@ -1465,25 +1301,19 @@ class Catalog {
|
|
|
1465
1301
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1466
1302
|
* @returns {Promise<ProductSizes>} - Success response
|
|
1467
1303
|
* @name getProductSizesBySlug
|
|
1468
|
-
* @summary:
|
|
1304
|
+
* @summary: List sizes
|
|
1469
1305
|
* @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/).
|
|
1470
1306
|
*/
|
|
1471
1307
|
async getProductSizesBySlug(
|
|
1472
1308
|
{ slug, storeId, requestHeaders } = { requestHeaders: {} },
|
|
1473
1309
|
{ responseHeaders } = { responseHeaders: false }
|
|
1474
1310
|
) {
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
path: ["slug"],
|
|
1311
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
1312
|
+
if (errors.length > 0) {
|
|
1313
|
+
const error = new FDKClientValidationError({
|
|
1314
|
+
message: "Missing required field",
|
|
1315
|
+
details: errors,
|
|
1481
1316
|
});
|
|
1482
|
-
}
|
|
1483
|
-
if (invalidInput.length) {
|
|
1484
|
-
const error = new Error();
|
|
1485
|
-
error.message = "Missing required field";
|
|
1486
|
-
error.details = invalidInput;
|
|
1487
1317
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1488
1318
|
}
|
|
1489
1319
|
|
|
@@ -1516,23 +1346,15 @@ class Catalog {
|
|
|
1516
1346
|
/**
|
|
1517
1347
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1518
1348
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1519
|
-
* @returns {Promise<
|
|
1349
|
+
* @returns {Promise<ProductStockStatusResponseSchema>} - Success response
|
|
1520
1350
|
* @name getProductStockByIds
|
|
1521
|
-
* @summary:
|
|
1351
|
+
* @summary: Get product stocks
|
|
1522
1352
|
* @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/).
|
|
1523
1353
|
*/
|
|
1524
1354
|
async getProductStockByIds(
|
|
1525
1355
|
{ itemId, alu, skuCode, ean, upc, requestHeaders } = { requestHeaders: {} },
|
|
1526
1356
|
{ responseHeaders } = { responseHeaders: false }
|
|
1527
1357
|
) {
|
|
1528
|
-
let invalidInput = [];
|
|
1529
|
-
if (invalidInput.length) {
|
|
1530
|
-
const error = new Error();
|
|
1531
|
-
error.message = "Missing required field";
|
|
1532
|
-
error.details = invalidInput;
|
|
1533
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
1358
|
const query_params = {};
|
|
1537
1359
|
query_params["item_id"] = itemId;
|
|
1538
1360
|
query_params["alu"] = alu;
|
|
@@ -1568,28 +1390,13 @@ class Catalog {
|
|
|
1568
1390
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1569
1391
|
* @returns {Promise<ProductStockPolling>} - Success response
|
|
1570
1392
|
* @name getProductStockForTimeByIds
|
|
1571
|
-
* @summary:
|
|
1393
|
+
* @summary: List future stock
|
|
1572
1394
|
* @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/).
|
|
1573
1395
|
*/
|
|
1574
1396
|
async getProductStockForTimeByIds(
|
|
1575
1397
|
{ timestamp, pageSize, pageId, requestHeaders } = { requestHeaders: {} },
|
|
1576
1398
|
{ responseHeaders } = { responseHeaders: false }
|
|
1577
1399
|
) {
|
|
1578
|
-
let invalidInput = [];
|
|
1579
|
-
|
|
1580
|
-
if (!timestamp) {
|
|
1581
|
-
invalidInput.push({
|
|
1582
|
-
message: `The 'timestamp' field is required.`,
|
|
1583
|
-
path: ["timestamp"],
|
|
1584
|
-
});
|
|
1585
|
-
}
|
|
1586
|
-
if (invalidInput.length) {
|
|
1587
|
-
const error = new Error();
|
|
1588
|
-
error.message = "Missing required field";
|
|
1589
|
-
error.details = invalidInput;
|
|
1590
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
1400
|
const query_params = {};
|
|
1594
1401
|
query_params["timestamp"] = timestamp;
|
|
1595
1402
|
query_params["page_size"] = pageSize;
|
|
@@ -1623,7 +1430,7 @@ class Catalog {
|
|
|
1623
1430
|
* @param {string} arg.timestamp - Timestamp in UTC format (2020-07-23T10:27:50Z).
|
|
1624
1431
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1625
1432
|
* @returns {Paginator<ProductStockPolling>}
|
|
1626
|
-
* @summary:
|
|
1433
|
+
* @summary: List future stock
|
|
1627
1434
|
* @description: Get the available stock levels for all products associated with a particular sales channel at a specified future time.
|
|
1628
1435
|
*/
|
|
1629
1436
|
getProductStockForTimeByIdsPaginator({ timestamp, pageSize } = {}) {
|
|
@@ -1650,27 +1457,21 @@ class Catalog {
|
|
|
1650
1457
|
/**
|
|
1651
1458
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1652
1459
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1653
|
-
* @returns {Promise<
|
|
1460
|
+
* @returns {Promise<ProductVariantsResponseSchema>} - Success response
|
|
1654
1461
|
* @name getProductVariantsBySlug
|
|
1655
|
-
* @summary:
|
|
1462
|
+
* @summary: List product variants
|
|
1656
1463
|
* @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/).
|
|
1657
1464
|
*/
|
|
1658
1465
|
async getProductVariantsBySlug(
|
|
1659
1466
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1660
1467
|
{ responseHeaders } = { responseHeaders: false }
|
|
1661
1468
|
) {
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
path: ["slug"],
|
|
1469
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
1470
|
+
if (errors.length > 0) {
|
|
1471
|
+
const error = new FDKClientValidationError({
|
|
1472
|
+
message: "Missing required field",
|
|
1473
|
+
details: errors,
|
|
1668
1474
|
});
|
|
1669
|
-
}
|
|
1670
|
-
if (invalidInput.length) {
|
|
1671
|
-
const error = new Error();
|
|
1672
|
-
error.message = "Missing required field";
|
|
1673
|
-
error.details = invalidInput;
|
|
1674
1475
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1675
1476
|
}
|
|
1676
1477
|
|
|
@@ -1702,9 +1503,9 @@ class Catalog {
|
|
|
1702
1503
|
/**
|
|
1703
1504
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1704
1505
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1705
|
-
* @returns {Promise<
|
|
1506
|
+
* @returns {Promise<ProductListingResponseSchema>} - Success response
|
|
1706
1507
|
* @name getProducts
|
|
1707
|
-
* @summary:
|
|
1508
|
+
* @summary: List products
|
|
1708
1509
|
* @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/).
|
|
1709
1510
|
*/
|
|
1710
1511
|
async getProducts(
|
|
@@ -1721,14 +1522,6 @@ class Catalog {
|
|
|
1721
1522
|
} = { requestHeaders: {} },
|
|
1722
1523
|
{ responseHeaders } = { responseHeaders: false }
|
|
1723
1524
|
) {
|
|
1724
|
-
let invalidInput = [];
|
|
1725
|
-
if (invalidInput.length) {
|
|
1726
|
-
const error = new Error();
|
|
1727
|
-
error.message = "Missing required field";
|
|
1728
|
-
error.details = invalidInput;
|
|
1729
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
1525
|
const query_params = {};
|
|
1733
1526
|
query_params["q"] = q;
|
|
1734
1527
|
query_params["f"] = f;
|
|
@@ -1776,8 +1569,8 @@ class Catalog {
|
|
|
1776
1569
|
* should be sorted, e.g. popularity, price, latest and discount, in
|
|
1777
1570
|
* either ascending or descending order. See the supported values below.
|
|
1778
1571
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1779
|
-
* @returns {Paginator<
|
|
1780
|
-
* @summary:
|
|
1572
|
+
* @returns {Paginator<ProductListingResponseSchema>}
|
|
1573
|
+
* @summary: List products
|
|
1781
1574
|
* @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.
|
|
1782
1575
|
*/
|
|
1783
1576
|
getProductsPaginator({ q, f, filters, sortOn, pageSize } = {}) {
|
|
@@ -1809,30 +1602,15 @@ class Catalog {
|
|
|
1809
1602
|
/**
|
|
1810
1603
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1811
1604
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1812
|
-
* @returns {Promise<
|
|
1605
|
+
* @returns {Promise<AutoCompleteResponseSchema>} - Success response
|
|
1813
1606
|
* @name getSearchResults
|
|
1814
|
-
* @summary:
|
|
1607
|
+
* @summary: List product, brand, category
|
|
1815
1608
|
* @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/).
|
|
1816
1609
|
*/
|
|
1817
1610
|
async getSearchResults(
|
|
1818
1611
|
{ q, requestHeaders } = { requestHeaders: {} },
|
|
1819
1612
|
{ responseHeaders } = { responseHeaders: false }
|
|
1820
1613
|
) {
|
|
1821
|
-
let invalidInput = [];
|
|
1822
|
-
|
|
1823
|
-
if (!q) {
|
|
1824
|
-
invalidInput.push({
|
|
1825
|
-
message: `The 'q' field is required.`,
|
|
1826
|
-
path: ["q"],
|
|
1827
|
-
});
|
|
1828
|
-
}
|
|
1829
|
-
if (invalidInput.length) {
|
|
1830
|
-
const error = new Error();
|
|
1831
|
-
error.message = "Missing required field";
|
|
1832
|
-
error.details = invalidInput;
|
|
1833
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
1614
|
const query_params = {};
|
|
1837
1615
|
query_params["q"] = q;
|
|
1838
1616
|
|
|
@@ -1862,27 +1640,21 @@ class Catalog {
|
|
|
1862
1640
|
/**
|
|
1863
1641
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1864
1642
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1865
|
-
* @returns {Promise<
|
|
1643
|
+
* @returns {Promise<ProductCompareResponseSchema>} - Success response
|
|
1866
1644
|
* @name getSimilarComparisonProductBySlug
|
|
1867
|
-
* @summary:
|
|
1645
|
+
* @summary: List similar products
|
|
1868
1646
|
* @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/).
|
|
1869
1647
|
*/
|
|
1870
1648
|
async getSimilarComparisonProductBySlug(
|
|
1871
1649
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1872
1650
|
{ responseHeaders } = { responseHeaders: false }
|
|
1873
1651
|
) {
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
path: ["slug"],
|
|
1652
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
1653
|
+
if (errors.length > 0) {
|
|
1654
|
+
const error = new FDKClientValidationError({
|
|
1655
|
+
message: "Missing required field",
|
|
1656
|
+
details: errors,
|
|
1880
1657
|
});
|
|
1881
|
-
}
|
|
1882
|
-
if (invalidInput.length) {
|
|
1883
|
-
const error = new Error();
|
|
1884
|
-
error.message = "Missing required field";
|
|
1885
|
-
error.details = invalidInput;
|
|
1886
1658
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1887
1659
|
}
|
|
1888
1660
|
|
|
@@ -1914,9 +1686,9 @@ class Catalog {
|
|
|
1914
1686
|
/**
|
|
1915
1687
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1916
1688
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1917
|
-
* @returns {Promise<
|
|
1689
|
+
* @returns {Promise<StoreListingResponseSchema>} - Success response
|
|
1918
1690
|
* @name getStores
|
|
1919
|
-
* @summary:
|
|
1691
|
+
* @summary: List available stores
|
|
1920
1692
|
* @description: List all stores associated with the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/).
|
|
1921
1693
|
*/
|
|
1922
1694
|
async getStores(
|
|
@@ -1928,18 +1700,11 @@ class Catalog {
|
|
|
1928
1700
|
range,
|
|
1929
1701
|
latitude,
|
|
1930
1702
|
longitude,
|
|
1703
|
+
tags,
|
|
1931
1704
|
requestHeaders,
|
|
1932
1705
|
} = { requestHeaders: {} },
|
|
1933
1706
|
{ responseHeaders } = { responseHeaders: false }
|
|
1934
1707
|
) {
|
|
1935
|
-
let invalidInput = [];
|
|
1936
|
-
if (invalidInput.length) {
|
|
1937
|
-
const error = new Error();
|
|
1938
|
-
error.message = "Missing required field";
|
|
1939
|
-
error.details = invalidInput;
|
|
1940
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
1708
|
const query_params = {};
|
|
1944
1709
|
query_params["page_no"] = pageNo;
|
|
1945
1710
|
query_params["page_size"] = pageSize;
|
|
@@ -1948,6 +1713,7 @@ class Catalog {
|
|
|
1948
1713
|
query_params["range"] = range;
|
|
1949
1714
|
query_params["latitude"] = latitude;
|
|
1950
1715
|
query_params["longitude"] = longitude;
|
|
1716
|
+
query_params["tags"] = tags;
|
|
1951
1717
|
|
|
1952
1718
|
const xHeaders = {};
|
|
1953
1719
|
|
|
@@ -1983,11 +1749,20 @@ class Catalog {
|
|
|
1983
1749
|
* wants to retrieve the nearest stores, e.g. 72.8691788.
|
|
1984
1750
|
* @param {number} [arg.longitude] - Longitude of the location from where
|
|
1985
1751
|
* one wants to retrieve the nearest stores, e.g. 19.1174114.
|
|
1986
|
-
* @
|
|
1987
|
-
* @
|
|
1752
|
+
* @param {string} [arg.tags] - Search stores based on tags.
|
|
1753
|
+
* @returns {Paginator<StoreListingResponseSchema>}
|
|
1754
|
+
* @summary: List available stores
|
|
1988
1755
|
* @description: List all stores associated with the sales channel.
|
|
1989
1756
|
*/
|
|
1990
|
-
getStoresPaginator({
|
|
1757
|
+
getStoresPaginator({
|
|
1758
|
+
pageSize,
|
|
1759
|
+
q,
|
|
1760
|
+
city,
|
|
1761
|
+
range,
|
|
1762
|
+
latitude,
|
|
1763
|
+
longitude,
|
|
1764
|
+
tags,
|
|
1765
|
+
} = {}) {
|
|
1991
1766
|
const paginator = new Paginator();
|
|
1992
1767
|
const callback = async () => {
|
|
1993
1768
|
const pageId = paginator.nextId;
|
|
@@ -2001,6 +1776,7 @@ class Catalog {
|
|
|
2001
1776
|
range: range,
|
|
2002
1777
|
latitude: latitude,
|
|
2003
1778
|
longitude: longitude,
|
|
1779
|
+
tags: tags,
|
|
2004
1780
|
});
|
|
2005
1781
|
paginator.setPaginator({
|
|
2006
1782
|
hasNext: data.page.has_next ? true : false,
|
|
@@ -2015,33 +1791,24 @@ class Catalog {
|
|
|
2015
1791
|
/**
|
|
2016
1792
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2017
1793
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2018
|
-
* @returns {Promise<
|
|
1794
|
+
* @returns {Promise<FollowPostResponseSchema>} - Success response
|
|
2019
1795
|
* @name unfollowById
|
|
2020
|
-
* @summary:
|
|
1796
|
+
* @summary: Delete item, brand, product
|
|
2021
1797
|
* @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/).
|
|
2022
1798
|
*/
|
|
2023
1799
|
async unfollowById(
|
|
2024
1800
|
{ collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
|
|
2025
1801
|
{ responseHeaders } = { responseHeaders: false }
|
|
2026
1802
|
) {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
1803
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
1804
|
+
"collectionType",
|
|
1805
|
+
"collectionId",
|
|
1806
|
+
]);
|
|
1807
|
+
if (errors.length > 0) {
|
|
1808
|
+
const error = new FDKClientValidationError({
|
|
1809
|
+
message: "Missing required field",
|
|
1810
|
+
details: errors,
|
|
2033
1811
|
});
|
|
2034
|
-
}
|
|
2035
|
-
if (!collectionId) {
|
|
2036
|
-
invalidInput.push({
|
|
2037
|
-
message: `The 'collectionId' field is required.`,
|
|
2038
|
-
path: ["collectionId"],
|
|
2039
|
-
});
|
|
2040
|
-
}
|
|
2041
|
-
if (invalidInput.length) {
|
|
2042
|
-
const error = new Error();
|
|
2043
|
-
error.message = "Missing required field";
|
|
2044
|
-
error.details = invalidInput;
|
|
2045
1812
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2046
1813
|
}
|
|
2047
1814
|
|