@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.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 +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +93 -113
- package/sdk/application/Cart/CartApplicationClient.js +157 -530
- 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 +65 -55
- package/sdk/application/Content/ContentApplicationClient.js +211 -341
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
- 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 +32 -87
- package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
- 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 +18 -62
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
- 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 +15 -406
- package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
- package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
- package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
- package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
- 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 +236 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
- 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 +314 -422
- package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
- 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 -68
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
- 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 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
- 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 +565 -1282
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
- 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 -246
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
- 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 +2374 -877
- package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
- 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 +421 -418
- package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
- package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
- package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
- 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 +934 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -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 +1327 -3529
- package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
- 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 -513
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
- 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 -4
- package/sdk/platform/Share/SharePlatformModel.js +45 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
- 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 -2
- package/sdk/public/PublicClient.js +2 -2
- 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 -1
- package/sdk/public/index.js +1 -1
- 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
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -15,21 +15,23 @@ class Catalog {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {CatalogPlatformValidator.
|
|
18
|
+
* @param {CatalogPlatformValidator.AddInventoryParam} arg - Arg object
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
22
|
-
* @name
|
|
23
|
-
* @summary:
|
|
24
|
-
* @description:
|
|
21
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
22
|
+
* @name addInventory
|
|
23
|
+
* @summary: Create Inventory
|
|
24
|
+
* @description: Allows add Inventory for particular size and selling location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/addInventory/).
|
|
25
25
|
*/
|
|
26
|
-
async
|
|
27
|
-
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
26
|
+
async addInventory(
|
|
27
|
+
{ itemId, size, body, requestHeaders } = { requestHeaders: {} },
|
|
28
28
|
{ responseHeaders } = { responseHeaders: false }
|
|
29
29
|
) {
|
|
30
|
-
const { error } = CatalogPlatformValidator.
|
|
30
|
+
const { error } = CatalogPlatformValidator.addInventory().validate(
|
|
31
31
|
{
|
|
32
32
|
itemId,
|
|
33
|
+
size,
|
|
34
|
+
body,
|
|
33
35
|
},
|
|
34
36
|
{ abortEarly: false, allowUnknown: true }
|
|
35
37
|
);
|
|
@@ -38,16 +40,20 @@ class Catalog {
|
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
// Showing warrnings if extra unknown parameters are found
|
|
41
|
-
const {
|
|
43
|
+
const {
|
|
44
|
+
error: warrning,
|
|
45
|
+
} = CatalogPlatformValidator.addInventory().validate(
|
|
42
46
|
{
|
|
43
47
|
itemId,
|
|
48
|
+
size,
|
|
49
|
+
body,
|
|
44
50
|
},
|
|
45
51
|
{ abortEarly: false, allowUnknown: false }
|
|
46
52
|
);
|
|
47
53
|
if (warrning) {
|
|
48
54
|
Logger({
|
|
49
55
|
level: "WARN",
|
|
50
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
56
|
+
message: `Parameter Validation warrnings for platform > Catalog > addInventory \n ${warrning}`,
|
|
51
57
|
});
|
|
52
58
|
}
|
|
53
59
|
|
|
@@ -57,10 +63,10 @@ class Catalog {
|
|
|
57
63
|
|
|
58
64
|
const response = await PlatformAPIClient.execute(
|
|
59
65
|
this.config,
|
|
60
|
-
"
|
|
61
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/
|
|
66
|
+
"post",
|
|
67
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
|
|
62
68
|
query_params,
|
|
63
|
-
|
|
69
|
+
body,
|
|
64
70
|
{ ...xHeaders, ...requestHeaders },
|
|
65
71
|
{ responseHeaders }
|
|
66
72
|
);
|
|
@@ -72,7 +78,7 @@ class Catalog {
|
|
|
72
78
|
|
|
73
79
|
const {
|
|
74
80
|
error: res_error,
|
|
75
|
-
} = CatalogPlatformModel.
|
|
81
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
76
82
|
abortEarly: false,
|
|
77
83
|
allowUnknown: true,
|
|
78
84
|
});
|
|
@@ -83,7 +89,7 @@ class Catalog {
|
|
|
83
89
|
} else {
|
|
84
90
|
Logger({
|
|
85
91
|
level: "WARN",
|
|
86
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
92
|
+
message: `Response Validation Warnings for platform > Catalog > addInventory \n ${res_error}`,
|
|
87
93
|
});
|
|
88
94
|
}
|
|
89
95
|
}
|
|
@@ -92,22 +98,21 @@ class Catalog {
|
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
/**
|
|
95
|
-
* @param {CatalogPlatformValidator.
|
|
101
|
+
* @param {CatalogPlatformValidator.AllSizesParam} arg - Arg object
|
|
96
102
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
97
103
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
98
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
99
|
-
* @name
|
|
100
|
-
* @summary:
|
|
101
|
-
* @description:
|
|
104
|
+
* @returns {Promise<CatalogPlatformModel.GetAllSizes>} - Success response
|
|
105
|
+
* @name allSizes
|
|
106
|
+
* @summary: Get product sizes
|
|
107
|
+
* @description: Retrieve all available sizes for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/allSizes/).
|
|
102
108
|
*/
|
|
103
|
-
async
|
|
104
|
-
{
|
|
109
|
+
async allSizes(
|
|
110
|
+
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
105
111
|
{ responseHeaders } = { responseHeaders: false }
|
|
106
112
|
) {
|
|
107
|
-
const { error } = CatalogPlatformValidator.
|
|
113
|
+
const { error } = CatalogPlatformValidator.allSizes().validate(
|
|
108
114
|
{
|
|
109
|
-
|
|
110
|
-
body,
|
|
115
|
+
itemId,
|
|
111
116
|
},
|
|
112
117
|
{ abortEarly: false, allowUnknown: true }
|
|
113
118
|
);
|
|
@@ -116,19 +121,16 @@ class Catalog {
|
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
// Showing warrnings if extra unknown parameters are found
|
|
119
|
-
const {
|
|
120
|
-
error: warrning,
|
|
121
|
-
} = CatalogPlatformValidator.createBulkInventory().validate(
|
|
124
|
+
const { error: warrning } = CatalogPlatformValidator.allSizes().validate(
|
|
122
125
|
{
|
|
123
|
-
|
|
124
|
-
body,
|
|
126
|
+
itemId,
|
|
125
127
|
},
|
|
126
128
|
{ abortEarly: false, allowUnknown: false }
|
|
127
129
|
);
|
|
128
130
|
if (warrning) {
|
|
129
131
|
Logger({
|
|
130
132
|
level: "WARN",
|
|
131
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
133
|
+
message: `Parameter Validation warrnings for platform > Catalog > allSizes \n ${warrning}`,
|
|
132
134
|
});
|
|
133
135
|
}
|
|
134
136
|
|
|
@@ -138,10 +140,10 @@ class Catalog {
|
|
|
138
140
|
|
|
139
141
|
const response = await PlatformAPIClient.execute(
|
|
140
142
|
this.config,
|
|
141
|
-
"
|
|
142
|
-
`/service/platform/catalog/
|
|
143
|
+
"get",
|
|
144
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/all_sizes`,
|
|
143
145
|
query_params,
|
|
144
|
-
|
|
146
|
+
undefined,
|
|
145
147
|
{ ...xHeaders, ...requestHeaders },
|
|
146
148
|
{ responseHeaders }
|
|
147
149
|
);
|
|
@@ -153,7 +155,7 @@ class Catalog {
|
|
|
153
155
|
|
|
154
156
|
const {
|
|
155
157
|
error: res_error,
|
|
156
|
-
} = CatalogPlatformModel.
|
|
158
|
+
} = CatalogPlatformModel.GetAllSizes().validate(responseData, {
|
|
157
159
|
abortEarly: false,
|
|
158
160
|
allowUnknown: true,
|
|
159
161
|
});
|
|
@@ -164,7 +166,7 @@ class Catalog {
|
|
|
164
166
|
} else {
|
|
165
167
|
Logger({
|
|
166
168
|
level: "WARN",
|
|
167
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
169
|
+
message: `Response Validation Warnings for platform > Catalog > allSizes \n ${res_error}`,
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
172
|
}
|
|
@@ -173,21 +175,19 @@ class Catalog {
|
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
/**
|
|
176
|
-
* @param {CatalogPlatformValidator.
|
|
178
|
+
* @param {CatalogPlatformValidator.BulkHsnCodeParam} arg - Arg object
|
|
177
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
178
180
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
179
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
180
|
-
* @name
|
|
181
|
-
* @summary: Create
|
|
182
|
-
* @description:
|
|
181
|
+
* @returns {Promise<CatalogPlatformModel.BulkHsnResponseSchema>} - Success response
|
|
182
|
+
* @name bulkHsnCode
|
|
183
|
+
* @summary: Create Bulk update HSN
|
|
184
|
+
* @description: Execute bulk updates for HSN codes across multiple products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/bulkHsnCode/).
|
|
183
185
|
*/
|
|
184
|
-
async
|
|
186
|
+
async bulkHsnCode(
|
|
185
187
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
186
188
|
{ responseHeaders } = { responseHeaders: false }
|
|
187
189
|
) {
|
|
188
|
-
const {
|
|
189
|
-
error,
|
|
190
|
-
} = CatalogPlatformValidator.createBulkInventoryJob().validate(
|
|
190
|
+
const { error } = CatalogPlatformValidator.bulkHsnCode().validate(
|
|
191
191
|
{
|
|
192
192
|
body,
|
|
193
193
|
},
|
|
@@ -198,9 +198,7 @@ class Catalog {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
// Showing warrnings if extra unknown parameters are found
|
|
201
|
-
const {
|
|
202
|
-
error: warrning,
|
|
203
|
-
} = CatalogPlatformValidator.createBulkInventoryJob().validate(
|
|
201
|
+
const { error: warrning } = CatalogPlatformValidator.bulkHsnCode().validate(
|
|
204
202
|
{
|
|
205
203
|
body,
|
|
206
204
|
},
|
|
@@ -209,7 +207,7 @@ class Catalog {
|
|
|
209
207
|
if (warrning) {
|
|
210
208
|
Logger({
|
|
211
209
|
level: "WARN",
|
|
212
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
210
|
+
message: `Parameter Validation warrnings for platform > Catalog > bulkHsnCode \n ${warrning}`,
|
|
213
211
|
});
|
|
214
212
|
}
|
|
215
213
|
|
|
@@ -220,7 +218,7 @@ class Catalog {
|
|
|
220
218
|
const response = await PlatformAPIClient.execute(
|
|
221
219
|
this.config,
|
|
222
220
|
"post",
|
|
223
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
221
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/bulk/`,
|
|
224
222
|
query_params,
|
|
225
223
|
body,
|
|
226
224
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -234,7 +232,7 @@ class Catalog {
|
|
|
234
232
|
|
|
235
233
|
const {
|
|
236
234
|
error: res_error,
|
|
237
|
-
} = CatalogPlatformModel.
|
|
235
|
+
} = CatalogPlatformModel.BulkHsnResponseSchema().validate(responseData, {
|
|
238
236
|
abortEarly: false,
|
|
239
237
|
allowUnknown: true,
|
|
240
238
|
});
|
|
@@ -245,7 +243,7 @@ class Catalog {
|
|
|
245
243
|
} else {
|
|
246
244
|
Logger({
|
|
247
245
|
level: "WARN",
|
|
248
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
246
|
+
message: `Response Validation Warnings for platform > Catalog > bulkHsnCode \n ${res_error}`,
|
|
249
247
|
});
|
|
250
248
|
}
|
|
251
249
|
}
|
|
@@ -254,22 +252,21 @@ class Catalog {
|
|
|
254
252
|
}
|
|
255
253
|
|
|
256
254
|
/**
|
|
257
|
-
* @param {CatalogPlatformValidator.
|
|
255
|
+
* @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object
|
|
258
256
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
259
257
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
260
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
261
|
-
* @name
|
|
262
|
-
* @summary: Create
|
|
263
|
-
* @description:
|
|
258
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
259
|
+
* @name createBulkInventory
|
|
260
|
+
* @summary: Create bulk inventory
|
|
261
|
+
* @description: Helps to create products in bulk push to kafka for approval/creation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventory/).
|
|
264
262
|
*/
|
|
265
|
-
async
|
|
266
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
263
|
+
async createBulkInventory(
|
|
264
|
+
{ batchId, body, requestHeaders } = { requestHeaders: {} },
|
|
267
265
|
{ responseHeaders } = { responseHeaders: false }
|
|
268
266
|
) {
|
|
269
|
-
const {
|
|
270
|
-
error,
|
|
271
|
-
} = CatalogPlatformValidator.createBulkProductUploadJob().validate(
|
|
267
|
+
const { error } = CatalogPlatformValidator.createBulkInventory().validate(
|
|
272
268
|
{
|
|
269
|
+
batchId,
|
|
273
270
|
body,
|
|
274
271
|
},
|
|
275
272
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -281,8 +278,9 @@ class Catalog {
|
|
|
281
278
|
// Showing warrnings if extra unknown parameters are found
|
|
282
279
|
const {
|
|
283
280
|
error: warrning,
|
|
284
|
-
} = CatalogPlatformValidator.
|
|
281
|
+
} = CatalogPlatformValidator.createBulkInventory().validate(
|
|
285
282
|
{
|
|
283
|
+
batchId,
|
|
286
284
|
body,
|
|
287
285
|
},
|
|
288
286
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -290,7 +288,7 @@ class Catalog {
|
|
|
290
288
|
if (warrning) {
|
|
291
289
|
Logger({
|
|
292
290
|
level: "WARN",
|
|
293
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
291
|
+
message: `Parameter Validation warrnings for platform > Catalog > createBulkInventory \n ${warrning}`,
|
|
294
292
|
});
|
|
295
293
|
}
|
|
296
294
|
|
|
@@ -301,7 +299,7 @@ class Catalog {
|
|
|
301
299
|
const response = await PlatformAPIClient.execute(
|
|
302
300
|
this.config,
|
|
303
301
|
"post",
|
|
304
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
302
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}/`,
|
|
305
303
|
query_params,
|
|
306
304
|
body,
|
|
307
305
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -315,7 +313,7 @@ class Catalog {
|
|
|
315
313
|
|
|
316
314
|
const {
|
|
317
315
|
error: res_error,
|
|
318
|
-
} = CatalogPlatformModel.
|
|
316
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
319
317
|
abortEarly: false,
|
|
320
318
|
allowUnknown: true,
|
|
321
319
|
});
|
|
@@ -326,7 +324,7 @@ class Catalog {
|
|
|
326
324
|
} else {
|
|
327
325
|
Logger({
|
|
328
326
|
level: "WARN",
|
|
329
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
327
|
+
message: `Response Validation Warnings for platform > Catalog > createBulkInventory \n ${res_error}`,
|
|
330
328
|
});
|
|
331
329
|
}
|
|
332
330
|
}
|
|
@@ -335,19 +333,21 @@ class Catalog {
|
|
|
335
333
|
}
|
|
336
334
|
|
|
337
335
|
/**
|
|
338
|
-
* @param {CatalogPlatformValidator.
|
|
336
|
+
* @param {CatalogPlatformValidator.CreateBulkInventoryJobParam} arg - Arg object
|
|
339
337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
340
338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
341
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
342
|
-
* @name
|
|
343
|
-
* @summary: Create
|
|
344
|
-
* @description:
|
|
339
|
+
* @returns {Promise<CatalogPlatformModel.BulkResponseSchema>} - Success response
|
|
340
|
+
* @name createBulkInventoryJob
|
|
341
|
+
* @summary: Create bulk inventory upload job
|
|
342
|
+
* @description: Helps to create a bulk Inventory upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventoryJob/).
|
|
345
343
|
*/
|
|
346
|
-
async
|
|
344
|
+
async createBulkInventoryJob(
|
|
347
345
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
348
346
|
{ responseHeaders } = { responseHeaders: false }
|
|
349
347
|
) {
|
|
350
|
-
const {
|
|
348
|
+
const {
|
|
349
|
+
error,
|
|
350
|
+
} = CatalogPlatformValidator.createBulkInventoryJob().validate(
|
|
351
351
|
{
|
|
352
352
|
body,
|
|
353
353
|
},
|
|
@@ -360,7 +360,7 @@ class Catalog {
|
|
|
360
360
|
// Showing warrnings if extra unknown parameters are found
|
|
361
361
|
const {
|
|
362
362
|
error: warrning,
|
|
363
|
-
} = CatalogPlatformValidator.
|
|
363
|
+
} = CatalogPlatformValidator.createBulkInventoryJob().validate(
|
|
364
364
|
{
|
|
365
365
|
body,
|
|
366
366
|
},
|
|
@@ -369,7 +369,7 @@ class Catalog {
|
|
|
369
369
|
if (warrning) {
|
|
370
370
|
Logger({
|
|
371
371
|
level: "WARN",
|
|
372
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
372
|
+
message: `Parameter Validation warrnings for platform > Catalog > createBulkInventoryJob \n ${warrning}`,
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
|
|
@@ -380,7 +380,7 @@ class Catalog {
|
|
|
380
380
|
const response = await PlatformAPIClient.execute(
|
|
381
381
|
this.config,
|
|
382
382
|
"post",
|
|
383
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
383
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
|
|
384
384
|
query_params,
|
|
385
385
|
body,
|
|
386
386
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -394,7 +394,7 @@ class Catalog {
|
|
|
394
394
|
|
|
395
395
|
const {
|
|
396
396
|
error: res_error,
|
|
397
|
-
} = CatalogPlatformModel.
|
|
397
|
+
} = CatalogPlatformModel.BulkResponseSchema().validate(responseData, {
|
|
398
398
|
abortEarly: false,
|
|
399
399
|
allowUnknown: true,
|
|
400
400
|
});
|
|
@@ -405,7 +405,7 @@ class Catalog {
|
|
|
405
405
|
} else {
|
|
406
406
|
Logger({
|
|
407
407
|
level: "WARN",
|
|
408
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
408
|
+
message: `Response Validation Warnings for platform > Catalog > createBulkInventoryJob \n ${res_error}`,
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -414,20 +414,21 @@ class Catalog {
|
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
/**
|
|
417
|
-
* @param {CatalogPlatformValidator.
|
|
417
|
+
* @param {CatalogPlatformValidator.CreateBulkProductUploadJobParam} arg - Arg object
|
|
418
418
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
419
419
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
420
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
421
|
-
*
|
|
422
|
-
* @
|
|
423
|
-
* @
|
|
424
|
-
* @description: Create departments with this resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createDepartments/).
|
|
420
|
+
* @returns {Promise<CatalogPlatformModel.BulkResponseSchema>} - Success response
|
|
421
|
+
* @name createBulkProductUploadJob
|
|
422
|
+
* @summary: Create products bulk upload
|
|
423
|
+
* @description: This API helps to create a bulk products upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkProductUploadJob/).
|
|
425
424
|
*/
|
|
426
|
-
async
|
|
425
|
+
async createBulkProductUploadJob(
|
|
427
426
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
428
427
|
{ responseHeaders } = { responseHeaders: false }
|
|
429
428
|
) {
|
|
430
|
-
const {
|
|
429
|
+
const {
|
|
430
|
+
error,
|
|
431
|
+
} = CatalogPlatformValidator.createBulkProductUploadJob().validate(
|
|
431
432
|
{
|
|
432
433
|
body,
|
|
433
434
|
},
|
|
@@ -440,7 +441,7 @@ class Catalog {
|
|
|
440
441
|
// Showing warrnings if extra unknown parameters are found
|
|
441
442
|
const {
|
|
442
443
|
error: warrning,
|
|
443
|
-
} = CatalogPlatformValidator.
|
|
444
|
+
} = CatalogPlatformValidator.createBulkProductUploadJob().validate(
|
|
444
445
|
{
|
|
445
446
|
body,
|
|
446
447
|
},
|
|
@@ -449,7 +450,7 @@ class Catalog {
|
|
|
449
450
|
if (warrning) {
|
|
450
451
|
Logger({
|
|
451
452
|
level: "WARN",
|
|
452
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
453
|
+
message: `Parameter Validation warrnings for platform > Catalog > createBulkProductUploadJob \n ${warrning}`,
|
|
453
454
|
});
|
|
454
455
|
}
|
|
455
456
|
|
|
@@ -460,7 +461,7 @@ class Catalog {
|
|
|
460
461
|
const response = await PlatformAPIClient.execute(
|
|
461
462
|
this.config,
|
|
462
463
|
"post",
|
|
463
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
464
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk`,
|
|
464
465
|
query_params,
|
|
465
466
|
body,
|
|
466
467
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -474,7 +475,7 @@ class Catalog {
|
|
|
474
475
|
|
|
475
476
|
const {
|
|
476
477
|
error: res_error,
|
|
477
|
-
} = CatalogPlatformModel.
|
|
478
|
+
} = CatalogPlatformModel.BulkResponseSchema().validate(responseData, {
|
|
478
479
|
abortEarly: false,
|
|
479
480
|
allowUnknown: true,
|
|
480
481
|
});
|
|
@@ -485,7 +486,7 @@ class Catalog {
|
|
|
485
486
|
} else {
|
|
486
487
|
Logger({
|
|
487
488
|
level: "WARN",
|
|
488
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
489
|
+
message: `Response Validation Warnings for platform > Catalog > createBulkProductUploadJob \n ${res_error}`,
|
|
489
490
|
});
|
|
490
491
|
}
|
|
491
492
|
}
|
|
@@ -497,10 +498,11 @@ class Catalog {
|
|
|
497
498
|
* @param {CatalogPlatformValidator.CreateInventoryExportParam} arg - Arg object
|
|
498
499
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
499
500
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
500
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
501
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportResponseSchema>} -
|
|
502
|
+
* Success response
|
|
501
503
|
* @name createInventoryExport
|
|
502
|
-
* @summary: Create inventory export
|
|
503
|
-
* @description:
|
|
504
|
+
* @summary: Create inventory export
|
|
505
|
+
* @description: creates export job for inventory data associated with a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExport/).
|
|
504
506
|
*/
|
|
505
507
|
async createInventoryExport(
|
|
506
508
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -539,7 +541,7 @@ class Catalog {
|
|
|
539
541
|
const response = await PlatformAPIClient.execute(
|
|
540
542
|
this.config,
|
|
541
543
|
"post",
|
|
542
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download
|
|
544
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download/`,
|
|
543
545
|
query_params,
|
|
544
546
|
body,
|
|
545
547
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -553,10 +555,10 @@ class Catalog {
|
|
|
553
555
|
|
|
554
556
|
const {
|
|
555
557
|
error: res_error,
|
|
556
|
-
} = CatalogPlatformModel.
|
|
557
|
-
|
|
558
|
-
allowUnknown: true
|
|
559
|
-
|
|
558
|
+
} = CatalogPlatformModel.InventoryExportResponseSchema().validate(
|
|
559
|
+
responseData,
|
|
560
|
+
{ abortEarly: false, allowUnknown: true }
|
|
561
|
+
);
|
|
560
562
|
|
|
561
563
|
if (res_error) {
|
|
562
564
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -576,9 +578,10 @@ class Catalog {
|
|
|
576
578
|
* @param {CatalogPlatformValidator.CreateInventoryExportJobParam} arg - Arg object
|
|
577
579
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
578
580
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
579
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
581
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportResponseSchema>} -
|
|
582
|
+
* Success response
|
|
580
583
|
* @name createInventoryExportJob
|
|
581
|
-
* @summary: Create inventory export job
|
|
584
|
+
* @summary: Create inventory export job
|
|
582
585
|
* @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExportJob/).
|
|
583
586
|
*/
|
|
584
587
|
async createInventoryExportJob(
|
|
@@ -620,7 +623,7 @@ class Catalog {
|
|
|
620
623
|
const response = await PlatformAPIClient.execute(
|
|
621
624
|
this.config,
|
|
622
625
|
"post",
|
|
623
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download
|
|
626
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
|
|
624
627
|
query_params,
|
|
625
628
|
body,
|
|
626
629
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -634,10 +637,10 @@ class Catalog {
|
|
|
634
637
|
|
|
635
638
|
const {
|
|
636
639
|
error: res_error,
|
|
637
|
-
} = CatalogPlatformModel.
|
|
638
|
-
|
|
639
|
-
allowUnknown: true
|
|
640
|
-
|
|
640
|
+
} = CatalogPlatformModel.InventoryExportResponseSchema().validate(
|
|
641
|
+
responseData,
|
|
642
|
+
{ abortEarly: false, allowUnknown: true }
|
|
643
|
+
);
|
|
641
644
|
|
|
642
645
|
if (res_error) {
|
|
643
646
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -657,22 +660,22 @@ class Catalog {
|
|
|
657
660
|
* @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object
|
|
658
661
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
659
662
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
660
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
663
|
+
* @returns {Promise<CatalogPlatformModel.CreateMarketplaceOptinResponseSchema>}
|
|
661
664
|
* - Success response
|
|
662
665
|
*
|
|
663
666
|
* @name createMarketplaceOptin
|
|
664
|
-
* @summary: Update
|
|
665
|
-
* @description:
|
|
667
|
+
* @summary: Create or Update opt-in infomation
|
|
668
|
+
* @description: Allows to create opt-in information for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createMarketplaceOptin/).
|
|
666
669
|
*/
|
|
667
670
|
async createMarketplaceOptin(
|
|
668
|
-
{
|
|
671
|
+
{ marketplaceSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
669
672
|
{ responseHeaders } = { responseHeaders: false }
|
|
670
673
|
) {
|
|
671
674
|
const {
|
|
672
675
|
error,
|
|
673
676
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
674
677
|
{
|
|
675
|
-
|
|
678
|
+
marketplaceSlug,
|
|
676
679
|
body,
|
|
677
680
|
},
|
|
678
681
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -686,7 +689,7 @@ class Catalog {
|
|
|
686
689
|
error: warrning,
|
|
687
690
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
688
691
|
{
|
|
689
|
-
|
|
692
|
+
marketplaceSlug,
|
|
690
693
|
body,
|
|
691
694
|
},
|
|
692
695
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -705,7 +708,7 @@ class Catalog {
|
|
|
705
708
|
const response = await PlatformAPIClient.execute(
|
|
706
709
|
this.config,
|
|
707
710
|
"post",
|
|
708
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${
|
|
711
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplaceSlug}/opt-in`,
|
|
709
712
|
query_params,
|
|
710
713
|
body,
|
|
711
714
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -719,7 +722,7 @@ class Catalog {
|
|
|
719
722
|
|
|
720
723
|
const {
|
|
721
724
|
error: res_error,
|
|
722
|
-
} = CatalogPlatformModel.
|
|
725
|
+
} = CatalogPlatformModel.CreateMarketplaceOptinResponseSchema().validate(
|
|
723
726
|
responseData,
|
|
724
727
|
{ abortEarly: false, allowUnknown: true }
|
|
725
728
|
);
|
|
@@ -742,10 +745,10 @@ class Catalog {
|
|
|
742
745
|
* @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object
|
|
743
746
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
744
747
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
745
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
748
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
746
749
|
* @name createProduct
|
|
747
|
-
* @summary: Create
|
|
748
|
-
* @description:
|
|
750
|
+
* @summary: Create product
|
|
751
|
+
* @description: Users can create a product using this API, associating it with the provided company ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProduct/).
|
|
749
752
|
*/
|
|
750
753
|
async createProduct(
|
|
751
754
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -784,7 +787,7 @@ class Catalog {
|
|
|
784
787
|
const response = await PlatformAPIClient.execute(
|
|
785
788
|
this.config,
|
|
786
789
|
"post",
|
|
787
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products
|
|
790
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
788
791
|
query_params,
|
|
789
792
|
body,
|
|
790
793
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -798,7 +801,7 @@ class Catalog {
|
|
|
798
801
|
|
|
799
802
|
const {
|
|
800
803
|
error: res_error,
|
|
801
|
-
} = CatalogPlatformModel.
|
|
804
|
+
} = CatalogPlatformModel.SuccessResponseObject().validate(responseData, {
|
|
802
805
|
abortEarly: false,
|
|
803
806
|
allowUnknown: true,
|
|
804
807
|
});
|
|
@@ -821,9 +824,9 @@ class Catalog {
|
|
|
821
824
|
* @param {CatalogPlatformValidator.CreateProductAssetsInBulkParam} arg - Arg object
|
|
822
825
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
823
826
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
824
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
827
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
825
828
|
* @name createProductAssetsInBulk
|
|
826
|
-
* @summary: Create product assets in bulk
|
|
829
|
+
* @summary: Create product assets in bulk
|
|
827
830
|
* @description: Helps to create a bulk asset upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductAssetsInBulk/).
|
|
828
831
|
*/
|
|
829
832
|
async createProductAssetsInBulk(
|
|
@@ -865,7 +868,7 @@ class Catalog {
|
|
|
865
868
|
const response = await PlatformAPIClient.execute(
|
|
866
869
|
this.config,
|
|
867
870
|
"post",
|
|
868
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk
|
|
871
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk/`,
|
|
869
872
|
query_params,
|
|
870
873
|
body,
|
|
871
874
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -879,7 +882,7 @@ class Catalog {
|
|
|
879
882
|
|
|
880
883
|
const {
|
|
881
884
|
error: res_error,
|
|
882
|
-
} = CatalogPlatformModel.
|
|
885
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
883
886
|
abortEarly: false,
|
|
884
887
|
allowUnknown: true,
|
|
885
888
|
});
|
|
@@ -902,12 +905,12 @@ class Catalog {
|
|
|
902
905
|
* @param {CatalogPlatformValidator.CreateProductBundleParam} arg - Arg object
|
|
903
906
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
904
907
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
905
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
908
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleCreateResponseSchema>}
|
|
906
909
|
* - Success response
|
|
907
910
|
*
|
|
908
911
|
* @name createProductBundle
|
|
909
|
-
* @summary: Create
|
|
910
|
-
* @description: Create product bundle in the catalog
|
|
912
|
+
* @summary: Create product bundle
|
|
913
|
+
* @description: Create product bundle in the catalog associated to a specific company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductBundle/).
|
|
911
914
|
*/
|
|
912
915
|
async createProductBundle(
|
|
913
916
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -946,7 +949,7 @@ class Catalog {
|
|
|
946
949
|
const response = await PlatformAPIClient.execute(
|
|
947
950
|
this.config,
|
|
948
951
|
"post",
|
|
949
|
-
`/service/platform/catalog/
|
|
952
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
|
|
950
953
|
query_params,
|
|
951
954
|
body,
|
|
952
955
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -960,7 +963,7 @@ class Catalog {
|
|
|
960
963
|
|
|
961
964
|
const {
|
|
962
965
|
error: res_error,
|
|
963
|
-
} = CatalogPlatformModel.
|
|
966
|
+
} = CatalogPlatformModel.GetProductBundleCreateResponseSchema().validate(
|
|
964
967
|
responseData,
|
|
965
968
|
{ abortEarly: false, allowUnknown: true }
|
|
966
969
|
);
|
|
@@ -983,12 +986,12 @@ class Catalog {
|
|
|
983
986
|
* @param {CatalogPlatformValidator.CreateProductExportJobParam} arg - Arg object
|
|
984
987
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
985
988
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
986
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
989
|
+
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponseSchema>}
|
|
987
990
|
* - Success response
|
|
988
991
|
*
|
|
989
992
|
* @name createProductExportJob
|
|
990
|
-
* @summary: Create product export job
|
|
991
|
-
* @description:
|
|
993
|
+
* @summary: Create product export job
|
|
994
|
+
* @description: Allows to create a product export job for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductExportJob/).
|
|
992
995
|
*/
|
|
993
996
|
async createProductExportJob(
|
|
994
997
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1029,7 +1032,7 @@ class Catalog {
|
|
|
1029
1032
|
const response = await PlatformAPIClient.execute(
|
|
1030
1033
|
this.config,
|
|
1031
1034
|
"post",
|
|
1032
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads
|
|
1035
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads/`,
|
|
1033
1036
|
query_params,
|
|
1034
1037
|
body,
|
|
1035
1038
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1043,7 +1046,7 @@ class Catalog {
|
|
|
1043
1046
|
|
|
1044
1047
|
const {
|
|
1045
1048
|
error: res_error,
|
|
1046
|
-
} = CatalogPlatformModel.
|
|
1049
|
+
} = CatalogPlatformModel.ProductDownloadsResponseSchema().validate(
|
|
1047
1050
|
responseData,
|
|
1048
1051
|
{ abortEarly: false, allowUnknown: true }
|
|
1049
1052
|
);
|
|
@@ -1066,9 +1069,9 @@ class Catalog {
|
|
|
1066
1069
|
* @param {CatalogPlatformValidator.CreateProductsInBulkParam} arg - Arg object
|
|
1067
1070
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1068
1071
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1069
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1072
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1070
1073
|
* @name createProductsInBulk
|
|
1071
|
-
* @summary: Create products in bulk
|
|
1074
|
+
* @summary: Create products in bulk
|
|
1072
1075
|
* @description: Helps to create products in bulk push to kafka for approval/creation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductsInBulk/).
|
|
1073
1076
|
*/
|
|
1074
1077
|
async createProductsInBulk(
|
|
@@ -1124,7 +1127,7 @@ class Catalog {
|
|
|
1124
1127
|
|
|
1125
1128
|
const {
|
|
1126
1129
|
error: res_error,
|
|
1127
|
-
} = CatalogPlatformModel.
|
|
1130
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1128
1131
|
abortEarly: false,
|
|
1129
1132
|
allowUnknown: true,
|
|
1130
1133
|
});
|
|
@@ -1147,10 +1150,10 @@ class Catalog {
|
|
|
1147
1150
|
* @param {CatalogPlatformValidator.CreateSizeGuideParam} arg - Arg object
|
|
1148
1151
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1149
1152
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1150
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1153
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1151
1154
|
* @name createSizeGuide
|
|
1152
|
-
* @summary: Create
|
|
1153
|
-
* @description: Allows to create a size guide associated to a
|
|
1155
|
+
* @summary: Create size guide
|
|
1156
|
+
* @description: Allows to create a size guide associated to a seller - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSizeGuide/).
|
|
1154
1157
|
*/
|
|
1155
1158
|
async createSizeGuide(
|
|
1156
1159
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1203,7 +1206,7 @@ class Catalog {
|
|
|
1203
1206
|
|
|
1204
1207
|
const {
|
|
1205
1208
|
error: res_error,
|
|
1206
|
-
} = CatalogPlatformModel.
|
|
1209
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1207
1210
|
abortEarly: false,
|
|
1208
1211
|
allowUnknown: true,
|
|
1209
1212
|
});
|
|
@@ -1226,9 +1229,9 @@ class Catalog {
|
|
|
1226
1229
|
* @param {CatalogPlatformValidator.DeleteBulkInventoryJobParam} arg - Arg object
|
|
1227
1230
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1228
1231
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1229
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1232
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1230
1233
|
* @name deleteBulkInventoryJob
|
|
1231
|
-
* @summary: Delete inventory bulk upload job
|
|
1234
|
+
* @summary: Delete inventory bulk upload job
|
|
1232
1235
|
* @description: Allows to delete bulk Inventory job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteBulkInventoryJob/).
|
|
1233
1236
|
*/
|
|
1234
1237
|
async deleteBulkInventoryJob(
|
|
@@ -1270,7 +1273,7 @@ class Catalog {
|
|
|
1270
1273
|
const response = await PlatformAPIClient.execute(
|
|
1271
1274
|
this.config,
|
|
1272
1275
|
"delete",
|
|
1273
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}
|
|
1276
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}/`,
|
|
1274
1277
|
query_params,
|
|
1275
1278
|
undefined,
|
|
1276
1279
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1284,7 +1287,7 @@ class Catalog {
|
|
|
1284
1287
|
|
|
1285
1288
|
const {
|
|
1286
1289
|
error: res_error,
|
|
1287
|
-
} = CatalogPlatformModel.
|
|
1290
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1288
1291
|
abortEarly: false,
|
|
1289
1292
|
allowUnknown: true,
|
|
1290
1293
|
});
|
|
@@ -1307,10 +1310,10 @@ class Catalog {
|
|
|
1307
1310
|
* @param {CatalogPlatformValidator.DeleteProductParam} arg - Arg object
|
|
1308
1311
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1309
1312
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1310
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1313
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1311
1314
|
* @name deleteProduct
|
|
1312
|
-
* @summary: Delete
|
|
1313
|
-
* @description:
|
|
1315
|
+
* @summary: Delete product
|
|
1316
|
+
* @description: Users can delete a product by providing the item_id and company_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProduct/).
|
|
1314
1317
|
*/
|
|
1315
1318
|
async deleteProduct(
|
|
1316
1319
|
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1349,7 +1352,7 @@ class Catalog {
|
|
|
1349
1352
|
const response = await PlatformAPIClient.execute(
|
|
1350
1353
|
this.config,
|
|
1351
1354
|
"delete",
|
|
1352
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
1355
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1353
1356
|
query_params,
|
|
1354
1357
|
undefined,
|
|
1355
1358
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1363,7 +1366,7 @@ class Catalog {
|
|
|
1363
1366
|
|
|
1364
1367
|
const {
|
|
1365
1368
|
error: res_error,
|
|
1366
|
-
} = CatalogPlatformModel.
|
|
1369
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1367
1370
|
abortEarly: false,
|
|
1368
1371
|
allowUnknown: true,
|
|
1369
1372
|
});
|
|
@@ -1386,9 +1389,9 @@ class Catalog {
|
|
|
1386
1389
|
* @param {CatalogPlatformValidator.DeleteProductBulkJobParam} arg - Arg object
|
|
1387
1390
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1388
1391
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1389
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1392
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1390
1393
|
* @name deleteProductBulkJob
|
|
1391
|
-
* @summary: Delete product bulk
|
|
1394
|
+
* @summary: Delete product bulk-upload job
|
|
1392
1395
|
* @description: Allows to delete bulk product job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProductBulkJob/).
|
|
1393
1396
|
*/
|
|
1394
1397
|
async deleteProductBulkJob(
|
|
@@ -1442,7 +1445,7 @@ class Catalog {
|
|
|
1442
1445
|
|
|
1443
1446
|
const {
|
|
1444
1447
|
error: res_error,
|
|
1445
|
-
} = CatalogPlatformModel.
|
|
1448
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1446
1449
|
abortEarly: false,
|
|
1447
1450
|
allowUnknown: true,
|
|
1448
1451
|
});
|
|
@@ -1465,10 +1468,11 @@ class Catalog {
|
|
|
1465
1468
|
* @param {CatalogPlatformValidator.DeleteRealtimeInventoryParam} arg - Arg object
|
|
1466
1469
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1467
1470
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1468
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1471
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponseSchema>} -
|
|
1472
|
+
* Success response
|
|
1469
1473
|
* @name deleteRealtimeInventory
|
|
1470
|
-
* @summary: Delete
|
|
1471
|
-
* @description:
|
|
1474
|
+
* @summary: Delete an inventory
|
|
1475
|
+
* @description: You can use this API to delete inventory linked to a particular product size. When you make the API call, the inventory associated with that size will be removed as part of api process. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteRealtimeInventory/).
|
|
1472
1476
|
*/
|
|
1473
1477
|
async deleteRealtimeInventory(
|
|
1474
1478
|
{ itemId, sellerIdentifier, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1527,10 +1531,10 @@ class Catalog {
|
|
|
1527
1531
|
|
|
1528
1532
|
const {
|
|
1529
1533
|
error: res_error,
|
|
1530
|
-
} = CatalogPlatformModel.
|
|
1531
|
-
|
|
1532
|
-
allowUnknown: true
|
|
1533
|
-
|
|
1534
|
+
} = CatalogPlatformModel.InventoryUpdateResponseSchema().validate(
|
|
1535
|
+
responseData,
|
|
1536
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1537
|
+
);
|
|
1534
1538
|
|
|
1535
1539
|
if (res_error) {
|
|
1536
1540
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1550,10 +1554,11 @@ class Catalog {
|
|
|
1550
1554
|
* @param {CatalogPlatformValidator.DeleteSizeParam} arg - Arg object
|
|
1551
1555
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1552
1556
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1553
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1554
|
-
* Success response
|
|
1557
|
+
* @returns {Promise<CatalogPlatformModel.ProductSizeDeleteResponseSchema>}
|
|
1558
|
+
* - Success response
|
|
1559
|
+
*
|
|
1555
1560
|
* @name deleteSize
|
|
1556
|
-
* @summary: Delete product size
|
|
1561
|
+
* @summary: Delete product size
|
|
1557
1562
|
* @description: Allows to delete size associated with product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSize/).
|
|
1558
1563
|
*/
|
|
1559
1564
|
async deleteSize(
|
|
@@ -1607,7 +1612,7 @@ class Catalog {
|
|
|
1607
1612
|
|
|
1608
1613
|
const {
|
|
1609
1614
|
error: res_error,
|
|
1610
|
-
} = CatalogPlatformModel.
|
|
1615
|
+
} = CatalogPlatformModel.ProductSizeDeleteResponseSchema().validate(
|
|
1611
1616
|
responseData,
|
|
1612
1617
|
{ abortEarly: false, allowUnknown: true }
|
|
1613
1618
|
);
|
|
@@ -1634,18 +1639,18 @@ class Catalog {
|
|
|
1634
1639
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1635
1640
|
* @returns {Promise<string>} - Success response
|
|
1636
1641
|
* @name downloadInventoryTemplateView
|
|
1637
|
-
* @summary: Download inventory template
|
|
1638
|
-
* @description: Allows you to download product template data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/downloadInventoryTemplateView/).
|
|
1642
|
+
* @summary: Download inventory template data
|
|
1643
|
+
* @description: Allows you to download inventory product template data for a specific company in formats like csv and excel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/downloadInventoryTemplateView/).
|
|
1639
1644
|
*/
|
|
1640
1645
|
async downloadInventoryTemplateView(
|
|
1641
|
-
{
|
|
1646
|
+
{ itemType, requestHeaders } = { requestHeaders: {} },
|
|
1642
1647
|
{ responseHeaders } = { responseHeaders: false }
|
|
1643
1648
|
) {
|
|
1644
1649
|
const {
|
|
1645
1650
|
error,
|
|
1646
1651
|
} = CatalogPlatformValidator.downloadInventoryTemplateView().validate(
|
|
1647
1652
|
{
|
|
1648
|
-
|
|
1653
|
+
itemType,
|
|
1649
1654
|
},
|
|
1650
1655
|
{ abortEarly: false, allowUnknown: true }
|
|
1651
1656
|
);
|
|
@@ -1658,7 +1663,7 @@ class Catalog {
|
|
|
1658
1663
|
error: warrning,
|
|
1659
1664
|
} = CatalogPlatformValidator.downloadInventoryTemplateView().validate(
|
|
1660
1665
|
{
|
|
1661
|
-
|
|
1666
|
+
itemType,
|
|
1662
1667
|
},
|
|
1663
1668
|
{ abortEarly: false, allowUnknown: false }
|
|
1664
1669
|
);
|
|
@@ -1670,14 +1675,14 @@ class Catalog {
|
|
|
1670
1675
|
}
|
|
1671
1676
|
|
|
1672
1677
|
const query_params = {};
|
|
1673
|
-
query_params["
|
|
1678
|
+
query_params["item_type"] = itemType;
|
|
1674
1679
|
|
|
1675
1680
|
const xHeaders = {};
|
|
1676
1681
|
|
|
1677
1682
|
const response = await PlatformAPIClient.execute(
|
|
1678
1683
|
this.config,
|
|
1679
1684
|
"get",
|
|
1680
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/download
|
|
1685
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/download/`,
|
|
1681
1686
|
query_params,
|
|
1682
1687
|
undefined,
|
|
1683
1688
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1715,8 +1720,8 @@ class Catalog {
|
|
|
1715
1720
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1716
1721
|
* @returns {Promise<string>} - Success response
|
|
1717
1722
|
* @name downloadProductTemplateViews
|
|
1718
|
-
* @summary: Download product template
|
|
1719
|
-
* @description: Allows you to download product template data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/downloadProductTemplateViews/).
|
|
1723
|
+
* @summary: Download product template view
|
|
1724
|
+
* @description: Allows you to download product template data by its slug for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/downloadProductTemplateViews/).
|
|
1720
1725
|
*/
|
|
1721
1726
|
async downloadProductTemplateViews(
|
|
1722
1727
|
{ slug, itemType, type, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1763,7 +1768,7 @@ class Catalog {
|
|
|
1763
1768
|
const response = await PlatformAPIClient.execute(
|
|
1764
1769
|
this.config,
|
|
1765
1770
|
"get",
|
|
1766
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/download
|
|
1771
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/download/`,
|
|
1767
1772
|
query_params,
|
|
1768
1773
|
undefined,
|
|
1769
1774
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1797,9 +1802,9 @@ class Catalog {
|
|
|
1797
1802
|
* @param {CatalogPlatformValidator.EditProductParam} arg - Arg object
|
|
1798
1803
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1799
1804
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1800
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1805
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1801
1806
|
* @name editProduct
|
|
1802
|
-
* @summary:
|
|
1807
|
+
* @summary: Update a product
|
|
1803
1808
|
* @description: Modify the details and settings of an existing product in the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/editProduct/).
|
|
1804
1809
|
*/
|
|
1805
1810
|
async editProduct(
|
|
@@ -1839,7 +1844,7 @@ class Catalog {
|
|
|
1839
1844
|
const response = await PlatformAPIClient.execute(
|
|
1840
1845
|
this.config,
|
|
1841
1846
|
"put",
|
|
1842
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
1847
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1843
1848
|
query_params,
|
|
1844
1849
|
body,
|
|
1845
1850
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1853,7 +1858,7 @@ class Catalog {
|
|
|
1853
1858
|
|
|
1854
1859
|
const {
|
|
1855
1860
|
error: res_error,
|
|
1856
|
-
} = CatalogPlatformModel.
|
|
1861
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1857
1862
|
abortEarly: false,
|
|
1858
1863
|
allowUnknown: true,
|
|
1859
1864
|
});
|
|
@@ -1878,16 +1883,16 @@ class Catalog {
|
|
|
1878
1883
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1879
1884
|
* @returns {Promise<CatalogPlatformModel.InventoryConfig>} - Success response
|
|
1880
1885
|
* @name exportInventoryConfig
|
|
1881
|
-
* @summary:
|
|
1886
|
+
* @summary: Get export inventory configuration
|
|
1882
1887
|
* @description: Retrieve List of different filters like brand, store, and type for inventory export. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/exportInventoryConfig/).
|
|
1883
1888
|
*/
|
|
1884
1889
|
async exportInventoryConfig(
|
|
1885
|
-
{
|
|
1890
|
+
{ filterType, requestHeaders } = { requestHeaders: {} },
|
|
1886
1891
|
{ responseHeaders } = { responseHeaders: false }
|
|
1887
1892
|
) {
|
|
1888
1893
|
const { error } = CatalogPlatformValidator.exportInventoryConfig().validate(
|
|
1889
1894
|
{
|
|
1890
|
-
|
|
1895
|
+
filterType,
|
|
1891
1896
|
},
|
|
1892
1897
|
{ abortEarly: false, allowUnknown: true }
|
|
1893
1898
|
);
|
|
@@ -1900,7 +1905,7 @@ class Catalog {
|
|
|
1900
1905
|
error: warrning,
|
|
1901
1906
|
} = CatalogPlatformValidator.exportInventoryConfig().validate(
|
|
1902
1907
|
{
|
|
1903
|
-
|
|
1908
|
+
filterType,
|
|
1904
1909
|
},
|
|
1905
1910
|
{ abortEarly: false, allowUnknown: false }
|
|
1906
1911
|
);
|
|
@@ -1912,14 +1917,14 @@ class Catalog {
|
|
|
1912
1917
|
}
|
|
1913
1918
|
|
|
1914
1919
|
const query_params = {};
|
|
1915
|
-
query_params["
|
|
1920
|
+
query_params["filter_type"] = filterType;
|
|
1916
1921
|
|
|
1917
1922
|
const xHeaders = {};
|
|
1918
1923
|
|
|
1919
1924
|
const response = await PlatformAPIClient.execute(
|
|
1920
1925
|
this.config,
|
|
1921
1926
|
"get",
|
|
1922
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/configuration
|
|
1927
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/configuration/`,
|
|
1923
1928
|
query_params,
|
|
1924
1929
|
undefined,
|
|
1925
1930
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1960,8 +1965,8 @@ class Catalog {
|
|
|
1960
1965
|
* - Success response
|
|
1961
1966
|
*
|
|
1962
1967
|
* @name getAllProductHsnCodes
|
|
1963
|
-
* @summary:
|
|
1964
|
-
* @description: Retrieve all HSN codes associated with products
|
|
1968
|
+
* @summary: List product HSN codes
|
|
1969
|
+
* @description: Retrieve all HSN codes associated with company products and provide search capabilities based on HSN code, reporting HSN, etc - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllProductHsnCodes/).
|
|
1965
1970
|
*/
|
|
1966
1971
|
async getAllProductHsnCodes(
|
|
1967
1972
|
{ pageNo, pageSize, q, type, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2010,7 +2015,7 @@ class Catalog {
|
|
|
2010
2015
|
const response = await PlatformAPIClient.execute(
|
|
2011
2016
|
this.config,
|
|
2012
2017
|
"get",
|
|
2013
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/hsn
|
|
2018
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/hsn/`,
|
|
2014
2019
|
query_params,
|
|
2015
2020
|
undefined,
|
|
2016
2021
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2044,21 +2049,21 @@ class Catalog {
|
|
|
2044
2049
|
}
|
|
2045
2050
|
|
|
2046
2051
|
/**
|
|
2047
|
-
* @param {CatalogPlatformValidator.
|
|
2052
|
+
* @param {CatalogPlatformValidator.GetAttributeParam} arg - Arg object
|
|
2048
2053
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2049
2054
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2050
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2051
|
-
* @name
|
|
2052
|
-
* @summary: Get
|
|
2053
|
-
* @description: Retrieve
|
|
2055
|
+
* @returns {Promise<CatalogPlatformModel.AttributeDetail>} - Success response
|
|
2056
|
+
* @name getAttribute
|
|
2057
|
+
* @summary: Get attribute detail by slug
|
|
2058
|
+
* @description: Retrieve the attribute detail for catalog listings by attribute slug passed for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAttribute/).
|
|
2054
2059
|
*/
|
|
2055
|
-
async
|
|
2056
|
-
{
|
|
2060
|
+
async getAttribute(
|
|
2061
|
+
{ attributeSlug, requestHeaders } = { requestHeaders: {} },
|
|
2057
2062
|
{ responseHeaders } = { responseHeaders: false }
|
|
2058
2063
|
) {
|
|
2059
|
-
const { error } = CatalogPlatformValidator.
|
|
2064
|
+
const { error } = CatalogPlatformValidator.getAttribute().validate(
|
|
2060
2065
|
{
|
|
2061
|
-
|
|
2066
|
+
attributeSlug,
|
|
2062
2067
|
},
|
|
2063
2068
|
{ abortEarly: false, allowUnknown: true }
|
|
2064
2069
|
);
|
|
@@ -2069,16 +2074,16 @@ class Catalog {
|
|
|
2069
2074
|
// Showing warrnings if extra unknown parameters are found
|
|
2070
2075
|
const {
|
|
2071
2076
|
error: warrning,
|
|
2072
|
-
} = CatalogPlatformValidator.
|
|
2077
|
+
} = CatalogPlatformValidator.getAttribute().validate(
|
|
2073
2078
|
{
|
|
2074
|
-
|
|
2079
|
+
attributeSlug,
|
|
2075
2080
|
},
|
|
2076
2081
|
{ abortEarly: false, allowUnknown: false }
|
|
2077
2082
|
);
|
|
2078
2083
|
if (warrning) {
|
|
2079
2084
|
Logger({
|
|
2080
2085
|
level: "WARN",
|
|
2081
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2086
|
+
message: `Parameter Validation warrnings for platform > Catalog > getAttribute \n ${warrning}`,
|
|
2082
2087
|
});
|
|
2083
2088
|
}
|
|
2084
2089
|
|
|
@@ -2089,7 +2094,7 @@ class Catalog {
|
|
|
2089
2094
|
const response = await PlatformAPIClient.execute(
|
|
2090
2095
|
this.config,
|
|
2091
2096
|
"get",
|
|
2092
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2097
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes/${attributeSlug}`,
|
|
2093
2098
|
query_params,
|
|
2094
2099
|
undefined,
|
|
2095
2100
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2103,7 +2108,7 @@ class Catalog {
|
|
|
2103
2108
|
|
|
2104
2109
|
const {
|
|
2105
2110
|
error: res_error,
|
|
2106
|
-
} = CatalogPlatformModel.
|
|
2111
|
+
} = CatalogPlatformModel.AttributeDetail().validate(responseData, {
|
|
2107
2112
|
abortEarly: false,
|
|
2108
2113
|
allowUnknown: true,
|
|
2109
2114
|
});
|
|
@@ -2114,7 +2119,7 @@ class Catalog {
|
|
|
2114
2119
|
} else {
|
|
2115
2120
|
Logger({
|
|
2116
2121
|
level: "WARN",
|
|
2117
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2122
|
+
message: `Response Validation Warnings for platform > Catalog > getAttribute \n ${res_error}`,
|
|
2118
2123
|
});
|
|
2119
2124
|
}
|
|
2120
2125
|
}
|
|
@@ -2123,28 +2128,22 @@ class Catalog {
|
|
|
2123
2128
|
}
|
|
2124
2129
|
|
|
2125
2130
|
/**
|
|
2126
|
-
* @param {CatalogPlatformValidator.
|
|
2131
|
+
* @param {CatalogPlatformValidator.GetCategoryDataParam} arg - Arg object
|
|
2127
2132
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2128
2133
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2129
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2134
|
+
* @returns {Promise<CatalogPlatformModel.SingleCategoryResponseSchema>} -
|
|
2130
2135
|
* Success response
|
|
2131
|
-
* @name
|
|
2132
|
-
* @summary: Get
|
|
2133
|
-
* @description:
|
|
2136
|
+
* @name getCategoryData
|
|
2137
|
+
* @summary: Get category by uid
|
|
2138
|
+
* @description: Retrieve detailed information about a specific category by its uid for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategoryData/).
|
|
2134
2139
|
*/
|
|
2135
|
-
async
|
|
2136
|
-
{
|
|
2137
|
-
requestHeaders: {},
|
|
2138
|
-
},
|
|
2140
|
+
async getCategoryData(
|
|
2141
|
+
{ uid, requestHeaders } = { requestHeaders: {} },
|
|
2139
2142
|
{ responseHeaders } = { responseHeaders: false }
|
|
2140
2143
|
) {
|
|
2141
|
-
const { error } = CatalogPlatformValidator.
|
|
2144
|
+
const { error } = CatalogPlatformValidator.getCategoryData().validate(
|
|
2142
2145
|
{
|
|
2143
|
-
|
|
2144
|
-
q,
|
|
2145
|
-
pageNo,
|
|
2146
|
-
pageSize,
|
|
2147
|
-
marketplace,
|
|
2146
|
+
uid,
|
|
2148
2147
|
},
|
|
2149
2148
|
{ abortEarly: false, allowUnknown: true }
|
|
2150
2149
|
);
|
|
@@ -2155,36 +2154,27 @@ class Catalog {
|
|
|
2155
2154
|
// Showing warrnings if extra unknown parameters are found
|
|
2156
2155
|
const {
|
|
2157
2156
|
error: warrning,
|
|
2158
|
-
} = CatalogPlatformValidator.
|
|
2157
|
+
} = CatalogPlatformValidator.getCategoryData().validate(
|
|
2159
2158
|
{
|
|
2160
|
-
|
|
2161
|
-
q,
|
|
2162
|
-
pageNo,
|
|
2163
|
-
pageSize,
|
|
2164
|
-
marketplace,
|
|
2159
|
+
uid,
|
|
2165
2160
|
},
|
|
2166
2161
|
{ abortEarly: false, allowUnknown: false }
|
|
2167
2162
|
);
|
|
2168
2163
|
if (warrning) {
|
|
2169
2164
|
Logger({
|
|
2170
2165
|
level: "WARN",
|
|
2171
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2166
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCategoryData \n ${warrning}`,
|
|
2172
2167
|
});
|
|
2173
2168
|
}
|
|
2174
2169
|
|
|
2175
2170
|
const query_params = {};
|
|
2176
|
-
query_params["is_active"] = isActive;
|
|
2177
|
-
query_params["q"] = q;
|
|
2178
|
-
query_params["page_no"] = pageNo;
|
|
2179
|
-
query_params["page_size"] = pageSize;
|
|
2180
|
-
query_params["marketplace"] = marketplace;
|
|
2181
2171
|
|
|
2182
2172
|
const xHeaders = {};
|
|
2183
2173
|
|
|
2184
2174
|
const response = await PlatformAPIClient.execute(
|
|
2185
2175
|
this.config,
|
|
2186
2176
|
"get",
|
|
2187
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2177
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
|
|
2188
2178
|
query_params,
|
|
2189
2179
|
undefined,
|
|
2190
2180
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2198,7 +2188,7 @@ class Catalog {
|
|
|
2198
2188
|
|
|
2199
2189
|
const {
|
|
2200
2190
|
error: res_error,
|
|
2201
|
-
} = CatalogPlatformModel.
|
|
2191
|
+
} = CatalogPlatformModel.SingleCategoryResponseSchema().validate(
|
|
2202
2192
|
responseData,
|
|
2203
2193
|
{ abortEarly: false, allowUnknown: true }
|
|
2204
2194
|
);
|
|
@@ -2209,7 +2199,7 @@ class Catalog {
|
|
|
2209
2199
|
} else {
|
|
2210
2200
|
Logger({
|
|
2211
2201
|
level: "WARN",
|
|
2212
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2202
|
+
message: `Response Validation Warnings for platform > Catalog > getCategoryData \n ${res_error}`,
|
|
2213
2203
|
});
|
|
2214
2204
|
}
|
|
2215
2205
|
}
|
|
@@ -2218,23 +2208,28 @@ class Catalog {
|
|
|
2218
2208
|
}
|
|
2219
2209
|
|
|
2220
2210
|
/**
|
|
2221
|
-
* @param {CatalogPlatformValidator.
|
|
2211
|
+
* @param {CatalogPlatformValidator.GetCompanyBrandDetailParam} arg - Arg object
|
|
2222
2212
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2223
2213
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2224
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2214
|
+
* @returns {Promise<CatalogPlatformModel.OptinCompanyBrandDetailsView>} -
|
|
2225
2215
|
* Success response
|
|
2226
|
-
* @name
|
|
2227
|
-
* @summary:
|
|
2228
|
-
* @description:
|
|
2216
|
+
* @name getCompanyBrandDetail
|
|
2217
|
+
* @summary: list Company Brand of Optin
|
|
2218
|
+
* @description: Get the details of the Brands associated with the given company_id passed which has opt-in. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyBrandDetail/).
|
|
2229
2219
|
*/
|
|
2230
|
-
async
|
|
2231
|
-
{ pageNo, pageSize, requestHeaders } = {
|
|
2220
|
+
async getCompanyBrandDetail(
|
|
2221
|
+
{ isActive, q, pageNo, pageSize, marketplace, requestHeaders } = {
|
|
2222
|
+
requestHeaders: {},
|
|
2223
|
+
},
|
|
2232
2224
|
{ responseHeaders } = { responseHeaders: false }
|
|
2233
2225
|
) {
|
|
2234
|
-
const { error } = CatalogPlatformValidator.
|
|
2226
|
+
const { error } = CatalogPlatformValidator.getCompanyBrandDetail().validate(
|
|
2235
2227
|
{
|
|
2228
|
+
isActive,
|
|
2229
|
+
q,
|
|
2236
2230
|
pageNo,
|
|
2237
2231
|
pageSize,
|
|
2232
|
+
marketplace,
|
|
2238
2233
|
},
|
|
2239
2234
|
{ abortEarly: false, allowUnknown: true }
|
|
2240
2235
|
);
|
|
@@ -2245,30 +2240,36 @@ class Catalog {
|
|
|
2245
2240
|
// Showing warrnings if extra unknown parameters are found
|
|
2246
2241
|
const {
|
|
2247
2242
|
error: warrning,
|
|
2248
|
-
} = CatalogPlatformValidator.
|
|
2243
|
+
} = CatalogPlatformValidator.getCompanyBrandDetail().validate(
|
|
2249
2244
|
{
|
|
2245
|
+
isActive,
|
|
2246
|
+
q,
|
|
2250
2247
|
pageNo,
|
|
2251
2248
|
pageSize,
|
|
2249
|
+
marketplace,
|
|
2252
2250
|
},
|
|
2253
2251
|
{ abortEarly: false, allowUnknown: false }
|
|
2254
2252
|
);
|
|
2255
2253
|
if (warrning) {
|
|
2256
2254
|
Logger({
|
|
2257
2255
|
level: "WARN",
|
|
2258
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2256
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCompanyBrandDetail \n ${warrning}`,
|
|
2259
2257
|
});
|
|
2260
2258
|
}
|
|
2261
2259
|
|
|
2262
2260
|
const query_params = {};
|
|
2261
|
+
query_params["is_active"] = isActive;
|
|
2262
|
+
query_params["q"] = q;
|
|
2263
2263
|
query_params["page_no"] = pageNo;
|
|
2264
2264
|
query_params["page_size"] = pageSize;
|
|
2265
|
+
query_params["marketplace"] = marketplace;
|
|
2265
2266
|
|
|
2266
2267
|
const xHeaders = {};
|
|
2267
2268
|
|
|
2268
2269
|
const response = await PlatformAPIClient.execute(
|
|
2269
2270
|
this.config,
|
|
2270
2271
|
"get",
|
|
2271
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2272
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-brand-details/`,
|
|
2272
2273
|
query_params,
|
|
2273
2274
|
undefined,
|
|
2274
2275
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2282,7 +2283,7 @@ class Catalog {
|
|
|
2282
2283
|
|
|
2283
2284
|
const {
|
|
2284
2285
|
error: res_error,
|
|
2285
|
-
} = CatalogPlatformModel.
|
|
2286
|
+
} = CatalogPlatformModel.OptinCompanyBrandDetailsView().validate(
|
|
2286
2287
|
responseData,
|
|
2287
2288
|
{ abortEarly: false, allowUnknown: true }
|
|
2288
2289
|
);
|
|
@@ -2293,7 +2294,7 @@ class Catalog {
|
|
|
2293
2294
|
} else {
|
|
2294
2295
|
Logger({
|
|
2295
2296
|
level: "WARN",
|
|
2296
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2297
|
+
message: `Response Validation Warnings for platform > Catalog > getCompanyBrandDetail \n ${res_error}`,
|
|
2297
2298
|
});
|
|
2298
2299
|
}
|
|
2299
2300
|
}
|
|
@@ -2307,8 +2308,8 @@ class Catalog {
|
|
|
2307
2308
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2308
2309
|
* @returns {Promise<CatalogPlatformModel.OptinCompanyDetail>} - Success response
|
|
2309
2310
|
* @name getCompanyDetail
|
|
2310
|
-
* @summary: Get
|
|
2311
|
-
* @description: Get the details of the company associated with the given company_id passed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyDetail/).
|
|
2311
|
+
* @summary: Get Company
|
|
2312
|
+
* @description: Get the details of the company associated with the given company_id passed which has opt-in. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyDetail/).
|
|
2312
2313
|
*/
|
|
2313
2314
|
async getCompanyDetail(
|
|
2314
2315
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -2343,7 +2344,7 @@ class Catalog {
|
|
|
2343
2344
|
const response = await PlatformAPIClient.execute(
|
|
2344
2345
|
this.config,
|
|
2345
2346
|
"get",
|
|
2346
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/company-details
|
|
2347
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/company-details/`,
|
|
2347
2348
|
query_params,
|
|
2348
2349
|
undefined,
|
|
2349
2350
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2382,8 +2383,8 @@ class Catalog {
|
|
|
2382
2383
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2383
2384
|
* @returns {Promise<CatalogPlatformModel.OptinCompanyMetrics>} - Success response
|
|
2384
2385
|
* @name getCompanyMetrics
|
|
2385
|
-
* @summary: Get company metrics
|
|
2386
|
-
* @description: Allows
|
|
2386
|
+
* @summary: Get company metrics
|
|
2387
|
+
* @description: Allows viewing company metrics, including brand and store status, as well as the number of verified and unverified products, company documents, and store documents. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyMetrics/).
|
|
2387
2388
|
*/
|
|
2388
2389
|
async getCompanyMetrics(
|
|
2389
2390
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -2418,7 +2419,7 @@ class Catalog {
|
|
|
2418
2419
|
const response = await PlatformAPIClient.execute(
|
|
2419
2420
|
this.config,
|
|
2420
2421
|
"get",
|
|
2421
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-metrics
|
|
2422
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-metrics/`,
|
|
2422
2423
|
query_params,
|
|
2423
2424
|
undefined,
|
|
2424
2425
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2452,26 +2453,22 @@ class Catalog {
|
|
|
2452
2453
|
}
|
|
2453
2454
|
|
|
2454
2455
|
/**
|
|
2455
|
-
* @param {CatalogPlatformValidator.
|
|
2456
|
+
* @param {CatalogPlatformValidator.GetDepartmentDataParam} arg - Arg object
|
|
2456
2457
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2457
2458
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2458
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2459
|
+
* @returns {Promise<CatalogPlatformModel.DepartmentsResponseSchema>} -
|
|
2459
2460
|
* Success response
|
|
2460
|
-
* @name
|
|
2461
|
-
* @summary: Get
|
|
2462
|
-
* @description:
|
|
2461
|
+
* @name getDepartmentData
|
|
2462
|
+
* @summary: Get department by uid
|
|
2463
|
+
* @description: Retrieve detailed information about a specific department for a specific company by uid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartmentData/).
|
|
2463
2464
|
*/
|
|
2464
|
-
async
|
|
2465
|
-
{
|
|
2465
|
+
async getDepartmentData(
|
|
2466
|
+
{ uid, requestHeaders } = { requestHeaders: {} },
|
|
2466
2467
|
{ responseHeaders } = { responseHeaders: false }
|
|
2467
2468
|
) {
|
|
2468
|
-
const {
|
|
2469
|
-
error,
|
|
2470
|
-
} = CatalogPlatformValidator.getCompanyVerification().validate(
|
|
2469
|
+
const { error } = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2471
2470
|
{
|
|
2472
|
-
|
|
2473
|
-
pageNo,
|
|
2474
|
-
pageSize,
|
|
2471
|
+
uid,
|
|
2475
2472
|
},
|
|
2476
2473
|
{ abortEarly: false, allowUnknown: true }
|
|
2477
2474
|
);
|
|
@@ -2482,32 +2479,27 @@ class Catalog {
|
|
|
2482
2479
|
// Showing warrnings if extra unknown parameters are found
|
|
2483
2480
|
const {
|
|
2484
2481
|
error: warrning,
|
|
2485
|
-
} = CatalogPlatformValidator.
|
|
2482
|
+
} = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2486
2483
|
{
|
|
2487
|
-
|
|
2488
|
-
pageNo,
|
|
2489
|
-
pageSize,
|
|
2484
|
+
uid,
|
|
2490
2485
|
},
|
|
2491
2486
|
{ abortEarly: false, allowUnknown: false }
|
|
2492
2487
|
);
|
|
2493
2488
|
if (warrning) {
|
|
2494
2489
|
Logger({
|
|
2495
2490
|
level: "WARN",
|
|
2496
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2491
|
+
message: `Parameter Validation warrnings for platform > Catalog > getDepartmentData \n ${warrning}`,
|
|
2497
2492
|
});
|
|
2498
2493
|
}
|
|
2499
2494
|
|
|
2500
2495
|
const query_params = {};
|
|
2501
|
-
query_params["q"] = q;
|
|
2502
|
-
query_params["page_no"] = pageNo;
|
|
2503
|
-
query_params["page_size"] = pageSize;
|
|
2504
2496
|
|
|
2505
2497
|
const xHeaders = {};
|
|
2506
2498
|
|
|
2507
2499
|
const response = await PlatformAPIClient.execute(
|
|
2508
2500
|
this.config,
|
|
2509
2501
|
"get",
|
|
2510
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2502
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
|
|
2511
2503
|
query_params,
|
|
2512
2504
|
undefined,
|
|
2513
2505
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2521,7 +2513,7 @@ class Catalog {
|
|
|
2521
2513
|
|
|
2522
2514
|
const {
|
|
2523
2515
|
error: res_error,
|
|
2524
|
-
} = CatalogPlatformModel.
|
|
2516
|
+
} = CatalogPlatformModel.DepartmentsResponseSchema().validate(
|
|
2525
2517
|
responseData,
|
|
2526
2518
|
{ abortEarly: false, allowUnknown: true }
|
|
2527
2519
|
);
|
|
@@ -2532,7 +2524,7 @@ class Catalog {
|
|
|
2532
2524
|
} else {
|
|
2533
2525
|
Logger({
|
|
2534
2526
|
level: "WARN",
|
|
2535
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2527
|
+
message: `Response Validation Warnings for platform > Catalog > getDepartmentData \n ${res_error}`,
|
|
2536
2528
|
});
|
|
2537
2529
|
}
|
|
2538
2530
|
}
|
|
@@ -2541,177 +2533,19 @@ class Catalog {
|
|
|
2541
2533
|
}
|
|
2542
2534
|
|
|
2543
2535
|
/**
|
|
2544
|
-
* @param {CatalogPlatformValidator.
|
|
2536
|
+
* @param {CatalogPlatformValidator.GetHsnCodeParam} arg - Arg object
|
|
2545
2537
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2546
2538
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2547
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2548
|
-
* @name
|
|
2549
|
-
* @summary:
|
|
2550
|
-
* @description: Retrieve
|
|
2539
|
+
* @returns {Promise<CatalogPlatformModel.HsnCode>} - Success response
|
|
2540
|
+
* @name getHsnCode
|
|
2541
|
+
* @summary: List HSN code
|
|
2542
|
+
* @description: Retrieve the HSN code for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getHsnCode/).
|
|
2551
2543
|
*/
|
|
2552
|
-
async
|
|
2553
|
-
{
|
|
2544
|
+
async getHsnCode(
|
|
2545
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
2554
2546
|
{ responseHeaders } = { responseHeaders: false }
|
|
2555
2547
|
) {
|
|
2556
|
-
const { error } = CatalogPlatformValidator.
|
|
2557
|
-
{
|
|
2558
|
-
uid,
|
|
2559
|
-
},
|
|
2560
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2561
|
-
);
|
|
2562
|
-
if (error) {
|
|
2563
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2567
|
-
const {
|
|
2568
|
-
error: warrning,
|
|
2569
|
-
} = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2570
|
-
{
|
|
2571
|
-
uid,
|
|
2572
|
-
},
|
|
2573
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2574
|
-
);
|
|
2575
|
-
if (warrning) {
|
|
2576
|
-
Logger({
|
|
2577
|
-
level: "WARN",
|
|
2578
|
-
message: `Parameter Validation warrnings for platform > Catalog > getDepartmentData \n ${warrning}`,
|
|
2579
|
-
});
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
const query_params = {};
|
|
2583
|
-
|
|
2584
|
-
const xHeaders = {};
|
|
2585
|
-
|
|
2586
|
-
const response = await PlatformAPIClient.execute(
|
|
2587
|
-
this.config,
|
|
2588
|
-
"get",
|
|
2589
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}`,
|
|
2590
|
-
query_params,
|
|
2591
|
-
undefined,
|
|
2592
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2593
|
-
{ responseHeaders }
|
|
2594
|
-
);
|
|
2595
|
-
|
|
2596
|
-
let responseData = response;
|
|
2597
|
-
if (responseHeaders) {
|
|
2598
|
-
responseData = response[0];
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
const {
|
|
2602
|
-
error: res_error,
|
|
2603
|
-
} = CatalogPlatformModel.DepartmentsResponse().validate(responseData, {
|
|
2604
|
-
abortEarly: false,
|
|
2605
|
-
allowUnknown: true,
|
|
2606
|
-
});
|
|
2607
|
-
|
|
2608
|
-
if (res_error) {
|
|
2609
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2610
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2611
|
-
} else {
|
|
2612
|
-
Logger({
|
|
2613
|
-
level: "WARN",
|
|
2614
|
-
message: `Response Validation Warnings for platform > Catalog > getDepartmentData \n ${res_error}`,
|
|
2615
|
-
});
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
return response;
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
/**
|
|
2623
|
-
* @param {CatalogPlatformValidator.GetGenderAttributeParam} arg - Arg object
|
|
2624
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2625
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2626
|
-
* @returns {Promise<CatalogPlatformModel.GenderDetail>} - Success response
|
|
2627
|
-
* @name getGenderAttribute
|
|
2628
|
-
* @summary: Get gender attribute.
|
|
2629
|
-
* @description: Retrieve the gender attribute for catalog listings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getGenderAttribute/).
|
|
2630
|
-
*/
|
|
2631
|
-
async getGenderAttribute(
|
|
2632
|
-
{ attributeSlug, requestHeaders } = { requestHeaders: {} },
|
|
2633
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2634
|
-
) {
|
|
2635
|
-
const { error } = CatalogPlatformValidator.getGenderAttribute().validate(
|
|
2636
|
-
{
|
|
2637
|
-
attributeSlug,
|
|
2638
|
-
},
|
|
2639
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2640
|
-
);
|
|
2641
|
-
if (error) {
|
|
2642
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2643
|
-
}
|
|
2644
|
-
|
|
2645
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2646
|
-
const {
|
|
2647
|
-
error: warrning,
|
|
2648
|
-
} = CatalogPlatformValidator.getGenderAttribute().validate(
|
|
2649
|
-
{
|
|
2650
|
-
attributeSlug,
|
|
2651
|
-
},
|
|
2652
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2653
|
-
);
|
|
2654
|
-
if (warrning) {
|
|
2655
|
-
Logger({
|
|
2656
|
-
level: "WARN",
|
|
2657
|
-
message: `Parameter Validation warrnings for platform > Catalog > getGenderAttribute \n ${warrning}`,
|
|
2658
|
-
});
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
|
-
const query_params = {};
|
|
2662
|
-
|
|
2663
|
-
const xHeaders = {};
|
|
2664
|
-
|
|
2665
|
-
const response = await PlatformAPIClient.execute(
|
|
2666
|
-
this.config,
|
|
2667
|
-
"get",
|
|
2668
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes/${attributeSlug}`,
|
|
2669
|
-
query_params,
|
|
2670
|
-
undefined,
|
|
2671
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2672
|
-
{ responseHeaders }
|
|
2673
|
-
);
|
|
2674
|
-
|
|
2675
|
-
let responseData = response;
|
|
2676
|
-
if (responseHeaders) {
|
|
2677
|
-
responseData = response[0];
|
|
2678
|
-
}
|
|
2679
|
-
|
|
2680
|
-
const {
|
|
2681
|
-
error: res_error,
|
|
2682
|
-
} = CatalogPlatformModel.GenderDetail().validate(responseData, {
|
|
2683
|
-
abortEarly: false,
|
|
2684
|
-
allowUnknown: true,
|
|
2685
|
-
});
|
|
2686
|
-
|
|
2687
|
-
if (res_error) {
|
|
2688
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2689
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2690
|
-
} else {
|
|
2691
|
-
Logger({
|
|
2692
|
-
level: "WARN",
|
|
2693
|
-
message: `Response Validation Warnings for platform > Catalog > getGenderAttribute \n ${res_error}`,
|
|
2694
|
-
});
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
return response;
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
/**
|
|
2702
|
-
* @param {CatalogPlatformValidator.GetHsnCodeParam} arg - Arg object
|
|
2703
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2704
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2705
|
-
* @returns {Promise<CatalogPlatformModel.HsnCode>} - Success response
|
|
2706
|
-
* @name getHsnCode
|
|
2707
|
-
* @summary: Get HSN code.
|
|
2708
|
-
* @description: Retrieve the HSN code for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getHsnCode/).
|
|
2709
|
-
*/
|
|
2710
|
-
async getHsnCode(
|
|
2711
|
-
{ id, requestHeaders } = { requestHeaders: {} },
|
|
2712
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2713
|
-
) {
|
|
2714
|
-
const { error } = CatalogPlatformValidator.getHsnCode().validate(
|
|
2548
|
+
const { error } = CatalogPlatformValidator.getHsnCode().validate(
|
|
2715
2549
|
{
|
|
2716
2550
|
id,
|
|
2717
2551
|
},
|
|
@@ -2742,7 +2576,7 @@ class Catalog {
|
|
|
2742
2576
|
const response = await PlatformAPIClient.execute(
|
|
2743
2577
|
this.config,
|
|
2744
2578
|
"get",
|
|
2745
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}
|
|
2579
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
|
|
2746
2580
|
query_params,
|
|
2747
2581
|
undefined,
|
|
2748
2582
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2779,10 +2613,11 @@ class Catalog {
|
|
|
2779
2613
|
* @param {CatalogPlatformValidator.GetInventoriesParam} arg - Arg object
|
|
2780
2614
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2781
2615
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2782
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2616
|
+
* @returns {Promise<CatalogPlatformModel.GetInventoriesResponseSchema>} -
|
|
2617
|
+
* Success response
|
|
2783
2618
|
* @name getInventories
|
|
2784
|
-
* @summary:
|
|
2785
|
-
* @description: Allows to get Inventories data for particular company.
|
|
2619
|
+
* @summary: List Inventory
|
|
2620
|
+
* @description: Allows to get Inventories data for particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventories/).
|
|
2786
2621
|
*/
|
|
2787
2622
|
async getInventories(
|
|
2788
2623
|
{
|
|
@@ -2797,8 +2632,9 @@ class Catalog {
|
|
|
2797
2632
|
storeIds,
|
|
2798
2633
|
brandIds,
|
|
2799
2634
|
sellerIdentifiers,
|
|
2800
|
-
|
|
2801
|
-
|
|
2635
|
+
qtyGt,
|
|
2636
|
+
qtyLt,
|
|
2637
|
+
qtyType,
|
|
2802
2638
|
fromDate,
|
|
2803
2639
|
toDate,
|
|
2804
2640
|
sizeIdentifier,
|
|
@@ -2819,8 +2655,9 @@ class Catalog {
|
|
|
2819
2655
|
storeIds,
|
|
2820
2656
|
brandIds,
|
|
2821
2657
|
sellerIdentifiers,
|
|
2822
|
-
|
|
2823
|
-
|
|
2658
|
+
qtyGt,
|
|
2659
|
+
qtyLt,
|
|
2660
|
+
qtyType,
|
|
2824
2661
|
fromDate,
|
|
2825
2662
|
toDate,
|
|
2826
2663
|
sizeIdentifier,
|
|
@@ -2847,8 +2684,9 @@ class Catalog {
|
|
|
2847
2684
|
storeIds,
|
|
2848
2685
|
brandIds,
|
|
2849
2686
|
sellerIdentifiers,
|
|
2850
|
-
|
|
2851
|
-
|
|
2687
|
+
qtyGt,
|
|
2688
|
+
qtyLt,
|
|
2689
|
+
qtyType,
|
|
2852
2690
|
fromDate,
|
|
2853
2691
|
toDate,
|
|
2854
2692
|
sizeIdentifier,
|
|
@@ -2874,8 +2712,9 @@ class Catalog {
|
|
|
2874
2712
|
query_params["store_ids"] = storeIds;
|
|
2875
2713
|
query_params["brand_ids"] = brandIds;
|
|
2876
2714
|
query_params["seller_identifiers"] = sellerIdentifiers;
|
|
2877
|
-
query_params["
|
|
2878
|
-
query_params["
|
|
2715
|
+
query_params["qty_gt"] = qtyGt;
|
|
2716
|
+
query_params["qty_lt"] = qtyLt;
|
|
2717
|
+
query_params["qty_type"] = qtyType;
|
|
2879
2718
|
query_params["from_date"] = fromDate;
|
|
2880
2719
|
query_params["to_date"] = toDate;
|
|
2881
2720
|
query_params["size_identifier"] = sizeIdentifier;
|
|
@@ -2899,10 +2738,10 @@ class Catalog {
|
|
|
2899
2738
|
|
|
2900
2739
|
const {
|
|
2901
2740
|
error: res_error,
|
|
2902
|
-
} = CatalogPlatformModel.
|
|
2903
|
-
|
|
2904
|
-
allowUnknown: true
|
|
2905
|
-
|
|
2741
|
+
} = CatalogPlatformModel.GetInventoriesResponseSchema().validate(
|
|
2742
|
+
responseData,
|
|
2743
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2744
|
+
);
|
|
2906
2745
|
|
|
2907
2746
|
if (res_error) {
|
|
2908
2747
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2918,6 +2757,87 @@ class Catalog {
|
|
|
2918
2757
|
return response;
|
|
2919
2758
|
}
|
|
2920
2759
|
|
|
2760
|
+
/**
|
|
2761
|
+
* @param {Object} arg - Arg object.
|
|
2762
|
+
* @param {string} [arg.itemId] - Item code of the product of which size is to be get.
|
|
2763
|
+
* @param {string} [arg.size] - Size of which inventory is to get.
|
|
2764
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
2765
|
+
* page. Default is 12.
|
|
2766
|
+
* @param {string} [arg.q] - Search with help of store code.
|
|
2767
|
+
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
2768
|
+
* @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
|
|
2769
|
+
* @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
|
|
2770
|
+
* @param {string[]} [arg.sellerIdentifiers] - The Seller Identifier or
|
|
2771
|
+
* Primary Identifier of the inventory.
|
|
2772
|
+
* @param {number} [arg.qtyGt] - This field allows you to filter for
|
|
2773
|
+
* inventories that have quantity greater than to the specified value
|
|
2774
|
+
* based on qty_type filter.
|
|
2775
|
+
* @param {number} [arg.qtyLt] - This field allows you to filter for
|
|
2776
|
+
* inventories that have a quantity less than to the specified value based
|
|
2777
|
+
* on qty_type filter.
|
|
2778
|
+
* @param {string} [arg.qtyType] - This field provides flexibility in
|
|
2779
|
+
* selecting filter for inventory quantity counts and date queries. For
|
|
2780
|
+
* example, you might use this field to specify "total" or "sellable" quantity.
|
|
2781
|
+
* @param {string} [arg.fromDate] - Inventory updated on filter to get
|
|
2782
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
2783
|
+
* @param {string} [arg.toDate] - Inventory updated on filter to get
|
|
2784
|
+
* inventories less then or equal to provided date based on qty_type value.
|
|
2785
|
+
* @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
|
|
2786
|
+
* or Primary Identifier) of which inventory is to get.
|
|
2787
|
+
* @returns {Paginator<CatalogPlatformModel.GetInventoriesResponseSchema>}
|
|
2788
|
+
* @summary: List Inventory
|
|
2789
|
+
* @description: Allows to get Inventories data for particular company.
|
|
2790
|
+
*/
|
|
2791
|
+
getInventoriesPaginator({
|
|
2792
|
+
itemId,
|
|
2793
|
+
size,
|
|
2794
|
+
pageSize,
|
|
2795
|
+
q,
|
|
2796
|
+
sellable,
|
|
2797
|
+
storeIds,
|
|
2798
|
+
brandIds,
|
|
2799
|
+
sellerIdentifiers,
|
|
2800
|
+
qtyGt,
|
|
2801
|
+
qtyLt,
|
|
2802
|
+
qtyType,
|
|
2803
|
+
fromDate,
|
|
2804
|
+
toDate,
|
|
2805
|
+
sizeIdentifier,
|
|
2806
|
+
} = {}) {
|
|
2807
|
+
const paginator = new Paginator();
|
|
2808
|
+
const callback = async () => {
|
|
2809
|
+
const pageId = paginator.nextId;
|
|
2810
|
+
const pageNo = paginator.pageNo;
|
|
2811
|
+
const pageType = "cursor";
|
|
2812
|
+
const data = await this.getInventories({
|
|
2813
|
+
itemId: itemId,
|
|
2814
|
+
size: size,
|
|
2815
|
+
pageNo: pageNo,
|
|
2816
|
+
pageSize: pageSize,
|
|
2817
|
+
pageId: pageId,
|
|
2818
|
+
pageType: pageType,
|
|
2819
|
+
q: q,
|
|
2820
|
+
sellable: sellable,
|
|
2821
|
+
storeIds: storeIds,
|
|
2822
|
+
brandIds: brandIds,
|
|
2823
|
+
sellerIdentifiers: sellerIdentifiers,
|
|
2824
|
+
qtyGt: qtyGt,
|
|
2825
|
+
qtyLt: qtyLt,
|
|
2826
|
+
qtyType: qtyType,
|
|
2827
|
+
fromDate: fromDate,
|
|
2828
|
+
toDate: toDate,
|
|
2829
|
+
sizeIdentifier: sizeIdentifier,
|
|
2830
|
+
});
|
|
2831
|
+
paginator.setPaginator({
|
|
2832
|
+
hasNext: data.page.has_next ? true : false,
|
|
2833
|
+
nextId: data.page.next_id,
|
|
2834
|
+
});
|
|
2835
|
+
return data;
|
|
2836
|
+
};
|
|
2837
|
+
paginator.setCallback(callback.bind(this));
|
|
2838
|
+
return paginator;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2921
2841
|
/**
|
|
2922
2842
|
* @param {CatalogPlatformValidator.GetInventoryBulkUploadHistoryParam} arg
|
|
2923
2843
|
* - Arg object
|
|
@@ -2926,11 +2846,11 @@ class Catalog {
|
|
|
2926
2846
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2927
2847
|
* @returns {Promise<CatalogPlatformModel.BulkInventoryGet>} - Success response
|
|
2928
2848
|
* @name getInventoryBulkUploadHistory
|
|
2929
|
-
* @summary:
|
|
2930
|
-
* @description: Helps to get bulk Inventory upload jobs
|
|
2849
|
+
* @summary: List bulk inventory upload history
|
|
2850
|
+
* @description: Helps to get bulk Inventory upload jobs status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBulkUploadHistory/).
|
|
2931
2851
|
*/
|
|
2932
2852
|
async getInventoryBulkUploadHistory(
|
|
2933
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2853
|
+
{ pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
|
|
2934
2854
|
{ responseHeaders } = { responseHeaders: false }
|
|
2935
2855
|
) {
|
|
2936
2856
|
const {
|
|
@@ -2939,6 +2859,7 @@ class Catalog {
|
|
|
2939
2859
|
{
|
|
2940
2860
|
pageNo,
|
|
2941
2861
|
pageSize,
|
|
2862
|
+
search,
|
|
2942
2863
|
},
|
|
2943
2864
|
{ abortEarly: false, allowUnknown: true }
|
|
2944
2865
|
);
|
|
@@ -2953,6 +2874,7 @@ class Catalog {
|
|
|
2953
2874
|
{
|
|
2954
2875
|
pageNo,
|
|
2955
2876
|
pageSize,
|
|
2877
|
+
search,
|
|
2956
2878
|
},
|
|
2957
2879
|
{ abortEarly: false, allowUnknown: false }
|
|
2958
2880
|
);
|
|
@@ -2966,13 +2888,14 @@ class Catalog {
|
|
|
2966
2888
|
const query_params = {};
|
|
2967
2889
|
query_params["page_no"] = pageNo;
|
|
2968
2890
|
query_params["page_size"] = pageSize;
|
|
2891
|
+
query_params["search"] = search;
|
|
2969
2892
|
|
|
2970
2893
|
const xHeaders = {};
|
|
2971
2894
|
|
|
2972
2895
|
const response = await PlatformAPIClient.execute(
|
|
2973
2896
|
this.config,
|
|
2974
2897
|
"get",
|
|
2975
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk
|
|
2898
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
|
|
2976
2899
|
query_params,
|
|
2977
2900
|
undefined,
|
|
2978
2901
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3005,6 +2928,36 @@ class Catalog {
|
|
|
3005
2928
|
return response;
|
|
3006
2929
|
}
|
|
3007
2930
|
|
|
2931
|
+
/**
|
|
2932
|
+
* @param {Object} arg - Arg object.
|
|
2933
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
2934
|
+
* page. Default is 12.
|
|
2935
|
+
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
2936
|
+
* @returns {Paginator<CatalogPlatformModel.BulkInventoryGet>}
|
|
2937
|
+
* @summary: List bulk inventory upload history
|
|
2938
|
+
* @description: Helps to get bulk Inventory upload jobs status.
|
|
2939
|
+
*/
|
|
2940
|
+
getInventoryBulkUploadHistoryPaginator({ pageSize, search } = {}) {
|
|
2941
|
+
const paginator = new Paginator();
|
|
2942
|
+
const callback = async () => {
|
|
2943
|
+
const pageId = paginator.nextId;
|
|
2944
|
+
const pageNo = paginator.pageNo;
|
|
2945
|
+
const pageType = "number";
|
|
2946
|
+
const data = await this.getInventoryBulkUploadHistory({
|
|
2947
|
+
pageNo: pageNo,
|
|
2948
|
+
pageSize: pageSize,
|
|
2949
|
+
search: search,
|
|
2950
|
+
});
|
|
2951
|
+
paginator.setPaginator({
|
|
2952
|
+
hasNext: data.page.has_next ? true : false,
|
|
2953
|
+
nextId: data.page.next_id,
|
|
2954
|
+
});
|
|
2955
|
+
return data;
|
|
2956
|
+
};
|
|
2957
|
+
paginator.setCallback(callback.bind(this));
|
|
2958
|
+
return paginator;
|
|
2959
|
+
}
|
|
2960
|
+
|
|
3008
2961
|
/**
|
|
3009
2962
|
* @param {CatalogPlatformValidator.GetInventoryBySizeParam} arg - Arg object
|
|
3010
2963
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3012,8 +2965,8 @@ class Catalog {
|
|
|
3012
2965
|
* @returns {Promise<CatalogPlatformModel.InventoryResponsePaginated>} -
|
|
3013
2966
|
* Success response
|
|
3014
2967
|
* @name getInventoryBySize
|
|
3015
|
-
* @summary:
|
|
3016
|
-
* @description:
|
|
2968
|
+
* @summary: List inventory by size
|
|
2969
|
+
* @description: Retrieve inventory data for a specific company, item ID, and size. The API supports search capabilities based on selling location (store) code and product availability (in stock or not)." - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBySize/).
|
|
3017
2970
|
*/
|
|
3018
2971
|
async getInventoryBySize(
|
|
3019
2972
|
{ itemId, size, pageNo, pageSize, q, sellable, requestHeaders } = {
|
|
@@ -3101,6 +3054,42 @@ class Catalog {
|
|
|
3101
3054
|
return response;
|
|
3102
3055
|
}
|
|
3103
3056
|
|
|
3057
|
+
/**
|
|
3058
|
+
* @param {Object} arg - Arg object.
|
|
3059
|
+
* @param {number} arg.itemId - Item code of the product of which size is to be get.
|
|
3060
|
+
* @param {string} arg.size - Size of which inventory is to get.
|
|
3061
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3062
|
+
* page. Default is 12.
|
|
3063
|
+
* @param {string} [arg.q] - Search with help of store code.
|
|
3064
|
+
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
3065
|
+
* @returns {Paginator<CatalogPlatformModel.InventoryResponsePaginated>}
|
|
3066
|
+
* @summary: List inventory by size
|
|
3067
|
+
* @description: Retrieve inventory data for a specific company, item ID, and size. The API supports search capabilities based on selling location (store) code and product availability (in stock or not)."
|
|
3068
|
+
*/
|
|
3069
|
+
getInventoryBySizePaginator({ itemId, size, pageSize, q, sellable } = {}) {
|
|
3070
|
+
const paginator = new Paginator();
|
|
3071
|
+
const callback = async () => {
|
|
3072
|
+
const pageId = paginator.nextId;
|
|
3073
|
+
const pageNo = paginator.pageNo;
|
|
3074
|
+
const pageType = "number";
|
|
3075
|
+
const data = await this.getInventoryBySize({
|
|
3076
|
+
itemId: itemId,
|
|
3077
|
+
size: size,
|
|
3078
|
+
pageNo: pageNo,
|
|
3079
|
+
pageSize: pageSize,
|
|
3080
|
+
q: q,
|
|
3081
|
+
sellable: sellable,
|
|
3082
|
+
});
|
|
3083
|
+
paginator.setPaginator({
|
|
3084
|
+
hasNext: data.page.has_next ? true : false,
|
|
3085
|
+
nextId: data.page.next_id,
|
|
3086
|
+
});
|
|
3087
|
+
return data;
|
|
3088
|
+
};
|
|
3089
|
+
paginator.setCallback(callback.bind(this));
|
|
3090
|
+
return paginator;
|
|
3091
|
+
}
|
|
3092
|
+
|
|
3104
3093
|
/**
|
|
3105
3094
|
* @param {CatalogPlatformValidator.GetInventoryBySizeIdentifierParam} arg
|
|
3106
3095
|
* - Arg object
|
|
@@ -3111,8 +3100,8 @@ class Catalog {
|
|
|
3111
3100
|
* - Success response
|
|
3112
3101
|
*
|
|
3113
3102
|
* @name getInventoryBySizeIdentifier
|
|
3114
|
-
* @summary:
|
|
3115
|
-
* @description:
|
|
3103
|
+
* @summary: List inventory by size
|
|
3104
|
+
* @description: Retrieve inventory data for a specific company, item ID, and seller identifier. The API supports search capabilities using store codes and location IDs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBySizeIdentifier/).
|
|
3116
3105
|
*/
|
|
3117
3106
|
async getInventoryBySizeIdentifier(
|
|
3118
3107
|
{
|
|
@@ -3208,15 +3197,57 @@ class Catalog {
|
|
|
3208
3197
|
return response;
|
|
3209
3198
|
}
|
|
3210
3199
|
|
|
3200
|
+
/**
|
|
3201
|
+
* @param {Object} arg - Arg object.
|
|
3202
|
+
* @param {number} arg.itemId - Item code of the product of which size is to be get.
|
|
3203
|
+
* @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
|
|
3204
|
+
* or Primary Identifier) of which inventory is to get.
|
|
3205
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3206
|
+
* page. Default is 12.
|
|
3207
|
+
* @param {string} [arg.q] - Search with help of store code.
|
|
3208
|
+
* @param {number[]} [arg.locationIds] - Search by store ids.
|
|
3209
|
+
* @returns {Paginator<CatalogPlatformModel.InventorySellerIdentifierResponsePaginated>}
|
|
3210
|
+
* @summary: List inventory by size
|
|
3211
|
+
* @description: Retrieve inventory data for a specific company, item ID, and seller identifier. The API supports search capabilities using store codes and location IDs.
|
|
3212
|
+
*/
|
|
3213
|
+
getInventoryBySizeIdentifierPaginator({
|
|
3214
|
+
itemId,
|
|
3215
|
+
sizeIdentifier,
|
|
3216
|
+
pageSize,
|
|
3217
|
+
q,
|
|
3218
|
+
locationIds,
|
|
3219
|
+
} = {}) {
|
|
3220
|
+
const paginator = new Paginator();
|
|
3221
|
+
const callback = async () => {
|
|
3222
|
+
const pageId = paginator.nextId;
|
|
3223
|
+
const pageNo = paginator.pageNo;
|
|
3224
|
+
const pageType = "number";
|
|
3225
|
+
const data = await this.getInventoryBySizeIdentifier({
|
|
3226
|
+
itemId: itemId,
|
|
3227
|
+
sizeIdentifier: sizeIdentifier,
|
|
3228
|
+
pageNo: pageNo,
|
|
3229
|
+
pageSize: pageSize,
|
|
3230
|
+
q: q,
|
|
3231
|
+
locationIds: locationIds,
|
|
3232
|
+
});
|
|
3233
|
+
paginator.setPaginator({
|
|
3234
|
+
hasNext: data.page.has_next ? true : false,
|
|
3235
|
+
nextId: data.page.next_id,
|
|
3236
|
+
});
|
|
3237
|
+
return data;
|
|
3238
|
+
};
|
|
3239
|
+
paginator.setCallback(callback.bind(this));
|
|
3240
|
+
return paginator;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3211
3243
|
/**
|
|
3212
3244
|
* @param {CatalogPlatformValidator.GetInventoryExportParam} arg - Arg object
|
|
3213
3245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3214
3246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3215
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3216
|
-
* Success response
|
|
3247
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportJob>} - Success response
|
|
3217
3248
|
* @name getInventoryExport
|
|
3218
|
-
* @summary:
|
|
3219
|
-
* @description:
|
|
3249
|
+
* @summary: list product inventory
|
|
3250
|
+
* @description: Retrieves inventory for all products for that particular company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryExport/).
|
|
3220
3251
|
*/
|
|
3221
3252
|
async getInventoryExport(
|
|
3222
3253
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -3251,7 +3282,7 @@ class Catalog {
|
|
|
3251
3282
|
const response = await PlatformAPIClient.execute(
|
|
3252
3283
|
this.config,
|
|
3253
3284
|
"get",
|
|
3254
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download
|
|
3285
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
|
|
3255
3286
|
query_params,
|
|
3256
3287
|
undefined,
|
|
3257
3288
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3265,10 +3296,10 @@ class Catalog {
|
|
|
3265
3296
|
|
|
3266
3297
|
const {
|
|
3267
3298
|
error: res_error,
|
|
3268
|
-
} = CatalogPlatformModel.
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
);
|
|
3299
|
+
} = CatalogPlatformModel.InventoryExportJob().validate(responseData, {
|
|
3300
|
+
abortEarly: false,
|
|
3301
|
+
allowUnknown: true,
|
|
3302
|
+
});
|
|
3272
3303
|
|
|
3273
3304
|
if (res_error) {
|
|
3274
3305
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3285,26 +3316,22 @@ class Catalog {
|
|
|
3285
3316
|
}
|
|
3286
3317
|
|
|
3287
3318
|
/**
|
|
3288
|
-
* @param {CatalogPlatformValidator.
|
|
3319
|
+
* @param {CatalogPlatformValidator.GetMarketplaceOptinDetailParam} arg - Arg object
|
|
3289
3320
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3290
3321
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3291
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3292
|
-
*
|
|
3293
|
-
*
|
|
3294
|
-
* @
|
|
3295
|
-
* @summary: Get Detail Product export detail.
|
|
3296
|
-
* @description: This API helps to get detail of Product export. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryExportDetail/).
|
|
3322
|
+
* @returns {Promise<CatalogPlatformModel.GetOptInPlatform>} - Success response
|
|
3323
|
+
* @name getMarketplaceOptinDetail
|
|
3324
|
+
* @summary: Get opt-in
|
|
3325
|
+
* @description: Allows to fetch opt-in information for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getMarketplaceOptinDetail/).
|
|
3297
3326
|
*/
|
|
3298
|
-
async
|
|
3299
|
-
{
|
|
3327
|
+
async getMarketplaceOptinDetail(
|
|
3328
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
3300
3329
|
{ responseHeaders } = { responseHeaders: false }
|
|
3301
3330
|
) {
|
|
3302
3331
|
const {
|
|
3303
3332
|
error,
|
|
3304
|
-
} = CatalogPlatformValidator.
|
|
3305
|
-
{
|
|
3306
|
-
jobId,
|
|
3307
|
-
},
|
|
3333
|
+
} = CatalogPlatformValidator.getMarketplaceOptinDetail().validate(
|
|
3334
|
+
{},
|
|
3308
3335
|
{ abortEarly: false, allowUnknown: true }
|
|
3309
3336
|
);
|
|
3310
3337
|
if (error) {
|
|
@@ -3314,16 +3341,14 @@ class Catalog {
|
|
|
3314
3341
|
// Showing warrnings if extra unknown parameters are found
|
|
3315
3342
|
const {
|
|
3316
3343
|
error: warrning,
|
|
3317
|
-
} = CatalogPlatformValidator.
|
|
3318
|
-
{
|
|
3319
|
-
jobId,
|
|
3320
|
-
},
|
|
3344
|
+
} = CatalogPlatformValidator.getMarketplaceOptinDetail().validate(
|
|
3345
|
+
{},
|
|
3321
3346
|
{ abortEarly: false, allowUnknown: false }
|
|
3322
3347
|
);
|
|
3323
3348
|
if (warrning) {
|
|
3324
3349
|
Logger({
|
|
3325
3350
|
level: "WARN",
|
|
3326
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3351
|
+
message: `Parameter Validation warrnings for platform > Catalog > getMarketplaceOptinDetail \n ${warrning}`,
|
|
3327
3352
|
});
|
|
3328
3353
|
}
|
|
3329
3354
|
|
|
@@ -3334,7 +3359,7 @@ class Catalog {
|
|
|
3334
3359
|
const response = await PlatformAPIClient.execute(
|
|
3335
3360
|
this.config,
|
|
3336
3361
|
"get",
|
|
3337
|
-
`/service/platform/catalog/
|
|
3362
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/`,
|
|
3338
3363
|
query_params,
|
|
3339
3364
|
undefined,
|
|
3340
3365
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3348,10 +3373,10 @@ class Catalog {
|
|
|
3348
3373
|
|
|
3349
3374
|
const {
|
|
3350
3375
|
error: res_error,
|
|
3351
|
-
} = CatalogPlatformModel.
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
);
|
|
3376
|
+
} = CatalogPlatformModel.GetOptInPlatform().validate(responseData, {
|
|
3377
|
+
abortEarly: false,
|
|
3378
|
+
allowUnknown: true,
|
|
3379
|
+
});
|
|
3355
3380
|
|
|
3356
3381
|
if (res_error) {
|
|
3357
3382
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3359,7 +3384,7 @@ class Catalog {
|
|
|
3359
3384
|
} else {
|
|
3360
3385
|
Logger({
|
|
3361
3386
|
level: "WARN",
|
|
3362
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3387
|
+
message: `Response Validation Warnings for platform > Catalog > getMarketplaceOptinDetail \n ${res_error}`,
|
|
3363
3388
|
});
|
|
3364
3389
|
}
|
|
3365
3390
|
}
|
|
@@ -3368,19 +3393,19 @@ class Catalog {
|
|
|
3368
3393
|
}
|
|
3369
3394
|
|
|
3370
3395
|
/**
|
|
3371
|
-
* @param {CatalogPlatformValidator.
|
|
3396
|
+
* @param {CatalogPlatformValidator.GetMarketplacesParam} arg - Arg object
|
|
3372
3397
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3373
3398
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3374
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3375
|
-
* @name
|
|
3376
|
-
* @summary:
|
|
3377
|
-
* @description:
|
|
3399
|
+
* @returns {Promise<CatalogPlatformModel.GetAllMarketplaces>} - Success response
|
|
3400
|
+
* @name getMarketplaces
|
|
3401
|
+
* @summary: List marketplaces
|
|
3402
|
+
* @description: Allows to get all marketplaces information for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getMarketplaces/).
|
|
3378
3403
|
*/
|
|
3379
|
-
async
|
|
3404
|
+
async getMarketplaces(
|
|
3380
3405
|
{ requestHeaders } = { requestHeaders: {} },
|
|
3381
3406
|
{ responseHeaders } = { responseHeaders: false }
|
|
3382
3407
|
) {
|
|
3383
|
-
const { error } = CatalogPlatformValidator.
|
|
3408
|
+
const { error } = CatalogPlatformValidator.getMarketplaces().validate(
|
|
3384
3409
|
{},
|
|
3385
3410
|
{ abortEarly: false, allowUnknown: true }
|
|
3386
3411
|
);
|
|
@@ -3391,14 +3416,14 @@ class Catalog {
|
|
|
3391
3416
|
// Showing warrnings if extra unknown parameters are found
|
|
3392
3417
|
const {
|
|
3393
3418
|
error: warrning,
|
|
3394
|
-
} = CatalogPlatformValidator.
|
|
3419
|
+
} = CatalogPlatformValidator.getMarketplaces().validate(
|
|
3395
3420
|
{},
|
|
3396
3421
|
{ abortEarly: false, allowUnknown: false }
|
|
3397
3422
|
);
|
|
3398
3423
|
if (warrning) {
|
|
3399
3424
|
Logger({
|
|
3400
3425
|
level: "WARN",
|
|
3401
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3426
|
+
message: `Parameter Validation warrnings for platform > Catalog > getMarketplaces \n ${warrning}`,
|
|
3402
3427
|
});
|
|
3403
3428
|
}
|
|
3404
3429
|
|
|
@@ -3409,7 +3434,7 @@ class Catalog {
|
|
|
3409
3434
|
const response = await PlatformAPIClient.execute(
|
|
3410
3435
|
this.config,
|
|
3411
3436
|
"get",
|
|
3412
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
3437
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel`,
|
|
3413
3438
|
query_params,
|
|
3414
3439
|
undefined,
|
|
3415
3440
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3423,7 +3448,7 @@ class Catalog {
|
|
|
3423
3448
|
|
|
3424
3449
|
const {
|
|
3425
3450
|
error: res_error,
|
|
3426
|
-
} = CatalogPlatformModel.
|
|
3451
|
+
} = CatalogPlatformModel.GetAllMarketplaces().validate(responseData, {
|
|
3427
3452
|
abortEarly: false,
|
|
3428
3453
|
allowUnknown: true,
|
|
3429
3454
|
});
|
|
@@ -3434,7 +3459,7 @@ class Catalog {
|
|
|
3434
3459
|
} else {
|
|
3435
3460
|
Logger({
|
|
3436
3461
|
level: "WARN",
|
|
3437
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3462
|
+
message: `Response Validation Warnings for platform > Catalog > getMarketplaces \n ${res_error}`,
|
|
3438
3463
|
});
|
|
3439
3464
|
}
|
|
3440
3465
|
}
|
|
@@ -3443,20 +3468,23 @@ class Catalog {
|
|
|
3443
3468
|
}
|
|
3444
3469
|
|
|
3445
3470
|
/**
|
|
3446
|
-
* @param {CatalogPlatformValidator.
|
|
3471
|
+
* @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
3447
3472
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3448
3473
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3449
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3450
|
-
*
|
|
3451
|
-
* @
|
|
3452
|
-
* @
|
|
3474
|
+
* @returns {Promise<CatalogPlatformModel.StoreAssignResponseSchema>} -
|
|
3475
|
+
* Success response
|
|
3476
|
+
* @name getOptimalLocations
|
|
3477
|
+
* @summary: Get optimal locations
|
|
3478
|
+
* @description: This API returns the optimal locations where inventory is available for the given articles. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getOptimalLocations/).
|
|
3453
3479
|
*/
|
|
3454
|
-
async
|
|
3455
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
3480
|
+
async getOptimalLocations(
|
|
3481
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3456
3482
|
{ responseHeaders } = { responseHeaders: false }
|
|
3457
3483
|
) {
|
|
3458
|
-
const { error } = CatalogPlatformValidator.
|
|
3459
|
-
{
|
|
3484
|
+
const { error } = CatalogPlatformValidator.getOptimalLocations().validate(
|
|
3485
|
+
{
|
|
3486
|
+
body,
|
|
3487
|
+
},
|
|
3460
3488
|
{ abortEarly: false, allowUnknown: true }
|
|
3461
3489
|
);
|
|
3462
3490
|
if (error) {
|
|
@@ -3466,14 +3494,16 @@ class Catalog {
|
|
|
3466
3494
|
// Showing warrnings if extra unknown parameters are found
|
|
3467
3495
|
const {
|
|
3468
3496
|
error: warrning,
|
|
3469
|
-
} = CatalogPlatformValidator.
|
|
3470
|
-
{
|
|
3497
|
+
} = CatalogPlatformValidator.getOptimalLocations().validate(
|
|
3498
|
+
{
|
|
3499
|
+
body,
|
|
3500
|
+
},
|
|
3471
3501
|
{ abortEarly: false, allowUnknown: false }
|
|
3472
3502
|
);
|
|
3473
3503
|
if (warrning) {
|
|
3474
3504
|
Logger({
|
|
3475
3505
|
level: "WARN",
|
|
3476
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3506
|
+
message: `Parameter Validation warrnings for platform > Catalog > getOptimalLocations \n ${warrning}`,
|
|
3477
3507
|
});
|
|
3478
3508
|
}
|
|
3479
3509
|
|
|
@@ -3483,10 +3513,10 @@ class Catalog {
|
|
|
3483
3513
|
|
|
3484
3514
|
const response = await PlatformAPIClient.execute(
|
|
3485
3515
|
this.config,
|
|
3486
|
-
"
|
|
3487
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
3516
|
+
"post",
|
|
3517
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/location/reassign/`,
|
|
3488
3518
|
query_params,
|
|
3489
|
-
|
|
3519
|
+
body,
|
|
3490
3520
|
{ ...xHeaders, ...requestHeaders },
|
|
3491
3521
|
{ responseHeaders }
|
|
3492
3522
|
);
|
|
@@ -3498,10 +3528,10 @@ class Catalog {
|
|
|
3498
3528
|
|
|
3499
3529
|
const {
|
|
3500
3530
|
error: res_error,
|
|
3501
|
-
} = CatalogPlatformModel.
|
|
3502
|
-
|
|
3503
|
-
allowUnknown: true
|
|
3504
|
-
|
|
3531
|
+
} = CatalogPlatformModel.StoreAssignResponseSchema().validate(
|
|
3532
|
+
responseData,
|
|
3533
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3534
|
+
);
|
|
3505
3535
|
|
|
3506
3536
|
if (res_error) {
|
|
3507
3537
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3509,7 +3539,7 @@ class Catalog {
|
|
|
3509
3539
|
} else {
|
|
3510
3540
|
Logger({
|
|
3511
3541
|
level: "WARN",
|
|
3512
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3542
|
+
message: `Response Validation Warnings for platform > Catalog > getOptimalLocations \n ${res_error}`,
|
|
3513
3543
|
});
|
|
3514
3544
|
}
|
|
3515
3545
|
}
|
|
@@ -3521,9 +3551,10 @@ class Catalog {
|
|
|
3521
3551
|
* @param {CatalogPlatformValidator.GetProductParam} arg - Arg object
|
|
3522
3552
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3523
3553
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3524
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3554
|
+
* @returns {Promise<CatalogPlatformModel.SingleProductResponseSchema>} -
|
|
3555
|
+
* Success response
|
|
3525
3556
|
* @name getProduct
|
|
3526
|
-
* @summary: Get product
|
|
3557
|
+
* @summary: Get a product
|
|
3527
3558
|
* @description: Retrieve data associated to a particular product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProduct/).
|
|
3528
3559
|
*/
|
|
3529
3560
|
async getProduct(
|
|
@@ -3567,7 +3598,7 @@ class Catalog {
|
|
|
3567
3598
|
const response = await PlatformAPIClient.execute(
|
|
3568
3599
|
this.config,
|
|
3569
3600
|
"get",
|
|
3570
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
3601
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
3571
3602
|
query_params,
|
|
3572
3603
|
undefined,
|
|
3573
3604
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3581,10 +3612,10 @@ class Catalog {
|
|
|
3581
3612
|
|
|
3582
3613
|
const {
|
|
3583
3614
|
error: res_error,
|
|
3584
|
-
} = CatalogPlatformModel.
|
|
3585
|
-
|
|
3586
|
-
allowUnknown: true
|
|
3587
|
-
|
|
3615
|
+
} = CatalogPlatformModel.SingleProductResponseSchema().validate(
|
|
3616
|
+
responseData,
|
|
3617
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3618
|
+
);
|
|
3588
3619
|
|
|
3589
3620
|
if (res_error) {
|
|
3590
3621
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3604,9 +3635,9 @@ class Catalog {
|
|
|
3604
3635
|
* @param {CatalogPlatformValidator.GetProductAssetsInBulkParam} arg - Arg object
|
|
3605
3636
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3606
3637
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3607
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3638
|
+
* @returns {Promise<CatalogPlatformModel.BulkAssetResponseSchema>} - Success response
|
|
3608
3639
|
* @name getProductAssetsInBulk
|
|
3609
|
-
* @summary:
|
|
3640
|
+
* @summary: Get product assets
|
|
3610
3641
|
* @description: Helps to retrieve bulk asset jobs data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAssetsInBulk/).
|
|
3611
3642
|
*/
|
|
3612
3643
|
async getProductAssetsInBulk(
|
|
@@ -3652,7 +3683,7 @@ class Catalog {
|
|
|
3652
3683
|
const response = await PlatformAPIClient.execute(
|
|
3653
3684
|
this.config,
|
|
3654
3685
|
"get",
|
|
3655
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk
|
|
3686
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk/`,
|
|
3656
3687
|
query_params,
|
|
3657
3688
|
undefined,
|
|
3658
3689
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3666,7 +3697,7 @@ class Catalog {
|
|
|
3666
3697
|
|
|
3667
3698
|
const {
|
|
3668
3699
|
error: res_error,
|
|
3669
|
-
} = CatalogPlatformModel.
|
|
3700
|
+
} = CatalogPlatformModel.BulkAssetResponseSchema().validate(responseData, {
|
|
3670
3701
|
abortEarly: false,
|
|
3671
3702
|
allowUnknown: true,
|
|
3672
3703
|
});
|
|
@@ -3685,15 +3716,44 @@ class Catalog {
|
|
|
3685
3716
|
return response;
|
|
3686
3717
|
}
|
|
3687
3718
|
|
|
3719
|
+
/**
|
|
3720
|
+
* @param {Object} arg - Arg object.
|
|
3721
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3722
|
+
* page. Default is 12.
|
|
3723
|
+
* @returns {Paginator<CatalogPlatformModel.BulkAssetResponseSchema>}
|
|
3724
|
+
* @summary: Get product assets
|
|
3725
|
+
* @description: Helps to retrieve bulk asset jobs data associated to a particular company.
|
|
3726
|
+
*/
|
|
3727
|
+
getProductAssetsInBulkPaginator({ pageSize } = {}) {
|
|
3728
|
+
const paginator = new Paginator();
|
|
3729
|
+
const callback = async () => {
|
|
3730
|
+
const pageId = paginator.nextId;
|
|
3731
|
+
const pageNo = paginator.pageNo;
|
|
3732
|
+
const pageType = "number";
|
|
3733
|
+
const data = await this.getProductAssetsInBulk({
|
|
3734
|
+
pageNo: pageNo,
|
|
3735
|
+
pageSize: pageSize,
|
|
3736
|
+
});
|
|
3737
|
+
paginator.setPaginator({
|
|
3738
|
+
hasNext: data.page.has_next ? true : false,
|
|
3739
|
+
nextId: data.page.next_id,
|
|
3740
|
+
});
|
|
3741
|
+
return data;
|
|
3742
|
+
};
|
|
3743
|
+
paginator.setCallback(callback.bind(this));
|
|
3744
|
+
return paginator;
|
|
3745
|
+
}
|
|
3746
|
+
|
|
3688
3747
|
/**
|
|
3689
3748
|
* @param {CatalogPlatformValidator.GetProductAttributesParam} arg - Arg object
|
|
3690
3749
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3691
3750
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3692
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3693
|
-
* Success response
|
|
3751
|
+
* @returns {Promise<CatalogPlatformModel.ProductAttributesResponseSchema>}
|
|
3752
|
+
* - Success response
|
|
3753
|
+
*
|
|
3694
3754
|
* @name getProductAttributes
|
|
3695
|
-
* @summary:
|
|
3696
|
-
* @description:
|
|
3755
|
+
* @summary: List product attributes
|
|
3756
|
+
* @description: Retrieve attributes attached to products based on their L3 category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAttributes/).
|
|
3697
3757
|
*/
|
|
3698
3758
|
async getProductAttributes(
|
|
3699
3759
|
{ category, filter, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3736,7 +3796,7 @@ class Catalog {
|
|
|
3736
3796
|
const response = await PlatformAPIClient.execute(
|
|
3737
3797
|
this.config,
|
|
3738
3798
|
"get",
|
|
3739
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes
|
|
3799
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes/`,
|
|
3740
3800
|
query_params,
|
|
3741
3801
|
undefined,
|
|
3742
3802
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3750,7 +3810,7 @@ class Catalog {
|
|
|
3750
3810
|
|
|
3751
3811
|
const {
|
|
3752
3812
|
error: res_error,
|
|
3753
|
-
} = CatalogPlatformModel.
|
|
3813
|
+
} = CatalogPlatformModel.ProductAttributesResponseSchema().validate(
|
|
3754
3814
|
responseData,
|
|
3755
3815
|
{ abortEarly: false, allowUnknown: true }
|
|
3756
3816
|
);
|
|
@@ -3775,7 +3835,7 @@ class Catalog {
|
|
|
3775
3835
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3776
3836
|
* @returns {Promise<CatalogPlatformModel.ProductBulkRequestList>} - Success response
|
|
3777
3837
|
* @name getProductBulkUploadHistory
|
|
3778
|
-
* @summary:
|
|
3838
|
+
* @summary: List product bulk upload history
|
|
3779
3839
|
* @description: Helps to get bulk product upload jobs data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBulkUploadHistory/).
|
|
3780
3840
|
*/
|
|
3781
3841
|
async getProductBulkUploadHistory(
|
|
@@ -3857,16 +3917,46 @@ class Catalog {
|
|
|
3857
3917
|
return response;
|
|
3858
3918
|
}
|
|
3859
3919
|
|
|
3920
|
+
/**
|
|
3921
|
+
* @param {Object} arg - Arg object.
|
|
3922
|
+
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
3923
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3924
|
+
* page. Default is 12.
|
|
3925
|
+
* @returns {Paginator<CatalogPlatformModel.ProductBulkRequestList>}
|
|
3926
|
+
* @summary: List product bulk upload history
|
|
3927
|
+
* @description: Helps to get bulk product upload jobs data.
|
|
3928
|
+
*/
|
|
3929
|
+
getProductBulkUploadHistoryPaginator({ search, pageSize } = {}) {
|
|
3930
|
+
const paginator = new Paginator();
|
|
3931
|
+
const callback = async () => {
|
|
3932
|
+
const pageId = paginator.nextId;
|
|
3933
|
+
const pageNo = paginator.pageNo;
|
|
3934
|
+
const pageType = "number";
|
|
3935
|
+
const data = await this.getProductBulkUploadHistory({
|
|
3936
|
+
search: search,
|
|
3937
|
+
pageNo: pageNo,
|
|
3938
|
+
pageSize: pageSize,
|
|
3939
|
+
});
|
|
3940
|
+
paginator.setPaginator({
|
|
3941
|
+
hasNext: data.page.has_next ? true : false,
|
|
3942
|
+
nextId: data.page.next_id,
|
|
3943
|
+
});
|
|
3944
|
+
return data;
|
|
3945
|
+
};
|
|
3946
|
+
paginator.setCallback(callback.bind(this));
|
|
3947
|
+
return paginator;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3860
3950
|
/**
|
|
3861
3951
|
* @param {CatalogPlatformValidator.GetProductBundleParam} arg - Arg object
|
|
3862
3952
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3863
3953
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3864
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3954
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleListingResponseSchema>}
|
|
3865
3955
|
* - Success response
|
|
3866
3956
|
*
|
|
3867
3957
|
* @name getProductBundle
|
|
3868
|
-
* @summary:
|
|
3869
|
-
* @description: Retrieve a list of product bundles available in the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundle/).
|
|
3958
|
+
* @summary: List product bundles
|
|
3959
|
+
* @description: Retrieve a list of product bundles available in the catalog associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundle/).
|
|
3870
3960
|
*/
|
|
3871
3961
|
async getProductBundle(
|
|
3872
3962
|
{ q, slug, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3915,7 +4005,7 @@ class Catalog {
|
|
|
3915
4005
|
const response = await PlatformAPIClient.execute(
|
|
3916
4006
|
this.config,
|
|
3917
4007
|
"get",
|
|
3918
|
-
`/service/platform/catalog/
|
|
4008
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
|
|
3919
4009
|
query_params,
|
|
3920
4010
|
undefined,
|
|
3921
4011
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3929,7 +4019,7 @@ class Catalog {
|
|
|
3929
4019
|
|
|
3930
4020
|
const {
|
|
3931
4021
|
error: res_error,
|
|
3932
|
-
} = CatalogPlatformModel.
|
|
4022
|
+
} = CatalogPlatformModel.GetProductBundleListingResponseSchema().validate(
|
|
3933
4023
|
responseData,
|
|
3934
4024
|
{ abortEarly: false, allowUnknown: true }
|
|
3935
4025
|
);
|
|
@@ -3952,11 +4042,12 @@ class Catalog {
|
|
|
3952
4042
|
* @param {CatalogPlatformValidator.GetProductBundleDetailParam} arg - Arg object
|
|
3953
4043
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3954
4044
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3955
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3956
|
-
* Success response
|
|
4045
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleResponseSchema>}
|
|
4046
|
+
* - Success response
|
|
4047
|
+
*
|
|
3957
4048
|
* @name getProductBundleDetail
|
|
3958
|
-
* @summary: Get product bundle
|
|
3959
|
-
* @description: Retrieve detailed information about a specific product bundle. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundleDetail/).
|
|
4049
|
+
* @summary: Get product bundle
|
|
4050
|
+
* @description: Retrieve detailed information about a specific product bundle associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundleDetail/).
|
|
3960
4051
|
*/
|
|
3961
4052
|
async getProductBundleDetail(
|
|
3962
4053
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3997,89 +4088,7 @@ class Catalog {
|
|
|
3997
4088
|
const response = await PlatformAPIClient.execute(
|
|
3998
4089
|
this.config,
|
|
3999
4090
|
"get",
|
|
4000
|
-
`/service/platform/catalog/
|
|
4001
|
-
query_params,
|
|
4002
|
-
undefined,
|
|
4003
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4004
|
-
{ responseHeaders }
|
|
4005
|
-
);
|
|
4006
|
-
|
|
4007
|
-
let responseData = response;
|
|
4008
|
-
if (responseHeaders) {
|
|
4009
|
-
responseData = response[0];
|
|
4010
|
-
}
|
|
4011
|
-
|
|
4012
|
-
const {
|
|
4013
|
-
error: res_error,
|
|
4014
|
-
} = CatalogPlatformModel.GetProductBundleResponse().validate(responseData, {
|
|
4015
|
-
abortEarly: false,
|
|
4016
|
-
allowUnknown: true,
|
|
4017
|
-
});
|
|
4018
|
-
|
|
4019
|
-
if (res_error) {
|
|
4020
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4021
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4022
|
-
} else {
|
|
4023
|
-
Logger({
|
|
4024
|
-
level: "WARN",
|
|
4025
|
-
message: `Response Validation Warnings for platform > Catalog > getProductBundleDetail \n ${res_error}`,
|
|
4026
|
-
});
|
|
4027
|
-
}
|
|
4028
|
-
}
|
|
4029
|
-
|
|
4030
|
-
return response;
|
|
4031
|
-
}
|
|
4032
|
-
|
|
4033
|
-
/**
|
|
4034
|
-
* @param {CatalogPlatformValidator.GetProductExportDetailParam} arg - Arg object
|
|
4035
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4036
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4037
|
-
* @returns {Promise<CatalogPlatformModel.GetProductDownloadsResponse>} -
|
|
4038
|
-
* Success response
|
|
4039
|
-
* @name getProductExportDetail
|
|
4040
|
-
* @summary: Get Detail Product export detail.
|
|
4041
|
-
* @description: This API helps to get detail of Product export. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportDetail/).
|
|
4042
|
-
*/
|
|
4043
|
-
async getProductExportDetail(
|
|
4044
|
-
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
4045
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4046
|
-
) {
|
|
4047
|
-
const {
|
|
4048
|
-
error,
|
|
4049
|
-
} = CatalogPlatformValidator.getProductExportDetail().validate(
|
|
4050
|
-
{
|
|
4051
|
-
jobId,
|
|
4052
|
-
},
|
|
4053
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4054
|
-
);
|
|
4055
|
-
if (error) {
|
|
4056
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4057
|
-
}
|
|
4058
|
-
|
|
4059
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4060
|
-
const {
|
|
4061
|
-
error: warrning,
|
|
4062
|
-
} = CatalogPlatformValidator.getProductExportDetail().validate(
|
|
4063
|
-
{
|
|
4064
|
-
jobId,
|
|
4065
|
-
},
|
|
4066
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4067
|
-
);
|
|
4068
|
-
if (warrning) {
|
|
4069
|
-
Logger({
|
|
4070
|
-
level: "WARN",
|
|
4071
|
-
message: `Parameter Validation warrnings for platform > Catalog > getProductExportDetail \n ${warrning}`,
|
|
4072
|
-
});
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4075
|
-
const query_params = {};
|
|
4076
|
-
|
|
4077
|
-
const xHeaders = {};
|
|
4078
|
-
|
|
4079
|
-
const response = await PlatformAPIClient.execute(
|
|
4080
|
-
this.config,
|
|
4081
|
-
"get",
|
|
4082
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads/${jobId}`,
|
|
4091
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
|
|
4083
4092
|
query_params,
|
|
4084
4093
|
undefined,
|
|
4085
4094
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4093,7 +4102,7 @@ class Catalog {
|
|
|
4093
4102
|
|
|
4094
4103
|
const {
|
|
4095
4104
|
error: res_error,
|
|
4096
|
-
} = CatalogPlatformModel.
|
|
4105
|
+
} = CatalogPlatformModel.GetProductBundleResponseSchema().validate(
|
|
4097
4106
|
responseData,
|
|
4098
4107
|
{ abortEarly: false, allowUnknown: true }
|
|
4099
4108
|
);
|
|
@@ -4104,184 +4113,7 @@ class Catalog {
|
|
|
4104
4113
|
} else {
|
|
4105
4114
|
Logger({
|
|
4106
4115
|
level: "WARN",
|
|
4107
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4108
|
-
});
|
|
4109
|
-
}
|
|
4110
|
-
}
|
|
4111
|
-
|
|
4112
|
-
return response;
|
|
4113
|
-
}
|
|
4114
|
-
|
|
4115
|
-
/**
|
|
4116
|
-
* @param {CatalogPlatformValidator.GetProductExportJobsParam} arg - Arg object
|
|
4117
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4118
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4119
|
-
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponse>} -
|
|
4120
|
-
* Success response
|
|
4121
|
-
* @name getProductExportJobs
|
|
4122
|
-
* @summary: Retrieve product export jobs.
|
|
4123
|
-
* @description: View details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportJobs/).
|
|
4124
|
-
*/
|
|
4125
|
-
async getProductExportJobs(
|
|
4126
|
-
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
4127
|
-
requestHeaders: {},
|
|
4128
|
-
},
|
|
4129
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4130
|
-
) {
|
|
4131
|
-
const { error } = CatalogPlatformValidator.getProductExportJobs().validate(
|
|
4132
|
-
{
|
|
4133
|
-
status,
|
|
4134
|
-
fromDate,
|
|
4135
|
-
toDate,
|
|
4136
|
-
q,
|
|
4137
|
-
pageNo,
|
|
4138
|
-
pageSize,
|
|
4139
|
-
},
|
|
4140
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4141
|
-
);
|
|
4142
|
-
if (error) {
|
|
4143
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4144
|
-
}
|
|
4145
|
-
|
|
4146
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4147
|
-
const {
|
|
4148
|
-
error: warrning,
|
|
4149
|
-
} = CatalogPlatformValidator.getProductExportJobs().validate(
|
|
4150
|
-
{
|
|
4151
|
-
status,
|
|
4152
|
-
fromDate,
|
|
4153
|
-
toDate,
|
|
4154
|
-
q,
|
|
4155
|
-
pageNo,
|
|
4156
|
-
pageSize,
|
|
4157
|
-
},
|
|
4158
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4159
|
-
);
|
|
4160
|
-
if (warrning) {
|
|
4161
|
-
Logger({
|
|
4162
|
-
level: "WARN",
|
|
4163
|
-
message: `Parameter Validation warrnings for platform > Catalog > getProductExportJobs \n ${warrning}`,
|
|
4164
|
-
});
|
|
4165
|
-
}
|
|
4166
|
-
|
|
4167
|
-
const query_params = {};
|
|
4168
|
-
query_params["status"] = status;
|
|
4169
|
-
query_params["from_date"] = fromDate;
|
|
4170
|
-
query_params["to_date"] = toDate;
|
|
4171
|
-
query_params["q"] = q;
|
|
4172
|
-
query_params["page_no"] = pageNo;
|
|
4173
|
-
query_params["page_size"] = pageSize;
|
|
4174
|
-
|
|
4175
|
-
const xHeaders = {};
|
|
4176
|
-
|
|
4177
|
-
const response = await PlatformAPIClient.execute(
|
|
4178
|
-
this.config,
|
|
4179
|
-
"get",
|
|
4180
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads`,
|
|
4181
|
-
query_params,
|
|
4182
|
-
undefined,
|
|
4183
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4184
|
-
{ responseHeaders }
|
|
4185
|
-
);
|
|
4186
|
-
|
|
4187
|
-
let responseData = response;
|
|
4188
|
-
if (responseHeaders) {
|
|
4189
|
-
responseData = response[0];
|
|
4190
|
-
}
|
|
4191
|
-
|
|
4192
|
-
const {
|
|
4193
|
-
error: res_error,
|
|
4194
|
-
} = CatalogPlatformModel.ProductDownloadsResponse().validate(responseData, {
|
|
4195
|
-
abortEarly: false,
|
|
4196
|
-
allowUnknown: true,
|
|
4197
|
-
});
|
|
4198
|
-
|
|
4199
|
-
if (res_error) {
|
|
4200
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4201
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4202
|
-
} else {
|
|
4203
|
-
Logger({
|
|
4204
|
-
level: "WARN",
|
|
4205
|
-
message: `Response Validation Warnings for platform > Catalog > getProductExportJobs \n ${res_error}`,
|
|
4206
|
-
});
|
|
4207
|
-
}
|
|
4208
|
-
}
|
|
4209
|
-
|
|
4210
|
-
return response;
|
|
4211
|
-
}
|
|
4212
|
-
|
|
4213
|
-
/**
|
|
4214
|
-
* @param {CatalogPlatformValidator.GetProductSizeParam} arg - Arg object
|
|
4215
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4216
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4217
|
-
* @returns {Promise<CatalogPlatformModel.Product>} - Success response
|
|
4218
|
-
* @name getProductSize
|
|
4219
|
-
* @summary: Get product size details.
|
|
4220
|
-
* @description: Retrieve data associated to a particular product size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductSize/).
|
|
4221
|
-
*/
|
|
4222
|
-
async getProductSize(
|
|
4223
|
-
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
4224
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4225
|
-
) {
|
|
4226
|
-
const { error } = CatalogPlatformValidator.getProductSize().validate(
|
|
4227
|
-
{
|
|
4228
|
-
itemId,
|
|
4229
|
-
},
|
|
4230
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4231
|
-
);
|
|
4232
|
-
if (error) {
|
|
4233
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4234
|
-
}
|
|
4235
|
-
|
|
4236
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4237
|
-
const {
|
|
4238
|
-
error: warrning,
|
|
4239
|
-
} = CatalogPlatformValidator.getProductSize().validate(
|
|
4240
|
-
{
|
|
4241
|
-
itemId,
|
|
4242
|
-
},
|
|
4243
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4244
|
-
);
|
|
4245
|
-
if (warrning) {
|
|
4246
|
-
Logger({
|
|
4247
|
-
level: "WARN",
|
|
4248
|
-
message: `Parameter Validation warrnings for platform > Catalog > getProductSize \n ${warrning}`,
|
|
4249
|
-
});
|
|
4250
|
-
}
|
|
4251
|
-
|
|
4252
|
-
const query_params = {};
|
|
4253
|
-
|
|
4254
|
-
const xHeaders = {};
|
|
4255
|
-
|
|
4256
|
-
const response = await PlatformAPIClient.execute(
|
|
4257
|
-
this.config,
|
|
4258
|
-
"get",
|
|
4259
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes`,
|
|
4260
|
-
query_params,
|
|
4261
|
-
undefined,
|
|
4262
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4263
|
-
{ responseHeaders }
|
|
4264
|
-
);
|
|
4265
|
-
|
|
4266
|
-
let responseData = response;
|
|
4267
|
-
if (responseHeaders) {
|
|
4268
|
-
responseData = response[0];
|
|
4269
|
-
}
|
|
4270
|
-
|
|
4271
|
-
const {
|
|
4272
|
-
error: res_error,
|
|
4273
|
-
} = CatalogPlatformModel.Product().validate(responseData, {
|
|
4274
|
-
abortEarly: false,
|
|
4275
|
-
allowUnknown: true,
|
|
4276
|
-
});
|
|
4277
|
-
|
|
4278
|
-
if (res_error) {
|
|
4279
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4280
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4281
|
-
} else {
|
|
4282
|
-
Logger({
|
|
4283
|
-
level: "WARN",
|
|
4284
|
-
message: `Response Validation Warnings for platform > Catalog > getProductSize \n ${res_error}`,
|
|
4116
|
+
message: `Response Validation Warnings for platform > Catalog > getProductBundleDetail \n ${res_error}`,
|
|
4285
4117
|
});
|
|
4286
4118
|
}
|
|
4287
4119
|
}
|
|
@@ -4290,20 +4122,31 @@ class Catalog {
|
|
|
4290
4122
|
}
|
|
4291
4123
|
|
|
4292
4124
|
/**
|
|
4293
|
-
* @param {CatalogPlatformValidator.
|
|
4125
|
+
* @param {CatalogPlatformValidator.GetProductExportJobsParam} arg - Arg object
|
|
4294
4126
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4295
4127
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4296
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4297
|
-
*
|
|
4298
|
-
*
|
|
4299
|
-
* @
|
|
4128
|
+
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponseSchema>}
|
|
4129
|
+
* - Success response
|
|
4130
|
+
*
|
|
4131
|
+
* @name getProductExportJobs
|
|
4132
|
+
* @summary: Get product export jobs
|
|
4133
|
+
* @description: Get product export jobs specific to a company based on queries like query param, date range and status. View details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportJobs/).
|
|
4300
4134
|
*/
|
|
4301
|
-
async
|
|
4302
|
-
{
|
|
4135
|
+
async getProductExportJobs(
|
|
4136
|
+
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
4137
|
+
requestHeaders: {},
|
|
4138
|
+
},
|
|
4303
4139
|
{ responseHeaders } = { responseHeaders: false }
|
|
4304
4140
|
) {
|
|
4305
|
-
const { error } = CatalogPlatformValidator.
|
|
4306
|
-
{
|
|
4141
|
+
const { error } = CatalogPlatformValidator.getProductExportJobs().validate(
|
|
4142
|
+
{
|
|
4143
|
+
status,
|
|
4144
|
+
fromDate,
|
|
4145
|
+
toDate,
|
|
4146
|
+
q,
|
|
4147
|
+
pageNo,
|
|
4148
|
+
pageSize,
|
|
4149
|
+
},
|
|
4307
4150
|
{ abortEarly: false, allowUnknown: true }
|
|
4308
4151
|
);
|
|
4309
4152
|
if (error) {
|
|
@@ -4313,25 +4156,38 @@ class Catalog {
|
|
|
4313
4156
|
// Showing warrnings if extra unknown parameters are found
|
|
4314
4157
|
const {
|
|
4315
4158
|
error: warrning,
|
|
4316
|
-
} = CatalogPlatformValidator.
|
|
4317
|
-
{
|
|
4159
|
+
} = CatalogPlatformValidator.getProductExportJobs().validate(
|
|
4160
|
+
{
|
|
4161
|
+
status,
|
|
4162
|
+
fromDate,
|
|
4163
|
+
toDate,
|
|
4164
|
+
q,
|
|
4165
|
+
pageNo,
|
|
4166
|
+
pageSize,
|
|
4167
|
+
},
|
|
4318
4168
|
{ abortEarly: false, allowUnknown: false }
|
|
4319
4169
|
);
|
|
4320
4170
|
if (warrning) {
|
|
4321
4171
|
Logger({
|
|
4322
4172
|
level: "WARN",
|
|
4323
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4173
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductExportJobs \n ${warrning}`,
|
|
4324
4174
|
});
|
|
4325
4175
|
}
|
|
4326
4176
|
|
|
4327
4177
|
const query_params = {};
|
|
4178
|
+
query_params["status"] = status;
|
|
4179
|
+
query_params["from_date"] = fromDate;
|
|
4180
|
+
query_params["to_date"] = toDate;
|
|
4181
|
+
query_params["q"] = q;
|
|
4182
|
+
query_params["page_no"] = pageNo;
|
|
4183
|
+
query_params["page_size"] = pageSize;
|
|
4328
4184
|
|
|
4329
4185
|
const xHeaders = {};
|
|
4330
4186
|
|
|
4331
4187
|
const response = await PlatformAPIClient.execute(
|
|
4332
4188
|
this.config,
|
|
4333
4189
|
"get",
|
|
4334
|
-
`/service/platform/catalog/
|
|
4190
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads/`,
|
|
4335
4191
|
query_params,
|
|
4336
4192
|
undefined,
|
|
4337
4193
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4345,10 +4201,10 @@ class Catalog {
|
|
|
4345
4201
|
|
|
4346
4202
|
const {
|
|
4347
4203
|
error: res_error,
|
|
4348
|
-
} = CatalogPlatformModel.
|
|
4349
|
-
|
|
4350
|
-
allowUnknown: true
|
|
4351
|
-
|
|
4204
|
+
} = CatalogPlatformModel.ProductDownloadsResponseSchema().validate(
|
|
4205
|
+
responseData,
|
|
4206
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4207
|
+
);
|
|
4352
4208
|
|
|
4353
4209
|
if (res_error) {
|
|
4354
4210
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4356,7 +4212,7 @@ class Catalog {
|
|
|
4356
4212
|
} else {
|
|
4357
4213
|
Logger({
|
|
4358
4214
|
level: "WARN",
|
|
4359
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4215
|
+
message: `Response Validation Warnings for platform > Catalog > getProductExportJobs \n ${res_error}`,
|
|
4360
4216
|
});
|
|
4361
4217
|
}
|
|
4362
4218
|
}
|
|
@@ -4365,25 +4221,27 @@ class Catalog {
|
|
|
4365
4221
|
}
|
|
4366
4222
|
|
|
4367
4223
|
/**
|
|
4368
|
-
* @param {CatalogPlatformValidator.
|
|
4224
|
+
* @param {CatalogPlatformValidator.GetProductSizeParam} arg - Arg object
|
|
4369
4225
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4370
4226
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4371
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4372
|
-
*
|
|
4373
|
-
*
|
|
4374
|
-
* @
|
|
4375
|
-
* @
|
|
4376
|
-
* @description: This API retrieves template for a given slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTemplateBySlug/).
|
|
4227
|
+
* @returns {Promise<CatalogPlatformModel.ProductListingResponseSchema>} -
|
|
4228
|
+
* Success response
|
|
4229
|
+
* @name getProductSize
|
|
4230
|
+
* @summary: List product size
|
|
4231
|
+
* @description: Retrieve data associated to a particular product size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductSize/).
|
|
4377
4232
|
*/
|
|
4378
|
-
async
|
|
4379
|
-
{
|
|
4233
|
+
async getProductSize(
|
|
4234
|
+
{ itemId, itemCode, brandUid, uid, requestHeaders } = {
|
|
4235
|
+
requestHeaders: {},
|
|
4236
|
+
},
|
|
4380
4237
|
{ responseHeaders } = { responseHeaders: false }
|
|
4381
4238
|
) {
|
|
4382
|
-
const {
|
|
4383
|
-
error,
|
|
4384
|
-
} = CatalogPlatformValidator.getProductTemplateBySlug().validate(
|
|
4239
|
+
const { error } = CatalogPlatformValidator.getProductSize().validate(
|
|
4385
4240
|
{
|
|
4386
|
-
|
|
4241
|
+
itemId,
|
|
4242
|
+
itemCode,
|
|
4243
|
+
brandUid,
|
|
4244
|
+
uid,
|
|
4387
4245
|
},
|
|
4388
4246
|
{ abortEarly: false, allowUnknown: true }
|
|
4389
4247
|
);
|
|
@@ -4394,27 +4252,33 @@ class Catalog {
|
|
|
4394
4252
|
// Showing warrnings if extra unknown parameters are found
|
|
4395
4253
|
const {
|
|
4396
4254
|
error: warrning,
|
|
4397
|
-
} = CatalogPlatformValidator.
|
|
4255
|
+
} = CatalogPlatformValidator.getProductSize().validate(
|
|
4398
4256
|
{
|
|
4399
|
-
|
|
4257
|
+
itemId,
|
|
4258
|
+
itemCode,
|
|
4259
|
+
brandUid,
|
|
4260
|
+
uid,
|
|
4400
4261
|
},
|
|
4401
4262
|
{ abortEarly: false, allowUnknown: false }
|
|
4402
4263
|
);
|
|
4403
4264
|
if (warrning) {
|
|
4404
4265
|
Logger({
|
|
4405
4266
|
level: "WARN",
|
|
4406
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4267
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductSize \n ${warrning}`,
|
|
4407
4268
|
});
|
|
4408
4269
|
}
|
|
4409
4270
|
|
|
4410
4271
|
const query_params = {};
|
|
4272
|
+
query_params["item_code"] = itemCode;
|
|
4273
|
+
query_params["brand_uid"] = brandUid;
|
|
4274
|
+
query_params["uid"] = uid;
|
|
4411
4275
|
|
|
4412
4276
|
const xHeaders = {};
|
|
4413
4277
|
|
|
4414
4278
|
const response = await PlatformAPIClient.execute(
|
|
4415
4279
|
this.config,
|
|
4416
4280
|
"get",
|
|
4417
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products
|
|
4281
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/`,
|
|
4418
4282
|
query_params,
|
|
4419
4283
|
undefined,
|
|
4420
4284
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4428,7 +4292,7 @@ class Catalog {
|
|
|
4428
4292
|
|
|
4429
4293
|
const {
|
|
4430
4294
|
error: res_error,
|
|
4431
|
-
} = CatalogPlatformModel.
|
|
4295
|
+
} = CatalogPlatformModel.ProductListingResponseSchema().validate(
|
|
4432
4296
|
responseData,
|
|
4433
4297
|
{ abortEarly: false, allowUnknown: true }
|
|
4434
4298
|
);
|
|
@@ -4439,7 +4303,7 @@ class Catalog {
|
|
|
4439
4303
|
} else {
|
|
4440
4304
|
Logger({
|
|
4441
4305
|
level: "WARN",
|
|
4442
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4306
|
+
message: `Response Validation Warnings for platform > Catalog > getProductSize \n ${res_error}`,
|
|
4443
4307
|
});
|
|
4444
4308
|
}
|
|
4445
4309
|
}
|
|
@@ -4448,23 +4312,21 @@ class Catalog {
|
|
|
4448
4312
|
}
|
|
4449
4313
|
|
|
4450
4314
|
/**
|
|
4451
|
-
* @param {CatalogPlatformValidator.
|
|
4315
|
+
* @param {CatalogPlatformValidator.GetProductTagsParam} arg - Arg object
|
|
4452
4316
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4453
4317
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4454
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4455
|
-
*
|
|
4456
|
-
* @
|
|
4457
|
-
* @
|
|
4318
|
+
* @returns {Promise<CatalogPlatformModel.ProductTagsViewResponseSchema>} -
|
|
4319
|
+
* Success response
|
|
4320
|
+
* @name getProductTags
|
|
4321
|
+
* @summary: List product tags
|
|
4322
|
+
* @description: Retrieve tags data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTags/).
|
|
4458
4323
|
*/
|
|
4459
|
-
async
|
|
4460
|
-
{
|
|
4324
|
+
async getProductTags(
|
|
4325
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4461
4326
|
{ responseHeaders } = { responseHeaders: false }
|
|
4462
4327
|
) {
|
|
4463
|
-
const { error } = CatalogPlatformValidator.
|
|
4464
|
-
{
|
|
4465
|
-
type,
|
|
4466
|
-
slug,
|
|
4467
|
-
},
|
|
4328
|
+
const { error } = CatalogPlatformValidator.getProductTags().validate(
|
|
4329
|
+
{},
|
|
4468
4330
|
{ abortEarly: false, allowUnknown: true }
|
|
4469
4331
|
);
|
|
4470
4332
|
if (error) {
|
|
@@ -4474,30 +4336,25 @@ class Catalog {
|
|
|
4474
4336
|
// Showing warrnings if extra unknown parameters are found
|
|
4475
4337
|
const {
|
|
4476
4338
|
error: warrning,
|
|
4477
|
-
} = CatalogPlatformValidator.
|
|
4478
|
-
{
|
|
4479
|
-
type,
|
|
4480
|
-
slug,
|
|
4481
|
-
},
|
|
4339
|
+
} = CatalogPlatformValidator.getProductTags().validate(
|
|
4340
|
+
{},
|
|
4482
4341
|
{ abortEarly: false, allowUnknown: false }
|
|
4483
4342
|
);
|
|
4484
4343
|
if (warrning) {
|
|
4485
4344
|
Logger({
|
|
4486
4345
|
level: "WARN",
|
|
4487
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4346
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductTags \n ${warrning}`,
|
|
4488
4347
|
});
|
|
4489
4348
|
}
|
|
4490
4349
|
|
|
4491
4350
|
const query_params = {};
|
|
4492
|
-
query_params["type"] = type;
|
|
4493
|
-
query_params["slug"] = slug;
|
|
4494
4351
|
|
|
4495
4352
|
const xHeaders = {};
|
|
4496
4353
|
|
|
4497
4354
|
const response = await PlatformAPIClient.execute(
|
|
4498
4355
|
this.config,
|
|
4499
4356
|
"get",
|
|
4500
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
4357
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/tags`,
|
|
4501
4358
|
query_params,
|
|
4502
4359
|
undefined,
|
|
4503
4360
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4511,10 +4368,10 @@ class Catalog {
|
|
|
4511
4368
|
|
|
4512
4369
|
const {
|
|
4513
4370
|
error: res_error,
|
|
4514
|
-
} = CatalogPlatformModel.
|
|
4515
|
-
|
|
4516
|
-
allowUnknown: true
|
|
4517
|
-
|
|
4371
|
+
} = CatalogPlatformModel.ProductTagsViewResponseSchema().validate(
|
|
4372
|
+
responseData,
|
|
4373
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4374
|
+
);
|
|
4518
4375
|
|
|
4519
4376
|
if (res_error) {
|
|
4520
4377
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4522,7 +4379,7 @@ class Catalog {
|
|
|
4522
4379
|
} else {
|
|
4523
4380
|
Logger({
|
|
4524
4381
|
level: "WARN",
|
|
4525
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4382
|
+
message: `Response Validation Warnings for platform > Catalog > getProductTags \n ${res_error}`,
|
|
4526
4383
|
});
|
|
4527
4384
|
}
|
|
4528
4385
|
}
|
|
@@ -4531,27 +4388,20 @@ class Catalog {
|
|
|
4531
4388
|
}
|
|
4532
4389
|
|
|
4533
4390
|
/**
|
|
4534
|
-
* @param {CatalogPlatformValidator.
|
|
4535
|
-
* - Arg object
|
|
4536
|
-
*
|
|
4391
|
+
* @param {CatalogPlatformValidator.GetProductValidationParam} arg - Arg object
|
|
4537
4392
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4538
4393
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4539
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4540
|
-
*
|
|
4541
|
-
* @
|
|
4542
|
-
* @
|
|
4543
|
-
* @description: Get the verification detail of a product - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductVerificationDetails/).
|
|
4394
|
+
* @returns {Promise<CatalogPlatformModel.ValidateProduct>} - Success response
|
|
4395
|
+
* @name getProductValidation
|
|
4396
|
+
* @summary: Get valid products
|
|
4397
|
+
* @description: Retrieve validation data for products at company level. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductValidation/).
|
|
4544
4398
|
*/
|
|
4545
|
-
async
|
|
4546
|
-
{
|
|
4399
|
+
async getProductValidation(
|
|
4400
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4547
4401
|
{ responseHeaders } = { responseHeaders: false }
|
|
4548
4402
|
) {
|
|
4549
|
-
const {
|
|
4550
|
-
|
|
4551
|
-
} = CatalogPlatformValidator.getProductVerificationDetails().validate(
|
|
4552
|
-
{
|
|
4553
|
-
itemId,
|
|
4554
|
-
},
|
|
4403
|
+
const { error } = CatalogPlatformValidator.getProductValidation().validate(
|
|
4404
|
+
{},
|
|
4555
4405
|
{ abortEarly: false, allowUnknown: true }
|
|
4556
4406
|
);
|
|
4557
4407
|
if (error) {
|
|
@@ -4561,16 +4411,14 @@ class Catalog {
|
|
|
4561
4411
|
// Showing warrnings if extra unknown parameters are found
|
|
4562
4412
|
const {
|
|
4563
4413
|
error: warrning,
|
|
4564
|
-
} = CatalogPlatformValidator.
|
|
4565
|
-
{
|
|
4566
|
-
itemId,
|
|
4567
|
-
},
|
|
4414
|
+
} = CatalogPlatformValidator.getProductValidation().validate(
|
|
4415
|
+
{},
|
|
4568
4416
|
{ abortEarly: false, allowUnknown: false }
|
|
4569
4417
|
);
|
|
4570
4418
|
if (warrning) {
|
|
4571
4419
|
Logger({
|
|
4572
4420
|
level: "WARN",
|
|
4573
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4421
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductValidation \n ${warrning}`,
|
|
4574
4422
|
});
|
|
4575
4423
|
}
|
|
4576
4424
|
|
|
@@ -4581,7 +4429,7 @@ class Catalog {
|
|
|
4581
4429
|
const response = await PlatformAPIClient.execute(
|
|
4582
4430
|
this.config,
|
|
4583
4431
|
"get",
|
|
4584
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
4432
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/validation/`,
|
|
4585
4433
|
query_params,
|
|
4586
4434
|
undefined,
|
|
4587
4435
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4595,7 +4443,7 @@ class Catalog {
|
|
|
4595
4443
|
|
|
4596
4444
|
const {
|
|
4597
4445
|
error: res_error,
|
|
4598
|
-
} = CatalogPlatformModel.
|
|
4446
|
+
} = CatalogPlatformModel.ValidateProduct().validate(responseData, {
|
|
4599
4447
|
abortEarly: false,
|
|
4600
4448
|
allowUnknown: true,
|
|
4601
4449
|
});
|
|
@@ -4606,7 +4454,7 @@ class Catalog {
|
|
|
4606
4454
|
} else {
|
|
4607
4455
|
Logger({
|
|
4608
4456
|
level: "WARN",
|
|
4609
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4457
|
+
message: `Response Validation Warnings for platform > Catalog > getProductValidation \n ${res_error}`,
|
|
4610
4458
|
});
|
|
4611
4459
|
}
|
|
4612
4460
|
}
|
|
@@ -4621,13 +4469,12 @@ class Catalog {
|
|
|
4621
4469
|
* @returns {Promise<CatalogPlatformModel.ProductListingResponseV2>} -
|
|
4622
4470
|
* Success response
|
|
4623
4471
|
* @name getProducts
|
|
4624
|
-
* @summary:
|
|
4625
|
-
* @description: Retrieve a list of products
|
|
4472
|
+
* @summary: List products
|
|
4473
|
+
* @description: Retrieve a list of available products - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProducts/).
|
|
4626
4474
|
*/
|
|
4627
4475
|
async getProducts(
|
|
4628
4476
|
{
|
|
4629
4477
|
brandIds,
|
|
4630
|
-
multiSize,
|
|
4631
4478
|
categoryIds,
|
|
4632
4479
|
itemIds,
|
|
4633
4480
|
departmentIds,
|
|
@@ -4649,7 +4496,6 @@ class Catalog {
|
|
|
4649
4496
|
const { error } = CatalogPlatformValidator.getProducts().validate(
|
|
4650
4497
|
{
|
|
4651
4498
|
brandIds,
|
|
4652
|
-
multiSize,
|
|
4653
4499
|
categoryIds,
|
|
4654
4500
|
itemIds,
|
|
4655
4501
|
departmentIds,
|
|
@@ -4675,7 +4521,6 @@ class Catalog {
|
|
|
4675
4521
|
const { error: warrning } = CatalogPlatformValidator.getProducts().validate(
|
|
4676
4522
|
{
|
|
4677
4523
|
brandIds,
|
|
4678
|
-
multiSize,
|
|
4679
4524
|
categoryIds,
|
|
4680
4525
|
itemIds,
|
|
4681
4526
|
departmentIds,
|
|
@@ -4702,7 +4547,6 @@ class Catalog {
|
|
|
4702
4547
|
|
|
4703
4548
|
const query_params = {};
|
|
4704
4549
|
query_params["brand_ids"] = brandIds;
|
|
4705
|
-
query_params["multi_size"] = multiSize;
|
|
4706
4550
|
query_params["category_ids"] = categoryIds;
|
|
4707
4551
|
query_params["item_ids"] = itemIds;
|
|
4708
4552
|
query_params["department_ids"] = departmentIds;
|
|
@@ -4723,7 +4567,7 @@ class Catalog {
|
|
|
4723
4567
|
const response = await PlatformAPIClient.execute(
|
|
4724
4568
|
this.config,
|
|
4725
4569
|
"get",
|
|
4726
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products
|
|
4570
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
4727
4571
|
query_params,
|
|
4728
4572
|
undefined,
|
|
4729
4573
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4756,14 +4600,84 @@ class Catalog {
|
|
|
4756
4600
|
return response;
|
|
4757
4601
|
}
|
|
4758
4602
|
|
|
4603
|
+
/**
|
|
4604
|
+
* @param {Object} arg - Arg object.
|
|
4605
|
+
* @param {number[]} [arg.brandIds] - Get multiple products filtered by Brand Ids
|
|
4606
|
+
* @param {number[]} [arg.categoryIds] - Get multiple products filtered by
|
|
4607
|
+
* Category Ids
|
|
4608
|
+
* @param {number[]} [arg.itemIds] - Get multiple products filtered by Item Ids
|
|
4609
|
+
* @param {number[]} [arg.departmentIds] - Get multiple products filtered by
|
|
4610
|
+
* Department Ids
|
|
4611
|
+
* @param {string[]} [arg.itemCode] - Get multiple products filtered by Item Code
|
|
4612
|
+
* @param {string} [arg.name] - Get multiple products filtered by Name (Pattern Match)
|
|
4613
|
+
* @param {string} [arg.slug] - Get multiple products filtered by Slug
|
|
4614
|
+
* @param {string[]} [arg.allIdentifiers] - Get multiple products filtered
|
|
4615
|
+
* by All Identifiers
|
|
4616
|
+
* @param {string} [arg.q] - Get multiple products filtered by q string
|
|
4617
|
+
* @param {string[]} [arg.tags] - Get multiple products filtered by tags
|
|
4618
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
4619
|
+
* page. Default is 10.
|
|
4620
|
+
* @param {string} [arg.sortOn] - Field which is to be used for sorting,
|
|
4621
|
+
* default is latest. Value can be latest (modified_on) or created (record id)
|
|
4622
|
+
* @returns {Paginator<CatalogPlatformModel.ProductListingResponseV2>}
|
|
4623
|
+
* @summary: List products
|
|
4624
|
+
* @description: Retrieve a list of available products
|
|
4625
|
+
*/
|
|
4626
|
+
getProductsPaginator({
|
|
4627
|
+
brandIds,
|
|
4628
|
+
categoryIds,
|
|
4629
|
+
itemIds,
|
|
4630
|
+
departmentIds,
|
|
4631
|
+
itemCode,
|
|
4632
|
+
name,
|
|
4633
|
+
slug,
|
|
4634
|
+
allIdentifiers,
|
|
4635
|
+
q,
|
|
4636
|
+
tags,
|
|
4637
|
+
pageSize,
|
|
4638
|
+
sortOn,
|
|
4639
|
+
} = {}) {
|
|
4640
|
+
const paginator = new Paginator();
|
|
4641
|
+
const callback = async () => {
|
|
4642
|
+
const pageId = paginator.nextId;
|
|
4643
|
+
const pageNo = paginator.pageNo;
|
|
4644
|
+
const pageType = "cursor";
|
|
4645
|
+
const data = await this.getProducts({
|
|
4646
|
+
brandIds: brandIds,
|
|
4647
|
+
categoryIds: categoryIds,
|
|
4648
|
+
itemIds: itemIds,
|
|
4649
|
+
departmentIds: departmentIds,
|
|
4650
|
+
itemCode: itemCode,
|
|
4651
|
+
name: name,
|
|
4652
|
+
slug: slug,
|
|
4653
|
+
allIdentifiers: allIdentifiers,
|
|
4654
|
+
q: q,
|
|
4655
|
+
tags: tags,
|
|
4656
|
+
pageNo: pageNo,
|
|
4657
|
+
pageSize: pageSize,
|
|
4658
|
+
pageType: pageType,
|
|
4659
|
+
sortOn: sortOn,
|
|
4660
|
+
pageId: pageId,
|
|
4661
|
+
});
|
|
4662
|
+
paginator.setPaginator({
|
|
4663
|
+
hasNext: data.page.has_next ? true : false,
|
|
4664
|
+
nextId: data.page.next_id,
|
|
4665
|
+
});
|
|
4666
|
+
return data;
|
|
4667
|
+
};
|
|
4668
|
+
paginator.setCallback(callback.bind(this));
|
|
4669
|
+
return paginator;
|
|
4670
|
+
}
|
|
4671
|
+
|
|
4759
4672
|
/**
|
|
4760
4673
|
* @param {CatalogPlatformValidator.GetSellerInsightsParam} arg - Arg object
|
|
4761
4674
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4762
4675
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4763
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4676
|
+
* @returns {Promise<CatalogPlatformModel.CrossSellingResponseSchema>} -
|
|
4677
|
+
* Success response
|
|
4764
4678
|
* @name getSellerInsights
|
|
4765
|
-
* @summary: Get seller
|
|
4766
|
-
* @description: Retrieve
|
|
4679
|
+
* @summary: Get seller catalog counts
|
|
4680
|
+
* @description: Retrieve the count of catalog related data for sellers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSellerInsights/).
|
|
4767
4681
|
*/
|
|
4768
4682
|
async getSellerInsights(
|
|
4769
4683
|
{ sellerAppId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4802,7 +4716,7 @@ class Catalog {
|
|
|
4802
4716
|
const response = await PlatformAPIClient.execute(
|
|
4803
4717
|
this.config,
|
|
4804
4718
|
"get",
|
|
4805
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/cross-selling/${sellerAppId}/analytics/insights
|
|
4719
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/cross-selling/${sellerAppId}/analytics/insights/`,
|
|
4806
4720
|
query_params,
|
|
4807
4721
|
undefined,
|
|
4808
4722
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4816,10 +4730,10 @@ class Catalog {
|
|
|
4816
4730
|
|
|
4817
4731
|
const {
|
|
4818
4732
|
error: res_error,
|
|
4819
|
-
} = CatalogPlatformModel.
|
|
4820
|
-
|
|
4821
|
-
allowUnknown: true
|
|
4822
|
-
|
|
4733
|
+
} = CatalogPlatformModel.CrossSellingResponseSchema().validate(
|
|
4734
|
+
responseData,
|
|
4735
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4736
|
+
);
|
|
4823
4737
|
|
|
4824
4738
|
if (res_error) {
|
|
4825
4739
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4841,8 +4755,8 @@ class Catalog {
|
|
|
4841
4755
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4842
4756
|
* @returns {Promise<CatalogPlatformModel.HSNDataInsertV2>} - Success response
|
|
4843
4757
|
* @name getSingleProductHSNCode
|
|
4844
|
-
* @summary: Get
|
|
4845
|
-
* @description: Retrieve
|
|
4758
|
+
* @summary: Get product HSN code
|
|
4759
|
+
* @description: Retrieve HSN details associated with company ID and reporting HSN - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSingleProductHSNCode/).
|
|
4846
4760
|
*/
|
|
4847
4761
|
async getSingleProductHSNCode(
|
|
4848
4762
|
{ reportingHsn, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4916,17 +4830,19 @@ class Catalog {
|
|
|
4916
4830
|
* @param {CatalogPlatformValidator.GetSizeGuideParam} arg - Arg object
|
|
4917
4831
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4918
4832
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4919
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4833
|
+
* @returns {Promise<CatalogPlatformModel.SizeGuideResponseSchema>} - Success response
|
|
4920
4834
|
* @name getSizeGuide
|
|
4921
|
-
* @summary: Get size guide
|
|
4922
|
-
* @description: Retrieve data associated about a specific size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuide/).
|
|
4835
|
+
* @summary: Get size guide
|
|
4836
|
+
* @description: Retrieve data associated about a specific size guide. It contains meta deta like header values like for shoulder, head, etc. and measurement unit like cm and values contains sizes for the same. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuide/).
|
|
4923
4837
|
*/
|
|
4924
4838
|
async getSizeGuide(
|
|
4925
4839
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
4926
4840
|
{ responseHeaders } = { responseHeaders: false }
|
|
4927
4841
|
) {
|
|
4928
4842
|
const { error } = CatalogPlatformValidator.getSizeGuide().validate(
|
|
4929
|
-
{
|
|
4843
|
+
{
|
|
4844
|
+
id,
|
|
4845
|
+
},
|
|
4930
4846
|
{ abortEarly: false, allowUnknown: true }
|
|
4931
4847
|
);
|
|
4932
4848
|
if (error) {
|
|
@@ -4937,7 +4853,9 @@ class Catalog {
|
|
|
4937
4853
|
const {
|
|
4938
4854
|
error: warrning,
|
|
4939
4855
|
} = CatalogPlatformValidator.getSizeGuide().validate(
|
|
4940
|
-
{
|
|
4856
|
+
{
|
|
4857
|
+
id,
|
|
4858
|
+
},
|
|
4941
4859
|
{ abortEarly: false, allowUnknown: false }
|
|
4942
4860
|
);
|
|
4943
4861
|
if (warrning) {
|
|
@@ -4954,7 +4872,7 @@ class Catalog {
|
|
|
4954
4872
|
const response = await PlatformAPIClient.execute(
|
|
4955
4873
|
this.config,
|
|
4956
4874
|
"get",
|
|
4957
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}
|
|
4875
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
|
|
4958
4876
|
query_params,
|
|
4959
4877
|
undefined,
|
|
4960
4878
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4968,7 +4886,7 @@ class Catalog {
|
|
|
4968
4886
|
|
|
4969
4887
|
const {
|
|
4970
4888
|
error: res_error,
|
|
4971
|
-
} = CatalogPlatformModel.
|
|
4889
|
+
} = CatalogPlatformModel.SizeGuideResponseSchema().validate(responseData, {
|
|
4972
4890
|
abortEarly: false,
|
|
4973
4891
|
allowUnknown: true,
|
|
4974
4892
|
});
|
|
@@ -4993,11 +4911,11 @@ class Catalog {
|
|
|
4993
4911
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4994
4912
|
* @returns {Promise<CatalogPlatformModel.ListSizeGuide>} - Success response
|
|
4995
4913
|
* @name getSizeGuides
|
|
4996
|
-
* @summary:
|
|
4997
|
-
* @description: Allows to view all the size guides associated to the seller. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuides/).
|
|
4914
|
+
* @summary: List size guides
|
|
4915
|
+
* @description: Allows to view all the size guides associated to the seller. Each size guide contains meta deta like header values like for shoulder, head, etc. and measurement unit like cm and values contains sizes for the same. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuides/).
|
|
4998
4916
|
*/
|
|
4999
4917
|
async getSizeGuides(
|
|
5000
|
-
{ active, q,
|
|
4918
|
+
{ active, q, tag, pageNo, pageSize, brandId, requestHeaders } = {
|
|
5001
4919
|
requestHeaders: {},
|
|
5002
4920
|
},
|
|
5003
4921
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5006,10 +4924,10 @@ class Catalog {
|
|
|
5006
4924
|
{
|
|
5007
4925
|
active,
|
|
5008
4926
|
q,
|
|
5009
|
-
brandId,
|
|
5010
4927
|
tag,
|
|
5011
4928
|
pageNo,
|
|
5012
4929
|
pageSize,
|
|
4930
|
+
brandId,
|
|
5013
4931
|
},
|
|
5014
4932
|
{ abortEarly: false, allowUnknown: true }
|
|
5015
4933
|
);
|
|
@@ -5024,10 +4942,10 @@ class Catalog {
|
|
|
5024
4942
|
{
|
|
5025
4943
|
active,
|
|
5026
4944
|
q,
|
|
5027
|
-
brandId,
|
|
5028
4945
|
tag,
|
|
5029
4946
|
pageNo,
|
|
5030
4947
|
pageSize,
|
|
4948
|
+
brandId,
|
|
5031
4949
|
},
|
|
5032
4950
|
{ abortEarly: false, allowUnknown: false }
|
|
5033
4951
|
);
|
|
@@ -5041,10 +4959,10 @@ class Catalog {
|
|
|
5041
4959
|
const query_params = {};
|
|
5042
4960
|
query_params["active"] = active;
|
|
5043
4961
|
query_params["q"] = q;
|
|
5044
|
-
query_params["brand_id"] = brandId;
|
|
5045
4962
|
query_params["tag"] = tag;
|
|
5046
4963
|
query_params["page_no"] = pageNo;
|
|
5047
4964
|
query_params["page_size"] = pageSize;
|
|
4965
|
+
query_params["brand_id"] = brandId;
|
|
5048
4966
|
|
|
5049
4967
|
const xHeaders = {};
|
|
5050
4968
|
|
|
@@ -5090,8 +5008,8 @@ class Catalog {
|
|
|
5090
5008
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5091
5009
|
* @returns {Promise<CatalogPlatformModel.OptinStoreDetails>} - Success response
|
|
5092
5010
|
* @name getStoreDetail
|
|
5093
|
-
* @summary: Get
|
|
5094
|
-
* @description:
|
|
5011
|
+
* @summary: Get selling location
|
|
5012
|
+
* @description: Retrieve the details of the selling location (store) associated with a specific company passed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getStoreDetail/).
|
|
5095
5013
|
*/
|
|
5096
5014
|
async getStoreDetail(
|
|
5097
5015
|
{ q, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5137,7 +5055,7 @@ class Catalog {
|
|
|
5137
5055
|
const response = await PlatformAPIClient.execute(
|
|
5138
5056
|
this.config,
|
|
5139
5057
|
"get",
|
|
5140
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/location-details
|
|
5058
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/location-details/`,
|
|
5141
5059
|
query_params,
|
|
5142
5060
|
undefined,
|
|
5143
5061
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5171,92 +5089,43 @@ class Catalog {
|
|
|
5171
5089
|
}
|
|
5172
5090
|
|
|
5173
5091
|
/**
|
|
5174
|
-
* @param {
|
|
5175
|
-
* @param {
|
|
5176
|
-
* @param {
|
|
5177
|
-
*
|
|
5178
|
-
* @
|
|
5179
|
-
* @summary: Get
|
|
5180
|
-
* @description:
|
|
5092
|
+
* @param {Object} arg - Arg object.
|
|
5093
|
+
* @param {string} [arg.q] - The search related the store for the company id.
|
|
5094
|
+
* @param {number} [arg.pageSize] - Number of records that can be seen on
|
|
5095
|
+
* the page for the company id.
|
|
5096
|
+
* @returns {Paginator<CatalogPlatformModel.OptinStoreDetails>}
|
|
5097
|
+
* @summary: Get selling location
|
|
5098
|
+
* @description: Retrieve the details of the selling location (store) associated with a specific company passed.
|
|
5181
5099
|
*/
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
if (error) {
|
|
5193
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
5194
|
-
}
|
|
5195
|
-
|
|
5196
|
-
// Showing warrnings if extra unknown parameters are found
|
|
5197
|
-
const {
|
|
5198
|
-
error: warrning,
|
|
5199
|
-
} = CatalogPlatformValidator.getVariantTypes().validate(
|
|
5200
|
-
{
|
|
5201
|
-
templateTag,
|
|
5202
|
-
},
|
|
5203
|
-
{ abortEarly: false, allowUnknown: false }
|
|
5204
|
-
);
|
|
5205
|
-
if (warrning) {
|
|
5206
|
-
Logger({
|
|
5207
|
-
level: "WARN",
|
|
5208
|
-
message: `Parameter Validation warrnings for platform > Catalog > getVariantTypes \n ${warrning}`,
|
|
5100
|
+
getStoreDetailPaginator({ q, pageSize } = {}) {
|
|
5101
|
+
const paginator = new Paginator();
|
|
5102
|
+
const callback = async () => {
|
|
5103
|
+
const pageId = paginator.nextId;
|
|
5104
|
+
const pageNo = paginator.pageNo;
|
|
5105
|
+
const pageType = "number";
|
|
5106
|
+
const data = await this.getStoreDetail({
|
|
5107
|
+
q: q,
|
|
5108
|
+
pageNo: pageNo,
|
|
5109
|
+
pageSize: pageSize,
|
|
5209
5110
|
});
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
this.config,
|
|
5219
|
-
"get",
|
|
5220
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/variant-types`,
|
|
5221
|
-
query_params,
|
|
5222
|
-
undefined,
|
|
5223
|
-
{ ...xHeaders, ...requestHeaders },
|
|
5224
|
-
{ responseHeaders }
|
|
5225
|
-
);
|
|
5226
|
-
|
|
5227
|
-
let responseData = response;
|
|
5228
|
-
if (responseHeaders) {
|
|
5229
|
-
responseData = response[0];
|
|
5230
|
-
}
|
|
5231
|
-
|
|
5232
|
-
const {
|
|
5233
|
-
error: res_error,
|
|
5234
|
-
} = CatalogPlatformModel.VariantTypesResponse().validate(responseData, {
|
|
5235
|
-
abortEarly: false,
|
|
5236
|
-
allowUnknown: true,
|
|
5237
|
-
});
|
|
5238
|
-
|
|
5239
|
-
if (res_error) {
|
|
5240
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
5241
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5242
|
-
} else {
|
|
5243
|
-
Logger({
|
|
5244
|
-
level: "WARN",
|
|
5245
|
-
message: `Response Validation Warnings for platform > Catalog > getVariantTypes \n ${res_error}`,
|
|
5246
|
-
});
|
|
5247
|
-
}
|
|
5248
|
-
}
|
|
5249
|
-
|
|
5250
|
-
return response;
|
|
5111
|
+
paginator.setPaginator({
|
|
5112
|
+
hasNext: data.page.has_next ? true : false,
|
|
5113
|
+
nextId: data.page.next_id,
|
|
5114
|
+
});
|
|
5115
|
+
return data;
|
|
5116
|
+
};
|
|
5117
|
+
paginator.setCallback(callback.bind(this));
|
|
5118
|
+
return paginator;
|
|
5251
5119
|
}
|
|
5252
5120
|
|
|
5253
5121
|
/**
|
|
5254
5122
|
* @param {CatalogPlatformValidator.GetVariantsOfProductsParam} arg - Arg object
|
|
5255
5123
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5256
5124
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5257
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5125
|
+
* @returns {Promise<CatalogPlatformModel.ProductVariantsResponseSchema>} -
|
|
5126
|
+
* Success response
|
|
5258
5127
|
* @name getVariantsOfProducts
|
|
5259
|
-
* @summary: Get variants
|
|
5128
|
+
* @summary: Get variants
|
|
5260
5129
|
* @description: Retrieve variants of a specific product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getVariantsOfProducts/).
|
|
5261
5130
|
*/
|
|
5262
5131
|
async getVariantsOfProducts(
|
|
@@ -5320,10 +5189,10 @@ class Catalog {
|
|
|
5320
5189
|
|
|
5321
5190
|
const {
|
|
5322
5191
|
error: res_error,
|
|
5323
|
-
} = CatalogPlatformModel.
|
|
5324
|
-
|
|
5325
|
-
allowUnknown: true
|
|
5326
|
-
|
|
5192
|
+
} = CatalogPlatformModel.ProductVariantsResponseSchema().validate(
|
|
5193
|
+
responseData,
|
|
5194
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5195
|
+
);
|
|
5327
5196
|
|
|
5328
5197
|
if (res_error) {
|
|
5329
5198
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5339,17 +5208,49 @@ class Catalog {
|
|
|
5339
5208
|
return response;
|
|
5340
5209
|
}
|
|
5341
5210
|
|
|
5211
|
+
/**
|
|
5212
|
+
* @param {Object} arg - Arg object.
|
|
5213
|
+
* @param {number} arg.itemId - Get list of variants of item Id
|
|
5214
|
+
* @param {string} arg.variantType - Get multiple products filtered by variant type
|
|
5215
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
5216
|
+
* page. Default is 10.
|
|
5217
|
+
* @returns {Paginator<CatalogPlatformModel.ProductVariantsResponseSchema>}
|
|
5218
|
+
* @summary: Get variants
|
|
5219
|
+
* @description: Retrieve variants of a specific product.
|
|
5220
|
+
*/
|
|
5221
|
+
getVariantsOfProductsPaginator({ itemId, variantType, pageSize } = {}) {
|
|
5222
|
+
const paginator = new Paginator();
|
|
5223
|
+
const callback = async () => {
|
|
5224
|
+
const pageId = paginator.nextId;
|
|
5225
|
+
const pageNo = paginator.pageNo;
|
|
5226
|
+
const pageType = "number";
|
|
5227
|
+
const data = await this.getVariantsOfProducts({
|
|
5228
|
+
itemId: itemId,
|
|
5229
|
+
variantType: variantType,
|
|
5230
|
+
pageNo: pageNo,
|
|
5231
|
+
pageSize: pageSize,
|
|
5232
|
+
});
|
|
5233
|
+
paginator.setPaginator({
|
|
5234
|
+
hasNext: data.page.has_next ? true : false,
|
|
5235
|
+
nextId: data.page.next_id,
|
|
5236
|
+
});
|
|
5237
|
+
return data;
|
|
5238
|
+
};
|
|
5239
|
+
paginator.setCallback(callback.bind(this));
|
|
5240
|
+
return paginator;
|
|
5241
|
+
}
|
|
5242
|
+
|
|
5342
5243
|
/**
|
|
5343
5244
|
* @param {CatalogPlatformValidator.ListCategoriesParam} arg - Arg object
|
|
5344
5245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5345
5246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5346
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5247
|
+
* @returns {Promise<CatalogPlatformModel.CategoryResponseSchema>} - Success response
|
|
5347
5248
|
* @name listCategories
|
|
5348
|
-
* @summary: List categories
|
|
5349
|
-
* @description: Retrieve a list of
|
|
5249
|
+
* @summary: List categories
|
|
5250
|
+
* @description: Retrieve a list of categories data associated to a specific company and queries passed in the request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listCategories/).
|
|
5350
5251
|
*/
|
|
5351
5252
|
async listCategories(
|
|
5352
|
-
{ level, department, q, pageNo, pageSize, uids, requestHeaders } = {
|
|
5253
|
+
{ level, department, q, pageNo, pageSize, uids, slug, requestHeaders } = {
|
|
5353
5254
|
requestHeaders: {},
|
|
5354
5255
|
},
|
|
5355
5256
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5362,6 +5263,7 @@ class Catalog {
|
|
|
5362
5263
|
pageNo,
|
|
5363
5264
|
pageSize,
|
|
5364
5265
|
uids,
|
|
5266
|
+
slug,
|
|
5365
5267
|
},
|
|
5366
5268
|
{ abortEarly: false, allowUnknown: true }
|
|
5367
5269
|
);
|
|
@@ -5380,6 +5282,7 @@ class Catalog {
|
|
|
5380
5282
|
pageNo,
|
|
5381
5283
|
pageSize,
|
|
5382
5284
|
uids,
|
|
5285
|
+
slug,
|
|
5383
5286
|
},
|
|
5384
5287
|
{ abortEarly: false, allowUnknown: false }
|
|
5385
5288
|
);
|
|
@@ -5397,13 +5300,14 @@ class Catalog {
|
|
|
5397
5300
|
query_params["page_no"] = pageNo;
|
|
5398
5301
|
query_params["page_size"] = pageSize;
|
|
5399
5302
|
query_params["uids"] = uids;
|
|
5303
|
+
query_params["slug"] = slug;
|
|
5400
5304
|
|
|
5401
5305
|
const xHeaders = {};
|
|
5402
5306
|
|
|
5403
5307
|
const response = await PlatformAPIClient.execute(
|
|
5404
5308
|
this.config,
|
|
5405
5309
|
"get",
|
|
5406
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category
|
|
5310
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/`,
|
|
5407
5311
|
query_params,
|
|
5408
5312
|
undefined,
|
|
5409
5313
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5417,7 +5321,7 @@ class Catalog {
|
|
|
5417
5321
|
|
|
5418
5322
|
const {
|
|
5419
5323
|
error: res_error,
|
|
5420
|
-
} = CatalogPlatformModel.
|
|
5324
|
+
} = CatalogPlatformModel.CategoryResponseSchema().validate(responseData, {
|
|
5421
5325
|
abortEarly: false,
|
|
5422
5326
|
allowUnknown: true,
|
|
5423
5327
|
});
|
|
@@ -5436,14 +5340,53 @@ class Catalog {
|
|
|
5436
5340
|
return response;
|
|
5437
5341
|
}
|
|
5438
5342
|
|
|
5343
|
+
/**
|
|
5344
|
+
* @param {Object} arg - Arg object.
|
|
5345
|
+
* @param {string} [arg.level] - Get category for multiple levels
|
|
5346
|
+
* @param {number} [arg.department] - Get category for multiple departments filtered
|
|
5347
|
+
* @param {string} [arg.q] - Get multiple categories filtered by search string
|
|
5348
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
5349
|
+
* page. Default is 10.
|
|
5350
|
+
* @param {number[]} [arg.uids] - Get multiple categories filtered by category uids.
|
|
5351
|
+
* @param {string} [arg.slug] - Get category by slug
|
|
5352
|
+
* @returns {Paginator<CatalogPlatformModel.CategoryResponseSchema>}
|
|
5353
|
+
* @summary: List categories
|
|
5354
|
+
* @description: Retrieve a list of categories data associated to a specific company and queries passed in the request.
|
|
5355
|
+
*/
|
|
5356
|
+
listCategoriesPaginator({ level, department, q, pageSize, uids, slug } = {}) {
|
|
5357
|
+
const paginator = new Paginator();
|
|
5358
|
+
const callback = async () => {
|
|
5359
|
+
const pageId = paginator.nextId;
|
|
5360
|
+
const pageNo = paginator.pageNo;
|
|
5361
|
+
const pageType = "number";
|
|
5362
|
+
const data = await this.listCategories({
|
|
5363
|
+
level: level,
|
|
5364
|
+
department: department,
|
|
5365
|
+
q: q,
|
|
5366
|
+
pageNo: pageNo,
|
|
5367
|
+
pageSize: pageSize,
|
|
5368
|
+
uids: uids,
|
|
5369
|
+
slug: slug,
|
|
5370
|
+
});
|
|
5371
|
+
paginator.setPaginator({
|
|
5372
|
+
hasNext: data.page.has_next ? true : false,
|
|
5373
|
+
nextId: data.page.next_id,
|
|
5374
|
+
});
|
|
5375
|
+
return data;
|
|
5376
|
+
};
|
|
5377
|
+
paginator.setCallback(callback.bind(this));
|
|
5378
|
+
return paginator;
|
|
5379
|
+
}
|
|
5380
|
+
|
|
5439
5381
|
/**
|
|
5440
5382
|
* @param {CatalogPlatformValidator.ListDepartmentsDataParam} arg - Arg object
|
|
5441
5383
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5442
5384
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5443
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5385
|
+
* @returns {Promise<CatalogPlatformModel.DepartmentsResponseSchema>} -
|
|
5386
|
+
* Success response
|
|
5444
5387
|
* @name listDepartmentsData
|
|
5445
|
-
* @summary: List department
|
|
5446
|
-
* @description: Allows you to list all departments
|
|
5388
|
+
* @summary: List company department
|
|
5389
|
+
* @description: Allows you to list all departments data for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listDepartmentsData/).
|
|
5447
5390
|
*/
|
|
5448
5391
|
async listDepartmentsData(
|
|
5449
5392
|
{
|
|
@@ -5453,7 +5396,7 @@ class Catalog {
|
|
|
5453
5396
|
name,
|
|
5454
5397
|
search,
|
|
5455
5398
|
isActive,
|
|
5456
|
-
|
|
5399
|
+
slug,
|
|
5457
5400
|
requestHeaders,
|
|
5458
5401
|
} = { requestHeaders: {} },
|
|
5459
5402
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5466,7 +5409,7 @@ class Catalog {
|
|
|
5466
5409
|
name,
|
|
5467
5410
|
search,
|
|
5468
5411
|
isActive,
|
|
5469
|
-
|
|
5412
|
+
slug,
|
|
5470
5413
|
},
|
|
5471
5414
|
{ abortEarly: false, allowUnknown: true }
|
|
5472
5415
|
);
|
|
@@ -5485,7 +5428,7 @@ class Catalog {
|
|
|
5485
5428
|
name,
|
|
5486
5429
|
search,
|
|
5487
5430
|
isActive,
|
|
5488
|
-
|
|
5431
|
+
slug,
|
|
5489
5432
|
},
|
|
5490
5433
|
{ abortEarly: false, allowUnknown: false }
|
|
5491
5434
|
);
|
|
@@ -5503,14 +5446,14 @@ class Catalog {
|
|
|
5503
5446
|
query_params["name"] = name;
|
|
5504
5447
|
query_params["search"] = search;
|
|
5505
5448
|
query_params["is_active"] = isActive;
|
|
5506
|
-
query_params["
|
|
5449
|
+
query_params["slug"] = slug;
|
|
5507
5450
|
|
|
5508
5451
|
const xHeaders = {};
|
|
5509
5452
|
|
|
5510
5453
|
const response = await PlatformAPIClient.execute(
|
|
5511
5454
|
this.config,
|
|
5512
5455
|
"get",
|
|
5513
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments
|
|
5456
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/`,
|
|
5514
5457
|
query_params,
|
|
5515
5458
|
undefined,
|
|
5516
5459
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5524,10 +5467,10 @@ class Catalog {
|
|
|
5524
5467
|
|
|
5525
5468
|
const {
|
|
5526
5469
|
error: res_error,
|
|
5527
|
-
} = CatalogPlatformModel.
|
|
5528
|
-
|
|
5529
|
-
allowUnknown: true
|
|
5530
|
-
|
|
5470
|
+
} = CatalogPlatformModel.DepartmentsResponseSchema().validate(
|
|
5471
|
+
responseData,
|
|
5472
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5473
|
+
);
|
|
5531
5474
|
|
|
5532
5475
|
if (res_error) {
|
|
5533
5476
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5543,14 +5486,62 @@ class Catalog {
|
|
|
5543
5486
|
return response;
|
|
5544
5487
|
}
|
|
5545
5488
|
|
|
5489
|
+
/**
|
|
5490
|
+
* @param {Object} arg - Arg object.
|
|
5491
|
+
* @param {string} [arg.itemType] - A `item_type` is a type of product eg.
|
|
5492
|
+
* set, standard, digital
|
|
5493
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
5494
|
+
* page. Default is 10.
|
|
5495
|
+
* @param {string} [arg.name] - Can search departments by passing name.
|
|
5496
|
+
* @param {string} [arg.search] - Can search departments by passing name of
|
|
5497
|
+
* the department in search parameter.
|
|
5498
|
+
* @param {boolean} [arg.isActive] - Can query for departments based on
|
|
5499
|
+
* whether they are active or inactive.
|
|
5500
|
+
* @param {string} [arg.slug] - Can filter by slug
|
|
5501
|
+
* @returns {Paginator<CatalogPlatformModel.DepartmentsResponseSchema>}
|
|
5502
|
+
* @summary: List company department
|
|
5503
|
+
* @description: Allows you to list all departments data for a specific company.
|
|
5504
|
+
*/
|
|
5505
|
+
listDepartmentsDataPaginator({
|
|
5506
|
+
itemType,
|
|
5507
|
+
pageSize,
|
|
5508
|
+
name,
|
|
5509
|
+
search,
|
|
5510
|
+
isActive,
|
|
5511
|
+
slug,
|
|
5512
|
+
} = {}) {
|
|
5513
|
+
const paginator = new Paginator();
|
|
5514
|
+
const callback = async () => {
|
|
5515
|
+
const pageId = paginator.nextId;
|
|
5516
|
+
const pageNo = paginator.pageNo;
|
|
5517
|
+
const pageType = "number";
|
|
5518
|
+
const data = await this.listDepartmentsData({
|
|
5519
|
+
pageNo: pageNo,
|
|
5520
|
+
itemType: itemType,
|
|
5521
|
+
pageSize: pageSize,
|
|
5522
|
+
name: name,
|
|
5523
|
+
search: search,
|
|
5524
|
+
isActive: isActive,
|
|
5525
|
+
slug: slug,
|
|
5526
|
+
});
|
|
5527
|
+
paginator.setPaginator({
|
|
5528
|
+
hasNext: data.page.has_next ? true : false,
|
|
5529
|
+
nextId: data.page.next_id,
|
|
5530
|
+
});
|
|
5531
|
+
return data;
|
|
5532
|
+
};
|
|
5533
|
+
paginator.setCallback(callback.bind(this));
|
|
5534
|
+
return paginator;
|
|
5535
|
+
}
|
|
5536
|
+
|
|
5546
5537
|
/**
|
|
5547
5538
|
* @param {CatalogPlatformValidator.ListHSNCodesParam} arg - Arg object
|
|
5548
5539
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5549
5540
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5550
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5541
|
+
* @returns {Promise<CatalogPlatformModel.HSNCodesResponseSchema>} - Success response
|
|
5551
5542
|
* @name listHSNCodes
|
|
5552
|
-
* @summary: List HSN codes
|
|
5553
|
-
* @description: Retrieve a list of Harmonized System Nomenclature (HSN) codes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listHSNCodes/).
|
|
5543
|
+
* @summary: List HSN codes
|
|
5544
|
+
* @description: Retrieve a list of Harmonized System Nomenclature (HSN) codes for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listHSNCodes/).
|
|
5554
5545
|
*/
|
|
5555
5546
|
async listHSNCodes(
|
|
5556
5547
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5585,7 +5576,7 @@ class Catalog {
|
|
|
5585
5576
|
const response = await PlatformAPIClient.execute(
|
|
5586
5577
|
this.config,
|
|
5587
5578
|
"get",
|
|
5588
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/hsn
|
|
5579
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/hsn/`,
|
|
5589
5580
|
query_params,
|
|
5590
5581
|
undefined,
|
|
5591
5582
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5599,7 +5590,7 @@ class Catalog {
|
|
|
5599
5590
|
|
|
5600
5591
|
const {
|
|
5601
5592
|
error: res_error,
|
|
5602
|
-
} = CatalogPlatformModel.
|
|
5593
|
+
} = CatalogPlatformModel.HSNCodesResponseSchema().validate(responseData, {
|
|
5603
5594
|
abortEarly: false,
|
|
5604
5595
|
allowUnknown: true,
|
|
5605
5596
|
});
|
|
@@ -5622,12 +5613,12 @@ class Catalog {
|
|
|
5622
5613
|
* @param {CatalogPlatformValidator.ListInventoryExportParam} arg - Arg object
|
|
5623
5614
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5624
5615
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5625
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5616
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportJobListResponseSchema>}
|
|
5626
5617
|
* - Success response
|
|
5627
5618
|
*
|
|
5628
5619
|
* @name listInventoryExport
|
|
5629
|
-
* @summary: List inventory
|
|
5630
|
-
* @description:
|
|
5620
|
+
* @summary: List inventory export jobs
|
|
5621
|
+
* @description: Retrieve the history of inventory export jobs associated with the company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listInventoryExport/).
|
|
5631
5622
|
*/
|
|
5632
5623
|
async listInventoryExport(
|
|
5633
5624
|
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
@@ -5684,7 +5675,7 @@ class Catalog {
|
|
|
5684
5675
|
const response = await PlatformAPIClient.execute(
|
|
5685
5676
|
this.config,
|
|
5686
5677
|
"get",
|
|
5687
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download
|
|
5678
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download/`,
|
|
5688
5679
|
query_params,
|
|
5689
5680
|
undefined,
|
|
5690
5681
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5698,7 +5689,7 @@ class Catalog {
|
|
|
5698
5689
|
|
|
5699
5690
|
const {
|
|
5700
5691
|
error: res_error,
|
|
5701
|
-
} = CatalogPlatformModel.
|
|
5692
|
+
} = CatalogPlatformModel.InventoryExportJobListResponseSchema().validate(
|
|
5702
5693
|
responseData,
|
|
5703
5694
|
{ abortEarly: false, allowUnknown: true }
|
|
5704
5695
|
);
|
|
@@ -5721,10 +5712,10 @@ class Catalog {
|
|
|
5721
5712
|
* @param {CatalogPlatformValidator.ListProductTemplateParam} arg - Arg object
|
|
5722
5713
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5723
5714
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5724
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5715
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesResponseSchema>} - Success response
|
|
5725
5716
|
* @name listProductTemplate
|
|
5726
|
-
* @summary: List product templates
|
|
5727
|
-
* @description: Allows you to list all product templates
|
|
5717
|
+
* @summary: List product templates
|
|
5718
|
+
* @description: Allows you to list all product templates for a specific company. also can filter by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplate/).
|
|
5728
5719
|
*/
|
|
5729
5720
|
async listProductTemplate(
|
|
5730
5721
|
{ department, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5764,7 +5755,7 @@ class Catalog {
|
|
|
5764
5755
|
const response = await PlatformAPIClient.execute(
|
|
5765
5756
|
this.config,
|
|
5766
5757
|
"get",
|
|
5767
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates
|
|
5758
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/`,
|
|
5768
5759
|
query_params,
|
|
5769
5760
|
undefined,
|
|
5770
5761
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5778,7 +5769,7 @@ class Catalog {
|
|
|
5778
5769
|
|
|
5779
5770
|
const {
|
|
5780
5771
|
error: res_error,
|
|
5781
|
-
} = CatalogPlatformModel.
|
|
5772
|
+
} = CatalogPlatformModel.TemplatesResponseSchema().validate(responseData, {
|
|
5782
5773
|
abortEarly: false,
|
|
5783
5774
|
allowUnknown: true,
|
|
5784
5775
|
});
|
|
@@ -5803,17 +5794,15 @@ class Catalog {
|
|
|
5803
5794
|
*
|
|
5804
5795
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5805
5796
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5806
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5797
|
+
* @returns {Promise<CatalogPlatformModel.ProdcutTemplateCategoriesResponseSchema>}
|
|
5807
5798
|
* - Success response
|
|
5808
5799
|
*
|
|
5809
5800
|
* @name listProductTemplateCategories
|
|
5810
|
-
* @summary: List product template categories
|
|
5811
|
-
* @description: Allows you to list all product categories values for the departments specified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplateCategories/).
|
|
5801
|
+
* @summary: List product template categories
|
|
5802
|
+
* @description: Allows you to list all product template categories values for the departments specified for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplateCategories/).
|
|
5812
5803
|
*/
|
|
5813
5804
|
async listProductTemplateCategories(
|
|
5814
|
-
{ departments, itemType,
|
|
5815
|
-
requestHeaders: {},
|
|
5816
|
-
},
|
|
5805
|
+
{ departments, itemType, requestHeaders } = { requestHeaders: {} },
|
|
5817
5806
|
{ responseHeaders } = { responseHeaders: false }
|
|
5818
5807
|
) {
|
|
5819
5808
|
const {
|
|
@@ -5822,9 +5811,6 @@ class Catalog {
|
|
|
5822
5811
|
{
|
|
5823
5812
|
departments,
|
|
5824
5813
|
itemType,
|
|
5825
|
-
pageSize,
|
|
5826
|
-
pageNo,
|
|
5827
|
-
q,
|
|
5828
5814
|
},
|
|
5829
5815
|
{ abortEarly: false, allowUnknown: true }
|
|
5830
5816
|
);
|
|
@@ -5839,9 +5825,6 @@ class Catalog {
|
|
|
5839
5825
|
{
|
|
5840
5826
|
departments,
|
|
5841
5827
|
itemType,
|
|
5842
|
-
pageSize,
|
|
5843
|
-
pageNo,
|
|
5844
|
-
q,
|
|
5845
5828
|
},
|
|
5846
5829
|
{ abortEarly: false, allowUnknown: false }
|
|
5847
5830
|
);
|
|
@@ -5855,16 +5838,13 @@ class Catalog {
|
|
|
5855
5838
|
const query_params = {};
|
|
5856
5839
|
query_params["departments"] = departments;
|
|
5857
5840
|
query_params["item_type"] = itemType;
|
|
5858
|
-
query_params["page_size"] = pageSize;
|
|
5859
|
-
query_params["page_no"] = pageNo;
|
|
5860
|
-
query_params["q"] = q;
|
|
5861
5841
|
|
|
5862
5842
|
const xHeaders = {};
|
|
5863
5843
|
|
|
5864
5844
|
const response = await PlatformAPIClient.execute(
|
|
5865
5845
|
this.config,
|
|
5866
5846
|
"get",
|
|
5867
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/categories
|
|
5847
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/categories/`,
|
|
5868
5848
|
query_params,
|
|
5869
5849
|
undefined,
|
|
5870
5850
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5878,7 +5858,7 @@ class Catalog {
|
|
|
5878
5858
|
|
|
5879
5859
|
const {
|
|
5880
5860
|
error: res_error,
|
|
5881
|
-
} = CatalogPlatformModel.
|
|
5861
|
+
} = CatalogPlatformModel.ProdcutTemplateCategoriesResponseSchema().validate(
|
|
5882
5862
|
responseData,
|
|
5883
5863
|
{ abortEarly: false, allowUnknown: true }
|
|
5884
5864
|
);
|
|
@@ -5898,27 +5878,26 @@ class Catalog {
|
|
|
5898
5878
|
}
|
|
5899
5879
|
|
|
5900
5880
|
/**
|
|
5901
|
-
* @param {CatalogPlatformValidator.
|
|
5881
|
+
* @param {CatalogPlatformValidator.ListProductTemplateExportDetailsParam} arg
|
|
5882
|
+
* - Arg object
|
|
5883
|
+
*
|
|
5902
5884
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5903
5885
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5904
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5905
|
-
* Success response
|
|
5906
|
-
*
|
|
5907
|
-
* @
|
|
5908
|
-
* @
|
|
5886
|
+
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponseSchema>}
|
|
5887
|
+
* - Success response
|
|
5888
|
+
*
|
|
5889
|
+
* @name listProductTemplateExportDetails
|
|
5890
|
+
* @summary: List export product templates
|
|
5891
|
+
* @description: Retrieve export details related to product templates for a specific company. Can view details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplateExportDetails/).
|
|
5909
5892
|
*/
|
|
5910
|
-
async
|
|
5911
|
-
{
|
|
5893
|
+
async listProductTemplateExportDetails(
|
|
5894
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
5912
5895
|
{ responseHeaders } = { responseHeaders: false }
|
|
5913
5896
|
) {
|
|
5914
5897
|
const {
|
|
5915
5898
|
error,
|
|
5916
|
-
} = CatalogPlatformValidator.
|
|
5917
|
-
{
|
|
5918
|
-
filter,
|
|
5919
|
-
templateTag,
|
|
5920
|
-
itemType,
|
|
5921
|
-
},
|
|
5899
|
+
} = CatalogPlatformValidator.listProductTemplateExportDetails().validate(
|
|
5900
|
+
{},
|
|
5922
5901
|
{ abortEarly: false, allowUnknown: true }
|
|
5923
5902
|
);
|
|
5924
5903
|
if (error) {
|
|
@@ -5928,32 +5907,25 @@ class Catalog {
|
|
|
5928
5907
|
// Showing warrnings if extra unknown parameters are found
|
|
5929
5908
|
const {
|
|
5930
5909
|
error: warrning,
|
|
5931
|
-
} = CatalogPlatformValidator.
|
|
5932
|
-
{
|
|
5933
|
-
filter,
|
|
5934
|
-
templateTag,
|
|
5935
|
-
itemType,
|
|
5936
|
-
},
|
|
5910
|
+
} = CatalogPlatformValidator.listProductTemplateExportDetails().validate(
|
|
5911
|
+
{},
|
|
5937
5912
|
{ abortEarly: false, allowUnknown: false }
|
|
5938
5913
|
);
|
|
5939
5914
|
if (warrning) {
|
|
5940
5915
|
Logger({
|
|
5941
5916
|
level: "WARN",
|
|
5942
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5917
|
+
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplateExportDetails \n ${warrning}`,
|
|
5943
5918
|
});
|
|
5944
5919
|
}
|
|
5945
5920
|
|
|
5946
5921
|
const query_params = {};
|
|
5947
|
-
query_params["filter"] = filter;
|
|
5948
|
-
query_params["template_tag"] = templateTag;
|
|
5949
|
-
query_params["item_type"] = itemType;
|
|
5950
5922
|
|
|
5951
5923
|
const xHeaders = {};
|
|
5952
5924
|
|
|
5953
5925
|
const response = await PlatformAPIClient.execute(
|
|
5954
5926
|
this.config,
|
|
5955
5927
|
"get",
|
|
5956
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/downloads
|
|
5928
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/downloads/`,
|
|
5957
5929
|
query_params,
|
|
5958
5930
|
undefined,
|
|
5959
5931
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5967,7 +5939,7 @@ class Catalog {
|
|
|
5967
5939
|
|
|
5968
5940
|
const {
|
|
5969
5941
|
error: res_error,
|
|
5970
|
-
} = CatalogPlatformModel.
|
|
5942
|
+
} = CatalogPlatformModel.ProductDownloadsResponseSchema().validate(
|
|
5971
5943
|
responseData,
|
|
5972
5944
|
{ abortEarly: false, allowUnknown: true }
|
|
5973
5945
|
);
|
|
@@ -5978,7 +5950,7 @@ class Catalog {
|
|
|
5978
5950
|
} else {
|
|
5979
5951
|
Logger({
|
|
5980
5952
|
level: "WARN",
|
|
5981
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5953
|
+
message: `Response Validation Warnings for platform > Catalog > listProductTemplateExportDetails \n ${res_error}`,
|
|
5982
5954
|
});
|
|
5983
5955
|
}
|
|
5984
5956
|
}
|
|
@@ -5987,26 +5959,26 @@ class Catalog {
|
|
|
5987
5959
|
}
|
|
5988
5960
|
|
|
5989
5961
|
/**
|
|
5990
|
-
* @param {CatalogPlatformValidator.
|
|
5962
|
+
* @param {CatalogPlatformValidator.ListTemplateBrandTypeValuesParam} arg - Arg object
|
|
5991
5963
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5992
5964
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5993
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5994
|
-
*
|
|
5995
|
-
*
|
|
5996
|
-
* @
|
|
5997
|
-
* @
|
|
5998
|
-
* @description: This API helps to edit notification_emails and status of export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/patchInventoryExportDetail/).
|
|
5965
|
+
* @returns {Promise<CatalogPlatformModel.ProductConfigurationDownloads>} -
|
|
5966
|
+
* Success response
|
|
5967
|
+
* @name listTemplateBrandTypeValues
|
|
5968
|
+
* @summary: List template brand
|
|
5969
|
+
* @description: Retrieve values related to template brand types for a specific company. The filter type query parameter defines what type of data to return. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listTemplateBrandTypeValues/).
|
|
5999
5970
|
*/
|
|
6000
|
-
async
|
|
6001
|
-
{
|
|
5971
|
+
async listTemplateBrandTypeValues(
|
|
5972
|
+
{ filter, templateTag, itemType, requestHeaders } = { requestHeaders: {} },
|
|
6002
5973
|
{ responseHeaders } = { responseHeaders: false }
|
|
6003
5974
|
) {
|
|
6004
5975
|
const {
|
|
6005
5976
|
error,
|
|
6006
|
-
} = CatalogPlatformValidator.
|
|
5977
|
+
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
6007
5978
|
{
|
|
6008
|
-
|
|
6009
|
-
|
|
5979
|
+
filter,
|
|
5980
|
+
templateTag,
|
|
5981
|
+
itemType,
|
|
6010
5982
|
},
|
|
6011
5983
|
{ abortEarly: false, allowUnknown: true }
|
|
6012
5984
|
);
|
|
@@ -6017,30 +5989,34 @@ class Catalog {
|
|
|
6017
5989
|
// Showing warrnings if extra unknown parameters are found
|
|
6018
5990
|
const {
|
|
6019
5991
|
error: warrning,
|
|
6020
|
-
} = CatalogPlatformValidator.
|
|
5992
|
+
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
6021
5993
|
{
|
|
6022
|
-
|
|
6023
|
-
|
|
5994
|
+
filter,
|
|
5995
|
+
templateTag,
|
|
5996
|
+
itemType,
|
|
6024
5997
|
},
|
|
6025
5998
|
{ abortEarly: false, allowUnknown: false }
|
|
6026
5999
|
);
|
|
6027
6000
|
if (warrning) {
|
|
6028
6001
|
Logger({
|
|
6029
6002
|
level: "WARN",
|
|
6030
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6003
|
+
message: `Parameter Validation warrnings for platform > Catalog > listTemplateBrandTypeValues \n ${warrning}`,
|
|
6031
6004
|
});
|
|
6032
6005
|
}
|
|
6033
6006
|
|
|
6034
6007
|
const query_params = {};
|
|
6008
|
+
query_params["filter"] = filter;
|
|
6009
|
+
query_params["template_tag"] = templateTag;
|
|
6010
|
+
query_params["item_type"] = itemType;
|
|
6035
6011
|
|
|
6036
6012
|
const xHeaders = {};
|
|
6037
6013
|
|
|
6038
6014
|
const response = await PlatformAPIClient.execute(
|
|
6039
6015
|
this.config,
|
|
6040
|
-
"
|
|
6041
|
-
`/service/platform/catalog/
|
|
6016
|
+
"get",
|
|
6017
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/downloads/configuration/`,
|
|
6042
6018
|
query_params,
|
|
6043
|
-
|
|
6019
|
+
undefined,
|
|
6044
6020
|
{ ...xHeaders, ...requestHeaders },
|
|
6045
6021
|
{ responseHeaders }
|
|
6046
6022
|
);
|
|
@@ -6052,7 +6028,7 @@ class Catalog {
|
|
|
6052
6028
|
|
|
6053
6029
|
const {
|
|
6054
6030
|
error: res_error,
|
|
6055
|
-
} = CatalogPlatformModel.
|
|
6031
|
+
} = CatalogPlatformModel.ProductConfigurationDownloads().validate(
|
|
6056
6032
|
responseData,
|
|
6057
6033
|
{ abortEarly: false, allowUnknown: true }
|
|
6058
6034
|
);
|
|
@@ -6063,7 +6039,7 @@ class Catalog {
|
|
|
6063
6039
|
} else {
|
|
6064
6040
|
Logger({
|
|
6065
6041
|
level: "WARN",
|
|
6066
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6042
|
+
message: `Response Validation Warnings for platform > Catalog > listTemplateBrandTypeValues \n ${res_error}`,
|
|
6067
6043
|
});
|
|
6068
6044
|
}
|
|
6069
6045
|
}
|
|
@@ -6072,24 +6048,21 @@ class Catalog {
|
|
|
6072
6048
|
}
|
|
6073
6049
|
|
|
6074
6050
|
/**
|
|
6075
|
-
* @param {CatalogPlatformValidator.
|
|
6051
|
+
* @param {CatalogPlatformValidator.UpdateHsnCodeParam} arg - Arg object
|
|
6076
6052
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6077
6053
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6078
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6079
|
-
*
|
|
6080
|
-
* @
|
|
6081
|
-
* @
|
|
6082
|
-
* @description: This API helps to edit notification_emails and status of export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/patchProductExportDetail/).
|
|
6054
|
+
* @returns {Promise<CatalogPlatformModel.HsnCode>} - Success response
|
|
6055
|
+
* @name updateHsnCode
|
|
6056
|
+
* @summary: Update HSN code
|
|
6057
|
+
* @description: Modify the HSN code associated with a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateHsnCode/).
|
|
6083
6058
|
*/
|
|
6084
|
-
async
|
|
6085
|
-
{
|
|
6059
|
+
async updateHsnCode(
|
|
6060
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
6086
6061
|
{ responseHeaders } = { responseHeaders: false }
|
|
6087
6062
|
) {
|
|
6088
|
-
const {
|
|
6089
|
-
error,
|
|
6090
|
-
} = CatalogPlatformValidator.patchProductExportDetail().validate(
|
|
6063
|
+
const { error } = CatalogPlatformValidator.updateHsnCode().validate(
|
|
6091
6064
|
{
|
|
6092
|
-
|
|
6065
|
+
id,
|
|
6093
6066
|
body,
|
|
6094
6067
|
},
|
|
6095
6068
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6101,9 +6074,9 @@ class Catalog {
|
|
|
6101
6074
|
// Showing warrnings if extra unknown parameters are found
|
|
6102
6075
|
const {
|
|
6103
6076
|
error: warrning,
|
|
6104
|
-
} = CatalogPlatformValidator.
|
|
6077
|
+
} = CatalogPlatformValidator.updateHsnCode().validate(
|
|
6105
6078
|
{
|
|
6106
|
-
|
|
6079
|
+
id,
|
|
6107
6080
|
body,
|
|
6108
6081
|
},
|
|
6109
6082
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6111,7 +6084,7 @@ class Catalog {
|
|
|
6111
6084
|
if (warrning) {
|
|
6112
6085
|
Logger({
|
|
6113
6086
|
level: "WARN",
|
|
6114
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6087
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateHsnCode \n ${warrning}`,
|
|
6115
6088
|
});
|
|
6116
6089
|
}
|
|
6117
6090
|
|
|
@@ -6121,8 +6094,8 @@ class Catalog {
|
|
|
6121
6094
|
|
|
6122
6095
|
const response = await PlatformAPIClient.execute(
|
|
6123
6096
|
this.config,
|
|
6124
|
-
"
|
|
6125
|
-
`/service/platform/catalog/
|
|
6097
|
+
"put",
|
|
6098
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
|
|
6126
6099
|
query_params,
|
|
6127
6100
|
body,
|
|
6128
6101
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6136,10 +6109,10 @@ class Catalog {
|
|
|
6136
6109
|
|
|
6137
6110
|
const {
|
|
6138
6111
|
error: res_error,
|
|
6139
|
-
} = CatalogPlatformModel.
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
);
|
|
6112
|
+
} = CatalogPlatformModel.HsnCode().validate(responseData, {
|
|
6113
|
+
abortEarly: false,
|
|
6114
|
+
allowUnknown: true,
|
|
6115
|
+
});
|
|
6143
6116
|
|
|
6144
6117
|
if (res_error) {
|
|
6145
6118
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6147,7 +6120,7 @@ class Catalog {
|
|
|
6147
6120
|
} else {
|
|
6148
6121
|
Logger({
|
|
6149
6122
|
level: "WARN",
|
|
6150
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6123
|
+
message: `Response Validation Warnings for platform > Catalog > updateHsnCode \n ${res_error}`,
|
|
6151
6124
|
});
|
|
6152
6125
|
}
|
|
6153
6126
|
}
|
|
@@ -6156,21 +6129,21 @@ class Catalog {
|
|
|
6156
6129
|
}
|
|
6157
6130
|
|
|
6158
6131
|
/**
|
|
6159
|
-
* @param {CatalogPlatformValidator.
|
|
6132
|
+
* @param {CatalogPlatformValidator.UpdateInventoriesParam} arg - Arg object
|
|
6160
6133
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6161
6134
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6162
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6163
|
-
*
|
|
6164
|
-
* @
|
|
6165
|
-
* @
|
|
6135
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponseSchema>} -
|
|
6136
|
+
* Success response
|
|
6137
|
+
* @name updateInventories
|
|
6138
|
+
* @summary: Update inventories
|
|
6139
|
+
* @description: Allows to add Inventory for particular size and selling location. for associated companies - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateInventories/).
|
|
6166
6140
|
*/
|
|
6167
|
-
async
|
|
6168
|
-
{
|
|
6141
|
+
async updateInventories(
|
|
6142
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
6169
6143
|
{ responseHeaders } = { responseHeaders: false }
|
|
6170
6144
|
) {
|
|
6171
|
-
const { error } = CatalogPlatformValidator.
|
|
6145
|
+
const { error } = CatalogPlatformValidator.updateInventories().validate(
|
|
6172
6146
|
{
|
|
6173
|
-
uid,
|
|
6174
6147
|
body,
|
|
6175
6148
|
},
|
|
6176
6149
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6182,9 +6155,8 @@ class Catalog {
|
|
|
6182
6155
|
// Showing warrnings if extra unknown parameters are found
|
|
6183
6156
|
const {
|
|
6184
6157
|
error: warrning,
|
|
6185
|
-
} = CatalogPlatformValidator.
|
|
6158
|
+
} = CatalogPlatformValidator.updateInventories().validate(
|
|
6186
6159
|
{
|
|
6187
|
-
uid,
|
|
6188
6160
|
body,
|
|
6189
6161
|
},
|
|
6190
6162
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6192,7 +6164,7 @@ class Catalog {
|
|
|
6192
6164
|
if (warrning) {
|
|
6193
6165
|
Logger({
|
|
6194
6166
|
level: "WARN",
|
|
6195
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6167
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateInventories \n ${warrning}`,
|
|
6196
6168
|
});
|
|
6197
6169
|
}
|
|
6198
6170
|
|
|
@@ -6202,8 +6174,8 @@ class Catalog {
|
|
|
6202
6174
|
|
|
6203
6175
|
const response = await PlatformAPIClient.execute(
|
|
6204
6176
|
this.config,
|
|
6205
|
-
"
|
|
6206
|
-
`/service/platform/catalog/
|
|
6177
|
+
"post",
|
|
6178
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/`,
|
|
6207
6179
|
query_params,
|
|
6208
6180
|
body,
|
|
6209
6181
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6217,10 +6189,10 @@ class Catalog {
|
|
|
6217
6189
|
|
|
6218
6190
|
const {
|
|
6219
6191
|
error: res_error,
|
|
6220
|
-
} = CatalogPlatformModel.
|
|
6221
|
-
|
|
6222
|
-
allowUnknown: true
|
|
6223
|
-
|
|
6192
|
+
} = CatalogPlatformModel.InventoryUpdateResponseSchema().validate(
|
|
6193
|
+
responseData,
|
|
6194
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6195
|
+
);
|
|
6224
6196
|
|
|
6225
6197
|
if (res_error) {
|
|
6226
6198
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6228,7 +6200,7 @@ class Catalog {
|
|
|
6228
6200
|
} else {
|
|
6229
6201
|
Logger({
|
|
6230
6202
|
level: "WARN",
|
|
6231
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6203
|
+
message: `Response Validation Warnings for platform > Catalog > updateInventories \n ${res_error}`,
|
|
6232
6204
|
});
|
|
6233
6205
|
}
|
|
6234
6206
|
}
|
|
@@ -6237,21 +6209,26 @@ class Catalog {
|
|
|
6237
6209
|
}
|
|
6238
6210
|
|
|
6239
6211
|
/**
|
|
6240
|
-
* @param {CatalogPlatformValidator.
|
|
6212
|
+
* @param {CatalogPlatformValidator.UpdateLocationPriceParam} arg - Arg object
|
|
6241
6213
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6242
6214
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6243
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6244
|
-
*
|
|
6245
|
-
*
|
|
6246
|
-
* @
|
|
6215
|
+
* @returns {Promise<CatalogPlatformModel.LocationPriceQuantitySuccessResponseSchema>}
|
|
6216
|
+
* - Success response
|
|
6217
|
+
*
|
|
6218
|
+
* @name updateLocationPrice
|
|
6219
|
+
* @summary: Update an Article Price
|
|
6220
|
+
* @description: enables you to update article price for a specific size and selling location (store). The price updates will be reflected instantly after the API call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateLocationPrice/).
|
|
6247
6221
|
*/
|
|
6248
|
-
async
|
|
6249
|
-
{
|
|
6222
|
+
async updateLocationPrice(
|
|
6223
|
+
{ storeId, sellerIdentifier, body, requestHeaders } = {
|
|
6224
|
+
requestHeaders: {},
|
|
6225
|
+
},
|
|
6250
6226
|
{ responseHeaders } = { responseHeaders: false }
|
|
6251
6227
|
) {
|
|
6252
|
-
const { error } = CatalogPlatformValidator.
|
|
6228
|
+
const { error } = CatalogPlatformValidator.updateLocationPrice().validate(
|
|
6253
6229
|
{
|
|
6254
|
-
|
|
6230
|
+
storeId,
|
|
6231
|
+
sellerIdentifier,
|
|
6255
6232
|
body,
|
|
6256
6233
|
},
|
|
6257
6234
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6263,9 +6240,10 @@ class Catalog {
|
|
|
6263
6240
|
// Showing warrnings if extra unknown parameters are found
|
|
6264
6241
|
const {
|
|
6265
6242
|
error: warrning,
|
|
6266
|
-
} = CatalogPlatformValidator.
|
|
6243
|
+
} = CatalogPlatformValidator.updateLocationPrice().validate(
|
|
6267
6244
|
{
|
|
6268
|
-
|
|
6245
|
+
storeId,
|
|
6246
|
+
sellerIdentifier,
|
|
6269
6247
|
body,
|
|
6270
6248
|
},
|
|
6271
6249
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6273,7 +6251,7 @@ class Catalog {
|
|
|
6273
6251
|
if (warrning) {
|
|
6274
6252
|
Logger({
|
|
6275
6253
|
level: "WARN",
|
|
6276
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6254
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateLocationPrice \n ${warrning}`,
|
|
6277
6255
|
});
|
|
6278
6256
|
}
|
|
6279
6257
|
|
|
@@ -6283,8 +6261,8 @@ class Catalog {
|
|
|
6283
6261
|
|
|
6284
6262
|
const response = await PlatformAPIClient.execute(
|
|
6285
6263
|
this.config,
|
|
6286
|
-
"
|
|
6287
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
6264
|
+
"post",
|
|
6265
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/store/${storeId}/identifier/${sellerIdentifier}/price`,
|
|
6288
6266
|
query_params,
|
|
6289
6267
|
body,
|
|
6290
6268
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6298,10 +6276,10 @@ class Catalog {
|
|
|
6298
6276
|
|
|
6299
6277
|
const {
|
|
6300
6278
|
error: res_error,
|
|
6301
|
-
} = CatalogPlatformModel.
|
|
6302
|
-
|
|
6303
|
-
allowUnknown: true
|
|
6304
|
-
|
|
6279
|
+
} = CatalogPlatformModel.LocationPriceQuantitySuccessResponseSchema().validate(
|
|
6280
|
+
responseData,
|
|
6281
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6282
|
+
);
|
|
6305
6283
|
|
|
6306
6284
|
if (res_error) {
|
|
6307
6285
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6309,7 +6287,7 @@ class Catalog {
|
|
|
6309
6287
|
} else {
|
|
6310
6288
|
Logger({
|
|
6311
6289
|
level: "WARN",
|
|
6312
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6290
|
+
message: `Response Validation Warnings for platform > Catalog > updateLocationPrice \n ${res_error}`,
|
|
6313
6291
|
});
|
|
6314
6292
|
}
|
|
6315
6293
|
}
|
|
@@ -6318,20 +6296,28 @@ class Catalog {
|
|
|
6318
6296
|
}
|
|
6319
6297
|
|
|
6320
6298
|
/**
|
|
6321
|
-
* @param {CatalogPlatformValidator.
|
|
6299
|
+
* @param {CatalogPlatformValidator.UpdateLocationQuantityParam} arg - Arg object
|
|
6322
6300
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6323
6301
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6324
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6325
|
-
*
|
|
6326
|
-
*
|
|
6327
|
-
* @
|
|
6302
|
+
* @returns {Promise<CatalogPlatformModel.LocationPriceQuantitySuccessResponseSchema>}
|
|
6303
|
+
* - Success response
|
|
6304
|
+
*
|
|
6305
|
+
* @name updateLocationQuantity
|
|
6306
|
+
* @summary: Update an Article Quantity
|
|
6307
|
+
* @description: enables you to update article quantity for a specific size and selling location (store). The quantity updates will be reflected instantly after the API call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateLocationQuantity/).
|
|
6328
6308
|
*/
|
|
6329
|
-
async
|
|
6330
|
-
{ body, requestHeaders } = {
|
|
6309
|
+
async updateLocationQuantity(
|
|
6310
|
+
{ storeId, sellerIdentifier, body, requestHeaders } = {
|
|
6311
|
+
requestHeaders: {},
|
|
6312
|
+
},
|
|
6331
6313
|
{ responseHeaders } = { responseHeaders: false }
|
|
6332
6314
|
) {
|
|
6333
|
-
const {
|
|
6315
|
+
const {
|
|
6316
|
+
error,
|
|
6317
|
+
} = CatalogPlatformValidator.updateLocationQuantity().validate(
|
|
6334
6318
|
{
|
|
6319
|
+
storeId,
|
|
6320
|
+
sellerIdentifier,
|
|
6335
6321
|
body,
|
|
6336
6322
|
},
|
|
6337
6323
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6343,8 +6329,10 @@ class Catalog {
|
|
|
6343
6329
|
// Showing warrnings if extra unknown parameters are found
|
|
6344
6330
|
const {
|
|
6345
6331
|
error: warrning,
|
|
6346
|
-
} = CatalogPlatformValidator.
|
|
6332
|
+
} = CatalogPlatformValidator.updateLocationQuantity().validate(
|
|
6347
6333
|
{
|
|
6334
|
+
storeId,
|
|
6335
|
+
sellerIdentifier,
|
|
6348
6336
|
body,
|
|
6349
6337
|
},
|
|
6350
6338
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6352,7 +6340,7 @@ class Catalog {
|
|
|
6352
6340
|
if (warrning) {
|
|
6353
6341
|
Logger({
|
|
6354
6342
|
level: "WARN",
|
|
6355
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6343
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateLocationQuantity \n ${warrning}`,
|
|
6356
6344
|
});
|
|
6357
6345
|
}
|
|
6358
6346
|
|
|
@@ -6363,7 +6351,7 @@ class Catalog {
|
|
|
6363
6351
|
const response = await PlatformAPIClient.execute(
|
|
6364
6352
|
this.config,
|
|
6365
6353
|
"post",
|
|
6366
|
-
`/service/platform/catalog/
|
|
6354
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/store/${storeId}/identifier/${sellerIdentifier}/quantity`,
|
|
6367
6355
|
query_params,
|
|
6368
6356
|
body,
|
|
6369
6357
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6377,10 +6365,10 @@ class Catalog {
|
|
|
6377
6365
|
|
|
6378
6366
|
const {
|
|
6379
6367
|
error: res_error,
|
|
6380
|
-
} = CatalogPlatformModel.
|
|
6381
|
-
|
|
6382
|
-
allowUnknown: true
|
|
6383
|
-
|
|
6368
|
+
} = CatalogPlatformModel.LocationPriceQuantitySuccessResponseSchema().validate(
|
|
6369
|
+
responseData,
|
|
6370
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6371
|
+
);
|
|
6384
6372
|
|
|
6385
6373
|
if (res_error) {
|
|
6386
6374
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6388,7 +6376,7 @@ class Catalog {
|
|
|
6388
6376
|
} else {
|
|
6389
6377
|
Logger({
|
|
6390
6378
|
level: "WARN",
|
|
6391
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6379
|
+
message: `Response Validation Warnings for platform > Catalog > updateLocationQuantity \n ${res_error}`,
|
|
6392
6380
|
});
|
|
6393
6381
|
}
|
|
6394
6382
|
}
|
|
@@ -6400,22 +6388,22 @@ class Catalog {
|
|
|
6400
6388
|
* @param {CatalogPlatformValidator.UpdateMarketplaceOptinParam} arg - Arg object
|
|
6401
6389
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6402
6390
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6403
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6391
|
+
* @returns {Promise<CatalogPlatformModel.UpdateMarketplaceOptinResponseSchema>}
|
|
6404
6392
|
* - Success response
|
|
6405
6393
|
*
|
|
6406
6394
|
* @name updateMarketplaceOptin
|
|
6407
6395
|
* @summary: Update marketplace optin
|
|
6408
|
-
* @description:
|
|
6396
|
+
* @description: Allows to update marketplace optin for a company by marketplace_slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateMarketplaceOptin/).
|
|
6409
6397
|
*/
|
|
6410
6398
|
async updateMarketplaceOptin(
|
|
6411
|
-
{
|
|
6399
|
+
{ marketplaceSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
6412
6400
|
{ responseHeaders } = { responseHeaders: false }
|
|
6413
6401
|
) {
|
|
6414
6402
|
const {
|
|
6415
6403
|
error,
|
|
6416
6404
|
} = CatalogPlatformValidator.updateMarketplaceOptin().validate(
|
|
6417
6405
|
{
|
|
6418
|
-
|
|
6406
|
+
marketplaceSlug,
|
|
6419
6407
|
body,
|
|
6420
6408
|
},
|
|
6421
6409
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6429,7 +6417,7 @@ class Catalog {
|
|
|
6429
6417
|
error: warrning,
|
|
6430
6418
|
} = CatalogPlatformValidator.updateMarketplaceOptin().validate(
|
|
6431
6419
|
{
|
|
6432
|
-
|
|
6420
|
+
marketplaceSlug,
|
|
6433
6421
|
body,
|
|
6434
6422
|
},
|
|
6435
6423
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6448,7 +6436,7 @@ class Catalog {
|
|
|
6448
6436
|
const response = await PlatformAPIClient.execute(
|
|
6449
6437
|
this.config,
|
|
6450
6438
|
"put",
|
|
6451
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${
|
|
6439
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplaceSlug}/opt-in`,
|
|
6452
6440
|
query_params,
|
|
6453
6441
|
body,
|
|
6454
6442
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6462,7 +6450,7 @@ class Catalog {
|
|
|
6462
6450
|
|
|
6463
6451
|
const {
|
|
6464
6452
|
error: res_error,
|
|
6465
|
-
} = CatalogPlatformModel.
|
|
6453
|
+
} = CatalogPlatformModel.UpdateMarketplaceOptinResponseSchema().validate(
|
|
6466
6454
|
responseData,
|
|
6467
6455
|
{ abortEarly: false, allowUnknown: true }
|
|
6468
6456
|
);
|
|
@@ -6485,12 +6473,12 @@ class Catalog {
|
|
|
6485
6473
|
* @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object
|
|
6486
6474
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6487
6475
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6488
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6476
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleCreateResponseSchema>}
|
|
6489
6477
|
* - Success response
|
|
6490
6478
|
*
|
|
6491
6479
|
* @name updateProductBundle
|
|
6492
|
-
* @summary: Update
|
|
6493
|
-
* @description: Modify the details of an existing product bundle. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateProductBundle/).
|
|
6480
|
+
* @summary: Update product bundle
|
|
6481
|
+
* @description: Modify the details of an existing product bundle in the catalog associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateProductBundle/).
|
|
6494
6482
|
*/
|
|
6495
6483
|
async updateProductBundle(
|
|
6496
6484
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6531,7 +6519,7 @@ class Catalog {
|
|
|
6531
6519
|
const response = await PlatformAPIClient.execute(
|
|
6532
6520
|
this.config,
|
|
6533
6521
|
"put",
|
|
6534
|
-
`/service/platform/catalog/
|
|
6522
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
|
|
6535
6523
|
query_params,
|
|
6536
6524
|
body,
|
|
6537
6525
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6545,7 +6533,7 @@ class Catalog {
|
|
|
6545
6533
|
|
|
6546
6534
|
const {
|
|
6547
6535
|
error: res_error,
|
|
6548
|
-
} = CatalogPlatformModel.
|
|
6536
|
+
} = CatalogPlatformModel.GetProductBundleCreateResponseSchema().validate(
|
|
6549
6537
|
responseData,
|
|
6550
6538
|
{ abortEarly: false, allowUnknown: true }
|
|
6551
6539
|
);
|
|
@@ -6568,10 +6556,11 @@ class Catalog {
|
|
|
6568
6556
|
* @param {CatalogPlatformValidator.UpdateRealtimeInventoryParam} arg - Arg object
|
|
6569
6557
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6570
6558
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6571
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6559
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponseSchema>} -
|
|
6560
|
+
* Success response
|
|
6572
6561
|
* @name updateRealtimeInventory
|
|
6573
|
-
* @summary: Update
|
|
6574
|
-
* @description:
|
|
6562
|
+
* @summary: Update an inventory
|
|
6563
|
+
* @description: enables you to add inventory for a specific size and selling location (store). The inventory updates will be reflected instantly after the API call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateRealtimeInventory/).
|
|
6575
6564
|
*/
|
|
6576
6565
|
async updateRealtimeInventory(
|
|
6577
6566
|
{ itemId, sellerIdentifier, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6630,10 +6619,10 @@ class Catalog {
|
|
|
6630
6619
|
|
|
6631
6620
|
const {
|
|
6632
6621
|
error: res_error,
|
|
6633
|
-
} = CatalogPlatformModel.
|
|
6634
|
-
|
|
6635
|
-
allowUnknown: true
|
|
6636
|
-
|
|
6622
|
+
} = CatalogPlatformModel.InventoryUpdateResponseSchema().validate(
|
|
6623
|
+
responseData,
|
|
6624
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6625
|
+
);
|
|
6637
6626
|
|
|
6638
6627
|
if (res_error) {
|
|
6639
6628
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6653,10 +6642,10 @@ class Catalog {
|
|
|
6653
6642
|
* @param {CatalogPlatformValidator.UpdateSizeGuideParam} arg - Arg object
|
|
6654
6643
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6655
6644
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6656
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6645
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
6657
6646
|
* @name updateSizeGuide
|
|
6658
|
-
* @summary: Update
|
|
6659
|
-
* @description: Allows to edit a size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSizeGuide/).
|
|
6647
|
+
* @summary: Update size guide
|
|
6648
|
+
* @description: Allows to edit a specific size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSizeGuide/).
|
|
6660
6649
|
*/
|
|
6661
6650
|
async updateSizeGuide(
|
|
6662
6651
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6697,7 +6686,7 @@ class Catalog {
|
|
|
6697
6686
|
const response = await PlatformAPIClient.execute(
|
|
6698
6687
|
this.config,
|
|
6699
6688
|
"put",
|
|
6700
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}
|
|
6689
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
|
|
6701
6690
|
query_params,
|
|
6702
6691
|
body,
|
|
6703
6692
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6711,7 +6700,7 @@ class Catalog {
|
|
|
6711
6700
|
|
|
6712
6701
|
const {
|
|
6713
6702
|
error: res_error,
|
|
6714
|
-
} = CatalogPlatformModel.
|
|
6703
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
6715
6704
|
abortEarly: false,
|
|
6716
6705
|
allowUnknown: true,
|
|
6717
6706
|
});
|
|
@@ -6734,10 +6723,10 @@ class Catalog {
|
|
|
6734
6723
|
* @param {CatalogPlatformValidator.UploadBulkProductsParam} arg - Arg object
|
|
6735
6724
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6736
6725
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6737
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6726
|
+
* @returns {Promise<CatalogPlatformModel.BulkResponseSchema>} - Success response
|
|
6738
6727
|
* @name uploadBulkProducts
|
|
6739
|
-
* @summary: Upload bulk products
|
|
6740
|
-
* @description:
|
|
6728
|
+
* @summary: Upload bulk products
|
|
6729
|
+
* @description: Users can create multiple products by providing the required information needed for product creation in a CSV or Excel file format. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/uploadBulkProducts/).
|
|
6741
6730
|
*/
|
|
6742
6731
|
async uploadBulkProducts(
|
|
6743
6732
|
{ department, productType, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6796,7 +6785,7 @@ class Catalog {
|
|
|
6796
6785
|
|
|
6797
6786
|
const {
|
|
6798
6787
|
error: res_error,
|
|
6799
|
-
} = CatalogPlatformModel.
|
|
6788
|
+
} = CatalogPlatformModel.BulkResponseSchema().validate(responseData, {
|
|
6800
6789
|
abortEarly: false,
|
|
6801
6790
|
allowUnknown: true,
|
|
6802
6791
|
});
|
|
@@ -6815,15 +6804,105 @@ class Catalog {
|
|
|
6815
6804
|
return response;
|
|
6816
6805
|
}
|
|
6817
6806
|
|
|
6807
|
+
/**
|
|
6808
|
+
* @param {CatalogPlatformValidator.ValidateProductGlobalTemplateParam} arg
|
|
6809
|
+
* - Arg object
|
|
6810
|
+
*
|
|
6811
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6812
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6813
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesGlobalValidationResponseSchema>}
|
|
6814
|
+
* - Success response
|
|
6815
|
+
*
|
|
6816
|
+
* @name validateProductGlobalTemplate
|
|
6817
|
+
* @summary: Validate product template
|
|
6818
|
+
* @description: Allows you to list all product templates global validation values for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductGlobalTemplate/).
|
|
6819
|
+
*/
|
|
6820
|
+
async validateProductGlobalTemplate(
|
|
6821
|
+
{ itemType, bulk, requestHeaders } = { requestHeaders: {} },
|
|
6822
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6823
|
+
) {
|
|
6824
|
+
const {
|
|
6825
|
+
error,
|
|
6826
|
+
} = CatalogPlatformValidator.validateProductGlobalTemplate().validate(
|
|
6827
|
+
{
|
|
6828
|
+
itemType,
|
|
6829
|
+
bulk,
|
|
6830
|
+
},
|
|
6831
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6832
|
+
);
|
|
6833
|
+
if (error) {
|
|
6834
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6835
|
+
}
|
|
6836
|
+
|
|
6837
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6838
|
+
const {
|
|
6839
|
+
error: warrning,
|
|
6840
|
+
} = CatalogPlatformValidator.validateProductGlobalTemplate().validate(
|
|
6841
|
+
{
|
|
6842
|
+
itemType,
|
|
6843
|
+
bulk,
|
|
6844
|
+
},
|
|
6845
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6846
|
+
);
|
|
6847
|
+
if (warrning) {
|
|
6848
|
+
Logger({
|
|
6849
|
+
level: "WARN",
|
|
6850
|
+
message: `Parameter Validation warrnings for platform > Catalog > validateProductGlobalTemplate \n ${warrning}`,
|
|
6851
|
+
});
|
|
6852
|
+
}
|
|
6853
|
+
|
|
6854
|
+
const query_params = {};
|
|
6855
|
+
query_params["item_type"] = itemType;
|
|
6856
|
+
query_params["bulk"] = bulk;
|
|
6857
|
+
|
|
6858
|
+
const xHeaders = {};
|
|
6859
|
+
|
|
6860
|
+
const response = await PlatformAPIClient.execute(
|
|
6861
|
+
this.config,
|
|
6862
|
+
"get",
|
|
6863
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/validation/schema/`,
|
|
6864
|
+
query_params,
|
|
6865
|
+
undefined,
|
|
6866
|
+
{ ...xHeaders, ...requestHeaders },
|
|
6867
|
+
{ responseHeaders }
|
|
6868
|
+
);
|
|
6869
|
+
|
|
6870
|
+
let responseData = response;
|
|
6871
|
+
if (responseHeaders) {
|
|
6872
|
+
responseData = response[0];
|
|
6873
|
+
}
|
|
6874
|
+
|
|
6875
|
+
const {
|
|
6876
|
+
error: res_error,
|
|
6877
|
+
} = CatalogPlatformModel.TemplatesGlobalValidationResponseSchema().validate(
|
|
6878
|
+
responseData,
|
|
6879
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6880
|
+
);
|
|
6881
|
+
|
|
6882
|
+
if (res_error) {
|
|
6883
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
6884
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6885
|
+
} else {
|
|
6886
|
+
Logger({
|
|
6887
|
+
level: "WARN",
|
|
6888
|
+
message: `Response Validation Warnings for platform > Catalog > validateProductGlobalTemplate \n ${res_error}`,
|
|
6889
|
+
});
|
|
6890
|
+
}
|
|
6891
|
+
}
|
|
6892
|
+
|
|
6893
|
+
return response;
|
|
6894
|
+
}
|
|
6895
|
+
|
|
6818
6896
|
/**
|
|
6819
6897
|
* @param {CatalogPlatformValidator.ValidateProductTemplateParam} arg - Arg object
|
|
6820
6898
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6821
6899
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6822
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6823
|
-
* Success response
|
|
6900
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesValidationResponseSchema>}
|
|
6901
|
+
* - Success response
|
|
6902
|
+
*
|
|
6824
6903
|
* @name validateProductTemplate
|
|
6825
|
-
* @summary: Validate product template
|
|
6826
|
-
* @description: Allows you to list all product templates validation values for all the fields present in the database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplate/).
|
|
6904
|
+
* @summary: Validate product template
|
|
6905
|
+
* @description: Allows you to list all product templates validation values by its slug for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplate/).
|
|
6827
6906
|
*/
|
|
6828
6907
|
async validateProductTemplate(
|
|
6829
6908
|
{ slug, itemType, bulk, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6870,7 +6949,7 @@ class Catalog {
|
|
|
6870
6949
|
const response = await PlatformAPIClient.execute(
|
|
6871
6950
|
this.config,
|
|
6872
6951
|
"get",
|
|
6873
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/validation/schema
|
|
6952
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/validation/schema/`,
|
|
6874
6953
|
query_params,
|
|
6875
6954
|
undefined,
|
|
6876
6955
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6884,7 +6963,7 @@ class Catalog {
|
|
|
6884
6963
|
|
|
6885
6964
|
const {
|
|
6886
6965
|
error: res_error,
|
|
6887
|
-
} = CatalogPlatformModel.
|
|
6966
|
+
} = CatalogPlatformModel.TemplatesValidationResponseSchema().validate(
|
|
6888
6967
|
responseData,
|
|
6889
6968
|
{ abortEarly: false, allowUnknown: true }
|
|
6890
6969
|
);
|
|
@@ -6909,14 +6988,15 @@ class Catalog {
|
|
|
6909
6988
|
*
|
|
6910
6989
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6911
6990
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6912
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6913
|
-
* Success response
|
|
6991
|
+
* @returns {Promise<CatalogPlatformModel.InventoryValidationResponseSchema>}
|
|
6992
|
+
* - Success response
|
|
6993
|
+
*
|
|
6914
6994
|
* @name validateProductTemplateSchema
|
|
6915
|
-
* @summary: Validate product template schema
|
|
6916
|
-
* @description: Allows you to list all product templates validation values for all the fields present in the database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplateSchema/).
|
|
6995
|
+
* @summary: Validate product template schema
|
|
6996
|
+
* @description: Allows you to list all product templates validation values for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplateSchema/).
|
|
6917
6997
|
*/
|
|
6918
6998
|
async validateProductTemplateSchema(
|
|
6919
|
-
{ itemType,
|
|
6999
|
+
{ itemType, requestHeaders } = { requestHeaders: {} },
|
|
6920
7000
|
{ responseHeaders } = { responseHeaders: false }
|
|
6921
7001
|
) {
|
|
6922
7002
|
const {
|
|
@@ -6924,7 +7004,6 @@ class Catalog {
|
|
|
6924
7004
|
} = CatalogPlatformValidator.validateProductTemplateSchema().validate(
|
|
6925
7005
|
{
|
|
6926
7006
|
itemType,
|
|
6927
|
-
bulk,
|
|
6928
7007
|
},
|
|
6929
7008
|
{ abortEarly: false, allowUnknown: true }
|
|
6930
7009
|
);
|
|
@@ -6938,7 +7017,6 @@ class Catalog {
|
|
|
6938
7017
|
} = CatalogPlatformValidator.validateProductTemplateSchema().validate(
|
|
6939
7018
|
{
|
|
6940
7019
|
itemType,
|
|
6941
|
-
bulk,
|
|
6942
7020
|
},
|
|
6943
7021
|
{ abortEarly: false, allowUnknown: false }
|
|
6944
7022
|
);
|
|
@@ -6951,14 +7029,13 @@ class Catalog {
|
|
|
6951
7029
|
|
|
6952
7030
|
const query_params = {};
|
|
6953
7031
|
query_params["item_type"] = itemType;
|
|
6954
|
-
query_params["bulk"] = bulk;
|
|
6955
7032
|
|
|
6956
7033
|
const xHeaders = {};
|
|
6957
7034
|
|
|
6958
7035
|
const response = await PlatformAPIClient.execute(
|
|
6959
7036
|
this.config,
|
|
6960
7037
|
"get",
|
|
6961
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/validation/schema
|
|
7038
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/validation/schema/`,
|
|
6962
7039
|
query_params,
|
|
6963
7040
|
undefined,
|
|
6964
7041
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6972,7 +7049,7 @@ class Catalog {
|
|
|
6972
7049
|
|
|
6973
7050
|
const {
|
|
6974
7051
|
error: res_error,
|
|
6975
|
-
} = CatalogPlatformModel.
|
|
7052
|
+
} = CatalogPlatformModel.InventoryValidationResponseSchema().validate(
|
|
6976
7053
|
responseData,
|
|
6977
7054
|
{ abortEarly: false, allowUnknown: true }
|
|
6978
7055
|
);
|