@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -26,7 +26,7 @@ class Catalog {
|
|
|
26
26
|
*
|
|
27
27
|
* @name addCollectionItems
|
|
28
28
|
* @summary: Create items in a collection
|
|
29
|
-
* @description: Adds items to a collection specified by its id - Check out [method documentation](https://
|
|
29
|
+
* @description: Adds items to a collection specified by its id - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/addCollectionItems/).
|
|
30
30
|
*/
|
|
31
31
|
async addCollectionItems(
|
|
32
32
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -109,7 +109,7 @@ class Catalog {
|
|
|
109
109
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
110
110
|
* @name createAppCategoryReturnConfiguration
|
|
111
111
|
* @summary: Create return configuration
|
|
112
|
-
* @description: Create Category level sales channel Return Configuration setttings - Check out [method documentation](https://
|
|
112
|
+
* @description: Create Category level sales channel Return Configuration setttings - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createAppCategoryReturnConfiguration/).
|
|
113
113
|
*/
|
|
114
114
|
async createAppCategoryReturnConfiguration(
|
|
115
115
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -190,7 +190,7 @@ class Catalog {
|
|
|
190
190
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
191
191
|
* @name createAppReturnConfiguration
|
|
192
192
|
* @summary: Create product return configuration
|
|
193
|
-
* @description: This allows you to configure all return-related settings, such as is_returnable and return window etc. for sales channel level - Check out [method documentation](https://
|
|
193
|
+
* @description: This allows you to configure all return-related settings, such as is_returnable and return window etc. for sales channel level - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createAppReturnConfiguration/).
|
|
194
194
|
*/
|
|
195
195
|
async createAppReturnConfiguration(
|
|
196
196
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -266,14 +266,25 @@ class Catalog {
|
|
|
266
266
|
* @param {CatalogPlatformApplicationValidator.CreateCollectionParam} arg - Arg object
|
|
267
267
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
268
268
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
269
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
270
|
-
* Success response
|
|
269
|
+
* @returns {Promise<CatalogPlatformModel.CollectionCreateResponseSchema>}
|
|
270
|
+
* - Success response
|
|
271
|
+
*
|
|
271
272
|
* @name createCollection
|
|
272
273
|
* @summary: Create a collection
|
|
273
|
-
* @description: Create a collection for a sales channel linked to a company. - Check out [method documentation](https://
|
|
274
|
+
* @description: Create a collection for a sales channel linked to a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createCollection/).
|
|
274
275
|
*/
|
|
275
276
|
async createCollection(
|
|
276
|
-
{
|
|
277
|
+
{
|
|
278
|
+
body,
|
|
279
|
+
q,
|
|
280
|
+
scheduleStatus,
|
|
281
|
+
type,
|
|
282
|
+
tags,
|
|
283
|
+
isActive,
|
|
284
|
+
pageNo,
|
|
285
|
+
pageSize,
|
|
286
|
+
requestHeaders,
|
|
287
|
+
} = { requestHeaders: {} },
|
|
277
288
|
{ responseHeaders } = { responseHeaders: false }
|
|
278
289
|
) {
|
|
279
290
|
const {
|
|
@@ -281,6 +292,13 @@ class Catalog {
|
|
|
281
292
|
} = CatalogPlatformApplicationValidator.createCollection().validate(
|
|
282
293
|
{
|
|
283
294
|
body,
|
|
295
|
+
q,
|
|
296
|
+
scheduleStatus,
|
|
297
|
+
type,
|
|
298
|
+
tags,
|
|
299
|
+
isActive,
|
|
300
|
+
pageNo,
|
|
301
|
+
pageSize,
|
|
284
302
|
},
|
|
285
303
|
{ abortEarly: false, allowUnknown: true }
|
|
286
304
|
);
|
|
@@ -294,6 +312,13 @@ class Catalog {
|
|
|
294
312
|
} = CatalogPlatformApplicationValidator.createCollection().validate(
|
|
295
313
|
{
|
|
296
314
|
body,
|
|
315
|
+
q,
|
|
316
|
+
scheduleStatus,
|
|
317
|
+
type,
|
|
318
|
+
tags,
|
|
319
|
+
isActive,
|
|
320
|
+
pageNo,
|
|
321
|
+
pageSize,
|
|
297
322
|
},
|
|
298
323
|
{ abortEarly: false, allowUnknown: false }
|
|
299
324
|
);
|
|
@@ -305,6 +330,13 @@ class Catalog {
|
|
|
305
330
|
}
|
|
306
331
|
|
|
307
332
|
const query_params = {};
|
|
333
|
+
query_params["q"] = q;
|
|
334
|
+
query_params["schedule_status"] = scheduleStatus;
|
|
335
|
+
query_params["type"] = type;
|
|
336
|
+
query_params["tags"] = tags;
|
|
337
|
+
query_params["is_active"] = isActive;
|
|
338
|
+
query_params["page_no"] = pageNo;
|
|
339
|
+
query_params["page_size"] = pageSize;
|
|
308
340
|
|
|
309
341
|
const response = await PlatformAPIClient.execute(
|
|
310
342
|
this.config,
|
|
@@ -323,10 +355,10 @@ class Catalog {
|
|
|
323
355
|
|
|
324
356
|
const {
|
|
325
357
|
error: res_error,
|
|
326
|
-
} = CatalogPlatformModel.
|
|
327
|
-
|
|
328
|
-
allowUnknown: true
|
|
329
|
-
|
|
358
|
+
} = CatalogPlatformModel.CollectionCreateResponseSchema().validate(
|
|
359
|
+
responseData,
|
|
360
|
+
{ abortEarly: false, allowUnknown: true }
|
|
361
|
+
);
|
|
330
362
|
|
|
331
363
|
if (res_error) {
|
|
332
364
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -352,7 +384,7 @@ class Catalog {
|
|
|
352
384
|
* Success response
|
|
353
385
|
* @name createConfigurationByType
|
|
354
386
|
* @summary: Create configuration
|
|
355
|
-
* @description: Add configuration details based on a specific type in the catalog for a company and an sales channel. - Check out [method documentation](https://
|
|
387
|
+
* @description: Add configuration details based on a specific type in the catalog for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createConfigurationByType/).
|
|
356
388
|
*/
|
|
357
389
|
async createConfigurationByType(
|
|
358
390
|
{ type, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -436,7 +468,7 @@ class Catalog {
|
|
|
436
468
|
* Success response
|
|
437
469
|
* @name createConfigurationProductListing
|
|
438
470
|
* @summary: Create product listing configuration
|
|
439
|
-
* @description: Add configuration for products & listing specific to a company and an sales channel. - Check out [method documentation](https://
|
|
471
|
+
* @description: Add configuration for products & listing specific to a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createConfigurationProductListing/).
|
|
440
472
|
*/
|
|
441
473
|
async createConfigurationProductListing(
|
|
442
474
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -514,12 +546,12 @@ class Catalog {
|
|
|
514
546
|
*
|
|
515
547
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
516
548
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
517
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
549
|
+
* @returns {Promise<CatalogPlatformModel.CreateAutocompleteWordsResponseSchema>}
|
|
518
550
|
* - Success response
|
|
519
551
|
*
|
|
520
552
|
* @name createCustomAutocompleteRule
|
|
521
553
|
* @summary: Create autocomplete configurations
|
|
522
|
-
* @description: Create custom autocomplete keyword configurations for a specific sales channel to map any endpoint with these keywords. - Check out [method documentation](https://
|
|
554
|
+
* @description: Create custom autocomplete keyword configurations for a specific sales channel to map any endpoint with these keywords. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createCustomAutocompleteRule/).
|
|
523
555
|
*/
|
|
524
556
|
async createCustomAutocompleteRule(
|
|
525
557
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -572,7 +604,7 @@ class Catalog {
|
|
|
572
604
|
|
|
573
605
|
const {
|
|
574
606
|
error: res_error,
|
|
575
|
-
} = CatalogPlatformModel.
|
|
607
|
+
} = CatalogPlatformModel.CreateAutocompleteWordsResponseSchema().validate(
|
|
576
608
|
responseData,
|
|
577
609
|
{ abortEarly: false, allowUnknown: true }
|
|
578
610
|
);
|
|
@@ -600,7 +632,7 @@ class Catalog {
|
|
|
600
632
|
* @returns {Promise<CatalogPlatformModel.GetSearchWordsData>} - Success response
|
|
601
633
|
* @name createCustomKeyword
|
|
602
634
|
* @summary: Create search keywords
|
|
603
|
-
* @description: Create a Custom Search Keywords for a specific company and sales channel allows you to map certail conditions with the keywords to give you ultimate results. - Check out [method documentation](https://
|
|
635
|
+
* @description: Create a Custom Search Keywords for a specific company and sales channel allows you to map certail conditions with the keywords to give you ultimate results. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createCustomKeyword/).
|
|
604
636
|
*/
|
|
605
637
|
async createCustomKeyword(
|
|
606
638
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -681,7 +713,7 @@ class Catalog {
|
|
|
681
713
|
* @returns {Promise<CatalogPlatformModel.AppConfigurationDetail>} - Success response
|
|
682
714
|
* @name createGroupConfiguration
|
|
683
715
|
* @summary: Create group configuration
|
|
684
|
-
* @description: Create group configuration for a specific config_type for a company and an sales channel. - Check out [method documentation](https://
|
|
716
|
+
* @description: Create group configuration for a specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createGroupConfiguration/).
|
|
685
717
|
*/
|
|
686
718
|
async createGroupConfiguration(
|
|
687
719
|
{ configType, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -764,7 +796,7 @@ class Catalog {
|
|
|
764
796
|
* @returns {Promise<CatalogPlatformModel.AppConfigurationsSort>} - Success response
|
|
765
797
|
* @name createListingConfiguration
|
|
766
798
|
* @summary: Create listing configuration
|
|
767
|
-
* @description: Add configuration for product catalog listing specific to a company and an sales channel. - Check out [method documentation](https://
|
|
799
|
+
* @description: Add configuration for product catalog listing specific to a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createListingConfiguration/).
|
|
768
800
|
*/
|
|
769
801
|
async createListingConfiguration(
|
|
770
802
|
{ configType, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -838,18 +870,100 @@ class Catalog {
|
|
|
838
870
|
return response;
|
|
839
871
|
}
|
|
840
872
|
|
|
873
|
+
/**
|
|
874
|
+
* @param {CatalogPlatformApplicationValidator.CreatePriceFactoryParam} arg
|
|
875
|
+
* - Arg object
|
|
876
|
+
*
|
|
877
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
878
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
879
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
880
|
+
* @name createPriceFactory
|
|
881
|
+
* @summary: Create a Price Factory for an Application
|
|
882
|
+
* @description: Creates a new price factory configuration for the specified application under a given company. A price factory allows defining region-based or international pricing strategies using fixed or percentage-based adjustments per currency.
|
|
883
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createPriceFactory/).
|
|
884
|
+
*/
|
|
885
|
+
async createPriceFactory(
|
|
886
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
887
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
888
|
+
) {
|
|
889
|
+
const {
|
|
890
|
+
error,
|
|
891
|
+
} = CatalogPlatformApplicationValidator.createPriceFactory().validate(
|
|
892
|
+
{
|
|
893
|
+
body,
|
|
894
|
+
},
|
|
895
|
+
{ abortEarly: false, allowUnknown: true }
|
|
896
|
+
);
|
|
897
|
+
if (error) {
|
|
898
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// Showing warrnings if extra unknown parameters are found
|
|
902
|
+
const {
|
|
903
|
+
error: warrning,
|
|
904
|
+
} = CatalogPlatformApplicationValidator.createPriceFactory().validate(
|
|
905
|
+
{
|
|
906
|
+
body,
|
|
907
|
+
},
|
|
908
|
+
{ abortEarly: false, allowUnknown: false }
|
|
909
|
+
);
|
|
910
|
+
if (warrning) {
|
|
911
|
+
Logger({
|
|
912
|
+
level: "WARN",
|
|
913
|
+
message: `Parameter Validation warrnings for platform > Catalog > createPriceFactory \n ${warrning}`,
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
const query_params = {};
|
|
918
|
+
|
|
919
|
+
const response = await PlatformAPIClient.execute(
|
|
920
|
+
this.config,
|
|
921
|
+
"post",
|
|
922
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price`,
|
|
923
|
+
query_params,
|
|
924
|
+
body,
|
|
925
|
+
requestHeaders,
|
|
926
|
+
{ responseHeaders }
|
|
927
|
+
);
|
|
928
|
+
|
|
929
|
+
let responseData = response;
|
|
930
|
+
if (responseHeaders) {
|
|
931
|
+
responseData = response[0];
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
const {
|
|
935
|
+
error: res_error,
|
|
936
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
937
|
+
abortEarly: false,
|
|
938
|
+
allowUnknown: true,
|
|
939
|
+
});
|
|
940
|
+
|
|
941
|
+
if (res_error) {
|
|
942
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
943
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
944
|
+
} else {
|
|
945
|
+
Logger({
|
|
946
|
+
level: "WARN",
|
|
947
|
+
message: `Response Validation Warnings for platform > Catalog > createPriceFactory \n ${res_error}`,
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
return response;
|
|
953
|
+
}
|
|
954
|
+
|
|
841
955
|
/**
|
|
842
956
|
* @param {CatalogPlatformApplicationValidator.CreateSearchConfigurationParam} arg
|
|
843
957
|
* - Arg object
|
|
844
958
|
*
|
|
845
959
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
846
960
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
847
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
961
|
+
* @returns {Promise<CatalogPlatformModel.CreateSearchConfigurationResponseSchema>}
|
|
848
962
|
* - Success response
|
|
849
963
|
*
|
|
850
964
|
* @name createSearchConfiguration
|
|
851
965
|
* @summary: Create search configuration
|
|
852
|
-
* @description: Create search configuration for the catalog for a specific company and sales channel. - Check out [method documentation](https://
|
|
966
|
+
* @description: Create search configuration for the catalog for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createSearchConfiguration/).
|
|
853
967
|
*/
|
|
854
968
|
async createSearchConfiguration(
|
|
855
969
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -902,7 +1016,7 @@ class Catalog {
|
|
|
902
1016
|
|
|
903
1017
|
const {
|
|
904
1018
|
error: res_error,
|
|
905
|
-
} = CatalogPlatformModel.
|
|
1019
|
+
} = CatalogPlatformModel.CreateSearchConfigurationResponseSchema().validate(
|
|
906
1020
|
responseData,
|
|
907
1021
|
{ abortEarly: false, allowUnknown: true }
|
|
908
1022
|
);
|
|
@@ -927,10 +1041,10 @@ class Catalog {
|
|
|
927
1041
|
*
|
|
928
1042
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
929
1043
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
930
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1044
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
931
1045
|
* @name deleteAppCategoryReturnConfiguration
|
|
932
1046
|
* @summary: Delete product return configuration
|
|
933
|
-
* @description: Delete Category level sales channel Return Configuration setttings - Check out [method documentation](https://
|
|
1047
|
+
* @description: Delete Category level sales channel Return Configuration setttings - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteAppCategoryReturnConfiguration/).
|
|
934
1048
|
*/
|
|
935
1049
|
async deleteAppCategoryReturnConfiguration(
|
|
936
1050
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -983,7 +1097,7 @@ class Catalog {
|
|
|
983
1097
|
|
|
984
1098
|
const {
|
|
985
1099
|
error: res_error,
|
|
986
|
-
} = CatalogPlatformModel.
|
|
1100
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
987
1101
|
abortEarly: false,
|
|
988
1102
|
allowUnknown: true,
|
|
989
1103
|
});
|
|
@@ -1008,10 +1122,10 @@ class Catalog {
|
|
|
1008
1122
|
*
|
|
1009
1123
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1010
1124
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1011
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1125
|
+
* @returns {Promise<CatalogPlatformModel.DeleteResponseSchema>} - Success response
|
|
1012
1126
|
* @name deleteAutocompleteKeyword
|
|
1013
1127
|
* @summary: Delete autocomplete keyword
|
|
1014
|
-
* @description: Delete custom autocomplete keyword configurations for a specific sales channel by its id. - Check out [method documentation](https://
|
|
1128
|
+
* @description: Delete custom autocomplete keyword configurations for a specific sales channel by its id. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteAutocompleteKeyword/).
|
|
1015
1129
|
*/
|
|
1016
1130
|
async deleteAutocompleteKeyword(
|
|
1017
1131
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1064,7 +1178,7 @@ class Catalog {
|
|
|
1064
1178
|
|
|
1065
1179
|
const {
|
|
1066
1180
|
error: res_error,
|
|
1067
|
-
} = CatalogPlatformModel.
|
|
1181
|
+
} = CatalogPlatformModel.DeleteResponseSchema().validate(responseData, {
|
|
1068
1182
|
abortEarly: false,
|
|
1069
1183
|
allowUnknown: true,
|
|
1070
1184
|
});
|
|
@@ -1092,7 +1206,7 @@ class Catalog {
|
|
|
1092
1206
|
*
|
|
1093
1207
|
* @name deleteCollection
|
|
1094
1208
|
* @summary: Delete a collection
|
|
1095
|
-
* @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully - Check out [method documentation](https://
|
|
1209
|
+
* @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteCollection/).
|
|
1096
1210
|
*/
|
|
1097
1211
|
async deleteCollection(
|
|
1098
1212
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1170,10 +1284,11 @@ class Catalog {
|
|
|
1170
1284
|
*
|
|
1171
1285
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1172
1286
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1173
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1287
|
+
* @returns {Promise<CatalogPlatformModel.ConfigSuccessResponseSchema>} -
|
|
1288
|
+
* Success response
|
|
1174
1289
|
* @name deleteGroupConfiguration
|
|
1175
1290
|
* @summary: Delete group configuration
|
|
1176
|
-
* @description: Delete group configurations by its slug for a specific config_type for a company and an sales channel. - Check out [method documentation](https://
|
|
1291
|
+
* @description: Delete group configurations by its slug for a specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteGroupConfiguration/).
|
|
1177
1292
|
*/
|
|
1178
1293
|
async deleteGroupConfiguration(
|
|
1179
1294
|
{ configType, groupSlug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1228,10 +1343,10 @@ class Catalog {
|
|
|
1228
1343
|
|
|
1229
1344
|
const {
|
|
1230
1345
|
error: res_error,
|
|
1231
|
-
} = CatalogPlatformModel.
|
|
1232
|
-
|
|
1233
|
-
allowUnknown: true
|
|
1234
|
-
|
|
1346
|
+
} = CatalogPlatformModel.ConfigSuccessResponseSchema().validate(
|
|
1347
|
+
responseData,
|
|
1348
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1349
|
+
);
|
|
1235
1350
|
|
|
1236
1351
|
if (res_error) {
|
|
1237
1352
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1253,10 +1368,11 @@ class Catalog {
|
|
|
1253
1368
|
*
|
|
1254
1369
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1255
1370
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1256
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1371
|
+
* @returns {Promise<CatalogPlatformModel.ConfigSuccessResponseSchema>} -
|
|
1372
|
+
* Success response
|
|
1257
1373
|
* @name deleteListingConfiguration
|
|
1258
1374
|
* @summary: Delete listing configuration
|
|
1259
|
-
* @description: Remove a specific product listing configuration by its config_id for a specific config_type for a company and an sales channel. - Check out [method documentation](https://
|
|
1375
|
+
* @description: Remove a specific product listing configuration by its config_id for a specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteListingConfiguration/).
|
|
1260
1376
|
*/
|
|
1261
1377
|
async deleteListingConfiguration(
|
|
1262
1378
|
{ configType, configId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1311,7 +1427,89 @@ class Catalog {
|
|
|
1311
1427
|
|
|
1312
1428
|
const {
|
|
1313
1429
|
error: res_error,
|
|
1314
|
-
} = CatalogPlatformModel.
|
|
1430
|
+
} = CatalogPlatformModel.ConfigSuccessResponseSchema().validate(
|
|
1431
|
+
responseData,
|
|
1432
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1433
|
+
);
|
|
1434
|
+
|
|
1435
|
+
if (res_error) {
|
|
1436
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1437
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1438
|
+
} else {
|
|
1439
|
+
Logger({
|
|
1440
|
+
level: "WARN",
|
|
1441
|
+
message: `Response Validation Warnings for platform > Catalog > deleteListingConfiguration \n ${res_error}`,
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
return response;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* @param {CatalogPlatformApplicationValidator.DeletePriceFactoryParam} arg
|
|
1451
|
+
* - Arg object
|
|
1452
|
+
*
|
|
1453
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1454
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1455
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
1456
|
+
* @name deletePriceFactory
|
|
1457
|
+
* @summary: Delete a Price Factory Configuration
|
|
1458
|
+
* @description: Deletes a specific price factory configuration associated with a given company and application. This action is typically irreversible and will remove the pricing logic tied to the specified price factory ID.
|
|
1459
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deletePriceFactory/).
|
|
1460
|
+
*/
|
|
1461
|
+
async deletePriceFactory(
|
|
1462
|
+
{ priceFactoryId, requestHeaders } = { requestHeaders: {} },
|
|
1463
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1464
|
+
) {
|
|
1465
|
+
const {
|
|
1466
|
+
error,
|
|
1467
|
+
} = CatalogPlatformApplicationValidator.deletePriceFactory().validate(
|
|
1468
|
+
{
|
|
1469
|
+
priceFactoryId,
|
|
1470
|
+
},
|
|
1471
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1472
|
+
);
|
|
1473
|
+
if (error) {
|
|
1474
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1478
|
+
const {
|
|
1479
|
+
error: warrning,
|
|
1480
|
+
} = CatalogPlatformApplicationValidator.deletePriceFactory().validate(
|
|
1481
|
+
{
|
|
1482
|
+
priceFactoryId,
|
|
1483
|
+
},
|
|
1484
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1485
|
+
);
|
|
1486
|
+
if (warrning) {
|
|
1487
|
+
Logger({
|
|
1488
|
+
level: "WARN",
|
|
1489
|
+
message: `Parameter Validation warrnings for platform > Catalog > deletePriceFactory \n ${warrning}`,
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
const query_params = {};
|
|
1494
|
+
|
|
1495
|
+
const response = await PlatformAPIClient.execute(
|
|
1496
|
+
this.config,
|
|
1497
|
+
"delete",
|
|
1498
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/${priceFactoryId}`,
|
|
1499
|
+
query_params,
|
|
1500
|
+
undefined,
|
|
1501
|
+
requestHeaders,
|
|
1502
|
+
{ responseHeaders }
|
|
1503
|
+
);
|
|
1504
|
+
|
|
1505
|
+
let responseData = response;
|
|
1506
|
+
if (responseHeaders) {
|
|
1507
|
+
responseData = response[0];
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
const {
|
|
1511
|
+
error: res_error,
|
|
1512
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
1315
1513
|
abortEarly: false,
|
|
1316
1514
|
allowUnknown: true,
|
|
1317
1515
|
});
|
|
@@ -1322,7 +1520,7 @@ class Catalog {
|
|
|
1322
1520
|
} else {
|
|
1323
1521
|
Logger({
|
|
1324
1522
|
level: "WARN",
|
|
1325
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
1523
|
+
message: `Response Validation Warnings for platform > Catalog > deletePriceFactory \n ${res_error}`,
|
|
1326
1524
|
});
|
|
1327
1525
|
}
|
|
1328
1526
|
}
|
|
@@ -1336,12 +1534,12 @@ class Catalog {
|
|
|
1336
1534
|
*
|
|
1337
1535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1338
1536
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1339
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1537
|
+
* @returns {Promise<CatalogPlatformModel.DeleteSearchConfigurationResponseSchema>}
|
|
1340
1538
|
* - Success response
|
|
1341
1539
|
*
|
|
1342
1540
|
* @name deleteSearchConfiguration
|
|
1343
1541
|
* @summary: Delete search configuration
|
|
1344
|
-
* @description: Delete Search Configuration for a specific sales channel. - Check out [method documentation](https://
|
|
1542
|
+
* @description: Delete Search Configuration for a specific sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteSearchConfiguration/).
|
|
1345
1543
|
*/
|
|
1346
1544
|
async deleteSearchConfiguration(
|
|
1347
1545
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1390,7 +1588,7 @@ class Catalog {
|
|
|
1390
1588
|
|
|
1391
1589
|
const {
|
|
1392
1590
|
error: res_error,
|
|
1393
|
-
} = CatalogPlatformModel.
|
|
1591
|
+
} = CatalogPlatformModel.DeleteSearchConfigurationResponseSchema().validate(
|
|
1394
1592
|
responseData,
|
|
1395
1593
|
{ abortEarly: false, allowUnknown: true }
|
|
1396
1594
|
);
|
|
@@ -1415,10 +1613,10 @@ class Catalog {
|
|
|
1415
1613
|
*
|
|
1416
1614
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1417
1615
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1418
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1616
|
+
* @returns {Promise<CatalogPlatformModel.DeleteResponseSchema>} - Success response
|
|
1419
1617
|
* @name deleteSearchKeywords
|
|
1420
1618
|
* @summary: Delete search keywords
|
|
1421
|
-
* @description: Delete a search keywords by its id for a specific company and sales channel. - Check out [method documentation](https://
|
|
1619
|
+
* @description: Delete a search keywords by its id for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteSearchKeywords/).
|
|
1422
1620
|
*/
|
|
1423
1621
|
async deleteSearchKeywords(
|
|
1424
1622
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1471,7 +1669,7 @@ class Catalog {
|
|
|
1471
1669
|
|
|
1472
1670
|
const {
|
|
1473
1671
|
error: res_error,
|
|
1474
|
-
} = CatalogPlatformModel.
|
|
1672
|
+
} = CatalogPlatformModel.DeleteResponseSchema().validate(responseData, {
|
|
1475
1673
|
abortEarly: false,
|
|
1476
1674
|
allowUnknown: true,
|
|
1477
1675
|
});
|
|
@@ -1491,41 +1689,27 @@ class Catalog {
|
|
|
1491
1689
|
}
|
|
1492
1690
|
|
|
1493
1691
|
/**
|
|
1494
|
-
* @param {CatalogPlatformApplicationValidator.
|
|
1692
|
+
* @param {CatalogPlatformApplicationValidator.FollowProductByIdParam} arg
|
|
1495
1693
|
* - Arg object
|
|
1496
1694
|
*
|
|
1497
1695
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1498
1696
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1499
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1500
|
-
*
|
|
1501
|
-
* @
|
|
1502
|
-
* @
|
|
1503
|
-
*
|
|
1697
|
+
* @returns {Promise<CatalogPlatformModel.FollowProduct>} - Success response
|
|
1698
|
+
* @name followProductById
|
|
1699
|
+
* @summary: Follow a Specific Product by ID
|
|
1700
|
+
* @description: This endpoint enables a user to follow a specific product identified by its unique item ID for a sales channel.
|
|
1701
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/followProductById/).
|
|
1504
1702
|
*/
|
|
1505
|
-
async
|
|
1506
|
-
{
|
|
1507
|
-
q,
|
|
1508
|
-
scheduleStatus,
|
|
1509
|
-
type,
|
|
1510
|
-
tags,
|
|
1511
|
-
isActive,
|
|
1512
|
-
pageNo,
|
|
1513
|
-
pageSize,
|
|
1514
|
-
requestHeaders,
|
|
1515
|
-
} = { requestHeaders: {} },
|
|
1703
|
+
async followProductById(
|
|
1704
|
+
{ userId, itemId, requestHeaders } = { requestHeaders: {} },
|
|
1516
1705
|
{ responseHeaders } = { responseHeaders: false }
|
|
1517
1706
|
) {
|
|
1518
1707
|
const {
|
|
1519
1708
|
error,
|
|
1520
|
-
} = CatalogPlatformApplicationValidator.
|
|
1709
|
+
} = CatalogPlatformApplicationValidator.followProductById().validate(
|
|
1521
1710
|
{
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
type,
|
|
1525
|
-
tags,
|
|
1526
|
-
isActive,
|
|
1527
|
-
pageNo,
|
|
1528
|
-
pageSize,
|
|
1711
|
+
userId,
|
|
1712
|
+
itemId,
|
|
1529
1713
|
},
|
|
1530
1714
|
{ abortEarly: false, allowUnknown: true }
|
|
1531
1715
|
);
|
|
@@ -1536,38 +1720,26 @@ class Catalog {
|
|
|
1536
1720
|
// Showing warrnings if extra unknown parameters are found
|
|
1537
1721
|
const {
|
|
1538
1722
|
error: warrning,
|
|
1539
|
-
} = CatalogPlatformApplicationValidator.
|
|
1723
|
+
} = CatalogPlatformApplicationValidator.followProductById().validate(
|
|
1540
1724
|
{
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
type,
|
|
1544
|
-
tags,
|
|
1545
|
-
isActive,
|
|
1546
|
-
pageNo,
|
|
1547
|
-
pageSize,
|
|
1725
|
+
userId,
|
|
1726
|
+
itemId,
|
|
1548
1727
|
},
|
|
1549
1728
|
{ abortEarly: false, allowUnknown: false }
|
|
1550
1729
|
);
|
|
1551
1730
|
if (warrning) {
|
|
1552
1731
|
Logger({
|
|
1553
1732
|
level: "WARN",
|
|
1554
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
1733
|
+
message: `Parameter Validation warrnings for platform > Catalog > followProductById \n ${warrning}`,
|
|
1555
1734
|
});
|
|
1556
1735
|
}
|
|
1557
1736
|
|
|
1558
1737
|
const query_params = {};
|
|
1559
|
-
query_params["q"] = q;
|
|
1560
|
-
query_params["schedule_status"] = scheduleStatus;
|
|
1561
|
-
query_params["type"] = type;
|
|
1562
|
-
query_params["tags"] = tags;
|
|
1563
|
-
query_params["is_active"] = isActive;
|
|
1564
|
-
query_params["page_no"] = pageNo;
|
|
1565
|
-
query_params["page_size"] = pageSize;
|
|
1566
1738
|
|
|
1567
1739
|
const response = await PlatformAPIClient.execute(
|
|
1568
1740
|
this.config,
|
|
1569
|
-
"
|
|
1570
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1741
|
+
"put",
|
|
1742
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user/${userId}/products/${itemId}/follow`,
|
|
1571
1743
|
query_params,
|
|
1572
1744
|
undefined,
|
|
1573
1745
|
requestHeaders,
|
|
@@ -1581,10 +1753,10 @@ class Catalog {
|
|
|
1581
1753
|
|
|
1582
1754
|
const {
|
|
1583
1755
|
error: res_error,
|
|
1584
|
-
} = CatalogPlatformModel.
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
);
|
|
1756
|
+
} = CatalogPlatformModel.FollowProduct().validate(responseData, {
|
|
1757
|
+
abortEarly: false,
|
|
1758
|
+
allowUnknown: true,
|
|
1759
|
+
});
|
|
1588
1760
|
|
|
1589
1761
|
if (res_error) {
|
|
1590
1762
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1592,7 +1764,7 @@ class Catalog {
|
|
|
1592
1764
|
} else {
|
|
1593
1765
|
Logger({
|
|
1594
1766
|
level: "WARN",
|
|
1595
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
1767
|
+
message: `Response Validation Warnings for platform > Catalog > followProductById \n ${res_error}`,
|
|
1596
1768
|
});
|
|
1597
1769
|
}
|
|
1598
1770
|
}
|
|
@@ -1601,25 +1773,136 @@ class Catalog {
|
|
|
1601
1773
|
}
|
|
1602
1774
|
|
|
1603
1775
|
/**
|
|
1604
|
-
* @param {
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1607
|
-
* @param {
|
|
1608
|
-
*
|
|
1609
|
-
* @
|
|
1610
|
-
*
|
|
1611
|
-
*
|
|
1612
|
-
* @
|
|
1613
|
-
* @
|
|
1614
|
-
*
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1776
|
+
* @param {CatalogPlatformApplicationValidator.GetAllCollectionsParam} arg
|
|
1777
|
+
* - Arg object
|
|
1778
|
+
*
|
|
1779
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1780
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1781
|
+
* @returns {Promise<CatalogPlatformModel.GetCollectionListingResponseSchema>}
|
|
1782
|
+
* - Success response
|
|
1783
|
+
*
|
|
1784
|
+
* @name getAllCollections
|
|
1785
|
+
* @summary: List collections
|
|
1786
|
+
* @description: Retrieve all collections based on criteria such as collection name, schedule status, and active status. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAllCollections/).
|
|
1787
|
+
*/
|
|
1788
|
+
async getAllCollections(
|
|
1789
|
+
{
|
|
1790
|
+
q,
|
|
1791
|
+
scheduleStatus,
|
|
1792
|
+
type,
|
|
1793
|
+
tags,
|
|
1794
|
+
isActive,
|
|
1795
|
+
pageNo,
|
|
1796
|
+
pageSize,
|
|
1797
|
+
requestHeaders,
|
|
1798
|
+
} = { requestHeaders: {} },
|
|
1799
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1800
|
+
) {
|
|
1801
|
+
const {
|
|
1802
|
+
error,
|
|
1803
|
+
} = CatalogPlatformApplicationValidator.getAllCollections().validate(
|
|
1804
|
+
{
|
|
1805
|
+
q,
|
|
1806
|
+
scheduleStatus,
|
|
1807
|
+
type,
|
|
1808
|
+
tags,
|
|
1809
|
+
isActive,
|
|
1810
|
+
pageNo,
|
|
1811
|
+
pageSize,
|
|
1812
|
+
},
|
|
1813
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1814
|
+
);
|
|
1815
|
+
if (error) {
|
|
1816
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1820
|
+
const {
|
|
1821
|
+
error: warrning,
|
|
1822
|
+
} = CatalogPlatformApplicationValidator.getAllCollections().validate(
|
|
1823
|
+
{
|
|
1824
|
+
q,
|
|
1825
|
+
scheduleStatus,
|
|
1826
|
+
type,
|
|
1827
|
+
tags,
|
|
1828
|
+
isActive,
|
|
1829
|
+
pageNo,
|
|
1830
|
+
pageSize,
|
|
1831
|
+
},
|
|
1832
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1833
|
+
);
|
|
1834
|
+
if (warrning) {
|
|
1835
|
+
Logger({
|
|
1836
|
+
level: "WARN",
|
|
1837
|
+
message: `Parameter Validation warrnings for platform > Catalog > getAllCollections \n ${warrning}`,
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
const query_params = {};
|
|
1842
|
+
query_params["q"] = q;
|
|
1843
|
+
query_params["schedule_status"] = scheduleStatus;
|
|
1844
|
+
query_params["type"] = type;
|
|
1845
|
+
query_params["tags"] = tags;
|
|
1846
|
+
query_params["is_active"] = isActive;
|
|
1847
|
+
query_params["page_no"] = pageNo;
|
|
1848
|
+
query_params["page_size"] = pageSize;
|
|
1849
|
+
|
|
1850
|
+
const response = await PlatformAPIClient.execute(
|
|
1851
|
+
this.config,
|
|
1852
|
+
"get",
|
|
1853
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
|
|
1854
|
+
query_params,
|
|
1855
|
+
undefined,
|
|
1856
|
+
requestHeaders,
|
|
1857
|
+
{ responseHeaders }
|
|
1858
|
+
);
|
|
1859
|
+
|
|
1860
|
+
let responseData = response;
|
|
1861
|
+
if (responseHeaders) {
|
|
1862
|
+
responseData = response[0];
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
const {
|
|
1866
|
+
error: res_error,
|
|
1867
|
+
} = CatalogPlatformModel.GetCollectionListingResponseSchema().validate(
|
|
1868
|
+
responseData,
|
|
1869
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1870
|
+
);
|
|
1871
|
+
|
|
1872
|
+
if (res_error) {
|
|
1873
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1874
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1875
|
+
} else {
|
|
1876
|
+
Logger({
|
|
1877
|
+
level: "WARN",
|
|
1878
|
+
message: `Response Validation Warnings for platform > Catalog > getAllCollections \n ${res_error}`,
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
return response;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
/**
|
|
1887
|
+
* @param {Object} arg - Arg object.
|
|
1888
|
+
* @param {string} arg.companyId - A `company_id` is a unique identifier for
|
|
1889
|
+
* a particular seller account.
|
|
1890
|
+
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
1891
|
+
* identifier for a particular sale channel.
|
|
1892
|
+
* @param {string} [arg.q] - Get collection list filtered by q string,
|
|
1893
|
+
* @param {string} [arg.scheduleStatus] - Get collection list filtered by
|
|
1894
|
+
* scheduled status,
|
|
1895
|
+
* @param {string} [arg.type] - Type of the collections
|
|
1896
|
+
* @param {string[]} [arg.tags] - Each response will contain next_id param,
|
|
1897
|
+
* which should be sent back to make pagination work.
|
|
1898
|
+
* @param {boolean} [arg.isActive] - Get collections filtered by active status.
|
|
1899
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
1900
|
+
* page. Default is 12.
|
|
1901
|
+
* @returns {Paginator<CatalogPlatformModel.GetCollectionListingResponseSchema>}
|
|
1902
|
+
* @summary: List collections
|
|
1903
|
+
* @description: Retrieve all collections based on criteria such as collection name, schedule status, and active status.
|
|
1904
|
+
*/
|
|
1905
|
+
getAllCollectionsPaginator({
|
|
1623
1906
|
companyId,
|
|
1624
1907
|
applicationId,
|
|
1625
1908
|
q,
|
|
@@ -1661,10 +1944,11 @@ class Catalog {
|
|
|
1661
1944
|
*
|
|
1662
1945
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1663
1946
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1664
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1947
|
+
* @returns {Promise<CatalogPlatformModel.GetSearchWordsResponseSchema>} -
|
|
1948
|
+
* Success response
|
|
1665
1949
|
* @name getAllSearchKeyword
|
|
1666
1950
|
* @summary: List search keywords
|
|
1667
|
-
* @description: Get all custom search keywords for a specific company and sales channel allows you to map certain conditions with the keywords to give you ultimate results. - Check out [method documentation](https://
|
|
1951
|
+
* @description: Get all custom search keywords for a specific company and sales channel allows you to map certain conditions with the keywords to give you ultimate results. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAllSearchKeyword/).
|
|
1668
1952
|
*/
|
|
1669
1953
|
async getAllSearchKeyword(
|
|
1670
1954
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1713,10 +1997,10 @@ class Catalog {
|
|
|
1713
1997
|
|
|
1714
1998
|
const {
|
|
1715
1999
|
error: res_error,
|
|
1716
|
-
} = CatalogPlatformModel.
|
|
1717
|
-
|
|
1718
|
-
allowUnknown: true
|
|
1719
|
-
|
|
2000
|
+
} = CatalogPlatformModel.GetSearchWordsResponseSchema().validate(
|
|
2001
|
+
responseData,
|
|
2002
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2003
|
+
);
|
|
1720
2004
|
|
|
1721
2005
|
if (res_error) {
|
|
1722
2006
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1738,12 +2022,12 @@ class Catalog {
|
|
|
1738
2022
|
*
|
|
1739
2023
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1740
2024
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1741
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2025
|
+
* @returns {Promise<CatalogPlatformModel.BaseAppCategoryReturnConfigResponseSchema>}
|
|
1742
2026
|
* - Success response
|
|
1743
2027
|
*
|
|
1744
2028
|
* @name getAppCategoryReturnConfig
|
|
1745
2029
|
* @summary: Get category return configuration
|
|
1746
|
-
* @description: Get all category level configuration level set for an sales channel. - Check out [method documentation](https://
|
|
2030
|
+
* @description: Get all category level configuration level set for an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppCategoryReturnConfig/).
|
|
1747
2031
|
*/
|
|
1748
2032
|
async getAppCategoryReturnConfig(
|
|
1749
2033
|
{ q, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1803,7 +2087,7 @@ class Catalog {
|
|
|
1803
2087
|
|
|
1804
2088
|
const {
|
|
1805
2089
|
error: res_error,
|
|
1806
|
-
} = CatalogPlatformModel.
|
|
2090
|
+
} = CatalogPlatformModel.BaseAppCategoryReturnConfigResponseSchema().validate(
|
|
1807
2091
|
responseData,
|
|
1808
2092
|
{ abortEarly: false, allowUnknown: true }
|
|
1809
2093
|
);
|
|
@@ -1826,10 +2110,11 @@ class Catalog {
|
|
|
1826
2110
|
* @param {CatalogPlatformApplicationValidator.GetAppInventoryParam} arg - Arg object
|
|
1827
2111
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1828
2112
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1829
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2113
|
+
* @returns {Promise<CatalogPlatformModel.InventoryStockResponseSchema>} -
|
|
2114
|
+
* Success response
|
|
1830
2115
|
* @name getAppInventory
|
|
1831
2116
|
* @summary: List sales channel inventory
|
|
1832
|
-
* @description: Retrieve inventory data related to the sales channel. this can be used to get the Inventory status of products
|
|
2117
|
+
* @description: Retrieve inventory data related to the sales channel. this can be used to get the Inventory status of products. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppInventory/).
|
|
1833
2118
|
*/
|
|
1834
2119
|
async getAppInventory(
|
|
1835
2120
|
{
|
|
@@ -1930,10 +2215,10 @@ class Catalog {
|
|
|
1930
2215
|
|
|
1931
2216
|
const {
|
|
1932
2217
|
error: res_error,
|
|
1933
|
-
} = CatalogPlatformModel.
|
|
1934
|
-
|
|
1935
|
-
allowUnknown: true
|
|
1936
|
-
|
|
2218
|
+
} = CatalogPlatformModel.InventoryStockResponseSchema().validate(
|
|
2219
|
+
responseData,
|
|
2220
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2221
|
+
);
|
|
1937
2222
|
|
|
1938
2223
|
if (res_error) {
|
|
1939
2224
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1953,10 +2238,10 @@ class Catalog {
|
|
|
1953
2238
|
* @param {CatalogPlatformApplicationValidator.GetAppLocationsParam} arg - Arg object
|
|
1954
2239
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1955
2240
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1956
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2241
|
+
* @returns {Promise<CatalogPlatformModel.LocationListSchema>} - Success response
|
|
1957
2242
|
* @name getAppLocations
|
|
1958
|
-
* @summary:
|
|
1959
|
-
* @description: Retrieve all stores associated with
|
|
2243
|
+
* @summary: Retrieve stores for a sales channel
|
|
2244
|
+
* @description: Retrieve all stores associated with a sales channel, with support for searching by store name and filtering by store type and status. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppLocations/).
|
|
1960
2245
|
*/
|
|
1961
2246
|
async getAppLocations(
|
|
1962
2247
|
{
|
|
@@ -2027,7 +2312,7 @@ class Catalog {
|
|
|
2027
2312
|
const response = await PlatformAPIClient.execute(
|
|
2028
2313
|
this.config,
|
|
2029
2314
|
"get",
|
|
2030
|
-
`/service/platform/catalog/
|
|
2315
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/locations`,
|
|
2031
2316
|
query_params,
|
|
2032
2317
|
undefined,
|
|
2033
2318
|
requestHeaders,
|
|
@@ -2041,7 +2326,7 @@ class Catalog {
|
|
|
2041
2326
|
|
|
2042
2327
|
const {
|
|
2043
2328
|
error: res_error,
|
|
2044
|
-
} = CatalogPlatformModel.
|
|
2329
|
+
} = CatalogPlatformModel.LocationListSchema().validate(responseData, {
|
|
2045
2330
|
abortEarly: false,
|
|
2046
2331
|
allowUnknown: true,
|
|
2047
2332
|
});
|
|
@@ -2062,9 +2347,10 @@ class Catalog {
|
|
|
2062
2347
|
|
|
2063
2348
|
/**
|
|
2064
2349
|
* @param {Object} arg - Arg object.
|
|
2065
|
-
* @param {
|
|
2066
|
-
*
|
|
2067
|
-
*
|
|
2350
|
+
* @param {number} arg.companyId - A `company_id` is a unique identifier for
|
|
2351
|
+
* a particular seller account.
|
|
2352
|
+
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
2353
|
+
* identifier for a particular sale channel.
|
|
2068
2354
|
* @param {string} [arg.storeType] - Helps to sort the location list on the
|
|
2069
2355
|
* basis of location type.
|
|
2070
2356
|
* @param {number[]} [arg.uid] - Helps to sort the location list on the
|
|
@@ -2076,9 +2362,9 @@ class Catalog {
|
|
|
2076
2362
|
* page. Default is 20.
|
|
2077
2363
|
* @param {string[]} [arg.tags] - Get locations filtered by tags.
|
|
2078
2364
|
* @param {string[]} [arg.storeTypes] - Get locations filtered by store types.
|
|
2079
|
-
* @returns {Paginator<CatalogPlatformModel.
|
|
2080
|
-
* @summary:
|
|
2081
|
-
* @description: Retrieve all stores associated with
|
|
2365
|
+
* @returns {Paginator<CatalogPlatformModel.LocationListSchema>}
|
|
2366
|
+
* @summary: Retrieve stores for a sales channel
|
|
2367
|
+
* @description: Retrieve all stores associated with a sales channel, with support for searching by store name and filtering by store type and status.
|
|
2082
2368
|
*/
|
|
2083
2369
|
getAppLocationsPaginator({
|
|
2084
2370
|
companyId,
|
|
@@ -2122,10 +2408,11 @@ class Catalog {
|
|
|
2122
2408
|
* @param {CatalogPlatformApplicationValidator.GetAppProductParam} arg - Arg object
|
|
2123
2409
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2124
2410
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2125
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2411
|
+
* @returns {Promise<CatalogPlatformModel.OwnerAppItemResponseSchema>} -
|
|
2412
|
+
* Success response
|
|
2126
2413
|
* @name getAppProduct
|
|
2127
2414
|
* @summary: Get sales channel product
|
|
2128
|
-
* @description: Retrieve sales channel product details by its item_id and depending upon filters sent in request. - Check out [method documentation](https://
|
|
2415
|
+
* @description: Retrieve sales channel product details by its item_id and depending upon filters sent in request. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppProduct/).
|
|
2129
2416
|
*/
|
|
2130
2417
|
async getAppProduct(
|
|
2131
2418
|
{ itemId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2178,7 +2465,89 @@ class Catalog {
|
|
|
2178
2465
|
|
|
2179
2466
|
const {
|
|
2180
2467
|
error: res_error,
|
|
2181
|
-
} = CatalogPlatformModel.
|
|
2468
|
+
} = CatalogPlatformModel.OwnerAppItemResponseSchema().validate(
|
|
2469
|
+
responseData,
|
|
2470
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2471
|
+
);
|
|
2472
|
+
|
|
2473
|
+
if (res_error) {
|
|
2474
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2475
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2476
|
+
} else {
|
|
2477
|
+
Logger({
|
|
2478
|
+
level: "WARN",
|
|
2479
|
+
message: `Response Validation Warnings for platform > Catalog > getAppProduct \n ${res_error}`,
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
return response;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
/**
|
|
2488
|
+
* @param {CatalogPlatformApplicationValidator.GetAppProductPricesParam} arg
|
|
2489
|
+
* - Arg object
|
|
2490
|
+
*
|
|
2491
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2492
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2493
|
+
* @returns {Promise<CatalogPlatformModel.AppProductPricesSchema>} - Success response
|
|
2494
|
+
* @name getAppProductPrices
|
|
2495
|
+
* @summary: Get prices for specific raw product items
|
|
2496
|
+
* @description: Fetch pricing details for multiple raw products by their item IDs, scoped to a particular company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppProductPrices/).
|
|
2497
|
+
*/
|
|
2498
|
+
async getAppProductPrices(
|
|
2499
|
+
{ itemIds, requestHeaders } = { requestHeaders: {} },
|
|
2500
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2501
|
+
) {
|
|
2502
|
+
const {
|
|
2503
|
+
error,
|
|
2504
|
+
} = CatalogPlatformApplicationValidator.getAppProductPrices().validate(
|
|
2505
|
+
{
|
|
2506
|
+
itemIds,
|
|
2507
|
+
},
|
|
2508
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2509
|
+
);
|
|
2510
|
+
if (error) {
|
|
2511
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2515
|
+
const {
|
|
2516
|
+
error: warrning,
|
|
2517
|
+
} = CatalogPlatformApplicationValidator.getAppProductPrices().validate(
|
|
2518
|
+
{
|
|
2519
|
+
itemIds,
|
|
2520
|
+
},
|
|
2521
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2522
|
+
);
|
|
2523
|
+
if (warrning) {
|
|
2524
|
+
Logger({
|
|
2525
|
+
level: "WARN",
|
|
2526
|
+
message: `Parameter Validation warrnings for platform > Catalog > getAppProductPrices \n ${warrning}`,
|
|
2527
|
+
});
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
const query_params = {};
|
|
2531
|
+
query_params["item_ids"] = itemIds;
|
|
2532
|
+
|
|
2533
|
+
const response = await PlatformAPIClient.execute(
|
|
2534
|
+
this.config,
|
|
2535
|
+
"get",
|
|
2536
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/raw-products/price`,
|
|
2537
|
+
query_params,
|
|
2538
|
+
undefined,
|
|
2539
|
+
requestHeaders,
|
|
2540
|
+
{ responseHeaders }
|
|
2541
|
+
);
|
|
2542
|
+
|
|
2543
|
+
let responseData = response;
|
|
2544
|
+
if (responseHeaders) {
|
|
2545
|
+
responseData = response[0];
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
const {
|
|
2549
|
+
error: res_error,
|
|
2550
|
+
} = CatalogPlatformModel.AppProductPricesSchema().validate(responseData, {
|
|
2182
2551
|
abortEarly: false,
|
|
2183
2552
|
allowUnknown: true,
|
|
2184
2553
|
});
|
|
@@ -2189,7 +2558,7 @@ class Catalog {
|
|
|
2189
2558
|
} else {
|
|
2190
2559
|
Logger({
|
|
2191
2560
|
level: "WARN",
|
|
2192
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
2561
|
+
message: `Response Validation Warnings for platform > Catalog > getAppProductPrices \n ${res_error}`,
|
|
2193
2562
|
});
|
|
2194
2563
|
}
|
|
2195
2564
|
}
|
|
@@ -2201,11 +2570,12 @@ class Catalog {
|
|
|
2201
2570
|
* @param {CatalogPlatformApplicationValidator.GetAppProductsParam} arg - Arg object
|
|
2202
2571
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2203
2572
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2204
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2205
|
-
* Success response
|
|
2573
|
+
* @returns {Promise<CatalogPlatformModel.RawProductListingResponseSchema>}
|
|
2574
|
+
* - Success response
|
|
2575
|
+
*
|
|
2206
2576
|
* @name getAppProducts
|
|
2207
2577
|
* @summary: List sales channel products
|
|
2208
|
-
* @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support - Check out [method documentation](https://
|
|
2578
|
+
* @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppProducts/).
|
|
2209
2579
|
*/
|
|
2210
2580
|
async getAppProducts(
|
|
2211
2581
|
{
|
|
@@ -2290,7 +2660,7 @@ class Catalog {
|
|
|
2290
2660
|
|
|
2291
2661
|
const {
|
|
2292
2662
|
error: res_error,
|
|
2293
|
-
} = CatalogPlatformModel.
|
|
2663
|
+
} = CatalogPlatformModel.RawProductListingResponseSchema().validate(
|
|
2294
2664
|
responseData,
|
|
2295
2665
|
{ abortEarly: false, allowUnknown: true }
|
|
2296
2666
|
);
|
|
@@ -2311,7 +2681,7 @@ class Catalog {
|
|
|
2311
2681
|
|
|
2312
2682
|
/**
|
|
2313
2683
|
* @param {Object} arg - Arg object.
|
|
2314
|
-
* @param {
|
|
2684
|
+
* @param {number} arg.companyId - A `company_id` is a unique identifier for
|
|
2315
2685
|
* a particular seller account.
|
|
2316
2686
|
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
2317
2687
|
* identifier for a particular sale channel.
|
|
@@ -2325,7 +2695,7 @@ class Catalog {
|
|
|
2325
2695
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
2326
2696
|
* page. Default is 10.
|
|
2327
2697
|
* @param {string} [arg.q] - Search with Item Code, Name, Slug or Identifier.
|
|
2328
|
-
* @returns {Paginator<CatalogPlatformModel.
|
|
2698
|
+
* @returns {Paginator<CatalogPlatformModel.RawProductListingResponseSchema>}
|
|
2329
2699
|
* @summary: List sales channel products
|
|
2330
2700
|
* @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support
|
|
2331
2701
|
*/
|
|
@@ -2373,10 +2743,11 @@ class Catalog {
|
|
|
2373
2743
|
*
|
|
2374
2744
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2375
2745
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2376
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2746
|
+
* @returns {Promise<CatalogPlatformModel.AppReturnConfigResponseSchema>} -
|
|
2747
|
+
* Success response
|
|
2377
2748
|
* @name getAppReturnConfiguration
|
|
2378
|
-
* @summary:
|
|
2379
|
-
* @description: Get Product Return configuration set at an sales channel level - Check out [method documentation](https://
|
|
2749
|
+
* @summary: Get product-return configuration
|
|
2750
|
+
* @description: Get Product Return configuration set at an sales channel level - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAppReturnConfiguration/).
|
|
2380
2751
|
*/
|
|
2381
2752
|
async getAppReturnConfiguration(
|
|
2382
2753
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -2425,10 +2796,10 @@ class Catalog {
|
|
|
2425
2796
|
|
|
2426
2797
|
const {
|
|
2427
2798
|
error: res_error,
|
|
2428
|
-
} = CatalogPlatformModel.
|
|
2429
|
-
|
|
2430
|
-
allowUnknown: true
|
|
2431
|
-
|
|
2799
|
+
} = CatalogPlatformModel.AppReturnConfigResponseSchema().validate(
|
|
2800
|
+
responseData,
|
|
2801
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2802
|
+
);
|
|
2432
2803
|
|
|
2433
2804
|
if (res_error) {
|
|
2434
2805
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2445,226 +2816,27 @@ class Catalog {
|
|
|
2445
2816
|
}
|
|
2446
2817
|
|
|
2447
2818
|
/**
|
|
2448
|
-
* @param {CatalogPlatformApplicationValidator.
|
|
2819
|
+
* @param {CatalogPlatformApplicationValidator.GetApplicationBrandListingParam} arg
|
|
2449
2820
|
* - Arg object
|
|
2450
2821
|
*
|
|
2451
2822
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2452
2823
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2453
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2454
|
-
*
|
|
2455
|
-
*
|
|
2456
|
-
* @
|
|
2457
|
-
* @
|
|
2458
|
-
* @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppicationProducts/).
|
|
2824
|
+
* @returns {Promise<CatalogPlatformModel.ApplicationBrandListingSchema>} -
|
|
2825
|
+
* Success response
|
|
2826
|
+
* @name getApplicationBrandListing
|
|
2827
|
+
* @summary: List sales channel brands
|
|
2828
|
+
* @description: Retrieve brand listings related to the sales channel. A brand is the name under which a product is being sold - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationBrandListing/).
|
|
2459
2829
|
*/
|
|
2460
|
-
async
|
|
2461
|
-
{
|
|
2462
|
-
q,
|
|
2463
|
-
f,
|
|
2464
|
-
c,
|
|
2465
|
-
filters,
|
|
2466
|
-
isDependent,
|
|
2467
|
-
sortOn,
|
|
2468
|
-
pageId,
|
|
2469
|
-
pageSize,
|
|
2470
|
-
pageNo,
|
|
2471
|
-
pageType,
|
|
2472
|
-
itemIds,
|
|
2473
|
-
requestHeaders,
|
|
2474
|
-
} = { requestHeaders: {} },
|
|
2830
|
+
async getApplicationBrandListing(
|
|
2831
|
+
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
2475
2832
|
{ responseHeaders } = { responseHeaders: false }
|
|
2476
2833
|
) {
|
|
2477
2834
|
const {
|
|
2478
2835
|
error,
|
|
2479
|
-
} = CatalogPlatformApplicationValidator.
|
|
2836
|
+
} = CatalogPlatformApplicationValidator.getApplicationBrandListing().validate(
|
|
2480
2837
|
{
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
c,
|
|
2484
|
-
filters,
|
|
2485
|
-
isDependent,
|
|
2486
|
-
sortOn,
|
|
2487
|
-
pageId,
|
|
2488
|
-
pageSize,
|
|
2489
|
-
pageNo,
|
|
2490
|
-
pageType,
|
|
2491
|
-
itemIds,
|
|
2492
|
-
},
|
|
2493
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2494
|
-
);
|
|
2495
|
-
if (error) {
|
|
2496
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2497
|
-
}
|
|
2498
|
-
|
|
2499
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2500
|
-
const {
|
|
2501
|
-
error: warrning,
|
|
2502
|
-
} = CatalogPlatformApplicationValidator.getAppicationProducts().validate(
|
|
2503
|
-
{
|
|
2504
|
-
q,
|
|
2505
|
-
f,
|
|
2506
|
-
c,
|
|
2507
|
-
filters,
|
|
2508
|
-
isDependent,
|
|
2509
|
-
sortOn,
|
|
2510
|
-
pageId,
|
|
2511
|
-
pageSize,
|
|
2512
|
-
pageNo,
|
|
2513
|
-
pageType,
|
|
2514
|
-
itemIds,
|
|
2515
|
-
},
|
|
2516
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2517
|
-
);
|
|
2518
|
-
if (warrning) {
|
|
2519
|
-
Logger({
|
|
2520
|
-
level: "WARN",
|
|
2521
|
-
message: `Parameter Validation warrnings for platform > Catalog > getAppicationProducts \n ${warrning}`,
|
|
2522
|
-
});
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
const query_params = {};
|
|
2526
|
-
query_params["q"] = q;
|
|
2527
|
-
query_params["f"] = f;
|
|
2528
|
-
query_params["c"] = c;
|
|
2529
|
-
query_params["filters"] = filters;
|
|
2530
|
-
query_params["is_dependent"] = isDependent;
|
|
2531
|
-
query_params["sort_on"] = sortOn;
|
|
2532
|
-
query_params["page_id"] = pageId;
|
|
2533
|
-
query_params["page_size"] = pageSize;
|
|
2534
|
-
query_params["page_no"] = pageNo;
|
|
2535
|
-
query_params["page_type"] = pageType;
|
|
2536
|
-
query_params["item_ids"] = itemIds;
|
|
2537
|
-
|
|
2538
|
-
const response = await PlatformAPIClient.execute(
|
|
2539
|
-
this.config,
|
|
2540
|
-
"get",
|
|
2541
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`,
|
|
2542
|
-
query_params,
|
|
2543
|
-
undefined,
|
|
2544
|
-
requestHeaders,
|
|
2545
|
-
{ responseHeaders }
|
|
2546
|
-
);
|
|
2547
|
-
|
|
2548
|
-
let responseData = response;
|
|
2549
|
-
if (responseHeaders) {
|
|
2550
|
-
responseData = response[0];
|
|
2551
|
-
}
|
|
2552
|
-
|
|
2553
|
-
const {
|
|
2554
|
-
error: res_error,
|
|
2555
|
-
} = CatalogPlatformModel.ApplicationProductListingResponse().validate(
|
|
2556
|
-
responseData,
|
|
2557
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2558
|
-
);
|
|
2559
|
-
|
|
2560
|
-
if (res_error) {
|
|
2561
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2562
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2563
|
-
} else {
|
|
2564
|
-
Logger({
|
|
2565
|
-
level: "WARN",
|
|
2566
|
-
message: `Response Validation Warnings for platform > Catalog > getAppicationProducts \n ${res_error}`,
|
|
2567
|
-
});
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
return response;
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
/**
|
|
2575
|
-
* @param {Object} arg - Arg object.
|
|
2576
|
-
* @param {string} arg.companyId - A `company_id` is a unique identifier for
|
|
2577
|
-
* a particular seller account.
|
|
2578
|
-
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
2579
|
-
* identifier for a particular sale channel.
|
|
2580
|
-
* @param {string} [arg.q] - The search query. This can be a partial or
|
|
2581
|
-
* complete name of a either a product, brand or category
|
|
2582
|
-
* @param {string} [arg.f] - The search filter parameters. All the parameter
|
|
2583
|
-
* filtered from filter parameters will be passed in **f** parameter in
|
|
2584
|
-
* this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
|
|
2585
|
-
* @param {string} [arg.c] - The search filter parameters for collection
|
|
2586
|
-
* items. All the parameter filtered from filter parameters will be passed
|
|
2587
|
-
* in **c** parameter in this format.
|
|
2588
|
-
* **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
|
|
2589
|
-
* @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
|
|
2590
|
-
* filter details. This flag is used to fetch all filters
|
|
2591
|
-
* @param {boolean} [arg.isDependent] - This query parameter is used to get
|
|
2592
|
-
* the dependent products in the listing.
|
|
2593
|
-
* @param {string} [arg.sortOn] - The order to sort the list of products on.
|
|
2594
|
-
* The supported sort parameters are popularity, price, redemption and
|
|
2595
|
-
* discount in either ascending or descending order. See the supported
|
|
2596
|
-
* values below.
|
|
2597
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
2598
|
-
* page. Default is 12.
|
|
2599
|
-
* @param {number[]} [arg.itemIds] - Item Ids of product
|
|
2600
|
-
* @returns {Paginator<CatalogPlatformModel.ApplicationProductListingResponse>}
|
|
2601
|
-
* @summary: List sales channel products
|
|
2602
|
-
* @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order.
|
|
2603
|
-
*/
|
|
2604
|
-
getAppicationProductsPaginator({
|
|
2605
|
-
companyId,
|
|
2606
|
-
applicationId,
|
|
2607
|
-
q,
|
|
2608
|
-
f,
|
|
2609
|
-
c,
|
|
2610
|
-
filters,
|
|
2611
|
-
isDependent,
|
|
2612
|
-
sortOn,
|
|
2613
|
-
pageSize,
|
|
2614
|
-
itemIds,
|
|
2615
|
-
} = {}) {
|
|
2616
|
-
const paginator = new Paginator();
|
|
2617
|
-
const callback = async () => {
|
|
2618
|
-
const pageId = paginator.nextId;
|
|
2619
|
-
const pageNo = paginator.pageNo;
|
|
2620
|
-
const pageType = "cursor";
|
|
2621
|
-
const data = await this.getAppicationProducts({
|
|
2622
|
-
companyId: companyId,
|
|
2623
|
-
applicationId: applicationId,
|
|
2624
|
-
q: q,
|
|
2625
|
-
f: f,
|
|
2626
|
-
c: c,
|
|
2627
|
-
filters: filters,
|
|
2628
|
-
isDependent: isDependent,
|
|
2629
|
-
sortOn: sortOn,
|
|
2630
|
-
pageId: pageId,
|
|
2631
|
-
pageSize: pageSize,
|
|
2632
|
-
pageNo: pageNo,
|
|
2633
|
-
pageType: pageType,
|
|
2634
|
-
itemIds: itemIds,
|
|
2635
|
-
});
|
|
2636
|
-
paginator.setPaginator({
|
|
2637
|
-
hasNext: data.page.has_next ? true : false,
|
|
2638
|
-
nextId: data.page.next_id,
|
|
2639
|
-
});
|
|
2640
|
-
return data;
|
|
2641
|
-
};
|
|
2642
|
-
paginator.setCallback(callback.bind(this));
|
|
2643
|
-
return paginator;
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
/**
|
|
2647
|
-
* @param {CatalogPlatformApplicationValidator.GetApplicationBrandListingParam} arg
|
|
2648
|
-
* - Arg object
|
|
2649
|
-
*
|
|
2650
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2651
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2652
|
-
* @returns {Promise<CatalogPlatformModel.ApplicationBrandListingSchema>} -
|
|
2653
|
-
* Success response
|
|
2654
|
-
* @name getApplicationBrandListing
|
|
2655
|
-
* @summary: List sales channel brands
|
|
2656
|
-
* @description: Retrieve brand listings related to the sales channel. A brand is the name under which a product is being sold - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationBrandListing/).
|
|
2657
|
-
*/
|
|
2658
|
-
async getApplicationBrandListing(
|
|
2659
|
-
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
2660
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2661
|
-
) {
|
|
2662
|
-
const {
|
|
2663
|
-
error,
|
|
2664
|
-
} = CatalogPlatformApplicationValidator.getApplicationBrandListing().validate(
|
|
2665
|
-
{
|
|
2666
|
-
pageNo,
|
|
2667
|
-
pageSize,
|
|
2838
|
+
pageNo,
|
|
2839
|
+
pageSize,
|
|
2668
2840
|
q,
|
|
2669
2841
|
},
|
|
2670
2842
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2780,10 +2952,11 @@ class Catalog {
|
|
|
2780
2952
|
*
|
|
2781
2953
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2782
2954
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2783
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
2955
|
+
* @returns {Promise<CatalogPlatformModel.BrandListingResponseSchema>} -
|
|
2956
|
+
* Success response
|
|
2784
2957
|
* @name getApplicationBrands
|
|
2785
2958
|
* @summary: List brands
|
|
2786
|
-
* @description: List all the brands. - Check out [method documentation](https://
|
|
2959
|
+
* @description: List all the brands. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationBrands/).
|
|
2787
2960
|
*/
|
|
2788
2961
|
async getApplicationBrands(
|
|
2789
2962
|
{ department, pageNo, pageSize, q, brandId, requestHeaders } = {
|
|
@@ -2851,10 +3024,10 @@ class Catalog {
|
|
|
2851
3024
|
|
|
2852
3025
|
const {
|
|
2853
3026
|
error: res_error,
|
|
2854
|
-
} = CatalogPlatformModel.
|
|
2855
|
-
|
|
2856
|
-
allowUnknown: true
|
|
2857
|
-
|
|
3027
|
+
} = CatalogPlatformModel.BrandListingResponseSchema().validate(
|
|
3028
|
+
responseData,
|
|
3029
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3030
|
+
);
|
|
2858
3031
|
|
|
2859
3032
|
if (res_error) {
|
|
2860
3033
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2886,7 +3059,7 @@ class Catalog {
|
|
|
2886
3059
|
* parameter to search brands by brand name.
|
|
2887
3060
|
* @param {number[]} [arg.brandId] - Helps to sort the brands list on the
|
|
2888
3061
|
* basis of uid list.
|
|
2889
|
-
* @returns {Paginator<CatalogPlatformModel.
|
|
3062
|
+
* @returns {Paginator<CatalogPlatformModel.BrandListingResponseSchema>}
|
|
2890
3063
|
* @summary: List brands
|
|
2891
3064
|
* @description: List all the brands.
|
|
2892
3065
|
*/
|
|
@@ -2933,7 +3106,7 @@ class Catalog {
|
|
|
2933
3106
|
*
|
|
2934
3107
|
* @name getApplicationCategoryListing
|
|
2935
3108
|
* @summary: List sales channel categories
|
|
2936
|
-
* @description: Retrieve category listings related to the sales channel , with the ability to filter results based on department ,category names etc. - Check out [method documentation](https://
|
|
3109
|
+
* @description: Retrieve category listings related to the sales channel , with the ability to filter results based on department ,category names etc. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationCategoryListing/).
|
|
2937
3110
|
*/
|
|
2938
3111
|
async getApplicationCategoryListing(
|
|
2939
3112
|
{ departmentId, pageNo, pageSize, q, requestHeaders } = {
|
|
@@ -3069,12 +3242,12 @@ class Catalog {
|
|
|
3069
3242
|
*
|
|
3070
3243
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3071
3244
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3072
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3245
|
+
* @returns {Promise<CatalogPlatformModel.ApplicationDepartmentListingResponseSchema>}
|
|
3073
3246
|
* - Success response
|
|
3074
3247
|
*
|
|
3075
3248
|
* @name getApplicationDepartmentListing
|
|
3076
3249
|
* @summary: List sales channel departments
|
|
3077
|
-
* @description: Retrieve department listings related to the sales channel. Departments are used to categorize similar products, and you can filter the results based on department names - Check out [method documentation](https://
|
|
3250
|
+
* @description: Retrieve department listings related to the sales channel. Departments are used to categorize similar products, and you can filter the results based on department names - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationDepartmentListing/).
|
|
3078
3251
|
*/
|
|
3079
3252
|
async getApplicationDepartmentListing(
|
|
3080
3253
|
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3134,7 +3307,7 @@ class Catalog {
|
|
|
3134
3307
|
|
|
3135
3308
|
const {
|
|
3136
3309
|
error: res_error,
|
|
3137
|
-
} = CatalogPlatformModel.
|
|
3310
|
+
} = CatalogPlatformModel.ApplicationDepartmentListingResponseSchema().validate(
|
|
3138
3311
|
responseData,
|
|
3139
3312
|
{ abortEarly: false, allowUnknown: true }
|
|
3140
3313
|
);
|
|
@@ -3155,7 +3328,7 @@ class Catalog {
|
|
|
3155
3328
|
|
|
3156
3329
|
/**
|
|
3157
3330
|
* @param {Object} arg - Arg object.
|
|
3158
|
-
* @param {
|
|
3331
|
+
* @param {number} arg.companyId - A `company_id` is a unique identifier for
|
|
3159
3332
|
* a particular seller account.
|
|
3160
3333
|
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
3161
3334
|
* identifier for a particular sale channel.
|
|
@@ -3163,7 +3336,7 @@ class Catalog {
|
|
|
3163
3336
|
* page. Default is 12.
|
|
3164
3337
|
* @param {string} [arg.q] - A search query string. Use this parameter to
|
|
3165
3338
|
* filter results based on a keyword or specific value.
|
|
3166
|
-
* @returns {Paginator<CatalogPlatformModel.
|
|
3339
|
+
* @returns {Paginator<CatalogPlatformModel.ApplicationDepartmentListingResponseSchema>}
|
|
3167
3340
|
* @summary: List sales channel departments
|
|
3168
3341
|
* @description: Retrieve department listings related to the sales channel. Departments are used to categorize similar products, and you can filter the results based on department names
|
|
3169
3342
|
*/
|
|
@@ -3201,11 +3374,12 @@ class Catalog {
|
|
|
3201
3374
|
*
|
|
3202
3375
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3203
3376
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3204
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3205
|
-
* Success response
|
|
3377
|
+
* @returns {Promise<CatalogPlatformModel.GetQueryFiltersKeysResponseSchema>}
|
|
3378
|
+
* - Success response
|
|
3379
|
+
*
|
|
3206
3380
|
* @name getApplicationFilterKeys
|
|
3207
3381
|
* @summary: List filter keys
|
|
3208
|
-
* @description: Retrieve the details of all applicable product filters, such as Color, Brand, and Category, indicating the criteria keys where filters can be applied. - Check out [method documentation](https://
|
|
3382
|
+
* @description: Retrieve the details of all applicable product filters, such as Color, Brand, and Category, indicating the criteria keys where filters can be applied. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationFilterKeys/).
|
|
3209
3383
|
*/
|
|
3210
3384
|
async getApplicationFilterKeys(
|
|
3211
3385
|
{ c, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3259,7 +3433,7 @@ class Catalog {
|
|
|
3259
3433
|
|
|
3260
3434
|
const {
|
|
3261
3435
|
error: res_error,
|
|
3262
|
-
} = CatalogPlatformModel.
|
|
3436
|
+
} = CatalogPlatformModel.GetQueryFiltersKeysResponseSchema().validate(
|
|
3263
3437
|
responseData,
|
|
3264
3438
|
{ abortEarly: false, allowUnknown: true }
|
|
3265
3439
|
);
|
|
@@ -3284,12 +3458,13 @@ class Catalog {
|
|
|
3284
3458
|
*
|
|
3285
3459
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3286
3460
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3287
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3288
|
-
* Success response
|
|
3461
|
+
* @returns {Promise<CatalogPlatformModel.GetQueryFiltersValuesResponseSchema>}
|
|
3462
|
+
* - Success response
|
|
3463
|
+
*
|
|
3289
3464
|
* @name getApplicationFilterValues
|
|
3290
3465
|
* @summary: List product filters
|
|
3291
3466
|
* @description: This API is designed to retrieve the filter values for all available options within the selected filter, such as "red" for color.
|
|
3292
|
-
* - Check out [method documentation](https://
|
|
3467
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationFilterValues/).
|
|
3293
3468
|
*/
|
|
3294
3469
|
async getApplicationFilterValues(
|
|
3295
3470
|
{ filterKey, c, collectionId, pageNo, pageSize, q, requestHeaders } = {
|
|
@@ -3359,7 +3534,7 @@ class Catalog {
|
|
|
3359
3534
|
|
|
3360
3535
|
const {
|
|
3361
3536
|
error: res_error,
|
|
3362
|
-
} = CatalogPlatformModel.
|
|
3537
|
+
} = CatalogPlatformModel.GetQueryFiltersValuesResponseSchema().validate(
|
|
3363
3538
|
responseData,
|
|
3364
3539
|
{ abortEarly: false, allowUnknown: true }
|
|
3365
3540
|
);
|
|
@@ -3379,25 +3554,51 @@ class Catalog {
|
|
|
3379
3554
|
}
|
|
3380
3555
|
|
|
3381
3556
|
/**
|
|
3382
|
-
* @param {CatalogPlatformApplicationValidator.
|
|
3557
|
+
* @param {CatalogPlatformApplicationValidator.GetApplicationProductsParam} arg
|
|
3383
3558
|
* - Arg object
|
|
3384
3559
|
*
|
|
3385
3560
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3386
3561
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3387
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3388
|
-
* Success response
|
|
3389
|
-
*
|
|
3390
|
-
* @
|
|
3391
|
-
* @
|
|
3562
|
+
* @returns {Promise<CatalogPlatformModel.ApplicationProductListingResponseSchema>}
|
|
3563
|
+
* - Success response
|
|
3564
|
+
*
|
|
3565
|
+
* @name getApplicationProducts
|
|
3566
|
+
* @summary: List sales channel products
|
|
3567
|
+
* @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getApplicationProducts/).
|
|
3392
3568
|
*/
|
|
3393
|
-
async
|
|
3394
|
-
{
|
|
3569
|
+
async getApplicationProducts(
|
|
3570
|
+
{
|
|
3571
|
+
q,
|
|
3572
|
+
f,
|
|
3573
|
+
c,
|
|
3574
|
+
filters,
|
|
3575
|
+
isDependent,
|
|
3576
|
+
sortOn,
|
|
3577
|
+
pageId,
|
|
3578
|
+
pageSize,
|
|
3579
|
+
pageNo,
|
|
3580
|
+
pageType,
|
|
3581
|
+
itemIds,
|
|
3582
|
+
requestHeaders,
|
|
3583
|
+
} = { requestHeaders: {} },
|
|
3395
3584
|
{ responseHeaders } = { responseHeaders: false }
|
|
3396
3585
|
) {
|
|
3397
3586
|
const {
|
|
3398
3587
|
error,
|
|
3399
|
-
} = CatalogPlatformApplicationValidator.
|
|
3400
|
-
{
|
|
3588
|
+
} = CatalogPlatformApplicationValidator.getApplicationProducts().validate(
|
|
3589
|
+
{
|
|
3590
|
+
q,
|
|
3591
|
+
f,
|
|
3592
|
+
c,
|
|
3593
|
+
filters,
|
|
3594
|
+
isDependent,
|
|
3595
|
+
sortOn,
|
|
3596
|
+
pageId,
|
|
3597
|
+
pageSize,
|
|
3598
|
+
pageNo,
|
|
3599
|
+
pageType,
|
|
3600
|
+
itemIds,
|
|
3601
|
+
},
|
|
3401
3602
|
{ abortEarly: false, allowUnknown: true }
|
|
3402
3603
|
);
|
|
3403
3604
|
if (error) {
|
|
@@ -3407,23 +3608,46 @@ class Catalog {
|
|
|
3407
3608
|
// Showing warrnings if extra unknown parameters are found
|
|
3408
3609
|
const {
|
|
3409
3610
|
error: warrning,
|
|
3410
|
-
} = CatalogPlatformApplicationValidator.
|
|
3411
|
-
{
|
|
3611
|
+
} = CatalogPlatformApplicationValidator.getApplicationProducts().validate(
|
|
3612
|
+
{
|
|
3613
|
+
q,
|
|
3614
|
+
f,
|
|
3615
|
+
c,
|
|
3616
|
+
filters,
|
|
3617
|
+
isDependent,
|
|
3618
|
+
sortOn,
|
|
3619
|
+
pageId,
|
|
3620
|
+
pageSize,
|
|
3621
|
+
pageNo,
|
|
3622
|
+
pageType,
|
|
3623
|
+
itemIds,
|
|
3624
|
+
},
|
|
3412
3625
|
{ abortEarly: false, allowUnknown: false }
|
|
3413
3626
|
);
|
|
3414
3627
|
if (warrning) {
|
|
3415
3628
|
Logger({
|
|
3416
3629
|
level: "WARN",
|
|
3417
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
3630
|
+
message: `Parameter Validation warrnings for platform > Catalog > getApplicationProducts \n ${warrning}`,
|
|
3418
3631
|
});
|
|
3419
3632
|
}
|
|
3420
3633
|
|
|
3421
3634
|
const query_params = {};
|
|
3635
|
+
query_params["q"] = q;
|
|
3636
|
+
query_params["f"] = f;
|
|
3637
|
+
query_params["c"] = c;
|
|
3638
|
+
query_params["filters"] = filters;
|
|
3639
|
+
query_params["is_dependent"] = isDependent;
|
|
3640
|
+
query_params["sort_on"] = sortOn;
|
|
3641
|
+
query_params["page_id"] = pageId;
|
|
3642
|
+
query_params["page_size"] = pageSize;
|
|
3643
|
+
query_params["page_no"] = pageNo;
|
|
3644
|
+
query_params["page_type"] = pageType;
|
|
3645
|
+
query_params["item_ids"] = itemIds;
|
|
3422
3646
|
|
|
3423
3647
|
const response = await PlatformAPIClient.execute(
|
|
3424
3648
|
this.config,
|
|
3425
3649
|
"get",
|
|
3426
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3650
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`,
|
|
3427
3651
|
query_params,
|
|
3428
3652
|
undefined,
|
|
3429
3653
|
requestHeaders,
|
|
@@ -3437,7 +3661,7 @@ class Catalog {
|
|
|
3437
3661
|
|
|
3438
3662
|
const {
|
|
3439
3663
|
error: res_error,
|
|
3440
|
-
} = CatalogPlatformModel.
|
|
3664
|
+
} = CatalogPlatformModel.ApplicationProductListingResponseSchema().validate(
|
|
3441
3665
|
responseData,
|
|
3442
3666
|
{ abortEarly: false, allowUnknown: true }
|
|
3443
3667
|
);
|
|
@@ -3448,7 +3672,7 @@ class Catalog {
|
|
|
3448
3672
|
} else {
|
|
3449
3673
|
Logger({
|
|
3450
3674
|
level: "WARN",
|
|
3451
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
3675
|
+
message: `Response Validation Warnings for platform > Catalog > getApplicationProducts \n ${res_error}`,
|
|
3452
3676
|
});
|
|
3453
3677
|
}
|
|
3454
3678
|
}
|
|
@@ -3457,16 +3681,168 @@ class Catalog {
|
|
|
3457
3681
|
}
|
|
3458
3682
|
|
|
3459
3683
|
/**
|
|
3460
|
-
* @param {
|
|
3461
|
-
*
|
|
3684
|
+
* @param {Object} arg - Arg object.
|
|
3685
|
+
* @param {number} arg.companyId - A `company_id` is a unique identifier for
|
|
3686
|
+
* a particular seller account.
|
|
3687
|
+
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
3688
|
+
* identifier for a particular sale channel.
|
|
3689
|
+
* @param {string} [arg.q] - The search query. This can be a partial or
|
|
3690
|
+
* complete name of a either a product, brand or category
|
|
3691
|
+
* @param {string} [arg.f] - The search filter parameters. All the parameter
|
|
3692
|
+
* filtered from filter parameters will be passed in **f** parameter in
|
|
3693
|
+
* this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
|
|
3694
|
+
* @param {string} [arg.c] - The search filter parameters for collection
|
|
3695
|
+
* items. All the parameter filtered from filter parameters will be passed
|
|
3696
|
+
* in **c** parameter in this format.
|
|
3697
|
+
* **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
|
|
3698
|
+
* @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
|
|
3699
|
+
* filter details. This flag is used to fetch all filters
|
|
3700
|
+
* @param {boolean} [arg.isDependent] - This query parameter is used to get
|
|
3701
|
+
* the dependent products in the listing.
|
|
3702
|
+
* @param {string} [arg.sortOn] - The order to sort the list of products on.
|
|
3703
|
+
* Supported values include latest, popular, price_asc, price_dsc,
|
|
3704
|
+
* discount_asc, discount_dsc. Custom sort keys configured via listing
|
|
3705
|
+
* configuration (e.g., best_selling) are also supported for cohort-based sorting.
|
|
3706
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3707
|
+
* page. Default is 12.
|
|
3708
|
+
* @param {string[]} [arg.itemIds] - Item Ids of product
|
|
3709
|
+
* @returns {Paginator<CatalogPlatformModel.ApplicationProductListingResponseSchema>}
|
|
3710
|
+
* @summary: List sales channel products
|
|
3711
|
+
* @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order.
|
|
3712
|
+
*/
|
|
3713
|
+
getApplicationProductsPaginator({
|
|
3714
|
+
companyId,
|
|
3715
|
+
applicationId,
|
|
3716
|
+
q,
|
|
3717
|
+
f,
|
|
3718
|
+
c,
|
|
3719
|
+
filters,
|
|
3720
|
+
isDependent,
|
|
3721
|
+
sortOn,
|
|
3722
|
+
pageSize,
|
|
3723
|
+
itemIds,
|
|
3724
|
+
} = {}) {
|
|
3725
|
+
const paginator = new Paginator();
|
|
3726
|
+
const callback = async () => {
|
|
3727
|
+
const pageId = paginator.nextId;
|
|
3728
|
+
const pageNo = paginator.pageNo;
|
|
3729
|
+
const pageType = "cursor";
|
|
3730
|
+
const data = await this.getApplicationProducts({
|
|
3731
|
+
companyId: companyId,
|
|
3732
|
+
applicationId: applicationId,
|
|
3733
|
+
q: q,
|
|
3734
|
+
f: f,
|
|
3735
|
+
c: c,
|
|
3736
|
+
filters: filters,
|
|
3737
|
+
isDependent: isDependent,
|
|
3738
|
+
sortOn: sortOn,
|
|
3739
|
+
pageId: pageId,
|
|
3740
|
+
pageSize: pageSize,
|
|
3741
|
+
pageNo: pageNo,
|
|
3742
|
+
pageType: pageType,
|
|
3743
|
+
itemIds: itemIds,
|
|
3744
|
+
});
|
|
3745
|
+
paginator.setPaginator({
|
|
3746
|
+
hasNext: data.page.has_next ? true : false,
|
|
3747
|
+
nextId: data.page.next_id,
|
|
3748
|
+
});
|
|
3749
|
+
return data;
|
|
3750
|
+
};
|
|
3751
|
+
paginator.setCallback(callback.bind(this));
|
|
3752
|
+
return paginator;
|
|
3753
|
+
}
|
|
3754
|
+
|
|
3755
|
+
/**
|
|
3756
|
+
* @param {CatalogPlatformApplicationValidator.GetAutocompleteConfigParam} arg
|
|
3757
|
+
* - Arg object
|
|
3462
3758
|
*
|
|
3463
3759
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3464
3760
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3465
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3466
|
-
* Success response
|
|
3761
|
+
* @returns {Promise<CatalogPlatformModel.GetAutocompleteWordsResponseSchema>}
|
|
3762
|
+
* - Success response
|
|
3763
|
+
*
|
|
3764
|
+
* @name getAutocompleteConfig
|
|
3765
|
+
* @summary: Get autocomplete configuration
|
|
3766
|
+
* @description: Get custom autocomplete keyword configuration for a specific sales channel which allows you to map any endpoint with these keywords to give you the ultimate suggestion results. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAutocompleteConfig/).
|
|
3767
|
+
*/
|
|
3768
|
+
async getAutocompleteConfig(
|
|
3769
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
3770
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3771
|
+
) {
|
|
3772
|
+
const {
|
|
3773
|
+
error,
|
|
3774
|
+
} = CatalogPlatformApplicationValidator.getAutocompleteConfig().validate(
|
|
3775
|
+
{},
|
|
3776
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3777
|
+
);
|
|
3778
|
+
if (error) {
|
|
3779
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3783
|
+
const {
|
|
3784
|
+
error: warrning,
|
|
3785
|
+
} = CatalogPlatformApplicationValidator.getAutocompleteConfig().validate(
|
|
3786
|
+
{},
|
|
3787
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3788
|
+
);
|
|
3789
|
+
if (warrning) {
|
|
3790
|
+
Logger({
|
|
3791
|
+
level: "WARN",
|
|
3792
|
+
message: `Parameter Validation warrnings for platform > Catalog > getAutocompleteConfig \n ${warrning}`,
|
|
3793
|
+
});
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
const query_params = {};
|
|
3797
|
+
|
|
3798
|
+
const response = await PlatformAPIClient.execute(
|
|
3799
|
+
this.config,
|
|
3800
|
+
"get",
|
|
3801
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
|
|
3802
|
+
query_params,
|
|
3803
|
+
undefined,
|
|
3804
|
+
requestHeaders,
|
|
3805
|
+
{ responseHeaders }
|
|
3806
|
+
);
|
|
3807
|
+
|
|
3808
|
+
let responseData = response;
|
|
3809
|
+
if (responseHeaders) {
|
|
3810
|
+
responseData = response[0];
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3813
|
+
const {
|
|
3814
|
+
error: res_error,
|
|
3815
|
+
} = CatalogPlatformModel.GetAutocompleteWordsResponseSchema().validate(
|
|
3816
|
+
responseData,
|
|
3817
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3818
|
+
);
|
|
3819
|
+
|
|
3820
|
+
if (res_error) {
|
|
3821
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3822
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3823
|
+
} else {
|
|
3824
|
+
Logger({
|
|
3825
|
+
level: "WARN",
|
|
3826
|
+
message: `Response Validation Warnings for platform > Catalog > getAutocompleteConfig \n ${res_error}`,
|
|
3827
|
+
});
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
|
|
3831
|
+
return response;
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* @param {CatalogPlatformApplicationValidator.GetAutocompleteKeywordDetailParam} arg
|
|
3836
|
+
* - Arg object
|
|
3837
|
+
*
|
|
3838
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3839
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3840
|
+
* @returns {Promise<CatalogPlatformModel.GetAutocompleteWordsResponseSchema>}
|
|
3841
|
+
* - Success response
|
|
3842
|
+
*
|
|
3467
3843
|
* @name getAutocompleteKeywordDetail
|
|
3468
3844
|
* @summary: Get autocomplete keyword
|
|
3469
|
-
* @description: Retrieve detailed information about a specific autocomplete keyword for a specific sales channel by its id. - Check out [method documentation](https://
|
|
3845
|
+
* @description: Retrieve detailed information about a specific autocomplete keyword for a specific sales channel by its id. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAutocompleteKeywordDetail/).
|
|
3470
3846
|
*/
|
|
3471
3847
|
async getAutocompleteKeywordDetail(
|
|
3472
3848
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3519,7 +3895,7 @@ class Catalog {
|
|
|
3519
3895
|
|
|
3520
3896
|
const {
|
|
3521
3897
|
error: res_error,
|
|
3522
|
-
} = CatalogPlatformModel.
|
|
3898
|
+
} = CatalogPlatformModel.GetAutocompleteWordsResponseSchema().validate(
|
|
3523
3899
|
responseData,
|
|
3524
3900
|
{ abortEarly: false, allowUnknown: true }
|
|
3525
3901
|
);
|
|
@@ -3549,7 +3925,7 @@ class Catalog {
|
|
|
3549
3925
|
*
|
|
3550
3926
|
* @name getCatalogConfiguration
|
|
3551
3927
|
* @summary: Get catalog configuration meta data
|
|
3552
|
-
* @description: Retrieve configuration meta data for the catalog specific to a company and an sales channel. - Check out [method documentation](https://
|
|
3928
|
+
* @description: Retrieve configuration meta data for the catalog specific to a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getCatalogConfiguration/).
|
|
3553
3929
|
*/
|
|
3554
3930
|
async getCatalogConfiguration(
|
|
3555
3931
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -3623,10 +3999,11 @@ class Catalog {
|
|
|
3623
3999
|
*
|
|
3624
4000
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3625
4001
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3626
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4002
|
+
* @returns {Promise<CatalogPlatformModel.CatalogInsightResponseSchema>} -
|
|
4003
|
+
* Success response
|
|
3627
4004
|
* @name getCatalogInsights
|
|
3628
4005
|
* @summary: Get catalog counts
|
|
3629
|
-
* @description: Retrieve the count of catalog related data like products, brands, departments and categories that have been made live as per configuration of the sales channel. - Check out [method documentation](https://
|
|
4006
|
+
* @description: Retrieve the count of catalog related data like products, brands, departments and categories that have been made live as per configuration of the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getCatalogInsights/).
|
|
3630
4007
|
*/
|
|
3631
4008
|
async getCatalogInsights(
|
|
3632
4009
|
{ brand, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3680,10 +4057,10 @@ class Catalog {
|
|
|
3680
4057
|
|
|
3681
4058
|
const {
|
|
3682
4059
|
error: res_error,
|
|
3683
|
-
} = CatalogPlatformModel.
|
|
3684
|
-
|
|
3685
|
-
allowUnknown: true
|
|
3686
|
-
|
|
4060
|
+
} = CatalogPlatformModel.CatalogInsightResponseSchema().validate(
|
|
4061
|
+
responseData,
|
|
4062
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4063
|
+
);
|
|
3687
4064
|
|
|
3688
4065
|
if (res_error) {
|
|
3689
4066
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3703,10 +4080,11 @@ class Catalog {
|
|
|
3703
4080
|
* @param {CatalogPlatformApplicationValidator.GetCategoriesParam} arg - Arg object
|
|
3704
4081
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3705
4082
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3706
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4083
|
+
* @returns {Promise<CatalogPlatformModel.CategoryListingResponseSchema>} -
|
|
4084
|
+
* Success response
|
|
3707
4085
|
* @name getCategories
|
|
3708
4086
|
* @summary: List categories
|
|
3709
|
-
* @description: Retrieve a list of categories associated to company and sales channel. user can filter on departments. - Check out [method documentation](https://
|
|
4087
|
+
* @description: Retrieve a list of categories associated to company and sales channel. user can filter on departments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getCategories/).
|
|
3710
4088
|
*/
|
|
3711
4089
|
async getCategories(
|
|
3712
4090
|
{ department, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3760,10 +4138,10 @@ class Catalog {
|
|
|
3760
4138
|
|
|
3761
4139
|
const {
|
|
3762
4140
|
error: res_error,
|
|
3763
|
-
} = CatalogPlatformModel.
|
|
3764
|
-
|
|
3765
|
-
allowUnknown: true
|
|
3766
|
-
|
|
4141
|
+
} = CatalogPlatformModel.CategoryListingResponseSchema().validate(
|
|
4142
|
+
responseData,
|
|
4143
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4144
|
+
);
|
|
3767
4145
|
|
|
3768
4146
|
if (res_error) {
|
|
3769
4147
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3785,11 +4163,12 @@ class Catalog {
|
|
|
3785
4163
|
*
|
|
3786
4164
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3787
4165
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3788
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3789
|
-
* Success response
|
|
4166
|
+
* @returns {Promise<CatalogPlatformModel.GetCollectionDetailResponseSchema>}
|
|
4167
|
+
* - Success response
|
|
4168
|
+
*
|
|
3790
4169
|
* @name getCollectionDetail
|
|
3791
4170
|
* @summary: Get a collection
|
|
3792
|
-
* @description: Get the details of a collection by its slug. - Check out [method documentation](https://
|
|
4171
|
+
* @description: Get the details of a collection by its slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getCollectionDetail/).
|
|
3793
4172
|
*/
|
|
3794
4173
|
async getCollectionDetail(
|
|
3795
4174
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3842,7 +4221,7 @@ class Catalog {
|
|
|
3842
4221
|
|
|
3843
4222
|
const {
|
|
3844
4223
|
error: res_error,
|
|
3845
|
-
} = CatalogPlatformModel.
|
|
4224
|
+
} = CatalogPlatformModel.GetCollectionDetailResponseSchema().validate(
|
|
3846
4225
|
responseData,
|
|
3847
4226
|
{ abortEarly: false, allowUnknown: true }
|
|
3848
4227
|
);
|
|
@@ -3867,24 +4246,27 @@ class Catalog {
|
|
|
3867
4246
|
*
|
|
3868
4247
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3869
4248
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3870
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
3871
|
-
* Success response
|
|
4249
|
+
* @returns {Promise<CatalogPlatformModel.GetCollectionItemsResponseSchemaV2>}
|
|
4250
|
+
* - Success response
|
|
4251
|
+
*
|
|
3872
4252
|
* @name getCollectionItems
|
|
3873
4253
|
* @summary: List items of collection
|
|
3874
|
-
* @description: Get items from a collection specified by its
|
|
4254
|
+
* @description: Get items from a collection specified by its collection_id with enhanced search capabilities. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getCollectionItems/).
|
|
3875
4255
|
*/
|
|
3876
4256
|
async getCollectionItems(
|
|
3877
|
-
{
|
|
4257
|
+
{ collectionId, pageNo, pageSize, q, requestHeaders } = {
|
|
4258
|
+
requestHeaders: {},
|
|
4259
|
+
},
|
|
3878
4260
|
{ responseHeaders } = { responseHeaders: false }
|
|
3879
4261
|
) {
|
|
3880
4262
|
const {
|
|
3881
4263
|
error,
|
|
3882
4264
|
} = CatalogPlatformApplicationValidator.getCollectionItems().validate(
|
|
3883
4265
|
{
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
pageId,
|
|
4266
|
+
collectionId,
|
|
4267
|
+
pageNo,
|
|
3887
4268
|
pageSize,
|
|
4269
|
+
q,
|
|
3888
4270
|
},
|
|
3889
4271
|
{ abortEarly: false, allowUnknown: true }
|
|
3890
4272
|
);
|
|
@@ -3897,10 +4279,10 @@ class Catalog {
|
|
|
3897
4279
|
error: warrning,
|
|
3898
4280
|
} = CatalogPlatformApplicationValidator.getCollectionItems().validate(
|
|
3899
4281
|
{
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
pageId,
|
|
4282
|
+
collectionId,
|
|
4283
|
+
pageNo,
|
|
3903
4284
|
pageSize,
|
|
4285
|
+
q,
|
|
3904
4286
|
},
|
|
3905
4287
|
{ abortEarly: false, allowUnknown: false }
|
|
3906
4288
|
);
|
|
@@ -3912,14 +4294,14 @@ class Catalog {
|
|
|
3912
4294
|
}
|
|
3913
4295
|
|
|
3914
4296
|
const query_params = {};
|
|
3915
|
-
query_params["
|
|
3916
|
-
query_params["page_id"] = pageId;
|
|
4297
|
+
query_params["page_no"] = pageNo;
|
|
3917
4298
|
query_params["page_size"] = pageSize;
|
|
4299
|
+
query_params["q"] = q;
|
|
3918
4300
|
|
|
3919
4301
|
const response = await PlatformAPIClient.execute(
|
|
3920
4302
|
this.config,
|
|
3921
4303
|
"get",
|
|
3922
|
-
`/service/platform/catalog/
|
|
4304
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${collectionId}/items/`,
|
|
3923
4305
|
query_params,
|
|
3924
4306
|
undefined,
|
|
3925
4307
|
requestHeaders,
|
|
@@ -3933,7 +4315,7 @@ class Catalog {
|
|
|
3933
4315
|
|
|
3934
4316
|
const {
|
|
3935
4317
|
error: res_error,
|
|
3936
|
-
} = CatalogPlatformModel.
|
|
4318
|
+
} = CatalogPlatformModel.GetCollectionItemsResponseSchemaV2().validate(
|
|
3937
4319
|
responseData,
|
|
3938
4320
|
{ abortEarly: false, allowUnknown: true }
|
|
3939
4321
|
);
|
|
@@ -3963,10 +4345,10 @@ class Catalog {
|
|
|
3963
4345
|
*
|
|
3964
4346
|
* @name getConfigurationByType
|
|
3965
4347
|
* @summary: Get configuration
|
|
3966
|
-
* @description: Retrieve configuration details based on a specific type in the catalog for a company and an sales channel. - Check out [method documentation](https://
|
|
4348
|
+
* @description: Retrieve configuration details based on a specific type in the catalog for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getConfigurationByType/).
|
|
3967
4349
|
*/
|
|
3968
4350
|
async getConfigurationByType(
|
|
3969
|
-
{ type, requestHeaders } = { requestHeaders: {} },
|
|
4351
|
+
{ type, includeInactive, requestHeaders } = { requestHeaders: {} },
|
|
3970
4352
|
{ responseHeaders } = { responseHeaders: false }
|
|
3971
4353
|
) {
|
|
3972
4354
|
const {
|
|
@@ -3974,6 +4356,7 @@ class Catalog {
|
|
|
3974
4356
|
} = CatalogPlatformApplicationValidator.getConfigurationByType().validate(
|
|
3975
4357
|
{
|
|
3976
4358
|
type,
|
|
4359
|
+
includeInactive,
|
|
3977
4360
|
},
|
|
3978
4361
|
{ abortEarly: false, allowUnknown: true }
|
|
3979
4362
|
);
|
|
@@ -3987,6 +4370,7 @@ class Catalog {
|
|
|
3987
4370
|
} = CatalogPlatformApplicationValidator.getConfigurationByType().validate(
|
|
3988
4371
|
{
|
|
3989
4372
|
type,
|
|
4373
|
+
includeInactive,
|
|
3990
4374
|
},
|
|
3991
4375
|
{ abortEarly: false, allowUnknown: false }
|
|
3992
4376
|
);
|
|
@@ -3998,6 +4382,7 @@ class Catalog {
|
|
|
3998
4382
|
}
|
|
3999
4383
|
|
|
4000
4384
|
const query_params = {};
|
|
4385
|
+
query_params["include_inactive"] = includeInactive;
|
|
4001
4386
|
|
|
4002
4387
|
const response = await PlatformAPIClient.execute(
|
|
4003
4388
|
this.config,
|
|
@@ -4041,11 +4426,12 @@ class Catalog {
|
|
|
4041
4426
|
*
|
|
4042
4427
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4043
4428
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4044
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4045
|
-
* Success response
|
|
4429
|
+
* @returns {Promise<CatalogPlatformModel.GetConfigMetadataResponseSchema>}
|
|
4430
|
+
* - Success response
|
|
4431
|
+
*
|
|
4046
4432
|
* @name getConfigurationMetadata
|
|
4047
4433
|
* @summary: Get configuration metadata
|
|
4048
|
-
* @description: Retrieve the configuraion metadata details for specific config_type for a company and an sales channel. - Check out [method documentation](https://
|
|
4434
|
+
* @description: Retrieve the configuraion metadata details for specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getConfigurationMetadata/).
|
|
4049
4435
|
*/
|
|
4050
4436
|
async getConfigurationMetadata(
|
|
4051
4437
|
{ configType, templateSlug, pageNo, pageSize, q, requestHeaders } = {
|
|
@@ -4112,7 +4498,7 @@ class Catalog {
|
|
|
4112
4498
|
|
|
4113
4499
|
const {
|
|
4114
4500
|
error: res_error,
|
|
4115
|
-
} = CatalogPlatformModel.
|
|
4501
|
+
} = CatalogPlatformModel.GetConfigMetadataResponseSchema().validate(
|
|
4116
4502
|
responseData,
|
|
4117
4503
|
{ abortEarly: false, allowUnknown: true }
|
|
4118
4504
|
);
|
|
@@ -4141,7 +4527,7 @@ class Catalog {
|
|
|
4141
4527
|
* Success response
|
|
4142
4528
|
* @name getConfigurations
|
|
4143
4529
|
* @summary: Get product configurations
|
|
4144
|
-
* @description: Retrieve a detailed configurations for product catalog specific to a company and an sales channel. - Check out [method documentation](https://
|
|
4530
|
+
* @description: Retrieve a detailed configurations for product catalog specific to a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getConfigurations/).
|
|
4145
4531
|
*/
|
|
4146
4532
|
async getConfigurations(
|
|
4147
4533
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4213,10 +4599,11 @@ class Catalog {
|
|
|
4213
4599
|
* @param {CatalogPlatformApplicationValidator.GetDepartmentsParam} arg - Arg object
|
|
4214
4600
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4215
4601
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4216
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4602
|
+
* @returns {Promise<CatalogPlatformModel.DepartmentResponseSchema>} -
|
|
4603
|
+
* Success response
|
|
4217
4604
|
* @name getDepartments
|
|
4218
4605
|
* @summary: List departments
|
|
4219
|
-
* @description: Retrieve a list of departments associated with a comapny and sales channel. - Check out [method documentation](https://
|
|
4606
|
+
* @description: Retrieve a list of departments associated with a comapny and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getDepartments/).
|
|
4220
4607
|
*/
|
|
4221
4608
|
async getDepartments(
|
|
4222
4609
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4265,7 +4652,7 @@ class Catalog {
|
|
|
4265
4652
|
|
|
4266
4653
|
const {
|
|
4267
4654
|
error: res_error,
|
|
4268
|
-
} = CatalogPlatformModel.
|
|
4655
|
+
} = CatalogPlatformModel.DepartmentResponseSchema().validate(responseData, {
|
|
4269
4656
|
abortEarly: false,
|
|
4270
4657
|
allowUnknown: true,
|
|
4271
4658
|
});
|
|
@@ -4290,12 +4677,12 @@ class Catalog {
|
|
|
4290
4677
|
*
|
|
4291
4678
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4292
4679
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4293
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4680
|
+
* @returns {Promise<CatalogPlatformModel.ApplicationInventorySellerIdentifierResponsePaginated>}
|
|
4294
4681
|
* - Success response
|
|
4295
4682
|
*
|
|
4296
4683
|
* @name getDiscountedInventoryBySizeIdentifier
|
|
4297
4684
|
* @summary: Get discounted inventory
|
|
4298
|
-
* @description: Allows to retrieve Inventory data for particular company grouped by size and store. - Check out [method documentation](https://
|
|
4685
|
+
* @description: Allows to retrieve Inventory data for particular company grouped by size and store. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getDiscountedInventoryBySizeIdentifier/).
|
|
4299
4686
|
*/
|
|
4300
4687
|
async getDiscountedInventoryBySizeIdentifier(
|
|
4301
4688
|
{
|
|
@@ -4303,7 +4690,6 @@ class Catalog {
|
|
|
4303
4690
|
sizeIdentifier,
|
|
4304
4691
|
pageNo,
|
|
4305
4692
|
pageSize,
|
|
4306
|
-
q,
|
|
4307
4693
|
locationIds,
|
|
4308
4694
|
requestHeaders,
|
|
4309
4695
|
} = { requestHeaders: {} },
|
|
@@ -4317,7 +4703,6 @@ class Catalog {
|
|
|
4317
4703
|
sizeIdentifier,
|
|
4318
4704
|
pageNo,
|
|
4319
4705
|
pageSize,
|
|
4320
|
-
q,
|
|
4321
4706
|
locationIds,
|
|
4322
4707
|
},
|
|
4323
4708
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -4335,7 +4720,6 @@ class Catalog {
|
|
|
4335
4720
|
sizeIdentifier,
|
|
4336
4721
|
pageNo,
|
|
4337
4722
|
pageSize,
|
|
4338
|
-
q,
|
|
4339
4723
|
locationIds,
|
|
4340
4724
|
},
|
|
4341
4725
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -4350,7 +4734,6 @@ class Catalog {
|
|
|
4350
4734
|
const query_params = {};
|
|
4351
4735
|
query_params["page_no"] = pageNo;
|
|
4352
4736
|
query_params["page_size"] = pageSize;
|
|
4353
|
-
query_params["q"] = q;
|
|
4354
4737
|
query_params["location_ids"] = locationIds;
|
|
4355
4738
|
|
|
4356
4739
|
const response = await PlatformAPIClient.execute(
|
|
@@ -4370,7 +4753,7 @@ class Catalog {
|
|
|
4370
4753
|
|
|
4371
4754
|
const {
|
|
4372
4755
|
error: res_error,
|
|
4373
|
-
} = CatalogPlatformModel.
|
|
4756
|
+
} = CatalogPlatformModel.ApplicationInventorySellerIdentifierResponsePaginated().validate(
|
|
4374
4757
|
responseData,
|
|
4375
4758
|
{ abortEarly: false, allowUnknown: true }
|
|
4376
4759
|
);
|
|
@@ -4391,17 +4774,18 @@ class Catalog {
|
|
|
4391
4774
|
|
|
4392
4775
|
/**
|
|
4393
4776
|
* @param {Object} arg - Arg object.
|
|
4394
|
-
* @param {number} arg.companyId -
|
|
4395
|
-
*
|
|
4396
|
-
* @param {string} arg.applicationId -
|
|
4397
|
-
*
|
|
4398
|
-
* @param {
|
|
4399
|
-
*
|
|
4777
|
+
* @param {number} arg.companyId - A `company_id` is a unique identifier for
|
|
4778
|
+
* a particular seller account.
|
|
4779
|
+
* @param {string} arg.applicationId - A `application_id` is a unique
|
|
4780
|
+
* identifier for a particular sale channel.
|
|
4781
|
+
* @param {number} arg.itemId - A `item_id` is a unique identifier for a
|
|
4782
|
+
* specific product.
|
|
4783
|
+
* @param {number} arg.sizeIdentifier - Size Identifier (Seller Identifier
|
|
4784
|
+
* or Primary Identifier).
|
|
4400
4785
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
4401
4786
|
* page. Default is 12.
|
|
4402
|
-
* @param {string} [arg.q] - Search with help of store code.
|
|
4403
4787
|
* @param {number[]} [arg.locationIds] - Search by store ids.
|
|
4404
|
-
* @returns {Paginator<CatalogPlatformModel.
|
|
4788
|
+
* @returns {Paginator<CatalogPlatformModel.ApplicationInventorySellerIdentifierResponsePaginated>}
|
|
4405
4789
|
* @summary: Get discounted inventory
|
|
4406
4790
|
* @description: Allows to retrieve Inventory data for particular company grouped by size and store.
|
|
4407
4791
|
*/
|
|
@@ -4411,7 +4795,6 @@ class Catalog {
|
|
|
4411
4795
|
itemId,
|
|
4412
4796
|
sizeIdentifier,
|
|
4413
4797
|
pageSize,
|
|
4414
|
-
q,
|
|
4415
4798
|
locationIds,
|
|
4416
4799
|
} = {}) {
|
|
4417
4800
|
const paginator = new Paginator();
|
|
@@ -4426,7 +4809,6 @@ class Catalog {
|
|
|
4426
4809
|
sizeIdentifier: sizeIdentifier,
|
|
4427
4810
|
pageNo: pageNo,
|
|
4428
4811
|
pageSize: pageSize,
|
|
4429
|
-
q: q,
|
|
4430
4812
|
locationIds: locationIds,
|
|
4431
4813
|
});
|
|
4432
4814
|
paginator.setPaginator({
|
|
@@ -4440,31 +4822,28 @@ class Catalog {
|
|
|
4440
4822
|
}
|
|
4441
4823
|
|
|
4442
4824
|
/**
|
|
4443
|
-
* @param {CatalogPlatformApplicationValidator.
|
|
4825
|
+
* @param {CatalogPlatformApplicationValidator.GetFollowedProductsParam} arg
|
|
4444
4826
|
* - Arg object
|
|
4445
4827
|
*
|
|
4446
4828
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4447
4829
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4448
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4449
|
-
* @name
|
|
4450
|
-
* @summary:
|
|
4451
|
-
* @description:
|
|
4830
|
+
* @returns {Promise<CatalogPlatformModel.FollowedProducts>} - Success response
|
|
4831
|
+
* @name getFollowedProducts
|
|
4832
|
+
* @summary: Retrieve followed products by user
|
|
4833
|
+
* @description: List all product ids a user has wishlisted or is following for sales channel.
|
|
4834
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getFollowedProducts/).
|
|
4452
4835
|
*/
|
|
4453
|
-
async
|
|
4454
|
-
{
|
|
4455
|
-
requestHeaders: {},
|
|
4456
|
-
},
|
|
4836
|
+
async getFollowedProducts(
|
|
4837
|
+
{ userId, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
4457
4838
|
{ responseHeaders } = { responseHeaders: false }
|
|
4458
4839
|
) {
|
|
4459
4840
|
const {
|
|
4460
4841
|
error,
|
|
4461
|
-
} = CatalogPlatformApplicationValidator.
|
|
4842
|
+
} = CatalogPlatformApplicationValidator.getFollowedProducts().validate(
|
|
4462
4843
|
{
|
|
4463
|
-
|
|
4464
|
-
|
|
4844
|
+
userId,
|
|
4845
|
+
pageId,
|
|
4465
4846
|
pageSize,
|
|
4466
|
-
search,
|
|
4467
|
-
templateSlug,
|
|
4468
4847
|
},
|
|
4469
4848
|
{ abortEarly: false, allowUnknown: true }
|
|
4470
4849
|
);
|
|
@@ -4475,33 +4854,29 @@ class Catalog {
|
|
|
4475
4854
|
// Showing warrnings if extra unknown parameters are found
|
|
4476
4855
|
const {
|
|
4477
4856
|
error: warrning,
|
|
4478
|
-
} = CatalogPlatformApplicationValidator.
|
|
4857
|
+
} = CatalogPlatformApplicationValidator.getFollowedProducts().validate(
|
|
4479
4858
|
{
|
|
4480
|
-
|
|
4481
|
-
|
|
4859
|
+
userId,
|
|
4860
|
+
pageId,
|
|
4482
4861
|
pageSize,
|
|
4483
|
-
search,
|
|
4484
|
-
templateSlug,
|
|
4485
4862
|
},
|
|
4486
4863
|
{ abortEarly: false, allowUnknown: false }
|
|
4487
4864
|
);
|
|
4488
4865
|
if (warrning) {
|
|
4489
4866
|
Logger({
|
|
4490
4867
|
level: "WARN",
|
|
4491
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
4868
|
+
message: `Parameter Validation warrnings for platform > Catalog > getFollowedProducts \n ${warrning}`,
|
|
4492
4869
|
});
|
|
4493
4870
|
}
|
|
4494
4871
|
|
|
4495
4872
|
const query_params = {};
|
|
4496
|
-
query_params["
|
|
4873
|
+
query_params["page_id"] = pageId;
|
|
4497
4874
|
query_params["page_size"] = pageSize;
|
|
4498
|
-
query_params["search"] = search;
|
|
4499
|
-
query_params["template_slug"] = templateSlug;
|
|
4500
4875
|
|
|
4501
4876
|
const response = await PlatformAPIClient.execute(
|
|
4502
4877
|
this.config,
|
|
4503
4878
|
"get",
|
|
4504
|
-
`/service/platform/catalog/
|
|
4879
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user/${userId}/products/follow`,
|
|
4505
4880
|
query_params,
|
|
4506
4881
|
undefined,
|
|
4507
4882
|
requestHeaders,
|
|
@@ -4515,7 +4890,7 @@ class Catalog {
|
|
|
4515
4890
|
|
|
4516
4891
|
const {
|
|
4517
4892
|
error: res_error,
|
|
4518
|
-
} = CatalogPlatformModel.
|
|
4893
|
+
} = CatalogPlatformModel.FollowedProducts().validate(responseData, {
|
|
4519
4894
|
abortEarly: false,
|
|
4520
4895
|
allowUnknown: true,
|
|
4521
4896
|
});
|
|
@@ -4526,7 +4901,7 @@ class Catalog {
|
|
|
4526
4901
|
} else {
|
|
4527
4902
|
Logger({
|
|
4528
4903
|
level: "WARN",
|
|
4529
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
4904
|
+
message: `Response Validation Warnings for platform > Catalog > getFollowedProducts \n ${res_error}`,
|
|
4530
4905
|
});
|
|
4531
4906
|
}
|
|
4532
4907
|
}
|
|
@@ -4535,30 +4910,487 @@ class Catalog {
|
|
|
4535
4910
|
}
|
|
4536
4911
|
|
|
4537
4912
|
/**
|
|
4538
|
-
* @param {CatalogPlatformApplicationValidator.
|
|
4913
|
+
* @param {CatalogPlatformApplicationValidator.GetGroupConfigurationsParam} arg
|
|
4539
4914
|
* - Arg object
|
|
4540
4915
|
*
|
|
4541
4916
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4542
4917
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4543
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4544
|
-
* @name
|
|
4545
|
-
* @summary: Get
|
|
4546
|
-
* @description: Retrieve product
|
|
4918
|
+
* @returns {Promise<CatalogPlatformModel.GetConfigResponseSchema>} - Success response
|
|
4919
|
+
* @name getGroupConfigurations
|
|
4920
|
+
* @summary: Get group configurations
|
|
4921
|
+
* @description: Retrieve the details of product group configurations based on config types for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getGroupConfigurations/).
|
|
4547
4922
|
*/
|
|
4548
|
-
async
|
|
4549
|
-
{ configType, pageNo, pageSize, search, requestHeaders } = {
|
|
4923
|
+
async getGroupConfigurations(
|
|
4924
|
+
{ configType, pageNo, pageSize, search, templateSlug, requestHeaders } = {
|
|
4550
4925
|
requestHeaders: {},
|
|
4551
4926
|
},
|
|
4552
4927
|
{ responseHeaders } = { responseHeaders: false }
|
|
4553
4928
|
) {
|
|
4554
4929
|
const {
|
|
4555
4930
|
error,
|
|
4556
|
-
} = CatalogPlatformApplicationValidator.
|
|
4931
|
+
} = CatalogPlatformApplicationValidator.getGroupConfigurations().validate(
|
|
4932
|
+
{
|
|
4933
|
+
configType,
|
|
4934
|
+
pageNo,
|
|
4935
|
+
pageSize,
|
|
4936
|
+
search,
|
|
4937
|
+
templateSlug,
|
|
4938
|
+
},
|
|
4939
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4940
|
+
);
|
|
4941
|
+
if (error) {
|
|
4942
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4943
|
+
}
|
|
4944
|
+
|
|
4945
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4946
|
+
const {
|
|
4947
|
+
error: warrning,
|
|
4948
|
+
} = CatalogPlatformApplicationValidator.getGroupConfigurations().validate(
|
|
4949
|
+
{
|
|
4950
|
+
configType,
|
|
4951
|
+
pageNo,
|
|
4952
|
+
pageSize,
|
|
4953
|
+
search,
|
|
4954
|
+
templateSlug,
|
|
4955
|
+
},
|
|
4956
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4957
|
+
);
|
|
4958
|
+
if (warrning) {
|
|
4959
|
+
Logger({
|
|
4960
|
+
level: "WARN",
|
|
4961
|
+
message: `Parameter Validation warrnings for platform > Catalog > getGroupConfigurations \n ${warrning}`,
|
|
4962
|
+
});
|
|
4963
|
+
}
|
|
4964
|
+
|
|
4965
|
+
const query_params = {};
|
|
4966
|
+
query_params["page_no"] = pageNo;
|
|
4967
|
+
query_params["page_size"] = pageSize;
|
|
4968
|
+
query_params["search"] = search;
|
|
4969
|
+
query_params["template_slug"] = templateSlug;
|
|
4970
|
+
|
|
4971
|
+
const response = await PlatformAPIClient.execute(
|
|
4972
|
+
this.config,
|
|
4973
|
+
"get",
|
|
4974
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
|
|
4975
|
+
query_params,
|
|
4976
|
+
undefined,
|
|
4977
|
+
requestHeaders,
|
|
4978
|
+
{ responseHeaders }
|
|
4979
|
+
);
|
|
4980
|
+
|
|
4981
|
+
let responseData = response;
|
|
4982
|
+
if (responseHeaders) {
|
|
4983
|
+
responseData = response[0];
|
|
4984
|
+
}
|
|
4985
|
+
|
|
4986
|
+
const {
|
|
4987
|
+
error: res_error,
|
|
4988
|
+
} = CatalogPlatformModel.GetConfigResponseSchema().validate(responseData, {
|
|
4989
|
+
abortEarly: false,
|
|
4990
|
+
allowUnknown: true,
|
|
4991
|
+
});
|
|
4992
|
+
|
|
4993
|
+
if (res_error) {
|
|
4994
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4995
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4996
|
+
} else {
|
|
4997
|
+
Logger({
|
|
4998
|
+
level: "WARN",
|
|
4999
|
+
message: `Response Validation Warnings for platform > Catalog > getGroupConfigurations \n ${res_error}`,
|
|
5000
|
+
});
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
|
|
5004
|
+
return response;
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
/**
|
|
5008
|
+
* @param {CatalogPlatformApplicationValidator.GetListingConfigurationsParam} arg
|
|
5009
|
+
* - Arg object
|
|
5010
|
+
*
|
|
5011
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5012
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5013
|
+
* @returns {Promise<CatalogPlatformModel.GetConfigResponseSchema>} - Success response
|
|
5014
|
+
* @name getListingConfigurations
|
|
5015
|
+
* @summary: Get listing configurations
|
|
5016
|
+
* @description: Retrieve product listing configurations based on specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getListingConfigurations/).
|
|
5017
|
+
*/
|
|
5018
|
+
async getListingConfigurations(
|
|
5019
|
+
{ configType, pageNo, pageSize, search, requestHeaders } = {
|
|
5020
|
+
requestHeaders: {},
|
|
5021
|
+
},
|
|
5022
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5023
|
+
) {
|
|
5024
|
+
const {
|
|
5025
|
+
error,
|
|
5026
|
+
} = CatalogPlatformApplicationValidator.getListingConfigurations().validate(
|
|
5027
|
+
{
|
|
5028
|
+
configType,
|
|
5029
|
+
pageNo,
|
|
5030
|
+
pageSize,
|
|
5031
|
+
search,
|
|
5032
|
+
},
|
|
5033
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5034
|
+
);
|
|
5035
|
+
if (error) {
|
|
5036
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5037
|
+
}
|
|
5038
|
+
|
|
5039
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5040
|
+
const {
|
|
5041
|
+
error: warrning,
|
|
5042
|
+
} = CatalogPlatformApplicationValidator.getListingConfigurations().validate(
|
|
5043
|
+
{
|
|
5044
|
+
configType,
|
|
5045
|
+
pageNo,
|
|
5046
|
+
pageSize,
|
|
5047
|
+
search,
|
|
5048
|
+
},
|
|
5049
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5050
|
+
);
|
|
5051
|
+
if (warrning) {
|
|
5052
|
+
Logger({
|
|
5053
|
+
level: "WARN",
|
|
5054
|
+
message: `Parameter Validation warrnings for platform > Catalog > getListingConfigurations \n ${warrning}`,
|
|
5055
|
+
});
|
|
5056
|
+
}
|
|
5057
|
+
|
|
5058
|
+
const query_params = {};
|
|
5059
|
+
query_params["page_no"] = pageNo;
|
|
5060
|
+
query_params["page_size"] = pageSize;
|
|
5061
|
+
query_params["search"] = search;
|
|
5062
|
+
|
|
5063
|
+
const response = await PlatformAPIClient.execute(
|
|
5064
|
+
this.config,
|
|
5065
|
+
"get",
|
|
5066
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
|
|
5067
|
+
query_params,
|
|
5068
|
+
undefined,
|
|
5069
|
+
requestHeaders,
|
|
5070
|
+
{ responseHeaders }
|
|
5071
|
+
);
|
|
5072
|
+
|
|
5073
|
+
let responseData = response;
|
|
5074
|
+
if (responseHeaders) {
|
|
5075
|
+
responseData = response[0];
|
|
5076
|
+
}
|
|
5077
|
+
|
|
5078
|
+
const {
|
|
5079
|
+
error: res_error,
|
|
5080
|
+
} = CatalogPlatformModel.GetConfigResponseSchema().validate(responseData, {
|
|
5081
|
+
abortEarly: false,
|
|
5082
|
+
allowUnknown: true,
|
|
5083
|
+
});
|
|
5084
|
+
|
|
5085
|
+
if (res_error) {
|
|
5086
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5087
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5088
|
+
} else {
|
|
5089
|
+
Logger({
|
|
5090
|
+
level: "WARN",
|
|
5091
|
+
message: `Response Validation Warnings for platform > Catalog > getListingConfigurations \n ${res_error}`,
|
|
5092
|
+
});
|
|
5093
|
+
}
|
|
5094
|
+
}
|
|
5095
|
+
|
|
5096
|
+
return response;
|
|
5097
|
+
}
|
|
5098
|
+
|
|
5099
|
+
/**
|
|
5100
|
+
* @param {CatalogPlatformApplicationValidator.GetPriceFactoriesParam} arg
|
|
5101
|
+
* - Arg object
|
|
5102
|
+
*
|
|
5103
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5104
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5105
|
+
* @returns {Promise<CatalogPlatformModel.PriceFactoryListResponseSchema>}
|
|
5106
|
+
* - Success response
|
|
5107
|
+
*
|
|
5108
|
+
* @name getPriceFactories
|
|
5109
|
+
* @summary: Retrieve Price Factories for an Application
|
|
5110
|
+
* @description: Fetches a paginated list of price factories configured for the specified application within a company. Supports optional filters such as brand IDs, category IDs, seller identifier, item code, slug, and name to narrow down the results.
|
|
5111
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getPriceFactories/).
|
|
5112
|
+
*/
|
|
5113
|
+
async getPriceFactories(
|
|
5114
|
+
{ q, requestHeaders } = { requestHeaders: {} },
|
|
5115
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5116
|
+
) {
|
|
5117
|
+
const {
|
|
5118
|
+
error,
|
|
5119
|
+
} = CatalogPlatformApplicationValidator.getPriceFactories().validate(
|
|
5120
|
+
{
|
|
5121
|
+
q,
|
|
5122
|
+
},
|
|
5123
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5124
|
+
);
|
|
5125
|
+
if (error) {
|
|
5126
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5127
|
+
}
|
|
5128
|
+
|
|
5129
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5130
|
+
const {
|
|
5131
|
+
error: warrning,
|
|
5132
|
+
} = CatalogPlatformApplicationValidator.getPriceFactories().validate(
|
|
5133
|
+
{
|
|
5134
|
+
q,
|
|
5135
|
+
},
|
|
5136
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5137
|
+
);
|
|
5138
|
+
if (warrning) {
|
|
5139
|
+
Logger({
|
|
5140
|
+
level: "WARN",
|
|
5141
|
+
message: `Parameter Validation warrnings for platform > Catalog > getPriceFactories \n ${warrning}`,
|
|
5142
|
+
});
|
|
5143
|
+
}
|
|
5144
|
+
|
|
5145
|
+
const query_params = {};
|
|
5146
|
+
query_params["q"] = q;
|
|
5147
|
+
|
|
5148
|
+
const response = await PlatformAPIClient.execute(
|
|
5149
|
+
this.config,
|
|
5150
|
+
"get",
|
|
5151
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/list`,
|
|
5152
|
+
query_params,
|
|
5153
|
+
undefined,
|
|
5154
|
+
requestHeaders,
|
|
5155
|
+
{ responseHeaders }
|
|
5156
|
+
);
|
|
5157
|
+
|
|
5158
|
+
let responseData = response;
|
|
5159
|
+
if (responseHeaders) {
|
|
5160
|
+
responseData = response[0];
|
|
5161
|
+
}
|
|
5162
|
+
|
|
5163
|
+
const {
|
|
5164
|
+
error: res_error,
|
|
5165
|
+
} = CatalogPlatformModel.PriceFactoryListResponseSchema().validate(
|
|
5166
|
+
responseData,
|
|
5167
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5168
|
+
);
|
|
5169
|
+
|
|
5170
|
+
if (res_error) {
|
|
5171
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5172
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5173
|
+
} else {
|
|
5174
|
+
Logger({
|
|
5175
|
+
level: "WARN",
|
|
5176
|
+
message: `Response Validation Warnings for platform > Catalog > getPriceFactories \n ${res_error}`,
|
|
5177
|
+
});
|
|
5178
|
+
}
|
|
5179
|
+
}
|
|
5180
|
+
|
|
5181
|
+
return response;
|
|
5182
|
+
}
|
|
5183
|
+
|
|
5184
|
+
/**
|
|
5185
|
+
* @param {CatalogPlatformApplicationValidator.GetPriceFactoryParam} arg - Arg object
|
|
5186
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5187
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5188
|
+
* @returns {Promise<CatalogPlatformModel.PriceFactoryConfigSchema>} -
|
|
5189
|
+
* Success response
|
|
5190
|
+
* @name getPriceFactory
|
|
5191
|
+
* @summary: Retrieve a Specific Price Factory Configuration
|
|
5192
|
+
* @description: Retrieves detailed information about a specific price factory configuration for the given application and company, using the unique price factory ID. This includes currency strategies, adjustment values, zone mapping, and audit metadata.
|
|
5193
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getPriceFactory/).
|
|
5194
|
+
*/
|
|
5195
|
+
async getPriceFactory(
|
|
5196
|
+
{ priceFactoryId, requestHeaders } = { requestHeaders: {} },
|
|
5197
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5198
|
+
) {
|
|
5199
|
+
const {
|
|
5200
|
+
error,
|
|
5201
|
+
} = CatalogPlatformApplicationValidator.getPriceFactory().validate(
|
|
5202
|
+
{
|
|
5203
|
+
priceFactoryId,
|
|
5204
|
+
},
|
|
5205
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5206
|
+
);
|
|
5207
|
+
if (error) {
|
|
5208
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5209
|
+
}
|
|
5210
|
+
|
|
5211
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5212
|
+
const {
|
|
5213
|
+
error: warrning,
|
|
5214
|
+
} = CatalogPlatformApplicationValidator.getPriceFactory().validate(
|
|
5215
|
+
{
|
|
5216
|
+
priceFactoryId,
|
|
5217
|
+
},
|
|
5218
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5219
|
+
);
|
|
5220
|
+
if (warrning) {
|
|
5221
|
+
Logger({
|
|
5222
|
+
level: "WARN",
|
|
5223
|
+
message: `Parameter Validation warrnings for platform > Catalog > getPriceFactory \n ${warrning}`,
|
|
5224
|
+
});
|
|
5225
|
+
}
|
|
5226
|
+
|
|
5227
|
+
const query_params = {};
|
|
5228
|
+
|
|
5229
|
+
const response = await PlatformAPIClient.execute(
|
|
5230
|
+
this.config,
|
|
5231
|
+
"get",
|
|
5232
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/${priceFactoryId}`,
|
|
5233
|
+
query_params,
|
|
5234
|
+
undefined,
|
|
5235
|
+
requestHeaders,
|
|
5236
|
+
{ responseHeaders }
|
|
5237
|
+
);
|
|
5238
|
+
|
|
5239
|
+
let responseData = response;
|
|
5240
|
+
if (responseHeaders) {
|
|
5241
|
+
responseData = response[0];
|
|
5242
|
+
}
|
|
5243
|
+
|
|
5244
|
+
const {
|
|
5245
|
+
error: res_error,
|
|
5246
|
+
} = CatalogPlatformModel.PriceFactoryConfigSchema().validate(responseData, {
|
|
5247
|
+
abortEarly: false,
|
|
5248
|
+
allowUnknown: true,
|
|
5249
|
+
});
|
|
5250
|
+
|
|
5251
|
+
if (res_error) {
|
|
5252
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5253
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5254
|
+
} else {
|
|
5255
|
+
Logger({
|
|
5256
|
+
level: "WARN",
|
|
5257
|
+
message: `Response Validation Warnings for platform > Catalog > getPriceFactory \n ${res_error}`,
|
|
5258
|
+
});
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
|
|
5262
|
+
return response;
|
|
5263
|
+
}
|
|
5264
|
+
|
|
5265
|
+
/**
|
|
5266
|
+
* @param {CatalogPlatformApplicationValidator.GetPriceFactoryProductParam} arg
|
|
5267
|
+
* - Arg object
|
|
5268
|
+
*
|
|
5269
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5270
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5271
|
+
* @returns {Promise<CatalogPlatformModel.PriceFactoryProductResponseSchema>}
|
|
5272
|
+
* - Success response
|
|
5273
|
+
*
|
|
5274
|
+
* @name getPriceFactoryProduct
|
|
5275
|
+
* @summary: Update marketplace optin
|
|
5276
|
+
* @description: get price related information of item for given price factory - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getPriceFactoryProduct/).
|
|
5277
|
+
*/
|
|
5278
|
+
async getPriceFactoryProduct(
|
|
5279
|
+
{ priceFactoryId, itemId, requestHeaders } = { requestHeaders: {} },
|
|
5280
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5281
|
+
) {
|
|
5282
|
+
const {
|
|
5283
|
+
error,
|
|
5284
|
+
} = CatalogPlatformApplicationValidator.getPriceFactoryProduct().validate(
|
|
5285
|
+
{
|
|
5286
|
+
priceFactoryId,
|
|
5287
|
+
itemId,
|
|
5288
|
+
},
|
|
5289
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5290
|
+
);
|
|
5291
|
+
if (error) {
|
|
5292
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5293
|
+
}
|
|
5294
|
+
|
|
5295
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5296
|
+
const {
|
|
5297
|
+
error: warrning,
|
|
5298
|
+
} = CatalogPlatformApplicationValidator.getPriceFactoryProduct().validate(
|
|
5299
|
+
{
|
|
5300
|
+
priceFactoryId,
|
|
5301
|
+
itemId,
|
|
5302
|
+
},
|
|
5303
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5304
|
+
);
|
|
5305
|
+
if (warrning) {
|
|
5306
|
+
Logger({
|
|
5307
|
+
level: "WARN",
|
|
5308
|
+
message: `Parameter Validation warrnings for platform > Catalog > getPriceFactoryProduct \n ${warrning}`,
|
|
5309
|
+
});
|
|
5310
|
+
}
|
|
5311
|
+
|
|
5312
|
+
const query_params = {};
|
|
5313
|
+
|
|
5314
|
+
const response = await PlatformAPIClient.execute(
|
|
5315
|
+
this.config,
|
|
5316
|
+
"get",
|
|
5317
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/${priceFactoryId}/products/${itemId}`,
|
|
5318
|
+
query_params,
|
|
5319
|
+
undefined,
|
|
5320
|
+
requestHeaders,
|
|
5321
|
+
{ responseHeaders }
|
|
5322
|
+
);
|
|
5323
|
+
|
|
5324
|
+
let responseData = response;
|
|
5325
|
+
if (responseHeaders) {
|
|
5326
|
+
responseData = response[0];
|
|
5327
|
+
}
|
|
5328
|
+
|
|
5329
|
+
const {
|
|
5330
|
+
error: res_error,
|
|
5331
|
+
} = CatalogPlatformModel.PriceFactoryProductResponseSchema().validate(
|
|
5332
|
+
responseData,
|
|
5333
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5334
|
+
);
|
|
5335
|
+
|
|
5336
|
+
if (res_error) {
|
|
5337
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5338
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5339
|
+
} else {
|
|
5340
|
+
Logger({
|
|
5341
|
+
level: "WARN",
|
|
5342
|
+
message: `Response Validation Warnings for platform > Catalog > getPriceFactoryProduct \n ${res_error}`,
|
|
5343
|
+
});
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
|
|
5347
|
+
return response;
|
|
5348
|
+
}
|
|
5349
|
+
|
|
5350
|
+
/**
|
|
5351
|
+
* @param {CatalogPlatformApplicationValidator.GetPriceFactoryProductsParam} arg
|
|
5352
|
+
* - Arg object
|
|
5353
|
+
*
|
|
5354
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5355
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5356
|
+
* @returns {Promise<CatalogPlatformModel.PriceFactoryProductListResponseSchema>}
|
|
5357
|
+
* - Success response
|
|
5358
|
+
*
|
|
5359
|
+
* @name getPriceFactoryProducts
|
|
5360
|
+
* @summary: Get Products associated with a Price Factory
|
|
5361
|
+
* @description: Retrieves a paginated list of products linked to a specific price factory configuration for the given application and company. This endpoint returns item-level details such as pricing by currency, delivery zones, seller identifiers, media, and size-level configurations. Useful for viewing how pricing strategies are applied across different items.
|
|
5362
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getPriceFactoryProducts/).
|
|
5363
|
+
*/
|
|
5364
|
+
async getPriceFactoryProducts(
|
|
5365
|
+
{
|
|
5366
|
+
priceFactoryId,
|
|
5367
|
+
brandIds,
|
|
5368
|
+
categoryIds,
|
|
5369
|
+
sellerIdentifier,
|
|
5370
|
+
itemCode,
|
|
5371
|
+
slug,
|
|
5372
|
+
name,
|
|
5373
|
+
active,
|
|
5374
|
+
pageNo,
|
|
5375
|
+
pageSize,
|
|
5376
|
+
requestHeaders,
|
|
5377
|
+
} = { requestHeaders: {} },
|
|
5378
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5379
|
+
) {
|
|
5380
|
+
const {
|
|
5381
|
+
error,
|
|
5382
|
+
} = CatalogPlatformApplicationValidator.getPriceFactoryProducts().validate(
|
|
4557
5383
|
{
|
|
4558
|
-
|
|
5384
|
+
priceFactoryId,
|
|
5385
|
+
brandIds,
|
|
5386
|
+
categoryIds,
|
|
5387
|
+
sellerIdentifier,
|
|
5388
|
+
itemCode,
|
|
5389
|
+
slug,
|
|
5390
|
+
name,
|
|
5391
|
+
active,
|
|
4559
5392
|
pageNo,
|
|
4560
5393
|
pageSize,
|
|
4561
|
-
search,
|
|
4562
5394
|
},
|
|
4563
5395
|
{ abortEarly: false, allowUnknown: true }
|
|
4564
5396
|
);
|
|
@@ -4569,31 +5401,43 @@ class Catalog {
|
|
|
4569
5401
|
// Showing warrnings if extra unknown parameters are found
|
|
4570
5402
|
const {
|
|
4571
5403
|
error: warrning,
|
|
4572
|
-
} = CatalogPlatformApplicationValidator.
|
|
5404
|
+
} = CatalogPlatformApplicationValidator.getPriceFactoryProducts().validate(
|
|
4573
5405
|
{
|
|
4574
|
-
|
|
5406
|
+
priceFactoryId,
|
|
5407
|
+
brandIds,
|
|
5408
|
+
categoryIds,
|
|
5409
|
+
sellerIdentifier,
|
|
5410
|
+
itemCode,
|
|
5411
|
+
slug,
|
|
5412
|
+
name,
|
|
5413
|
+
active,
|
|
4575
5414
|
pageNo,
|
|
4576
5415
|
pageSize,
|
|
4577
|
-
search,
|
|
4578
5416
|
},
|
|
4579
5417
|
{ abortEarly: false, allowUnknown: false }
|
|
4580
5418
|
);
|
|
4581
5419
|
if (warrning) {
|
|
4582
5420
|
Logger({
|
|
4583
5421
|
level: "WARN",
|
|
4584
|
-
message: `Parameter Validation warrnings for platform > Catalog >
|
|
5422
|
+
message: `Parameter Validation warrnings for platform > Catalog > getPriceFactoryProducts \n ${warrning}`,
|
|
4585
5423
|
});
|
|
4586
5424
|
}
|
|
4587
5425
|
|
|
4588
5426
|
const query_params = {};
|
|
5427
|
+
query_params["brand_ids"] = brandIds;
|
|
5428
|
+
query_params["category_ids"] = categoryIds;
|
|
5429
|
+
query_params["seller_identifier"] = sellerIdentifier;
|
|
5430
|
+
query_params["item_code"] = itemCode;
|
|
5431
|
+
query_params["slug"] = slug;
|
|
5432
|
+
query_params["name"] = name;
|
|
5433
|
+
query_params["active"] = active;
|
|
4589
5434
|
query_params["page_no"] = pageNo;
|
|
4590
5435
|
query_params["page_size"] = pageSize;
|
|
4591
|
-
query_params["search"] = search;
|
|
4592
5436
|
|
|
4593
5437
|
const response = await PlatformAPIClient.execute(
|
|
4594
5438
|
this.config,
|
|
4595
5439
|
"get",
|
|
4596
|
-
`/service/platform/catalog/
|
|
5440
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/${priceFactoryId}/products`,
|
|
4597
5441
|
query_params,
|
|
4598
5442
|
undefined,
|
|
4599
5443
|
requestHeaders,
|
|
@@ -4607,10 +5451,10 @@ class Catalog {
|
|
|
4607
5451
|
|
|
4608
5452
|
const {
|
|
4609
5453
|
error: res_error,
|
|
4610
|
-
} = CatalogPlatformModel.
|
|
4611
|
-
|
|
4612
|
-
allowUnknown: true
|
|
4613
|
-
|
|
5454
|
+
} = CatalogPlatformModel.PriceFactoryProductListResponseSchema().validate(
|
|
5455
|
+
responseData,
|
|
5456
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5457
|
+
);
|
|
4614
5458
|
|
|
4615
5459
|
if (res_error) {
|
|
4616
5460
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4618,7 +5462,7 @@ class Catalog {
|
|
|
4618
5462
|
} else {
|
|
4619
5463
|
Logger({
|
|
4620
5464
|
level: "WARN",
|
|
4621
|
-
message: `Response Validation Warnings for platform > Catalog >
|
|
5465
|
+
message: `Response Validation Warnings for platform > Catalog > getPriceFactoryProducts \n ${res_error}`,
|
|
4622
5466
|
});
|
|
4623
5467
|
}
|
|
4624
5468
|
}
|
|
@@ -4635,7 +5479,7 @@ class Catalog {
|
|
|
4635
5479
|
* @returns {Promise<CatalogPlatformModel.ProductDetail>} - Success response
|
|
4636
5480
|
* @name getProductDetailBySlug
|
|
4637
5481
|
* @summary: Get product details
|
|
4638
|
-
* @description: Retrieve detailed product information using a product slug. - Check out [method documentation](https://
|
|
5482
|
+
* @description: Retrieve detailed product information using a product slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getProductDetailBySlug/).
|
|
4639
5483
|
*/
|
|
4640
5484
|
async getProductDetailBySlug(
|
|
4641
5485
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4711,10 +5555,11 @@ class Catalog {
|
|
|
4711
5555
|
* @param {CatalogPlatformApplicationValidator.GetQueryFiltersParam} arg - Arg object
|
|
4712
5556
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4713
5557
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4714
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5558
|
+
* @returns {Promise<CatalogPlatformModel.GetQueryFiltersResponseSchema>} -
|
|
5559
|
+
* Success response
|
|
4715
5560
|
* @name getQueryFilters
|
|
4716
5561
|
* @summary: Get collection query filters
|
|
4717
|
-
* @description: Retrieve query filters to configure a collection for a company and a sales channel. - Check out [method documentation](https://
|
|
5562
|
+
* @description: Retrieve query filters to configure a collection for a company and a sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getQueryFilters/).
|
|
4718
5563
|
*/
|
|
4719
5564
|
async getQueryFilters(
|
|
4720
5565
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4763,10 +5608,10 @@ class Catalog {
|
|
|
4763
5608
|
|
|
4764
5609
|
const {
|
|
4765
5610
|
error: res_error,
|
|
4766
|
-
} = CatalogPlatformModel.
|
|
4767
|
-
|
|
4768
|
-
allowUnknown: true
|
|
4769
|
-
|
|
5611
|
+
} = CatalogPlatformModel.GetQueryFiltersResponseSchema().validate(
|
|
5612
|
+
responseData,
|
|
5613
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5614
|
+
);
|
|
4770
5615
|
|
|
4771
5616
|
if (res_error) {
|
|
4772
5617
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4788,12 +5633,12 @@ class Catalog {
|
|
|
4788
5633
|
*
|
|
4789
5634
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4790
5635
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4791
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5636
|
+
* @returns {Promise<CatalogPlatformModel.GetSearchConfigurationResponseSchema>}
|
|
4792
5637
|
* - Success response
|
|
4793
5638
|
*
|
|
4794
5639
|
* @name getSearchConfiguration
|
|
4795
5640
|
* @summary: Get Search configuration
|
|
4796
|
-
* @description: Get search configuration for a specific company and sales channel. - Check out [method documentation](https://
|
|
5641
|
+
* @description: Get search configuration for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getSearchConfiguration/).
|
|
4797
5642
|
*/
|
|
4798
5643
|
async getSearchConfiguration(
|
|
4799
5644
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -4842,7 +5687,7 @@ class Catalog {
|
|
|
4842
5687
|
|
|
4843
5688
|
const {
|
|
4844
5689
|
error: res_error,
|
|
4845
|
-
} = CatalogPlatformModel.
|
|
5690
|
+
} = CatalogPlatformModel.GetSearchConfigurationResponseSchema().validate(
|
|
4846
5691
|
responseData,
|
|
4847
5692
|
{ abortEarly: false, allowUnknown: true }
|
|
4848
5693
|
);
|
|
@@ -4867,11 +5712,12 @@ class Catalog {
|
|
|
4867
5712
|
*
|
|
4868
5713
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4869
5714
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4870
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
4871
|
-
* Success response
|
|
5715
|
+
* @returns {Promise<CatalogPlatformModel.GetSearchWordsDetailResponseSchema>}
|
|
5716
|
+
* - Success response
|
|
5717
|
+
*
|
|
4872
5718
|
* @name getSearchKeywords
|
|
4873
5719
|
* @summary: Get search keywords
|
|
4874
|
-
* @description: Retrieve a list of a specific list of keywords by its id for a specific company and sales channel. - Check out [method documentation](https://
|
|
5720
|
+
* @description: Retrieve a list of a specific list of keywords by its id for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getSearchKeywords/).
|
|
4875
5721
|
*/
|
|
4876
5722
|
async getSearchKeywords(
|
|
4877
5723
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4924,7 +5770,7 @@ class Catalog {
|
|
|
4924
5770
|
|
|
4925
5771
|
const {
|
|
4926
5772
|
error: res_error,
|
|
4927
|
-
} = CatalogPlatformModel.
|
|
5773
|
+
} = CatalogPlatformModel.GetSearchWordsDetailResponseSchema().validate(
|
|
4928
5774
|
responseData,
|
|
4929
5775
|
{ abortEarly: false, allowUnknown: true }
|
|
4930
5776
|
);
|
|
@@ -4943,16 +5789,101 @@ class Catalog {
|
|
|
4943
5789
|
return response;
|
|
4944
5790
|
}
|
|
4945
5791
|
|
|
5792
|
+
/**
|
|
5793
|
+
* @param {CatalogPlatformApplicationValidator.UnfollowProductByIdParam} arg
|
|
5794
|
+
* - Arg object
|
|
5795
|
+
*
|
|
5796
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5797
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5798
|
+
* @returns {Promise<CatalogPlatformModel.FollowProduct>} - Success response
|
|
5799
|
+
* @name unfollowProductById
|
|
5800
|
+
* @summary: Unfollow a Specific Product by ID
|
|
5801
|
+
* @description: This endpoint allows a user to unfollow a previously followed product using its unique item ID for a sales channel.
|
|
5802
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/unfollowProductById/).
|
|
5803
|
+
*/
|
|
5804
|
+
async unfollowProductById(
|
|
5805
|
+
{ userId, itemId, requestHeaders } = { requestHeaders: {} },
|
|
5806
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
5807
|
+
) {
|
|
5808
|
+
const {
|
|
5809
|
+
error,
|
|
5810
|
+
} = CatalogPlatformApplicationValidator.unfollowProductById().validate(
|
|
5811
|
+
{
|
|
5812
|
+
userId,
|
|
5813
|
+
itemId,
|
|
5814
|
+
},
|
|
5815
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5816
|
+
);
|
|
5817
|
+
if (error) {
|
|
5818
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
5819
|
+
}
|
|
5820
|
+
|
|
5821
|
+
// Showing warrnings if extra unknown parameters are found
|
|
5822
|
+
const {
|
|
5823
|
+
error: warrning,
|
|
5824
|
+
} = CatalogPlatformApplicationValidator.unfollowProductById().validate(
|
|
5825
|
+
{
|
|
5826
|
+
userId,
|
|
5827
|
+
itemId,
|
|
5828
|
+
},
|
|
5829
|
+
{ abortEarly: false, allowUnknown: false }
|
|
5830
|
+
);
|
|
5831
|
+
if (warrning) {
|
|
5832
|
+
Logger({
|
|
5833
|
+
level: "WARN",
|
|
5834
|
+
message: `Parameter Validation warrnings for platform > Catalog > unfollowProductById \n ${warrning}`,
|
|
5835
|
+
});
|
|
5836
|
+
}
|
|
5837
|
+
|
|
5838
|
+
const query_params = {};
|
|
5839
|
+
|
|
5840
|
+
const response = await PlatformAPIClient.execute(
|
|
5841
|
+
this.config,
|
|
5842
|
+
"delete",
|
|
5843
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user/${userId}/products/${itemId}/follow`,
|
|
5844
|
+
query_params,
|
|
5845
|
+
undefined,
|
|
5846
|
+
requestHeaders,
|
|
5847
|
+
{ responseHeaders }
|
|
5848
|
+
);
|
|
5849
|
+
|
|
5850
|
+
let responseData = response;
|
|
5851
|
+
if (responseHeaders) {
|
|
5852
|
+
responseData = response[0];
|
|
5853
|
+
}
|
|
5854
|
+
|
|
5855
|
+
const {
|
|
5856
|
+
error: res_error,
|
|
5857
|
+
} = CatalogPlatformModel.FollowProduct().validate(responseData, {
|
|
5858
|
+
abortEarly: false,
|
|
5859
|
+
allowUnknown: true,
|
|
5860
|
+
});
|
|
5861
|
+
|
|
5862
|
+
if (res_error) {
|
|
5863
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
5864
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
5865
|
+
} else {
|
|
5866
|
+
Logger({
|
|
5867
|
+
level: "WARN",
|
|
5868
|
+
message: `Response Validation Warnings for platform > Catalog > unfollowProductById \n ${res_error}`,
|
|
5869
|
+
});
|
|
5870
|
+
}
|
|
5871
|
+
}
|
|
5872
|
+
|
|
5873
|
+
return response;
|
|
5874
|
+
}
|
|
5875
|
+
|
|
4946
5876
|
/**
|
|
4947
5877
|
* @param {CatalogPlatformApplicationValidator.UpdateAllowSingleParam} arg
|
|
4948
5878
|
* - Arg object
|
|
4949
5879
|
*
|
|
4950
5880
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4951
5881
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4952
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5882
|
+
* @returns {Promise<CatalogPlatformModel.ConfigSuccessResponseSchema>} -
|
|
5883
|
+
* Success response
|
|
4953
5884
|
* @name updateAllowSingle
|
|
4954
5885
|
* @summary: Update 'Allow Single' setting
|
|
4955
|
-
* @description: Modify allow single flag for filters of the sales channel for a company and an sales channel. - Check out [method documentation](https://
|
|
5886
|
+
* @description: Modify allow single flag for filters of the sales channel for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAllowSingle/).
|
|
4956
5887
|
*/
|
|
4957
5888
|
async updateAllowSingle(
|
|
4958
5889
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5005,10 +5936,10 @@ class Catalog {
|
|
|
5005
5936
|
|
|
5006
5937
|
const {
|
|
5007
5938
|
error: res_error,
|
|
5008
|
-
} = CatalogPlatformModel.
|
|
5009
|
-
|
|
5010
|
-
allowUnknown: true
|
|
5011
|
-
|
|
5939
|
+
} = CatalogPlatformModel.ConfigSuccessResponseSchema().validate(
|
|
5940
|
+
responseData,
|
|
5941
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5942
|
+
);
|
|
5012
5943
|
|
|
5013
5944
|
if (res_error) {
|
|
5014
5945
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5031,7 +5962,7 @@ class Catalog {
|
|
|
5031
5962
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
5032
5963
|
* @name updateAppBrand
|
|
5033
5964
|
* @summary: Update sales channel brand
|
|
5034
|
-
* @description: Modify data associated to the brand for that particular sales channel. - Check out [method documentation](https://
|
|
5965
|
+
* @description: Modify data associated to the brand for that particular sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppBrand/).
|
|
5035
5966
|
*/
|
|
5036
5967
|
async updateAppBrand(
|
|
5037
5968
|
{ brandUid, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5114,7 +6045,7 @@ class Catalog {
|
|
|
5114
6045
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
5115
6046
|
* @name updateAppCategory
|
|
5116
6047
|
* @summary: Update sales channel category
|
|
5117
|
-
* @description: Modify category data related to the sales channel
|
|
6048
|
+
* @description: Modify category data related to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppCategory/).
|
|
5118
6049
|
*/
|
|
5119
6050
|
async updateAppCategory(
|
|
5120
6051
|
{ categoryUid, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5194,10 +6125,10 @@ class Catalog {
|
|
|
5194
6125
|
*
|
|
5195
6126
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5196
6127
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5197
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6128
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
5198
6129
|
* @name updateAppCategoryReturnConfiguration
|
|
5199
6130
|
* @summary: Update return Configuration
|
|
5200
|
-
* @description: Update Category level sales channel Return Configuration setttings - Check out [method documentation](https://
|
|
6131
|
+
* @description: Update Category level sales channel Return Configuration setttings - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppCategoryReturnConfiguration/).
|
|
5201
6132
|
*/
|
|
5202
6133
|
async updateAppCategoryReturnConfiguration(
|
|
5203
6134
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5250,7 +6181,7 @@ class Catalog {
|
|
|
5250
6181
|
|
|
5251
6182
|
const {
|
|
5252
6183
|
error: res_error,
|
|
5253
|
-
} = CatalogPlatformModel.
|
|
6184
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
5254
6185
|
abortEarly: false,
|
|
5255
6186
|
allowUnknown: true,
|
|
5256
6187
|
});
|
|
@@ -5278,7 +6209,7 @@ class Catalog {
|
|
|
5278
6209
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
5279
6210
|
* @name updateAppDepartment
|
|
5280
6211
|
* @summary: Update sales channel department
|
|
5281
|
-
* @description: Modify department data associated to the sales channel. - Check out [method documentation](https://
|
|
6212
|
+
* @description: Modify department data associated to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppDepartment/).
|
|
5282
6213
|
*/
|
|
5283
6214
|
async updateAppDepartment(
|
|
5284
6215
|
{ departmentUid, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5361,7 +6292,7 @@ class Catalog {
|
|
|
5361
6292
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
5362
6293
|
* @name updateAppLocation
|
|
5363
6294
|
* @summary: Update sales channel location
|
|
5364
|
-
* @description: Modify location data related to the sales channel. - Check out [method documentation](https://
|
|
6295
|
+
* @description: Modify location data related to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppLocation/).
|
|
5365
6296
|
*/
|
|
5366
6297
|
async updateAppLocation(
|
|
5367
6298
|
{ storeUid, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5442,7 +6373,7 @@ class Catalog {
|
|
|
5442
6373
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
5443
6374
|
* @name updateAppProduct
|
|
5444
6375
|
* @summary: Update sales channel product
|
|
5445
|
-
* @description: Allows to update data associated to a item by its item_id for
|
|
6376
|
+
* @description: Allows to update data associated to a item by its item_id for a sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppProduct/).
|
|
5446
6377
|
*/
|
|
5447
6378
|
async updateAppProduct(
|
|
5448
6379
|
{ itemId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5525,7 +6456,7 @@ class Catalog {
|
|
|
5525
6456
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
5526
6457
|
* @name updateAppReturnConfiguration
|
|
5527
6458
|
* @summary: Update product return configuration
|
|
5528
|
-
* @description: Update Return configuration level set for an sales channel. - Check out [method documentation](https://
|
|
6459
|
+
* @description: Update Return configuration level set for an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppReturnConfiguration/).
|
|
5529
6460
|
*/
|
|
5530
6461
|
async updateAppReturnConfiguration(
|
|
5531
6462
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5603,11 +6534,12 @@ class Catalog {
|
|
|
5603
6534
|
*
|
|
5604
6535
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5605
6536
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5606
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
5607
|
-
* Success response
|
|
6537
|
+
* @returns {Promise<CatalogPlatformModel.GetAutocompleteWordsResponseSchema>}
|
|
6538
|
+
* - Success response
|
|
6539
|
+
*
|
|
5608
6540
|
* @name updateAutocompleteKeyword
|
|
5609
6541
|
* @summary: Update autocomplete keyword
|
|
5610
|
-
* @description: Update a specific autocomplete keyword configuration by its id for a specific sales channel. - Check out [method documentation](https://
|
|
6542
|
+
* @description: Update a specific autocomplete keyword configuration by its id for a specific sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAutocompleteKeyword/).
|
|
5611
6543
|
*/
|
|
5612
6544
|
async updateAutocompleteKeyword(
|
|
5613
6545
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5662,7 +6594,7 @@ class Catalog {
|
|
|
5662
6594
|
|
|
5663
6595
|
const {
|
|
5664
6596
|
error: res_error,
|
|
5665
|
-
} = CatalogPlatformModel.
|
|
6597
|
+
} = CatalogPlatformModel.GetAutocompleteWordsResponseSchema().validate(
|
|
5666
6598
|
responseData,
|
|
5667
6599
|
{ abortEarly: false, allowUnknown: true }
|
|
5668
6600
|
);
|
|
@@ -5688,7 +6620,7 @@ class Catalog {
|
|
|
5688
6620
|
* @returns {Promise<CatalogPlatformModel.UpdateCollection>} - Success response
|
|
5689
6621
|
* @name updateCollection
|
|
5690
6622
|
* @summary: Update a collection
|
|
5691
|
-
* @description: Update a collection by it's id. On successful request, returns the updated collection - Check out [method documentation](https://
|
|
6623
|
+
* @description: Update a collection by it's id. On successful request, returns the updated collection - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateCollection/).
|
|
5692
6624
|
*/
|
|
5693
6625
|
async updateCollection(
|
|
5694
6626
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5768,10 +6700,11 @@ class Catalog {
|
|
|
5768
6700
|
*
|
|
5769
6701
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5770
6702
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5771
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
6703
|
+
* @returns {Promise<CatalogPlatformModel.ConfigSuccessResponseSchema>} -
|
|
6704
|
+
* Success response
|
|
5772
6705
|
* @name updateDefaultSort
|
|
5773
6706
|
* @summary: Update default sorting
|
|
5774
|
-
* @description: Modify the default sort key configuration for a company and an sales channel. - Check out [method documentation](https://
|
|
6707
|
+
* @description: Modify the default sort key configuration for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateDefaultSort/).
|
|
5775
6708
|
*/
|
|
5776
6709
|
async updateDefaultSort(
|
|
5777
6710
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5824,10 +6757,10 @@ class Catalog {
|
|
|
5824
6757
|
|
|
5825
6758
|
const {
|
|
5826
6759
|
error: res_error,
|
|
5827
|
-
} = CatalogPlatformModel.
|
|
5828
|
-
|
|
5829
|
-
allowUnknown: true
|
|
5830
|
-
|
|
6760
|
+
} = CatalogPlatformModel.ConfigSuccessResponseSchema().validate(
|
|
6761
|
+
responseData,
|
|
6762
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6763
|
+
);
|
|
5831
6764
|
|
|
5832
6765
|
if (res_error) {
|
|
5833
6766
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5852,7 +6785,7 @@ class Catalog {
|
|
|
5852
6785
|
* @returns {Promise<CatalogPlatformModel.AppConfigurationDetail>} - Success response
|
|
5853
6786
|
* @name updateGroupConfiguration
|
|
5854
6787
|
* @summary: Update group configuration
|
|
5855
|
-
* @description: Modify group configurations by its slug for specific config_type for a company and an sales channel. - Check out [method documentation](https://
|
|
6788
|
+
* @description: Modify group configurations by its slug for specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateGroupConfiguration/).
|
|
5856
6789
|
*/
|
|
5857
6790
|
async updateGroupConfiguration(
|
|
5858
6791
|
{ configType, groupSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5937,7 +6870,7 @@ class Catalog {
|
|
|
5937
6870
|
* @returns {Promise<CatalogPlatformModel.AppConfigurationsSort>} - Success response
|
|
5938
6871
|
* @name updateListingConfiguration
|
|
5939
6872
|
* @summary: Update listing configuration
|
|
5940
|
-
* @description: Modify a specific product listing configuration by its config_id for a specific config_type for a company and an sales channel. - Check out [method documentation](https://
|
|
6873
|
+
* @description: Modify a specific product listing configuration by its config_id for a specific config_type for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateListingConfiguration/).
|
|
5941
6874
|
*/
|
|
5942
6875
|
async updateListingConfiguration(
|
|
5943
6876
|
{ configType, configId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6013,18 +6946,188 @@ class Catalog {
|
|
|
6013
6946
|
return response;
|
|
6014
6947
|
}
|
|
6015
6948
|
|
|
6949
|
+
/**
|
|
6950
|
+
* @param {CatalogPlatformApplicationValidator.UpdatePriceFactoryParam} arg
|
|
6951
|
+
* - Arg object
|
|
6952
|
+
*
|
|
6953
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6954
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6955
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
6956
|
+
* @name updatePriceFactory
|
|
6957
|
+
* @summary: Update an Existing Price Factory Configuration
|
|
6958
|
+
* @description: Allows partial update of an existing price factory configuration for a specific application and company using the provided price factory ID. Fields such as name, currencies, pricing strategies, or zone mapping can be modified.
|
|
6959
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updatePriceFactory/).
|
|
6960
|
+
*/
|
|
6961
|
+
async updatePriceFactory(
|
|
6962
|
+
{ priceFactoryId, body, requestHeaders } = { requestHeaders: {} },
|
|
6963
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
6964
|
+
) {
|
|
6965
|
+
const {
|
|
6966
|
+
error,
|
|
6967
|
+
} = CatalogPlatformApplicationValidator.updatePriceFactory().validate(
|
|
6968
|
+
{
|
|
6969
|
+
priceFactoryId,
|
|
6970
|
+
body,
|
|
6971
|
+
},
|
|
6972
|
+
{ abortEarly: false, allowUnknown: true }
|
|
6973
|
+
);
|
|
6974
|
+
if (error) {
|
|
6975
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
6976
|
+
}
|
|
6977
|
+
|
|
6978
|
+
// Showing warrnings if extra unknown parameters are found
|
|
6979
|
+
const {
|
|
6980
|
+
error: warrning,
|
|
6981
|
+
} = CatalogPlatformApplicationValidator.updatePriceFactory().validate(
|
|
6982
|
+
{
|
|
6983
|
+
priceFactoryId,
|
|
6984
|
+
body,
|
|
6985
|
+
},
|
|
6986
|
+
{ abortEarly: false, allowUnknown: false }
|
|
6987
|
+
);
|
|
6988
|
+
if (warrning) {
|
|
6989
|
+
Logger({
|
|
6990
|
+
level: "WARN",
|
|
6991
|
+
message: `Parameter Validation warrnings for platform > Catalog > updatePriceFactory \n ${warrning}`,
|
|
6992
|
+
});
|
|
6993
|
+
}
|
|
6994
|
+
|
|
6995
|
+
const query_params = {};
|
|
6996
|
+
|
|
6997
|
+
const response = await PlatformAPIClient.execute(
|
|
6998
|
+
this.config,
|
|
6999
|
+
"patch",
|
|
7000
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/${priceFactoryId}`,
|
|
7001
|
+
query_params,
|
|
7002
|
+
body,
|
|
7003
|
+
requestHeaders,
|
|
7004
|
+
{ responseHeaders }
|
|
7005
|
+
);
|
|
7006
|
+
|
|
7007
|
+
let responseData = response;
|
|
7008
|
+
if (responseHeaders) {
|
|
7009
|
+
responseData = response[0];
|
|
7010
|
+
}
|
|
7011
|
+
|
|
7012
|
+
const {
|
|
7013
|
+
error: res_error,
|
|
7014
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
7015
|
+
abortEarly: false,
|
|
7016
|
+
allowUnknown: true,
|
|
7017
|
+
});
|
|
7018
|
+
|
|
7019
|
+
if (res_error) {
|
|
7020
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
7021
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
7022
|
+
} else {
|
|
7023
|
+
Logger({
|
|
7024
|
+
level: "WARN",
|
|
7025
|
+
message: `Response Validation Warnings for platform > Catalog > updatePriceFactory \n ${res_error}`,
|
|
7026
|
+
});
|
|
7027
|
+
}
|
|
7028
|
+
}
|
|
7029
|
+
|
|
7030
|
+
return response;
|
|
7031
|
+
}
|
|
7032
|
+
|
|
7033
|
+
/**
|
|
7034
|
+
* @param {CatalogPlatformApplicationValidator.UpdatePriceFactoryProductParam} arg
|
|
7035
|
+
* - Arg object
|
|
7036
|
+
*
|
|
7037
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7038
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7039
|
+
* @returns {Promise<CatalogPlatformModel.SuccessResponseSchema>} - Success response
|
|
7040
|
+
* @name updatePriceFactoryProduct
|
|
7041
|
+
* @summary: Partially update price factory product configuration
|
|
7042
|
+
* @description: Updates specific fields in the price factory product configuration. Use this to partially update pricing or status for a given product and size without overwriting the entire configuration.
|
|
7043
|
+
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updatePriceFactoryProduct/).
|
|
7044
|
+
*/
|
|
7045
|
+
async updatePriceFactoryProduct(
|
|
7046
|
+
{ priceFactoryId, itemId, body, requestHeaders } = { requestHeaders: {} },
|
|
7047
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
7048
|
+
) {
|
|
7049
|
+
const {
|
|
7050
|
+
error,
|
|
7051
|
+
} = CatalogPlatformApplicationValidator.updatePriceFactoryProduct().validate(
|
|
7052
|
+
{
|
|
7053
|
+
priceFactoryId,
|
|
7054
|
+
itemId,
|
|
7055
|
+
body,
|
|
7056
|
+
},
|
|
7057
|
+
{ abortEarly: false, allowUnknown: true }
|
|
7058
|
+
);
|
|
7059
|
+
if (error) {
|
|
7060
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
7061
|
+
}
|
|
7062
|
+
|
|
7063
|
+
// Showing warrnings if extra unknown parameters are found
|
|
7064
|
+
const {
|
|
7065
|
+
error: warrning,
|
|
7066
|
+
} = CatalogPlatformApplicationValidator.updatePriceFactoryProduct().validate(
|
|
7067
|
+
{
|
|
7068
|
+
priceFactoryId,
|
|
7069
|
+
itemId,
|
|
7070
|
+
body,
|
|
7071
|
+
},
|
|
7072
|
+
{ abortEarly: false, allowUnknown: false }
|
|
7073
|
+
);
|
|
7074
|
+
if (warrning) {
|
|
7075
|
+
Logger({
|
|
7076
|
+
level: "WARN",
|
|
7077
|
+
message: `Parameter Validation warrnings for platform > Catalog > updatePriceFactoryProduct \n ${warrning}`,
|
|
7078
|
+
});
|
|
7079
|
+
}
|
|
7080
|
+
|
|
7081
|
+
const query_params = {};
|
|
7082
|
+
|
|
7083
|
+
const response = await PlatformAPIClient.execute(
|
|
7084
|
+
this.config,
|
|
7085
|
+
"patch",
|
|
7086
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price/${priceFactoryId}/products/${itemId}`,
|
|
7087
|
+
query_params,
|
|
7088
|
+
body,
|
|
7089
|
+
requestHeaders,
|
|
7090
|
+
{ responseHeaders }
|
|
7091
|
+
);
|
|
7092
|
+
|
|
7093
|
+
let responseData = response;
|
|
7094
|
+
if (responseHeaders) {
|
|
7095
|
+
responseData = response[0];
|
|
7096
|
+
}
|
|
7097
|
+
|
|
7098
|
+
const {
|
|
7099
|
+
error: res_error,
|
|
7100
|
+
} = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, {
|
|
7101
|
+
abortEarly: false,
|
|
7102
|
+
allowUnknown: true,
|
|
7103
|
+
});
|
|
7104
|
+
|
|
7105
|
+
if (res_error) {
|
|
7106
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
7107
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
7108
|
+
} else {
|
|
7109
|
+
Logger({
|
|
7110
|
+
level: "WARN",
|
|
7111
|
+
message: `Response Validation Warnings for platform > Catalog > updatePriceFactoryProduct \n ${res_error}`,
|
|
7112
|
+
});
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7115
|
+
|
|
7116
|
+
return response;
|
|
7117
|
+
}
|
|
7118
|
+
|
|
6016
7119
|
/**
|
|
6017
7120
|
* @param {CatalogPlatformApplicationValidator.UpdateSearchConfigurationParam} arg
|
|
6018
7121
|
* - Arg object
|
|
6019
7122
|
*
|
|
6020
7123
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6021
7124
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6022
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
7125
|
+
* @returns {Promise<CatalogPlatformModel.UpdateSearchConfigurationResponseSchema>}
|
|
6023
7126
|
* - Success response
|
|
6024
7127
|
*
|
|
6025
7128
|
* @name updateSearchConfiguration
|
|
6026
7129
|
* @summary: Update search configuration
|
|
6027
|
-
* @description: Allows you to modify searchable attributes for an sales channel. searchable attributes are the fields on which the products are searched. - Check out [method documentation](https://
|
|
7130
|
+
* @description: Allows you to modify searchable attributes for an sales channel. searchable attributes are the fields on which the products are searched. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateSearchConfiguration/).
|
|
6028
7131
|
*/
|
|
6029
7132
|
async updateSearchConfiguration(
|
|
6030
7133
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -6077,7 +7180,7 @@ class Catalog {
|
|
|
6077
7180
|
|
|
6078
7181
|
const {
|
|
6079
7182
|
error: res_error,
|
|
6080
|
-
} = CatalogPlatformModel.
|
|
7183
|
+
} = CatalogPlatformModel.UpdateSearchConfigurationResponseSchema().validate(
|
|
6081
7184
|
responseData,
|
|
6082
7185
|
{ abortEarly: false, allowUnknown: true }
|
|
6083
7186
|
);
|
|
@@ -6105,7 +7208,7 @@ class Catalog {
|
|
|
6105
7208
|
* @returns {Promise<CatalogPlatformModel.GetSearchWordsData>} - Success response
|
|
6106
7209
|
* @name updateSearchKeywords
|
|
6107
7210
|
* @summary: Update search keywords
|
|
6108
|
-
* @description: Update a specific search keyword by its id for a specific company and sales channel. - Check out [method documentation](https://
|
|
7211
|
+
* @description: Update a specific search keyword by its id for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateSearchKeywords/).
|
|
6109
7212
|
*/
|
|
6110
7213
|
async updateSearchKeywords(
|
|
6111
7214
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|