@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -14,13 +14,96 @@ class Catalog {
|
|
|
14
14
|
this.config = config;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @param {CatalogPlatformValidator.AddInventoryParam} arg - Arg object
|
|
19
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
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
|
+
*/
|
|
26
|
+
async addInventory(
|
|
27
|
+
{ itemId, size, body, requestHeaders } = { requestHeaders: {} },
|
|
28
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
29
|
+
) {
|
|
30
|
+
const { error } = CatalogPlatformValidator.addInventory().validate(
|
|
31
|
+
{
|
|
32
|
+
itemId,
|
|
33
|
+
size,
|
|
34
|
+
body,
|
|
35
|
+
},
|
|
36
|
+
{ abortEarly: false, allowUnknown: true }
|
|
37
|
+
);
|
|
38
|
+
if (error) {
|
|
39
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Showing warrnings if extra unknown parameters are found
|
|
43
|
+
const {
|
|
44
|
+
error: warrning,
|
|
45
|
+
} = CatalogPlatformValidator.addInventory().validate(
|
|
46
|
+
{
|
|
47
|
+
itemId,
|
|
48
|
+
size,
|
|
49
|
+
body,
|
|
50
|
+
},
|
|
51
|
+
{ abortEarly: false, allowUnknown: false }
|
|
52
|
+
);
|
|
53
|
+
if (warrning) {
|
|
54
|
+
Logger({
|
|
55
|
+
level: "WARN",
|
|
56
|
+
message: `Parameter Validation warrnings for platform > Catalog > addInventory \n ${warrning}`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const query_params = {};
|
|
61
|
+
|
|
62
|
+
const xHeaders = {};
|
|
63
|
+
|
|
64
|
+
const response = await PlatformAPIClient.execute(
|
|
65
|
+
this.config,
|
|
66
|
+
"post",
|
|
67
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
|
|
68
|
+
query_params,
|
|
69
|
+
body,
|
|
70
|
+
{ ...xHeaders, ...requestHeaders },
|
|
71
|
+
{ responseHeaders }
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
let responseData = response;
|
|
75
|
+
if (responseHeaders) {
|
|
76
|
+
responseData = response[0];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const {
|
|
80
|
+
error: res_error,
|
|
81
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
82
|
+
abortEarly: false,
|
|
83
|
+
allowUnknown: true,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
if (res_error) {
|
|
87
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
88
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
89
|
+
} else {
|
|
90
|
+
Logger({
|
|
91
|
+
level: "WARN",
|
|
92
|
+
message: `Response Validation Warnings for platform > Catalog > addInventory \n ${res_error}`,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return response;
|
|
98
|
+
}
|
|
99
|
+
|
|
17
100
|
/**
|
|
18
101
|
* @param {CatalogPlatformValidator.AllSizesParam} arg - Arg object
|
|
19
102
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
103
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
104
|
* @returns {Promise<CatalogPlatformModel.GetAllSizes>} - Success response
|
|
22
105
|
* @name allSizes
|
|
23
|
-
* @summary: Get
|
|
106
|
+
* @summary: Get product sizes
|
|
24
107
|
* @description: Retrieve all available sizes for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/allSizes/).
|
|
25
108
|
*/
|
|
26
109
|
async allSizes(
|
|
@@ -91,13 +174,90 @@ class Catalog {
|
|
|
91
174
|
return response;
|
|
92
175
|
}
|
|
93
176
|
|
|
177
|
+
/**
|
|
178
|
+
* @param {CatalogPlatformValidator.BulkHsnCodeParam} arg - Arg object
|
|
179
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
180
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
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/).
|
|
185
|
+
*/
|
|
186
|
+
async bulkHsnCode(
|
|
187
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
188
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
189
|
+
) {
|
|
190
|
+
const { error } = CatalogPlatformValidator.bulkHsnCode().validate(
|
|
191
|
+
{
|
|
192
|
+
body,
|
|
193
|
+
},
|
|
194
|
+
{ abortEarly: false, allowUnknown: true }
|
|
195
|
+
);
|
|
196
|
+
if (error) {
|
|
197
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Showing warrnings if extra unknown parameters are found
|
|
201
|
+
const { error: warrning } = CatalogPlatformValidator.bulkHsnCode().validate(
|
|
202
|
+
{
|
|
203
|
+
body,
|
|
204
|
+
},
|
|
205
|
+
{ abortEarly: false, allowUnknown: false }
|
|
206
|
+
);
|
|
207
|
+
if (warrning) {
|
|
208
|
+
Logger({
|
|
209
|
+
level: "WARN",
|
|
210
|
+
message: `Parameter Validation warrnings for platform > Catalog > bulkHsnCode \n ${warrning}`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const query_params = {};
|
|
215
|
+
|
|
216
|
+
const xHeaders = {};
|
|
217
|
+
|
|
218
|
+
const response = await PlatformAPIClient.execute(
|
|
219
|
+
this.config,
|
|
220
|
+
"post",
|
|
221
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/bulk/`,
|
|
222
|
+
query_params,
|
|
223
|
+
body,
|
|
224
|
+
{ ...xHeaders, ...requestHeaders },
|
|
225
|
+
{ responseHeaders }
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
let responseData = response;
|
|
229
|
+
if (responseHeaders) {
|
|
230
|
+
responseData = response[0];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const {
|
|
234
|
+
error: res_error,
|
|
235
|
+
} = CatalogPlatformModel.BulkHsnResponseSchema().validate(responseData, {
|
|
236
|
+
abortEarly: false,
|
|
237
|
+
allowUnknown: true,
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
if (res_error) {
|
|
241
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
242
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
243
|
+
} else {
|
|
244
|
+
Logger({
|
|
245
|
+
level: "WARN",
|
|
246
|
+
message: `Response Validation Warnings for platform > Catalog > bulkHsnCode \n ${res_error}`,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return response;
|
|
252
|
+
}
|
|
253
|
+
|
|
94
254
|
/**
|
|
95
255
|
* @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object
|
|
96
256
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
97
257
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
98
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
258
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
99
259
|
* @name createBulkInventory
|
|
100
|
-
* @summary: Create bulk inventory
|
|
260
|
+
* @summary: Create bulk inventory
|
|
101
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/).
|
|
102
262
|
*/
|
|
103
263
|
async createBulkInventory(
|
|
@@ -139,7 +299,7 @@ class Catalog {
|
|
|
139
299
|
const response = await PlatformAPIClient.execute(
|
|
140
300
|
this.config,
|
|
141
301
|
"post",
|
|
142
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}
|
|
302
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}/`,
|
|
143
303
|
query_params,
|
|
144
304
|
body,
|
|
145
305
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -153,7 +313,7 @@ class Catalog {
|
|
|
153
313
|
|
|
154
314
|
const {
|
|
155
315
|
error: res_error,
|
|
156
|
-
} = CatalogPlatformModel.
|
|
316
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
157
317
|
abortEarly: false,
|
|
158
318
|
allowUnknown: true,
|
|
159
319
|
});
|
|
@@ -176,9 +336,9 @@ class Catalog {
|
|
|
176
336
|
* @param {CatalogPlatformValidator.CreateBulkInventoryJobParam} arg - Arg object
|
|
177
337
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
178
338
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
179
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
339
|
+
* @returns {Promise<CatalogPlatformModel.BulkResponseSchema>} - Success response
|
|
180
340
|
* @name createBulkInventoryJob
|
|
181
|
-
* @summary: Create bulk inventory upload job
|
|
341
|
+
* @summary: Create bulk inventory upload job
|
|
182
342
|
* @description: Helps to create a bulk Inventory upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventoryJob/).
|
|
183
343
|
*/
|
|
184
344
|
async createBulkInventoryJob(
|
|
@@ -220,7 +380,7 @@ class Catalog {
|
|
|
220
380
|
const response = await PlatformAPIClient.execute(
|
|
221
381
|
this.config,
|
|
222
382
|
"post",
|
|
223
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk
|
|
383
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
|
|
224
384
|
query_params,
|
|
225
385
|
body,
|
|
226
386
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -234,7 +394,7 @@ class Catalog {
|
|
|
234
394
|
|
|
235
395
|
const {
|
|
236
396
|
error: res_error,
|
|
237
|
-
} = CatalogPlatformModel.
|
|
397
|
+
} = CatalogPlatformModel.BulkResponseSchema().validate(responseData, {
|
|
238
398
|
abortEarly: false,
|
|
239
399
|
allowUnknown: true,
|
|
240
400
|
});
|
|
@@ -257,9 +417,9 @@ class Catalog {
|
|
|
257
417
|
* @param {CatalogPlatformValidator.CreateBulkProductUploadJobParam} arg - Arg object
|
|
258
418
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
259
419
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
260
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
420
|
+
* @returns {Promise<CatalogPlatformModel.BulkResponseSchema>} - Success response
|
|
261
421
|
* @name createBulkProductUploadJob
|
|
262
|
-
* @summary: Create
|
|
422
|
+
* @summary: Create products bulk upload
|
|
263
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/).
|
|
264
424
|
*/
|
|
265
425
|
async createBulkProductUploadJob(
|
|
@@ -315,7 +475,7 @@ class Catalog {
|
|
|
315
475
|
|
|
316
476
|
const {
|
|
317
477
|
error: res_error,
|
|
318
|
-
} = CatalogPlatformModel.
|
|
478
|
+
} = CatalogPlatformModel.BulkResponseSchema().validate(responseData, {
|
|
319
479
|
abortEarly: false,
|
|
320
480
|
allowUnknown: true,
|
|
321
481
|
});
|
|
@@ -338,10 +498,11 @@ class Catalog {
|
|
|
338
498
|
* @param {CatalogPlatformValidator.CreateInventoryExportParam} arg - Arg object
|
|
339
499
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
340
500
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
341
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
501
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportResponseSchema>} -
|
|
502
|
+
* Success response
|
|
342
503
|
* @name createInventoryExport
|
|
343
|
-
* @summary: Create inventory export
|
|
344
|
-
* @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/).
|
|
345
506
|
*/
|
|
346
507
|
async createInventoryExport(
|
|
347
508
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -380,7 +541,7 @@ class Catalog {
|
|
|
380
541
|
const response = await PlatformAPIClient.execute(
|
|
381
542
|
this.config,
|
|
382
543
|
"post",
|
|
383
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download
|
|
544
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download/`,
|
|
384
545
|
query_params,
|
|
385
546
|
body,
|
|
386
547
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -394,10 +555,10 @@ class Catalog {
|
|
|
394
555
|
|
|
395
556
|
const {
|
|
396
557
|
error: res_error,
|
|
397
|
-
} = CatalogPlatformModel.
|
|
398
|
-
|
|
399
|
-
allowUnknown: true
|
|
400
|
-
|
|
558
|
+
} = CatalogPlatformModel.InventoryExportResponseSchema().validate(
|
|
559
|
+
responseData,
|
|
560
|
+
{ abortEarly: false, allowUnknown: true }
|
|
561
|
+
);
|
|
401
562
|
|
|
402
563
|
if (res_error) {
|
|
403
564
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -417,9 +578,10 @@ class Catalog {
|
|
|
417
578
|
* @param {CatalogPlatformValidator.CreateInventoryExportJobParam} arg - Arg object
|
|
418
579
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
419
580
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
420
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
581
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportResponseSchema>} -
|
|
582
|
+
* Success response
|
|
421
583
|
* @name createInventoryExportJob
|
|
422
|
-
* @summary: Create inventory export job
|
|
584
|
+
* @summary: Create inventory export job
|
|
423
585
|
* @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExportJob/).
|
|
424
586
|
*/
|
|
425
587
|
async createInventoryExportJob(
|
|
@@ -461,7 +623,7 @@ class Catalog {
|
|
|
461
623
|
const response = await PlatformAPIClient.execute(
|
|
462
624
|
this.config,
|
|
463
625
|
"post",
|
|
464
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download
|
|
626
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
|
|
465
627
|
query_params,
|
|
466
628
|
body,
|
|
467
629
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -475,10 +637,10 @@ class Catalog {
|
|
|
475
637
|
|
|
476
638
|
const {
|
|
477
639
|
error: res_error,
|
|
478
|
-
} = CatalogPlatformModel.
|
|
479
|
-
|
|
480
|
-
allowUnknown: true
|
|
481
|
-
|
|
640
|
+
} = CatalogPlatformModel.InventoryExportResponseSchema().validate(
|
|
641
|
+
responseData,
|
|
642
|
+
{ abortEarly: false, allowUnknown: true }
|
|
643
|
+
);
|
|
482
644
|
|
|
483
645
|
if (res_error) {
|
|
484
646
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -498,22 +660,22 @@ class Catalog {
|
|
|
498
660
|
* @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object
|
|
499
661
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
500
662
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
501
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
663
|
+
* @returns {Promise<CatalogPlatformModel.CreateMarketplaceOptinResponseSchema>}
|
|
502
664
|
* - Success response
|
|
503
665
|
*
|
|
504
666
|
* @name createMarketplaceOptin
|
|
505
|
-
* @summary: Update
|
|
506
|
-
* @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/).
|
|
507
669
|
*/
|
|
508
670
|
async createMarketplaceOptin(
|
|
509
|
-
{
|
|
671
|
+
{ marketplaceSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
510
672
|
{ responseHeaders } = { responseHeaders: false }
|
|
511
673
|
) {
|
|
512
674
|
const {
|
|
513
675
|
error,
|
|
514
676
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
515
677
|
{
|
|
516
|
-
|
|
678
|
+
marketplaceSlug,
|
|
517
679
|
body,
|
|
518
680
|
},
|
|
519
681
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -527,7 +689,7 @@ class Catalog {
|
|
|
527
689
|
error: warrning,
|
|
528
690
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
529
691
|
{
|
|
530
|
-
|
|
692
|
+
marketplaceSlug,
|
|
531
693
|
body,
|
|
532
694
|
},
|
|
533
695
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -546,7 +708,7 @@ class Catalog {
|
|
|
546
708
|
const response = await PlatformAPIClient.execute(
|
|
547
709
|
this.config,
|
|
548
710
|
"post",
|
|
549
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${
|
|
711
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplaceSlug}/opt-in`,
|
|
550
712
|
query_params,
|
|
551
713
|
body,
|
|
552
714
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -560,7 +722,7 @@ class Catalog {
|
|
|
560
722
|
|
|
561
723
|
const {
|
|
562
724
|
error: res_error,
|
|
563
|
-
} = CatalogPlatformModel.
|
|
725
|
+
} = CatalogPlatformModel.CreateMarketplaceOptinResponseSchema().validate(
|
|
564
726
|
responseData,
|
|
565
727
|
{ abortEarly: false, allowUnknown: true }
|
|
566
728
|
);
|
|
@@ -583,10 +745,10 @@ class Catalog {
|
|
|
583
745
|
* @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object
|
|
584
746
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
585
747
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
586
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
748
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
587
749
|
* @name createProduct
|
|
588
|
-
* @summary: Create
|
|
589
|
-
* @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/).
|
|
590
752
|
*/
|
|
591
753
|
async createProduct(
|
|
592
754
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -625,7 +787,7 @@ class Catalog {
|
|
|
625
787
|
const response = await PlatformAPIClient.execute(
|
|
626
788
|
this.config,
|
|
627
789
|
"post",
|
|
628
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products
|
|
790
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
629
791
|
query_params,
|
|
630
792
|
body,
|
|
631
793
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -639,7 +801,7 @@ class Catalog {
|
|
|
639
801
|
|
|
640
802
|
const {
|
|
641
803
|
error: res_error,
|
|
642
|
-
} = CatalogPlatformModel.
|
|
804
|
+
} = CatalogPlatformModel.SuccessResponseObject().validate(responseData, {
|
|
643
805
|
abortEarly: false,
|
|
644
806
|
allowUnknown: true,
|
|
645
807
|
});
|
|
@@ -662,9 +824,9 @@ class Catalog {
|
|
|
662
824
|
* @param {CatalogPlatformValidator.CreateProductAssetsInBulkParam} arg - Arg object
|
|
663
825
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
664
826
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
665
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
827
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
666
828
|
* @name createProductAssetsInBulk
|
|
667
|
-
* @summary: Create product assets in bulk
|
|
829
|
+
* @summary: Create product assets in bulk
|
|
668
830
|
* @description: Helps to create a bulk asset upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductAssetsInBulk/).
|
|
669
831
|
*/
|
|
670
832
|
async createProductAssetsInBulk(
|
|
@@ -706,7 +868,7 @@ class Catalog {
|
|
|
706
868
|
const response = await PlatformAPIClient.execute(
|
|
707
869
|
this.config,
|
|
708
870
|
"post",
|
|
709
|
-
`/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/`,
|
|
710
872
|
query_params,
|
|
711
873
|
body,
|
|
712
874
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -720,7 +882,7 @@ class Catalog {
|
|
|
720
882
|
|
|
721
883
|
const {
|
|
722
884
|
error: res_error,
|
|
723
|
-
} = CatalogPlatformModel.
|
|
885
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
724
886
|
abortEarly: false,
|
|
725
887
|
allowUnknown: true,
|
|
726
888
|
});
|
|
@@ -743,12 +905,12 @@ class Catalog {
|
|
|
743
905
|
* @param {CatalogPlatformValidator.CreateProductBundleParam} arg - Arg object
|
|
744
906
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
745
907
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
746
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
908
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleCreateResponseSchema>}
|
|
747
909
|
* - Success response
|
|
748
910
|
*
|
|
749
911
|
* @name createProductBundle
|
|
750
|
-
* @summary: Create
|
|
751
|
-
* @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/).
|
|
752
914
|
*/
|
|
753
915
|
async createProductBundle(
|
|
754
916
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -787,7 +949,7 @@ class Catalog {
|
|
|
787
949
|
const response = await PlatformAPIClient.execute(
|
|
788
950
|
this.config,
|
|
789
951
|
"post",
|
|
790
|
-
`/service/platform/catalog/
|
|
952
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
|
|
791
953
|
query_params,
|
|
792
954
|
body,
|
|
793
955
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -801,7 +963,7 @@ class Catalog {
|
|
|
801
963
|
|
|
802
964
|
const {
|
|
803
965
|
error: res_error,
|
|
804
|
-
} = CatalogPlatformModel.
|
|
966
|
+
} = CatalogPlatformModel.GetProductBundleCreateResponseSchema().validate(
|
|
805
967
|
responseData,
|
|
806
968
|
{ abortEarly: false, allowUnknown: true }
|
|
807
969
|
);
|
|
@@ -824,12 +986,12 @@ class Catalog {
|
|
|
824
986
|
* @param {CatalogPlatformValidator.CreateProductExportJobParam} arg - Arg object
|
|
825
987
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
826
988
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
827
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
989
|
+
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponseSchema>}
|
|
828
990
|
* - Success response
|
|
829
991
|
*
|
|
830
992
|
* @name createProductExportJob
|
|
831
|
-
* @summary: Create product export job
|
|
832
|
-
* @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/).
|
|
833
995
|
*/
|
|
834
996
|
async createProductExportJob(
|
|
835
997
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -870,7 +1032,7 @@ class Catalog {
|
|
|
870
1032
|
const response = await PlatformAPIClient.execute(
|
|
871
1033
|
this.config,
|
|
872
1034
|
"post",
|
|
873
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads
|
|
1035
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads/`,
|
|
874
1036
|
query_params,
|
|
875
1037
|
body,
|
|
876
1038
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -884,7 +1046,7 @@ class Catalog {
|
|
|
884
1046
|
|
|
885
1047
|
const {
|
|
886
1048
|
error: res_error,
|
|
887
|
-
} = CatalogPlatformModel.
|
|
1049
|
+
} = CatalogPlatformModel.ProductDownloadsResponseSchema().validate(
|
|
888
1050
|
responseData,
|
|
889
1051
|
{ abortEarly: false, allowUnknown: true }
|
|
890
1052
|
);
|
|
@@ -907,9 +1069,9 @@ class Catalog {
|
|
|
907
1069
|
* @param {CatalogPlatformValidator.CreateProductsInBulkParam} arg - Arg object
|
|
908
1070
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
909
1071
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
910
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1072
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
911
1073
|
* @name createProductsInBulk
|
|
912
|
-
* @summary: Create products in bulk
|
|
1074
|
+
* @summary: Create products in bulk
|
|
913
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/).
|
|
914
1076
|
*/
|
|
915
1077
|
async createProductsInBulk(
|
|
@@ -965,7 +1127,7 @@ class Catalog {
|
|
|
965
1127
|
|
|
966
1128
|
const {
|
|
967
1129
|
error: res_error,
|
|
968
|
-
} = CatalogPlatformModel.
|
|
1130
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
969
1131
|
abortEarly: false,
|
|
970
1132
|
allowUnknown: true,
|
|
971
1133
|
});
|
|
@@ -988,10 +1150,10 @@ class Catalog {
|
|
|
988
1150
|
* @param {CatalogPlatformValidator.CreateSizeGuideParam} arg - Arg object
|
|
989
1151
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
990
1152
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
991
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1153
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
992
1154
|
* @name createSizeGuide
|
|
993
|
-
* @summary: Create
|
|
994
|
-
* @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/).
|
|
995
1157
|
*/
|
|
996
1158
|
async createSizeGuide(
|
|
997
1159
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1044,7 +1206,7 @@ class Catalog {
|
|
|
1044
1206
|
|
|
1045
1207
|
const {
|
|
1046
1208
|
error: res_error,
|
|
1047
|
-
} = CatalogPlatformModel.
|
|
1209
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1048
1210
|
abortEarly: false,
|
|
1049
1211
|
allowUnknown: true,
|
|
1050
1212
|
});
|
|
@@ -1067,9 +1229,9 @@ class Catalog {
|
|
|
1067
1229
|
* @param {CatalogPlatformValidator.DeleteBulkInventoryJobParam} arg - Arg object
|
|
1068
1230
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1069
1231
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1070
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1232
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1071
1233
|
* @name deleteBulkInventoryJob
|
|
1072
|
-
* @summary: Delete inventory bulk upload job
|
|
1234
|
+
* @summary: Delete inventory bulk upload job
|
|
1073
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/).
|
|
1074
1236
|
*/
|
|
1075
1237
|
async deleteBulkInventoryJob(
|
|
@@ -1111,7 +1273,7 @@ class Catalog {
|
|
|
1111
1273
|
const response = await PlatformAPIClient.execute(
|
|
1112
1274
|
this.config,
|
|
1113
1275
|
"delete",
|
|
1114
|
-
`/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}/`,
|
|
1115
1277
|
query_params,
|
|
1116
1278
|
undefined,
|
|
1117
1279
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1125,7 +1287,7 @@ class Catalog {
|
|
|
1125
1287
|
|
|
1126
1288
|
const {
|
|
1127
1289
|
error: res_error,
|
|
1128
|
-
} = CatalogPlatformModel.
|
|
1290
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1129
1291
|
abortEarly: false,
|
|
1130
1292
|
allowUnknown: true,
|
|
1131
1293
|
});
|
|
@@ -1148,10 +1310,10 @@ class Catalog {
|
|
|
1148
1310
|
* @param {CatalogPlatformValidator.DeleteProductParam} arg - Arg object
|
|
1149
1311
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1150
1312
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1151
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1313
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1152
1314
|
* @name deleteProduct
|
|
1153
|
-
* @summary: Delete
|
|
1154
|
-
* @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/).
|
|
1155
1317
|
*/
|
|
1156
1318
|
async deleteProduct(
|
|
1157
1319
|
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1190,7 +1352,7 @@ class Catalog {
|
|
|
1190
1352
|
const response = await PlatformAPIClient.execute(
|
|
1191
1353
|
this.config,
|
|
1192
1354
|
"delete",
|
|
1193
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
1355
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1194
1356
|
query_params,
|
|
1195
1357
|
undefined,
|
|
1196
1358
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1204,7 +1366,7 @@ class Catalog {
|
|
|
1204
1366
|
|
|
1205
1367
|
const {
|
|
1206
1368
|
error: res_error,
|
|
1207
|
-
} = CatalogPlatformModel.
|
|
1369
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1208
1370
|
abortEarly: false,
|
|
1209
1371
|
allowUnknown: true,
|
|
1210
1372
|
});
|
|
@@ -1227,9 +1389,9 @@ class Catalog {
|
|
|
1227
1389
|
* @param {CatalogPlatformValidator.DeleteProductBulkJobParam} arg - Arg object
|
|
1228
1390
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1229
1391
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1230
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1392
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1231
1393
|
* @name deleteProductBulkJob
|
|
1232
|
-
* @summary: Delete product bulk
|
|
1394
|
+
* @summary: Delete product bulk-upload job
|
|
1233
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/).
|
|
1234
1396
|
*/
|
|
1235
1397
|
async deleteProductBulkJob(
|
|
@@ -1283,7 +1445,7 @@ class Catalog {
|
|
|
1283
1445
|
|
|
1284
1446
|
const {
|
|
1285
1447
|
error: res_error,
|
|
1286
|
-
} = CatalogPlatformModel.
|
|
1448
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1287
1449
|
abortEarly: false,
|
|
1288
1450
|
allowUnknown: true,
|
|
1289
1451
|
});
|
|
@@ -1306,10 +1468,11 @@ class Catalog {
|
|
|
1306
1468
|
* @param {CatalogPlatformValidator.DeleteRealtimeInventoryParam} arg - Arg object
|
|
1307
1469
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1308
1470
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1309
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1471
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponseSchema>} -
|
|
1472
|
+
* Success response
|
|
1310
1473
|
* @name deleteRealtimeInventory
|
|
1311
|
-
* @summary: Delete
|
|
1312
|
-
* @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/).
|
|
1313
1476
|
*/
|
|
1314
1477
|
async deleteRealtimeInventory(
|
|
1315
1478
|
{ itemId, sellerIdentifier, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1368,10 +1531,10 @@ class Catalog {
|
|
|
1368
1531
|
|
|
1369
1532
|
const {
|
|
1370
1533
|
error: res_error,
|
|
1371
|
-
} = CatalogPlatformModel.
|
|
1372
|
-
|
|
1373
|
-
allowUnknown: true
|
|
1374
|
-
|
|
1534
|
+
} = CatalogPlatformModel.InventoryUpdateResponseSchema().validate(
|
|
1535
|
+
responseData,
|
|
1536
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1537
|
+
);
|
|
1375
1538
|
|
|
1376
1539
|
if (res_error) {
|
|
1377
1540
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1391,10 +1554,11 @@ class Catalog {
|
|
|
1391
1554
|
* @param {CatalogPlatformValidator.DeleteSizeParam} arg - Arg object
|
|
1392
1555
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1393
1556
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1394
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1395
|
-
* Success response
|
|
1557
|
+
* @returns {Promise<CatalogPlatformModel.ProductSizeDeleteResponseSchema>}
|
|
1558
|
+
* - Success response
|
|
1559
|
+
*
|
|
1396
1560
|
* @name deleteSize
|
|
1397
|
-
* @summary: Delete product size
|
|
1561
|
+
* @summary: Delete product size
|
|
1398
1562
|
* @description: Allows to delete size associated with product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSize/).
|
|
1399
1563
|
*/
|
|
1400
1564
|
async deleteSize(
|
|
@@ -1448,7 +1612,7 @@ class Catalog {
|
|
|
1448
1612
|
|
|
1449
1613
|
const {
|
|
1450
1614
|
error: res_error,
|
|
1451
|
-
} = CatalogPlatformModel.
|
|
1615
|
+
} = CatalogPlatformModel.ProductSizeDeleteResponseSchema().validate(
|
|
1452
1616
|
responseData,
|
|
1453
1617
|
{ abortEarly: false, allowUnknown: true }
|
|
1454
1618
|
);
|
|
@@ -1475,18 +1639,18 @@ class Catalog {
|
|
|
1475
1639
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1476
1640
|
* @returns {Promise<string>} - Success response
|
|
1477
1641
|
* @name downloadInventoryTemplateView
|
|
1478
|
-
* @summary: Download inventory template
|
|
1479
|
-
* @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/).
|
|
1480
1644
|
*/
|
|
1481
1645
|
async downloadInventoryTemplateView(
|
|
1482
|
-
{
|
|
1646
|
+
{ itemType, requestHeaders } = { requestHeaders: {} },
|
|
1483
1647
|
{ responseHeaders } = { responseHeaders: false }
|
|
1484
1648
|
) {
|
|
1485
1649
|
const {
|
|
1486
1650
|
error,
|
|
1487
1651
|
} = CatalogPlatformValidator.downloadInventoryTemplateView().validate(
|
|
1488
1652
|
{
|
|
1489
|
-
|
|
1653
|
+
itemType,
|
|
1490
1654
|
},
|
|
1491
1655
|
{ abortEarly: false, allowUnknown: true }
|
|
1492
1656
|
);
|
|
@@ -1499,7 +1663,7 @@ class Catalog {
|
|
|
1499
1663
|
error: warrning,
|
|
1500
1664
|
} = CatalogPlatformValidator.downloadInventoryTemplateView().validate(
|
|
1501
1665
|
{
|
|
1502
|
-
|
|
1666
|
+
itemType,
|
|
1503
1667
|
},
|
|
1504
1668
|
{ abortEarly: false, allowUnknown: false }
|
|
1505
1669
|
);
|
|
@@ -1511,14 +1675,14 @@ class Catalog {
|
|
|
1511
1675
|
}
|
|
1512
1676
|
|
|
1513
1677
|
const query_params = {};
|
|
1514
|
-
query_params["
|
|
1678
|
+
query_params["item_type"] = itemType;
|
|
1515
1679
|
|
|
1516
1680
|
const xHeaders = {};
|
|
1517
1681
|
|
|
1518
1682
|
const response = await PlatformAPIClient.execute(
|
|
1519
1683
|
this.config,
|
|
1520
1684
|
"get",
|
|
1521
|
-
`/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/`,
|
|
1522
1686
|
query_params,
|
|
1523
1687
|
undefined,
|
|
1524
1688
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1556,8 +1720,8 @@ class Catalog {
|
|
|
1556
1720
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1557
1721
|
* @returns {Promise<string>} - Success response
|
|
1558
1722
|
* @name downloadProductTemplateViews
|
|
1559
|
-
* @summary: Download product template
|
|
1560
|
-
* @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/).
|
|
1561
1725
|
*/
|
|
1562
1726
|
async downloadProductTemplateViews(
|
|
1563
1727
|
{ slug, itemType, type, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1604,7 +1768,7 @@ class Catalog {
|
|
|
1604
1768
|
const response = await PlatformAPIClient.execute(
|
|
1605
1769
|
this.config,
|
|
1606
1770
|
"get",
|
|
1607
|
-
`/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/`,
|
|
1608
1772
|
query_params,
|
|
1609
1773
|
undefined,
|
|
1610
1774
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1638,9 +1802,9 @@ class Catalog {
|
|
|
1638
1802
|
* @param {CatalogPlatformValidator.EditProductParam} arg - Arg object
|
|
1639
1803
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1640
1804
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1641
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1805
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1642
1806
|
* @name editProduct
|
|
1643
|
-
* @summary:
|
|
1807
|
+
* @summary: Update a product
|
|
1644
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/).
|
|
1645
1809
|
*/
|
|
1646
1810
|
async editProduct(
|
|
@@ -1680,7 +1844,7 @@ class Catalog {
|
|
|
1680
1844
|
const response = await PlatformAPIClient.execute(
|
|
1681
1845
|
this.config,
|
|
1682
1846
|
"put",
|
|
1683
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
1847
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1684
1848
|
query_params,
|
|
1685
1849
|
body,
|
|
1686
1850
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1694,7 +1858,7 @@ class Catalog {
|
|
|
1694
1858
|
|
|
1695
1859
|
const {
|
|
1696
1860
|
error: res_error,
|
|
1697
|
-
} = CatalogPlatformModel.
|
|
1861
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1698
1862
|
abortEarly: false,
|
|
1699
1863
|
allowUnknown: true,
|
|
1700
1864
|
});
|
|
@@ -1719,16 +1883,16 @@ class Catalog {
|
|
|
1719
1883
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1720
1884
|
* @returns {Promise<CatalogPlatformModel.InventoryConfig>} - Success response
|
|
1721
1885
|
* @name exportInventoryConfig
|
|
1722
|
-
* @summary:
|
|
1886
|
+
* @summary: Get export inventory configuration
|
|
1723
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/).
|
|
1724
1888
|
*/
|
|
1725
1889
|
async exportInventoryConfig(
|
|
1726
|
-
{
|
|
1890
|
+
{ filterType, requestHeaders } = { requestHeaders: {} },
|
|
1727
1891
|
{ responseHeaders } = { responseHeaders: false }
|
|
1728
1892
|
) {
|
|
1729
1893
|
const { error } = CatalogPlatformValidator.exportInventoryConfig().validate(
|
|
1730
1894
|
{
|
|
1731
|
-
|
|
1895
|
+
filterType,
|
|
1732
1896
|
},
|
|
1733
1897
|
{ abortEarly: false, allowUnknown: true }
|
|
1734
1898
|
);
|
|
@@ -1741,7 +1905,7 @@ class Catalog {
|
|
|
1741
1905
|
error: warrning,
|
|
1742
1906
|
} = CatalogPlatformValidator.exportInventoryConfig().validate(
|
|
1743
1907
|
{
|
|
1744
|
-
|
|
1908
|
+
filterType,
|
|
1745
1909
|
},
|
|
1746
1910
|
{ abortEarly: false, allowUnknown: false }
|
|
1747
1911
|
);
|
|
@@ -1753,14 +1917,14 @@ class Catalog {
|
|
|
1753
1917
|
}
|
|
1754
1918
|
|
|
1755
1919
|
const query_params = {};
|
|
1756
|
-
query_params["
|
|
1920
|
+
query_params["filter_type"] = filterType;
|
|
1757
1921
|
|
|
1758
1922
|
const xHeaders = {};
|
|
1759
1923
|
|
|
1760
1924
|
const response = await PlatformAPIClient.execute(
|
|
1761
1925
|
this.config,
|
|
1762
1926
|
"get",
|
|
1763
|
-
`/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/`,
|
|
1764
1928
|
query_params,
|
|
1765
1929
|
undefined,
|
|
1766
1930
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1801,8 +1965,8 @@ class Catalog {
|
|
|
1801
1965
|
* - Success response
|
|
1802
1966
|
*
|
|
1803
1967
|
* @name getAllProductHsnCodes
|
|
1804
|
-
* @summary:
|
|
1805
|
-
* @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/).
|
|
1806
1970
|
*/
|
|
1807
1971
|
async getAllProductHsnCodes(
|
|
1808
1972
|
{ pageNo, pageSize, q, type, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1851,7 +2015,7 @@ class Catalog {
|
|
|
1851
2015
|
const response = await PlatformAPIClient.execute(
|
|
1852
2016
|
this.config,
|
|
1853
2017
|
"get",
|
|
1854
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/hsn
|
|
2018
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/hsn/`,
|
|
1855
2019
|
query_params,
|
|
1856
2020
|
undefined,
|
|
1857
2021
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1967,10 +2131,11 @@ class Catalog {
|
|
|
1967
2131
|
* @param {CatalogPlatformValidator.GetCategoryDataParam} arg - Arg object
|
|
1968
2132
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1969
2133
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1970
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2134
|
+
* @returns {Promise<CatalogPlatformModel.SingleCategoryResponseSchema>} -
|
|
2135
|
+
* Success response
|
|
1971
2136
|
* @name getCategoryData
|
|
1972
|
-
* @summary: Get category
|
|
1973
|
-
* @description: Retrieve detailed information about a specific category
|
|
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/).
|
|
1974
2139
|
*/
|
|
1975
2140
|
async getCategoryData(
|
|
1976
2141
|
{ uid, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2009,7 +2174,7 @@ class Catalog {
|
|
|
2009
2174
|
const response = await PlatformAPIClient.execute(
|
|
2010
2175
|
this.config,
|
|
2011
2176
|
"get",
|
|
2012
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}
|
|
2177
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
|
|
2013
2178
|
query_params,
|
|
2014
2179
|
undefined,
|
|
2015
2180
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2023,10 +2188,10 @@ class Catalog {
|
|
|
2023
2188
|
|
|
2024
2189
|
const {
|
|
2025
2190
|
error: res_error,
|
|
2026
|
-
} = CatalogPlatformModel.
|
|
2027
|
-
|
|
2028
|
-
allowUnknown: true
|
|
2029
|
-
|
|
2191
|
+
} = CatalogPlatformModel.SingleCategoryResponseSchema().validate(
|
|
2192
|
+
responseData,
|
|
2193
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2194
|
+
);
|
|
2030
2195
|
|
|
2031
2196
|
if (res_error) {
|
|
2032
2197
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2049,8 +2214,8 @@ class Catalog {
|
|
|
2049
2214
|
* @returns {Promise<CatalogPlatformModel.OptinCompanyBrandDetailsView>} -
|
|
2050
2215
|
* Success response
|
|
2051
2216
|
* @name getCompanyBrandDetail
|
|
2052
|
-
* @summary:
|
|
2053
|
-
* @description: Get the details of the Brands associated with the given company_id passed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/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/).
|
|
2054
2219
|
*/
|
|
2055
2220
|
async getCompanyBrandDetail(
|
|
2056
2221
|
{ isActive, q, pageNo, pageSize, marketplace, requestHeaders } = {
|
|
@@ -2104,7 +2269,7 @@ class Catalog {
|
|
|
2104
2269
|
const response = await PlatformAPIClient.execute(
|
|
2105
2270
|
this.config,
|
|
2106
2271
|
"get",
|
|
2107
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-brand-details
|
|
2272
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-brand-details/`,
|
|
2108
2273
|
query_params,
|
|
2109
2274
|
undefined,
|
|
2110
2275
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2138,24 +2303,20 @@ class Catalog {
|
|
|
2138
2303
|
}
|
|
2139
2304
|
|
|
2140
2305
|
/**
|
|
2141
|
-
* @param {CatalogPlatformValidator.
|
|
2306
|
+
* @param {CatalogPlatformValidator.GetCompanyDetailParam} arg - Arg object
|
|
2142
2307
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2143
2308
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2144
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2145
|
-
*
|
|
2146
|
-
* @
|
|
2147
|
-
* @
|
|
2148
|
-
* @description: This API helps to view support representative's associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyBrandsDRI/).
|
|
2309
|
+
* @returns {Promise<CatalogPlatformModel.OptinCompanyDetail>} - Success response
|
|
2310
|
+
* @name 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/).
|
|
2149
2313
|
*/
|
|
2150
|
-
async
|
|
2151
|
-
{
|
|
2314
|
+
async getCompanyDetail(
|
|
2315
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2152
2316
|
{ responseHeaders } = { responseHeaders: false }
|
|
2153
2317
|
) {
|
|
2154
|
-
const { error } = CatalogPlatformValidator.
|
|
2155
|
-
{
|
|
2156
|
-
pageNo,
|
|
2157
|
-
pageSize,
|
|
2158
|
-
},
|
|
2318
|
+
const { error } = CatalogPlatformValidator.getCompanyDetail().validate(
|
|
2319
|
+
{},
|
|
2159
2320
|
{ abortEarly: false, allowUnknown: true }
|
|
2160
2321
|
);
|
|
2161
2322
|
if (error) {
|
|
@@ -2165,30 +2326,25 @@ class Catalog {
|
|
|
2165
2326
|
// Showing warrnings if extra unknown parameters are found
|
|
2166
2327
|
const {
|
|
2167
2328
|
error: warrning,
|
|
2168
|
-
} = CatalogPlatformValidator.
|
|
2169
|
-
{
|
|
2170
|
-
pageNo,
|
|
2171
|
-
pageSize,
|
|
2172
|
-
},
|
|
2329
|
+
} = CatalogPlatformValidator.getCompanyDetail().validate(
|
|
2330
|
+
{},
|
|
2173
2331
|
{ abortEarly: false, allowUnknown: false }
|
|
2174
2332
|
);
|
|
2175
2333
|
if (warrning) {
|
|
2176
2334
|
Logger({
|
|
2177
2335
|
level: "WARN",
|
|
2178
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2336
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCompanyDetail \n ${warrning}`,
|
|
2179
2337
|
});
|
|
2180
2338
|
}
|
|
2181
2339
|
|
|
2182
2340
|
const query_params = {};
|
|
2183
|
-
query_params["page_no"] = pageNo;
|
|
2184
|
-
query_params["page_size"] = pageSize;
|
|
2185
2341
|
|
|
2186
2342
|
const xHeaders = {};
|
|
2187
2343
|
|
|
2188
2344
|
const response = await PlatformAPIClient.execute(
|
|
2189
2345
|
this.config,
|
|
2190
2346
|
"get",
|
|
2191
|
-
`/service/platform/catalog/
|
|
2347
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/company-details/`,
|
|
2192
2348
|
query_params,
|
|
2193
2349
|
undefined,
|
|
2194
2350
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2202,10 +2358,10 @@ class Catalog {
|
|
|
2202
2358
|
|
|
2203
2359
|
const {
|
|
2204
2360
|
error: res_error,
|
|
2205
|
-
} = CatalogPlatformModel.
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
);
|
|
2361
|
+
} = CatalogPlatformModel.OptinCompanyDetail().validate(responseData, {
|
|
2362
|
+
abortEarly: false,
|
|
2363
|
+
allowUnknown: true,
|
|
2364
|
+
});
|
|
2209
2365
|
|
|
2210
2366
|
if (res_error) {
|
|
2211
2367
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2213,7 +2369,7 @@ class Catalog {
|
|
|
2213
2369
|
} else {
|
|
2214
2370
|
Logger({
|
|
2215
2371
|
level: "WARN",
|
|
2216
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2372
|
+
message: `Response Validation Warnings for platform > Catalog > getCompanyDetail \n ${res_error}`,
|
|
2217
2373
|
});
|
|
2218
2374
|
}
|
|
2219
2375
|
}
|
|
@@ -2222,19 +2378,19 @@ class Catalog {
|
|
|
2222
2378
|
}
|
|
2223
2379
|
|
|
2224
2380
|
/**
|
|
2225
|
-
* @param {CatalogPlatformValidator.
|
|
2381
|
+
* @param {CatalogPlatformValidator.GetCompanyMetricsParam} arg - Arg object
|
|
2226
2382
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2227
2383
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2228
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2229
|
-
* @name
|
|
2230
|
-
* @summary: Get
|
|
2231
|
-
* @description:
|
|
2384
|
+
* @returns {Promise<CatalogPlatformModel.OptinCompanyMetrics>} - Success response
|
|
2385
|
+
* @name getCompanyMetrics
|
|
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/).
|
|
2232
2388
|
*/
|
|
2233
|
-
async
|
|
2389
|
+
async getCompanyMetrics(
|
|
2234
2390
|
{ requestHeaders } = { requestHeaders: {} },
|
|
2235
2391
|
{ responseHeaders } = { responseHeaders: false }
|
|
2236
2392
|
) {
|
|
2237
|
-
const { error } = CatalogPlatformValidator.
|
|
2393
|
+
const { error } = CatalogPlatformValidator.getCompanyMetrics().validate(
|
|
2238
2394
|
{},
|
|
2239
2395
|
{ abortEarly: false, allowUnknown: true }
|
|
2240
2396
|
);
|
|
@@ -2245,14 +2401,14 @@ class Catalog {
|
|
|
2245
2401
|
// Showing warrnings if extra unknown parameters are found
|
|
2246
2402
|
const {
|
|
2247
2403
|
error: warrning,
|
|
2248
|
-
} = CatalogPlatformValidator.
|
|
2404
|
+
} = CatalogPlatformValidator.getCompanyMetrics().validate(
|
|
2249
2405
|
{},
|
|
2250
2406
|
{ abortEarly: false, allowUnknown: false }
|
|
2251
2407
|
);
|
|
2252
2408
|
if (warrning) {
|
|
2253
2409
|
Logger({
|
|
2254
2410
|
level: "WARN",
|
|
2255
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2411
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCompanyMetrics \n ${warrning}`,
|
|
2256
2412
|
});
|
|
2257
2413
|
}
|
|
2258
2414
|
|
|
@@ -2263,7 +2419,7 @@ class Catalog {
|
|
|
2263
2419
|
const response = await PlatformAPIClient.execute(
|
|
2264
2420
|
this.config,
|
|
2265
2421
|
"get",
|
|
2266
|
-
`/service/platform/catalog/
|
|
2422
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-metrics/`,
|
|
2267
2423
|
query_params,
|
|
2268
2424
|
undefined,
|
|
2269
2425
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2277,7 +2433,7 @@ class Catalog {
|
|
|
2277
2433
|
|
|
2278
2434
|
const {
|
|
2279
2435
|
error: res_error,
|
|
2280
|
-
} = CatalogPlatformModel.
|
|
2436
|
+
} = CatalogPlatformModel.OptinCompanyMetrics().validate(responseData, {
|
|
2281
2437
|
abortEarly: false,
|
|
2282
2438
|
allowUnknown: true,
|
|
2283
2439
|
});
|
|
@@ -2288,7 +2444,7 @@ class Catalog {
|
|
|
2288
2444
|
} else {
|
|
2289
2445
|
Logger({
|
|
2290
2446
|
level: "WARN",
|
|
2291
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2447
|
+
message: `Response Validation Warnings for platform > Catalog > getCompanyMetrics \n ${res_error}`,
|
|
2292
2448
|
});
|
|
2293
2449
|
}
|
|
2294
2450
|
}
|
|
@@ -2297,20 +2453,23 @@ class Catalog {
|
|
|
2297
2453
|
}
|
|
2298
2454
|
|
|
2299
2455
|
/**
|
|
2300
|
-
* @param {CatalogPlatformValidator.
|
|
2456
|
+
* @param {CatalogPlatformValidator.GetDepartmentDataParam} arg - Arg object
|
|
2301
2457
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2302
2458
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2303
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2304
|
-
*
|
|
2305
|
-
* @
|
|
2306
|
-
* @
|
|
2459
|
+
* @returns {Promise<CatalogPlatformModel.DepartmentsResponseSchema>} -
|
|
2460
|
+
* Success response
|
|
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/).
|
|
2307
2464
|
*/
|
|
2308
|
-
async
|
|
2309
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
2465
|
+
async getDepartmentData(
|
|
2466
|
+
{ uid, requestHeaders } = { requestHeaders: {} },
|
|
2310
2467
|
{ responseHeaders } = { responseHeaders: false }
|
|
2311
2468
|
) {
|
|
2312
|
-
const { error } = CatalogPlatformValidator.
|
|
2313
|
-
{
|
|
2469
|
+
const { error } = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2470
|
+
{
|
|
2471
|
+
uid,
|
|
2472
|
+
},
|
|
2314
2473
|
{ abortEarly: false, allowUnknown: true }
|
|
2315
2474
|
);
|
|
2316
2475
|
if (error) {
|
|
@@ -2320,14 +2479,16 @@ class Catalog {
|
|
|
2320
2479
|
// Showing warrnings if extra unknown parameters are found
|
|
2321
2480
|
const {
|
|
2322
2481
|
error: warrning,
|
|
2323
|
-
} = CatalogPlatformValidator.
|
|
2324
|
-
{
|
|
2482
|
+
} = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2483
|
+
{
|
|
2484
|
+
uid,
|
|
2485
|
+
},
|
|
2325
2486
|
{ abortEarly: false, allowUnknown: false }
|
|
2326
2487
|
);
|
|
2327
2488
|
if (warrning) {
|
|
2328
2489
|
Logger({
|
|
2329
2490
|
level: "WARN",
|
|
2330
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2491
|
+
message: `Parameter Validation warrnings for platform > Catalog > getDepartmentData \n ${warrning}`,
|
|
2331
2492
|
});
|
|
2332
2493
|
}
|
|
2333
2494
|
|
|
@@ -2338,7 +2499,7 @@ class Catalog {
|
|
|
2338
2499
|
const response = await PlatformAPIClient.execute(
|
|
2339
2500
|
this.config,
|
|
2340
2501
|
"get",
|
|
2341
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2502
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
|
|
2342
2503
|
query_params,
|
|
2343
2504
|
undefined,
|
|
2344
2505
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2352,179 +2513,11 @@ class Catalog {
|
|
|
2352
2513
|
|
|
2353
2514
|
const {
|
|
2354
2515
|
error: res_error,
|
|
2355
|
-
} = CatalogPlatformModel.
|
|
2356
|
-
abortEarly: false,
|
|
2357
|
-
allowUnknown: true,
|
|
2358
|
-
});
|
|
2359
|
-
|
|
2360
|
-
if (res_error) {
|
|
2361
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2362
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2363
|
-
} else {
|
|
2364
|
-
Logger({
|
|
2365
|
-
level: "WARN",
|
|
2366
|
-
message: `Response Validation Warnings for platform > Catalog > getCompanyMetrics \n ${res_error}`,
|
|
2367
|
-
});
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
return response;
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
|
-
/**
|
|
2375
|
-
* @param {CatalogPlatformValidator.GetCompanyVerificationParam} arg - Arg object
|
|
2376
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2377
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2378
|
-
* @returns {Promise<CatalogPlatformModel.CompanyVerificationResponse>} -
|
|
2379
|
-
* Success response
|
|
2380
|
-
* @name getCompanyVerification
|
|
2381
|
-
* @summary: Get company verification status
|
|
2382
|
-
* @description: This API gets company verification details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyVerification/).
|
|
2383
|
-
*/
|
|
2384
|
-
async getCompanyVerification(
|
|
2385
|
-
{ q, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2386
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2387
|
-
) {
|
|
2388
|
-
const {
|
|
2389
|
-
error,
|
|
2390
|
-
} = CatalogPlatformValidator.getCompanyVerification().validate(
|
|
2391
|
-
{
|
|
2392
|
-
q,
|
|
2393
|
-
pageNo,
|
|
2394
|
-
pageSize,
|
|
2395
|
-
},
|
|
2396
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2397
|
-
);
|
|
2398
|
-
if (error) {
|
|
2399
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2403
|
-
const {
|
|
2404
|
-
error: warrning,
|
|
2405
|
-
} = CatalogPlatformValidator.getCompanyVerification().validate(
|
|
2406
|
-
{
|
|
2407
|
-
q,
|
|
2408
|
-
pageNo,
|
|
2409
|
-
pageSize,
|
|
2410
|
-
},
|
|
2411
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2412
|
-
);
|
|
2413
|
-
if (warrning) {
|
|
2414
|
-
Logger({
|
|
2415
|
-
level: "WARN",
|
|
2416
|
-
message: `Parameter Validation warrnings for platform > Catalog > getCompanyVerification \n ${warrning}`,
|
|
2417
|
-
});
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
const query_params = {};
|
|
2421
|
-
query_params["q"] = q;
|
|
2422
|
-
query_params["page_no"] = pageNo;
|
|
2423
|
-
query_params["page_size"] = pageSize;
|
|
2424
|
-
|
|
2425
|
-
const xHeaders = {};
|
|
2426
|
-
|
|
2427
|
-
const response = await PlatformAPIClient.execute(
|
|
2428
|
-
this.config,
|
|
2429
|
-
"get",
|
|
2430
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/verification`,
|
|
2431
|
-
query_params,
|
|
2432
|
-
undefined,
|
|
2433
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2434
|
-
{ responseHeaders }
|
|
2435
|
-
);
|
|
2436
|
-
|
|
2437
|
-
let responseData = response;
|
|
2438
|
-
if (responseHeaders) {
|
|
2439
|
-
responseData = response[0];
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
const {
|
|
2443
|
-
error: res_error,
|
|
2444
|
-
} = CatalogPlatformModel.CompanyVerificationResponse().validate(
|
|
2516
|
+
} = CatalogPlatformModel.DepartmentsResponseSchema().validate(
|
|
2445
2517
|
responseData,
|
|
2446
2518
|
{ abortEarly: false, allowUnknown: true }
|
|
2447
2519
|
);
|
|
2448
2520
|
|
|
2449
|
-
if (res_error) {
|
|
2450
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2451
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2452
|
-
} else {
|
|
2453
|
-
Logger({
|
|
2454
|
-
level: "WARN",
|
|
2455
|
-
message: `Response Validation Warnings for platform > Catalog > getCompanyVerification \n ${res_error}`,
|
|
2456
|
-
});
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
return response;
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
/**
|
|
2464
|
-
* @param {CatalogPlatformValidator.GetDepartmentDataParam} arg - Arg object
|
|
2465
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2466
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2467
|
-
* @returns {Promise<CatalogPlatformModel.DepartmentsResponse>} - Success response
|
|
2468
|
-
* @name getDepartmentData
|
|
2469
|
-
* @summary: Get department data.
|
|
2470
|
-
* @description: Retrieve detailed information about a specific department by UID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartmentData/).
|
|
2471
|
-
*/
|
|
2472
|
-
async getDepartmentData(
|
|
2473
|
-
{ uid, requestHeaders } = { requestHeaders: {} },
|
|
2474
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2475
|
-
) {
|
|
2476
|
-
const { error } = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2477
|
-
{
|
|
2478
|
-
uid,
|
|
2479
|
-
},
|
|
2480
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2481
|
-
);
|
|
2482
|
-
if (error) {
|
|
2483
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2484
|
-
}
|
|
2485
|
-
|
|
2486
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2487
|
-
const {
|
|
2488
|
-
error: warrning,
|
|
2489
|
-
} = CatalogPlatformValidator.getDepartmentData().validate(
|
|
2490
|
-
{
|
|
2491
|
-
uid,
|
|
2492
|
-
},
|
|
2493
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2494
|
-
);
|
|
2495
|
-
if (warrning) {
|
|
2496
|
-
Logger({
|
|
2497
|
-
level: "WARN",
|
|
2498
|
-
message: `Parameter Validation warrnings for platform > Catalog > getDepartmentData \n ${warrning}`,
|
|
2499
|
-
});
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
const query_params = {};
|
|
2503
|
-
|
|
2504
|
-
const xHeaders = {};
|
|
2505
|
-
|
|
2506
|
-
const response = await PlatformAPIClient.execute(
|
|
2507
|
-
this.config,
|
|
2508
|
-
"get",
|
|
2509
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}`,
|
|
2510
|
-
query_params,
|
|
2511
|
-
undefined,
|
|
2512
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2513
|
-
{ responseHeaders }
|
|
2514
|
-
);
|
|
2515
|
-
|
|
2516
|
-
let responseData = response;
|
|
2517
|
-
if (responseHeaders) {
|
|
2518
|
-
responseData = response[0];
|
|
2519
|
-
}
|
|
2520
|
-
|
|
2521
|
-
const {
|
|
2522
|
-
error: res_error,
|
|
2523
|
-
} = CatalogPlatformModel.DepartmentsResponse().validate(responseData, {
|
|
2524
|
-
abortEarly: false,
|
|
2525
|
-
allowUnknown: true,
|
|
2526
|
-
});
|
|
2527
|
-
|
|
2528
2521
|
if (res_error) {
|
|
2529
2522
|
if (this.config.options.strictResponseCheck === true) {
|
|
2530
2523
|
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
@@ -2545,7 +2538,7 @@ class Catalog {
|
|
|
2545
2538
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2546
2539
|
* @returns {Promise<CatalogPlatformModel.HsnCode>} - Success response
|
|
2547
2540
|
* @name getHsnCode
|
|
2548
|
-
* @summary:
|
|
2541
|
+
* @summary: List HSN code
|
|
2549
2542
|
* @description: Retrieve the HSN code for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getHsnCode/).
|
|
2550
2543
|
*/
|
|
2551
2544
|
async getHsnCode(
|
|
@@ -2583,7 +2576,7 @@ class Catalog {
|
|
|
2583
2576
|
const response = await PlatformAPIClient.execute(
|
|
2584
2577
|
this.config,
|
|
2585
2578
|
"get",
|
|
2586
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}
|
|
2579
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
|
|
2587
2580
|
query_params,
|
|
2588
2581
|
undefined,
|
|
2589
2582
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2620,10 +2613,11 @@ class Catalog {
|
|
|
2620
2613
|
* @param {CatalogPlatformValidator.GetInventoriesParam} arg - Arg object
|
|
2621
2614
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2622
2615
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2623
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2616
|
+
* @returns {Promise<CatalogPlatformModel.GetInventoriesResponseSchema>} -
|
|
2617
|
+
* Success response
|
|
2624
2618
|
* @name getInventories
|
|
2625
|
-
* @summary:
|
|
2626
|
-
* @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/).
|
|
2627
2621
|
*/
|
|
2628
2622
|
async getInventories(
|
|
2629
2623
|
{
|
|
@@ -2638,8 +2632,9 @@ class Catalog {
|
|
|
2638
2632
|
storeIds,
|
|
2639
2633
|
brandIds,
|
|
2640
2634
|
sellerIdentifiers,
|
|
2641
|
-
|
|
2642
|
-
|
|
2635
|
+
qtyGt,
|
|
2636
|
+
qtyLt,
|
|
2637
|
+
qtyType,
|
|
2643
2638
|
fromDate,
|
|
2644
2639
|
toDate,
|
|
2645
2640
|
sizeIdentifier,
|
|
@@ -2660,8 +2655,9 @@ class Catalog {
|
|
|
2660
2655
|
storeIds,
|
|
2661
2656
|
brandIds,
|
|
2662
2657
|
sellerIdentifiers,
|
|
2663
|
-
|
|
2664
|
-
|
|
2658
|
+
qtyGt,
|
|
2659
|
+
qtyLt,
|
|
2660
|
+
qtyType,
|
|
2665
2661
|
fromDate,
|
|
2666
2662
|
toDate,
|
|
2667
2663
|
sizeIdentifier,
|
|
@@ -2688,8 +2684,9 @@ class Catalog {
|
|
|
2688
2684
|
storeIds,
|
|
2689
2685
|
brandIds,
|
|
2690
2686
|
sellerIdentifiers,
|
|
2691
|
-
|
|
2692
|
-
|
|
2687
|
+
qtyGt,
|
|
2688
|
+
qtyLt,
|
|
2689
|
+
qtyType,
|
|
2693
2690
|
fromDate,
|
|
2694
2691
|
toDate,
|
|
2695
2692
|
sizeIdentifier,
|
|
@@ -2715,8 +2712,9 @@ class Catalog {
|
|
|
2715
2712
|
query_params["store_ids"] = storeIds;
|
|
2716
2713
|
query_params["brand_ids"] = brandIds;
|
|
2717
2714
|
query_params["seller_identifiers"] = sellerIdentifiers;
|
|
2718
|
-
query_params["
|
|
2719
|
-
query_params["
|
|
2715
|
+
query_params["qty_gt"] = qtyGt;
|
|
2716
|
+
query_params["qty_lt"] = qtyLt;
|
|
2717
|
+
query_params["qty_type"] = qtyType;
|
|
2720
2718
|
query_params["from_date"] = fromDate;
|
|
2721
2719
|
query_params["to_date"] = toDate;
|
|
2722
2720
|
query_params["size_identifier"] = sizeIdentifier;
|
|
@@ -2740,10 +2738,10 @@ class Catalog {
|
|
|
2740
2738
|
|
|
2741
2739
|
const {
|
|
2742
2740
|
error: res_error,
|
|
2743
|
-
} = CatalogPlatformModel.
|
|
2744
|
-
|
|
2745
|
-
allowUnknown: true
|
|
2746
|
-
|
|
2741
|
+
} = CatalogPlatformModel.GetInventoriesResponseSchema().validate(
|
|
2742
|
+
responseData,
|
|
2743
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2744
|
+
);
|
|
2747
2745
|
|
|
2748
2746
|
if (res_error) {
|
|
2749
2747
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2759,6 +2757,87 @@ class Catalog {
|
|
|
2759
2757
|
return response;
|
|
2760
2758
|
}
|
|
2761
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
|
+
|
|
2762
2841
|
/**
|
|
2763
2842
|
* @param {CatalogPlatformValidator.GetInventoryBulkUploadHistoryParam} arg
|
|
2764
2843
|
* - Arg object
|
|
@@ -2767,11 +2846,11 @@ class Catalog {
|
|
|
2767
2846
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2768
2847
|
* @returns {Promise<CatalogPlatformModel.BulkInventoryGet>} - Success response
|
|
2769
2848
|
* @name getInventoryBulkUploadHistory
|
|
2770
|
-
* @summary:
|
|
2771
|
-
* @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/).
|
|
2772
2851
|
*/
|
|
2773
2852
|
async getInventoryBulkUploadHistory(
|
|
2774
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2853
|
+
{ pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
|
|
2775
2854
|
{ responseHeaders } = { responseHeaders: false }
|
|
2776
2855
|
) {
|
|
2777
2856
|
const {
|
|
@@ -2780,6 +2859,7 @@ class Catalog {
|
|
|
2780
2859
|
{
|
|
2781
2860
|
pageNo,
|
|
2782
2861
|
pageSize,
|
|
2862
|
+
search,
|
|
2783
2863
|
},
|
|
2784
2864
|
{ abortEarly: false, allowUnknown: true }
|
|
2785
2865
|
);
|
|
@@ -2794,6 +2874,7 @@ class Catalog {
|
|
|
2794
2874
|
{
|
|
2795
2875
|
pageNo,
|
|
2796
2876
|
pageSize,
|
|
2877
|
+
search,
|
|
2797
2878
|
},
|
|
2798
2879
|
{ abortEarly: false, allowUnknown: false }
|
|
2799
2880
|
);
|
|
@@ -2807,13 +2888,14 @@ class Catalog {
|
|
|
2807
2888
|
const query_params = {};
|
|
2808
2889
|
query_params["page_no"] = pageNo;
|
|
2809
2890
|
query_params["page_size"] = pageSize;
|
|
2891
|
+
query_params["search"] = search;
|
|
2810
2892
|
|
|
2811
2893
|
const xHeaders = {};
|
|
2812
2894
|
|
|
2813
2895
|
const response = await PlatformAPIClient.execute(
|
|
2814
2896
|
this.config,
|
|
2815
2897
|
"get",
|
|
2816
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk
|
|
2898
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
|
|
2817
2899
|
query_params,
|
|
2818
2900
|
undefined,
|
|
2819
2901
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2846,6 +2928,36 @@ class Catalog {
|
|
|
2846
2928
|
return response;
|
|
2847
2929
|
}
|
|
2848
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
|
+
|
|
2849
2961
|
/**
|
|
2850
2962
|
* @param {CatalogPlatformValidator.GetInventoryBySizeParam} arg - Arg object
|
|
2851
2963
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2853,8 +2965,8 @@ class Catalog {
|
|
|
2853
2965
|
* @returns {Promise<CatalogPlatformModel.InventoryResponsePaginated>} -
|
|
2854
2966
|
* Success response
|
|
2855
2967
|
* @name getInventoryBySize
|
|
2856
|
-
* @summary:
|
|
2857
|
-
* @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/).
|
|
2858
2970
|
*/
|
|
2859
2971
|
async getInventoryBySize(
|
|
2860
2972
|
{ itemId, size, pageNo, pageSize, q, sellable, requestHeaders } = {
|
|
@@ -2942,6 +3054,42 @@ class Catalog {
|
|
|
2942
3054
|
return response;
|
|
2943
3055
|
}
|
|
2944
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
|
+
|
|
2945
3093
|
/**
|
|
2946
3094
|
* @param {CatalogPlatformValidator.GetInventoryBySizeIdentifierParam} arg
|
|
2947
3095
|
* - Arg object
|
|
@@ -2952,8 +3100,8 @@ class Catalog {
|
|
|
2952
3100
|
* - Success response
|
|
2953
3101
|
*
|
|
2954
3102
|
* @name getInventoryBySizeIdentifier
|
|
2955
|
-
* @summary:
|
|
2956
|
-
* @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/).
|
|
2957
3105
|
*/
|
|
2958
3106
|
async getInventoryBySizeIdentifier(
|
|
2959
3107
|
{
|
|
@@ -3049,15 +3197,57 @@ class Catalog {
|
|
|
3049
3197
|
return response;
|
|
3050
3198
|
}
|
|
3051
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
|
+
|
|
3052
3243
|
/**
|
|
3053
3244
|
* @param {CatalogPlatformValidator.GetInventoryExportParam} arg - Arg object
|
|
3054
3245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3055
3246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3056
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3057
|
-
* Success response
|
|
3247
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportJob>} - Success response
|
|
3058
3248
|
* @name getInventoryExport
|
|
3059
|
-
* @summary:
|
|
3060
|
-
* @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/).
|
|
3061
3251
|
*/
|
|
3062
3252
|
async getInventoryExport(
|
|
3063
3253
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -3092,7 +3282,7 @@ class Catalog {
|
|
|
3092
3282
|
const response = await PlatformAPIClient.execute(
|
|
3093
3283
|
this.config,
|
|
3094
3284
|
"get",
|
|
3095
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download
|
|
3285
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
|
|
3096
3286
|
query_params,
|
|
3097
3287
|
undefined,
|
|
3098
3288
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3106,10 +3296,10 @@ class Catalog {
|
|
|
3106
3296
|
|
|
3107
3297
|
const {
|
|
3108
3298
|
error: res_error,
|
|
3109
|
-
} = CatalogPlatformModel.
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
);
|
|
3299
|
+
} = CatalogPlatformModel.InventoryExportJob().validate(responseData, {
|
|
3300
|
+
abortEarly: false,
|
|
3301
|
+
allowUnknown: true,
|
|
3302
|
+
});
|
|
3113
3303
|
|
|
3114
3304
|
if (res_error) {
|
|
3115
3305
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3126,26 +3316,22 @@ class Catalog {
|
|
|
3126
3316
|
}
|
|
3127
3317
|
|
|
3128
3318
|
/**
|
|
3129
|
-
* @param {CatalogPlatformValidator.
|
|
3319
|
+
* @param {CatalogPlatformValidator.GetMarketplaceOptinDetailParam} arg - Arg object
|
|
3130
3320
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3131
3321
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3132
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3133
|
-
*
|
|
3134
|
-
*
|
|
3135
|
-
* @
|
|
3136
|
-
* @summary: Get Detail Product export detail.
|
|
3137
|
-
* @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/).
|
|
3138
3326
|
*/
|
|
3139
|
-
async
|
|
3140
|
-
{
|
|
3327
|
+
async getMarketplaceOptinDetail(
|
|
3328
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
3141
3329
|
{ responseHeaders } = { responseHeaders: false }
|
|
3142
3330
|
) {
|
|
3143
3331
|
const {
|
|
3144
3332
|
error,
|
|
3145
|
-
} = CatalogPlatformValidator.
|
|
3146
|
-
{
|
|
3147
|
-
jobId,
|
|
3148
|
-
},
|
|
3333
|
+
} = CatalogPlatformValidator.getMarketplaceOptinDetail().validate(
|
|
3334
|
+
{},
|
|
3149
3335
|
{ abortEarly: false, allowUnknown: true }
|
|
3150
3336
|
);
|
|
3151
3337
|
if (error) {
|
|
@@ -3155,16 +3341,14 @@ class Catalog {
|
|
|
3155
3341
|
// Showing warrnings if extra unknown parameters are found
|
|
3156
3342
|
const {
|
|
3157
3343
|
error: warrning,
|
|
3158
|
-
} = CatalogPlatformValidator.
|
|
3159
|
-
{
|
|
3160
|
-
jobId,
|
|
3161
|
-
},
|
|
3344
|
+
} = CatalogPlatformValidator.getMarketplaceOptinDetail().validate(
|
|
3345
|
+
{},
|
|
3162
3346
|
{ abortEarly: false, allowUnknown: false }
|
|
3163
3347
|
);
|
|
3164
3348
|
if (warrning) {
|
|
3165
3349
|
Logger({
|
|
3166
3350
|
level: "WARN",
|
|
3167
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3351
|
+
message: `Parameter Validation warrnings for platform > Catalog > getMarketplaceOptinDetail \n ${warrning}`,
|
|
3168
3352
|
});
|
|
3169
3353
|
}
|
|
3170
3354
|
|
|
@@ -3175,7 +3359,7 @@ class Catalog {
|
|
|
3175
3359
|
const response = await PlatformAPIClient.execute(
|
|
3176
3360
|
this.config,
|
|
3177
3361
|
"get",
|
|
3178
|
-
`/service/platform/catalog/
|
|
3362
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/`,
|
|
3179
3363
|
query_params,
|
|
3180
3364
|
undefined,
|
|
3181
3365
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3189,10 +3373,10 @@ class Catalog {
|
|
|
3189
3373
|
|
|
3190
3374
|
const {
|
|
3191
3375
|
error: res_error,
|
|
3192
|
-
} = CatalogPlatformModel.
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
);
|
|
3376
|
+
} = CatalogPlatformModel.GetOptInPlatform().validate(responseData, {
|
|
3377
|
+
abortEarly: false,
|
|
3378
|
+
allowUnknown: true,
|
|
3379
|
+
});
|
|
3196
3380
|
|
|
3197
3381
|
if (res_error) {
|
|
3198
3382
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3200,7 +3384,7 @@ class Catalog {
|
|
|
3200
3384
|
} else {
|
|
3201
3385
|
Logger({
|
|
3202
3386
|
level: "WARN",
|
|
3203
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3387
|
+
message: `Response Validation Warnings for platform > Catalog > getMarketplaceOptinDetail \n ${res_error}`,
|
|
3204
3388
|
});
|
|
3205
3389
|
}
|
|
3206
3390
|
}
|
|
@@ -3209,19 +3393,19 @@ class Catalog {
|
|
|
3209
3393
|
}
|
|
3210
3394
|
|
|
3211
3395
|
/**
|
|
3212
|
-
* @param {CatalogPlatformValidator.
|
|
3396
|
+
* @param {CatalogPlatformValidator.GetMarketplacesParam} arg - Arg object
|
|
3213
3397
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3214
3398
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3215
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3216
|
-
* @name
|
|
3217
|
-
* @summary:
|
|
3218
|
-
* @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/).
|
|
3219
3403
|
*/
|
|
3220
|
-
async
|
|
3404
|
+
async getMarketplaces(
|
|
3221
3405
|
{ requestHeaders } = { requestHeaders: {} },
|
|
3222
3406
|
{ responseHeaders } = { responseHeaders: false }
|
|
3223
3407
|
) {
|
|
3224
|
-
const { error } = CatalogPlatformValidator.
|
|
3408
|
+
const { error } = CatalogPlatformValidator.getMarketplaces().validate(
|
|
3225
3409
|
{},
|
|
3226
3410
|
{ abortEarly: false, allowUnknown: true }
|
|
3227
3411
|
);
|
|
@@ -3232,14 +3416,14 @@ class Catalog {
|
|
|
3232
3416
|
// Showing warrnings if extra unknown parameters are found
|
|
3233
3417
|
const {
|
|
3234
3418
|
error: warrning,
|
|
3235
|
-
} = CatalogPlatformValidator.
|
|
3419
|
+
} = CatalogPlatformValidator.getMarketplaces().validate(
|
|
3236
3420
|
{},
|
|
3237
3421
|
{ abortEarly: false, allowUnknown: false }
|
|
3238
3422
|
);
|
|
3239
3423
|
if (warrning) {
|
|
3240
3424
|
Logger({
|
|
3241
3425
|
level: "WARN",
|
|
3242
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3426
|
+
message: `Parameter Validation warrnings for platform > Catalog > getMarketplaces \n ${warrning}`,
|
|
3243
3427
|
});
|
|
3244
3428
|
}
|
|
3245
3429
|
|
|
@@ -3250,7 +3434,7 @@ class Catalog {
|
|
|
3250
3434
|
const response = await PlatformAPIClient.execute(
|
|
3251
3435
|
this.config,
|
|
3252
3436
|
"get",
|
|
3253
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
3437
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel`,
|
|
3254
3438
|
query_params,
|
|
3255
3439
|
undefined,
|
|
3256
3440
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3264,7 +3448,7 @@ class Catalog {
|
|
|
3264
3448
|
|
|
3265
3449
|
const {
|
|
3266
3450
|
error: res_error,
|
|
3267
|
-
} = CatalogPlatformModel.
|
|
3451
|
+
} = CatalogPlatformModel.GetAllMarketplaces().validate(responseData, {
|
|
3268
3452
|
abortEarly: false,
|
|
3269
3453
|
allowUnknown: true,
|
|
3270
3454
|
});
|
|
@@ -3275,7 +3459,7 @@ class Catalog {
|
|
|
3275
3459
|
} else {
|
|
3276
3460
|
Logger({
|
|
3277
3461
|
level: "WARN",
|
|
3278
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3462
|
+
message: `Response Validation Warnings for platform > Catalog > getMarketplaces \n ${res_error}`,
|
|
3279
3463
|
});
|
|
3280
3464
|
}
|
|
3281
3465
|
}
|
|
@@ -3284,20 +3468,23 @@ class Catalog {
|
|
|
3284
3468
|
}
|
|
3285
3469
|
|
|
3286
3470
|
/**
|
|
3287
|
-
* @param {CatalogPlatformValidator.
|
|
3471
|
+
* @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object
|
|
3288
3472
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3289
3473
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3290
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3291
|
-
*
|
|
3292
|
-
* @
|
|
3293
|
-
* @
|
|
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/).
|
|
3294
3479
|
*/
|
|
3295
|
-
async
|
|
3296
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
3480
|
+
async getOptimalLocations(
|
|
3481
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3297
3482
|
{ responseHeaders } = { responseHeaders: false }
|
|
3298
3483
|
) {
|
|
3299
|
-
const { error } = CatalogPlatformValidator.
|
|
3300
|
-
{
|
|
3484
|
+
const { error } = CatalogPlatformValidator.getOptimalLocations().validate(
|
|
3485
|
+
{
|
|
3486
|
+
body,
|
|
3487
|
+
},
|
|
3301
3488
|
{ abortEarly: false, allowUnknown: true }
|
|
3302
3489
|
);
|
|
3303
3490
|
if (error) {
|
|
@@ -3307,14 +3494,16 @@ class Catalog {
|
|
|
3307
3494
|
// Showing warrnings if extra unknown parameters are found
|
|
3308
3495
|
const {
|
|
3309
3496
|
error: warrning,
|
|
3310
|
-
} = CatalogPlatformValidator.
|
|
3311
|
-
{
|
|
3497
|
+
} = CatalogPlatformValidator.getOptimalLocations().validate(
|
|
3498
|
+
{
|
|
3499
|
+
body,
|
|
3500
|
+
},
|
|
3312
3501
|
{ abortEarly: false, allowUnknown: false }
|
|
3313
3502
|
);
|
|
3314
3503
|
if (warrning) {
|
|
3315
3504
|
Logger({
|
|
3316
3505
|
level: "WARN",
|
|
3317
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3506
|
+
message: `Parameter Validation warrnings for platform > Catalog > getOptimalLocations \n ${warrning}`,
|
|
3318
3507
|
});
|
|
3319
3508
|
}
|
|
3320
3509
|
|
|
@@ -3324,10 +3513,10 @@ class Catalog {
|
|
|
3324
3513
|
|
|
3325
3514
|
const response = await PlatformAPIClient.execute(
|
|
3326
3515
|
this.config,
|
|
3327
|
-
"
|
|
3328
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
3516
|
+
"post",
|
|
3517
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/location/reassign/`,
|
|
3329
3518
|
query_params,
|
|
3330
|
-
|
|
3519
|
+
body,
|
|
3331
3520
|
{ ...xHeaders, ...requestHeaders },
|
|
3332
3521
|
{ responseHeaders }
|
|
3333
3522
|
);
|
|
@@ -3339,10 +3528,10 @@ class Catalog {
|
|
|
3339
3528
|
|
|
3340
3529
|
const {
|
|
3341
3530
|
error: res_error,
|
|
3342
|
-
} = CatalogPlatformModel.
|
|
3343
|
-
|
|
3344
|
-
allowUnknown: true
|
|
3345
|
-
|
|
3531
|
+
} = CatalogPlatformModel.StoreAssignResponseSchema().validate(
|
|
3532
|
+
responseData,
|
|
3533
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3534
|
+
);
|
|
3346
3535
|
|
|
3347
3536
|
if (res_error) {
|
|
3348
3537
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3350,7 +3539,7 @@ class Catalog {
|
|
|
3350
3539
|
} else {
|
|
3351
3540
|
Logger({
|
|
3352
3541
|
level: "WARN",
|
|
3353
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3542
|
+
message: `Response Validation Warnings for platform > Catalog > getOptimalLocations \n ${res_error}`,
|
|
3354
3543
|
});
|
|
3355
3544
|
}
|
|
3356
3545
|
}
|
|
@@ -3362,9 +3551,10 @@ class Catalog {
|
|
|
3362
3551
|
* @param {CatalogPlatformValidator.GetProductParam} arg - Arg object
|
|
3363
3552
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3364
3553
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3365
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3554
|
+
* @returns {Promise<CatalogPlatformModel.SingleProductResponseSchema>} -
|
|
3555
|
+
* Success response
|
|
3366
3556
|
* @name getProduct
|
|
3367
|
-
* @summary: Get product
|
|
3557
|
+
* @summary: Get a product
|
|
3368
3558
|
* @description: Retrieve data associated to a particular product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProduct/).
|
|
3369
3559
|
*/
|
|
3370
3560
|
async getProduct(
|
|
@@ -3408,7 +3598,7 @@ class Catalog {
|
|
|
3408
3598
|
const response = await PlatformAPIClient.execute(
|
|
3409
3599
|
this.config,
|
|
3410
3600
|
"get",
|
|
3411
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
3601
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
3412
3602
|
query_params,
|
|
3413
3603
|
undefined,
|
|
3414
3604
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3422,10 +3612,10 @@ class Catalog {
|
|
|
3422
3612
|
|
|
3423
3613
|
const {
|
|
3424
3614
|
error: res_error,
|
|
3425
|
-
} = CatalogPlatformModel.
|
|
3426
|
-
|
|
3427
|
-
allowUnknown: true
|
|
3428
|
-
|
|
3615
|
+
} = CatalogPlatformModel.SingleProductResponseSchema().validate(
|
|
3616
|
+
responseData,
|
|
3617
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3618
|
+
);
|
|
3429
3619
|
|
|
3430
3620
|
if (res_error) {
|
|
3431
3621
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3445,9 +3635,9 @@ class Catalog {
|
|
|
3445
3635
|
* @param {CatalogPlatformValidator.GetProductAssetsInBulkParam} arg - Arg object
|
|
3446
3636
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3447
3637
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3448
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3638
|
+
* @returns {Promise<CatalogPlatformModel.BulkAssetResponseSchema>} - Success response
|
|
3449
3639
|
* @name getProductAssetsInBulk
|
|
3450
|
-
* @summary:
|
|
3640
|
+
* @summary: Get product assets
|
|
3451
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/).
|
|
3452
3642
|
*/
|
|
3453
3643
|
async getProductAssetsInBulk(
|
|
@@ -3493,7 +3683,7 @@ class Catalog {
|
|
|
3493
3683
|
const response = await PlatformAPIClient.execute(
|
|
3494
3684
|
this.config,
|
|
3495
3685
|
"get",
|
|
3496
|
-
`/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/`,
|
|
3497
3687
|
query_params,
|
|
3498
3688
|
undefined,
|
|
3499
3689
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3507,7 +3697,7 @@ class Catalog {
|
|
|
3507
3697
|
|
|
3508
3698
|
const {
|
|
3509
3699
|
error: res_error,
|
|
3510
|
-
} = CatalogPlatformModel.
|
|
3700
|
+
} = CatalogPlatformModel.BulkAssetResponseSchema().validate(responseData, {
|
|
3511
3701
|
abortEarly: false,
|
|
3512
3702
|
allowUnknown: true,
|
|
3513
3703
|
});
|
|
@@ -3527,14 +3717,43 @@ class Catalog {
|
|
|
3527
3717
|
}
|
|
3528
3718
|
|
|
3529
3719
|
/**
|
|
3530
|
-
* @param {
|
|
3531
|
-
* @param {
|
|
3532
|
-
*
|
|
3533
|
-
* @returns {
|
|
3534
|
-
*
|
|
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
|
+
|
|
3747
|
+
/**
|
|
3748
|
+
* @param {CatalogPlatformValidator.GetProductAttributesParam} arg - Arg object
|
|
3749
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3750
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3751
|
+
* @returns {Promise<CatalogPlatformModel.ProductAttributesResponseSchema>}
|
|
3752
|
+
* - Success response
|
|
3753
|
+
*
|
|
3535
3754
|
* @name getProductAttributes
|
|
3536
|
-
* @summary:
|
|
3537
|
-
* @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/).
|
|
3538
3757
|
*/
|
|
3539
3758
|
async getProductAttributes(
|
|
3540
3759
|
{ category, filter, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3577,7 +3796,7 @@ class Catalog {
|
|
|
3577
3796
|
const response = await PlatformAPIClient.execute(
|
|
3578
3797
|
this.config,
|
|
3579
3798
|
"get",
|
|
3580
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes
|
|
3799
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes/`,
|
|
3581
3800
|
query_params,
|
|
3582
3801
|
undefined,
|
|
3583
3802
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3591,7 +3810,7 @@ class Catalog {
|
|
|
3591
3810
|
|
|
3592
3811
|
const {
|
|
3593
3812
|
error: res_error,
|
|
3594
|
-
} = CatalogPlatformModel.
|
|
3813
|
+
} = CatalogPlatformModel.ProductAttributesResponseSchema().validate(
|
|
3595
3814
|
responseData,
|
|
3596
3815
|
{ abortEarly: false, allowUnknown: true }
|
|
3597
3816
|
);
|
|
@@ -3616,7 +3835,7 @@ class Catalog {
|
|
|
3616
3835
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3617
3836
|
* @returns {Promise<CatalogPlatformModel.ProductBulkRequestList>} - Success response
|
|
3618
3837
|
* @name getProductBulkUploadHistory
|
|
3619
|
-
* @summary:
|
|
3838
|
+
* @summary: List product bulk upload history
|
|
3620
3839
|
* @description: Helps to get bulk product upload jobs data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBulkUploadHistory/).
|
|
3621
3840
|
*/
|
|
3622
3841
|
async getProductBulkUploadHistory(
|
|
@@ -3698,16 +3917,46 @@ class Catalog {
|
|
|
3698
3917
|
return response;
|
|
3699
3918
|
}
|
|
3700
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
|
+
|
|
3701
3950
|
/**
|
|
3702
3951
|
* @param {CatalogPlatformValidator.GetProductBundleParam} arg - Arg object
|
|
3703
3952
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3704
3953
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3705
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3954
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleListingResponseSchema>}
|
|
3706
3955
|
* - Success response
|
|
3707
3956
|
*
|
|
3708
3957
|
* @name getProductBundle
|
|
3709
|
-
* @summary:
|
|
3710
|
-
* @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/).
|
|
3711
3960
|
*/
|
|
3712
3961
|
async getProductBundle(
|
|
3713
3962
|
{ q, slug, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3756,7 +4005,7 @@ class Catalog {
|
|
|
3756
4005
|
const response = await PlatformAPIClient.execute(
|
|
3757
4006
|
this.config,
|
|
3758
4007
|
"get",
|
|
3759
|
-
`/service/platform/catalog/
|
|
4008
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
|
|
3760
4009
|
query_params,
|
|
3761
4010
|
undefined,
|
|
3762
4011
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3770,7 +4019,7 @@ class Catalog {
|
|
|
3770
4019
|
|
|
3771
4020
|
const {
|
|
3772
4021
|
error: res_error,
|
|
3773
|
-
} = CatalogPlatformModel.
|
|
4022
|
+
} = CatalogPlatformModel.GetProductBundleListingResponseSchema().validate(
|
|
3774
4023
|
responseData,
|
|
3775
4024
|
{ abortEarly: false, allowUnknown: true }
|
|
3776
4025
|
);
|
|
@@ -3793,11 +4042,12 @@ class Catalog {
|
|
|
3793
4042
|
* @param {CatalogPlatformValidator.GetProductBundleDetailParam} arg - Arg object
|
|
3794
4043
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3795
4044
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3796
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3797
|
-
* Success response
|
|
4045
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleResponseSchema>}
|
|
4046
|
+
* - Success response
|
|
4047
|
+
*
|
|
3798
4048
|
* @name getProductBundleDetail
|
|
3799
|
-
* @summary: Get product bundle
|
|
3800
|
-
* @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/).
|
|
3801
4051
|
*/
|
|
3802
4052
|
async getProductBundleDetail(
|
|
3803
4053
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3838,89 +4088,7 @@ class Catalog {
|
|
|
3838
4088
|
const response = await PlatformAPIClient.execute(
|
|
3839
4089
|
this.config,
|
|
3840
4090
|
"get",
|
|
3841
|
-
`/service/platform/catalog/
|
|
3842
|
-
query_params,
|
|
3843
|
-
undefined,
|
|
3844
|
-
{ ...xHeaders, ...requestHeaders },
|
|
3845
|
-
{ responseHeaders }
|
|
3846
|
-
);
|
|
3847
|
-
|
|
3848
|
-
let responseData = response;
|
|
3849
|
-
if (responseHeaders) {
|
|
3850
|
-
responseData = response[0];
|
|
3851
|
-
}
|
|
3852
|
-
|
|
3853
|
-
const {
|
|
3854
|
-
error: res_error,
|
|
3855
|
-
} = CatalogPlatformModel.GetProductBundleResponse().validate(responseData, {
|
|
3856
|
-
abortEarly: false,
|
|
3857
|
-
allowUnknown: true,
|
|
3858
|
-
});
|
|
3859
|
-
|
|
3860
|
-
if (res_error) {
|
|
3861
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
3862
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3863
|
-
} else {
|
|
3864
|
-
Logger({
|
|
3865
|
-
level: "WARN",
|
|
3866
|
-
message: `Response Validation Warnings for platform > Catalog > getProductBundleDetail \n ${res_error}`,
|
|
3867
|
-
});
|
|
3868
|
-
}
|
|
3869
|
-
}
|
|
3870
|
-
|
|
3871
|
-
return response;
|
|
3872
|
-
}
|
|
3873
|
-
|
|
3874
|
-
/**
|
|
3875
|
-
* @param {CatalogPlatformValidator.GetProductExportDetailParam} arg - Arg object
|
|
3876
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3877
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3878
|
-
* @returns {Promise<CatalogPlatformModel.GetProductDownloadsResponse>} -
|
|
3879
|
-
* Success response
|
|
3880
|
-
* @name getProductExportDetail
|
|
3881
|
-
* @summary: Get Detail Product export detail.
|
|
3882
|
-
* @description: This API helps to get detail of Product export. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportDetail/).
|
|
3883
|
-
*/
|
|
3884
|
-
async getProductExportDetail(
|
|
3885
|
-
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
3886
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
3887
|
-
) {
|
|
3888
|
-
const {
|
|
3889
|
-
error,
|
|
3890
|
-
} = CatalogPlatformValidator.getProductExportDetail().validate(
|
|
3891
|
-
{
|
|
3892
|
-
jobId,
|
|
3893
|
-
},
|
|
3894
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3895
|
-
);
|
|
3896
|
-
if (error) {
|
|
3897
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3898
|
-
}
|
|
3899
|
-
|
|
3900
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3901
|
-
const {
|
|
3902
|
-
error: warrning,
|
|
3903
|
-
} = CatalogPlatformValidator.getProductExportDetail().validate(
|
|
3904
|
-
{
|
|
3905
|
-
jobId,
|
|
3906
|
-
},
|
|
3907
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3908
|
-
);
|
|
3909
|
-
if (warrning) {
|
|
3910
|
-
Logger({
|
|
3911
|
-
level: "WARN",
|
|
3912
|
-
message: `Parameter Validation warrnings for platform > Catalog > getProductExportDetail \n ${warrning}`,
|
|
3913
|
-
});
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
|
-
const query_params = {};
|
|
3917
|
-
|
|
3918
|
-
const xHeaders = {};
|
|
3919
|
-
|
|
3920
|
-
const response = await PlatformAPIClient.execute(
|
|
3921
|
-
this.config,
|
|
3922
|
-
"get",
|
|
3923
|
-
`/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}/`,
|
|
3924
4092
|
query_params,
|
|
3925
4093
|
undefined,
|
|
3926
4094
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3934,7 +4102,7 @@ class Catalog {
|
|
|
3934
4102
|
|
|
3935
4103
|
const {
|
|
3936
4104
|
error: res_error,
|
|
3937
|
-
} = CatalogPlatformModel.
|
|
4105
|
+
} = CatalogPlatformModel.GetProductBundleResponseSchema().validate(
|
|
3938
4106
|
responseData,
|
|
3939
4107
|
{ abortEarly: false, allowUnknown: true }
|
|
3940
4108
|
);
|
|
@@ -3945,7 +4113,7 @@ class Catalog {
|
|
|
3945
4113
|
} else {
|
|
3946
4114
|
Logger({
|
|
3947
4115
|
level: "WARN",
|
|
3948
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4116
|
+
message: `Response Validation Warnings for platform > Catalog > getProductBundleDetail \n ${res_error}`,
|
|
3949
4117
|
});
|
|
3950
4118
|
}
|
|
3951
4119
|
}
|
|
@@ -3957,11 +4125,12 @@ class Catalog {
|
|
|
3957
4125
|
* @param {CatalogPlatformValidator.GetProductExportJobsParam} arg - Arg object
|
|
3958
4126
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3959
4127
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3960
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3961
|
-
* Success response
|
|
4128
|
+
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponseSchema>}
|
|
4129
|
+
* - Success response
|
|
4130
|
+
*
|
|
3962
4131
|
* @name getProductExportJobs
|
|
3963
|
-
* @summary:
|
|
3964
|
-
* @description: View details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/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/).
|
|
3965
4134
|
*/
|
|
3966
4135
|
async getProductExportJobs(
|
|
3967
4136
|
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
@@ -4018,7 +4187,7 @@ class Catalog {
|
|
|
4018
4187
|
const response = await PlatformAPIClient.execute(
|
|
4019
4188
|
this.config,
|
|
4020
4189
|
"get",
|
|
4021
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads
|
|
4190
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads/`,
|
|
4022
4191
|
query_params,
|
|
4023
4192
|
undefined,
|
|
4024
4193
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4032,10 +4201,10 @@ class Catalog {
|
|
|
4032
4201
|
|
|
4033
4202
|
const {
|
|
4034
4203
|
error: res_error,
|
|
4035
|
-
} = CatalogPlatformModel.
|
|
4036
|
-
|
|
4037
|
-
allowUnknown: true
|
|
4038
|
-
|
|
4204
|
+
} = CatalogPlatformModel.ProductDownloadsResponseSchema().validate(
|
|
4205
|
+
responseData,
|
|
4206
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4207
|
+
);
|
|
4039
4208
|
|
|
4040
4209
|
if (res_error) {
|
|
4041
4210
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4055,18 +4224,24 @@ class Catalog {
|
|
|
4055
4224
|
* @param {CatalogPlatformValidator.GetProductSizeParam} arg - Arg object
|
|
4056
4225
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4057
4226
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4058
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4227
|
+
* @returns {Promise<CatalogPlatformModel.ProductListingResponseSchema>} -
|
|
4228
|
+
* Success response
|
|
4059
4229
|
* @name getProductSize
|
|
4060
|
-
* @summary:
|
|
4230
|
+
* @summary: List product size
|
|
4061
4231
|
* @description: Retrieve data associated to a particular product size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductSize/).
|
|
4062
4232
|
*/
|
|
4063
4233
|
async getProductSize(
|
|
4064
|
-
{ itemId, requestHeaders } = {
|
|
4234
|
+
{ itemId, itemCode, brandUid, uid, requestHeaders } = {
|
|
4235
|
+
requestHeaders: {},
|
|
4236
|
+
},
|
|
4065
4237
|
{ responseHeaders } = { responseHeaders: false }
|
|
4066
4238
|
) {
|
|
4067
4239
|
const { error } = CatalogPlatformValidator.getProductSize().validate(
|
|
4068
4240
|
{
|
|
4069
4241
|
itemId,
|
|
4242
|
+
itemCode,
|
|
4243
|
+
brandUid,
|
|
4244
|
+
uid,
|
|
4070
4245
|
},
|
|
4071
4246
|
{ abortEarly: false, allowUnknown: true }
|
|
4072
4247
|
);
|
|
@@ -4080,6 +4255,9 @@ class Catalog {
|
|
|
4080
4255
|
} = CatalogPlatformValidator.getProductSize().validate(
|
|
4081
4256
|
{
|
|
4082
4257
|
itemId,
|
|
4258
|
+
itemCode,
|
|
4259
|
+
brandUid,
|
|
4260
|
+
uid,
|
|
4083
4261
|
},
|
|
4084
4262
|
{ abortEarly: false, allowUnknown: false }
|
|
4085
4263
|
);
|
|
@@ -4091,13 +4269,16 @@ class Catalog {
|
|
|
4091
4269
|
}
|
|
4092
4270
|
|
|
4093
4271
|
const query_params = {};
|
|
4272
|
+
query_params["item_code"] = itemCode;
|
|
4273
|
+
query_params["brand_uid"] = brandUid;
|
|
4274
|
+
query_params["uid"] = uid;
|
|
4094
4275
|
|
|
4095
4276
|
const xHeaders = {};
|
|
4096
4277
|
|
|
4097
4278
|
const response = await PlatformAPIClient.execute(
|
|
4098
4279
|
this.config,
|
|
4099
4280
|
"get",
|
|
4100
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes
|
|
4281
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/`,
|
|
4101
4282
|
query_params,
|
|
4102
4283
|
undefined,
|
|
4103
4284
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4111,10 +4292,10 @@ class Catalog {
|
|
|
4111
4292
|
|
|
4112
4293
|
const {
|
|
4113
4294
|
error: res_error,
|
|
4114
|
-
} = CatalogPlatformModel.
|
|
4115
|
-
|
|
4116
|
-
allowUnknown: true
|
|
4117
|
-
|
|
4295
|
+
} = CatalogPlatformModel.ProductListingResponseSchema().validate(
|
|
4296
|
+
responseData,
|
|
4297
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4298
|
+
);
|
|
4118
4299
|
|
|
4119
4300
|
if (res_error) {
|
|
4120
4301
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4134,9 +4315,10 @@ class Catalog {
|
|
|
4134
4315
|
* @param {CatalogPlatformValidator.GetProductTagsParam} arg - Arg object
|
|
4135
4316
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4136
4317
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4137
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4318
|
+
* @returns {Promise<CatalogPlatformModel.ProductTagsViewResponseSchema>} -
|
|
4319
|
+
* Success response
|
|
4138
4320
|
* @name getProductTags
|
|
4139
|
-
* @summary:
|
|
4321
|
+
* @summary: List product tags
|
|
4140
4322
|
* @description: Retrieve tags data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTags/).
|
|
4141
4323
|
*/
|
|
4142
4324
|
async getProductTags(
|
|
@@ -4186,10 +4368,10 @@ class Catalog {
|
|
|
4186
4368
|
|
|
4187
4369
|
const {
|
|
4188
4370
|
error: res_error,
|
|
4189
|
-
} = CatalogPlatformModel.
|
|
4190
|
-
|
|
4191
|
-
allowUnknown: true
|
|
4192
|
-
|
|
4371
|
+
} = CatalogPlatformModel.ProductTagsViewResponseSchema().validate(
|
|
4372
|
+
responseData,
|
|
4373
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4374
|
+
);
|
|
4193
4375
|
|
|
4194
4376
|
if (res_error) {
|
|
4195
4377
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4206,26 +4388,20 @@ class Catalog {
|
|
|
4206
4388
|
}
|
|
4207
4389
|
|
|
4208
4390
|
/**
|
|
4209
|
-
* @param {CatalogPlatformValidator.
|
|
4391
|
+
* @param {CatalogPlatformValidator.GetProductValidationParam} arg - Arg object
|
|
4210
4392
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4211
4393
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4212
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4213
|
-
*
|
|
4214
|
-
*
|
|
4215
|
-
* @
|
|
4216
|
-
* @summary: Update marketplace optin
|
|
4217
|
-
* @description: This API retrieves template for a given slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTemplateBySlug/).
|
|
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/).
|
|
4218
4398
|
*/
|
|
4219
|
-
async
|
|
4220
|
-
{
|
|
4399
|
+
async getProductValidation(
|
|
4400
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4221
4401
|
{ responseHeaders } = { responseHeaders: false }
|
|
4222
4402
|
) {
|
|
4223
|
-
const {
|
|
4224
|
-
|
|
4225
|
-
} = CatalogPlatformValidator.getProductTemplateBySlug().validate(
|
|
4226
|
-
{
|
|
4227
|
-
slug,
|
|
4228
|
-
},
|
|
4403
|
+
const { error } = CatalogPlatformValidator.getProductValidation().validate(
|
|
4404
|
+
{},
|
|
4229
4405
|
{ abortEarly: false, allowUnknown: true }
|
|
4230
4406
|
);
|
|
4231
4407
|
if (error) {
|
|
@@ -4235,16 +4411,14 @@ class Catalog {
|
|
|
4235
4411
|
// Showing warrnings if extra unknown parameters are found
|
|
4236
4412
|
const {
|
|
4237
4413
|
error: warrning,
|
|
4238
|
-
} = CatalogPlatformValidator.
|
|
4239
|
-
{
|
|
4240
|
-
slug,
|
|
4241
|
-
},
|
|
4414
|
+
} = CatalogPlatformValidator.getProductValidation().validate(
|
|
4415
|
+
{},
|
|
4242
4416
|
{ abortEarly: false, allowUnknown: false }
|
|
4243
4417
|
);
|
|
4244
4418
|
if (warrning) {
|
|
4245
4419
|
Logger({
|
|
4246
4420
|
level: "WARN",
|
|
4247
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4421
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductValidation \n ${warrning}`,
|
|
4248
4422
|
});
|
|
4249
4423
|
}
|
|
4250
4424
|
|
|
@@ -4255,7 +4429,7 @@ class Catalog {
|
|
|
4255
4429
|
const response = await PlatformAPIClient.execute(
|
|
4256
4430
|
this.config,
|
|
4257
4431
|
"get",
|
|
4258
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
4432
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/validation/`,
|
|
4259
4433
|
query_params,
|
|
4260
4434
|
undefined,
|
|
4261
4435
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4269,10 +4443,10 @@ class Catalog {
|
|
|
4269
4443
|
|
|
4270
4444
|
const {
|
|
4271
4445
|
error: res_error,
|
|
4272
|
-
} = CatalogPlatformModel.
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
);
|
|
4446
|
+
} = CatalogPlatformModel.ValidateProduct().validate(responseData, {
|
|
4447
|
+
abortEarly: false,
|
|
4448
|
+
allowUnknown: true,
|
|
4449
|
+
});
|
|
4276
4450
|
|
|
4277
4451
|
if (res_error) {
|
|
4278
4452
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4280,7 +4454,7 @@ class Catalog {
|
|
|
4280
4454
|
} else {
|
|
4281
4455
|
Logger({
|
|
4282
4456
|
level: "WARN",
|
|
4283
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4457
|
+
message: `Response Validation Warnings for platform > Catalog > getProductValidation \n ${res_error}`,
|
|
4284
4458
|
});
|
|
4285
4459
|
}
|
|
4286
4460
|
}
|
|
@@ -4289,22 +4463,53 @@ class Catalog {
|
|
|
4289
4463
|
}
|
|
4290
4464
|
|
|
4291
4465
|
/**
|
|
4292
|
-
* @param {CatalogPlatformValidator.
|
|
4466
|
+
* @param {CatalogPlatformValidator.GetProductsParam} arg - Arg object
|
|
4293
4467
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4294
4468
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4295
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4296
|
-
*
|
|
4297
|
-
* @
|
|
4298
|
-
* @
|
|
4469
|
+
* @returns {Promise<CatalogPlatformModel.ProductListingResponseV2>} -
|
|
4470
|
+
* Success response
|
|
4471
|
+
* @name getProducts
|
|
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/).
|
|
4299
4474
|
*/
|
|
4300
|
-
async
|
|
4301
|
-
{
|
|
4475
|
+
async getProducts(
|
|
4476
|
+
{
|
|
4477
|
+
brandIds,
|
|
4478
|
+
categoryIds,
|
|
4479
|
+
itemIds,
|
|
4480
|
+
departmentIds,
|
|
4481
|
+
itemCode,
|
|
4482
|
+
name,
|
|
4483
|
+
slug,
|
|
4484
|
+
allIdentifiers,
|
|
4485
|
+
q,
|
|
4486
|
+
tags,
|
|
4487
|
+
pageNo,
|
|
4488
|
+
pageSize,
|
|
4489
|
+
pageType,
|
|
4490
|
+
sortOn,
|
|
4491
|
+
pageId,
|
|
4492
|
+
requestHeaders,
|
|
4493
|
+
} = { requestHeaders: {} },
|
|
4302
4494
|
{ responseHeaders } = { responseHeaders: false }
|
|
4303
4495
|
) {
|
|
4304
|
-
const { error } = CatalogPlatformValidator.
|
|
4496
|
+
const { error } = CatalogPlatformValidator.getProducts().validate(
|
|
4305
4497
|
{
|
|
4306
|
-
|
|
4498
|
+
brandIds,
|
|
4499
|
+
categoryIds,
|
|
4500
|
+
itemIds,
|
|
4501
|
+
departmentIds,
|
|
4502
|
+
itemCode,
|
|
4503
|
+
name,
|
|
4307
4504
|
slug,
|
|
4505
|
+
allIdentifiers,
|
|
4506
|
+
q,
|
|
4507
|
+
tags,
|
|
4508
|
+
pageNo,
|
|
4509
|
+
pageSize,
|
|
4510
|
+
pageType,
|
|
4511
|
+
sortOn,
|
|
4512
|
+
pageId,
|
|
4308
4513
|
},
|
|
4309
4514
|
{ abortEarly: false, allowUnknown: true }
|
|
4310
4515
|
);
|
|
@@ -4313,32 +4518,56 @@ class Catalog {
|
|
|
4313
4518
|
}
|
|
4314
4519
|
|
|
4315
4520
|
// Showing warrnings if extra unknown parameters are found
|
|
4316
|
-
const {
|
|
4317
|
-
error: warrning,
|
|
4318
|
-
} = CatalogPlatformValidator.getProductValidation().validate(
|
|
4521
|
+
const { error: warrning } = CatalogPlatformValidator.getProducts().validate(
|
|
4319
4522
|
{
|
|
4320
|
-
|
|
4523
|
+
brandIds,
|
|
4524
|
+
categoryIds,
|
|
4525
|
+
itemIds,
|
|
4526
|
+
departmentIds,
|
|
4527
|
+
itemCode,
|
|
4528
|
+
name,
|
|
4321
4529
|
slug,
|
|
4530
|
+
allIdentifiers,
|
|
4531
|
+
q,
|
|
4532
|
+
tags,
|
|
4533
|
+
pageNo,
|
|
4534
|
+
pageSize,
|
|
4535
|
+
pageType,
|
|
4536
|
+
sortOn,
|
|
4537
|
+
pageId,
|
|
4322
4538
|
},
|
|
4323
4539
|
{ abortEarly: false, allowUnknown: false }
|
|
4324
4540
|
);
|
|
4325
4541
|
if (warrning) {
|
|
4326
4542
|
Logger({
|
|
4327
4543
|
level: "WARN",
|
|
4328
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4544
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProducts \n ${warrning}`,
|
|
4329
4545
|
});
|
|
4330
4546
|
}
|
|
4331
4547
|
|
|
4332
4548
|
const query_params = {};
|
|
4333
|
-
query_params["
|
|
4549
|
+
query_params["brand_ids"] = brandIds;
|
|
4550
|
+
query_params["category_ids"] = categoryIds;
|
|
4551
|
+
query_params["item_ids"] = itemIds;
|
|
4552
|
+
query_params["department_ids"] = departmentIds;
|
|
4553
|
+
query_params["item_code"] = itemCode;
|
|
4554
|
+
query_params["name"] = name;
|
|
4334
4555
|
query_params["slug"] = slug;
|
|
4556
|
+
query_params["all_identifiers"] = allIdentifiers;
|
|
4557
|
+
query_params["q"] = q;
|
|
4558
|
+
query_params["tags"] = tags;
|
|
4559
|
+
query_params["page_no"] = pageNo;
|
|
4560
|
+
query_params["page_size"] = pageSize;
|
|
4561
|
+
query_params["page_type"] = pageType;
|
|
4562
|
+
query_params["sort_on"] = sortOn;
|
|
4563
|
+
query_params["page_id"] = pageId;
|
|
4335
4564
|
|
|
4336
4565
|
const xHeaders = {};
|
|
4337
4566
|
|
|
4338
4567
|
const response = await PlatformAPIClient.execute(
|
|
4339
4568
|
this.config,
|
|
4340
4569
|
"get",
|
|
4341
|
-
`/service/platform/catalog/
|
|
4570
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
4342
4571
|
query_params,
|
|
4343
4572
|
undefined,
|
|
4344
4573
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4352,7 +4581,7 @@ class Catalog {
|
|
|
4352
4581
|
|
|
4353
4582
|
const {
|
|
4354
4583
|
error: res_error,
|
|
4355
|
-
} = CatalogPlatformModel.
|
|
4584
|
+
} = CatalogPlatformModel.ProductListingResponseV2().validate(responseData, {
|
|
4356
4585
|
abortEarly: false,
|
|
4357
4586
|
allowUnknown: true,
|
|
4358
4587
|
});
|
|
@@ -4363,7 +4592,7 @@ class Catalog {
|
|
|
4363
4592
|
} else {
|
|
4364
4593
|
Logger({
|
|
4365
4594
|
level: "WARN",
|
|
4366
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4595
|
+
message: `Response Validation Warnings for platform > Catalog > getProducts \n ${res_error}`,
|
|
4367
4596
|
});
|
|
4368
4597
|
}
|
|
4369
4598
|
}
|
|
@@ -4372,26 +4601,91 @@ class Catalog {
|
|
|
4372
4601
|
}
|
|
4373
4602
|
|
|
4374
4603
|
/**
|
|
4375
|
-
* @param {
|
|
4376
|
-
*
|
|
4377
|
-
*
|
|
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
|
+
|
|
4672
|
+
/**
|
|
4673
|
+
* @param {CatalogPlatformValidator.GetSellerInsightsParam} arg - Arg object
|
|
4378
4674
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4379
4675
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4380
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4676
|
+
* @returns {Promise<CatalogPlatformModel.CrossSellingResponseSchema>} -
|
|
4381
4677
|
* Success response
|
|
4382
|
-
* @name
|
|
4383
|
-
* @summary: Get
|
|
4384
|
-
* @description:
|
|
4678
|
+
* @name getSellerInsights
|
|
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/).
|
|
4385
4681
|
*/
|
|
4386
|
-
async
|
|
4387
|
-
{
|
|
4682
|
+
async getSellerInsights(
|
|
4683
|
+
{ sellerAppId, requestHeaders } = { requestHeaders: {} },
|
|
4388
4684
|
{ responseHeaders } = { responseHeaders: false }
|
|
4389
4685
|
) {
|
|
4390
|
-
const {
|
|
4391
|
-
error,
|
|
4392
|
-
} = CatalogPlatformValidator.getProductVerificationDetails().validate(
|
|
4686
|
+
const { error } = CatalogPlatformValidator.getSellerInsights().validate(
|
|
4393
4687
|
{
|
|
4394
|
-
|
|
4688
|
+
sellerAppId,
|
|
4395
4689
|
},
|
|
4396
4690
|
{ abortEarly: false, allowUnknown: true }
|
|
4397
4691
|
);
|
|
@@ -4402,228 +4696,7 @@ class Catalog {
|
|
|
4402
4696
|
// Showing warrnings if extra unknown parameters are found
|
|
4403
4697
|
const {
|
|
4404
4698
|
error: warrning,
|
|
4405
|
-
} = CatalogPlatformValidator.
|
|
4406
|
-
{
|
|
4407
|
-
itemId,
|
|
4408
|
-
},
|
|
4409
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4410
|
-
);
|
|
4411
|
-
if (warrning) {
|
|
4412
|
-
Logger({
|
|
4413
|
-
level: "WARN",
|
|
4414
|
-
message: `Parameter Validation warrnings for platform > Catalog > getProductVerificationDetails \n ${warrning}`,
|
|
4415
|
-
});
|
|
4416
|
-
}
|
|
4417
|
-
|
|
4418
|
-
const query_params = {};
|
|
4419
|
-
|
|
4420
|
-
const xHeaders = {};
|
|
4421
|
-
|
|
4422
|
-
const response = await PlatformAPIClient.execute(
|
|
4423
|
-
this.config,
|
|
4424
|
-
"get",
|
|
4425
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/verification/products/${itemId}`,
|
|
4426
|
-
query_params,
|
|
4427
|
-
undefined,
|
|
4428
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4429
|
-
{ responseHeaders }
|
|
4430
|
-
);
|
|
4431
|
-
|
|
4432
|
-
let responseData = response;
|
|
4433
|
-
if (responseHeaders) {
|
|
4434
|
-
responseData = response[0];
|
|
4435
|
-
}
|
|
4436
|
-
|
|
4437
|
-
const {
|
|
4438
|
-
error: res_error,
|
|
4439
|
-
} = CatalogPlatformModel.ProductVerificationModel().validate(responseData, {
|
|
4440
|
-
abortEarly: false,
|
|
4441
|
-
allowUnknown: true,
|
|
4442
|
-
});
|
|
4443
|
-
|
|
4444
|
-
if (res_error) {
|
|
4445
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4446
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4447
|
-
} else {
|
|
4448
|
-
Logger({
|
|
4449
|
-
level: "WARN",
|
|
4450
|
-
message: `Response Validation Warnings for platform > Catalog > getProductVerificationDetails \n ${res_error}`,
|
|
4451
|
-
});
|
|
4452
|
-
}
|
|
4453
|
-
}
|
|
4454
|
-
|
|
4455
|
-
return response;
|
|
4456
|
-
}
|
|
4457
|
-
|
|
4458
|
-
/**
|
|
4459
|
-
* @param {CatalogPlatformValidator.GetProductsParam} arg - Arg object
|
|
4460
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4461
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4462
|
-
* @returns {Promise<CatalogPlatformModel.ProductListingResponseV2>} -
|
|
4463
|
-
* Success response
|
|
4464
|
-
* @name getProducts
|
|
4465
|
-
* @summary: Retrieve products.
|
|
4466
|
-
* @description: Retrieve a list of products available - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProducts/).
|
|
4467
|
-
*/
|
|
4468
|
-
async getProducts(
|
|
4469
|
-
{
|
|
4470
|
-
brandIds,
|
|
4471
|
-
multiSize,
|
|
4472
|
-
categoryIds,
|
|
4473
|
-
itemIds,
|
|
4474
|
-
departmentIds,
|
|
4475
|
-
itemCode,
|
|
4476
|
-
name,
|
|
4477
|
-
slug,
|
|
4478
|
-
allIdentifiers,
|
|
4479
|
-
q,
|
|
4480
|
-
tags,
|
|
4481
|
-
pageNo,
|
|
4482
|
-
pageSize,
|
|
4483
|
-
pageType,
|
|
4484
|
-
sortOn,
|
|
4485
|
-
pageId,
|
|
4486
|
-
requestHeaders,
|
|
4487
|
-
} = { requestHeaders: {} },
|
|
4488
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4489
|
-
) {
|
|
4490
|
-
const { error } = CatalogPlatformValidator.getProducts().validate(
|
|
4491
|
-
{
|
|
4492
|
-
brandIds,
|
|
4493
|
-
multiSize,
|
|
4494
|
-
categoryIds,
|
|
4495
|
-
itemIds,
|
|
4496
|
-
departmentIds,
|
|
4497
|
-
itemCode,
|
|
4498
|
-
name,
|
|
4499
|
-
slug,
|
|
4500
|
-
allIdentifiers,
|
|
4501
|
-
q,
|
|
4502
|
-
tags,
|
|
4503
|
-
pageNo,
|
|
4504
|
-
pageSize,
|
|
4505
|
-
pageType,
|
|
4506
|
-
sortOn,
|
|
4507
|
-
pageId,
|
|
4508
|
-
},
|
|
4509
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4510
|
-
);
|
|
4511
|
-
if (error) {
|
|
4512
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4513
|
-
}
|
|
4514
|
-
|
|
4515
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4516
|
-
const { error: warrning } = CatalogPlatformValidator.getProducts().validate(
|
|
4517
|
-
{
|
|
4518
|
-
brandIds,
|
|
4519
|
-
multiSize,
|
|
4520
|
-
categoryIds,
|
|
4521
|
-
itemIds,
|
|
4522
|
-
departmentIds,
|
|
4523
|
-
itemCode,
|
|
4524
|
-
name,
|
|
4525
|
-
slug,
|
|
4526
|
-
allIdentifiers,
|
|
4527
|
-
q,
|
|
4528
|
-
tags,
|
|
4529
|
-
pageNo,
|
|
4530
|
-
pageSize,
|
|
4531
|
-
pageType,
|
|
4532
|
-
sortOn,
|
|
4533
|
-
pageId,
|
|
4534
|
-
},
|
|
4535
|
-
{ abortEarly: false, allowUnknown: false }
|
|
4536
|
-
);
|
|
4537
|
-
if (warrning) {
|
|
4538
|
-
Logger({
|
|
4539
|
-
level: "WARN",
|
|
4540
|
-
message: `Parameter Validation warrnings for platform > Catalog > getProducts \n ${warrning}`,
|
|
4541
|
-
});
|
|
4542
|
-
}
|
|
4543
|
-
|
|
4544
|
-
const query_params = {};
|
|
4545
|
-
query_params["brand_ids"] = brandIds;
|
|
4546
|
-
query_params["multi_size"] = multiSize;
|
|
4547
|
-
query_params["category_ids"] = categoryIds;
|
|
4548
|
-
query_params["item_ids"] = itemIds;
|
|
4549
|
-
query_params["department_ids"] = departmentIds;
|
|
4550
|
-
query_params["item_code"] = itemCode;
|
|
4551
|
-
query_params["name"] = name;
|
|
4552
|
-
query_params["slug"] = slug;
|
|
4553
|
-
query_params["all_identifiers"] = allIdentifiers;
|
|
4554
|
-
query_params["q"] = q;
|
|
4555
|
-
query_params["tags"] = tags;
|
|
4556
|
-
query_params["page_no"] = pageNo;
|
|
4557
|
-
query_params["page_size"] = pageSize;
|
|
4558
|
-
query_params["page_type"] = pageType;
|
|
4559
|
-
query_params["sort_on"] = sortOn;
|
|
4560
|
-
query_params["page_id"] = pageId;
|
|
4561
|
-
|
|
4562
|
-
const xHeaders = {};
|
|
4563
|
-
|
|
4564
|
-
const response = await PlatformAPIClient.execute(
|
|
4565
|
-
this.config,
|
|
4566
|
-
"get",
|
|
4567
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products`,
|
|
4568
|
-
query_params,
|
|
4569
|
-
undefined,
|
|
4570
|
-
{ ...xHeaders, ...requestHeaders },
|
|
4571
|
-
{ responseHeaders }
|
|
4572
|
-
);
|
|
4573
|
-
|
|
4574
|
-
let responseData = response;
|
|
4575
|
-
if (responseHeaders) {
|
|
4576
|
-
responseData = response[0];
|
|
4577
|
-
}
|
|
4578
|
-
|
|
4579
|
-
const {
|
|
4580
|
-
error: res_error,
|
|
4581
|
-
} = CatalogPlatformModel.ProductListingResponseV2().validate(responseData, {
|
|
4582
|
-
abortEarly: false,
|
|
4583
|
-
allowUnknown: true,
|
|
4584
|
-
});
|
|
4585
|
-
|
|
4586
|
-
if (res_error) {
|
|
4587
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
4588
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4589
|
-
} else {
|
|
4590
|
-
Logger({
|
|
4591
|
-
level: "WARN",
|
|
4592
|
-
message: `Response Validation Warnings for platform > Catalog > getProducts \n ${res_error}`,
|
|
4593
|
-
});
|
|
4594
|
-
}
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4597
|
-
return response;
|
|
4598
|
-
}
|
|
4599
|
-
|
|
4600
|
-
/**
|
|
4601
|
-
* @param {CatalogPlatformValidator.GetSellerInsightsParam} arg - Arg object
|
|
4602
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4603
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4604
|
-
* @returns {Promise<CatalogPlatformModel.CrossSellingResponse>} - Success response
|
|
4605
|
-
* @name getSellerInsights
|
|
4606
|
-
* @summary: Get seller insights.
|
|
4607
|
-
* @description: Retrieve insights and analytics related to sellers within the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSellerInsights/).
|
|
4608
|
-
*/
|
|
4609
|
-
async getSellerInsights(
|
|
4610
|
-
{ sellerAppId, requestHeaders } = { requestHeaders: {} },
|
|
4611
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
4612
|
-
) {
|
|
4613
|
-
const { error } = CatalogPlatformValidator.getSellerInsights().validate(
|
|
4614
|
-
{
|
|
4615
|
-
sellerAppId,
|
|
4616
|
-
},
|
|
4617
|
-
{ abortEarly: false, allowUnknown: true }
|
|
4618
|
-
);
|
|
4619
|
-
if (error) {
|
|
4620
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
4621
|
-
}
|
|
4622
|
-
|
|
4623
|
-
// Showing warrnings if extra unknown parameters are found
|
|
4624
|
-
const {
|
|
4625
|
-
error: warrning,
|
|
4626
|
-
} = CatalogPlatformValidator.getSellerInsights().validate(
|
|
4699
|
+
} = CatalogPlatformValidator.getSellerInsights().validate(
|
|
4627
4700
|
{
|
|
4628
4701
|
sellerAppId,
|
|
4629
4702
|
},
|
|
@@ -4643,7 +4716,7 @@ class Catalog {
|
|
|
4643
4716
|
const response = await PlatformAPIClient.execute(
|
|
4644
4717
|
this.config,
|
|
4645
4718
|
"get",
|
|
4646
|
-
`/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/`,
|
|
4647
4720
|
query_params,
|
|
4648
4721
|
undefined,
|
|
4649
4722
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4657,10 +4730,10 @@ class Catalog {
|
|
|
4657
4730
|
|
|
4658
4731
|
const {
|
|
4659
4732
|
error: res_error,
|
|
4660
|
-
} = CatalogPlatformModel.
|
|
4661
|
-
|
|
4662
|
-
allowUnknown: true
|
|
4663
|
-
|
|
4733
|
+
} = CatalogPlatformModel.CrossSellingResponseSchema().validate(
|
|
4734
|
+
responseData,
|
|
4735
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4736
|
+
);
|
|
4664
4737
|
|
|
4665
4738
|
if (res_error) {
|
|
4666
4739
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4682,8 +4755,8 @@ class Catalog {
|
|
|
4682
4755
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4683
4756
|
* @returns {Promise<CatalogPlatformModel.HSNDataInsertV2>} - Success response
|
|
4684
4757
|
* @name getSingleProductHSNCode
|
|
4685
|
-
* @summary: Get
|
|
4686
|
-
* @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/).
|
|
4687
4760
|
*/
|
|
4688
4761
|
async getSingleProductHSNCode(
|
|
4689
4762
|
{ reportingHsn, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4757,17 +4830,19 @@ class Catalog {
|
|
|
4757
4830
|
* @param {CatalogPlatformValidator.GetSizeGuideParam} arg - Arg object
|
|
4758
4831
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4759
4832
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4760
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4833
|
+
* @returns {Promise<CatalogPlatformModel.SizeGuideResponseSchema>} - Success response
|
|
4761
4834
|
* @name getSizeGuide
|
|
4762
|
-
* @summary: Get size guide
|
|
4763
|
-
* @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/).
|
|
4764
4837
|
*/
|
|
4765
4838
|
async getSizeGuide(
|
|
4766
4839
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
4767
4840
|
{ responseHeaders } = { responseHeaders: false }
|
|
4768
4841
|
) {
|
|
4769
4842
|
const { error } = CatalogPlatformValidator.getSizeGuide().validate(
|
|
4770
|
-
{
|
|
4843
|
+
{
|
|
4844
|
+
id,
|
|
4845
|
+
},
|
|
4771
4846
|
{ abortEarly: false, allowUnknown: true }
|
|
4772
4847
|
);
|
|
4773
4848
|
if (error) {
|
|
@@ -4778,7 +4853,9 @@ class Catalog {
|
|
|
4778
4853
|
const {
|
|
4779
4854
|
error: warrning,
|
|
4780
4855
|
} = CatalogPlatformValidator.getSizeGuide().validate(
|
|
4781
|
-
{
|
|
4856
|
+
{
|
|
4857
|
+
id,
|
|
4858
|
+
},
|
|
4782
4859
|
{ abortEarly: false, allowUnknown: false }
|
|
4783
4860
|
);
|
|
4784
4861
|
if (warrning) {
|
|
@@ -4795,7 +4872,7 @@ class Catalog {
|
|
|
4795
4872
|
const response = await PlatformAPIClient.execute(
|
|
4796
4873
|
this.config,
|
|
4797
4874
|
"get",
|
|
4798
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}
|
|
4875
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
|
|
4799
4876
|
query_params,
|
|
4800
4877
|
undefined,
|
|
4801
4878
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4809,7 +4886,7 @@ class Catalog {
|
|
|
4809
4886
|
|
|
4810
4887
|
const {
|
|
4811
4888
|
error: res_error,
|
|
4812
|
-
} = CatalogPlatformModel.
|
|
4889
|
+
} = CatalogPlatformModel.SizeGuideResponseSchema().validate(responseData, {
|
|
4813
4890
|
abortEarly: false,
|
|
4814
4891
|
allowUnknown: true,
|
|
4815
4892
|
});
|
|
@@ -4834,11 +4911,11 @@ class Catalog {
|
|
|
4834
4911
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4835
4912
|
* @returns {Promise<CatalogPlatformModel.ListSizeGuide>} - Success response
|
|
4836
4913
|
* @name getSizeGuides
|
|
4837
|
-
* @summary:
|
|
4838
|
-
* @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/).
|
|
4839
4916
|
*/
|
|
4840
4917
|
async getSizeGuides(
|
|
4841
|
-
{ active, q,
|
|
4918
|
+
{ active, q, tag, pageNo, pageSize, brandId, requestHeaders } = {
|
|
4842
4919
|
requestHeaders: {},
|
|
4843
4920
|
},
|
|
4844
4921
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -4847,10 +4924,10 @@ class Catalog {
|
|
|
4847
4924
|
{
|
|
4848
4925
|
active,
|
|
4849
4926
|
q,
|
|
4850
|
-
brandId,
|
|
4851
4927
|
tag,
|
|
4852
4928
|
pageNo,
|
|
4853
4929
|
pageSize,
|
|
4930
|
+
brandId,
|
|
4854
4931
|
},
|
|
4855
4932
|
{ abortEarly: false, allowUnknown: true }
|
|
4856
4933
|
);
|
|
@@ -4865,10 +4942,10 @@ class Catalog {
|
|
|
4865
4942
|
{
|
|
4866
4943
|
active,
|
|
4867
4944
|
q,
|
|
4868
|
-
brandId,
|
|
4869
4945
|
tag,
|
|
4870
4946
|
pageNo,
|
|
4871
4947
|
pageSize,
|
|
4948
|
+
brandId,
|
|
4872
4949
|
},
|
|
4873
4950
|
{ abortEarly: false, allowUnknown: false }
|
|
4874
4951
|
);
|
|
@@ -4882,10 +4959,10 @@ class Catalog {
|
|
|
4882
4959
|
const query_params = {};
|
|
4883
4960
|
query_params["active"] = active;
|
|
4884
4961
|
query_params["q"] = q;
|
|
4885
|
-
query_params["brand_id"] = brandId;
|
|
4886
4962
|
query_params["tag"] = tag;
|
|
4887
4963
|
query_params["page_no"] = pageNo;
|
|
4888
4964
|
query_params["page_size"] = pageSize;
|
|
4965
|
+
query_params["brand_id"] = brandId;
|
|
4889
4966
|
|
|
4890
4967
|
const xHeaders = {};
|
|
4891
4968
|
|
|
@@ -4931,8 +5008,8 @@ class Catalog {
|
|
|
4931
5008
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4932
5009
|
* @returns {Promise<CatalogPlatformModel.OptinStoreDetails>} - Success response
|
|
4933
5010
|
* @name getStoreDetail
|
|
4934
|
-
* @summary: Get
|
|
4935
|
-
* @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/).
|
|
4936
5013
|
*/
|
|
4937
5014
|
async getStoreDetail(
|
|
4938
5015
|
{ q, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4978,7 +5055,7 @@ class Catalog {
|
|
|
4978
5055
|
const response = await PlatformAPIClient.execute(
|
|
4979
5056
|
this.config,
|
|
4980
5057
|
"get",
|
|
4981
|
-
`/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/`,
|
|
4982
5059
|
query_params,
|
|
4983
5060
|
undefined,
|
|
4984
5061
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5012,92 +5089,43 @@ class Catalog {
|
|
|
5012
5089
|
}
|
|
5013
5090
|
|
|
5014
5091
|
/**
|
|
5015
|
-
* @param {
|
|
5016
|
-
* @param {
|
|
5017
|
-
* @param {
|
|
5018
|
-
*
|
|
5019
|
-
* @
|
|
5020
|
-
* @summary: Get
|
|
5021
|
-
* @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.
|
|
5022
5099
|
*/
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
if (error) {
|
|
5034
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
5035
|
-
}
|
|
5036
|
-
|
|
5037
|
-
// Showing warrnings if extra unknown parameters are found
|
|
5038
|
-
const {
|
|
5039
|
-
error: warrning,
|
|
5040
|
-
} = CatalogPlatformValidator.getVariantTypes().validate(
|
|
5041
|
-
{
|
|
5042
|
-
templateTag,
|
|
5043
|
-
},
|
|
5044
|
-
{ abortEarly: false, allowUnknown: false }
|
|
5045
|
-
);
|
|
5046
|
-
if (warrning) {
|
|
5047
|
-
Logger({
|
|
5048
|
-
level: "WARN",
|
|
5049
|
-
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,
|
|
5050
5110
|
});
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
this.config,
|
|
5060
|
-
"get",
|
|
5061
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/variant-types`,
|
|
5062
|
-
query_params,
|
|
5063
|
-
undefined,
|
|
5064
|
-
{ ...xHeaders, ...requestHeaders },
|
|
5065
|
-
{ responseHeaders }
|
|
5066
|
-
);
|
|
5067
|
-
|
|
5068
|
-
let responseData = response;
|
|
5069
|
-
if (responseHeaders) {
|
|
5070
|
-
responseData = response[0];
|
|
5071
|
-
}
|
|
5072
|
-
|
|
5073
|
-
const {
|
|
5074
|
-
error: res_error,
|
|
5075
|
-
} = CatalogPlatformModel.VariantTypesResponse().validate(responseData, {
|
|
5076
|
-
abortEarly: false,
|
|
5077
|
-
allowUnknown: true,
|
|
5078
|
-
});
|
|
5079
|
-
|
|
5080
|
-
if (res_error) {
|
|
5081
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
5082
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5083
|
-
} else {
|
|
5084
|
-
Logger({
|
|
5085
|
-
level: "WARN",
|
|
5086
|
-
message: `Response Validation Warnings for platform > Catalog > getVariantTypes \n ${res_error}`,
|
|
5087
|
-
});
|
|
5088
|
-
}
|
|
5089
|
-
}
|
|
5090
|
-
|
|
5091
|
-
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;
|
|
5092
5119
|
}
|
|
5093
5120
|
|
|
5094
5121
|
/**
|
|
5095
5122
|
* @param {CatalogPlatformValidator.GetVariantsOfProductsParam} arg - Arg object
|
|
5096
5123
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5097
5124
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5098
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5125
|
+
* @returns {Promise<CatalogPlatformModel.ProductVariantsResponseSchema>} -
|
|
5126
|
+
* Success response
|
|
5099
5127
|
* @name getVariantsOfProducts
|
|
5100
|
-
* @summary: Get variants
|
|
5128
|
+
* @summary: Get variants
|
|
5101
5129
|
* @description: Retrieve variants of a specific product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getVariantsOfProducts/).
|
|
5102
5130
|
*/
|
|
5103
5131
|
async getVariantsOfProducts(
|
|
@@ -5161,10 +5189,10 @@ class Catalog {
|
|
|
5161
5189
|
|
|
5162
5190
|
const {
|
|
5163
5191
|
error: res_error,
|
|
5164
|
-
} = CatalogPlatformModel.
|
|
5165
|
-
|
|
5166
|
-
allowUnknown: true
|
|
5167
|
-
|
|
5192
|
+
} = CatalogPlatformModel.ProductVariantsResponseSchema().validate(
|
|
5193
|
+
responseData,
|
|
5194
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5195
|
+
);
|
|
5168
5196
|
|
|
5169
5197
|
if (res_error) {
|
|
5170
5198
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5180,17 +5208,49 @@ class Catalog {
|
|
|
5180
5208
|
return response;
|
|
5181
5209
|
}
|
|
5182
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
|
+
|
|
5183
5243
|
/**
|
|
5184
5244
|
* @param {CatalogPlatformValidator.ListCategoriesParam} arg - Arg object
|
|
5185
5245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5186
5246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5187
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5247
|
+
* @returns {Promise<CatalogPlatformModel.CategoryResponseSchema>} - Success response
|
|
5188
5248
|
* @name listCategories
|
|
5189
|
-
* @summary: List categories
|
|
5190
|
-
* @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/).
|
|
5191
5251
|
*/
|
|
5192
5252
|
async listCategories(
|
|
5193
|
-
{ level, department, q, pageNo, pageSize, uids, requestHeaders } = {
|
|
5253
|
+
{ level, department, q, pageNo, pageSize, uids, slug, requestHeaders } = {
|
|
5194
5254
|
requestHeaders: {},
|
|
5195
5255
|
},
|
|
5196
5256
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5203,6 +5263,7 @@ class Catalog {
|
|
|
5203
5263
|
pageNo,
|
|
5204
5264
|
pageSize,
|
|
5205
5265
|
uids,
|
|
5266
|
+
slug,
|
|
5206
5267
|
},
|
|
5207
5268
|
{ abortEarly: false, allowUnknown: true }
|
|
5208
5269
|
);
|
|
@@ -5221,6 +5282,7 @@ class Catalog {
|
|
|
5221
5282
|
pageNo,
|
|
5222
5283
|
pageSize,
|
|
5223
5284
|
uids,
|
|
5285
|
+
slug,
|
|
5224
5286
|
},
|
|
5225
5287
|
{ abortEarly: false, allowUnknown: false }
|
|
5226
5288
|
);
|
|
@@ -5238,13 +5300,14 @@ class Catalog {
|
|
|
5238
5300
|
query_params["page_no"] = pageNo;
|
|
5239
5301
|
query_params["page_size"] = pageSize;
|
|
5240
5302
|
query_params["uids"] = uids;
|
|
5303
|
+
query_params["slug"] = slug;
|
|
5241
5304
|
|
|
5242
5305
|
const xHeaders = {};
|
|
5243
5306
|
|
|
5244
5307
|
const response = await PlatformAPIClient.execute(
|
|
5245
5308
|
this.config,
|
|
5246
5309
|
"get",
|
|
5247
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category
|
|
5310
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/`,
|
|
5248
5311
|
query_params,
|
|
5249
5312
|
undefined,
|
|
5250
5313
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5258,7 +5321,7 @@ class Catalog {
|
|
|
5258
5321
|
|
|
5259
5322
|
const {
|
|
5260
5323
|
error: res_error,
|
|
5261
|
-
} = CatalogPlatformModel.
|
|
5324
|
+
} = CatalogPlatformModel.CategoryResponseSchema().validate(responseData, {
|
|
5262
5325
|
abortEarly: false,
|
|
5263
5326
|
allowUnknown: true,
|
|
5264
5327
|
});
|
|
@@ -5277,14 +5340,53 @@ class Catalog {
|
|
|
5277
5340
|
return response;
|
|
5278
5341
|
}
|
|
5279
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
|
+
|
|
5280
5381
|
/**
|
|
5281
5382
|
* @param {CatalogPlatformValidator.ListDepartmentsDataParam} arg - Arg object
|
|
5282
5383
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5283
5384
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5284
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5385
|
+
* @returns {Promise<CatalogPlatformModel.DepartmentsResponseSchema>} -
|
|
5386
|
+
* Success response
|
|
5285
5387
|
* @name listDepartmentsData
|
|
5286
|
-
* @summary: List department
|
|
5287
|
-
* @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/).
|
|
5288
5390
|
*/
|
|
5289
5391
|
async listDepartmentsData(
|
|
5290
5392
|
{
|
|
@@ -5294,7 +5396,7 @@ class Catalog {
|
|
|
5294
5396
|
name,
|
|
5295
5397
|
search,
|
|
5296
5398
|
isActive,
|
|
5297
|
-
|
|
5399
|
+
slug,
|
|
5298
5400
|
requestHeaders,
|
|
5299
5401
|
} = { requestHeaders: {} },
|
|
5300
5402
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5307,7 +5409,7 @@ class Catalog {
|
|
|
5307
5409
|
name,
|
|
5308
5410
|
search,
|
|
5309
5411
|
isActive,
|
|
5310
|
-
|
|
5412
|
+
slug,
|
|
5311
5413
|
},
|
|
5312
5414
|
{ abortEarly: false, allowUnknown: true }
|
|
5313
5415
|
);
|
|
@@ -5326,7 +5428,7 @@ class Catalog {
|
|
|
5326
5428
|
name,
|
|
5327
5429
|
search,
|
|
5328
5430
|
isActive,
|
|
5329
|
-
|
|
5431
|
+
slug,
|
|
5330
5432
|
},
|
|
5331
5433
|
{ abortEarly: false, allowUnknown: false }
|
|
5332
5434
|
);
|
|
@@ -5344,14 +5446,14 @@ class Catalog {
|
|
|
5344
5446
|
query_params["name"] = name;
|
|
5345
5447
|
query_params["search"] = search;
|
|
5346
5448
|
query_params["is_active"] = isActive;
|
|
5347
|
-
query_params["
|
|
5449
|
+
query_params["slug"] = slug;
|
|
5348
5450
|
|
|
5349
5451
|
const xHeaders = {};
|
|
5350
5452
|
|
|
5351
5453
|
const response = await PlatformAPIClient.execute(
|
|
5352
5454
|
this.config,
|
|
5353
5455
|
"get",
|
|
5354
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments
|
|
5456
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/`,
|
|
5355
5457
|
query_params,
|
|
5356
5458
|
undefined,
|
|
5357
5459
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5365,10 +5467,10 @@ class Catalog {
|
|
|
5365
5467
|
|
|
5366
5468
|
const {
|
|
5367
5469
|
error: res_error,
|
|
5368
|
-
} = CatalogPlatformModel.
|
|
5369
|
-
|
|
5370
|
-
allowUnknown: true
|
|
5371
|
-
|
|
5470
|
+
} = CatalogPlatformModel.DepartmentsResponseSchema().validate(
|
|
5471
|
+
responseData,
|
|
5472
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5473
|
+
);
|
|
5372
5474
|
|
|
5373
5475
|
if (res_error) {
|
|
5374
5476
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5384,14 +5486,62 @@ class Catalog {
|
|
|
5384
5486
|
return response;
|
|
5385
5487
|
}
|
|
5386
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
|
+
|
|
5387
5537
|
/**
|
|
5388
5538
|
* @param {CatalogPlatformValidator.ListHSNCodesParam} arg - Arg object
|
|
5389
5539
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5390
5540
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5391
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5541
|
+
* @returns {Promise<CatalogPlatformModel.HSNCodesResponseSchema>} - Success response
|
|
5392
5542
|
* @name listHSNCodes
|
|
5393
|
-
* @summary: List HSN codes
|
|
5394
|
-
* @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/).
|
|
5395
5545
|
*/
|
|
5396
5546
|
async listHSNCodes(
|
|
5397
5547
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5426,7 +5576,7 @@ class Catalog {
|
|
|
5426
5576
|
const response = await PlatformAPIClient.execute(
|
|
5427
5577
|
this.config,
|
|
5428
5578
|
"get",
|
|
5429
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/hsn
|
|
5579
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/hsn/`,
|
|
5430
5580
|
query_params,
|
|
5431
5581
|
undefined,
|
|
5432
5582
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5440,7 +5590,7 @@ class Catalog {
|
|
|
5440
5590
|
|
|
5441
5591
|
const {
|
|
5442
5592
|
error: res_error,
|
|
5443
|
-
} = CatalogPlatformModel.
|
|
5593
|
+
} = CatalogPlatformModel.HSNCodesResponseSchema().validate(responseData, {
|
|
5444
5594
|
abortEarly: false,
|
|
5445
5595
|
allowUnknown: true,
|
|
5446
5596
|
});
|
|
@@ -5463,12 +5613,12 @@ class Catalog {
|
|
|
5463
5613
|
* @param {CatalogPlatformValidator.ListInventoryExportParam} arg - Arg object
|
|
5464
5614
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5465
5615
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5466
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5616
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportJobListResponseSchema>}
|
|
5467
5617
|
* - Success response
|
|
5468
5618
|
*
|
|
5469
5619
|
* @name listInventoryExport
|
|
5470
|
-
* @summary: List inventory
|
|
5471
|
-
* @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/).
|
|
5472
5622
|
*/
|
|
5473
5623
|
async listInventoryExport(
|
|
5474
5624
|
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
@@ -5525,7 +5675,176 @@ class Catalog {
|
|
|
5525
5675
|
const response = await PlatformAPIClient.execute(
|
|
5526
5676
|
this.config,
|
|
5527
5677
|
"get",
|
|
5528
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download
|
|
5678
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download/`,
|
|
5679
|
+
query_params,
|
|
5680
|
+
undefined,
|
|
5681
|
+
{ ...xHeaders, ...requestHeaders },
|
|
5682
|
+
{ responseHeaders }
|
|
5683
|
+
);
|
|
5684
|
+
|
|
5685
|
+
let responseData = response;
|
|
5686
|
+
if (responseHeaders) {
|
|
5687
|
+
responseData = response[0];
|
|
5688
|
+
}
|
|
5689
|
+
|
|
5690
|
+
const {
|
|
5691
|
+
error: res_error,
|
|
5692
|
+
} = CatalogPlatformModel.InventoryExportJobListResponseSchema().validate(
|
|
5693
|
+
responseData,
|
|
5694
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5695
|
+
);
|
|
5696
|
+
|
|
5697
|
+
if (res_error) {
|
|
5698
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5699
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5700
|
+
} else {
|
|
5701
|
+
Logger({
|
|
5702
|
+
level: "WARN",
|
|
5703
|
+
message: `Response Validation Warnings for platform > Catalog > listInventoryExport \n ${res_error}`,
|
|
5704
|
+
});
|
|
5705
|
+
}
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5708
|
+
return response;
|
|
5709
|
+
}
|
|
5710
|
+
|
|
5711
|
+
/**
|
|
5712
|
+
* @param {CatalogPlatformValidator.ListProductTemplateParam} arg - Arg object
|
|
5713
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5714
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5715
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesResponseSchema>} - Success response
|
|
5716
|
+
* @name listProductTemplate
|
|
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/).
|
|
5719
|
+
*/
|
|
5720
|
+
async listProductTemplate(
|
|
5721
|
+
{ department, requestHeaders } = { requestHeaders: {} },
|
|
5722
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5723
|
+
) {
|
|
5724
|
+
const { error } = CatalogPlatformValidator.listProductTemplate().validate(
|
|
5725
|
+
{
|
|
5726
|
+
department,
|
|
5727
|
+
},
|
|
5728
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5729
|
+
);
|
|
5730
|
+
if (error) {
|
|
5731
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5732
|
+
}
|
|
5733
|
+
|
|
5734
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5735
|
+
const {
|
|
5736
|
+
error: warrning,
|
|
5737
|
+
} = CatalogPlatformValidator.listProductTemplate().validate(
|
|
5738
|
+
{
|
|
5739
|
+
department,
|
|
5740
|
+
},
|
|
5741
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5742
|
+
);
|
|
5743
|
+
if (warrning) {
|
|
5744
|
+
Logger({
|
|
5745
|
+
level: "WARN",
|
|
5746
|
+
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplate \n ${warrning}`,
|
|
5747
|
+
});
|
|
5748
|
+
}
|
|
5749
|
+
|
|
5750
|
+
const query_params = {};
|
|
5751
|
+
query_params["department"] = department;
|
|
5752
|
+
|
|
5753
|
+
const xHeaders = {};
|
|
5754
|
+
|
|
5755
|
+
const response = await PlatformAPIClient.execute(
|
|
5756
|
+
this.config,
|
|
5757
|
+
"get",
|
|
5758
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/`,
|
|
5759
|
+
query_params,
|
|
5760
|
+
undefined,
|
|
5761
|
+
{ ...xHeaders, ...requestHeaders },
|
|
5762
|
+
{ responseHeaders }
|
|
5763
|
+
);
|
|
5764
|
+
|
|
5765
|
+
let responseData = response;
|
|
5766
|
+
if (responseHeaders) {
|
|
5767
|
+
responseData = response[0];
|
|
5768
|
+
}
|
|
5769
|
+
|
|
5770
|
+
const {
|
|
5771
|
+
error: res_error,
|
|
5772
|
+
} = CatalogPlatformModel.TemplatesResponseSchema().validate(responseData, {
|
|
5773
|
+
abortEarly: false,
|
|
5774
|
+
allowUnknown: true,
|
|
5775
|
+
});
|
|
5776
|
+
|
|
5777
|
+
if (res_error) {
|
|
5778
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5779
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5780
|
+
} else {
|
|
5781
|
+
Logger({
|
|
5782
|
+
level: "WARN",
|
|
5783
|
+
message: `Response Validation Warnings for platform > Catalog > listProductTemplate \n ${res_error}`,
|
|
5784
|
+
});
|
|
5785
|
+
}
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
return response;
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5791
|
+
/**
|
|
5792
|
+
* @param {CatalogPlatformValidator.ListProductTemplateCategoriesParam} arg
|
|
5793
|
+
* - Arg object
|
|
5794
|
+
*
|
|
5795
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5796
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5797
|
+
* @returns {Promise<CatalogPlatformModel.ProdcutTemplateCategoriesResponseSchema>}
|
|
5798
|
+
* - Success response
|
|
5799
|
+
*
|
|
5800
|
+
* @name 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/).
|
|
5803
|
+
*/
|
|
5804
|
+
async listProductTemplateCategories(
|
|
5805
|
+
{ departments, itemType, requestHeaders } = { requestHeaders: {} },
|
|
5806
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5807
|
+
) {
|
|
5808
|
+
const {
|
|
5809
|
+
error,
|
|
5810
|
+
} = CatalogPlatformValidator.listProductTemplateCategories().validate(
|
|
5811
|
+
{
|
|
5812
|
+
departments,
|
|
5813
|
+
itemType,
|
|
5814
|
+
},
|
|
5815
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5816
|
+
);
|
|
5817
|
+
if (error) {
|
|
5818
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5819
|
+
}
|
|
5820
|
+
|
|
5821
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5822
|
+
const {
|
|
5823
|
+
error: warrning,
|
|
5824
|
+
} = CatalogPlatformValidator.listProductTemplateCategories().validate(
|
|
5825
|
+
{
|
|
5826
|
+
departments,
|
|
5827
|
+
itemType,
|
|
5828
|
+
},
|
|
5829
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5830
|
+
);
|
|
5831
|
+
if (warrning) {
|
|
5832
|
+
Logger({
|
|
5833
|
+
level: "WARN",
|
|
5834
|
+
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplateCategories \n ${warrning}`,
|
|
5835
|
+
});
|
|
5836
|
+
}
|
|
5837
|
+
|
|
5838
|
+
const query_params = {};
|
|
5839
|
+
query_params["departments"] = departments;
|
|
5840
|
+
query_params["item_type"] = itemType;
|
|
5841
|
+
|
|
5842
|
+
const xHeaders = {};
|
|
5843
|
+
|
|
5844
|
+
const response = await PlatformAPIClient.execute(
|
|
5845
|
+
this.config,
|
|
5846
|
+
"get",
|
|
5847
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/categories/`,
|
|
5529
5848
|
query_params,
|
|
5530
5849
|
undefined,
|
|
5531
5850
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5539,7 +5858,7 @@ class Catalog {
|
|
|
5539
5858
|
|
|
5540
5859
|
const {
|
|
5541
5860
|
error: res_error,
|
|
5542
|
-
} = CatalogPlatformModel.
|
|
5861
|
+
} = CatalogPlatformModel.ProdcutTemplateCategoriesResponseSchema().validate(
|
|
5543
5862
|
responseData,
|
|
5544
5863
|
{ abortEarly: false, allowUnknown: true }
|
|
5545
5864
|
);
|
|
@@ -5550,7 +5869,7 @@ class Catalog {
|
|
|
5550
5869
|
} else {
|
|
5551
5870
|
Logger({
|
|
5552
5871
|
level: "WARN",
|
|
5553
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5872
|
+
message: `Response Validation Warnings for platform > Catalog > listProductTemplateCategories \n ${res_error}`,
|
|
5554
5873
|
});
|
|
5555
5874
|
}
|
|
5556
5875
|
}
|
|
@@ -5559,22 +5878,26 @@ class Catalog {
|
|
|
5559
5878
|
}
|
|
5560
5879
|
|
|
5561
5880
|
/**
|
|
5562
|
-
* @param {CatalogPlatformValidator.
|
|
5881
|
+
* @param {CatalogPlatformValidator.ListProductTemplateExportDetailsParam} arg
|
|
5882
|
+
* - Arg object
|
|
5883
|
+
*
|
|
5563
5884
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5564
5885
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5565
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5566
|
-
*
|
|
5567
|
-
*
|
|
5568
|
-
* @
|
|
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/).
|
|
5569
5892
|
*/
|
|
5570
|
-
async
|
|
5571
|
-
{
|
|
5893
|
+
async listProductTemplateExportDetails(
|
|
5894
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
5572
5895
|
{ responseHeaders } = { responseHeaders: false }
|
|
5573
5896
|
) {
|
|
5574
|
-
const {
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
},
|
|
5897
|
+
const {
|
|
5898
|
+
error,
|
|
5899
|
+
} = CatalogPlatformValidator.listProductTemplateExportDetails().validate(
|
|
5900
|
+
{},
|
|
5578
5901
|
{ abortEarly: false, allowUnknown: true }
|
|
5579
5902
|
);
|
|
5580
5903
|
if (error) {
|
|
@@ -5584,28 +5907,25 @@ class Catalog {
|
|
|
5584
5907
|
// Showing warrnings if extra unknown parameters are found
|
|
5585
5908
|
const {
|
|
5586
5909
|
error: warrning,
|
|
5587
|
-
} = CatalogPlatformValidator.
|
|
5588
|
-
{
|
|
5589
|
-
department,
|
|
5590
|
-
},
|
|
5910
|
+
} = CatalogPlatformValidator.listProductTemplateExportDetails().validate(
|
|
5911
|
+
{},
|
|
5591
5912
|
{ abortEarly: false, allowUnknown: false }
|
|
5592
5913
|
);
|
|
5593
5914
|
if (warrning) {
|
|
5594
5915
|
Logger({
|
|
5595
5916
|
level: "WARN",
|
|
5596
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5917
|
+
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplateExportDetails \n ${warrning}`,
|
|
5597
5918
|
});
|
|
5598
5919
|
}
|
|
5599
5920
|
|
|
5600
5921
|
const query_params = {};
|
|
5601
|
-
query_params["department"] = department;
|
|
5602
5922
|
|
|
5603
5923
|
const xHeaders = {};
|
|
5604
5924
|
|
|
5605
5925
|
const response = await PlatformAPIClient.execute(
|
|
5606
5926
|
this.config,
|
|
5607
5927
|
"get",
|
|
5608
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
5928
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/downloads/`,
|
|
5609
5929
|
query_params,
|
|
5610
5930
|
undefined,
|
|
5611
5931
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5619,10 +5939,10 @@ class Catalog {
|
|
|
5619
5939
|
|
|
5620
5940
|
const {
|
|
5621
5941
|
error: res_error,
|
|
5622
|
-
} = CatalogPlatformModel.
|
|
5623
|
-
|
|
5624
|
-
allowUnknown: true
|
|
5625
|
-
|
|
5942
|
+
} = CatalogPlatformModel.ProductDownloadsResponseSchema().validate(
|
|
5943
|
+
responseData,
|
|
5944
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5945
|
+
);
|
|
5626
5946
|
|
|
5627
5947
|
if (res_error) {
|
|
5628
5948
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5630,7 +5950,7 @@ class Catalog {
|
|
|
5630
5950
|
} else {
|
|
5631
5951
|
Logger({
|
|
5632
5952
|
level: "WARN",
|
|
5633
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5953
|
+
message: `Response Validation Warnings for platform > Catalog > listProductTemplateExportDetails \n ${res_error}`,
|
|
5634
5954
|
});
|
|
5635
5955
|
}
|
|
5636
5956
|
}
|
|
@@ -5639,33 +5959,26 @@ class Catalog {
|
|
|
5639
5959
|
}
|
|
5640
5960
|
|
|
5641
5961
|
/**
|
|
5642
|
-
* @param {CatalogPlatformValidator.
|
|
5643
|
-
* - Arg object
|
|
5644
|
-
*
|
|
5962
|
+
* @param {CatalogPlatformValidator.ListTemplateBrandTypeValuesParam} arg - Arg object
|
|
5645
5963
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5646
5964
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5647
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5648
|
-
*
|
|
5649
|
-
*
|
|
5650
|
-
* @
|
|
5651
|
-
* @
|
|
5652
|
-
* @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/).
|
|
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/).
|
|
5653
5970
|
*/
|
|
5654
|
-
async
|
|
5655
|
-
{
|
|
5656
|
-
requestHeaders: {},
|
|
5657
|
-
},
|
|
5971
|
+
async listTemplateBrandTypeValues(
|
|
5972
|
+
{ filter, templateTag, itemType, requestHeaders } = { requestHeaders: {} },
|
|
5658
5973
|
{ responseHeaders } = { responseHeaders: false }
|
|
5659
5974
|
) {
|
|
5660
5975
|
const {
|
|
5661
5976
|
error,
|
|
5662
|
-
} = CatalogPlatformValidator.
|
|
5977
|
+
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
5663
5978
|
{
|
|
5664
|
-
|
|
5979
|
+
filter,
|
|
5980
|
+
templateTag,
|
|
5665
5981
|
itemType,
|
|
5666
|
-
pageSize,
|
|
5667
|
-
pageNo,
|
|
5668
|
-
q,
|
|
5669
5982
|
},
|
|
5670
5983
|
{ abortEarly: false, allowUnknown: true }
|
|
5671
5984
|
);
|
|
@@ -5676,36 +5989,32 @@ class Catalog {
|
|
|
5676
5989
|
// Showing warrnings if extra unknown parameters are found
|
|
5677
5990
|
const {
|
|
5678
5991
|
error: warrning,
|
|
5679
|
-
} = CatalogPlatformValidator.
|
|
5992
|
+
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
5680
5993
|
{
|
|
5681
|
-
|
|
5994
|
+
filter,
|
|
5995
|
+
templateTag,
|
|
5682
5996
|
itemType,
|
|
5683
|
-
pageSize,
|
|
5684
|
-
pageNo,
|
|
5685
|
-
q,
|
|
5686
5997
|
},
|
|
5687
5998
|
{ abortEarly: false, allowUnknown: false }
|
|
5688
5999
|
);
|
|
5689
6000
|
if (warrning) {
|
|
5690
6001
|
Logger({
|
|
5691
6002
|
level: "WARN",
|
|
5692
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6003
|
+
message: `Parameter Validation warrnings for platform > Catalog > listTemplateBrandTypeValues \n ${warrning}`,
|
|
5693
6004
|
});
|
|
5694
6005
|
}
|
|
5695
6006
|
|
|
5696
6007
|
const query_params = {};
|
|
5697
|
-
query_params["
|
|
6008
|
+
query_params["filter"] = filter;
|
|
6009
|
+
query_params["template_tag"] = templateTag;
|
|
5698
6010
|
query_params["item_type"] = itemType;
|
|
5699
|
-
query_params["page_size"] = pageSize;
|
|
5700
|
-
query_params["page_no"] = pageNo;
|
|
5701
|
-
query_params["q"] = q;
|
|
5702
6011
|
|
|
5703
6012
|
const xHeaders = {};
|
|
5704
6013
|
|
|
5705
6014
|
const response = await PlatformAPIClient.execute(
|
|
5706
6015
|
this.config,
|
|
5707
6016
|
"get",
|
|
5708
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
6017
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/downloads/configuration/`,
|
|
5709
6018
|
query_params,
|
|
5710
6019
|
undefined,
|
|
5711
6020
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5719,7 +6028,7 @@ class Catalog {
|
|
|
5719
6028
|
|
|
5720
6029
|
const {
|
|
5721
6030
|
error: res_error,
|
|
5722
|
-
} = CatalogPlatformModel.
|
|
6031
|
+
} = CatalogPlatformModel.ProductConfigurationDownloads().validate(
|
|
5723
6032
|
responseData,
|
|
5724
6033
|
{ abortEarly: false, allowUnknown: true }
|
|
5725
6034
|
);
|
|
@@ -5730,7 +6039,7 @@ class Catalog {
|
|
|
5730
6039
|
} else {
|
|
5731
6040
|
Logger({
|
|
5732
6041
|
level: "WARN",
|
|
5733
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6042
|
+
message: `Response Validation Warnings for platform > Catalog > listTemplateBrandTypeValues \n ${res_error}`,
|
|
5734
6043
|
});
|
|
5735
6044
|
}
|
|
5736
6045
|
}
|
|
@@ -5739,26 +6048,22 @@ class Catalog {
|
|
|
5739
6048
|
}
|
|
5740
6049
|
|
|
5741
6050
|
/**
|
|
5742
|
-
* @param {CatalogPlatformValidator.
|
|
6051
|
+
* @param {CatalogPlatformValidator.UpdateHsnCodeParam} arg - Arg object
|
|
5743
6052
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5744
6053
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5745
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5746
|
-
*
|
|
5747
|
-
* @
|
|
5748
|
-
* @
|
|
5749
|
-
* @description: Retrieve values related to template brand types. The filter type query parameter defines what type of data to return. The type of query returns the valid values for the same - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listTemplateBrandTypeValues/).
|
|
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/).
|
|
5750
6058
|
*/
|
|
5751
|
-
async
|
|
5752
|
-
{
|
|
6059
|
+
async updateHsnCode(
|
|
6060
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
5753
6061
|
{ responseHeaders } = { responseHeaders: false }
|
|
5754
6062
|
) {
|
|
5755
|
-
const {
|
|
5756
|
-
error,
|
|
5757
|
-
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
6063
|
+
const { error } = CatalogPlatformValidator.updateHsnCode().validate(
|
|
5758
6064
|
{
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
itemType,
|
|
6065
|
+
id,
|
|
6066
|
+
body,
|
|
5762
6067
|
},
|
|
5763
6068
|
{ abortEarly: false, allowUnknown: true }
|
|
5764
6069
|
);
|
|
@@ -5769,34 +6074,30 @@ class Catalog {
|
|
|
5769
6074
|
// Showing warrnings if extra unknown parameters are found
|
|
5770
6075
|
const {
|
|
5771
6076
|
error: warrning,
|
|
5772
|
-
} = CatalogPlatformValidator.
|
|
6077
|
+
} = CatalogPlatformValidator.updateHsnCode().validate(
|
|
5773
6078
|
{
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
itemType,
|
|
6079
|
+
id,
|
|
6080
|
+
body,
|
|
5777
6081
|
},
|
|
5778
6082
|
{ abortEarly: false, allowUnknown: false }
|
|
5779
6083
|
);
|
|
5780
6084
|
if (warrning) {
|
|
5781
6085
|
Logger({
|
|
5782
6086
|
level: "WARN",
|
|
5783
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6087
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateHsnCode \n ${warrning}`,
|
|
5784
6088
|
});
|
|
5785
6089
|
}
|
|
5786
6090
|
|
|
5787
6091
|
const query_params = {};
|
|
5788
|
-
query_params["filter"] = filter;
|
|
5789
|
-
query_params["template_tag"] = templateTag;
|
|
5790
|
-
query_params["item_type"] = itemType;
|
|
5791
6092
|
|
|
5792
6093
|
const xHeaders = {};
|
|
5793
6094
|
|
|
5794
6095
|
const response = await PlatformAPIClient.execute(
|
|
5795
6096
|
this.config,
|
|
5796
|
-
"
|
|
5797
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
6097
|
+
"put",
|
|
6098
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
|
|
5798
6099
|
query_params,
|
|
5799
|
-
|
|
6100
|
+
body,
|
|
5800
6101
|
{ ...xHeaders, ...requestHeaders },
|
|
5801
6102
|
{ responseHeaders }
|
|
5802
6103
|
);
|
|
@@ -5808,10 +6109,10 @@ class Catalog {
|
|
|
5808
6109
|
|
|
5809
6110
|
const {
|
|
5810
6111
|
error: res_error,
|
|
5811
|
-
} = CatalogPlatformModel.
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
);
|
|
6112
|
+
} = CatalogPlatformModel.HsnCode().validate(responseData, {
|
|
6113
|
+
abortEarly: false,
|
|
6114
|
+
allowUnknown: true,
|
|
6115
|
+
});
|
|
5815
6116
|
|
|
5816
6117
|
if (res_error) {
|
|
5817
6118
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5819,7 +6120,7 @@ class Catalog {
|
|
|
5819
6120
|
} else {
|
|
5820
6121
|
Logger({
|
|
5821
6122
|
level: "WARN",
|
|
5822
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6123
|
+
message: `Response Validation Warnings for platform > Catalog > updateHsnCode \n ${res_error}`,
|
|
5823
6124
|
});
|
|
5824
6125
|
}
|
|
5825
6126
|
}
|
|
@@ -5828,25 +6129,21 @@ class Catalog {
|
|
|
5828
6129
|
}
|
|
5829
6130
|
|
|
5830
6131
|
/**
|
|
5831
|
-
* @param {CatalogPlatformValidator.
|
|
6132
|
+
* @param {CatalogPlatformValidator.UpdateInventoriesParam} arg - Arg object
|
|
5832
6133
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5833
6134
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5834
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5835
|
-
*
|
|
5836
|
-
*
|
|
5837
|
-
* @
|
|
5838
|
-
* @
|
|
5839
|
-
* @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/).
|
|
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/).
|
|
5840
6140
|
*/
|
|
5841
|
-
async
|
|
5842
|
-
{
|
|
6141
|
+
async updateInventories(
|
|
6142
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5843
6143
|
{ responseHeaders } = { responseHeaders: false }
|
|
5844
6144
|
) {
|
|
5845
|
-
const {
|
|
5846
|
-
error,
|
|
5847
|
-
} = CatalogPlatformValidator.patchInventoryExportDetail().validate(
|
|
6145
|
+
const { error } = CatalogPlatformValidator.updateInventories().validate(
|
|
5848
6146
|
{
|
|
5849
|
-
jobId,
|
|
5850
6147
|
body,
|
|
5851
6148
|
},
|
|
5852
6149
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -5858,9 +6155,8 @@ class Catalog {
|
|
|
5858
6155
|
// Showing warrnings if extra unknown parameters are found
|
|
5859
6156
|
const {
|
|
5860
6157
|
error: warrning,
|
|
5861
|
-
} = CatalogPlatformValidator.
|
|
6158
|
+
} = CatalogPlatformValidator.updateInventories().validate(
|
|
5862
6159
|
{
|
|
5863
|
-
jobId,
|
|
5864
6160
|
body,
|
|
5865
6161
|
},
|
|
5866
6162
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -5868,7 +6164,7 @@ class Catalog {
|
|
|
5868
6164
|
if (warrning) {
|
|
5869
6165
|
Logger({
|
|
5870
6166
|
level: "WARN",
|
|
5871
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6167
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateInventories \n ${warrning}`,
|
|
5872
6168
|
});
|
|
5873
6169
|
}
|
|
5874
6170
|
|
|
@@ -5878,8 +6174,8 @@ class Catalog {
|
|
|
5878
6174
|
|
|
5879
6175
|
const response = await PlatformAPIClient.execute(
|
|
5880
6176
|
this.config,
|
|
5881
|
-
"
|
|
5882
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory
|
|
6177
|
+
"post",
|
|
6178
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/`,
|
|
5883
6179
|
query_params,
|
|
5884
6180
|
body,
|
|
5885
6181
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5893,7 +6189,7 @@ class Catalog {
|
|
|
5893
6189
|
|
|
5894
6190
|
const {
|
|
5895
6191
|
error: res_error,
|
|
5896
|
-
} = CatalogPlatformModel.
|
|
6192
|
+
} = CatalogPlatformModel.InventoryUpdateResponseSchema().validate(
|
|
5897
6193
|
responseData,
|
|
5898
6194
|
{ abortEarly: false, allowUnknown: true }
|
|
5899
6195
|
);
|
|
@@ -5904,7 +6200,7 @@ class Catalog {
|
|
|
5904
6200
|
} else {
|
|
5905
6201
|
Logger({
|
|
5906
6202
|
level: "WARN",
|
|
5907
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6203
|
+
message: `Response Validation Warnings for platform > Catalog > updateInventories \n ${res_error}`,
|
|
5908
6204
|
});
|
|
5909
6205
|
}
|
|
5910
6206
|
}
|
|
@@ -5913,24 +6209,26 @@ class Catalog {
|
|
|
5913
6209
|
}
|
|
5914
6210
|
|
|
5915
6211
|
/**
|
|
5916
|
-
* @param {CatalogPlatformValidator.
|
|
6212
|
+
* @param {CatalogPlatformValidator.UpdateLocationPriceParam} arg - Arg object
|
|
5917
6213
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5918
6214
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5919
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5920
|
-
* Success response
|
|
5921
|
-
*
|
|
5922
|
-
* @
|
|
5923
|
-
* @
|
|
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/).
|
|
5924
6221
|
*/
|
|
5925
|
-
async
|
|
5926
|
-
{
|
|
6222
|
+
async updateLocationPrice(
|
|
6223
|
+
{ storeId, sellerIdentifier, body, requestHeaders } = {
|
|
6224
|
+
requestHeaders: {},
|
|
6225
|
+
},
|
|
5927
6226
|
{ responseHeaders } = { responseHeaders: false }
|
|
5928
6227
|
) {
|
|
5929
|
-
const {
|
|
5930
|
-
error,
|
|
5931
|
-
} = CatalogPlatformValidator.patchProductExportDetail().validate(
|
|
6228
|
+
const { error } = CatalogPlatformValidator.updateLocationPrice().validate(
|
|
5932
6229
|
{
|
|
5933
|
-
|
|
6230
|
+
storeId,
|
|
6231
|
+
sellerIdentifier,
|
|
5934
6232
|
body,
|
|
5935
6233
|
},
|
|
5936
6234
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -5942,9 +6240,10 @@ class Catalog {
|
|
|
5942
6240
|
// Showing warrnings if extra unknown parameters are found
|
|
5943
6241
|
const {
|
|
5944
6242
|
error: warrning,
|
|
5945
|
-
} = CatalogPlatformValidator.
|
|
6243
|
+
} = CatalogPlatformValidator.updateLocationPrice().validate(
|
|
5946
6244
|
{
|
|
5947
|
-
|
|
6245
|
+
storeId,
|
|
6246
|
+
sellerIdentifier,
|
|
5948
6247
|
body,
|
|
5949
6248
|
},
|
|
5950
6249
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -5952,7 +6251,7 @@ class Catalog {
|
|
|
5952
6251
|
if (warrning) {
|
|
5953
6252
|
Logger({
|
|
5954
6253
|
level: "WARN",
|
|
5955
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6254
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateLocationPrice \n ${warrning}`,
|
|
5956
6255
|
});
|
|
5957
6256
|
}
|
|
5958
6257
|
|
|
@@ -5962,8 +6261,8 @@ class Catalog {
|
|
|
5962
6261
|
|
|
5963
6262
|
const response = await PlatformAPIClient.execute(
|
|
5964
6263
|
this.config,
|
|
5965
|
-
"
|
|
5966
|
-
`/service/platform/catalog/
|
|
6264
|
+
"post",
|
|
6265
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/store/${storeId}/identifier/${sellerIdentifier}/price`,
|
|
5967
6266
|
query_params,
|
|
5968
6267
|
body,
|
|
5969
6268
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5977,7 +6276,7 @@ class Catalog {
|
|
|
5977
6276
|
|
|
5978
6277
|
const {
|
|
5979
6278
|
error: res_error,
|
|
5980
|
-
} = CatalogPlatformModel.
|
|
6279
|
+
} = CatalogPlatformModel.LocationPriceQuantitySuccessResponseSchema().validate(
|
|
5981
6280
|
responseData,
|
|
5982
6281
|
{ abortEarly: false, allowUnknown: true }
|
|
5983
6282
|
);
|
|
@@ -5988,7 +6287,7 @@ class Catalog {
|
|
|
5988
6287
|
} else {
|
|
5989
6288
|
Logger({
|
|
5990
6289
|
level: "WARN",
|
|
5991
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6290
|
+
message: `Response Validation Warnings for platform > Catalog > updateLocationPrice \n ${res_error}`,
|
|
5992
6291
|
});
|
|
5993
6292
|
}
|
|
5994
6293
|
}
|
|
@@ -5997,20 +6296,28 @@ class Catalog {
|
|
|
5997
6296
|
}
|
|
5998
6297
|
|
|
5999
6298
|
/**
|
|
6000
|
-
* @param {CatalogPlatformValidator.
|
|
6299
|
+
* @param {CatalogPlatformValidator.UpdateLocationQuantityParam} arg - Arg object
|
|
6001
6300
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6002
6301
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6003
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6004
|
-
*
|
|
6005
|
-
*
|
|
6006
|
-
* @
|
|
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/).
|
|
6007
6308
|
*/
|
|
6008
|
-
async
|
|
6009
|
-
{ body, requestHeaders } = {
|
|
6309
|
+
async updateLocationQuantity(
|
|
6310
|
+
{ storeId, sellerIdentifier, body, requestHeaders } = {
|
|
6311
|
+
requestHeaders: {},
|
|
6312
|
+
},
|
|
6010
6313
|
{ responseHeaders } = { responseHeaders: false }
|
|
6011
6314
|
) {
|
|
6012
|
-
const {
|
|
6315
|
+
const {
|
|
6316
|
+
error,
|
|
6317
|
+
} = CatalogPlatformValidator.updateLocationQuantity().validate(
|
|
6013
6318
|
{
|
|
6319
|
+
storeId,
|
|
6320
|
+
sellerIdentifier,
|
|
6014
6321
|
body,
|
|
6015
6322
|
},
|
|
6016
6323
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6022,8 +6329,10 @@ class Catalog {
|
|
|
6022
6329
|
// Showing warrnings if extra unknown parameters are found
|
|
6023
6330
|
const {
|
|
6024
6331
|
error: warrning,
|
|
6025
|
-
} = CatalogPlatformValidator.
|
|
6332
|
+
} = CatalogPlatformValidator.updateLocationQuantity().validate(
|
|
6026
6333
|
{
|
|
6334
|
+
storeId,
|
|
6335
|
+
sellerIdentifier,
|
|
6027
6336
|
body,
|
|
6028
6337
|
},
|
|
6029
6338
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6031,7 +6340,7 @@ class Catalog {
|
|
|
6031
6340
|
if (warrning) {
|
|
6032
6341
|
Logger({
|
|
6033
6342
|
level: "WARN",
|
|
6034
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6343
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateLocationQuantity \n ${warrning}`,
|
|
6035
6344
|
});
|
|
6036
6345
|
}
|
|
6037
6346
|
|
|
@@ -6042,7 +6351,7 @@ class Catalog {
|
|
|
6042
6351
|
const response = await PlatformAPIClient.execute(
|
|
6043
6352
|
this.config,
|
|
6044
6353
|
"post",
|
|
6045
|
-
`/service/platform/catalog/
|
|
6354
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/store/${storeId}/identifier/${sellerIdentifier}/quantity`,
|
|
6046
6355
|
query_params,
|
|
6047
6356
|
body,
|
|
6048
6357
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6056,10 +6365,10 @@ class Catalog {
|
|
|
6056
6365
|
|
|
6057
6366
|
const {
|
|
6058
6367
|
error: res_error,
|
|
6059
|
-
} = CatalogPlatformModel.
|
|
6060
|
-
|
|
6061
|
-
allowUnknown: true
|
|
6062
|
-
|
|
6368
|
+
} = CatalogPlatformModel.LocationPriceQuantitySuccessResponseSchema().validate(
|
|
6369
|
+
responseData,
|
|
6370
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6371
|
+
);
|
|
6063
6372
|
|
|
6064
6373
|
if (res_error) {
|
|
6065
6374
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6067,7 +6376,7 @@ class Catalog {
|
|
|
6067
6376
|
} else {
|
|
6068
6377
|
Logger({
|
|
6069
6378
|
level: "WARN",
|
|
6070
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6379
|
+
message: `Response Validation Warnings for platform > Catalog > updateLocationQuantity \n ${res_error}`,
|
|
6071
6380
|
});
|
|
6072
6381
|
}
|
|
6073
6382
|
}
|
|
@@ -6079,22 +6388,22 @@ class Catalog {
|
|
|
6079
6388
|
* @param {CatalogPlatformValidator.UpdateMarketplaceOptinParam} arg - Arg object
|
|
6080
6389
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6081
6390
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6082
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6391
|
+
* @returns {Promise<CatalogPlatformModel.UpdateMarketplaceOptinResponseSchema>}
|
|
6083
6392
|
* - Success response
|
|
6084
6393
|
*
|
|
6085
6394
|
* @name updateMarketplaceOptin
|
|
6086
6395
|
* @summary: Update marketplace optin
|
|
6087
|
-
* @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/).
|
|
6088
6397
|
*/
|
|
6089
6398
|
async updateMarketplaceOptin(
|
|
6090
|
-
{
|
|
6399
|
+
{ marketplaceSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
6091
6400
|
{ responseHeaders } = { responseHeaders: false }
|
|
6092
6401
|
) {
|
|
6093
6402
|
const {
|
|
6094
6403
|
error,
|
|
6095
6404
|
} = CatalogPlatformValidator.updateMarketplaceOptin().validate(
|
|
6096
6405
|
{
|
|
6097
|
-
|
|
6406
|
+
marketplaceSlug,
|
|
6098
6407
|
body,
|
|
6099
6408
|
},
|
|
6100
6409
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6108,7 +6417,7 @@ class Catalog {
|
|
|
6108
6417
|
error: warrning,
|
|
6109
6418
|
} = CatalogPlatformValidator.updateMarketplaceOptin().validate(
|
|
6110
6419
|
{
|
|
6111
|
-
|
|
6420
|
+
marketplaceSlug,
|
|
6112
6421
|
body,
|
|
6113
6422
|
},
|
|
6114
6423
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6127,7 +6436,7 @@ class Catalog {
|
|
|
6127
6436
|
const response = await PlatformAPIClient.execute(
|
|
6128
6437
|
this.config,
|
|
6129
6438
|
"put",
|
|
6130
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${
|
|
6439
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplaceSlug}/opt-in`,
|
|
6131
6440
|
query_params,
|
|
6132
6441
|
body,
|
|
6133
6442
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6141,7 +6450,7 @@ class Catalog {
|
|
|
6141
6450
|
|
|
6142
6451
|
const {
|
|
6143
6452
|
error: res_error,
|
|
6144
|
-
} = CatalogPlatformModel.
|
|
6453
|
+
} = CatalogPlatformModel.UpdateMarketplaceOptinResponseSchema().validate(
|
|
6145
6454
|
responseData,
|
|
6146
6455
|
{ abortEarly: false, allowUnknown: true }
|
|
6147
6456
|
);
|
|
@@ -6164,12 +6473,12 @@ class Catalog {
|
|
|
6164
6473
|
* @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object
|
|
6165
6474
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6166
6475
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6167
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6476
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleCreateResponseSchema>}
|
|
6168
6477
|
* - Success response
|
|
6169
6478
|
*
|
|
6170
6479
|
* @name updateProductBundle
|
|
6171
|
-
* @summary: Update
|
|
6172
|
-
* @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/).
|
|
6173
6482
|
*/
|
|
6174
6483
|
async updateProductBundle(
|
|
6175
6484
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6210,7 +6519,7 @@ class Catalog {
|
|
|
6210
6519
|
const response = await PlatformAPIClient.execute(
|
|
6211
6520
|
this.config,
|
|
6212
6521
|
"put",
|
|
6213
|
-
`/service/platform/catalog/
|
|
6522
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
|
|
6214
6523
|
query_params,
|
|
6215
6524
|
body,
|
|
6216
6525
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6224,7 +6533,7 @@ class Catalog {
|
|
|
6224
6533
|
|
|
6225
6534
|
const {
|
|
6226
6535
|
error: res_error,
|
|
6227
|
-
} = CatalogPlatformModel.
|
|
6536
|
+
} = CatalogPlatformModel.GetProductBundleCreateResponseSchema().validate(
|
|
6228
6537
|
responseData,
|
|
6229
6538
|
{ abortEarly: false, allowUnknown: true }
|
|
6230
6539
|
);
|
|
@@ -6247,10 +6556,11 @@ class Catalog {
|
|
|
6247
6556
|
* @param {CatalogPlatformValidator.UpdateRealtimeInventoryParam} arg - Arg object
|
|
6248
6557
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6249
6558
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6250
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6559
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponseSchema>} -
|
|
6560
|
+
* Success response
|
|
6251
6561
|
* @name updateRealtimeInventory
|
|
6252
|
-
* @summary: Update
|
|
6253
|
-
* @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/).
|
|
6254
6564
|
*/
|
|
6255
6565
|
async updateRealtimeInventory(
|
|
6256
6566
|
{ itemId, sellerIdentifier, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6309,10 +6619,10 @@ class Catalog {
|
|
|
6309
6619
|
|
|
6310
6620
|
const {
|
|
6311
6621
|
error: res_error,
|
|
6312
|
-
} = CatalogPlatformModel.
|
|
6313
|
-
|
|
6314
|
-
allowUnknown: true
|
|
6315
|
-
|
|
6622
|
+
} = CatalogPlatformModel.InventoryUpdateResponseSchema().validate(
|
|
6623
|
+
responseData,
|
|
6624
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6625
|
+
);
|
|
6316
6626
|
|
|
6317
6627
|
if (res_error) {
|
|
6318
6628
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6332,10 +6642,10 @@ class Catalog {
|
|
|
6332
6642
|
* @param {CatalogPlatformValidator.UpdateSizeGuideParam} arg - Arg object
|
|
6333
6643
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6334
6644
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6335
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6645
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
6336
6646
|
* @name updateSizeGuide
|
|
6337
|
-
* @summary: Update
|
|
6338
|
-
* @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/).
|
|
6339
6649
|
*/
|
|
6340
6650
|
async updateSizeGuide(
|
|
6341
6651
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6376,7 +6686,7 @@ class Catalog {
|
|
|
6376
6686
|
const response = await PlatformAPIClient.execute(
|
|
6377
6687
|
this.config,
|
|
6378
6688
|
"put",
|
|
6379
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}
|
|
6689
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
|
|
6380
6690
|
query_params,
|
|
6381
6691
|
body,
|
|
6382
6692
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6390,7 +6700,7 @@ class Catalog {
|
|
|
6390
6700
|
|
|
6391
6701
|
const {
|
|
6392
6702
|
error: res_error,
|
|
6393
|
-
} = CatalogPlatformModel.
|
|
6703
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
6394
6704
|
abortEarly: false,
|
|
6395
6705
|
allowUnknown: true,
|
|
6396
6706
|
});
|
|
@@ -6413,10 +6723,10 @@ class Catalog {
|
|
|
6413
6723
|
* @param {CatalogPlatformValidator.UploadBulkProductsParam} arg - Arg object
|
|
6414
6724
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6415
6725
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6416
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6726
|
+
* @returns {Promise<CatalogPlatformModel.BulkResponseSchema>} - Success response
|
|
6417
6727
|
* @name uploadBulkProducts
|
|
6418
|
-
* @summary: Upload bulk products
|
|
6419
|
-
* @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/).
|
|
6420
6730
|
*/
|
|
6421
6731
|
async uploadBulkProducts(
|
|
6422
6732
|
{ department, productType, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6475,7 +6785,7 @@ class Catalog {
|
|
|
6475
6785
|
|
|
6476
6786
|
const {
|
|
6477
6787
|
error: res_error,
|
|
6478
|
-
} = CatalogPlatformModel.
|
|
6788
|
+
} = CatalogPlatformModel.BulkResponseSchema().validate(responseData, {
|
|
6479
6789
|
abortEarly: false,
|
|
6480
6790
|
allowUnknown: true,
|
|
6481
6791
|
});
|
|
@@ -6494,15 +6804,105 @@ class Catalog {
|
|
|
6494
6804
|
return response;
|
|
6495
6805
|
}
|
|
6496
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
|
+
|
|
6497
6896
|
/**
|
|
6498
6897
|
* @param {CatalogPlatformValidator.ValidateProductTemplateParam} arg - Arg object
|
|
6499
6898
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6500
6899
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6501
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6502
|
-
* Success response
|
|
6900
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesValidationResponseSchema>}
|
|
6901
|
+
* - Success response
|
|
6902
|
+
*
|
|
6503
6903
|
* @name validateProductTemplate
|
|
6504
|
-
* @summary: Validate product template
|
|
6505
|
-
* @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/).
|
|
6506
6906
|
*/
|
|
6507
6907
|
async validateProductTemplate(
|
|
6508
6908
|
{ slug, itemType, bulk, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6549,7 +6949,7 @@ class Catalog {
|
|
|
6549
6949
|
const response = await PlatformAPIClient.execute(
|
|
6550
6950
|
this.config,
|
|
6551
6951
|
"get",
|
|
6552
|
-
`/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/`,
|
|
6553
6953
|
query_params,
|
|
6554
6954
|
undefined,
|
|
6555
6955
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6563,7 +6963,7 @@ class Catalog {
|
|
|
6563
6963
|
|
|
6564
6964
|
const {
|
|
6565
6965
|
error: res_error,
|
|
6566
|
-
} = CatalogPlatformModel.
|
|
6966
|
+
} = CatalogPlatformModel.TemplatesValidationResponseSchema().validate(
|
|
6567
6967
|
responseData,
|
|
6568
6968
|
{ abortEarly: false, allowUnknown: true }
|
|
6569
6969
|
);
|
|
@@ -6588,14 +6988,15 @@ class Catalog {
|
|
|
6588
6988
|
*
|
|
6589
6989
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6590
6990
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6591
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6592
|
-
* Success response
|
|
6991
|
+
* @returns {Promise<CatalogPlatformModel.InventoryValidationResponseSchema>}
|
|
6992
|
+
* - Success response
|
|
6993
|
+
*
|
|
6593
6994
|
* @name validateProductTemplateSchema
|
|
6594
|
-
* @summary: Validate product template schema
|
|
6595
|
-
* @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/).
|
|
6596
6997
|
*/
|
|
6597
6998
|
async validateProductTemplateSchema(
|
|
6598
|
-
{ itemType,
|
|
6999
|
+
{ itemType, requestHeaders } = { requestHeaders: {} },
|
|
6599
7000
|
{ responseHeaders } = { responseHeaders: false }
|
|
6600
7001
|
) {
|
|
6601
7002
|
const {
|
|
@@ -6603,7 +7004,6 @@ class Catalog {
|
|
|
6603
7004
|
} = CatalogPlatformValidator.validateProductTemplateSchema().validate(
|
|
6604
7005
|
{
|
|
6605
7006
|
itemType,
|
|
6606
|
-
bulk,
|
|
6607
7007
|
},
|
|
6608
7008
|
{ abortEarly: false, allowUnknown: true }
|
|
6609
7009
|
);
|
|
@@ -6617,7 +7017,6 @@ class Catalog {
|
|
|
6617
7017
|
} = CatalogPlatformValidator.validateProductTemplateSchema().validate(
|
|
6618
7018
|
{
|
|
6619
7019
|
itemType,
|
|
6620
|
-
bulk,
|
|
6621
7020
|
},
|
|
6622
7021
|
{ abortEarly: false, allowUnknown: false }
|
|
6623
7022
|
);
|
|
@@ -6630,14 +7029,13 @@ class Catalog {
|
|
|
6630
7029
|
|
|
6631
7030
|
const query_params = {};
|
|
6632
7031
|
query_params["item_type"] = itemType;
|
|
6633
|
-
query_params["bulk"] = bulk;
|
|
6634
7032
|
|
|
6635
7033
|
const xHeaders = {};
|
|
6636
7034
|
|
|
6637
7035
|
const response = await PlatformAPIClient.execute(
|
|
6638
7036
|
this.config,
|
|
6639
7037
|
"get",
|
|
6640
|
-
`/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/`,
|
|
6641
7039
|
query_params,
|
|
6642
7040
|
undefined,
|
|
6643
7041
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6651,7 +7049,7 @@ class Catalog {
|
|
|
6651
7049
|
|
|
6652
7050
|
const {
|
|
6653
7051
|
error: res_error,
|
|
6654
|
-
} = CatalogPlatformModel.
|
|
7052
|
+
} = CatalogPlatformModel.InventoryValidationResponseSchema().validate(
|
|
6655
7053
|
responseData,
|
|
6656
7054
|
{ abortEarly: false, allowUnknown: true }
|
|
6657
7055
|
);
|