@gofynd/fdk-client-javascript 1.6.4 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +100 -80
- package/sdk/application/Cart/CartApplicationClient.js +257 -126
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -21
- package/sdk/application/Content/ContentApplicationClient.js +250 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +106 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +326 -208
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +0 -10
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +0 -75
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +1 -54
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +0 -43
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -6
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +251 -172
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +639 -521
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3150 -4468
- package/sdk/platform/Cart/CartPlatformModel.js +2858 -1867
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +976 -380
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6475 -2015
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1083 -162
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +884 -80
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +325 -568
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1162 -1562
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6008 -7688
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9522 -6892
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +234 -227
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +183 -177
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -238
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +876 -588
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +506 -270
- package/sdk/platform/Communication/CommunicationPlatformModel.js +611 -313
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +78 -77
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +97 -91
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1206 -459
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1011 -320
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +255 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1095 -464
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +871 -1315
- package/sdk/platform/Content/ContentPlatformModel.js +940 -599
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- 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 +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +486 -277
- package/sdk/platform/Order/OrderPlatformClient.js +1491 -938
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4560 -8636
- package/sdk/platform/Order/OrderPlatformModel.js +3604 -4056
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3531 -1292
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1504
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- 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 +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2188 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +394 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +342 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +150 -212
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +589 -1238
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3581 -2960
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3730 -1779
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +230 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +164 -287
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +11 -50
- package/sdk/platform/Share/SharePlatformModel.js +5 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +36 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +201 -58
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +28 -17
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +33 -16
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -14,96 +14,13 @@ 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/v1.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
|
-
|
|
100
17
|
/**
|
|
101
18
|
* @param {CatalogPlatformValidator.AllSizesParam} arg - Arg object
|
|
102
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
103
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
104
21
|
* @returns {Promise<CatalogPlatformModel.GetAllSizes>} - Success response
|
|
105
22
|
* @name allSizes
|
|
106
|
-
* @summary: Get product sizes
|
|
23
|
+
* @summary: Get all product sizes.
|
|
107
24
|
* @description: Retrieve all available sizes for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/allSizes/).
|
|
108
25
|
*/
|
|
109
26
|
async allSizes(
|
|
@@ -174,90 +91,13 @@ class Catalog {
|
|
|
174
91
|
return response;
|
|
175
92
|
}
|
|
176
93
|
|
|
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
|
-
|
|
254
94
|
/**
|
|
255
95
|
* @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object
|
|
256
96
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
257
97
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
258
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
98
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
259
99
|
* @name createBulkInventory
|
|
260
|
-
* @summary: Create bulk inventory
|
|
100
|
+
* @summary: Create bulk inventory.
|
|
261
101
|
* @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/).
|
|
262
102
|
*/
|
|
263
103
|
async createBulkInventory(
|
|
@@ -299,7 +139,7 @@ class Catalog {
|
|
|
299
139
|
const response = await PlatformAPIClient.execute(
|
|
300
140
|
this.config,
|
|
301
141
|
"post",
|
|
302
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}
|
|
142
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}`,
|
|
303
143
|
query_params,
|
|
304
144
|
body,
|
|
305
145
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -313,7 +153,7 @@ class Catalog {
|
|
|
313
153
|
|
|
314
154
|
const {
|
|
315
155
|
error: res_error,
|
|
316
|
-
} = CatalogPlatformModel.
|
|
156
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
317
157
|
abortEarly: false,
|
|
318
158
|
allowUnknown: true,
|
|
319
159
|
});
|
|
@@ -336,9 +176,9 @@ class Catalog {
|
|
|
336
176
|
* @param {CatalogPlatformValidator.CreateBulkInventoryJobParam} arg - Arg object
|
|
337
177
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
338
178
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
339
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
179
|
+
* @returns {Promise<CatalogPlatformModel.InventoryBulkResponse>} - Success response
|
|
340
180
|
* @name createBulkInventoryJob
|
|
341
|
-
* @summary: Create bulk inventory upload job
|
|
181
|
+
* @summary: Create bulk inventory upload job.
|
|
342
182
|
* @description: Helps to create a bulk Inventory upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventoryJob/).
|
|
343
183
|
*/
|
|
344
184
|
async createBulkInventoryJob(
|
|
@@ -380,7 +220,7 @@ class Catalog {
|
|
|
380
220
|
const response = await PlatformAPIClient.execute(
|
|
381
221
|
this.config,
|
|
382
222
|
"post",
|
|
383
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk
|
|
223
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk`,
|
|
384
224
|
query_params,
|
|
385
225
|
body,
|
|
386
226
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -394,7 +234,7 @@ class Catalog {
|
|
|
394
234
|
|
|
395
235
|
const {
|
|
396
236
|
error: res_error,
|
|
397
|
-
} = CatalogPlatformModel.
|
|
237
|
+
} = CatalogPlatformModel.InventoryBulkResponse().validate(responseData, {
|
|
398
238
|
abortEarly: false,
|
|
399
239
|
allowUnknown: true,
|
|
400
240
|
});
|
|
@@ -417,9 +257,9 @@ class Catalog {
|
|
|
417
257
|
* @param {CatalogPlatformValidator.CreateBulkProductUploadJobParam} arg - Arg object
|
|
418
258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
419
259
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
420
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
260
|
+
* @returns {Promise<CatalogPlatformModel.ProductBulkResponse>} - Success response
|
|
421
261
|
* @name createBulkProductUploadJob
|
|
422
|
-
* @summary: Create
|
|
262
|
+
* @summary: Create a Bulk product to upload job.
|
|
423
263
|
* @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/).
|
|
424
264
|
*/
|
|
425
265
|
async createBulkProductUploadJob(
|
|
@@ -475,7 +315,7 @@ class Catalog {
|
|
|
475
315
|
|
|
476
316
|
const {
|
|
477
317
|
error: res_error,
|
|
478
|
-
} = CatalogPlatformModel.
|
|
318
|
+
} = CatalogPlatformModel.ProductBulkResponse().validate(responseData, {
|
|
479
319
|
abortEarly: false,
|
|
480
320
|
allowUnknown: true,
|
|
481
321
|
});
|
|
@@ -498,11 +338,10 @@ class Catalog {
|
|
|
498
338
|
* @param {CatalogPlatformValidator.CreateInventoryExportParam} arg - Arg object
|
|
499
339
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
500
340
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
501
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
502
|
-
* Success response
|
|
341
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportResponse>} - Success response
|
|
503
342
|
* @name createInventoryExport
|
|
504
|
-
* @summary: Create inventory export
|
|
505
|
-
* @description:
|
|
343
|
+
* @summary: Create inventory export.
|
|
344
|
+
* @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExport/).
|
|
506
345
|
*/
|
|
507
346
|
async createInventoryExport(
|
|
508
347
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -541,7 +380,7 @@ class Catalog {
|
|
|
541
380
|
const response = await PlatformAPIClient.execute(
|
|
542
381
|
this.config,
|
|
543
382
|
"post",
|
|
544
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download
|
|
383
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download`,
|
|
545
384
|
query_params,
|
|
546
385
|
body,
|
|
547
386
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -555,10 +394,10 @@ class Catalog {
|
|
|
555
394
|
|
|
556
395
|
const {
|
|
557
396
|
error: res_error,
|
|
558
|
-
} = CatalogPlatformModel.
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
);
|
|
397
|
+
} = CatalogPlatformModel.InventoryExportResponse().validate(responseData, {
|
|
398
|
+
abortEarly: false,
|
|
399
|
+
allowUnknown: true,
|
|
400
|
+
});
|
|
562
401
|
|
|
563
402
|
if (res_error) {
|
|
564
403
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -578,10 +417,9 @@ class Catalog {
|
|
|
578
417
|
* @param {CatalogPlatformValidator.CreateInventoryExportJobParam} arg - Arg object
|
|
579
418
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
580
419
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
581
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
582
|
-
* Success response
|
|
420
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportResponse>} - Success response
|
|
583
421
|
* @name createInventoryExportJob
|
|
584
|
-
* @summary: Create inventory export job
|
|
422
|
+
* @summary: Create inventory export job.
|
|
585
423
|
* @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExportJob/).
|
|
586
424
|
*/
|
|
587
425
|
async createInventoryExportJob(
|
|
@@ -623,7 +461,7 @@ class Catalog {
|
|
|
623
461
|
const response = await PlatformAPIClient.execute(
|
|
624
462
|
this.config,
|
|
625
463
|
"post",
|
|
626
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download
|
|
464
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download`,
|
|
627
465
|
query_params,
|
|
628
466
|
body,
|
|
629
467
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -637,10 +475,10 @@ class Catalog {
|
|
|
637
475
|
|
|
638
476
|
const {
|
|
639
477
|
error: res_error,
|
|
640
|
-
} = CatalogPlatformModel.
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
);
|
|
478
|
+
} = CatalogPlatformModel.InventoryExportResponse().validate(responseData, {
|
|
479
|
+
abortEarly: false,
|
|
480
|
+
allowUnknown: true,
|
|
481
|
+
});
|
|
644
482
|
|
|
645
483
|
if (res_error) {
|
|
646
484
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -660,22 +498,22 @@ class Catalog {
|
|
|
660
498
|
* @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object
|
|
661
499
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
662
500
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
663
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
501
|
+
* @returns {Promise<CatalogPlatformModel.CreateMarketplaceOptinResponse>}
|
|
664
502
|
* - Success response
|
|
665
503
|
*
|
|
666
504
|
* @name createMarketplaceOptin
|
|
667
|
-
* @summary:
|
|
668
|
-
* @description:
|
|
505
|
+
* @summary: Update marketplace optin
|
|
506
|
+
* @description: This API allows to create marketplace optin for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createMarketplaceOptin/).
|
|
669
507
|
*/
|
|
670
508
|
async createMarketplaceOptin(
|
|
671
|
-
{
|
|
509
|
+
{ marketplace, body, requestHeaders } = { requestHeaders: {} },
|
|
672
510
|
{ responseHeaders } = { responseHeaders: false }
|
|
673
511
|
) {
|
|
674
512
|
const {
|
|
675
513
|
error,
|
|
676
514
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
677
515
|
{
|
|
678
|
-
|
|
516
|
+
marketplace,
|
|
679
517
|
body,
|
|
680
518
|
},
|
|
681
519
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -689,7 +527,7 @@ class Catalog {
|
|
|
689
527
|
error: warrning,
|
|
690
528
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
691
529
|
{
|
|
692
|
-
|
|
530
|
+
marketplace,
|
|
693
531
|
body,
|
|
694
532
|
},
|
|
695
533
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -708,7 +546,7 @@ class Catalog {
|
|
|
708
546
|
const response = await PlatformAPIClient.execute(
|
|
709
547
|
this.config,
|
|
710
548
|
"post",
|
|
711
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${
|
|
549
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplace}/opt-in`,
|
|
712
550
|
query_params,
|
|
713
551
|
body,
|
|
714
552
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -722,7 +560,7 @@ class Catalog {
|
|
|
722
560
|
|
|
723
561
|
const {
|
|
724
562
|
error: res_error,
|
|
725
|
-
} = CatalogPlatformModel.
|
|
563
|
+
} = CatalogPlatformModel.CreateMarketplaceOptinResponse().validate(
|
|
726
564
|
responseData,
|
|
727
565
|
{ abortEarly: false, allowUnknown: true }
|
|
728
566
|
);
|
|
@@ -745,10 +583,10 @@ class Catalog {
|
|
|
745
583
|
* @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object
|
|
746
584
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
747
585
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
748
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
586
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
|
|
749
587
|
* @name createProduct
|
|
750
|
-
* @summary: Create product
|
|
751
|
-
* @description:
|
|
588
|
+
* @summary: Create a product.
|
|
589
|
+
* @description: Allows to create product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProduct/).
|
|
752
590
|
*/
|
|
753
591
|
async createProduct(
|
|
754
592
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -787,7 +625,7 @@ class Catalog {
|
|
|
787
625
|
const response = await PlatformAPIClient.execute(
|
|
788
626
|
this.config,
|
|
789
627
|
"post",
|
|
790
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products
|
|
628
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products`,
|
|
791
629
|
query_params,
|
|
792
630
|
body,
|
|
793
631
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -801,7 +639,7 @@ class Catalog {
|
|
|
801
639
|
|
|
802
640
|
const {
|
|
803
641
|
error: res_error,
|
|
804
|
-
} = CatalogPlatformModel.
|
|
642
|
+
} = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
|
|
805
643
|
abortEarly: false,
|
|
806
644
|
allowUnknown: true,
|
|
807
645
|
});
|
|
@@ -824,9 +662,9 @@ class Catalog {
|
|
|
824
662
|
* @param {CatalogPlatformValidator.CreateProductAssetsInBulkParam} arg - Arg object
|
|
825
663
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
826
664
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
827
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
665
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
828
666
|
* @name createProductAssetsInBulk
|
|
829
|
-
* @summary: Create product assets in bulk
|
|
667
|
+
* @summary: Create product assets in bulk.
|
|
830
668
|
* @description: Helps to create a bulk asset upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductAssetsInBulk/).
|
|
831
669
|
*/
|
|
832
670
|
async createProductAssetsInBulk(
|
|
@@ -868,7 +706,7 @@ class Catalog {
|
|
|
868
706
|
const response = await PlatformAPIClient.execute(
|
|
869
707
|
this.config,
|
|
870
708
|
"post",
|
|
871
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk
|
|
709
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk`,
|
|
872
710
|
query_params,
|
|
873
711
|
body,
|
|
874
712
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -882,7 +720,7 @@ class Catalog {
|
|
|
882
720
|
|
|
883
721
|
const {
|
|
884
722
|
error: res_error,
|
|
885
|
-
} = CatalogPlatformModel.
|
|
723
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
886
724
|
abortEarly: false,
|
|
887
725
|
allowUnknown: true,
|
|
888
726
|
});
|
|
@@ -905,12 +743,12 @@ class Catalog {
|
|
|
905
743
|
* @param {CatalogPlatformValidator.CreateProductBundleParam} arg - Arg object
|
|
906
744
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
907
745
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
908
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
746
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleCreateResponse>}
|
|
909
747
|
* - Success response
|
|
910
748
|
*
|
|
911
749
|
* @name createProductBundle
|
|
912
|
-
* @summary: Create product bundle
|
|
913
|
-
* @description: Create product bundle in the catalog
|
|
750
|
+
* @summary: Create a product bundle.
|
|
751
|
+
* @description: Create product bundle in the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductBundle/).
|
|
914
752
|
*/
|
|
915
753
|
async createProductBundle(
|
|
916
754
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -949,7 +787,7 @@ class Catalog {
|
|
|
949
787
|
const response = await PlatformAPIClient.execute(
|
|
950
788
|
this.config,
|
|
951
789
|
"post",
|
|
952
|
-
`/service/platform/catalog/
|
|
790
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/product-bundle`,
|
|
953
791
|
query_params,
|
|
954
792
|
body,
|
|
955
793
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -963,7 +801,7 @@ class Catalog {
|
|
|
963
801
|
|
|
964
802
|
const {
|
|
965
803
|
error: res_error,
|
|
966
|
-
} = CatalogPlatformModel.
|
|
804
|
+
} = CatalogPlatformModel.GetProductBundleCreateResponse().validate(
|
|
967
805
|
responseData,
|
|
968
806
|
{ abortEarly: false, allowUnknown: true }
|
|
969
807
|
);
|
|
@@ -986,12 +824,12 @@ class Catalog {
|
|
|
986
824
|
* @param {CatalogPlatformValidator.CreateProductExportJobParam} arg - Arg object
|
|
987
825
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
988
826
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
989
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
827
|
+
* @returns {Promise<CatalogPlatformModel.CreateProductDownloadsResponse>}
|
|
990
828
|
* - Success response
|
|
991
829
|
*
|
|
992
830
|
* @name createProductExportJob
|
|
993
|
-
* @summary: Create product export job
|
|
994
|
-
* @description:
|
|
831
|
+
* @summary: Create product export job.
|
|
832
|
+
* @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductExportJob/).
|
|
995
833
|
*/
|
|
996
834
|
async createProductExportJob(
|
|
997
835
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1032,7 +870,7 @@ class Catalog {
|
|
|
1032
870
|
const response = await PlatformAPIClient.execute(
|
|
1033
871
|
this.config,
|
|
1034
872
|
"post",
|
|
1035
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads
|
|
873
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads`,
|
|
1036
874
|
query_params,
|
|
1037
875
|
body,
|
|
1038
876
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1046,7 +884,7 @@ class Catalog {
|
|
|
1046
884
|
|
|
1047
885
|
const {
|
|
1048
886
|
error: res_error,
|
|
1049
|
-
} = CatalogPlatformModel.
|
|
887
|
+
} = CatalogPlatformModel.CreateProductDownloadsResponse().validate(
|
|
1050
888
|
responseData,
|
|
1051
889
|
{ abortEarly: false, allowUnknown: true }
|
|
1052
890
|
);
|
|
@@ -1069,9 +907,9 @@ class Catalog {
|
|
|
1069
907
|
* @param {CatalogPlatformValidator.CreateProductsInBulkParam} arg - Arg object
|
|
1070
908
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1071
909
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1072
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
910
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
1073
911
|
* @name createProductsInBulk
|
|
1074
|
-
* @summary: Create products in bulk
|
|
912
|
+
* @summary: Create products in bulk.
|
|
1075
913
|
* @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/).
|
|
1076
914
|
*/
|
|
1077
915
|
async createProductsInBulk(
|
|
@@ -1127,7 +965,7 @@ class Catalog {
|
|
|
1127
965
|
|
|
1128
966
|
const {
|
|
1129
967
|
error: res_error,
|
|
1130
|
-
} = CatalogPlatformModel.
|
|
968
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
1131
969
|
abortEarly: false,
|
|
1132
970
|
allowUnknown: true,
|
|
1133
971
|
});
|
|
@@ -1150,10 +988,10 @@ class Catalog {
|
|
|
1150
988
|
* @param {CatalogPlatformValidator.CreateSizeGuideParam} arg - Arg object
|
|
1151
989
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1152
990
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1153
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
991
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
1154
992
|
* @name createSizeGuide
|
|
1155
|
-
* @summary: Create size guide
|
|
1156
|
-
* @description: Allows to create a size guide associated to a
|
|
993
|
+
* @summary: Create a size guide.
|
|
994
|
+
* @description: Allows to create a size guide associated to a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSizeGuide/).
|
|
1157
995
|
*/
|
|
1158
996
|
async createSizeGuide(
|
|
1159
997
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1206,7 +1044,7 @@ class Catalog {
|
|
|
1206
1044
|
|
|
1207
1045
|
const {
|
|
1208
1046
|
error: res_error,
|
|
1209
|
-
} = CatalogPlatformModel.
|
|
1047
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
1210
1048
|
abortEarly: false,
|
|
1211
1049
|
allowUnknown: true,
|
|
1212
1050
|
});
|
|
@@ -1229,9 +1067,9 @@ class Catalog {
|
|
|
1229
1067
|
* @param {CatalogPlatformValidator.DeleteBulkInventoryJobParam} arg - Arg object
|
|
1230
1068
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1231
1069
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1232
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1070
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
1233
1071
|
* @name deleteBulkInventoryJob
|
|
1234
|
-
* @summary: Delete inventory bulk upload job
|
|
1072
|
+
* @summary: Delete inventory bulk upload job.
|
|
1235
1073
|
* @description: Allows to delete bulk Inventory job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteBulkInventoryJob/).
|
|
1236
1074
|
*/
|
|
1237
1075
|
async deleteBulkInventoryJob(
|
|
@@ -1273,7 +1111,7 @@ class Catalog {
|
|
|
1273
1111
|
const response = await PlatformAPIClient.execute(
|
|
1274
1112
|
this.config,
|
|
1275
1113
|
"delete",
|
|
1276
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}
|
|
1114
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}`,
|
|
1277
1115
|
query_params,
|
|
1278
1116
|
undefined,
|
|
1279
1117
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1287,7 +1125,7 @@ class Catalog {
|
|
|
1287
1125
|
|
|
1288
1126
|
const {
|
|
1289
1127
|
error: res_error,
|
|
1290
|
-
} = CatalogPlatformModel.
|
|
1128
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
1291
1129
|
abortEarly: false,
|
|
1292
1130
|
allowUnknown: true,
|
|
1293
1131
|
});
|
|
@@ -1310,19 +1148,18 @@ class Catalog {
|
|
|
1310
1148
|
* @param {CatalogPlatformValidator.DeleteProductParam} arg - Arg object
|
|
1311
1149
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1312
1150
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1313
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1151
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
1314
1152
|
* @name deleteProduct
|
|
1315
|
-
* @summary: Delete product
|
|
1316
|
-
* @description:
|
|
1153
|
+
* @summary: Delete a product.
|
|
1154
|
+
* @description: Remove a specific product in the catalog - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProduct/).
|
|
1317
1155
|
*/
|
|
1318
1156
|
async deleteProduct(
|
|
1319
|
-
{ itemId,
|
|
1157
|
+
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
1320
1158
|
{ responseHeaders } = { responseHeaders: false }
|
|
1321
1159
|
) {
|
|
1322
1160
|
const { error } = CatalogPlatformValidator.deleteProduct().validate(
|
|
1323
1161
|
{
|
|
1324
1162
|
itemId,
|
|
1325
|
-
body,
|
|
1326
1163
|
},
|
|
1327
1164
|
{ abortEarly: false, allowUnknown: true }
|
|
1328
1165
|
);
|
|
@@ -1336,7 +1173,6 @@ class Catalog {
|
|
|
1336
1173
|
} = CatalogPlatformValidator.deleteProduct().validate(
|
|
1337
1174
|
{
|
|
1338
1175
|
itemId,
|
|
1339
|
-
body,
|
|
1340
1176
|
},
|
|
1341
1177
|
{ abortEarly: false, allowUnknown: false }
|
|
1342
1178
|
);
|
|
@@ -1354,9 +1190,9 @@ class Catalog {
|
|
|
1354
1190
|
const response = await PlatformAPIClient.execute(
|
|
1355
1191
|
this.config,
|
|
1356
1192
|
"delete",
|
|
1357
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
1193
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}`,
|
|
1358
1194
|
query_params,
|
|
1359
|
-
|
|
1195
|
+
undefined,
|
|
1360
1196
|
{ ...xHeaders, ...requestHeaders },
|
|
1361
1197
|
{ responseHeaders }
|
|
1362
1198
|
);
|
|
@@ -1368,7 +1204,7 @@ class Catalog {
|
|
|
1368
1204
|
|
|
1369
1205
|
const {
|
|
1370
1206
|
error: res_error,
|
|
1371
|
-
} = CatalogPlatformModel.
|
|
1207
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
1372
1208
|
abortEarly: false,
|
|
1373
1209
|
allowUnknown: true,
|
|
1374
1210
|
});
|
|
@@ -1391,9 +1227,9 @@ class Catalog {
|
|
|
1391
1227
|
* @param {CatalogPlatformValidator.DeleteProductBulkJobParam} arg - Arg object
|
|
1392
1228
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1393
1229
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1394
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1230
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
1395
1231
|
* @name deleteProductBulkJob
|
|
1396
|
-
* @summary: Delete product bulk
|
|
1232
|
+
* @summary: Delete product bulk upload job.
|
|
1397
1233
|
* @description: Allows to delete bulk product job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProductBulkJob/).
|
|
1398
1234
|
*/
|
|
1399
1235
|
async deleteProductBulkJob(
|
|
@@ -1447,7 +1283,7 @@ class Catalog {
|
|
|
1447
1283
|
|
|
1448
1284
|
const {
|
|
1449
1285
|
error: res_error,
|
|
1450
|
-
} = CatalogPlatformModel.
|
|
1286
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
1451
1287
|
abortEarly: false,
|
|
1452
1288
|
allowUnknown: true,
|
|
1453
1289
|
});
|
|
@@ -1470,11 +1306,10 @@ class Catalog {
|
|
|
1470
1306
|
* @param {CatalogPlatformValidator.DeleteRealtimeInventoryParam} arg - Arg object
|
|
1471
1307
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1472
1308
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1473
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1474
|
-
* Success response
|
|
1309
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponse>} - Success response
|
|
1475
1310
|
* @name deleteRealtimeInventory
|
|
1476
|
-
* @summary: Delete
|
|
1477
|
-
* @description:
|
|
1311
|
+
* @summary: Delete realtime inventory.
|
|
1312
|
+
* @description: Remove specific realtime inventory data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteRealtimeInventory/).
|
|
1478
1313
|
*/
|
|
1479
1314
|
async deleteRealtimeInventory(
|
|
1480
1315
|
{ itemId, sellerIdentifier, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1533,10 +1368,10 @@ class Catalog {
|
|
|
1533
1368
|
|
|
1534
1369
|
const {
|
|
1535
1370
|
error: res_error,
|
|
1536
|
-
} = CatalogPlatformModel.
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
);
|
|
1371
|
+
} = CatalogPlatformModel.InventoryUpdateResponse().validate(responseData, {
|
|
1372
|
+
abortEarly: false,
|
|
1373
|
+
allowUnknown: true,
|
|
1374
|
+
});
|
|
1540
1375
|
|
|
1541
1376
|
if (res_error) {
|
|
1542
1377
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1556,11 +1391,10 @@ class Catalog {
|
|
|
1556
1391
|
* @param {CatalogPlatformValidator.DeleteSizeParam} arg - Arg object
|
|
1557
1392
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1558
1393
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1559
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1560
|
-
*
|
|
1561
|
-
*
|
|
1394
|
+
* @returns {Promise<CatalogPlatformModel.ProductSizeDeleteResponse>} -
|
|
1395
|
+
* Success response
|
|
1562
1396
|
* @name deleteSize
|
|
1563
|
-
* @summary: Delete product size
|
|
1397
|
+
* @summary: Delete product size.
|
|
1564
1398
|
* @description: Allows to delete size associated with product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSize/).
|
|
1565
1399
|
*/
|
|
1566
1400
|
async deleteSize(
|
|
@@ -1614,7 +1448,7 @@ class Catalog {
|
|
|
1614
1448
|
|
|
1615
1449
|
const {
|
|
1616
1450
|
error: res_error,
|
|
1617
|
-
} = CatalogPlatformModel.
|
|
1451
|
+
} = CatalogPlatformModel.ProductSizeDeleteResponse().validate(
|
|
1618
1452
|
responseData,
|
|
1619
1453
|
{ abortEarly: false, allowUnknown: true }
|
|
1620
1454
|
);
|
|
@@ -1641,18 +1475,18 @@ class Catalog {
|
|
|
1641
1475
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1642
1476
|
* @returns {Promise<string>} - Success response
|
|
1643
1477
|
* @name downloadInventoryTemplateView
|
|
1644
|
-
* @summary: Download inventory template
|
|
1645
|
-
* @description: Allows you to download
|
|
1478
|
+
* @summary: Download inventory template view.
|
|
1479
|
+
* @description: Allows you to download product template data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/downloadInventoryTemplateView/).
|
|
1646
1480
|
*/
|
|
1647
1481
|
async downloadInventoryTemplateView(
|
|
1648
|
-
{
|
|
1482
|
+
{ type, requestHeaders } = { requestHeaders: {} },
|
|
1649
1483
|
{ responseHeaders } = { responseHeaders: false }
|
|
1650
1484
|
) {
|
|
1651
1485
|
const {
|
|
1652
1486
|
error,
|
|
1653
1487
|
} = CatalogPlatformValidator.downloadInventoryTemplateView().validate(
|
|
1654
1488
|
{
|
|
1655
|
-
|
|
1489
|
+
type,
|
|
1656
1490
|
},
|
|
1657
1491
|
{ abortEarly: false, allowUnknown: true }
|
|
1658
1492
|
);
|
|
@@ -1665,7 +1499,7 @@ class Catalog {
|
|
|
1665
1499
|
error: warrning,
|
|
1666
1500
|
} = CatalogPlatformValidator.downloadInventoryTemplateView().validate(
|
|
1667
1501
|
{
|
|
1668
|
-
|
|
1502
|
+
type,
|
|
1669
1503
|
},
|
|
1670
1504
|
{ abortEarly: false, allowUnknown: false }
|
|
1671
1505
|
);
|
|
@@ -1677,14 +1511,14 @@ class Catalog {
|
|
|
1677
1511
|
}
|
|
1678
1512
|
|
|
1679
1513
|
const query_params = {};
|
|
1680
|
-
query_params["
|
|
1514
|
+
query_params["type"] = type;
|
|
1681
1515
|
|
|
1682
1516
|
const xHeaders = {};
|
|
1683
1517
|
|
|
1684
1518
|
const response = await PlatformAPIClient.execute(
|
|
1685
1519
|
this.config,
|
|
1686
1520
|
"get",
|
|
1687
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/download
|
|
1521
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/download`,
|
|
1688
1522
|
query_params,
|
|
1689
1523
|
undefined,
|
|
1690
1524
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1722,8 +1556,8 @@ class Catalog {
|
|
|
1722
1556
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1723
1557
|
* @returns {Promise<string>} - Success response
|
|
1724
1558
|
* @name downloadProductTemplateViews
|
|
1725
|
-
* @summary: Download product template
|
|
1726
|
-
* @description: Allows you to download product template data
|
|
1559
|
+
* @summary: Download product template views.
|
|
1560
|
+
* @description: Allows you to download product template data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/downloadProductTemplateViews/).
|
|
1727
1561
|
*/
|
|
1728
1562
|
async downloadProductTemplateViews(
|
|
1729
1563
|
{ slug, itemType, type, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1770,7 +1604,7 @@ class Catalog {
|
|
|
1770
1604
|
const response = await PlatformAPIClient.execute(
|
|
1771
1605
|
this.config,
|
|
1772
1606
|
"get",
|
|
1773
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/download
|
|
1607
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/download`,
|
|
1774
1608
|
query_params,
|
|
1775
1609
|
undefined,
|
|
1776
1610
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1804,9 +1638,9 @@ class Catalog {
|
|
|
1804
1638
|
* @param {CatalogPlatformValidator.EditProductParam} arg - Arg object
|
|
1805
1639
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1806
1640
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1807
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1641
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
1808
1642
|
* @name editProduct
|
|
1809
|
-
* @summary:
|
|
1643
|
+
* @summary: Edit a product.
|
|
1810
1644
|
* @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/).
|
|
1811
1645
|
*/
|
|
1812
1646
|
async editProduct(
|
|
@@ -1846,7 +1680,7 @@ class Catalog {
|
|
|
1846
1680
|
const response = await PlatformAPIClient.execute(
|
|
1847
1681
|
this.config,
|
|
1848
1682
|
"put",
|
|
1849
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
1683
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}`,
|
|
1850
1684
|
query_params,
|
|
1851
1685
|
body,
|
|
1852
1686
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1860,7 +1694,7 @@ class Catalog {
|
|
|
1860
1694
|
|
|
1861
1695
|
const {
|
|
1862
1696
|
error: res_error,
|
|
1863
|
-
} = CatalogPlatformModel.
|
|
1697
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
1864
1698
|
abortEarly: false,
|
|
1865
1699
|
allowUnknown: true,
|
|
1866
1700
|
});
|
|
@@ -1885,16 +1719,16 @@ class Catalog {
|
|
|
1885
1719
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1886
1720
|
* @returns {Promise<CatalogPlatformModel.InventoryConfig>} - Success response
|
|
1887
1721
|
* @name exportInventoryConfig
|
|
1888
|
-
* @summary:
|
|
1722
|
+
* @summary: Export inventory configuration.
|
|
1889
1723
|
* @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/).
|
|
1890
1724
|
*/
|
|
1891
1725
|
async exportInventoryConfig(
|
|
1892
|
-
{
|
|
1726
|
+
{ filter, requestHeaders } = { requestHeaders: {} },
|
|
1893
1727
|
{ responseHeaders } = { responseHeaders: false }
|
|
1894
1728
|
) {
|
|
1895
1729
|
const { error } = CatalogPlatformValidator.exportInventoryConfig().validate(
|
|
1896
1730
|
{
|
|
1897
|
-
|
|
1731
|
+
filter,
|
|
1898
1732
|
},
|
|
1899
1733
|
{ abortEarly: false, allowUnknown: true }
|
|
1900
1734
|
);
|
|
@@ -1907,7 +1741,7 @@ class Catalog {
|
|
|
1907
1741
|
error: warrning,
|
|
1908
1742
|
} = CatalogPlatformValidator.exportInventoryConfig().validate(
|
|
1909
1743
|
{
|
|
1910
|
-
|
|
1744
|
+
filter,
|
|
1911
1745
|
},
|
|
1912
1746
|
{ abortEarly: false, allowUnknown: false }
|
|
1913
1747
|
);
|
|
@@ -1919,14 +1753,14 @@ class Catalog {
|
|
|
1919
1753
|
}
|
|
1920
1754
|
|
|
1921
1755
|
const query_params = {};
|
|
1922
|
-
query_params["
|
|
1756
|
+
query_params["filter"] = filter;
|
|
1923
1757
|
|
|
1924
1758
|
const xHeaders = {};
|
|
1925
1759
|
|
|
1926
1760
|
const response = await PlatformAPIClient.execute(
|
|
1927
1761
|
this.config,
|
|
1928
1762
|
"get",
|
|
1929
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/configuration
|
|
1763
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/configuration`,
|
|
1930
1764
|
query_params,
|
|
1931
1765
|
undefined,
|
|
1932
1766
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1967,8 +1801,8 @@ class Catalog {
|
|
|
1967
1801
|
* - Success response
|
|
1968
1802
|
*
|
|
1969
1803
|
* @name getAllProductHsnCodes
|
|
1970
|
-
* @summary:
|
|
1971
|
-
* @description: Retrieve all HSN codes associated with
|
|
1804
|
+
* @summary: Get all product HSN codes.
|
|
1805
|
+
* @description: Retrieve all HSN codes associated with products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllProductHsnCodes/).
|
|
1972
1806
|
*/
|
|
1973
1807
|
async getAllProductHsnCodes(
|
|
1974
1808
|
{ pageNo, pageSize, q, type, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2017,7 +1851,7 @@ class Catalog {
|
|
|
2017
1851
|
const response = await PlatformAPIClient.execute(
|
|
2018
1852
|
this.config,
|
|
2019
1853
|
"get",
|
|
2020
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/hsn
|
|
1854
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/hsn`,
|
|
2021
1855
|
query_params,
|
|
2022
1856
|
undefined,
|
|
2023
1857
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2133,11 +1967,10 @@ class Catalog {
|
|
|
2133
1967
|
* @param {CatalogPlatformValidator.GetCategoryDataParam} arg - Arg object
|
|
2134
1968
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2135
1969
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2136
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2137
|
-
* Success response
|
|
1970
|
+
* @returns {Promise<CatalogPlatformModel.SingleCategoryResponse>} - Success response
|
|
2138
1971
|
* @name getCategoryData
|
|
2139
|
-
* @summary: Get category
|
|
2140
|
-
* @description: Retrieve detailed information about a specific category
|
|
1972
|
+
* @summary: Get category data.
|
|
1973
|
+
* @description: Retrieve detailed information about a specific category with the associated meta. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategoryData/).
|
|
2141
1974
|
*/
|
|
2142
1975
|
async getCategoryData(
|
|
2143
1976
|
{ uid, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2176,7 +2009,7 @@ class Catalog {
|
|
|
2176
2009
|
const response = await PlatformAPIClient.execute(
|
|
2177
2010
|
this.config,
|
|
2178
2011
|
"get",
|
|
2179
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}
|
|
2012
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}`,
|
|
2180
2013
|
query_params,
|
|
2181
2014
|
undefined,
|
|
2182
2015
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2190,10 +2023,10 @@ class Catalog {
|
|
|
2190
2023
|
|
|
2191
2024
|
const {
|
|
2192
2025
|
error: res_error,
|
|
2193
|
-
} = CatalogPlatformModel.
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
);
|
|
2026
|
+
} = CatalogPlatformModel.SingleCategoryResponse().validate(responseData, {
|
|
2027
|
+
abortEarly: false,
|
|
2028
|
+
allowUnknown: true,
|
|
2029
|
+
});
|
|
2197
2030
|
|
|
2198
2031
|
if (res_error) {
|
|
2199
2032
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2216,8 +2049,8 @@ class Catalog {
|
|
|
2216
2049
|
* @returns {Promise<CatalogPlatformModel.OptinCompanyBrandDetailsView>} -
|
|
2217
2050
|
* Success response
|
|
2218
2051
|
* @name getCompanyBrandDetail
|
|
2219
|
-
* @summary:
|
|
2220
|
-
* @description: Get the details of the Brands associated with the given company_id passed
|
|
2052
|
+
* @summary: Get the Company Brand details of Optin.
|
|
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/).
|
|
2221
2054
|
*/
|
|
2222
2055
|
async getCompanyBrandDetail(
|
|
2223
2056
|
{ isActive, q, pageNo, pageSize, marketplace, requestHeaders } = {
|
|
@@ -2271,7 +2104,7 @@ class Catalog {
|
|
|
2271
2104
|
const response = await PlatformAPIClient.execute(
|
|
2272
2105
|
this.config,
|
|
2273
2106
|
"get",
|
|
2274
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-brand-details
|
|
2107
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-brand-details`,
|
|
2275
2108
|
query_params,
|
|
2276
2109
|
undefined,
|
|
2277
2110
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2305,20 +2138,24 @@ class Catalog {
|
|
|
2305
2138
|
}
|
|
2306
2139
|
|
|
2307
2140
|
/**
|
|
2308
|
-
* @param {CatalogPlatformValidator.
|
|
2141
|
+
* @param {CatalogPlatformValidator.GetCompanyBrandsDRIParam} arg - Arg object
|
|
2309
2142
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2310
2143
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2311
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2312
|
-
*
|
|
2313
|
-
* @
|
|
2314
|
-
* @
|
|
2144
|
+
* @returns {Promise<CatalogPlatformModel.CompanyDRIListResponseSchema>} -
|
|
2145
|
+
* Success response
|
|
2146
|
+
* @name getCompanyBrandsDRI
|
|
2147
|
+
* @summary: Get support representative's associated to a company
|
|
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/).
|
|
2315
2149
|
*/
|
|
2316
|
-
async
|
|
2317
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
2150
|
+
async getCompanyBrandsDRI(
|
|
2151
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2318
2152
|
{ responseHeaders } = { responseHeaders: false }
|
|
2319
2153
|
) {
|
|
2320
|
-
const { error } = CatalogPlatformValidator.
|
|
2321
|
-
{
|
|
2154
|
+
const { error } = CatalogPlatformValidator.getCompanyBrandsDRI().validate(
|
|
2155
|
+
{
|
|
2156
|
+
pageNo,
|
|
2157
|
+
pageSize,
|
|
2158
|
+
},
|
|
2322
2159
|
{ abortEarly: false, allowUnknown: true }
|
|
2323
2160
|
);
|
|
2324
2161
|
if (error) {
|
|
@@ -2328,25 +2165,30 @@ class Catalog {
|
|
|
2328
2165
|
// Showing warrnings if extra unknown parameters are found
|
|
2329
2166
|
const {
|
|
2330
2167
|
error: warrning,
|
|
2331
|
-
} = CatalogPlatformValidator.
|
|
2332
|
-
{
|
|
2168
|
+
} = CatalogPlatformValidator.getCompanyBrandsDRI().validate(
|
|
2169
|
+
{
|
|
2170
|
+
pageNo,
|
|
2171
|
+
pageSize,
|
|
2172
|
+
},
|
|
2333
2173
|
{ abortEarly: false, allowUnknown: false }
|
|
2334
2174
|
);
|
|
2335
2175
|
if (warrning) {
|
|
2336
2176
|
Logger({
|
|
2337
2177
|
level: "WARN",
|
|
2338
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2178
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCompanyBrandsDRI \n ${warrning}`,
|
|
2339
2179
|
});
|
|
2340
2180
|
}
|
|
2341
2181
|
|
|
2342
2182
|
const query_params = {};
|
|
2183
|
+
query_params["page_no"] = pageNo;
|
|
2184
|
+
query_params["page_size"] = pageSize;
|
|
2343
2185
|
|
|
2344
2186
|
const xHeaders = {};
|
|
2345
2187
|
|
|
2346
2188
|
const response = await PlatformAPIClient.execute(
|
|
2347
2189
|
this.config,
|
|
2348
2190
|
"get",
|
|
2349
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2191
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/poc`,
|
|
2350
2192
|
query_params,
|
|
2351
2193
|
undefined,
|
|
2352
2194
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2360,10 +2202,10 @@ class Catalog {
|
|
|
2360
2202
|
|
|
2361
2203
|
const {
|
|
2362
2204
|
error: res_error,
|
|
2363
|
-
} = CatalogPlatformModel.
|
|
2364
|
-
|
|
2365
|
-
allowUnknown: true
|
|
2366
|
-
|
|
2205
|
+
} = CatalogPlatformModel.CompanyDRIListResponseSchema().validate(
|
|
2206
|
+
responseData,
|
|
2207
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2208
|
+
);
|
|
2367
2209
|
|
|
2368
2210
|
if (res_error) {
|
|
2369
2211
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2371,7 +2213,7 @@ class Catalog {
|
|
|
2371
2213
|
} else {
|
|
2372
2214
|
Logger({
|
|
2373
2215
|
level: "WARN",
|
|
2374
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2216
|
+
message: `Response Validation Warnings for platform > Catalog > getCompanyBrandsDRI \n ${res_error}`,
|
|
2375
2217
|
});
|
|
2376
2218
|
}
|
|
2377
2219
|
}
|
|
@@ -2380,19 +2222,19 @@ class Catalog {
|
|
|
2380
2222
|
}
|
|
2381
2223
|
|
|
2382
2224
|
/**
|
|
2383
|
-
* @param {CatalogPlatformValidator.
|
|
2225
|
+
* @param {CatalogPlatformValidator.GetCompanyDetailParam} arg - Arg object
|
|
2384
2226
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2385
2227
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2386
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2387
|
-
* @name
|
|
2388
|
-
* @summary: Get
|
|
2389
|
-
* @description:
|
|
2228
|
+
* @returns {Promise<CatalogPlatformModel.OptinCompanyDetail>} - Success response
|
|
2229
|
+
* @name getCompanyDetail
|
|
2230
|
+
* @summary: Get the Company details.
|
|
2231
|
+
* @description: Get the details of the company associated with the given company_id passed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyDetail/).
|
|
2390
2232
|
*/
|
|
2391
|
-
async
|
|
2233
|
+
async getCompanyDetail(
|
|
2392
2234
|
{ requestHeaders } = { requestHeaders: {} },
|
|
2393
2235
|
{ responseHeaders } = { responseHeaders: false }
|
|
2394
2236
|
) {
|
|
2395
|
-
const { error } = CatalogPlatformValidator.
|
|
2237
|
+
const { error } = CatalogPlatformValidator.getCompanyDetail().validate(
|
|
2396
2238
|
{},
|
|
2397
2239
|
{ abortEarly: false, allowUnknown: true }
|
|
2398
2240
|
);
|
|
@@ -2403,14 +2245,14 @@ class Catalog {
|
|
|
2403
2245
|
// Showing warrnings if extra unknown parameters are found
|
|
2404
2246
|
const {
|
|
2405
2247
|
error: warrning,
|
|
2406
|
-
} = CatalogPlatformValidator.
|
|
2248
|
+
} = CatalogPlatformValidator.getCompanyDetail().validate(
|
|
2407
2249
|
{},
|
|
2408
2250
|
{ abortEarly: false, allowUnknown: false }
|
|
2409
2251
|
);
|
|
2410
2252
|
if (warrning) {
|
|
2411
2253
|
Logger({
|
|
2412
2254
|
level: "WARN",
|
|
2413
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2255
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCompanyDetail \n ${warrning}`,
|
|
2414
2256
|
});
|
|
2415
2257
|
}
|
|
2416
2258
|
|
|
@@ -2421,7 +2263,7 @@ class Catalog {
|
|
|
2421
2263
|
const response = await PlatformAPIClient.execute(
|
|
2422
2264
|
this.config,
|
|
2423
2265
|
"get",
|
|
2424
|
-
`/service/platform/catalog/
|
|
2266
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/company-details`,
|
|
2425
2267
|
query_params,
|
|
2426
2268
|
undefined,
|
|
2427
2269
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2435,7 +2277,7 @@ class Catalog {
|
|
|
2435
2277
|
|
|
2436
2278
|
const {
|
|
2437
2279
|
error: res_error,
|
|
2438
|
-
} = CatalogPlatformModel.
|
|
2280
|
+
} = CatalogPlatformModel.OptinCompanyDetail().validate(responseData, {
|
|
2439
2281
|
abortEarly: false,
|
|
2440
2282
|
allowUnknown: true,
|
|
2441
2283
|
});
|
|
@@ -2446,7 +2288,7 @@ class Catalog {
|
|
|
2446
2288
|
} else {
|
|
2447
2289
|
Logger({
|
|
2448
2290
|
level: "WARN",
|
|
2449
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2291
|
+
message: `Response Validation Warnings for platform > Catalog > getCompanyDetail \n ${res_error}`,
|
|
2450
2292
|
});
|
|
2451
2293
|
}
|
|
2452
2294
|
}
|
|
@@ -2455,23 +2297,20 @@ class Catalog {
|
|
|
2455
2297
|
}
|
|
2456
2298
|
|
|
2457
2299
|
/**
|
|
2458
|
-
* @param {CatalogPlatformValidator.
|
|
2300
|
+
* @param {CatalogPlatformValidator.GetCompanyMetricsParam} arg - Arg object
|
|
2459
2301
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2460
2302
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2461
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2462
|
-
*
|
|
2463
|
-
* @
|
|
2464
|
-
* @
|
|
2465
|
-
* @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/).
|
|
2303
|
+
* @returns {Promise<CatalogPlatformModel.OptinCompanyMetrics>} - Success response
|
|
2304
|
+
* @name getCompanyMetrics
|
|
2305
|
+
* @summary: Get company metrics.
|
|
2306
|
+
* @description: Allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCompanyMetrics/).
|
|
2466
2307
|
*/
|
|
2467
|
-
async
|
|
2468
|
-
{
|
|
2308
|
+
async getCompanyMetrics(
|
|
2309
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2469
2310
|
{ responseHeaders } = { responseHeaders: false }
|
|
2470
2311
|
) {
|
|
2471
|
-
const { error } = CatalogPlatformValidator.
|
|
2472
|
-
{
|
|
2473
|
-
uid,
|
|
2474
|
-
},
|
|
2312
|
+
const { error } = CatalogPlatformValidator.getCompanyMetrics().validate(
|
|
2313
|
+
{},
|
|
2475
2314
|
{ abortEarly: false, allowUnknown: true }
|
|
2476
2315
|
);
|
|
2477
2316
|
if (error) {
|
|
@@ -2481,27 +2320,114 @@ class Catalog {
|
|
|
2481
2320
|
// Showing warrnings if extra unknown parameters are found
|
|
2482
2321
|
const {
|
|
2483
2322
|
error: warrning,
|
|
2484
|
-
} = CatalogPlatformValidator.
|
|
2485
|
-
{
|
|
2486
|
-
uid,
|
|
2487
|
-
},
|
|
2323
|
+
} = CatalogPlatformValidator.getCompanyMetrics().validate(
|
|
2324
|
+
{},
|
|
2488
2325
|
{ abortEarly: false, allowUnknown: false }
|
|
2489
2326
|
);
|
|
2490
2327
|
if (warrning) {
|
|
2491
2328
|
Logger({
|
|
2492
2329
|
level: "WARN",
|
|
2493
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
2330
|
+
message: `Parameter Validation warrnings for platform > Catalog > getCompanyMetrics \n ${warrning}`,
|
|
2331
|
+
});
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
const query_params = {};
|
|
2335
|
+
|
|
2336
|
+
const xHeaders = {};
|
|
2337
|
+
|
|
2338
|
+
const response = await PlatformAPIClient.execute(
|
|
2339
|
+
this.config,
|
|
2340
|
+
"get",
|
|
2341
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/marketplaces/company-metrics`,
|
|
2342
|
+
query_params,
|
|
2343
|
+
undefined,
|
|
2344
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2345
|
+
{ responseHeaders }
|
|
2346
|
+
);
|
|
2347
|
+
|
|
2348
|
+
let responseData = response;
|
|
2349
|
+
if (responseHeaders) {
|
|
2350
|
+
responseData = response[0];
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
const {
|
|
2354
|
+
error: res_error,
|
|
2355
|
+
} = CatalogPlatformModel.OptinCompanyMetrics().validate(responseData, {
|
|
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}`,
|
|
2494
2417
|
});
|
|
2495
2418
|
}
|
|
2496
2419
|
|
|
2497
2420
|
const query_params = {};
|
|
2421
|
+
query_params["q"] = q;
|
|
2422
|
+
query_params["page_no"] = pageNo;
|
|
2423
|
+
query_params["page_size"] = pageSize;
|
|
2498
2424
|
|
|
2499
2425
|
const xHeaders = {};
|
|
2500
2426
|
|
|
2501
2427
|
const response = await PlatformAPIClient.execute(
|
|
2502
2428
|
this.config,
|
|
2503
2429
|
"get",
|
|
2504
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2430
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/verification`,
|
|
2505
2431
|
query_params,
|
|
2506
2432
|
undefined,
|
|
2507
2433
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2515,11 +2441,90 @@ class Catalog {
|
|
|
2515
2441
|
|
|
2516
2442
|
const {
|
|
2517
2443
|
error: res_error,
|
|
2518
|
-
} = CatalogPlatformModel.
|
|
2444
|
+
} = CatalogPlatformModel.CompanyVerificationResponse().validate(
|
|
2519
2445
|
responseData,
|
|
2520
2446
|
{ abortEarly: false, allowUnknown: true }
|
|
2521
2447
|
);
|
|
2522
2448
|
|
|
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
|
+
|
|
2523
2528
|
if (res_error) {
|
|
2524
2529
|
if (this.config.options.strictResponseCheck === true) {
|
|
2525
2530
|
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
@@ -2540,7 +2545,7 @@ class Catalog {
|
|
|
2540
2545
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2541
2546
|
* @returns {Promise<CatalogPlatformModel.HsnCode>} - Success response
|
|
2542
2547
|
* @name getHsnCode
|
|
2543
|
-
* @summary:
|
|
2548
|
+
* @summary: Get HSN code.
|
|
2544
2549
|
* @description: Retrieve the HSN code for a product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getHsnCode/).
|
|
2545
2550
|
*/
|
|
2546
2551
|
async getHsnCode(
|
|
@@ -2578,7 +2583,7 @@ class Catalog {
|
|
|
2578
2583
|
const response = await PlatformAPIClient.execute(
|
|
2579
2584
|
this.config,
|
|
2580
2585
|
"get",
|
|
2581
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}
|
|
2586
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}`,
|
|
2582
2587
|
query_params,
|
|
2583
2588
|
undefined,
|
|
2584
2589
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2615,11 +2620,10 @@ class Catalog {
|
|
|
2615
2620
|
* @param {CatalogPlatformValidator.GetInventoriesParam} arg - Arg object
|
|
2616
2621
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2617
2622
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2618
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2619
|
-
* Success response
|
|
2623
|
+
* @returns {Promise<CatalogPlatformModel.GetInventoriesResponse>} - Success response
|
|
2620
2624
|
* @name getInventories
|
|
2621
|
-
* @summary:
|
|
2622
|
-
* @description: Allows to get Inventories data for particular company.
|
|
2625
|
+
* @summary: Retrieve inventories.
|
|
2626
|
+
* @description: Allows to get Inventories data for particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventories/).
|
|
2623
2627
|
*/
|
|
2624
2628
|
async getInventories(
|
|
2625
2629
|
{
|
|
@@ -2634,9 +2638,8 @@ class Catalog {
|
|
|
2634
2638
|
storeIds,
|
|
2635
2639
|
brandIds,
|
|
2636
2640
|
sellerIdentifiers,
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
qtyType,
|
|
2641
|
+
minSellable,
|
|
2642
|
+
maxSellable,
|
|
2640
2643
|
fromDate,
|
|
2641
2644
|
toDate,
|
|
2642
2645
|
sizeIdentifier,
|
|
@@ -2657,9 +2660,8 @@ class Catalog {
|
|
|
2657
2660
|
storeIds,
|
|
2658
2661
|
brandIds,
|
|
2659
2662
|
sellerIdentifiers,
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
qtyType,
|
|
2663
|
+
minSellable,
|
|
2664
|
+
maxSellable,
|
|
2663
2665
|
fromDate,
|
|
2664
2666
|
toDate,
|
|
2665
2667
|
sizeIdentifier,
|
|
@@ -2686,9 +2688,8 @@ class Catalog {
|
|
|
2686
2688
|
storeIds,
|
|
2687
2689
|
brandIds,
|
|
2688
2690
|
sellerIdentifiers,
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
qtyType,
|
|
2691
|
+
minSellable,
|
|
2692
|
+
maxSellable,
|
|
2692
2693
|
fromDate,
|
|
2693
2694
|
toDate,
|
|
2694
2695
|
sizeIdentifier,
|
|
@@ -2714,9 +2715,8 @@ class Catalog {
|
|
|
2714
2715
|
query_params["store_ids"] = storeIds;
|
|
2715
2716
|
query_params["brand_ids"] = brandIds;
|
|
2716
2717
|
query_params["seller_identifiers"] = sellerIdentifiers;
|
|
2717
|
-
query_params["
|
|
2718
|
-
query_params["
|
|
2719
|
-
query_params["qty_type"] = qtyType;
|
|
2718
|
+
query_params["min_sellable"] = minSellable;
|
|
2719
|
+
query_params["max_sellable"] = maxSellable;
|
|
2720
2720
|
query_params["from_date"] = fromDate;
|
|
2721
2721
|
query_params["to_date"] = toDate;
|
|
2722
2722
|
query_params["size_identifier"] = sizeIdentifier;
|
|
@@ -2740,10 +2740,10 @@ class Catalog {
|
|
|
2740
2740
|
|
|
2741
2741
|
const {
|
|
2742
2742
|
error: res_error,
|
|
2743
|
-
} = CatalogPlatformModel.
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
);
|
|
2743
|
+
} = CatalogPlatformModel.GetInventoriesResponse().validate(responseData, {
|
|
2744
|
+
abortEarly: false,
|
|
2745
|
+
allowUnknown: true,
|
|
2746
|
+
});
|
|
2747
2747
|
|
|
2748
2748
|
if (res_error) {
|
|
2749
2749
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2759,87 +2759,6 @@ class Catalog {
|
|
|
2759
2759
|
return response;
|
|
2760
2760
|
}
|
|
2761
2761
|
|
|
2762
|
-
/**
|
|
2763
|
-
* @param {Object} arg - Arg object.
|
|
2764
|
-
* @param {string} [arg.itemId] - Item code of the product of which size is to be get.
|
|
2765
|
-
* @param {string} [arg.size] - Size of which inventory is to get.
|
|
2766
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
2767
|
-
* page. Default is 12.
|
|
2768
|
-
* @param {string} [arg.q] - Search with help of store code.
|
|
2769
|
-
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
2770
|
-
* @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
|
|
2771
|
-
* @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
|
|
2772
|
-
* @param {string[]} [arg.sellerIdentifiers] - The Seller Identifier or
|
|
2773
|
-
* Primary Identifier of the inventory.
|
|
2774
|
-
* @param {number} [arg.qtyGt] - This field allows you to filter for
|
|
2775
|
-
* inventories that have quantity greater than to the specified value
|
|
2776
|
-
* based on qty_type filter.
|
|
2777
|
-
* @param {number} [arg.qtyLt] - This field allows you to filter for
|
|
2778
|
-
* inventories that have a quantity less than to the specified value based
|
|
2779
|
-
* on qty_type filter.
|
|
2780
|
-
* @param {string} [arg.qtyType] - This field provides flexibility in
|
|
2781
|
-
* selecting filter for inventory quantity counts and date queries. For
|
|
2782
|
-
* example, you might use this field to specify "total" or "sellable" quantity.
|
|
2783
|
-
* @param {string} [arg.fromDate] - Inventory updated on filter to get
|
|
2784
|
-
* inventories greater then or equal to provided date based on qty_type value.
|
|
2785
|
-
* @param {string} [arg.toDate] - Inventory updated on filter to get
|
|
2786
|
-
* inventories less then or equal to provided date based on qty_type value.
|
|
2787
|
-
* @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
|
|
2788
|
-
* or Primary Identifier) of which inventory is to get.
|
|
2789
|
-
* @returns {Paginator<CatalogPlatformModel.GetInventoriesResponseSchema>}
|
|
2790
|
-
* @summary: List Inventory
|
|
2791
|
-
* @description: Allows to get Inventories data for particular company.
|
|
2792
|
-
*/
|
|
2793
|
-
getInventoriesPaginator({
|
|
2794
|
-
itemId,
|
|
2795
|
-
size,
|
|
2796
|
-
pageSize,
|
|
2797
|
-
q,
|
|
2798
|
-
sellable,
|
|
2799
|
-
storeIds,
|
|
2800
|
-
brandIds,
|
|
2801
|
-
sellerIdentifiers,
|
|
2802
|
-
qtyGt,
|
|
2803
|
-
qtyLt,
|
|
2804
|
-
qtyType,
|
|
2805
|
-
fromDate,
|
|
2806
|
-
toDate,
|
|
2807
|
-
sizeIdentifier,
|
|
2808
|
-
} = {}) {
|
|
2809
|
-
const paginator = new Paginator();
|
|
2810
|
-
const callback = async () => {
|
|
2811
|
-
const pageId = paginator.nextId;
|
|
2812
|
-
const pageNo = paginator.pageNo;
|
|
2813
|
-
const pageType = "cursor";
|
|
2814
|
-
const data = await this.getInventories({
|
|
2815
|
-
itemId: itemId,
|
|
2816
|
-
size: size,
|
|
2817
|
-
pageNo: pageNo,
|
|
2818
|
-
pageSize: pageSize,
|
|
2819
|
-
pageId: pageId,
|
|
2820
|
-
pageType: pageType,
|
|
2821
|
-
q: q,
|
|
2822
|
-
sellable: sellable,
|
|
2823
|
-
storeIds: storeIds,
|
|
2824
|
-
brandIds: brandIds,
|
|
2825
|
-
sellerIdentifiers: sellerIdentifiers,
|
|
2826
|
-
qtyGt: qtyGt,
|
|
2827
|
-
qtyLt: qtyLt,
|
|
2828
|
-
qtyType: qtyType,
|
|
2829
|
-
fromDate: fromDate,
|
|
2830
|
-
toDate: toDate,
|
|
2831
|
-
sizeIdentifier: sizeIdentifier,
|
|
2832
|
-
});
|
|
2833
|
-
paginator.setPaginator({
|
|
2834
|
-
hasNext: data.page.has_next ? true : false,
|
|
2835
|
-
nextId: data.page.next_id,
|
|
2836
|
-
});
|
|
2837
|
-
return data;
|
|
2838
|
-
};
|
|
2839
|
-
paginator.setCallback(callback.bind(this));
|
|
2840
|
-
return paginator;
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
2762
|
/**
|
|
2844
2763
|
* @param {CatalogPlatformValidator.GetInventoryBulkUploadHistoryParam} arg
|
|
2845
2764
|
* - Arg object
|
|
@@ -2848,11 +2767,11 @@ class Catalog {
|
|
|
2848
2767
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2849
2768
|
* @returns {Promise<CatalogPlatformModel.BulkInventoryGet>} - Success response
|
|
2850
2769
|
* @name getInventoryBulkUploadHistory
|
|
2851
|
-
* @summary:
|
|
2852
|
-
* @description: Helps to get bulk Inventory upload jobs
|
|
2770
|
+
* @summary: Retrieve inventory bulk upload history.
|
|
2771
|
+
* @description: Helps to get bulk Inventory upload jobs data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBulkUploadHistory/).
|
|
2853
2772
|
*/
|
|
2854
2773
|
async getInventoryBulkUploadHistory(
|
|
2855
|
-
{ pageNo, pageSize,
|
|
2774
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
2856
2775
|
{ responseHeaders } = { responseHeaders: false }
|
|
2857
2776
|
) {
|
|
2858
2777
|
const {
|
|
@@ -2861,7 +2780,6 @@ class Catalog {
|
|
|
2861
2780
|
{
|
|
2862
2781
|
pageNo,
|
|
2863
2782
|
pageSize,
|
|
2864
|
-
search,
|
|
2865
2783
|
},
|
|
2866
2784
|
{ abortEarly: false, allowUnknown: true }
|
|
2867
2785
|
);
|
|
@@ -2876,7 +2794,6 @@ class Catalog {
|
|
|
2876
2794
|
{
|
|
2877
2795
|
pageNo,
|
|
2878
2796
|
pageSize,
|
|
2879
|
-
search,
|
|
2880
2797
|
},
|
|
2881
2798
|
{ abortEarly: false, allowUnknown: false }
|
|
2882
2799
|
);
|
|
@@ -2890,14 +2807,13 @@ class Catalog {
|
|
|
2890
2807
|
const query_params = {};
|
|
2891
2808
|
query_params["page_no"] = pageNo;
|
|
2892
2809
|
query_params["page_size"] = pageSize;
|
|
2893
|
-
query_params["search"] = search;
|
|
2894
2810
|
|
|
2895
2811
|
const xHeaders = {};
|
|
2896
2812
|
|
|
2897
2813
|
const response = await PlatformAPIClient.execute(
|
|
2898
2814
|
this.config,
|
|
2899
2815
|
"get",
|
|
2900
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk
|
|
2816
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk`,
|
|
2901
2817
|
query_params,
|
|
2902
2818
|
undefined,
|
|
2903
2819
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -2930,36 +2846,6 @@ class Catalog {
|
|
|
2930
2846
|
return response;
|
|
2931
2847
|
}
|
|
2932
2848
|
|
|
2933
|
-
/**
|
|
2934
|
-
* @param {Object} arg - Arg object.
|
|
2935
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
2936
|
-
* page. Default is 12.
|
|
2937
|
-
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
2938
|
-
* @returns {Paginator<CatalogPlatformModel.BulkInventoryGet>}
|
|
2939
|
-
* @summary: List bulk inventory upload history
|
|
2940
|
-
* @description: Helps to get bulk Inventory upload jobs status.
|
|
2941
|
-
*/
|
|
2942
|
-
getInventoryBulkUploadHistoryPaginator({ pageSize, search } = {}) {
|
|
2943
|
-
const paginator = new Paginator();
|
|
2944
|
-
const callback = async () => {
|
|
2945
|
-
const pageId = paginator.nextId;
|
|
2946
|
-
const pageNo = paginator.pageNo;
|
|
2947
|
-
const pageType = "number";
|
|
2948
|
-
const data = await this.getInventoryBulkUploadHistory({
|
|
2949
|
-
pageNo: pageNo,
|
|
2950
|
-
pageSize: pageSize,
|
|
2951
|
-
search: search,
|
|
2952
|
-
});
|
|
2953
|
-
paginator.setPaginator({
|
|
2954
|
-
hasNext: data.page.has_next ? true : false,
|
|
2955
|
-
nextId: data.page.next_id,
|
|
2956
|
-
});
|
|
2957
|
-
return data;
|
|
2958
|
-
};
|
|
2959
|
-
paginator.setCallback(callback.bind(this));
|
|
2960
|
-
return paginator;
|
|
2961
|
-
}
|
|
2962
|
-
|
|
2963
2849
|
/**
|
|
2964
2850
|
* @param {CatalogPlatformValidator.GetInventoryBySizeParam} arg - Arg object
|
|
2965
2851
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2967,8 +2853,8 @@ class Catalog {
|
|
|
2967
2853
|
* @returns {Promise<CatalogPlatformModel.InventoryResponsePaginated>} -
|
|
2968
2854
|
* Success response
|
|
2969
2855
|
* @name getInventoryBySize
|
|
2970
|
-
* @summary:
|
|
2971
|
-
* @description:
|
|
2856
|
+
* @summary: Get inventory by size.
|
|
2857
|
+
* @description: Allows to retrieve Inventory data for particular company grouped by size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBySize/).
|
|
2972
2858
|
*/
|
|
2973
2859
|
async getInventoryBySize(
|
|
2974
2860
|
{ itemId, size, pageNo, pageSize, q, sellable, requestHeaders } = {
|
|
@@ -3023,7 +2909,7 @@ class Catalog {
|
|
|
3023
2909
|
const response = await PlatformAPIClient.execute(
|
|
3024
2910
|
this.config,
|
|
3025
2911
|
"get",
|
|
3026
|
-
`/service/platform/catalog/
|
|
2912
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
|
|
3027
2913
|
query_params,
|
|
3028
2914
|
undefined,
|
|
3029
2915
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3056,42 +2942,6 @@ class Catalog {
|
|
|
3056
2942
|
return response;
|
|
3057
2943
|
}
|
|
3058
2944
|
|
|
3059
|
-
/**
|
|
3060
|
-
* @param {Object} arg - Arg object.
|
|
3061
|
-
* @param {number} arg.itemId - Item code of the product of which size is to be get.
|
|
3062
|
-
* @param {string} arg.size - Size of which inventory is to get.
|
|
3063
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3064
|
-
* page. Default is 12.
|
|
3065
|
-
* @param {string} [arg.q] - Search with help of store code.
|
|
3066
|
-
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
3067
|
-
* @returns {Paginator<CatalogPlatformModel.InventoryResponsePaginated>}
|
|
3068
|
-
* @summary: List inventory by size
|
|
3069
|
-
* @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)."
|
|
3070
|
-
*/
|
|
3071
|
-
getInventoryBySizePaginator({ itemId, size, pageSize, q, sellable } = {}) {
|
|
3072
|
-
const paginator = new Paginator();
|
|
3073
|
-
const callback = async () => {
|
|
3074
|
-
const pageId = paginator.nextId;
|
|
3075
|
-
const pageNo = paginator.pageNo;
|
|
3076
|
-
const pageType = "number";
|
|
3077
|
-
const data = await this.getInventoryBySize({
|
|
3078
|
-
itemId: itemId,
|
|
3079
|
-
size: size,
|
|
3080
|
-
pageNo: pageNo,
|
|
3081
|
-
pageSize: pageSize,
|
|
3082
|
-
q: q,
|
|
3083
|
-
sellable: sellable,
|
|
3084
|
-
});
|
|
3085
|
-
paginator.setPaginator({
|
|
3086
|
-
hasNext: data.page.has_next ? true : false,
|
|
3087
|
-
nextId: data.page.next_id,
|
|
3088
|
-
});
|
|
3089
|
-
return data;
|
|
3090
|
-
};
|
|
3091
|
-
paginator.setCallback(callback.bind(this));
|
|
3092
|
-
return paginator;
|
|
3093
|
-
}
|
|
3094
|
-
|
|
3095
2945
|
/**
|
|
3096
2946
|
* @param {CatalogPlatformValidator.GetInventoryBySizeIdentifierParam} arg
|
|
3097
2947
|
* - Arg object
|
|
@@ -3102,8 +2952,8 @@ class Catalog {
|
|
|
3102
2952
|
* - Success response
|
|
3103
2953
|
*
|
|
3104
2954
|
* @name getInventoryBySizeIdentifier
|
|
3105
|
-
* @summary:
|
|
3106
|
-
* @description:
|
|
2955
|
+
* @summary: Get inventory by size identifier.
|
|
2956
|
+
* @description: Allows to retrieve Inventory data for particular company grouped by size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBySizeIdentifier/).
|
|
3107
2957
|
*/
|
|
3108
2958
|
async getInventoryBySizeIdentifier(
|
|
3109
2959
|
{
|
|
@@ -3199,57 +3049,15 @@ class Catalog {
|
|
|
3199
3049
|
return response;
|
|
3200
3050
|
}
|
|
3201
3051
|
|
|
3202
|
-
/**
|
|
3203
|
-
* @param {Object} arg - Arg object.
|
|
3204
|
-
* @param {number} arg.itemId - Item code of the product of which size is to be get.
|
|
3205
|
-
* @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
|
|
3206
|
-
* or Primary Identifier) of which inventory is to get.
|
|
3207
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3208
|
-
* page. Default is 12.
|
|
3209
|
-
* @param {string} [arg.q] - Search with help of store code.
|
|
3210
|
-
* @param {number[]} [arg.locationIds] - Search by store ids.
|
|
3211
|
-
* @returns {Paginator<CatalogPlatformModel.InventorySellerIdentifierResponsePaginated>}
|
|
3212
|
-
* @summary: List inventory by size
|
|
3213
|
-
* @description: Retrieve inventory data for a specific company, item ID, and seller identifier. The API supports search capabilities using store codes and location IDs.
|
|
3214
|
-
*/
|
|
3215
|
-
getInventoryBySizeIdentifierPaginator({
|
|
3216
|
-
itemId,
|
|
3217
|
-
sizeIdentifier,
|
|
3218
|
-
pageSize,
|
|
3219
|
-
q,
|
|
3220
|
-
locationIds,
|
|
3221
|
-
} = {}) {
|
|
3222
|
-
const paginator = new Paginator();
|
|
3223
|
-
const callback = async () => {
|
|
3224
|
-
const pageId = paginator.nextId;
|
|
3225
|
-
const pageNo = paginator.pageNo;
|
|
3226
|
-
const pageType = "number";
|
|
3227
|
-
const data = await this.getInventoryBySizeIdentifier({
|
|
3228
|
-
itemId: itemId,
|
|
3229
|
-
sizeIdentifier: sizeIdentifier,
|
|
3230
|
-
pageNo: pageNo,
|
|
3231
|
-
pageSize: pageSize,
|
|
3232
|
-
q: q,
|
|
3233
|
-
locationIds: locationIds,
|
|
3234
|
-
});
|
|
3235
|
-
paginator.setPaginator({
|
|
3236
|
-
hasNext: data.page.has_next ? true : false,
|
|
3237
|
-
nextId: data.page.next_id,
|
|
3238
|
-
});
|
|
3239
|
-
return data;
|
|
3240
|
-
};
|
|
3241
|
-
paginator.setCallback(callback.bind(this));
|
|
3242
|
-
return paginator;
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
3052
|
/**
|
|
3246
3053
|
* @param {CatalogPlatformValidator.GetInventoryExportParam} arg - Arg object
|
|
3247
3054
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3248
3055
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3249
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3056
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportJobResponse>} -
|
|
3057
|
+
* Success response
|
|
3250
3058
|
* @name getInventoryExport
|
|
3251
|
-
* @summary:
|
|
3252
|
-
* @description:
|
|
3059
|
+
* @summary: Retrieve inventory export data.
|
|
3060
|
+
* @description: Helps to retrieve Inventory export history. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryExport/).
|
|
3253
3061
|
*/
|
|
3254
3062
|
async getInventoryExport(
|
|
3255
3063
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -3284,7 +3092,7 @@ class Catalog {
|
|
|
3284
3092
|
const response = await PlatformAPIClient.execute(
|
|
3285
3093
|
this.config,
|
|
3286
3094
|
"get",
|
|
3287
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download
|
|
3095
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download`,
|
|
3288
3096
|
query_params,
|
|
3289
3097
|
undefined,
|
|
3290
3098
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3298,10 +3106,10 @@ class Catalog {
|
|
|
3298
3106
|
|
|
3299
3107
|
const {
|
|
3300
3108
|
error: res_error,
|
|
3301
|
-
} = CatalogPlatformModel.
|
|
3302
|
-
|
|
3303
|
-
allowUnknown: true
|
|
3304
|
-
|
|
3109
|
+
} = CatalogPlatformModel.InventoryExportJobResponse().validate(
|
|
3110
|
+
responseData,
|
|
3111
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3112
|
+
);
|
|
3305
3113
|
|
|
3306
3114
|
if (res_error) {
|
|
3307
3115
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3318,22 +3126,26 @@ class Catalog {
|
|
|
3318
3126
|
}
|
|
3319
3127
|
|
|
3320
3128
|
/**
|
|
3321
|
-
* @param {CatalogPlatformValidator.
|
|
3129
|
+
* @param {CatalogPlatformValidator.GetInventoryExportDetailParam} arg - Arg object
|
|
3322
3130
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3323
3131
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3324
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3325
|
-
*
|
|
3326
|
-
*
|
|
3327
|
-
* @
|
|
3132
|
+
* @returns {Promise<CatalogPlatformModel.EditInventoryDownloadsResponse>}
|
|
3133
|
+
* - Success response
|
|
3134
|
+
*
|
|
3135
|
+
* @name getInventoryExportDetail
|
|
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/).
|
|
3328
3138
|
*/
|
|
3329
|
-
async
|
|
3330
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
3139
|
+
async getInventoryExportDetail(
|
|
3140
|
+
{ jobId, requestHeaders } = { requestHeaders: {} },
|
|
3331
3141
|
{ responseHeaders } = { responseHeaders: false }
|
|
3332
3142
|
) {
|
|
3333
3143
|
const {
|
|
3334
3144
|
error,
|
|
3335
|
-
} = CatalogPlatformValidator.
|
|
3336
|
-
{
|
|
3145
|
+
} = CatalogPlatformValidator.getInventoryExportDetail().validate(
|
|
3146
|
+
{
|
|
3147
|
+
jobId,
|
|
3148
|
+
},
|
|
3337
3149
|
{ abortEarly: false, allowUnknown: true }
|
|
3338
3150
|
);
|
|
3339
3151
|
if (error) {
|
|
@@ -3343,14 +3155,16 @@ class Catalog {
|
|
|
3343
3155
|
// Showing warrnings if extra unknown parameters are found
|
|
3344
3156
|
const {
|
|
3345
3157
|
error: warrning,
|
|
3346
|
-
} = CatalogPlatformValidator.
|
|
3347
|
-
{
|
|
3158
|
+
} = CatalogPlatformValidator.getInventoryExportDetail().validate(
|
|
3159
|
+
{
|
|
3160
|
+
jobId,
|
|
3161
|
+
},
|
|
3348
3162
|
{ abortEarly: false, allowUnknown: false }
|
|
3349
3163
|
);
|
|
3350
3164
|
if (warrning) {
|
|
3351
3165
|
Logger({
|
|
3352
3166
|
level: "WARN",
|
|
3353
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3167
|
+
message: `Parameter Validation warrnings for platform > Catalog > getInventoryExportDetail \n ${warrning}`,
|
|
3354
3168
|
});
|
|
3355
3169
|
}
|
|
3356
3170
|
|
|
@@ -3361,7 +3175,7 @@ class Catalog {
|
|
|
3361
3175
|
const response = await PlatformAPIClient.execute(
|
|
3362
3176
|
this.config,
|
|
3363
3177
|
"get",
|
|
3364
|
-
`/service/platform/catalog/
|
|
3178
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download/${jobId}`,
|
|
3365
3179
|
query_params,
|
|
3366
3180
|
undefined,
|
|
3367
3181
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3375,10 +3189,10 @@ class Catalog {
|
|
|
3375
3189
|
|
|
3376
3190
|
const {
|
|
3377
3191
|
error: res_error,
|
|
3378
|
-
} = CatalogPlatformModel.
|
|
3379
|
-
|
|
3380
|
-
allowUnknown: true
|
|
3381
|
-
|
|
3192
|
+
} = CatalogPlatformModel.EditInventoryDownloadsResponse().validate(
|
|
3193
|
+
responseData,
|
|
3194
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3195
|
+
);
|
|
3382
3196
|
|
|
3383
3197
|
if (res_error) {
|
|
3384
3198
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3386,7 +3200,7 @@ class Catalog {
|
|
|
3386
3200
|
} else {
|
|
3387
3201
|
Logger({
|
|
3388
3202
|
level: "WARN",
|
|
3389
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3203
|
+
message: `Response Validation Warnings for platform > Catalog > getInventoryExportDetail \n ${res_error}`,
|
|
3390
3204
|
});
|
|
3391
3205
|
}
|
|
3392
3206
|
}
|
|
@@ -3395,19 +3209,19 @@ class Catalog {
|
|
|
3395
3209
|
}
|
|
3396
3210
|
|
|
3397
3211
|
/**
|
|
3398
|
-
* @param {CatalogPlatformValidator.
|
|
3212
|
+
* @param {CatalogPlatformValidator.GetLocationTagsParam} arg - Arg object
|
|
3399
3213
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3400
3214
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3401
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3402
|
-
* @name
|
|
3403
|
-
* @summary:
|
|
3404
|
-
* @description:
|
|
3215
|
+
* @returns {Promise<CatalogPlatformModel.StoreTagsResponseSchema>} - Success response
|
|
3216
|
+
* @name getLocationTags
|
|
3217
|
+
* @summary: Get tags associated with locations for a company.
|
|
3218
|
+
* @description: This API fetches all the tags associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getLocationTags/).
|
|
3405
3219
|
*/
|
|
3406
|
-
async
|
|
3220
|
+
async getLocationTags(
|
|
3407
3221
|
{ requestHeaders } = { requestHeaders: {} },
|
|
3408
3222
|
{ responseHeaders } = { responseHeaders: false }
|
|
3409
3223
|
) {
|
|
3410
|
-
const { error } = CatalogPlatformValidator.
|
|
3224
|
+
const { error } = CatalogPlatformValidator.getLocationTags().validate(
|
|
3411
3225
|
{},
|
|
3412
3226
|
{ abortEarly: false, allowUnknown: true }
|
|
3413
3227
|
);
|
|
@@ -3418,14 +3232,14 @@ class Catalog {
|
|
|
3418
3232
|
// Showing warrnings if extra unknown parameters are found
|
|
3419
3233
|
const {
|
|
3420
3234
|
error: warrning,
|
|
3421
|
-
} = CatalogPlatformValidator.
|
|
3235
|
+
} = CatalogPlatformValidator.getLocationTags().validate(
|
|
3422
3236
|
{},
|
|
3423
3237
|
{ abortEarly: false, allowUnknown: false }
|
|
3424
3238
|
);
|
|
3425
3239
|
if (warrning) {
|
|
3426
3240
|
Logger({
|
|
3427
3241
|
level: "WARN",
|
|
3428
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3242
|
+
message: `Parameter Validation warrnings for platform > Catalog > getLocationTags \n ${warrning}`,
|
|
3429
3243
|
});
|
|
3430
3244
|
}
|
|
3431
3245
|
|
|
@@ -3436,7 +3250,7 @@ class Catalog {
|
|
|
3436
3250
|
const response = await PlatformAPIClient.execute(
|
|
3437
3251
|
this.config,
|
|
3438
3252
|
"get",
|
|
3439
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
3253
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/location/tags`,
|
|
3440
3254
|
query_params,
|
|
3441
3255
|
undefined,
|
|
3442
3256
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3450,7 +3264,7 @@ class Catalog {
|
|
|
3450
3264
|
|
|
3451
3265
|
const {
|
|
3452
3266
|
error: res_error,
|
|
3453
|
-
} = CatalogPlatformModel.
|
|
3267
|
+
} = CatalogPlatformModel.StoreTagsResponseSchema().validate(responseData, {
|
|
3454
3268
|
abortEarly: false,
|
|
3455
3269
|
allowUnknown: true,
|
|
3456
3270
|
});
|
|
@@ -3461,7 +3275,7 @@ class Catalog {
|
|
|
3461
3275
|
} else {
|
|
3462
3276
|
Logger({
|
|
3463
3277
|
level: "WARN",
|
|
3464
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3278
|
+
message: `Response Validation Warnings for platform > Catalog > getLocationTags \n ${res_error}`,
|
|
3465
3279
|
});
|
|
3466
3280
|
}
|
|
3467
3281
|
}
|
|
@@ -3470,23 +3284,20 @@ class Catalog {
|
|
|
3470
3284
|
}
|
|
3471
3285
|
|
|
3472
3286
|
/**
|
|
3473
|
-
* @param {CatalogPlatformValidator.
|
|
3287
|
+
* @param {CatalogPlatformValidator.GetMarketplacesParam} arg - Arg object
|
|
3474
3288
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3475
3289
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3476
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3477
|
-
*
|
|
3478
|
-
* @
|
|
3479
|
-
* @
|
|
3480
|
-
* @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/).
|
|
3290
|
+
* @returns {Promise<CatalogPlatformModel.GetAllMarketplaces>} - Success response
|
|
3291
|
+
* @name getMarketplaces
|
|
3292
|
+
* @summary: List all marketplaces
|
|
3293
|
+
* @description: This API allows to get marketplace information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getMarketplaces/).
|
|
3481
3294
|
*/
|
|
3482
|
-
async
|
|
3483
|
-
{
|
|
3295
|
+
async getMarketplaces(
|
|
3296
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
3484
3297
|
{ responseHeaders } = { responseHeaders: false }
|
|
3485
3298
|
) {
|
|
3486
|
-
const { error } = CatalogPlatformValidator.
|
|
3487
|
-
{
|
|
3488
|
-
body,
|
|
3489
|
-
},
|
|
3299
|
+
const { error } = CatalogPlatformValidator.getMarketplaces().validate(
|
|
3300
|
+
{},
|
|
3490
3301
|
{ abortEarly: false, allowUnknown: true }
|
|
3491
3302
|
);
|
|
3492
3303
|
if (error) {
|
|
@@ -3496,16 +3307,14 @@ class Catalog {
|
|
|
3496
3307
|
// Showing warrnings if extra unknown parameters are found
|
|
3497
3308
|
const {
|
|
3498
3309
|
error: warrning,
|
|
3499
|
-
} = CatalogPlatformValidator.
|
|
3500
|
-
{
|
|
3501
|
-
body,
|
|
3502
|
-
},
|
|
3310
|
+
} = CatalogPlatformValidator.getMarketplaces().validate(
|
|
3311
|
+
{},
|
|
3503
3312
|
{ abortEarly: false, allowUnknown: false }
|
|
3504
3313
|
);
|
|
3505
3314
|
if (warrning) {
|
|
3506
3315
|
Logger({
|
|
3507
3316
|
level: "WARN",
|
|
3508
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3317
|
+
message: `Parameter Validation warrnings for platform > Catalog > getMarketplaces \n ${warrning}`,
|
|
3509
3318
|
});
|
|
3510
3319
|
}
|
|
3511
3320
|
|
|
@@ -3515,10 +3324,10 @@ class Catalog {
|
|
|
3515
3324
|
|
|
3516
3325
|
const response = await PlatformAPIClient.execute(
|
|
3517
3326
|
this.config,
|
|
3518
|
-
"
|
|
3519
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
3327
|
+
"get",
|
|
3328
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel`,
|
|
3520
3329
|
query_params,
|
|
3521
|
-
|
|
3330
|
+
undefined,
|
|
3522
3331
|
{ ...xHeaders, ...requestHeaders },
|
|
3523
3332
|
{ responseHeaders }
|
|
3524
3333
|
);
|
|
@@ -3530,10 +3339,10 @@ class Catalog {
|
|
|
3530
3339
|
|
|
3531
3340
|
const {
|
|
3532
3341
|
error: res_error,
|
|
3533
|
-
} = CatalogPlatformModel.
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
);
|
|
3342
|
+
} = CatalogPlatformModel.GetAllMarketplaces().validate(responseData, {
|
|
3343
|
+
abortEarly: false,
|
|
3344
|
+
allowUnknown: true,
|
|
3345
|
+
});
|
|
3537
3346
|
|
|
3538
3347
|
if (res_error) {
|
|
3539
3348
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3541,7 +3350,7 @@ class Catalog {
|
|
|
3541
3350
|
} else {
|
|
3542
3351
|
Logger({
|
|
3543
3352
|
level: "WARN",
|
|
3544
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3353
|
+
message: `Response Validation Warnings for platform > Catalog > getMarketplaces \n ${res_error}`,
|
|
3545
3354
|
});
|
|
3546
3355
|
}
|
|
3547
3356
|
}
|
|
@@ -3553,10 +3362,9 @@ class Catalog {
|
|
|
3553
3362
|
* @param {CatalogPlatformValidator.GetProductParam} arg - Arg object
|
|
3554
3363
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3555
3364
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3556
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3557
|
-
* Success response
|
|
3365
|
+
* @returns {Promise<CatalogPlatformModel.SingleProductResponse>} - Success response
|
|
3558
3366
|
* @name getProduct
|
|
3559
|
-
* @summary: Get
|
|
3367
|
+
* @summary: Get product details.
|
|
3560
3368
|
* @description: Retrieve data associated to a particular product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProduct/).
|
|
3561
3369
|
*/
|
|
3562
3370
|
async getProduct(
|
|
@@ -3600,7 +3408,7 @@ class Catalog {
|
|
|
3600
3408
|
const response = await PlatformAPIClient.execute(
|
|
3601
3409
|
this.config,
|
|
3602
3410
|
"get",
|
|
3603
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}
|
|
3411
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}`,
|
|
3604
3412
|
query_params,
|
|
3605
3413
|
undefined,
|
|
3606
3414
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3614,10 +3422,10 @@ class Catalog {
|
|
|
3614
3422
|
|
|
3615
3423
|
const {
|
|
3616
3424
|
error: res_error,
|
|
3617
|
-
} = CatalogPlatformModel.
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
);
|
|
3425
|
+
} = CatalogPlatformModel.SingleProductResponse().validate(responseData, {
|
|
3426
|
+
abortEarly: false,
|
|
3427
|
+
allowUnknown: true,
|
|
3428
|
+
});
|
|
3621
3429
|
|
|
3622
3430
|
if (res_error) {
|
|
3623
3431
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3637,9 +3445,9 @@ class Catalog {
|
|
|
3637
3445
|
* @param {CatalogPlatformValidator.GetProductAssetsInBulkParam} arg - Arg object
|
|
3638
3446
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3639
3447
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3640
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3448
|
+
* @returns {Promise<CatalogPlatformModel.BulkAssetResponse>} - Success response
|
|
3641
3449
|
* @name getProductAssetsInBulk
|
|
3642
|
-
* @summary:
|
|
3450
|
+
* @summary: Retrieve product assets in bulk.
|
|
3643
3451
|
* @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/).
|
|
3644
3452
|
*/
|
|
3645
3453
|
async getProductAssetsInBulk(
|
|
@@ -3685,7 +3493,7 @@ class Catalog {
|
|
|
3685
3493
|
const response = await PlatformAPIClient.execute(
|
|
3686
3494
|
this.config,
|
|
3687
3495
|
"get",
|
|
3688
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk
|
|
3496
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk`,
|
|
3689
3497
|
query_params,
|
|
3690
3498
|
undefined,
|
|
3691
3499
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3699,7 +3507,7 @@ class Catalog {
|
|
|
3699
3507
|
|
|
3700
3508
|
const {
|
|
3701
3509
|
error: res_error,
|
|
3702
|
-
} = CatalogPlatformModel.
|
|
3510
|
+
} = CatalogPlatformModel.BulkAssetResponse().validate(responseData, {
|
|
3703
3511
|
abortEarly: false,
|
|
3704
3512
|
allowUnknown: true,
|
|
3705
3513
|
});
|
|
@@ -3718,44 +3526,15 @@ class Catalog {
|
|
|
3718
3526
|
return response;
|
|
3719
3527
|
}
|
|
3720
3528
|
|
|
3721
|
-
/**
|
|
3722
|
-
* @param {Object} arg - Arg object.
|
|
3723
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3724
|
-
* page. Default is 12.
|
|
3725
|
-
* @returns {Paginator<CatalogPlatformModel.BulkAssetResponseSchema>}
|
|
3726
|
-
* @summary: Get product assets
|
|
3727
|
-
* @description: Helps to retrieve bulk asset jobs data associated to a particular company.
|
|
3728
|
-
*/
|
|
3729
|
-
getProductAssetsInBulkPaginator({ pageSize } = {}) {
|
|
3730
|
-
const paginator = new Paginator();
|
|
3731
|
-
const callback = async () => {
|
|
3732
|
-
const pageId = paginator.nextId;
|
|
3733
|
-
const pageNo = paginator.pageNo;
|
|
3734
|
-
const pageType = "number";
|
|
3735
|
-
const data = await this.getProductAssetsInBulk({
|
|
3736
|
-
pageNo: pageNo,
|
|
3737
|
-
pageSize: pageSize,
|
|
3738
|
-
});
|
|
3739
|
-
paginator.setPaginator({
|
|
3740
|
-
hasNext: data.page.has_next ? true : false,
|
|
3741
|
-
nextId: data.page.next_id,
|
|
3742
|
-
});
|
|
3743
|
-
return data;
|
|
3744
|
-
};
|
|
3745
|
-
paginator.setCallback(callback.bind(this));
|
|
3746
|
-
return paginator;
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
3529
|
/**
|
|
3750
3530
|
* @param {CatalogPlatformValidator.GetProductAttributesParam} arg - Arg object
|
|
3751
3531
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3752
3532
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3753
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3754
|
-
*
|
|
3755
|
-
*
|
|
3533
|
+
* @returns {Promise<CatalogPlatformModel.ProductAttributesResponse>} -
|
|
3534
|
+
* Success response
|
|
3756
3535
|
* @name getProductAttributes
|
|
3757
|
-
* @summary:
|
|
3758
|
-
* @description:
|
|
3536
|
+
* @summary: Get product attributes.
|
|
3537
|
+
* @description: List all the attributes by their L3 categories. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAttributes/).
|
|
3759
3538
|
*/
|
|
3760
3539
|
async getProductAttributes(
|
|
3761
3540
|
{ category, filter, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3798,7 +3577,7 @@ class Catalog {
|
|
|
3798
3577
|
const response = await PlatformAPIClient.execute(
|
|
3799
3578
|
this.config,
|
|
3800
3579
|
"get",
|
|
3801
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes
|
|
3580
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-attributes`,
|
|
3802
3581
|
query_params,
|
|
3803
3582
|
undefined,
|
|
3804
3583
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -3812,7 +3591,7 @@ class Catalog {
|
|
|
3812
3591
|
|
|
3813
3592
|
const {
|
|
3814
3593
|
error: res_error,
|
|
3815
|
-
} = CatalogPlatformModel.
|
|
3594
|
+
} = CatalogPlatformModel.ProductAttributesResponse().validate(
|
|
3816
3595
|
responseData,
|
|
3817
3596
|
{ abortEarly: false, allowUnknown: true }
|
|
3818
3597
|
);
|
|
@@ -3837,7 +3616,7 @@ class Catalog {
|
|
|
3837
3616
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3838
3617
|
* @returns {Promise<CatalogPlatformModel.ProductBulkRequestList>} - Success response
|
|
3839
3618
|
* @name getProductBulkUploadHistory
|
|
3840
|
-
* @summary:
|
|
3619
|
+
* @summary: Retrieve product bulk upload history.
|
|
3841
3620
|
* @description: Helps to get bulk product upload jobs data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBulkUploadHistory/).
|
|
3842
3621
|
*/
|
|
3843
3622
|
async getProductBulkUploadHistory(
|
|
@@ -3919,46 +3698,16 @@ class Catalog {
|
|
|
3919
3698
|
return response;
|
|
3920
3699
|
}
|
|
3921
3700
|
|
|
3922
|
-
/**
|
|
3923
|
-
* @param {Object} arg - Arg object.
|
|
3924
|
-
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
3925
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3926
|
-
* page. Default is 12.
|
|
3927
|
-
* @returns {Paginator<CatalogPlatformModel.ProductBulkRequestList>}
|
|
3928
|
-
* @summary: List product bulk upload history
|
|
3929
|
-
* @description: Helps to get bulk product upload jobs data.
|
|
3930
|
-
*/
|
|
3931
|
-
getProductBulkUploadHistoryPaginator({ search, pageSize } = {}) {
|
|
3932
|
-
const paginator = new Paginator();
|
|
3933
|
-
const callback = async () => {
|
|
3934
|
-
const pageId = paginator.nextId;
|
|
3935
|
-
const pageNo = paginator.pageNo;
|
|
3936
|
-
const pageType = "number";
|
|
3937
|
-
const data = await this.getProductBulkUploadHistory({
|
|
3938
|
-
search: search,
|
|
3939
|
-
pageNo: pageNo,
|
|
3940
|
-
pageSize: pageSize,
|
|
3941
|
-
});
|
|
3942
|
-
paginator.setPaginator({
|
|
3943
|
-
hasNext: data.page.has_next ? true : false,
|
|
3944
|
-
nextId: data.page.next_id,
|
|
3945
|
-
});
|
|
3946
|
-
return data;
|
|
3947
|
-
};
|
|
3948
|
-
paginator.setCallback(callback.bind(this));
|
|
3949
|
-
return paginator;
|
|
3950
|
-
}
|
|
3951
|
-
|
|
3952
3701
|
/**
|
|
3953
3702
|
* @param {CatalogPlatformValidator.GetProductBundleParam} arg - Arg object
|
|
3954
3703
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3955
3704
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3956
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3705
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleListingResponse>}
|
|
3957
3706
|
* - Success response
|
|
3958
3707
|
*
|
|
3959
3708
|
* @name getProductBundle
|
|
3960
|
-
* @summary:
|
|
3961
|
-
* @description: Retrieve a list of product bundles available in the catalog
|
|
3709
|
+
* @summary: Retrieve product bundles.
|
|
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/).
|
|
3962
3711
|
*/
|
|
3963
3712
|
async getProductBundle(
|
|
3964
3713
|
{ q, slug, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4007,7 +3756,7 @@ class Catalog {
|
|
|
4007
3756
|
const response = await PlatformAPIClient.execute(
|
|
4008
3757
|
this.config,
|
|
4009
3758
|
"get",
|
|
4010
|
-
`/service/platform/catalog/
|
|
3759
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/product-bundle`,
|
|
4011
3760
|
query_params,
|
|
4012
3761
|
undefined,
|
|
4013
3762
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4021,7 +3770,7 @@ class Catalog {
|
|
|
4021
3770
|
|
|
4022
3771
|
const {
|
|
4023
3772
|
error: res_error,
|
|
4024
|
-
} = CatalogPlatformModel.
|
|
3773
|
+
} = CatalogPlatformModel.GetProductBundleListingResponse().validate(
|
|
4025
3774
|
responseData,
|
|
4026
3775
|
{ abortEarly: false, allowUnknown: true }
|
|
4027
3776
|
);
|
|
@@ -4044,12 +3793,11 @@ class Catalog {
|
|
|
4044
3793
|
* @param {CatalogPlatformValidator.GetProductBundleDetailParam} arg - Arg object
|
|
4045
3794
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4046
3795
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4047
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4048
|
-
*
|
|
4049
|
-
*
|
|
3796
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleResponse>} -
|
|
3797
|
+
* Success response
|
|
4050
3798
|
* @name getProductBundleDetail
|
|
4051
|
-
* @summary: Get product bundle
|
|
4052
|
-
* @description: Retrieve detailed information about a specific product bundle
|
|
3799
|
+
* @summary: Get product bundle details.
|
|
3800
|
+
* @description: Retrieve detailed information about a specific product bundle. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundleDetail/).
|
|
4053
3801
|
*/
|
|
4054
3802
|
async getProductBundleDetail(
|
|
4055
3803
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4090,7 +3838,89 @@ class Catalog {
|
|
|
4090
3838
|
const response = await PlatformAPIClient.execute(
|
|
4091
3839
|
this.config,
|
|
4092
3840
|
"get",
|
|
4093
|
-
`/service/platform/catalog/
|
|
3841
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/product-bundle/${id}`,
|
|
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}`,
|
|
4094
3924
|
query_params,
|
|
4095
3925
|
undefined,
|
|
4096
3926
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4104,7 +3934,7 @@ class Catalog {
|
|
|
4104
3934
|
|
|
4105
3935
|
const {
|
|
4106
3936
|
error: res_error,
|
|
4107
|
-
} = CatalogPlatformModel.
|
|
3937
|
+
} = CatalogPlatformModel.GetProductDownloadsResponse().validate(
|
|
4108
3938
|
responseData,
|
|
4109
3939
|
{ abortEarly: false, allowUnknown: true }
|
|
4110
3940
|
);
|
|
@@ -4115,7 +3945,7 @@ class Catalog {
|
|
|
4115
3945
|
} else {
|
|
4116
3946
|
Logger({
|
|
4117
3947
|
level: "WARN",
|
|
4118
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3948
|
+
message: `Response Validation Warnings for platform > Catalog > getProductExportDetail \n ${res_error}`,
|
|
4119
3949
|
});
|
|
4120
3950
|
}
|
|
4121
3951
|
}
|
|
@@ -4127,12 +3957,11 @@ class Catalog {
|
|
|
4127
3957
|
* @param {CatalogPlatformValidator.GetProductExportJobsParam} arg - Arg object
|
|
4128
3958
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4129
3959
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4130
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4131
|
-
*
|
|
4132
|
-
*
|
|
3960
|
+
* @returns {Promise<CatalogPlatformModel.ProductDownloadsResponse>} -
|
|
3961
|
+
* Success response
|
|
4133
3962
|
* @name getProductExportJobs
|
|
4134
|
-
* @summary:
|
|
4135
|
-
* @description:
|
|
3963
|
+
* @summary: Retrieve product export jobs.
|
|
3964
|
+
* @description: View details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportJobs/).
|
|
4136
3965
|
*/
|
|
4137
3966
|
async getProductExportJobs(
|
|
4138
3967
|
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
@@ -4189,7 +4018,7 @@ class Catalog {
|
|
|
4189
4018
|
const response = await PlatformAPIClient.execute(
|
|
4190
4019
|
this.config,
|
|
4191
4020
|
"get",
|
|
4192
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads
|
|
4021
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads`,
|
|
4193
4022
|
query_params,
|
|
4194
4023
|
undefined,
|
|
4195
4024
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4203,10 +4032,10 @@ class Catalog {
|
|
|
4203
4032
|
|
|
4204
4033
|
const {
|
|
4205
4034
|
error: res_error,
|
|
4206
|
-
} = CatalogPlatformModel.
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
);
|
|
4035
|
+
} = CatalogPlatformModel.ProductDownloadsResponse().validate(responseData, {
|
|
4036
|
+
abortEarly: false,
|
|
4037
|
+
allowUnknown: true,
|
|
4038
|
+
});
|
|
4210
4039
|
|
|
4211
4040
|
if (res_error) {
|
|
4212
4041
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4226,24 +4055,18 @@ class Catalog {
|
|
|
4226
4055
|
* @param {CatalogPlatformValidator.GetProductSizeParam} arg - Arg object
|
|
4227
4056
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4228
4057
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4229
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4230
|
-
* Success response
|
|
4058
|
+
* @returns {Promise<CatalogPlatformModel.Product>} - Success response
|
|
4231
4059
|
* @name getProductSize
|
|
4232
|
-
* @summary:
|
|
4060
|
+
* @summary: Get product size details.
|
|
4233
4061
|
* @description: Retrieve data associated to a particular product size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductSize/).
|
|
4234
4062
|
*/
|
|
4235
4063
|
async getProductSize(
|
|
4236
|
-
{ itemId,
|
|
4237
|
-
requestHeaders: {},
|
|
4238
|
-
},
|
|
4064
|
+
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
4239
4065
|
{ responseHeaders } = { responseHeaders: false }
|
|
4240
4066
|
) {
|
|
4241
4067
|
const { error } = CatalogPlatformValidator.getProductSize().validate(
|
|
4242
4068
|
{
|
|
4243
4069
|
itemId,
|
|
4244
|
-
itemCode,
|
|
4245
|
-
brandUid,
|
|
4246
|
-
uid,
|
|
4247
4070
|
},
|
|
4248
4071
|
{ abortEarly: false, allowUnknown: true }
|
|
4249
4072
|
);
|
|
@@ -4257,9 +4080,6 @@ class Catalog {
|
|
|
4257
4080
|
} = CatalogPlatformValidator.getProductSize().validate(
|
|
4258
4081
|
{
|
|
4259
4082
|
itemId,
|
|
4260
|
-
itemCode,
|
|
4261
|
-
brandUid,
|
|
4262
|
-
uid,
|
|
4263
4083
|
},
|
|
4264
4084
|
{ abortEarly: false, allowUnknown: false }
|
|
4265
4085
|
);
|
|
@@ -4271,16 +4091,13 @@ class Catalog {
|
|
|
4271
4091
|
}
|
|
4272
4092
|
|
|
4273
4093
|
const query_params = {};
|
|
4274
|
-
query_params["item_code"] = itemCode;
|
|
4275
|
-
query_params["brand_uid"] = brandUid;
|
|
4276
|
-
query_params["uid"] = uid;
|
|
4277
4094
|
|
|
4278
4095
|
const xHeaders = {};
|
|
4279
4096
|
|
|
4280
4097
|
const response = await PlatformAPIClient.execute(
|
|
4281
4098
|
this.config,
|
|
4282
4099
|
"get",
|
|
4283
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes
|
|
4100
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes`,
|
|
4284
4101
|
query_params,
|
|
4285
4102
|
undefined,
|
|
4286
4103
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4294,10 +4111,10 @@ class Catalog {
|
|
|
4294
4111
|
|
|
4295
4112
|
const {
|
|
4296
4113
|
error: res_error,
|
|
4297
|
-
} = CatalogPlatformModel.
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
);
|
|
4114
|
+
} = CatalogPlatformModel.Product().validate(responseData, {
|
|
4115
|
+
abortEarly: false,
|
|
4116
|
+
allowUnknown: true,
|
|
4117
|
+
});
|
|
4301
4118
|
|
|
4302
4119
|
if (res_error) {
|
|
4303
4120
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4317,10 +4134,9 @@ class Catalog {
|
|
|
4317
4134
|
* @param {CatalogPlatformValidator.GetProductTagsParam} arg - Arg object
|
|
4318
4135
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4319
4136
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4320
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4321
|
-
* Success response
|
|
4137
|
+
* @returns {Promise<CatalogPlatformModel.ProductTagsViewResponse>} - Success response
|
|
4322
4138
|
* @name getProductTags
|
|
4323
|
-
* @summary:
|
|
4139
|
+
* @summary: Get product tags.
|
|
4324
4140
|
* @description: Retrieve tags data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTags/).
|
|
4325
4141
|
*/
|
|
4326
4142
|
async getProductTags(
|
|
@@ -4370,10 +4186,10 @@ class Catalog {
|
|
|
4370
4186
|
|
|
4371
4187
|
const {
|
|
4372
4188
|
error: res_error,
|
|
4373
|
-
} = CatalogPlatformModel.
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
);
|
|
4189
|
+
} = CatalogPlatformModel.ProductTagsViewResponse().validate(responseData, {
|
|
4190
|
+
abortEarly: false,
|
|
4191
|
+
allowUnknown: true,
|
|
4192
|
+
});
|
|
4377
4193
|
|
|
4378
4194
|
if (res_error) {
|
|
4379
4195
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4390,20 +4206,26 @@ class Catalog {
|
|
|
4390
4206
|
}
|
|
4391
4207
|
|
|
4392
4208
|
/**
|
|
4393
|
-
* @param {CatalogPlatformValidator.
|
|
4209
|
+
* @param {CatalogPlatformValidator.GetProductTemplateBySlugParam} arg - Arg object
|
|
4394
4210
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4395
4211
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4396
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4397
|
-
*
|
|
4398
|
-
*
|
|
4399
|
-
* @
|
|
4212
|
+
* @returns {Promise<CatalogPlatformModel.GetProductTemplateSlugResponse>}
|
|
4213
|
+
* - Success response
|
|
4214
|
+
*
|
|
4215
|
+
* @name getProductTemplateBySlug
|
|
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/).
|
|
4400
4218
|
*/
|
|
4401
|
-
async
|
|
4402
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
4219
|
+
async getProductTemplateBySlug(
|
|
4220
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
4403
4221
|
{ responseHeaders } = { responseHeaders: false }
|
|
4404
4222
|
) {
|
|
4405
|
-
const {
|
|
4406
|
-
|
|
4223
|
+
const {
|
|
4224
|
+
error,
|
|
4225
|
+
} = CatalogPlatformValidator.getProductTemplateBySlug().validate(
|
|
4226
|
+
{
|
|
4227
|
+
slug,
|
|
4228
|
+
},
|
|
4407
4229
|
{ abortEarly: false, allowUnknown: true }
|
|
4408
4230
|
);
|
|
4409
4231
|
if (error) {
|
|
@@ -4413,14 +4235,16 @@ class Catalog {
|
|
|
4413
4235
|
// Showing warrnings if extra unknown parameters are found
|
|
4414
4236
|
const {
|
|
4415
4237
|
error: warrning,
|
|
4416
|
-
} = CatalogPlatformValidator.
|
|
4417
|
-
{
|
|
4238
|
+
} = CatalogPlatformValidator.getProductTemplateBySlug().validate(
|
|
4239
|
+
{
|
|
4240
|
+
slug,
|
|
4241
|
+
},
|
|
4418
4242
|
{ abortEarly: false, allowUnknown: false }
|
|
4419
4243
|
);
|
|
4420
4244
|
if (warrning) {
|
|
4421
4245
|
Logger({
|
|
4422
4246
|
level: "WARN",
|
|
4423
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4247
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductTemplateBySlug \n ${warrning}`,
|
|
4424
4248
|
});
|
|
4425
4249
|
}
|
|
4426
4250
|
|
|
@@ -4431,7 +4255,7 @@ class Catalog {
|
|
|
4431
4255
|
const response = await PlatformAPIClient.execute(
|
|
4432
4256
|
this.config,
|
|
4433
4257
|
"get",
|
|
4434
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
4258
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}`,
|
|
4435
4259
|
query_params,
|
|
4436
4260
|
undefined,
|
|
4437
4261
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4445,10 +4269,10 @@ class Catalog {
|
|
|
4445
4269
|
|
|
4446
4270
|
const {
|
|
4447
4271
|
error: res_error,
|
|
4448
|
-
} = CatalogPlatformModel.
|
|
4449
|
-
|
|
4450
|
-
allowUnknown: true
|
|
4451
|
-
|
|
4272
|
+
} = CatalogPlatformModel.GetProductTemplateSlugResponse().validate(
|
|
4273
|
+
responseData,
|
|
4274
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4275
|
+
);
|
|
4452
4276
|
|
|
4453
4277
|
if (res_error) {
|
|
4454
4278
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4456,7 +4280,7 @@ class Catalog {
|
|
|
4456
4280
|
} else {
|
|
4457
4281
|
Logger({
|
|
4458
4282
|
level: "WARN",
|
|
4459
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4283
|
+
message: `Response Validation Warnings for platform > Catalog > getProductTemplateBySlug \n ${res_error}`,
|
|
4460
4284
|
});
|
|
4461
4285
|
}
|
|
4462
4286
|
}
|
|
@@ -4465,53 +4289,22 @@ class Catalog {
|
|
|
4465
4289
|
}
|
|
4466
4290
|
|
|
4467
4291
|
/**
|
|
4468
|
-
* @param {CatalogPlatformValidator.
|
|
4292
|
+
* @param {CatalogPlatformValidator.GetProductValidationParam} arg - Arg object
|
|
4469
4293
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4470
4294
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4471
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4472
|
-
*
|
|
4473
|
-
* @
|
|
4474
|
-
* @
|
|
4475
|
-
* @description: Retrieve a list of available products - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProducts/).
|
|
4295
|
+
* @returns {Promise<CatalogPlatformModel.ValidateProduct>} - Success response
|
|
4296
|
+
* @name getProductValidation
|
|
4297
|
+
* @summary: Get product validation.
|
|
4298
|
+
* @description: Retrieve validation data for a specific product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductValidation/).
|
|
4476
4299
|
*/
|
|
4477
|
-
async
|
|
4478
|
-
{
|
|
4479
|
-
brandIds,
|
|
4480
|
-
categoryIds,
|
|
4481
|
-
itemIds,
|
|
4482
|
-
departmentIds,
|
|
4483
|
-
itemCode,
|
|
4484
|
-
name,
|
|
4485
|
-
slug,
|
|
4486
|
-
allIdentifiers,
|
|
4487
|
-
q,
|
|
4488
|
-
tags,
|
|
4489
|
-
pageNo,
|
|
4490
|
-
pageSize,
|
|
4491
|
-
pageType,
|
|
4492
|
-
sortOn,
|
|
4493
|
-
pageId,
|
|
4494
|
-
requestHeaders,
|
|
4495
|
-
} = { requestHeaders: {} },
|
|
4300
|
+
async getProductValidation(
|
|
4301
|
+
{ type, slug, requestHeaders } = { requestHeaders: {} },
|
|
4496
4302
|
{ responseHeaders } = { responseHeaders: false }
|
|
4497
4303
|
) {
|
|
4498
|
-
const { error } = CatalogPlatformValidator.
|
|
4304
|
+
const { error } = CatalogPlatformValidator.getProductValidation().validate(
|
|
4499
4305
|
{
|
|
4500
|
-
|
|
4501
|
-
categoryIds,
|
|
4502
|
-
itemIds,
|
|
4503
|
-
departmentIds,
|
|
4504
|
-
itemCode,
|
|
4505
|
-
name,
|
|
4306
|
+
type,
|
|
4506
4307
|
slug,
|
|
4507
|
-
allIdentifiers,
|
|
4508
|
-
q,
|
|
4509
|
-
tags,
|
|
4510
|
-
pageNo,
|
|
4511
|
-
pageSize,
|
|
4512
|
-
pageType,
|
|
4513
|
-
sortOn,
|
|
4514
|
-
pageId,
|
|
4515
4308
|
},
|
|
4516
4309
|
{ abortEarly: false, allowUnknown: true }
|
|
4517
4310
|
);
|
|
@@ -4520,56 +4313,32 @@ class Catalog {
|
|
|
4520
4313
|
}
|
|
4521
4314
|
|
|
4522
4315
|
// Showing warrnings if extra unknown parameters are found
|
|
4523
|
-
const {
|
|
4316
|
+
const {
|
|
4317
|
+
error: warrning,
|
|
4318
|
+
} = CatalogPlatformValidator.getProductValidation().validate(
|
|
4524
4319
|
{
|
|
4525
|
-
|
|
4526
|
-
categoryIds,
|
|
4527
|
-
itemIds,
|
|
4528
|
-
departmentIds,
|
|
4529
|
-
itemCode,
|
|
4530
|
-
name,
|
|
4320
|
+
type,
|
|
4531
4321
|
slug,
|
|
4532
|
-
allIdentifiers,
|
|
4533
|
-
q,
|
|
4534
|
-
tags,
|
|
4535
|
-
pageNo,
|
|
4536
|
-
pageSize,
|
|
4537
|
-
pageType,
|
|
4538
|
-
sortOn,
|
|
4539
|
-
pageId,
|
|
4540
4322
|
},
|
|
4541
4323
|
{ abortEarly: false, allowUnknown: false }
|
|
4542
4324
|
);
|
|
4543
4325
|
if (warrning) {
|
|
4544
4326
|
Logger({
|
|
4545
4327
|
level: "WARN",
|
|
4546
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4328
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductValidation \n ${warrning}`,
|
|
4547
4329
|
});
|
|
4548
4330
|
}
|
|
4549
4331
|
|
|
4550
4332
|
const query_params = {};
|
|
4551
|
-
query_params["
|
|
4552
|
-
query_params["category_ids"] = categoryIds;
|
|
4553
|
-
query_params["item_ids"] = itemIds;
|
|
4554
|
-
query_params["department_ids"] = departmentIds;
|
|
4555
|
-
query_params["item_code"] = itemCode;
|
|
4556
|
-
query_params["name"] = name;
|
|
4333
|
+
query_params["type"] = type;
|
|
4557
4334
|
query_params["slug"] = slug;
|
|
4558
|
-
query_params["all_identifiers"] = allIdentifiers;
|
|
4559
|
-
query_params["q"] = q;
|
|
4560
|
-
query_params["tags"] = tags;
|
|
4561
|
-
query_params["page_no"] = pageNo;
|
|
4562
|
-
query_params["page_size"] = pageSize;
|
|
4563
|
-
query_params["page_type"] = pageType;
|
|
4564
|
-
query_params["sort_on"] = sortOn;
|
|
4565
|
-
query_params["page_id"] = pageId;
|
|
4566
4335
|
|
|
4567
4336
|
const xHeaders = {};
|
|
4568
4337
|
|
|
4569
4338
|
const response = await PlatformAPIClient.execute(
|
|
4570
4339
|
this.config,
|
|
4571
4340
|
"get",
|
|
4572
|
-
`/service/platform/catalog/
|
|
4341
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/validation`,
|
|
4573
4342
|
query_params,
|
|
4574
4343
|
undefined,
|
|
4575
4344
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4583,7 +4352,7 @@ class Catalog {
|
|
|
4583
4352
|
|
|
4584
4353
|
const {
|
|
4585
4354
|
error: res_error,
|
|
4586
|
-
} = CatalogPlatformModel.
|
|
4355
|
+
} = CatalogPlatformModel.ValidateProduct().validate(responseData, {
|
|
4587
4356
|
abortEarly: false,
|
|
4588
4357
|
allowUnknown: true,
|
|
4589
4358
|
});
|
|
@@ -4594,7 +4363,7 @@ class Catalog {
|
|
|
4594
4363
|
} else {
|
|
4595
4364
|
Logger({
|
|
4596
4365
|
level: "WARN",
|
|
4597
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4366
|
+
message: `Response Validation Warnings for platform > Catalog > getProductValidation \n ${res_error}`,
|
|
4598
4367
|
});
|
|
4599
4368
|
}
|
|
4600
4369
|
}
|
|
@@ -4603,91 +4372,26 @@ class Catalog {
|
|
|
4603
4372
|
}
|
|
4604
4373
|
|
|
4605
4374
|
/**
|
|
4606
|
-
* @param {
|
|
4607
|
-
*
|
|
4608
|
-
*
|
|
4609
|
-
* Category Ids
|
|
4610
|
-
* @param {number[]} [arg.itemIds] - Get multiple products filtered by Item Ids
|
|
4611
|
-
* @param {number[]} [arg.departmentIds] - Get multiple products filtered by
|
|
4612
|
-
* Department Ids
|
|
4613
|
-
* @param {string[]} [arg.itemCode] - Get multiple products filtered by Item Code
|
|
4614
|
-
* @param {string} [arg.name] - Get multiple products filtered by Name (Pattern Match)
|
|
4615
|
-
* @param {string} [arg.slug] - Get multiple products filtered by Slug
|
|
4616
|
-
* @param {string[]} [arg.allIdentifiers] - Get multiple products filtered
|
|
4617
|
-
* by All Identifiers
|
|
4618
|
-
* @param {string} [arg.q] - Get multiple products filtered by q string
|
|
4619
|
-
* @param {string[]} [arg.tags] - Get multiple products filtered by tags
|
|
4620
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
4621
|
-
* page. Default is 10.
|
|
4622
|
-
* @param {string} [arg.sortOn] - Field which is to be used for sorting,
|
|
4623
|
-
* default is latest. Value can be latest (modified_on) or created (record id)
|
|
4624
|
-
* @returns {Paginator<CatalogPlatformModel.ProductListingResponseV2>}
|
|
4625
|
-
* @summary: List products
|
|
4626
|
-
* @description: Retrieve a list of available products
|
|
4627
|
-
*/
|
|
4628
|
-
getProductsPaginator({
|
|
4629
|
-
brandIds,
|
|
4630
|
-
categoryIds,
|
|
4631
|
-
itemIds,
|
|
4632
|
-
departmentIds,
|
|
4633
|
-
itemCode,
|
|
4634
|
-
name,
|
|
4635
|
-
slug,
|
|
4636
|
-
allIdentifiers,
|
|
4637
|
-
q,
|
|
4638
|
-
tags,
|
|
4639
|
-
pageSize,
|
|
4640
|
-
sortOn,
|
|
4641
|
-
} = {}) {
|
|
4642
|
-
const paginator = new Paginator();
|
|
4643
|
-
const callback = async () => {
|
|
4644
|
-
const pageId = paginator.nextId;
|
|
4645
|
-
const pageNo = paginator.pageNo;
|
|
4646
|
-
const pageType = "cursor";
|
|
4647
|
-
const data = await this.getProducts({
|
|
4648
|
-
brandIds: brandIds,
|
|
4649
|
-
categoryIds: categoryIds,
|
|
4650
|
-
itemIds: itemIds,
|
|
4651
|
-
departmentIds: departmentIds,
|
|
4652
|
-
itemCode: itemCode,
|
|
4653
|
-
name: name,
|
|
4654
|
-
slug: slug,
|
|
4655
|
-
allIdentifiers: allIdentifiers,
|
|
4656
|
-
q: q,
|
|
4657
|
-
tags: tags,
|
|
4658
|
-
pageNo: pageNo,
|
|
4659
|
-
pageSize: pageSize,
|
|
4660
|
-
pageType: pageType,
|
|
4661
|
-
sortOn: sortOn,
|
|
4662
|
-
pageId: pageId,
|
|
4663
|
-
});
|
|
4664
|
-
paginator.setPaginator({
|
|
4665
|
-
hasNext: data.page.has_next ? true : false,
|
|
4666
|
-
nextId: data.page.next_id,
|
|
4667
|
-
});
|
|
4668
|
-
return data;
|
|
4669
|
-
};
|
|
4670
|
-
paginator.setCallback(callback.bind(this));
|
|
4671
|
-
return paginator;
|
|
4672
|
-
}
|
|
4673
|
-
|
|
4674
|
-
/**
|
|
4675
|
-
* @param {CatalogPlatformValidator.GetSellerInsightsParam} arg - Arg object
|
|
4375
|
+
* @param {CatalogPlatformValidator.GetProductVerificationDetailsParam} arg
|
|
4376
|
+
* - Arg object
|
|
4377
|
+
*
|
|
4676
4378
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4677
4379
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4678
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4380
|
+
* @returns {Promise<CatalogPlatformModel.ProductVerificationModel>} -
|
|
4679
4381
|
* Success response
|
|
4680
|
-
* @name
|
|
4681
|
-
* @summary: Get
|
|
4682
|
-
* @description:
|
|
4382
|
+
* @name getProductVerificationDetails
|
|
4383
|
+
* @summary: Get the verification detail of a product
|
|
4384
|
+
* @description: Get the verification detail of a product - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductVerificationDetails/).
|
|
4683
4385
|
*/
|
|
4684
|
-
async
|
|
4685
|
-
{
|
|
4386
|
+
async getProductVerificationDetails(
|
|
4387
|
+
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
4686
4388
|
{ responseHeaders } = { responseHeaders: false }
|
|
4687
4389
|
) {
|
|
4688
|
-
const {
|
|
4390
|
+
const {
|
|
4391
|
+
error,
|
|
4392
|
+
} = CatalogPlatformValidator.getProductVerificationDetails().validate(
|
|
4689
4393
|
{
|
|
4690
|
-
|
|
4394
|
+
itemId,
|
|
4691
4395
|
},
|
|
4692
4396
|
{ abortEarly: false, allowUnknown: true }
|
|
4693
4397
|
);
|
|
@@ -4698,16 +4402,16 @@ class Catalog {
|
|
|
4698
4402
|
// Showing warrnings if extra unknown parameters are found
|
|
4699
4403
|
const {
|
|
4700
4404
|
error: warrning,
|
|
4701
|
-
} = CatalogPlatformValidator.
|
|
4405
|
+
} = CatalogPlatformValidator.getProductVerificationDetails().validate(
|
|
4702
4406
|
{
|
|
4703
|
-
|
|
4407
|
+
itemId,
|
|
4704
4408
|
},
|
|
4705
4409
|
{ abortEarly: false, allowUnknown: false }
|
|
4706
4410
|
);
|
|
4707
4411
|
if (warrning) {
|
|
4708
4412
|
Logger({
|
|
4709
4413
|
level: "WARN",
|
|
4710
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4414
|
+
message: `Parameter Validation warrnings for platform > Catalog > getProductVerificationDetails \n ${warrning}`,
|
|
4711
4415
|
});
|
|
4712
4416
|
}
|
|
4713
4417
|
|
|
@@ -4718,7 +4422,7 @@ class Catalog {
|
|
|
4718
4422
|
const response = await PlatformAPIClient.execute(
|
|
4719
4423
|
this.config,
|
|
4720
4424
|
"get",
|
|
4721
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
4425
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/verification/products/${itemId}`,
|
|
4722
4426
|
query_params,
|
|
4723
4427
|
undefined,
|
|
4724
4428
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4732,10 +4436,231 @@ class Catalog {
|
|
|
4732
4436
|
|
|
4733
4437
|
const {
|
|
4734
4438
|
error: res_error,
|
|
4735
|
-
} = CatalogPlatformModel.
|
|
4736
|
-
|
|
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
|
+
},
|
|
4737
4617
|
{ abortEarly: false, allowUnknown: true }
|
|
4738
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(
|
|
4627
|
+
{
|
|
4628
|
+
sellerAppId,
|
|
4629
|
+
},
|
|
4630
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4631
|
+
);
|
|
4632
|
+
if (warrning) {
|
|
4633
|
+
Logger({
|
|
4634
|
+
level: "WARN",
|
|
4635
|
+
message: `Parameter Validation warrnings for platform > Catalog > getSellerInsights \n ${warrning}`,
|
|
4636
|
+
});
|
|
4637
|
+
}
|
|
4638
|
+
|
|
4639
|
+
const query_params = {};
|
|
4640
|
+
|
|
4641
|
+
const xHeaders = {};
|
|
4642
|
+
|
|
4643
|
+
const response = await PlatformAPIClient.execute(
|
|
4644
|
+
this.config,
|
|
4645
|
+
"get",
|
|
4646
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/cross-selling/${sellerAppId}/analytics/insights`,
|
|
4647
|
+
query_params,
|
|
4648
|
+
undefined,
|
|
4649
|
+
{ ...xHeaders, ...requestHeaders },
|
|
4650
|
+
{ responseHeaders }
|
|
4651
|
+
);
|
|
4652
|
+
|
|
4653
|
+
let responseData = response;
|
|
4654
|
+
if (responseHeaders) {
|
|
4655
|
+
responseData = response[0];
|
|
4656
|
+
}
|
|
4657
|
+
|
|
4658
|
+
const {
|
|
4659
|
+
error: res_error,
|
|
4660
|
+
} = CatalogPlatformModel.CrossSellingResponse().validate(responseData, {
|
|
4661
|
+
abortEarly: false,
|
|
4662
|
+
allowUnknown: true,
|
|
4663
|
+
});
|
|
4739
4664
|
|
|
4740
4665
|
if (res_error) {
|
|
4741
4666
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4757,8 +4682,8 @@ class Catalog {
|
|
|
4757
4682
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4758
4683
|
* @returns {Promise<CatalogPlatformModel.HSNDataInsertV2>} - Success response
|
|
4759
4684
|
* @name getSingleProductHSNCode
|
|
4760
|
-
* @summary: Get product HSN code
|
|
4761
|
-
* @description: Retrieve HSN
|
|
4685
|
+
* @summary: Get single product HSN code.
|
|
4686
|
+
* @description: Retrieve the HSN code for a single product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSingleProductHSNCode/).
|
|
4762
4687
|
*/
|
|
4763
4688
|
async getSingleProductHSNCode(
|
|
4764
4689
|
{ reportingHsn, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4832,19 +4757,17 @@ class Catalog {
|
|
|
4832
4757
|
* @param {CatalogPlatformValidator.GetSizeGuideParam} arg - Arg object
|
|
4833
4758
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4834
4759
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4835
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4760
|
+
* @returns {Promise<CatalogPlatformModel.SizeGuideResponse>} - Success response
|
|
4836
4761
|
* @name getSizeGuide
|
|
4837
|
-
* @summary: Get size guide
|
|
4838
|
-
* @description: Retrieve data associated about a specific size guide.
|
|
4762
|
+
* @summary: Get size guide details.
|
|
4763
|
+
* @description: Retrieve data associated about a specific size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuide/).
|
|
4839
4764
|
*/
|
|
4840
4765
|
async getSizeGuide(
|
|
4841
4766
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
4842
4767
|
{ responseHeaders } = { responseHeaders: false }
|
|
4843
4768
|
) {
|
|
4844
4769
|
const { error } = CatalogPlatformValidator.getSizeGuide().validate(
|
|
4845
|
-
{
|
|
4846
|
-
id,
|
|
4847
|
-
},
|
|
4770
|
+
{ id },
|
|
4848
4771
|
{ abortEarly: false, allowUnknown: true }
|
|
4849
4772
|
);
|
|
4850
4773
|
if (error) {
|
|
@@ -4855,9 +4778,7 @@ class Catalog {
|
|
|
4855
4778
|
const {
|
|
4856
4779
|
error: warrning,
|
|
4857
4780
|
} = CatalogPlatformValidator.getSizeGuide().validate(
|
|
4858
|
-
{
|
|
4859
|
-
id,
|
|
4860
|
-
},
|
|
4781
|
+
{ id },
|
|
4861
4782
|
{ abortEarly: false, allowUnknown: false }
|
|
4862
4783
|
);
|
|
4863
4784
|
if (warrning) {
|
|
@@ -4874,7 +4795,7 @@ class Catalog {
|
|
|
4874
4795
|
const response = await PlatformAPIClient.execute(
|
|
4875
4796
|
this.config,
|
|
4876
4797
|
"get",
|
|
4877
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}
|
|
4798
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}`,
|
|
4878
4799
|
query_params,
|
|
4879
4800
|
undefined,
|
|
4880
4801
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -4888,7 +4809,7 @@ class Catalog {
|
|
|
4888
4809
|
|
|
4889
4810
|
const {
|
|
4890
4811
|
error: res_error,
|
|
4891
|
-
} = CatalogPlatformModel.
|
|
4812
|
+
} = CatalogPlatformModel.SizeGuideResponse().validate(responseData, {
|
|
4892
4813
|
abortEarly: false,
|
|
4893
4814
|
allowUnknown: true,
|
|
4894
4815
|
});
|
|
@@ -4913,11 +4834,11 @@ class Catalog {
|
|
|
4913
4834
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4914
4835
|
* @returns {Promise<CatalogPlatformModel.ListSizeGuide>} - Success response
|
|
4915
4836
|
* @name getSizeGuides
|
|
4916
|
-
* @summary:
|
|
4917
|
-
* @description: Allows to view all the size guides associated to the seller.
|
|
4837
|
+
* @summary: Retrieve size guides.
|
|
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/).
|
|
4918
4839
|
*/
|
|
4919
4840
|
async getSizeGuides(
|
|
4920
|
-
{ active, q, tag, pageNo, pageSize,
|
|
4841
|
+
{ active, q, brandId, tag, pageNo, pageSize, requestHeaders } = {
|
|
4921
4842
|
requestHeaders: {},
|
|
4922
4843
|
},
|
|
4923
4844
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -4926,10 +4847,10 @@ class Catalog {
|
|
|
4926
4847
|
{
|
|
4927
4848
|
active,
|
|
4928
4849
|
q,
|
|
4850
|
+
brandId,
|
|
4929
4851
|
tag,
|
|
4930
4852
|
pageNo,
|
|
4931
4853
|
pageSize,
|
|
4932
|
-
brandId,
|
|
4933
4854
|
},
|
|
4934
4855
|
{ abortEarly: false, allowUnknown: true }
|
|
4935
4856
|
);
|
|
@@ -4944,10 +4865,10 @@ class Catalog {
|
|
|
4944
4865
|
{
|
|
4945
4866
|
active,
|
|
4946
4867
|
q,
|
|
4868
|
+
brandId,
|
|
4947
4869
|
tag,
|
|
4948
4870
|
pageNo,
|
|
4949
4871
|
pageSize,
|
|
4950
|
-
brandId,
|
|
4951
4872
|
},
|
|
4952
4873
|
{ abortEarly: false, allowUnknown: false }
|
|
4953
4874
|
);
|
|
@@ -4961,10 +4882,10 @@ class Catalog {
|
|
|
4961
4882
|
const query_params = {};
|
|
4962
4883
|
query_params["active"] = active;
|
|
4963
4884
|
query_params["q"] = q;
|
|
4885
|
+
query_params["brand_id"] = brandId;
|
|
4964
4886
|
query_params["tag"] = tag;
|
|
4965
4887
|
query_params["page_no"] = pageNo;
|
|
4966
4888
|
query_params["page_size"] = pageSize;
|
|
4967
|
-
query_params["brand_id"] = brandId;
|
|
4968
4889
|
|
|
4969
4890
|
const xHeaders = {};
|
|
4970
4891
|
|
|
@@ -5010,8 +4931,8 @@ class Catalog {
|
|
|
5010
4931
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5011
4932
|
* @returns {Promise<CatalogPlatformModel.OptinStoreDetails>} - Success response
|
|
5012
4933
|
* @name getStoreDetail
|
|
5013
|
-
* @summary: Get
|
|
5014
|
-
* @description:
|
|
4934
|
+
* @summary: Get the Store details.
|
|
4935
|
+
* @description: Get the details of the store associated with the company ID passed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getStoreDetail/).
|
|
5015
4936
|
*/
|
|
5016
4937
|
async getStoreDetail(
|
|
5017
4938
|
{ q, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5057,7 +4978,7 @@ class Catalog {
|
|
|
5057
4978
|
const response = await PlatformAPIClient.execute(
|
|
5058
4979
|
this.config,
|
|
5059
4980
|
"get",
|
|
5060
|
-
`/service/platform/catalog/
|
|
4981
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/marketplaces/location-details`,
|
|
5061
4982
|
query_params,
|
|
5062
4983
|
undefined,
|
|
5063
4984
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5091,43 +5012,92 @@ class Catalog {
|
|
|
5091
5012
|
}
|
|
5092
5013
|
|
|
5093
5014
|
/**
|
|
5094
|
-
* @param {
|
|
5095
|
-
* @param {
|
|
5096
|
-
* @param {
|
|
5097
|
-
*
|
|
5098
|
-
* @
|
|
5099
|
-
* @summary: Get
|
|
5100
|
-
* @description:
|
|
5015
|
+
* @param {CatalogPlatformValidator.GetVariantTypesParam} arg - Arg object
|
|
5016
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5017
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5018
|
+
* @returns {Promise<CatalogPlatformModel.VariantTypesResponse>} - Success response
|
|
5019
|
+
* @name getVariantTypes
|
|
5020
|
+
* @summary: Get variant type list
|
|
5021
|
+
* @description: This API gets meta associated to products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getVariantTypes/).
|
|
5101
5022
|
*/
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5023
|
+
async getVariantTypes(
|
|
5024
|
+
{ templateTag, requestHeaders } = { requestHeaders: {} },
|
|
5025
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5026
|
+
) {
|
|
5027
|
+
const { error } = CatalogPlatformValidator.getVariantTypes().validate(
|
|
5028
|
+
{
|
|
5029
|
+
templateTag,
|
|
5030
|
+
},
|
|
5031
|
+
{ abortEarly: false, allowUnknown: true }
|
|
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}`,
|
|
5116
5050
|
});
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5051
|
+
}
|
|
5052
|
+
|
|
5053
|
+
const query_params = {};
|
|
5054
|
+
query_params["template_tag"] = templateTag;
|
|
5055
|
+
|
|
5056
|
+
const xHeaders = {};
|
|
5057
|
+
|
|
5058
|
+
const response = await PlatformAPIClient.execute(
|
|
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;
|
|
5121
5092
|
}
|
|
5122
5093
|
|
|
5123
5094
|
/**
|
|
5124
5095
|
* @param {CatalogPlatformValidator.GetVariantsOfProductsParam} arg - Arg object
|
|
5125
5096
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5126
5097
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5127
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5128
|
-
* Success response
|
|
5098
|
+
* @returns {Promise<CatalogPlatformModel.ProductVariantsResponse>} - Success response
|
|
5129
5099
|
* @name getVariantsOfProducts
|
|
5130
|
-
* @summary: Get variants
|
|
5100
|
+
* @summary: Get variants of products.
|
|
5131
5101
|
* @description: Retrieve variants of a specific product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getVariantsOfProducts/).
|
|
5132
5102
|
*/
|
|
5133
5103
|
async getVariantsOfProducts(
|
|
@@ -5191,10 +5161,10 @@ class Catalog {
|
|
|
5191
5161
|
|
|
5192
5162
|
const {
|
|
5193
5163
|
error: res_error,
|
|
5194
|
-
} = CatalogPlatformModel.
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
);
|
|
5164
|
+
} = CatalogPlatformModel.ProductVariantsResponse().validate(responseData, {
|
|
5165
|
+
abortEarly: false,
|
|
5166
|
+
allowUnknown: true,
|
|
5167
|
+
});
|
|
5198
5168
|
|
|
5199
5169
|
if (res_error) {
|
|
5200
5170
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5210,49 +5180,17 @@ class Catalog {
|
|
|
5210
5180
|
return response;
|
|
5211
5181
|
}
|
|
5212
5182
|
|
|
5213
|
-
/**
|
|
5214
|
-
* @param {Object} arg - Arg object.
|
|
5215
|
-
* @param {number} arg.itemId - Get list of variants of item Id
|
|
5216
|
-
* @param {string} arg.variantType - Get multiple products filtered by variant type
|
|
5217
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
5218
|
-
* page. Default is 10.
|
|
5219
|
-
* @returns {Paginator<CatalogPlatformModel.ProductVariantsResponseSchema>}
|
|
5220
|
-
* @summary: Get variants
|
|
5221
|
-
* @description: Retrieve variants of a specific product.
|
|
5222
|
-
*/
|
|
5223
|
-
getVariantsOfProductsPaginator({ itemId, variantType, pageSize } = {}) {
|
|
5224
|
-
const paginator = new Paginator();
|
|
5225
|
-
const callback = async () => {
|
|
5226
|
-
const pageId = paginator.nextId;
|
|
5227
|
-
const pageNo = paginator.pageNo;
|
|
5228
|
-
const pageType = "number";
|
|
5229
|
-
const data = await this.getVariantsOfProducts({
|
|
5230
|
-
itemId: itemId,
|
|
5231
|
-
variantType: variantType,
|
|
5232
|
-
pageNo: pageNo,
|
|
5233
|
-
pageSize: pageSize,
|
|
5234
|
-
});
|
|
5235
|
-
paginator.setPaginator({
|
|
5236
|
-
hasNext: data.page.has_next ? true : false,
|
|
5237
|
-
nextId: data.page.next_id,
|
|
5238
|
-
});
|
|
5239
|
-
return data;
|
|
5240
|
-
};
|
|
5241
|
-
paginator.setCallback(callback.bind(this));
|
|
5242
|
-
return paginator;
|
|
5243
|
-
}
|
|
5244
|
-
|
|
5245
5183
|
/**
|
|
5246
5184
|
* @param {CatalogPlatformValidator.ListCategoriesParam} arg - Arg object
|
|
5247
5185
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5248
5186
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5249
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5187
|
+
* @returns {Promise<CatalogPlatformModel.CategoryResponse>} - Success response
|
|
5250
5188
|
* @name listCategories
|
|
5251
|
-
* @summary: List categories
|
|
5252
|
-
* @description: Retrieve a list of
|
|
5189
|
+
* @summary: List categories.
|
|
5190
|
+
* @description: Retrieve a list of meta associated available product categories in the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listCategories/).
|
|
5253
5191
|
*/
|
|
5254
5192
|
async listCategories(
|
|
5255
|
-
{ level, department, q, pageNo, pageSize, uids,
|
|
5193
|
+
{ level, department, q, pageNo, pageSize, uids, requestHeaders } = {
|
|
5256
5194
|
requestHeaders: {},
|
|
5257
5195
|
},
|
|
5258
5196
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5265,7 +5203,6 @@ class Catalog {
|
|
|
5265
5203
|
pageNo,
|
|
5266
5204
|
pageSize,
|
|
5267
5205
|
uids,
|
|
5268
|
-
slug,
|
|
5269
5206
|
},
|
|
5270
5207
|
{ abortEarly: false, allowUnknown: true }
|
|
5271
5208
|
);
|
|
@@ -5284,7 +5221,6 @@ class Catalog {
|
|
|
5284
5221
|
pageNo,
|
|
5285
5222
|
pageSize,
|
|
5286
5223
|
uids,
|
|
5287
|
-
slug,
|
|
5288
5224
|
},
|
|
5289
5225
|
{ abortEarly: false, allowUnknown: false }
|
|
5290
5226
|
);
|
|
@@ -5302,14 +5238,13 @@ class Catalog {
|
|
|
5302
5238
|
query_params["page_no"] = pageNo;
|
|
5303
5239
|
query_params["page_size"] = pageSize;
|
|
5304
5240
|
query_params["uids"] = uids;
|
|
5305
|
-
query_params["slug"] = slug;
|
|
5306
5241
|
|
|
5307
5242
|
const xHeaders = {};
|
|
5308
5243
|
|
|
5309
5244
|
const response = await PlatformAPIClient.execute(
|
|
5310
5245
|
this.config,
|
|
5311
5246
|
"get",
|
|
5312
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category
|
|
5247
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category`,
|
|
5313
5248
|
query_params,
|
|
5314
5249
|
undefined,
|
|
5315
5250
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5323,7 +5258,7 @@ class Catalog {
|
|
|
5323
5258
|
|
|
5324
5259
|
const {
|
|
5325
5260
|
error: res_error,
|
|
5326
|
-
} = CatalogPlatformModel.
|
|
5261
|
+
} = CatalogPlatformModel.CategoryResponse().validate(responseData, {
|
|
5327
5262
|
abortEarly: false,
|
|
5328
5263
|
allowUnknown: true,
|
|
5329
5264
|
});
|
|
@@ -5342,53 +5277,14 @@ class Catalog {
|
|
|
5342
5277
|
return response;
|
|
5343
5278
|
}
|
|
5344
5279
|
|
|
5345
|
-
/**
|
|
5346
|
-
* @param {Object} arg - Arg object.
|
|
5347
|
-
* @param {string} [arg.level] - Get category for multiple levels
|
|
5348
|
-
* @param {number} [arg.department] - Get category for multiple departments filtered
|
|
5349
|
-
* @param {string} [arg.q] - Get multiple categories filtered by search string
|
|
5350
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
5351
|
-
* page. Default is 10.
|
|
5352
|
-
* @param {number[]} [arg.uids] - Get multiple categories filtered by category uids.
|
|
5353
|
-
* @param {string} [arg.slug] - Get category by slug
|
|
5354
|
-
* @returns {Paginator<CatalogPlatformModel.CategoryResponseSchema>}
|
|
5355
|
-
* @summary: List categories
|
|
5356
|
-
* @description: Retrieve a list of categories data associated to a specific company and queries passed in the request.
|
|
5357
|
-
*/
|
|
5358
|
-
listCategoriesPaginator({ level, department, q, pageSize, uids, slug } = {}) {
|
|
5359
|
-
const paginator = new Paginator();
|
|
5360
|
-
const callback = async () => {
|
|
5361
|
-
const pageId = paginator.nextId;
|
|
5362
|
-
const pageNo = paginator.pageNo;
|
|
5363
|
-
const pageType = "number";
|
|
5364
|
-
const data = await this.listCategories({
|
|
5365
|
-
level: level,
|
|
5366
|
-
department: department,
|
|
5367
|
-
q: q,
|
|
5368
|
-
pageNo: pageNo,
|
|
5369
|
-
pageSize: pageSize,
|
|
5370
|
-
uids: uids,
|
|
5371
|
-
slug: slug,
|
|
5372
|
-
});
|
|
5373
|
-
paginator.setPaginator({
|
|
5374
|
-
hasNext: data.page.has_next ? true : false,
|
|
5375
|
-
nextId: data.page.next_id,
|
|
5376
|
-
});
|
|
5377
|
-
return data;
|
|
5378
|
-
};
|
|
5379
|
-
paginator.setCallback(callback.bind(this));
|
|
5380
|
-
return paginator;
|
|
5381
|
-
}
|
|
5382
|
-
|
|
5383
5280
|
/**
|
|
5384
5281
|
* @param {CatalogPlatformValidator.ListDepartmentsDataParam} arg - Arg object
|
|
5385
5282
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5386
5283
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5387
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5388
|
-
* Success response
|
|
5284
|
+
* @returns {Promise<CatalogPlatformModel.DepartmentsResponse>} - Success response
|
|
5389
5285
|
* @name listDepartmentsData
|
|
5390
|
-
* @summary: List
|
|
5391
|
-
* @description: Allows you to list all departments
|
|
5286
|
+
* @summary: List department data.
|
|
5287
|
+
* @description: Allows you to list all departments, also can search using name and filter active and incative departments, and item type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listDepartmentsData/).
|
|
5392
5288
|
*/
|
|
5393
5289
|
async listDepartmentsData(
|
|
5394
5290
|
{
|
|
@@ -5398,7 +5294,7 @@ class Catalog {
|
|
|
5398
5294
|
name,
|
|
5399
5295
|
search,
|
|
5400
5296
|
isActive,
|
|
5401
|
-
|
|
5297
|
+
uids,
|
|
5402
5298
|
requestHeaders,
|
|
5403
5299
|
} = { requestHeaders: {} },
|
|
5404
5300
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5411,7 +5307,7 @@ class Catalog {
|
|
|
5411
5307
|
name,
|
|
5412
5308
|
search,
|
|
5413
5309
|
isActive,
|
|
5414
|
-
|
|
5310
|
+
uids,
|
|
5415
5311
|
},
|
|
5416
5312
|
{ abortEarly: false, allowUnknown: true }
|
|
5417
5313
|
);
|
|
@@ -5430,7 +5326,7 @@ class Catalog {
|
|
|
5430
5326
|
name,
|
|
5431
5327
|
search,
|
|
5432
5328
|
isActive,
|
|
5433
|
-
|
|
5329
|
+
uids,
|
|
5434
5330
|
},
|
|
5435
5331
|
{ abortEarly: false, allowUnknown: false }
|
|
5436
5332
|
);
|
|
@@ -5448,14 +5344,14 @@ class Catalog {
|
|
|
5448
5344
|
query_params["name"] = name;
|
|
5449
5345
|
query_params["search"] = search;
|
|
5450
5346
|
query_params["is_active"] = isActive;
|
|
5451
|
-
query_params["
|
|
5347
|
+
query_params["uids"] = uids;
|
|
5452
5348
|
|
|
5453
5349
|
const xHeaders = {};
|
|
5454
5350
|
|
|
5455
5351
|
const response = await PlatformAPIClient.execute(
|
|
5456
5352
|
this.config,
|
|
5457
5353
|
"get",
|
|
5458
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments
|
|
5354
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments`,
|
|
5459
5355
|
query_params,
|
|
5460
5356
|
undefined,
|
|
5461
5357
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5469,10 +5365,10 @@ class Catalog {
|
|
|
5469
5365
|
|
|
5470
5366
|
const {
|
|
5471
5367
|
error: res_error,
|
|
5472
|
-
} = CatalogPlatformModel.
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
);
|
|
5368
|
+
} = CatalogPlatformModel.DepartmentsResponse().validate(responseData, {
|
|
5369
|
+
abortEarly: false,
|
|
5370
|
+
allowUnknown: true,
|
|
5371
|
+
});
|
|
5476
5372
|
|
|
5477
5373
|
if (res_error) {
|
|
5478
5374
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5488,62 +5384,14 @@ class Catalog {
|
|
|
5488
5384
|
return response;
|
|
5489
5385
|
}
|
|
5490
5386
|
|
|
5491
|
-
/**
|
|
5492
|
-
* @param {Object} arg - Arg object.
|
|
5493
|
-
* @param {string} [arg.itemType] - A `item_type` is a type of product eg.
|
|
5494
|
-
* set, standard, digital
|
|
5495
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
5496
|
-
* page. Default is 10.
|
|
5497
|
-
* @param {string} [arg.name] - Can search departments by passing name.
|
|
5498
|
-
* @param {string} [arg.search] - Can search departments by passing name of
|
|
5499
|
-
* the department in search parameter.
|
|
5500
|
-
* @param {boolean} [arg.isActive] - Can query for departments based on
|
|
5501
|
-
* whether they are active or inactive.
|
|
5502
|
-
* @param {string} [arg.slug] - Can filter by slug
|
|
5503
|
-
* @returns {Paginator<CatalogPlatformModel.DepartmentsResponseSchema>}
|
|
5504
|
-
* @summary: List company department
|
|
5505
|
-
* @description: Allows you to list all departments data for a specific company.
|
|
5506
|
-
*/
|
|
5507
|
-
listDepartmentsDataPaginator({
|
|
5508
|
-
itemType,
|
|
5509
|
-
pageSize,
|
|
5510
|
-
name,
|
|
5511
|
-
search,
|
|
5512
|
-
isActive,
|
|
5513
|
-
slug,
|
|
5514
|
-
} = {}) {
|
|
5515
|
-
const paginator = new Paginator();
|
|
5516
|
-
const callback = async () => {
|
|
5517
|
-
const pageId = paginator.nextId;
|
|
5518
|
-
const pageNo = paginator.pageNo;
|
|
5519
|
-
const pageType = "number";
|
|
5520
|
-
const data = await this.listDepartmentsData({
|
|
5521
|
-
pageNo: pageNo,
|
|
5522
|
-
itemType: itemType,
|
|
5523
|
-
pageSize: pageSize,
|
|
5524
|
-
name: name,
|
|
5525
|
-
search: search,
|
|
5526
|
-
isActive: isActive,
|
|
5527
|
-
slug: slug,
|
|
5528
|
-
});
|
|
5529
|
-
paginator.setPaginator({
|
|
5530
|
-
hasNext: data.page.has_next ? true : false,
|
|
5531
|
-
nextId: data.page.next_id,
|
|
5532
|
-
});
|
|
5533
|
-
return data;
|
|
5534
|
-
};
|
|
5535
|
-
paginator.setCallback(callback.bind(this));
|
|
5536
|
-
return paginator;
|
|
5537
|
-
}
|
|
5538
|
-
|
|
5539
5387
|
/**
|
|
5540
5388
|
* @param {CatalogPlatformValidator.ListHSNCodesParam} arg - Arg object
|
|
5541
5389
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5542
5390
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5543
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5391
|
+
* @returns {Promise<CatalogPlatformModel.HSNCodesResponse>} - Success response
|
|
5544
5392
|
* @name listHSNCodes
|
|
5545
|
-
* @summary: List HSN codes
|
|
5546
|
-
* @description: Retrieve a list of Harmonized System Nomenclature (HSN) codes
|
|
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/).
|
|
5547
5395
|
*/
|
|
5548
5396
|
async listHSNCodes(
|
|
5549
5397
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -5578,7 +5426,7 @@ class Catalog {
|
|
|
5578
5426
|
const response = await PlatformAPIClient.execute(
|
|
5579
5427
|
this.config,
|
|
5580
5428
|
"get",
|
|
5581
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/hsn
|
|
5429
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/hsn`,
|
|
5582
5430
|
query_params,
|
|
5583
5431
|
undefined,
|
|
5584
5432
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5592,7 +5440,7 @@ class Catalog {
|
|
|
5592
5440
|
|
|
5593
5441
|
const {
|
|
5594
5442
|
error: res_error,
|
|
5595
|
-
} = CatalogPlatformModel.
|
|
5443
|
+
} = CatalogPlatformModel.HSNCodesResponse().validate(responseData, {
|
|
5596
5444
|
abortEarly: false,
|
|
5597
5445
|
allowUnknown: true,
|
|
5598
5446
|
});
|
|
@@ -5615,12 +5463,12 @@ class Catalog {
|
|
|
5615
5463
|
* @param {CatalogPlatformValidator.ListInventoryExportParam} arg - Arg object
|
|
5616
5464
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5617
5465
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5618
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5466
|
+
* @returns {Promise<CatalogPlatformModel.InventoryExportJobListResponse>}
|
|
5619
5467
|
* - Success response
|
|
5620
5468
|
*
|
|
5621
5469
|
* @name listInventoryExport
|
|
5622
|
-
* @summary: List inventory
|
|
5623
|
-
* @description:
|
|
5470
|
+
* @summary: List inventory exports.
|
|
5471
|
+
* @description: Helps you the retrieve the history of inventory jobs depending on the filtered criteria. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listInventoryExport/).
|
|
5624
5472
|
*/
|
|
5625
5473
|
async listInventoryExport(
|
|
5626
5474
|
{ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders } = {
|
|
@@ -5677,176 +5525,7 @@ class Catalog {
|
|
|
5677
5525
|
const response = await PlatformAPIClient.execute(
|
|
5678
5526
|
this.config,
|
|
5679
5527
|
"get",
|
|
5680
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download
|
|
5681
|
-
query_params,
|
|
5682
|
-
undefined,
|
|
5683
|
-
{ ...xHeaders, ...requestHeaders },
|
|
5684
|
-
{ responseHeaders }
|
|
5685
|
-
);
|
|
5686
|
-
|
|
5687
|
-
let responseData = response;
|
|
5688
|
-
if (responseHeaders) {
|
|
5689
|
-
responseData = response[0];
|
|
5690
|
-
}
|
|
5691
|
-
|
|
5692
|
-
const {
|
|
5693
|
-
error: res_error,
|
|
5694
|
-
} = CatalogPlatformModel.InventoryExportJobListResponseSchema().validate(
|
|
5695
|
-
responseData,
|
|
5696
|
-
{ abortEarly: false, allowUnknown: true }
|
|
5697
|
-
);
|
|
5698
|
-
|
|
5699
|
-
if (res_error) {
|
|
5700
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
5701
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5702
|
-
} else {
|
|
5703
|
-
Logger({
|
|
5704
|
-
level: "WARN",
|
|
5705
|
-
message: `Response Validation Warnings for platform > Catalog > listInventoryExport \n ${res_error}`,
|
|
5706
|
-
});
|
|
5707
|
-
}
|
|
5708
|
-
}
|
|
5709
|
-
|
|
5710
|
-
return response;
|
|
5711
|
-
}
|
|
5712
|
-
|
|
5713
|
-
/**
|
|
5714
|
-
* @param {CatalogPlatformValidator.ListProductTemplateParam} arg - Arg object
|
|
5715
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5716
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5717
|
-
* @returns {Promise<CatalogPlatformModel.TemplatesResponseSchema>} - Success response
|
|
5718
|
-
* @name listProductTemplate
|
|
5719
|
-
* @summary: List product templates
|
|
5720
|
-
* @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/).
|
|
5721
|
-
*/
|
|
5722
|
-
async listProductTemplate(
|
|
5723
|
-
{ department, requestHeaders } = { requestHeaders: {} },
|
|
5724
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
5725
|
-
) {
|
|
5726
|
-
const { error } = CatalogPlatformValidator.listProductTemplate().validate(
|
|
5727
|
-
{
|
|
5728
|
-
department,
|
|
5729
|
-
},
|
|
5730
|
-
{ abortEarly: false, allowUnknown: true }
|
|
5731
|
-
);
|
|
5732
|
-
if (error) {
|
|
5733
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
5734
|
-
}
|
|
5735
|
-
|
|
5736
|
-
// Showing warrnings if extra unknown parameters are found
|
|
5737
|
-
const {
|
|
5738
|
-
error: warrning,
|
|
5739
|
-
} = CatalogPlatformValidator.listProductTemplate().validate(
|
|
5740
|
-
{
|
|
5741
|
-
department,
|
|
5742
|
-
},
|
|
5743
|
-
{ abortEarly: false, allowUnknown: false }
|
|
5744
|
-
);
|
|
5745
|
-
if (warrning) {
|
|
5746
|
-
Logger({
|
|
5747
|
-
level: "WARN",
|
|
5748
|
-
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplate \n ${warrning}`,
|
|
5749
|
-
});
|
|
5750
|
-
}
|
|
5751
|
-
|
|
5752
|
-
const query_params = {};
|
|
5753
|
-
query_params["department"] = department;
|
|
5754
|
-
|
|
5755
|
-
const xHeaders = {};
|
|
5756
|
-
|
|
5757
|
-
const response = await PlatformAPIClient.execute(
|
|
5758
|
-
this.config,
|
|
5759
|
-
"get",
|
|
5760
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/`,
|
|
5761
|
-
query_params,
|
|
5762
|
-
undefined,
|
|
5763
|
-
{ ...xHeaders, ...requestHeaders },
|
|
5764
|
-
{ responseHeaders }
|
|
5765
|
-
);
|
|
5766
|
-
|
|
5767
|
-
let responseData = response;
|
|
5768
|
-
if (responseHeaders) {
|
|
5769
|
-
responseData = response[0];
|
|
5770
|
-
}
|
|
5771
|
-
|
|
5772
|
-
const {
|
|
5773
|
-
error: res_error,
|
|
5774
|
-
} = CatalogPlatformModel.TemplatesResponseSchema().validate(responseData, {
|
|
5775
|
-
abortEarly: false,
|
|
5776
|
-
allowUnknown: true,
|
|
5777
|
-
});
|
|
5778
|
-
|
|
5779
|
-
if (res_error) {
|
|
5780
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
5781
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5782
|
-
} else {
|
|
5783
|
-
Logger({
|
|
5784
|
-
level: "WARN",
|
|
5785
|
-
message: `Response Validation Warnings for platform > Catalog > listProductTemplate \n ${res_error}`,
|
|
5786
|
-
});
|
|
5787
|
-
}
|
|
5788
|
-
}
|
|
5789
|
-
|
|
5790
|
-
return response;
|
|
5791
|
-
}
|
|
5792
|
-
|
|
5793
|
-
/**
|
|
5794
|
-
* @param {CatalogPlatformValidator.ListProductTemplateCategoriesParam} arg
|
|
5795
|
-
* - Arg object
|
|
5796
|
-
*
|
|
5797
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5798
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5799
|
-
* @returns {Promise<CatalogPlatformModel.ProdcutTemplateCategoriesResponseSchema>}
|
|
5800
|
-
* - Success response
|
|
5801
|
-
*
|
|
5802
|
-
* @name listProductTemplateCategories
|
|
5803
|
-
* @summary: List product template categories
|
|
5804
|
-
* @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/).
|
|
5805
|
-
*/
|
|
5806
|
-
async listProductTemplateCategories(
|
|
5807
|
-
{ departments, itemType, requestHeaders } = { requestHeaders: {} },
|
|
5808
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
5809
|
-
) {
|
|
5810
|
-
const {
|
|
5811
|
-
error,
|
|
5812
|
-
} = CatalogPlatformValidator.listProductTemplateCategories().validate(
|
|
5813
|
-
{
|
|
5814
|
-
departments,
|
|
5815
|
-
itemType,
|
|
5816
|
-
},
|
|
5817
|
-
{ abortEarly: false, allowUnknown: true }
|
|
5818
|
-
);
|
|
5819
|
-
if (error) {
|
|
5820
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
5821
|
-
}
|
|
5822
|
-
|
|
5823
|
-
// Showing warrnings if extra unknown parameters are found
|
|
5824
|
-
const {
|
|
5825
|
-
error: warrning,
|
|
5826
|
-
} = CatalogPlatformValidator.listProductTemplateCategories().validate(
|
|
5827
|
-
{
|
|
5828
|
-
departments,
|
|
5829
|
-
itemType,
|
|
5830
|
-
},
|
|
5831
|
-
{ abortEarly: false, allowUnknown: false }
|
|
5832
|
-
);
|
|
5833
|
-
if (warrning) {
|
|
5834
|
-
Logger({
|
|
5835
|
-
level: "WARN",
|
|
5836
|
-
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplateCategories \n ${warrning}`,
|
|
5837
|
-
});
|
|
5838
|
-
}
|
|
5839
|
-
|
|
5840
|
-
const query_params = {};
|
|
5841
|
-
query_params["departments"] = departments;
|
|
5842
|
-
query_params["item_type"] = itemType;
|
|
5843
|
-
|
|
5844
|
-
const xHeaders = {};
|
|
5845
|
-
|
|
5846
|
-
const response = await PlatformAPIClient.execute(
|
|
5847
|
-
this.config,
|
|
5848
|
-
"get",
|
|
5849
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/categories/`,
|
|
5528
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download`,
|
|
5850
5529
|
query_params,
|
|
5851
5530
|
undefined,
|
|
5852
5531
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5860,7 +5539,7 @@ class Catalog {
|
|
|
5860
5539
|
|
|
5861
5540
|
const {
|
|
5862
5541
|
error: res_error,
|
|
5863
|
-
} = CatalogPlatformModel.
|
|
5542
|
+
} = CatalogPlatformModel.InventoryExportJobListResponse().validate(
|
|
5864
5543
|
responseData,
|
|
5865
5544
|
{ abortEarly: false, allowUnknown: true }
|
|
5866
5545
|
);
|
|
@@ -5871,7 +5550,7 @@ class Catalog {
|
|
|
5871
5550
|
} else {
|
|
5872
5551
|
Logger({
|
|
5873
5552
|
level: "WARN",
|
|
5874
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5553
|
+
message: `Response Validation Warnings for platform > Catalog > listInventoryExport \n ${res_error}`,
|
|
5875
5554
|
});
|
|
5876
5555
|
}
|
|
5877
5556
|
}
|
|
@@ -5880,26 +5559,22 @@ class Catalog {
|
|
|
5880
5559
|
}
|
|
5881
5560
|
|
|
5882
5561
|
/**
|
|
5883
|
-
* @param {CatalogPlatformValidator.
|
|
5884
|
-
* - Arg object
|
|
5885
|
-
*
|
|
5562
|
+
* @param {CatalogPlatformValidator.ListProductTemplateParam} arg - Arg object
|
|
5886
5563
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5887
5564
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5888
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5889
|
-
*
|
|
5890
|
-
*
|
|
5891
|
-
* @
|
|
5892
|
-
* @summary: List export product templates
|
|
5893
|
-
* @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/).
|
|
5565
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesResponse>} - Success response
|
|
5566
|
+
* @name listProductTemplate
|
|
5567
|
+
* @summary: List product templates.
|
|
5568
|
+
* @description: Allows you to list all product templates, also can filter by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplate/).
|
|
5894
5569
|
*/
|
|
5895
|
-
async
|
|
5896
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
5570
|
+
async listProductTemplate(
|
|
5571
|
+
{ department, requestHeaders } = { requestHeaders: {} },
|
|
5897
5572
|
{ responseHeaders } = { responseHeaders: false }
|
|
5898
5573
|
) {
|
|
5899
|
-
const {
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5574
|
+
const { error } = CatalogPlatformValidator.listProductTemplate().validate(
|
|
5575
|
+
{
|
|
5576
|
+
department,
|
|
5577
|
+
},
|
|
5903
5578
|
{ abortEarly: false, allowUnknown: true }
|
|
5904
5579
|
);
|
|
5905
5580
|
if (error) {
|
|
@@ -5909,25 +5584,28 @@ class Catalog {
|
|
|
5909
5584
|
// Showing warrnings if extra unknown parameters are found
|
|
5910
5585
|
const {
|
|
5911
5586
|
error: warrning,
|
|
5912
|
-
} = CatalogPlatformValidator.
|
|
5913
|
-
{
|
|
5587
|
+
} = CatalogPlatformValidator.listProductTemplate().validate(
|
|
5588
|
+
{
|
|
5589
|
+
department,
|
|
5590
|
+
},
|
|
5914
5591
|
{ abortEarly: false, allowUnknown: false }
|
|
5915
5592
|
);
|
|
5916
5593
|
if (warrning) {
|
|
5917
5594
|
Logger({
|
|
5918
5595
|
level: "WARN",
|
|
5919
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5596
|
+
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplate \n ${warrning}`,
|
|
5920
5597
|
});
|
|
5921
5598
|
}
|
|
5922
5599
|
|
|
5923
5600
|
const query_params = {};
|
|
5601
|
+
query_params["department"] = department;
|
|
5924
5602
|
|
|
5925
5603
|
const xHeaders = {};
|
|
5926
5604
|
|
|
5927
5605
|
const response = await PlatformAPIClient.execute(
|
|
5928
5606
|
this.config,
|
|
5929
5607
|
"get",
|
|
5930
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
5608
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates`,
|
|
5931
5609
|
query_params,
|
|
5932
5610
|
undefined,
|
|
5933
5611
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -5941,10 +5619,10 @@ class Catalog {
|
|
|
5941
5619
|
|
|
5942
5620
|
const {
|
|
5943
5621
|
error: res_error,
|
|
5944
|
-
} = CatalogPlatformModel.
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
);
|
|
5622
|
+
} = CatalogPlatformModel.TemplatesResponse().validate(responseData, {
|
|
5623
|
+
abortEarly: false,
|
|
5624
|
+
allowUnknown: true,
|
|
5625
|
+
});
|
|
5948
5626
|
|
|
5949
5627
|
if (res_error) {
|
|
5950
5628
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5952,7 +5630,7 @@ class Catalog {
|
|
|
5952
5630
|
} else {
|
|
5953
5631
|
Logger({
|
|
5954
5632
|
level: "WARN",
|
|
5955
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5633
|
+
message: `Response Validation Warnings for platform > Catalog > listProductTemplate \n ${res_error}`,
|
|
5956
5634
|
});
|
|
5957
5635
|
}
|
|
5958
5636
|
}
|
|
@@ -5961,26 +5639,33 @@ class Catalog {
|
|
|
5961
5639
|
}
|
|
5962
5640
|
|
|
5963
5641
|
/**
|
|
5964
|
-
* @param {CatalogPlatformValidator.
|
|
5642
|
+
* @param {CatalogPlatformValidator.ListProductTemplateCategoriesParam} arg
|
|
5643
|
+
* - Arg object
|
|
5644
|
+
*
|
|
5965
5645
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5966
5646
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5967
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5968
|
-
* Success response
|
|
5969
|
-
*
|
|
5970
|
-
* @
|
|
5971
|
-
* @
|
|
5647
|
+
* @returns {Promise<CatalogPlatformModel.ProdcutTemplateCategoriesResponse>}
|
|
5648
|
+
* - Success response
|
|
5649
|
+
*
|
|
5650
|
+
* @name listProductTemplateCategories
|
|
5651
|
+
* @summary: List product template categories.
|
|
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/).
|
|
5972
5653
|
*/
|
|
5973
|
-
async
|
|
5974
|
-
{
|
|
5654
|
+
async listProductTemplateCategories(
|
|
5655
|
+
{ departments, itemType, pageSize, pageNo, q, requestHeaders } = {
|
|
5656
|
+
requestHeaders: {},
|
|
5657
|
+
},
|
|
5975
5658
|
{ responseHeaders } = { responseHeaders: false }
|
|
5976
5659
|
) {
|
|
5977
5660
|
const {
|
|
5978
5661
|
error,
|
|
5979
|
-
} = CatalogPlatformValidator.
|
|
5662
|
+
} = CatalogPlatformValidator.listProductTemplateCategories().validate(
|
|
5980
5663
|
{
|
|
5981
|
-
|
|
5982
|
-
templateTag,
|
|
5664
|
+
departments,
|
|
5983
5665
|
itemType,
|
|
5666
|
+
pageSize,
|
|
5667
|
+
pageNo,
|
|
5668
|
+
q,
|
|
5984
5669
|
},
|
|
5985
5670
|
{ abortEarly: false, allowUnknown: true }
|
|
5986
5671
|
);
|
|
@@ -5991,32 +5676,36 @@ class Catalog {
|
|
|
5991
5676
|
// Showing warrnings if extra unknown parameters are found
|
|
5992
5677
|
const {
|
|
5993
5678
|
error: warrning,
|
|
5994
|
-
} = CatalogPlatformValidator.
|
|
5679
|
+
} = CatalogPlatformValidator.listProductTemplateCategories().validate(
|
|
5995
5680
|
{
|
|
5996
|
-
|
|
5997
|
-
templateTag,
|
|
5681
|
+
departments,
|
|
5998
5682
|
itemType,
|
|
5683
|
+
pageSize,
|
|
5684
|
+
pageNo,
|
|
5685
|
+
q,
|
|
5999
5686
|
},
|
|
6000
5687
|
{ abortEarly: false, allowUnknown: false }
|
|
6001
5688
|
);
|
|
6002
5689
|
if (warrning) {
|
|
6003
5690
|
Logger({
|
|
6004
5691
|
level: "WARN",
|
|
6005
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5692
|
+
message: `Parameter Validation warrnings for platform > Catalog > listProductTemplateCategories \n ${warrning}`,
|
|
6006
5693
|
});
|
|
6007
5694
|
}
|
|
6008
5695
|
|
|
6009
5696
|
const query_params = {};
|
|
6010
|
-
query_params["
|
|
6011
|
-
query_params["template_tag"] = templateTag;
|
|
5697
|
+
query_params["departments"] = departments;
|
|
6012
5698
|
query_params["item_type"] = itemType;
|
|
5699
|
+
query_params["page_size"] = pageSize;
|
|
5700
|
+
query_params["page_no"] = pageNo;
|
|
5701
|
+
query_params["q"] = q;
|
|
6013
5702
|
|
|
6014
5703
|
const xHeaders = {};
|
|
6015
5704
|
|
|
6016
5705
|
const response = await PlatformAPIClient.execute(
|
|
6017
5706
|
this.config,
|
|
6018
5707
|
"get",
|
|
6019
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
5708
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/categories`,
|
|
6020
5709
|
query_params,
|
|
6021
5710
|
undefined,
|
|
6022
5711
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6030,7 +5719,7 @@ class Catalog {
|
|
|
6030
5719
|
|
|
6031
5720
|
const {
|
|
6032
5721
|
error: res_error,
|
|
6033
|
-
} = CatalogPlatformModel.
|
|
5722
|
+
} = CatalogPlatformModel.ProdcutTemplateCategoriesResponse().validate(
|
|
6034
5723
|
responseData,
|
|
6035
5724
|
{ abortEarly: false, allowUnknown: true }
|
|
6036
5725
|
);
|
|
@@ -6041,7 +5730,7 @@ class Catalog {
|
|
|
6041
5730
|
} else {
|
|
6042
5731
|
Logger({
|
|
6043
5732
|
level: "WARN",
|
|
6044
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5733
|
+
message: `Response Validation Warnings for platform > Catalog > listProductTemplateCategories \n ${res_error}`,
|
|
6045
5734
|
});
|
|
6046
5735
|
}
|
|
6047
5736
|
}
|
|
@@ -6050,22 +5739,26 @@ class Catalog {
|
|
|
6050
5739
|
}
|
|
6051
5740
|
|
|
6052
5741
|
/**
|
|
6053
|
-
* @param {CatalogPlatformValidator.
|
|
5742
|
+
* @param {CatalogPlatformValidator.ListTemplateBrandTypeValuesParam} arg - Arg object
|
|
6054
5743
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6055
5744
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6056
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6057
|
-
*
|
|
6058
|
-
* @
|
|
6059
|
-
* @
|
|
5745
|
+
* @returns {Promise<CatalogPlatformModel.ProductConfigurationDownloads>} -
|
|
5746
|
+
* Success response
|
|
5747
|
+
* @name listTemplateBrandTypeValues
|
|
5748
|
+
* @summary: List template brand type values.
|
|
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/).
|
|
6060
5750
|
*/
|
|
6061
|
-
async
|
|
6062
|
-
{
|
|
5751
|
+
async listTemplateBrandTypeValues(
|
|
5752
|
+
{ filter, templateTag, itemType, requestHeaders } = { requestHeaders: {} },
|
|
6063
5753
|
{ responseHeaders } = { responseHeaders: false }
|
|
6064
5754
|
) {
|
|
6065
|
-
const {
|
|
5755
|
+
const {
|
|
5756
|
+
error,
|
|
5757
|
+
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
6066
5758
|
{
|
|
6067
|
-
|
|
6068
|
-
|
|
5759
|
+
filter,
|
|
5760
|
+
templateTag,
|
|
5761
|
+
itemType,
|
|
6069
5762
|
},
|
|
6070
5763
|
{ abortEarly: false, allowUnknown: true }
|
|
6071
5764
|
);
|
|
@@ -6076,30 +5769,34 @@ class Catalog {
|
|
|
6076
5769
|
// Showing warrnings if extra unknown parameters are found
|
|
6077
5770
|
const {
|
|
6078
5771
|
error: warrning,
|
|
6079
|
-
} = CatalogPlatformValidator.
|
|
5772
|
+
} = CatalogPlatformValidator.listTemplateBrandTypeValues().validate(
|
|
6080
5773
|
{
|
|
6081
|
-
|
|
6082
|
-
|
|
5774
|
+
filter,
|
|
5775
|
+
templateTag,
|
|
5776
|
+
itemType,
|
|
6083
5777
|
},
|
|
6084
5778
|
{ abortEarly: false, allowUnknown: false }
|
|
6085
5779
|
);
|
|
6086
5780
|
if (warrning) {
|
|
6087
5781
|
Logger({
|
|
6088
5782
|
level: "WARN",
|
|
6089
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5783
|
+
message: `Parameter Validation warrnings for platform > Catalog > listTemplateBrandTypeValues \n ${warrning}`,
|
|
6090
5784
|
});
|
|
6091
5785
|
}
|
|
6092
5786
|
|
|
6093
5787
|
const query_params = {};
|
|
5788
|
+
query_params["filter"] = filter;
|
|
5789
|
+
query_params["template_tag"] = templateTag;
|
|
5790
|
+
query_params["item_type"] = itemType;
|
|
6094
5791
|
|
|
6095
5792
|
const xHeaders = {};
|
|
6096
5793
|
|
|
6097
5794
|
const response = await PlatformAPIClient.execute(
|
|
6098
5795
|
this.config,
|
|
6099
|
-
"
|
|
6100
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
5796
|
+
"get",
|
|
5797
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/downloads/configuration`,
|
|
6101
5798
|
query_params,
|
|
6102
|
-
|
|
5799
|
+
undefined,
|
|
6103
5800
|
{ ...xHeaders, ...requestHeaders },
|
|
6104
5801
|
{ responseHeaders }
|
|
6105
5802
|
);
|
|
@@ -6111,10 +5808,10 @@ class Catalog {
|
|
|
6111
5808
|
|
|
6112
5809
|
const {
|
|
6113
5810
|
error: res_error,
|
|
6114
|
-
} = CatalogPlatformModel.
|
|
6115
|
-
|
|
6116
|
-
allowUnknown: true
|
|
6117
|
-
|
|
5811
|
+
} = CatalogPlatformModel.ProductConfigurationDownloads().validate(
|
|
5812
|
+
responseData,
|
|
5813
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5814
|
+
);
|
|
6118
5815
|
|
|
6119
5816
|
if (res_error) {
|
|
6120
5817
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6122,7 +5819,7 @@ class Catalog {
|
|
|
6122
5819
|
} else {
|
|
6123
5820
|
Logger({
|
|
6124
5821
|
level: "WARN",
|
|
6125
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5822
|
+
message: `Response Validation Warnings for platform > Catalog > listTemplateBrandTypeValues \n ${res_error}`,
|
|
6126
5823
|
});
|
|
6127
5824
|
}
|
|
6128
5825
|
}
|
|
@@ -6131,21 +5828,25 @@ class Catalog {
|
|
|
6131
5828
|
}
|
|
6132
5829
|
|
|
6133
5830
|
/**
|
|
6134
|
-
* @param {CatalogPlatformValidator.
|
|
5831
|
+
* @param {CatalogPlatformValidator.PatchInventoryExportDetailParam} arg - Arg object
|
|
6135
5832
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6136
5833
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6137
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6138
|
-
* Success response
|
|
6139
|
-
*
|
|
6140
|
-
* @
|
|
6141
|
-
* @
|
|
5834
|
+
* @returns {Promise<CatalogPlatformModel.EditInventoryDownloadsResponse>}
|
|
5835
|
+
* - Success response
|
|
5836
|
+
*
|
|
5837
|
+
* @name patchInventoryExportDetail
|
|
5838
|
+
* @summary: Edit notification_emails and status of export job.
|
|
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/).
|
|
6142
5840
|
*/
|
|
6143
|
-
async
|
|
6144
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
5841
|
+
async patchInventoryExportDetail(
|
|
5842
|
+
{ jobId, body, requestHeaders } = { requestHeaders: {} },
|
|
6145
5843
|
{ responseHeaders } = { responseHeaders: false }
|
|
6146
5844
|
) {
|
|
6147
|
-
const {
|
|
5845
|
+
const {
|
|
5846
|
+
error,
|
|
5847
|
+
} = CatalogPlatformValidator.patchInventoryExportDetail().validate(
|
|
6148
5848
|
{
|
|
5849
|
+
jobId,
|
|
6149
5850
|
body,
|
|
6150
5851
|
},
|
|
6151
5852
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6157,8 +5858,9 @@ class Catalog {
|
|
|
6157
5858
|
// Showing warrnings if extra unknown parameters are found
|
|
6158
5859
|
const {
|
|
6159
5860
|
error: warrning,
|
|
6160
|
-
} = CatalogPlatformValidator.
|
|
5861
|
+
} = CatalogPlatformValidator.patchInventoryExportDetail().validate(
|
|
6161
5862
|
{
|
|
5863
|
+
jobId,
|
|
6162
5864
|
body,
|
|
6163
5865
|
},
|
|
6164
5866
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6166,7 +5868,7 @@ class Catalog {
|
|
|
6166
5868
|
if (warrning) {
|
|
6167
5869
|
Logger({
|
|
6168
5870
|
level: "WARN",
|
|
6169
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5871
|
+
message: `Parameter Validation warrnings for platform > Catalog > patchInventoryExportDetail \n ${warrning}`,
|
|
6170
5872
|
});
|
|
6171
5873
|
}
|
|
6172
5874
|
|
|
@@ -6176,8 +5878,8 @@ class Catalog {
|
|
|
6176
5878
|
|
|
6177
5879
|
const response = await PlatformAPIClient.execute(
|
|
6178
5880
|
this.config,
|
|
6179
|
-
"
|
|
6180
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory
|
|
5881
|
+
"put",
|
|
5882
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/download/${jobId}`,
|
|
6181
5883
|
query_params,
|
|
6182
5884
|
body,
|
|
6183
5885
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6191,7 +5893,7 @@ class Catalog {
|
|
|
6191
5893
|
|
|
6192
5894
|
const {
|
|
6193
5895
|
error: res_error,
|
|
6194
|
-
} = CatalogPlatformModel.
|
|
5896
|
+
} = CatalogPlatformModel.EditInventoryDownloadsResponse().validate(
|
|
6195
5897
|
responseData,
|
|
6196
5898
|
{ abortEarly: false, allowUnknown: true }
|
|
6197
5899
|
);
|
|
@@ -6202,7 +5904,7 @@ class Catalog {
|
|
|
6202
5904
|
} else {
|
|
6203
5905
|
Logger({
|
|
6204
5906
|
level: "WARN",
|
|
6205
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5907
|
+
message: `Response Validation Warnings for platform > Catalog > patchInventoryExportDetail \n ${res_error}`,
|
|
6206
5908
|
});
|
|
6207
5909
|
}
|
|
6208
5910
|
}
|
|
@@ -6211,26 +5913,24 @@ class Catalog {
|
|
|
6211
5913
|
}
|
|
6212
5914
|
|
|
6213
5915
|
/**
|
|
6214
|
-
* @param {CatalogPlatformValidator.
|
|
5916
|
+
* @param {CatalogPlatformValidator.PatchProductExportDetailParam} arg - Arg object
|
|
6215
5917
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6216
5918
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6217
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6218
|
-
*
|
|
6219
|
-
*
|
|
6220
|
-
* @
|
|
6221
|
-
* @
|
|
6222
|
-
* @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/).
|
|
5919
|
+
* @returns {Promise<CatalogPlatformModel.PatchProductDownloadsResponse>} -
|
|
5920
|
+
* Success response
|
|
5921
|
+
* @name patchProductExportDetail
|
|
5922
|
+
* @summary: Edit notification_emails and status of export job.
|
|
5923
|
+
* @description: This API helps to edit notification_emails and status of export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/patchProductExportDetail/).
|
|
6223
5924
|
*/
|
|
6224
|
-
async
|
|
6225
|
-
{
|
|
6226
|
-
requestHeaders: {},
|
|
6227
|
-
},
|
|
5925
|
+
async patchProductExportDetail(
|
|
5926
|
+
{ jobId, body, requestHeaders } = { requestHeaders: {} },
|
|
6228
5927
|
{ responseHeaders } = { responseHeaders: false }
|
|
6229
5928
|
) {
|
|
6230
|
-
const {
|
|
5929
|
+
const {
|
|
5930
|
+
error,
|
|
5931
|
+
} = CatalogPlatformValidator.patchProductExportDetail().validate(
|
|
6231
5932
|
{
|
|
6232
|
-
|
|
6233
|
-
sellerIdentifier,
|
|
5933
|
+
jobId,
|
|
6234
5934
|
body,
|
|
6235
5935
|
},
|
|
6236
5936
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6242,10 +5942,9 @@ class Catalog {
|
|
|
6242
5942
|
// Showing warrnings if extra unknown parameters are found
|
|
6243
5943
|
const {
|
|
6244
5944
|
error: warrning,
|
|
6245
|
-
} = CatalogPlatformValidator.
|
|
5945
|
+
} = CatalogPlatformValidator.patchProductExportDetail().validate(
|
|
6246
5946
|
{
|
|
6247
|
-
|
|
6248
|
-
sellerIdentifier,
|
|
5947
|
+
jobId,
|
|
6249
5948
|
body,
|
|
6250
5949
|
},
|
|
6251
5950
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6253,7 +5952,7 @@ class Catalog {
|
|
|
6253
5952
|
if (warrning) {
|
|
6254
5953
|
Logger({
|
|
6255
5954
|
level: "WARN",
|
|
6256
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5955
|
+
message: `Parameter Validation warrnings for platform > Catalog > patchProductExportDetail \n ${warrning}`,
|
|
6257
5956
|
});
|
|
6258
5957
|
}
|
|
6259
5958
|
|
|
@@ -6263,8 +5962,8 @@ class Catalog {
|
|
|
6263
5962
|
|
|
6264
5963
|
const response = await PlatformAPIClient.execute(
|
|
6265
5964
|
this.config,
|
|
6266
|
-
"
|
|
6267
|
-
`/service/platform/catalog/
|
|
5965
|
+
"patch",
|
|
5966
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/downloads/${jobId}`,
|
|
6268
5967
|
query_params,
|
|
6269
5968
|
body,
|
|
6270
5969
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6278,7 +5977,7 @@ class Catalog {
|
|
|
6278
5977
|
|
|
6279
5978
|
const {
|
|
6280
5979
|
error: res_error,
|
|
6281
|
-
} = CatalogPlatformModel.
|
|
5980
|
+
} = CatalogPlatformModel.PatchProductDownloadsResponse().validate(
|
|
6282
5981
|
responseData,
|
|
6283
5982
|
{ abortEarly: false, allowUnknown: true }
|
|
6284
5983
|
);
|
|
@@ -6289,7 +5988,7 @@ class Catalog {
|
|
|
6289
5988
|
} else {
|
|
6290
5989
|
Logger({
|
|
6291
5990
|
level: "WARN",
|
|
6292
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5991
|
+
message: `Response Validation Warnings for platform > Catalog > patchProductExportDetail \n ${res_error}`,
|
|
6293
5992
|
});
|
|
6294
5993
|
}
|
|
6295
5994
|
}
|
|
@@ -6298,28 +5997,20 @@ class Catalog {
|
|
|
6298
5997
|
}
|
|
6299
5998
|
|
|
6300
5999
|
/**
|
|
6301
|
-
* @param {CatalogPlatformValidator.
|
|
6000
|
+
* @param {CatalogPlatformValidator.UpdateInventoriesParam} arg - Arg object
|
|
6302
6001
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6303
6002
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6304
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6305
|
-
*
|
|
6306
|
-
*
|
|
6307
|
-
* @
|
|
6308
|
-
* @summary: Update an Article Quantity
|
|
6309
|
-
* @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/).
|
|
6003
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponse>} - Success response
|
|
6004
|
+
* @name updateInventories
|
|
6005
|
+
* @summary: Update inventories.
|
|
6006
|
+
* @description: Allows to add Inventory for particular size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateInventories/).
|
|
6310
6007
|
*/
|
|
6311
|
-
async
|
|
6312
|
-
{
|
|
6313
|
-
requestHeaders: {},
|
|
6314
|
-
},
|
|
6008
|
+
async updateInventories(
|
|
6009
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
6315
6010
|
{ responseHeaders } = { responseHeaders: false }
|
|
6316
6011
|
) {
|
|
6317
|
-
const {
|
|
6318
|
-
error,
|
|
6319
|
-
} = CatalogPlatformValidator.updateLocationQuantity().validate(
|
|
6012
|
+
const { error } = CatalogPlatformValidator.updateInventories().validate(
|
|
6320
6013
|
{
|
|
6321
|
-
storeId,
|
|
6322
|
-
sellerIdentifier,
|
|
6323
6014
|
body,
|
|
6324
6015
|
},
|
|
6325
6016
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6331,10 +6022,8 @@ class Catalog {
|
|
|
6331
6022
|
// Showing warrnings if extra unknown parameters are found
|
|
6332
6023
|
const {
|
|
6333
6024
|
error: warrning,
|
|
6334
|
-
} = CatalogPlatformValidator.
|
|
6025
|
+
} = CatalogPlatformValidator.updateInventories().validate(
|
|
6335
6026
|
{
|
|
6336
|
-
storeId,
|
|
6337
|
-
sellerIdentifier,
|
|
6338
6027
|
body,
|
|
6339
6028
|
},
|
|
6340
6029
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6342,7 +6031,7 @@ class Catalog {
|
|
|
6342
6031
|
if (warrning) {
|
|
6343
6032
|
Logger({
|
|
6344
6033
|
level: "WARN",
|
|
6345
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
6034
|
+
message: `Parameter Validation warrnings for platform > Catalog > updateInventories \n ${warrning}`,
|
|
6346
6035
|
});
|
|
6347
6036
|
}
|
|
6348
6037
|
|
|
@@ -6353,7 +6042,7 @@ class Catalog {
|
|
|
6353
6042
|
const response = await PlatformAPIClient.execute(
|
|
6354
6043
|
this.config,
|
|
6355
6044
|
"post",
|
|
6356
|
-
`/service/platform/catalog/
|
|
6045
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory`,
|
|
6357
6046
|
query_params,
|
|
6358
6047
|
body,
|
|
6359
6048
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6367,10 +6056,10 @@ class Catalog {
|
|
|
6367
6056
|
|
|
6368
6057
|
const {
|
|
6369
6058
|
error: res_error,
|
|
6370
|
-
} = CatalogPlatformModel.
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
);
|
|
6059
|
+
} = CatalogPlatformModel.InventoryUpdateResponse().validate(responseData, {
|
|
6060
|
+
abortEarly: false,
|
|
6061
|
+
allowUnknown: true,
|
|
6062
|
+
});
|
|
6374
6063
|
|
|
6375
6064
|
if (res_error) {
|
|
6376
6065
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6378,7 +6067,7 @@ class Catalog {
|
|
|
6378
6067
|
} else {
|
|
6379
6068
|
Logger({
|
|
6380
6069
|
level: "WARN",
|
|
6381
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
6070
|
+
message: `Response Validation Warnings for platform > Catalog > updateInventories \n ${res_error}`,
|
|
6382
6071
|
});
|
|
6383
6072
|
}
|
|
6384
6073
|
}
|
|
@@ -6390,22 +6079,22 @@ class Catalog {
|
|
|
6390
6079
|
* @param {CatalogPlatformValidator.UpdateMarketplaceOptinParam} arg - Arg object
|
|
6391
6080
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6392
6081
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6393
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6082
|
+
* @returns {Promise<CatalogPlatformModel.UpdateMarketplaceOptinResponse>}
|
|
6394
6083
|
* - Success response
|
|
6395
6084
|
*
|
|
6396
6085
|
* @name updateMarketplaceOptin
|
|
6397
6086
|
* @summary: Update marketplace optin
|
|
6398
|
-
* @description:
|
|
6087
|
+
* @description: This API allows to update marketplace optin for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateMarketplaceOptin/).
|
|
6399
6088
|
*/
|
|
6400
6089
|
async updateMarketplaceOptin(
|
|
6401
|
-
{
|
|
6090
|
+
{ marketplace, body, requestHeaders } = { requestHeaders: {} },
|
|
6402
6091
|
{ responseHeaders } = { responseHeaders: false }
|
|
6403
6092
|
) {
|
|
6404
6093
|
const {
|
|
6405
6094
|
error,
|
|
6406
6095
|
} = CatalogPlatformValidator.updateMarketplaceOptin().validate(
|
|
6407
6096
|
{
|
|
6408
|
-
|
|
6097
|
+
marketplace,
|
|
6409
6098
|
body,
|
|
6410
6099
|
},
|
|
6411
6100
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6419,7 +6108,7 @@ class Catalog {
|
|
|
6419
6108
|
error: warrning,
|
|
6420
6109
|
} = CatalogPlatformValidator.updateMarketplaceOptin().validate(
|
|
6421
6110
|
{
|
|
6422
|
-
|
|
6111
|
+
marketplace,
|
|
6423
6112
|
body,
|
|
6424
6113
|
},
|
|
6425
6114
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6438,7 +6127,7 @@ class Catalog {
|
|
|
6438
6127
|
const response = await PlatformAPIClient.execute(
|
|
6439
6128
|
this.config,
|
|
6440
6129
|
"put",
|
|
6441
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${
|
|
6130
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplace}/opt-in`,
|
|
6442
6131
|
query_params,
|
|
6443
6132
|
body,
|
|
6444
6133
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6452,7 +6141,7 @@ class Catalog {
|
|
|
6452
6141
|
|
|
6453
6142
|
const {
|
|
6454
6143
|
error: res_error,
|
|
6455
|
-
} = CatalogPlatformModel.
|
|
6144
|
+
} = CatalogPlatformModel.UpdateMarketplaceOptinResponse().validate(
|
|
6456
6145
|
responseData,
|
|
6457
6146
|
{ abortEarly: false, allowUnknown: true }
|
|
6458
6147
|
);
|
|
@@ -6475,12 +6164,12 @@ class Catalog {
|
|
|
6475
6164
|
* @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object
|
|
6476
6165
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6477
6166
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6478
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6167
|
+
* @returns {Promise<CatalogPlatformModel.GetProductBundleCreateResponse>}
|
|
6479
6168
|
* - Success response
|
|
6480
6169
|
*
|
|
6481
6170
|
* @name updateProductBundle
|
|
6482
|
-
* @summary: Update product bundle
|
|
6483
|
-
* @description: Modify the details of an existing product bundle
|
|
6171
|
+
* @summary: Update a product bundle.
|
|
6172
|
+
* @description: Modify the details of an existing product bundle. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateProductBundle/).
|
|
6484
6173
|
*/
|
|
6485
6174
|
async updateProductBundle(
|
|
6486
6175
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6521,7 +6210,7 @@ class Catalog {
|
|
|
6521
6210
|
const response = await PlatformAPIClient.execute(
|
|
6522
6211
|
this.config,
|
|
6523
6212
|
"put",
|
|
6524
|
-
`/service/platform/catalog/
|
|
6213
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/product-bundle/${id}`,
|
|
6525
6214
|
query_params,
|
|
6526
6215
|
body,
|
|
6527
6216
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6535,7 +6224,7 @@ class Catalog {
|
|
|
6535
6224
|
|
|
6536
6225
|
const {
|
|
6537
6226
|
error: res_error,
|
|
6538
|
-
} = CatalogPlatformModel.
|
|
6227
|
+
} = CatalogPlatformModel.GetProductBundleCreateResponse().validate(
|
|
6539
6228
|
responseData,
|
|
6540
6229
|
{ abortEarly: false, allowUnknown: true }
|
|
6541
6230
|
);
|
|
@@ -6558,11 +6247,10 @@ class Catalog {
|
|
|
6558
6247
|
* @param {CatalogPlatformValidator.UpdateRealtimeInventoryParam} arg - Arg object
|
|
6559
6248
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6560
6249
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6561
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6562
|
-
* Success response
|
|
6250
|
+
* @returns {Promise<CatalogPlatformModel.InventoryUpdateResponse>} - Success response
|
|
6563
6251
|
* @name updateRealtimeInventory
|
|
6564
|
-
* @summary: Update
|
|
6565
|
-
* @description:
|
|
6252
|
+
* @summary: Update realtime inventory.
|
|
6253
|
+
* @description: Allows to add Inventory for particular size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateRealtimeInventory/).
|
|
6566
6254
|
*/
|
|
6567
6255
|
async updateRealtimeInventory(
|
|
6568
6256
|
{ itemId, sellerIdentifier, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6621,10 +6309,10 @@ class Catalog {
|
|
|
6621
6309
|
|
|
6622
6310
|
const {
|
|
6623
6311
|
error: res_error,
|
|
6624
|
-
} = CatalogPlatformModel.
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
);
|
|
6312
|
+
} = CatalogPlatformModel.InventoryUpdateResponse().validate(responseData, {
|
|
6313
|
+
abortEarly: false,
|
|
6314
|
+
allowUnknown: true,
|
|
6315
|
+
});
|
|
6628
6316
|
|
|
6629
6317
|
if (res_error) {
|
|
6630
6318
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -6644,10 +6332,10 @@ class Catalog {
|
|
|
6644
6332
|
* @param {CatalogPlatformValidator.UpdateSizeGuideParam} arg - Arg object
|
|
6645
6333
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6646
6334
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6647
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6335
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponse>} - Success response
|
|
6648
6336
|
* @name updateSizeGuide
|
|
6649
|
-
* @summary: Update size guide
|
|
6650
|
-
* @description: Allows to edit a
|
|
6337
|
+
* @summary: Update a size guide.
|
|
6338
|
+
* @description: Allows to edit a size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSizeGuide/).
|
|
6651
6339
|
*/
|
|
6652
6340
|
async updateSizeGuide(
|
|
6653
6341
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6688,7 +6376,7 @@ class Catalog {
|
|
|
6688
6376
|
const response = await PlatformAPIClient.execute(
|
|
6689
6377
|
this.config,
|
|
6690
6378
|
"put",
|
|
6691
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}
|
|
6379
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}`,
|
|
6692
6380
|
query_params,
|
|
6693
6381
|
body,
|
|
6694
6382
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6702,7 +6390,7 @@ class Catalog {
|
|
|
6702
6390
|
|
|
6703
6391
|
const {
|
|
6704
6392
|
error: res_error,
|
|
6705
|
-
} = CatalogPlatformModel.
|
|
6393
|
+
} = CatalogPlatformModel.SuccessResponse().validate(responseData, {
|
|
6706
6394
|
abortEarly: false,
|
|
6707
6395
|
allowUnknown: true,
|
|
6708
6396
|
});
|
|
@@ -6725,10 +6413,10 @@ class Catalog {
|
|
|
6725
6413
|
* @param {CatalogPlatformValidator.UploadBulkProductsParam} arg - Arg object
|
|
6726
6414
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6727
6415
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6728
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6416
|
+
* @returns {Promise<CatalogPlatformModel.ProductBulkResponse>} - Success response
|
|
6729
6417
|
* @name uploadBulkProducts
|
|
6730
|
-
* @summary: Upload bulk products
|
|
6731
|
-
* @description:
|
|
6418
|
+
* @summary: Upload bulk products.
|
|
6419
|
+
* @description: Helps to create a bulk products upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/uploadBulkProducts/).
|
|
6732
6420
|
*/
|
|
6733
6421
|
async uploadBulkProducts(
|
|
6734
6422
|
{ department, productType, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6787,7 +6475,7 @@ class Catalog {
|
|
|
6787
6475
|
|
|
6788
6476
|
const {
|
|
6789
6477
|
error: res_error,
|
|
6790
|
-
} = CatalogPlatformModel.
|
|
6478
|
+
} = CatalogPlatformModel.ProductBulkResponse().validate(responseData, {
|
|
6791
6479
|
abortEarly: false,
|
|
6792
6480
|
allowUnknown: true,
|
|
6793
6481
|
});
|
|
@@ -6806,105 +6494,15 @@ class Catalog {
|
|
|
6806
6494
|
return response;
|
|
6807
6495
|
}
|
|
6808
6496
|
|
|
6809
|
-
/**
|
|
6810
|
-
* @param {CatalogPlatformValidator.ValidateProductGlobalTemplateParam} arg
|
|
6811
|
-
* - Arg object
|
|
6812
|
-
*
|
|
6813
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6814
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6815
|
-
* @returns {Promise<CatalogPlatformModel.TemplatesGlobalValidationResponseSchema>}
|
|
6816
|
-
* - Success response
|
|
6817
|
-
*
|
|
6818
|
-
* @name validateProductGlobalTemplate
|
|
6819
|
-
* @summary: Validate product template
|
|
6820
|
-
* @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/).
|
|
6821
|
-
*/
|
|
6822
|
-
async validateProductGlobalTemplate(
|
|
6823
|
-
{ itemType, bulk, requestHeaders } = { requestHeaders: {} },
|
|
6824
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
6825
|
-
) {
|
|
6826
|
-
const {
|
|
6827
|
-
error,
|
|
6828
|
-
} = CatalogPlatformValidator.validateProductGlobalTemplate().validate(
|
|
6829
|
-
{
|
|
6830
|
-
itemType,
|
|
6831
|
-
bulk,
|
|
6832
|
-
},
|
|
6833
|
-
{ abortEarly: false, allowUnknown: true }
|
|
6834
|
-
);
|
|
6835
|
-
if (error) {
|
|
6836
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
6837
|
-
}
|
|
6838
|
-
|
|
6839
|
-
// Showing warrnings if extra unknown parameters are found
|
|
6840
|
-
const {
|
|
6841
|
-
error: warrning,
|
|
6842
|
-
} = CatalogPlatformValidator.validateProductGlobalTemplate().validate(
|
|
6843
|
-
{
|
|
6844
|
-
itemType,
|
|
6845
|
-
bulk,
|
|
6846
|
-
},
|
|
6847
|
-
{ abortEarly: false, allowUnknown: false }
|
|
6848
|
-
);
|
|
6849
|
-
if (warrning) {
|
|
6850
|
-
Logger({
|
|
6851
|
-
level: "WARN",
|
|
6852
|
-
message: `Parameter Validation warrnings for platform > Catalog > validateProductGlobalTemplate \n ${warrning}`,
|
|
6853
|
-
});
|
|
6854
|
-
}
|
|
6855
|
-
|
|
6856
|
-
const query_params = {};
|
|
6857
|
-
query_params["item_type"] = itemType;
|
|
6858
|
-
query_params["bulk"] = bulk;
|
|
6859
|
-
|
|
6860
|
-
const xHeaders = {};
|
|
6861
|
-
|
|
6862
|
-
const response = await PlatformAPIClient.execute(
|
|
6863
|
-
this.config,
|
|
6864
|
-
"get",
|
|
6865
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/validation/schema/`,
|
|
6866
|
-
query_params,
|
|
6867
|
-
undefined,
|
|
6868
|
-
{ ...xHeaders, ...requestHeaders },
|
|
6869
|
-
{ responseHeaders }
|
|
6870
|
-
);
|
|
6871
|
-
|
|
6872
|
-
let responseData = response;
|
|
6873
|
-
if (responseHeaders) {
|
|
6874
|
-
responseData = response[0];
|
|
6875
|
-
}
|
|
6876
|
-
|
|
6877
|
-
const {
|
|
6878
|
-
error: res_error,
|
|
6879
|
-
} = CatalogPlatformModel.TemplatesGlobalValidationResponseSchema().validate(
|
|
6880
|
-
responseData,
|
|
6881
|
-
{ abortEarly: false, allowUnknown: true }
|
|
6882
|
-
);
|
|
6883
|
-
|
|
6884
|
-
if (res_error) {
|
|
6885
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
6886
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
6887
|
-
} else {
|
|
6888
|
-
Logger({
|
|
6889
|
-
level: "WARN",
|
|
6890
|
-
message: `Response Validation Warnings for platform > Catalog > validateProductGlobalTemplate \n ${res_error}`,
|
|
6891
|
-
});
|
|
6892
|
-
}
|
|
6893
|
-
}
|
|
6894
|
-
|
|
6895
|
-
return response;
|
|
6896
|
-
}
|
|
6897
|
-
|
|
6898
6497
|
/**
|
|
6899
6498
|
* @param {CatalogPlatformValidator.ValidateProductTemplateParam} arg - Arg object
|
|
6900
6499
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6901
6500
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6902
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6903
|
-
*
|
|
6904
|
-
*
|
|
6501
|
+
* @returns {Promise<CatalogPlatformModel.TemplatesValidationResponse>} -
|
|
6502
|
+
* Success response
|
|
6905
6503
|
* @name validateProductTemplate
|
|
6906
|
-
* @summary: Validate product template
|
|
6907
|
-
* @description: Allows you to list all product templates validation values
|
|
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/).
|
|
6908
6506
|
*/
|
|
6909
6507
|
async validateProductTemplate(
|
|
6910
6508
|
{ slug, itemType, bulk, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6951,7 +6549,7 @@ class Catalog {
|
|
|
6951
6549
|
const response = await PlatformAPIClient.execute(
|
|
6952
6550
|
this.config,
|
|
6953
6551
|
"get",
|
|
6954
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/validation/schema
|
|
6552
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/${slug}/validation/schema`,
|
|
6955
6553
|
query_params,
|
|
6956
6554
|
undefined,
|
|
6957
6555
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -6965,7 +6563,7 @@ class Catalog {
|
|
|
6965
6563
|
|
|
6966
6564
|
const {
|
|
6967
6565
|
error: res_error,
|
|
6968
|
-
} = CatalogPlatformModel.
|
|
6566
|
+
} = CatalogPlatformModel.TemplatesValidationResponse().validate(
|
|
6969
6567
|
responseData,
|
|
6970
6568
|
{ abortEarly: false, allowUnknown: true }
|
|
6971
6569
|
);
|
|
@@ -6990,15 +6588,14 @@ class Catalog {
|
|
|
6990
6588
|
*
|
|
6991
6589
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6992
6590
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6993
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6994
|
-
*
|
|
6995
|
-
*
|
|
6591
|
+
* @returns {Promise<CatalogPlatformModel.InventoryValidationResponse>} -
|
|
6592
|
+
* Success response
|
|
6996
6593
|
* @name validateProductTemplateSchema
|
|
6997
|
-
* @summary: Validate product template schema
|
|
6998
|
-
* @description: Allows you to list all product templates validation values for all the fields present in the database
|
|
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/).
|
|
6999
6596
|
*/
|
|
7000
6597
|
async validateProductTemplateSchema(
|
|
7001
|
-
{ itemType, requestHeaders } = { requestHeaders: {} },
|
|
6598
|
+
{ itemType, bulk, requestHeaders } = { requestHeaders: {} },
|
|
7002
6599
|
{ responseHeaders } = { responseHeaders: false }
|
|
7003
6600
|
) {
|
|
7004
6601
|
const {
|
|
@@ -7006,6 +6603,7 @@ class Catalog {
|
|
|
7006
6603
|
} = CatalogPlatformValidator.validateProductTemplateSchema().validate(
|
|
7007
6604
|
{
|
|
7008
6605
|
itemType,
|
|
6606
|
+
bulk,
|
|
7009
6607
|
},
|
|
7010
6608
|
{ abortEarly: false, allowUnknown: true }
|
|
7011
6609
|
);
|
|
@@ -7019,6 +6617,7 @@ class Catalog {
|
|
|
7019
6617
|
} = CatalogPlatformValidator.validateProductTemplateSchema().validate(
|
|
7020
6618
|
{
|
|
7021
6619
|
itemType,
|
|
6620
|
+
bulk,
|
|
7022
6621
|
},
|
|
7023
6622
|
{ abortEarly: false, allowUnknown: false }
|
|
7024
6623
|
);
|
|
@@ -7031,13 +6630,14 @@ class Catalog {
|
|
|
7031
6630
|
|
|
7032
6631
|
const query_params = {};
|
|
7033
6632
|
query_params["item_type"] = itemType;
|
|
6633
|
+
query_params["bulk"] = bulk;
|
|
7034
6634
|
|
|
7035
6635
|
const xHeaders = {};
|
|
7036
6636
|
|
|
7037
6637
|
const response = await PlatformAPIClient.execute(
|
|
7038
6638
|
this.config,
|
|
7039
6639
|
"get",
|
|
7040
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/validation/schema
|
|
6640
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/templates/validation/schema`,
|
|
7041
6641
|
query_params,
|
|
7042
6642
|
undefined,
|
|
7043
6643
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -7051,7 +6651,7 @@ class Catalog {
|
|
|
7051
6651
|
|
|
7052
6652
|
const {
|
|
7053
6653
|
error: res_error,
|
|
7054
|
-
} = CatalogPlatformModel.
|
|
6654
|
+
} = CatalogPlatformModel.InventoryValidationResponse().validate(
|
|
7055
6655
|
responseData,
|
|
7056
6656
|
{ abortEarly: false, allowUnknown: true }
|
|
7057
6657
|
);
|