@gofynd/fdk-client-javascript 3.17.0 → 3.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +40 -0
- package/sdk/application/Cart/CartApplicationClient.js +176 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +11 -1
- package/sdk/application/Content/ContentApplicationClient.js +40 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
- package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +72 -10
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +634 -33
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +951 -1
- package/sdk/platform/Cart/CartPlatformModel.js +597 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +123 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +829 -39
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -5
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1023 -31
- package/sdk/platform/Catalog/CatalogPlatformModel.js +841 -26
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +7 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +7 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +3 -3
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -8
- package/sdk/platform/Content/ContentPlatformModel.js +11 -8
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +2 -2
- package/sdk/platform/Order/OrderPlatformModel.d.ts +20 -2
- package/sdk/platform/Order/OrderPlatformModel.js +9 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +356 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +229 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
- package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
|
@@ -12,6 +12,11 @@ const Joi = require("joi");
|
|
|
12
12
|
* @property {ValidationError[]} errors - A list of validation errors in the request.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @typedef StandardError
|
|
17
|
+
* @property {string} message - A brief description of the error.
|
|
18
|
+
*/
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* @typedef AllSizes
|
|
17
22
|
* @property {ValidateIdentifier[]} [identifiers] - A collection of identifiers
|
|
@@ -116,6 +121,144 @@ const Joi = require("joi");
|
|
|
116
121
|
* @property {string} [name] - Name of the application.
|
|
117
122
|
* @property {number} priority - Defines the priority level for this
|
|
118
123
|
* configuration, with 1 being the highest.
|
|
124
|
+
* @property {SortWeights} [weights]
|
|
125
|
+
* @property {CohortSortingConfiguration} [cohorts]
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @typedef SortWeights
|
|
130
|
+
* @property {number} [popularity] - Controls how strongly overall product
|
|
131
|
+
* popularity influences ranking. Products with higher engagement and demand
|
|
132
|
+
* are ranked higher.
|
|
133
|
+
* @property {number} [availability] - Controls the importance of product
|
|
134
|
+
* availability and fulfilment readiness in ranking. Products that are more
|
|
135
|
+
* consistently available are prioritized over low-stock or unreliable items.
|
|
136
|
+
* @property {number} [conversion] - Controls the effectiveness of product
|
|
137
|
+
* conversion rates in ranking. Products that convert views into purchases
|
|
138
|
+
* more efficiently are ranked higher.
|
|
139
|
+
* @property {number} [sold_quantity] - Reflects historical sales volume of a
|
|
140
|
+
* product. Products with higher sales volumes are ranked higher.
|
|
141
|
+
* @property {number} [depth] - Measures size or variant depth of a product.
|
|
142
|
+
* Products with more size options and inventory depth are ranked higher.
|
|
143
|
+
* @property {number} [listing] - Represents recency or freshness of the product
|
|
144
|
+
* listing. Products that are recently listed or have fresh inventory are
|
|
145
|
+
* ranked higher.
|
|
146
|
+
* @property {number} [discount] - Indicates the promotional value of a product.
|
|
147
|
+
* Products with higher discounts or promotions are ranked higher.
|
|
148
|
+
* @property {number} [cancelled] - Reflects historical cancellation reliability
|
|
149
|
+
* of a product or seller. Products with lower cancellation rates are ranked higher.
|
|
150
|
+
* @property {number} [returns] - Measures post-purchase return behavior.
|
|
151
|
+
* Products with lower return rates are ranked higher.
|
|
152
|
+
* @property {number} [catalogue] - Represents quality and completeness of
|
|
153
|
+
* catalog content. Products with more complete and high-quality content are
|
|
154
|
+
* ranked higher.
|
|
155
|
+
* @property {number} [revenue] - Represents revenue contribution potential of a
|
|
156
|
+
* product. Products that generate higher revenue are ranked higher.
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @typedef CohortWeights
|
|
161
|
+
* @property {SortWeights} weights
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @typedef HighSpenderRepeatCustomerWeights
|
|
166
|
+
* @property {SortWeights} weights
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @typedef HyperactiveRepeatCustomerWeights
|
|
171
|
+
* @property {SortWeights} weights
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @typedef HighSpenderOccasionalCustomerWeights
|
|
176
|
+
* @property {SortWeights} weights
|
|
177
|
+
*/
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @typedef StandardOccasionalCustomerWeights
|
|
181
|
+
* @property {SortWeights} weights
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @typedef DormantPremiumCustomerWeights
|
|
186
|
+
* @property {SortWeights} weights
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @typedef BudgetRegularCustomerWeights
|
|
191
|
+
* @property {SortWeights} weights
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @typedef HighSpenderRegularCustomerWeights
|
|
196
|
+
* @property {SortWeights} weights
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @typedef StandardCustomerAboutToChurnWeights
|
|
201
|
+
* @property {SortWeights} weights
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @typedef PremiumCustomerAboutToChurnWeights
|
|
206
|
+
* @property {SortWeights} weights
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @typedef HighSpenderCustomerAboutToChurnWeights
|
|
211
|
+
* @property {SortWeights} weights
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @typedef StandardDormantCustomerWeights
|
|
216
|
+
* @property {SortWeights} weights
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @typedef HighSpenderDormantCustomerWeights
|
|
221
|
+
* @property {SortWeights} weights
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @typedef PotentialCustomerWeights
|
|
226
|
+
* @property {SortWeights} weights
|
|
227
|
+
*/
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @typedef NewCustomerWeights
|
|
231
|
+
* @property {SortWeights} weights
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @typedef BudgetRepeatCustomerWeights
|
|
236
|
+
* @property {SortWeights} weights
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @typedef AverageSpenderRepeatCustomerWeights
|
|
241
|
+
* @property {SortWeights} weights
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @typedef CohortSortingConfiguration
|
|
246
|
+
* @property {HighSpenderRepeatCustomerWeights} [high_spender_repeat_customer]
|
|
247
|
+
* @property {HyperactiveRepeatCustomerWeights} [hyperactive_premium_repeat_customer]
|
|
248
|
+
* @property {HighSpenderOccasionalCustomerWeights} [high_spender_occasional_customer]
|
|
249
|
+
* @property {StandardOccasionalCustomerWeights} [standard_occasional_customer]
|
|
250
|
+
* @property {DormantPremiumCustomerWeights} [dormant_premium_customer]
|
|
251
|
+
* @property {BudgetRegularCustomerWeights} [budget_regular_customer]
|
|
252
|
+
* @property {HighSpenderRegularCustomerWeights} [high_spender_regular_customer]
|
|
253
|
+
* @property {StandardCustomerAboutToChurnWeights} [standard_customer_about_to_churn]
|
|
254
|
+
* @property {PremiumCustomerAboutToChurnWeights} [premium_customer_about_to_churn]
|
|
255
|
+
* @property {HighSpenderCustomerAboutToChurnWeights} [high_spender_customer_about_to_churn]
|
|
256
|
+
* @property {StandardDormantCustomerWeights} [standard_dormant_customer]
|
|
257
|
+
* @property {HighSpenderDormantCustomerWeights} [high_spender_dormant_customer]
|
|
258
|
+
* @property {PotentialCustomerWeights} [potential_customer]
|
|
259
|
+
* @property {NewCustomerWeights} [new_customer]
|
|
260
|
+
* @property {BudgetRepeatCustomerWeights} [budget_repeat_customer]
|
|
261
|
+
* @property {AverageSpenderRepeatCustomerWeights} [average_spender_repeat_customer]
|
|
119
262
|
*/
|
|
120
263
|
|
|
121
264
|
/**
|
|
@@ -3050,6 +3193,26 @@ const Joi = require("joi");
|
|
|
3050
3193
|
* @property {Page} [page]
|
|
3051
3194
|
*/
|
|
3052
3195
|
|
|
3196
|
+
/**
|
|
3197
|
+
* @typedef PriceStrategySchema
|
|
3198
|
+
* @property {string} currency - Currency for the pricing strategy
|
|
3199
|
+
* @property {number} adjustment_value - Adjustment value for the pricing strategy
|
|
3200
|
+
* @property {string} adjustment_type - Type of adjustment for the pricing strategy
|
|
3201
|
+
*/
|
|
3202
|
+
|
|
3203
|
+
/**
|
|
3204
|
+
* @typedef PriceFactoryResponseSchema
|
|
3205
|
+
* @property {string} [price_zone_id] - Unique identifier of the price zone
|
|
3206
|
+
* @property {string} [price_factory_id] - Unique identifier of the price factory
|
|
3207
|
+
* @property {string} [modified_by] - User who last modified the price factory
|
|
3208
|
+
* @property {string[]} [currencies] - List of currencies supported by the price factory
|
|
3209
|
+
* @property {string} [name] - Name of the price factory
|
|
3210
|
+
* @property {PriceStrategySchema[]} [price_strategy] - Pricing strategy for the
|
|
3211
|
+
* price factory
|
|
3212
|
+
* @property {boolean} [active] - Whether the price factory is active
|
|
3213
|
+
* @property {string} [created_by] - User who created the price factory
|
|
3214
|
+
*/
|
|
3215
|
+
|
|
3053
3216
|
/**
|
|
3054
3217
|
* @typedef Product
|
|
3055
3218
|
* @property {Object} [_custom_json] - A custom JSON object that can hold any
|
|
@@ -4804,6 +4967,46 @@ const Joi = require("joi");
|
|
|
4804
4967
|
* @typedef TaxReqBodyVersion
|
|
4805
4968
|
* @property {TaxComponent[]} components - List of tax components with their
|
|
4806
4969
|
* respective slabs and rates.
|
|
4970
|
+
* @property {string} [applicable_date] - Optional future effective date for the
|
|
4971
|
+
* version. Must be at least one minute ahead of the current time when supplied.
|
|
4972
|
+
* @property {string} [region_type] - Required whenever areas are supplied to
|
|
4973
|
+
* indicate the granularity of the provided regions.
|
|
4974
|
+
* @property {TaxGeoArea} [areas]
|
|
4975
|
+
* @property {number[]} [store_ids] - Store identifiers for store-level taxation.
|
|
4976
|
+
*/
|
|
4977
|
+
|
|
4978
|
+
/**
|
|
4979
|
+
* @typedef TaxGeoArea
|
|
4980
|
+
* @property {string[]} regions - List of region identifiers based on the
|
|
4981
|
+
* selected region_type.
|
|
4982
|
+
* @property {string} country - Country identifier that groups the regions.
|
|
4983
|
+
*/
|
|
4984
|
+
|
|
4985
|
+
/**
|
|
4986
|
+
* @typedef AreaDetails
|
|
4987
|
+
* @property {string} [uid]
|
|
4988
|
+
* @property {string} [display_name]
|
|
4989
|
+
* @property {string} [sub_type]
|
|
4990
|
+
* @property {string[]} [parent_id]
|
|
4991
|
+
*/
|
|
4992
|
+
|
|
4993
|
+
/**
|
|
4994
|
+
* @typedef Country
|
|
4995
|
+
* @property {string} [uid]
|
|
4996
|
+
* @property {string} [display_name]
|
|
4997
|
+
*/
|
|
4998
|
+
|
|
4999
|
+
/**
|
|
5000
|
+
* @typedef Area
|
|
5001
|
+
* @property {AreaDetails[]} regions
|
|
5002
|
+
* @property {Country} country
|
|
5003
|
+
*/
|
|
5004
|
+
|
|
5005
|
+
/**
|
|
5006
|
+
* @typedef RegionReference
|
|
5007
|
+
* @property {string} [name]
|
|
5008
|
+
* @property {string} [slug]
|
|
5009
|
+
* @property {Area[]} [areas]
|
|
4807
5010
|
*/
|
|
4808
5011
|
|
|
4809
5012
|
/**
|
|
@@ -4816,12 +5019,17 @@ const Joi = require("joi");
|
|
|
4816
5019
|
* @typedef TaxVersion
|
|
4817
5020
|
* @property {string} [_id]
|
|
4818
5021
|
* @property {string} [rule_id] - Tax Rule ID.
|
|
4819
|
-
* @property {string} [applicable_date] -
|
|
4820
|
-
*
|
|
5022
|
+
* @property {string} [applicable_date] - Scheduled effective date for the
|
|
5023
|
+
* version. Must be at least one minute ahead of current time when provided.
|
|
4821
5024
|
* @property {string} [created_on]
|
|
4822
5025
|
* @property {string} [modified_on]
|
|
4823
5026
|
* @property {number} [company_id] - Company ID.
|
|
4824
5027
|
* @property {TaxStatusEnum} [status]
|
|
5028
|
+
* @property {string} [region_type] - Present when the version targets a
|
|
5029
|
+
* specific set of regions rather than the default country-level rule.
|
|
5030
|
+
* @property {TaxGeoArea} [areas]
|
|
5031
|
+
* @property {number[]} [store_ids] - Store identifiers for store-level taxation.
|
|
5032
|
+
* @property {TaxVersionScopeEnum} [scope]
|
|
4825
5033
|
* @property {TaxComponentResponseSchema[]} [components] - List of tax components.
|
|
4826
5034
|
*/
|
|
4827
5035
|
|
|
@@ -4829,15 +5037,24 @@ const Joi = require("joi");
|
|
|
4829
5037
|
* @typedef UpdateTaxVersionRequestBody
|
|
4830
5038
|
* @property {TaxComponentResponseSchema[]} components - List of tax components.
|
|
4831
5039
|
* @property {string} applicable_date - It is the date from when this rule will
|
|
4832
|
-
* come in effect. It should be
|
|
5040
|
+
* come in effect. It should be at least one minute in the future from the
|
|
5041
|
+
* current time.
|
|
5042
|
+
* @property {string} [region_type] - Required when areas are present to denote
|
|
5043
|
+
* the level (city/state/pincode) at which the version applies.
|
|
5044
|
+
* @property {TaxGeoArea} [areas]
|
|
5045
|
+
* @property {number[]} [store_ids] - Store identifiers for store-level taxation.
|
|
4833
5046
|
*/
|
|
4834
5047
|
|
|
4835
5048
|
/**
|
|
4836
5049
|
* @typedef CreateTaxVersionRequestBody
|
|
4837
5050
|
* @property {TaxComponent[]} components - List of tax components.
|
|
4838
|
-
* @property {string} applicable_date -
|
|
4839
|
-
* come in effect. It should be
|
|
4840
|
-
* current time. Date time format YYYY-MM-DDThh:mm:ss±hh:mm.
|
|
5051
|
+
* @property {string} [applicable_date] - Optional scheduled date from when this
|
|
5052
|
+
* rule will come in effect. It should be at least one minute in the future
|
|
5053
|
+
* from the current time. Date time format YYYY-MM-DDThh:mm:ss±hh:mm.
|
|
5054
|
+
* @property {string} [region_type] - Required when areas are present to denote
|
|
5055
|
+
* the level (city/state/pincode) at which the version applies.
|
|
5056
|
+
* @property {TaxGeoArea} [areas]
|
|
5057
|
+
* @property {number[]} [store_ids] - Store identifiers for store-level taxation.
|
|
4841
5058
|
*/
|
|
4842
5059
|
|
|
4843
5060
|
/**
|
|
@@ -4857,12 +5074,19 @@ const Joi = require("joi");
|
|
|
4857
5074
|
* @typedef TaxVersionDetail
|
|
4858
5075
|
* @property {string} _id
|
|
4859
5076
|
* @property {string} rule_id
|
|
4860
|
-
* @property {string} applicable_date
|
|
5077
|
+
* @property {string} applicable_date - It is the date from when this rule comes
|
|
5078
|
+
* in effect. Always present and should be at least one minute in the future
|
|
5079
|
+
* when scheduled.
|
|
4861
5080
|
* @property {string} created_on
|
|
4862
5081
|
* @property {string} modified_on
|
|
4863
5082
|
* @property {number} company_id
|
|
4864
5083
|
* @property {TaxStatusEnum} [status]
|
|
5084
|
+
* @property {string} [region_code] - Region code for areas sent when adding a
|
|
5085
|
+
* region override.
|
|
5086
|
+
* @property {number[]} [store_ids] - Store identifiers for store-level taxation.
|
|
5087
|
+
* @property {RegionReference} [region]
|
|
4865
5088
|
* @property {TaxComponent[]} components - List of components.
|
|
5089
|
+
* @property {TaxVersionScopeEnum} [scope]
|
|
4866
5090
|
* @property {string} version_status - Specifies the type of tax version.
|
|
4867
5091
|
*/
|
|
4868
5092
|
|
|
@@ -4872,12 +5096,6 @@ const Joi = require("joi");
|
|
|
4872
5096
|
* @property {TaxVersion} [versions]
|
|
4873
5097
|
*/
|
|
4874
5098
|
|
|
4875
|
-
/**
|
|
4876
|
-
* @typedef UpdateTaxVersion
|
|
4877
|
-
* @property {TaxComponent[]} components - List of components.
|
|
4878
|
-
* @property {string} applicable_date
|
|
4879
|
-
*/
|
|
4880
|
-
|
|
4881
5099
|
/**
|
|
4882
5100
|
* @typedef UpdateTaxRequestBody
|
|
4883
5101
|
* @property {TaxStatusEnum} status
|
|
@@ -4937,6 +5155,158 @@ const Joi = require("joi");
|
|
|
4937
5155
|
* @property {Page} page
|
|
4938
5156
|
*/
|
|
4939
5157
|
|
|
5158
|
+
/**
|
|
5159
|
+
* @typedef PriceFactoryListItemsSchema
|
|
5160
|
+
* @property {string} [price_factory_id] - Unique identifier for the price factory.
|
|
5161
|
+
* @property {string} [name] - Name of the price factory configuration.
|
|
5162
|
+
* @property {string} [type] - Type of price factory.
|
|
5163
|
+
* @property {string[]} [currencies] - List of currency codes (e.g., INR, USD).
|
|
5164
|
+
* @property {PriceStrategySchema[]} [price_strategy] - List of pricing
|
|
5165
|
+
* strategies to apply for each currency.
|
|
5166
|
+
* @property {string} [price_zone_id] - ID of the price zone.
|
|
5167
|
+
* @property {boolean} [active] - Status of the price factory (active/inactive).
|
|
5168
|
+
* @property {CreatedBy} [modified_by]
|
|
5169
|
+
* @property {CreatedBy} [created_by]
|
|
5170
|
+
* @property {string} [modified_on] - Timestamp of the last modification.
|
|
5171
|
+
*/
|
|
5172
|
+
|
|
5173
|
+
/**
|
|
5174
|
+
* @typedef PriceFactoryListResponseSchema
|
|
5175
|
+
* @property {Page} [page]
|
|
5176
|
+
* @property {PriceFactoryListItemsSchema[]} [data] - List of price factory
|
|
5177
|
+
* configurations.
|
|
5178
|
+
*/
|
|
5179
|
+
|
|
5180
|
+
/**
|
|
5181
|
+
* @typedef CreatePriceFactoryConfigSchema
|
|
5182
|
+
* @property {string} [name] - The name of the price factory configuration.
|
|
5183
|
+
* @property {string} [type] - Defines the type of price factory, either
|
|
5184
|
+
* regional or international.
|
|
5185
|
+
* @property {string[]} [currencies] - List of currency codes applicable for
|
|
5186
|
+
* pricing (e.g., USD, EUR).
|
|
5187
|
+
* @property {PriceStrategySchema[]} [price_strategy] - List of pricing
|
|
5188
|
+
* strategies to apply for each currency.
|
|
5189
|
+
* @property {string} [price_zone_id] - Identifier for the price zone associated
|
|
5190
|
+
* with the price factory.
|
|
5191
|
+
*/
|
|
5192
|
+
|
|
5193
|
+
/**
|
|
5194
|
+
* @typedef UpdatePriceFactoryConfigSchema
|
|
5195
|
+
* @property {string} [name] - The name of the price factory configuration.
|
|
5196
|
+
* @property {string[]} [currencies] - List of currency codes applicable for
|
|
5197
|
+
* pricing (e.g., USD, EUR).
|
|
5198
|
+
* @property {PriceStrategySchema[]} [price_strategy] - List of pricing
|
|
5199
|
+
* strategies to apply for each currency.
|
|
5200
|
+
* @property {string} [price_zone_id] - Identifier for the price zone associated
|
|
5201
|
+
* with the price factory.
|
|
5202
|
+
*/
|
|
5203
|
+
|
|
5204
|
+
/**
|
|
5205
|
+
* @typedef PriceFactoryConfigSchema
|
|
5206
|
+
* @property {string} [name] - The name of the price factory configuration.
|
|
5207
|
+
* @property {string} [type] - Defines the type of price factory, either
|
|
5208
|
+
* regional or international.
|
|
5209
|
+
* @property {string[]} [currencies] - List of currency codes applicable for
|
|
5210
|
+
* pricing (e.g., USD, EUR).
|
|
5211
|
+
* @property {PriceStrategySchema[]} [price_strategy] - List of pricing
|
|
5212
|
+
* strategies to apply for each currency.
|
|
5213
|
+
* @property {string} [price_zone_id] - Identifier for the price zone associated
|
|
5214
|
+
* with the price factory.
|
|
5215
|
+
* @property {CreatedBy} [created_by]
|
|
5216
|
+
* @property {CreatedBy} [modified_by]
|
|
5217
|
+
*/
|
|
5218
|
+
|
|
5219
|
+
/**
|
|
5220
|
+
* @typedef CurrencyPriceSchema
|
|
5221
|
+
* @property {number} marked_price - Original price before any discounts.
|
|
5222
|
+
* @property {number} selling_price - Final price after applying discounts or adjustments.
|
|
5223
|
+
* @property {string} currency - Currency code (e.g., USD, EUR).
|
|
5224
|
+
*/
|
|
5225
|
+
|
|
5226
|
+
/**
|
|
5227
|
+
* @typedef UpsertPriceFactorySizesSchema
|
|
5228
|
+
* @property {string} [size] - The identifier for the product size (e.g., S, M, L, OS).
|
|
5229
|
+
* @property {CurrencyPriceSchema[]} [currency_prices] - The list of currency prices
|
|
5230
|
+
*/
|
|
5231
|
+
|
|
5232
|
+
/**
|
|
5233
|
+
* @typedef UpsertPriceFactoryProductSchema
|
|
5234
|
+
* @property {UpsertPriceFactorySizesSchema[]} [sizes] - List of size-level
|
|
5235
|
+
* pricing configurations.
|
|
5236
|
+
* @property {boolean} [active] - Indicates whether the product configuration is active.
|
|
5237
|
+
*/
|
|
5238
|
+
|
|
5239
|
+
/**
|
|
5240
|
+
* @typedef PriceFactoryCurrencyPriceSchema
|
|
5241
|
+
* @property {boolean} [base_price] - Indicates if this price is the base price.
|
|
5242
|
+
* @property {string} [currency] - Currency code (e.g., INR).
|
|
5243
|
+
* @property {number} [selling_price] - The price at which the item is sold.
|
|
5244
|
+
* @property {number} [marked_price] - The original marked price of the item.
|
|
5245
|
+
*/
|
|
5246
|
+
|
|
5247
|
+
/**
|
|
5248
|
+
* @typedef PriceFactorySizesSchema
|
|
5249
|
+
* @property {string} [price_factory_id] - ID of the price factory entry.
|
|
5250
|
+
* @property {string} [seller_identifier] - Identifier of the seller for the item.
|
|
5251
|
+
* @property {string} [size] - Size of the product (e.g., OS).
|
|
5252
|
+
* @property {string} [price_zone_id] - Price zone identifier for
|
|
5253
|
+
* regional/international pricing.
|
|
5254
|
+
* @property {PriceFactoryCurrencyPriceSchema[]} [currency_prices] - Pricing
|
|
5255
|
+
* information across different currencies.
|
|
5256
|
+
*/
|
|
5257
|
+
|
|
5258
|
+
/**
|
|
5259
|
+
* @typedef PriceFactoryProductResponseSchema
|
|
5260
|
+
* @property {number} [item_id] - Unique identifier for the item in the price
|
|
5261
|
+
* factory response.
|
|
5262
|
+
* @property {string} [item_code] - Code identifying the item.
|
|
5263
|
+
* @property {string} [name] - Name of the item.
|
|
5264
|
+
* @property {boolean} [active] - Indicates if the item is currently active.
|
|
5265
|
+
* @property {string[]} [media] - List of media associated with the item.
|
|
5266
|
+
* @property {PriceFactorySizesSchema[]} [sizes] - List of size and pricing details.
|
|
5267
|
+
*/
|
|
5268
|
+
|
|
5269
|
+
/**
|
|
5270
|
+
* @typedef PriceFactoryProductListResponseSchema
|
|
5271
|
+
* @property {PriceFactoryProductResponseSchema[]} [items] - List of products
|
|
5272
|
+
* details with sizes and prices details.
|
|
5273
|
+
* @property {Page} [page]
|
|
5274
|
+
*/
|
|
5275
|
+
|
|
5276
|
+
/**
|
|
5277
|
+
* @typedef PriceRange
|
|
5278
|
+
* @property {number} [min] - Minimum price.
|
|
5279
|
+
* @property {number} [max] - Maximum price.
|
|
5280
|
+
*/
|
|
5281
|
+
|
|
5282
|
+
/**
|
|
5283
|
+
* @typedef CurrencyPrice
|
|
5284
|
+
* @property {number} [discount] - Discount value applied in percentage.
|
|
5285
|
+
* @property {string} [currency_code] - Currency code (e.g., 'INR', 'EUR').
|
|
5286
|
+
* @property {string} [currency_symbol] - Symbol of the currency.
|
|
5287
|
+
* @property {PriceRange} [marked]
|
|
5288
|
+
* @property {PriceRange} [effective]
|
|
5289
|
+
* @property {PriceRange} [selling]
|
|
5290
|
+
*/
|
|
5291
|
+
|
|
5292
|
+
/**
|
|
5293
|
+
* @typedef ProductPrice
|
|
5294
|
+
* @property {string} [zone_type] - Type of the pricing zone, e.g., 'price' or 'delivery'.
|
|
5295
|
+
* @property {string} [zone_identifier] - Unique identifier for the zone.
|
|
5296
|
+
* @property {CurrencyPrice[]} [currency_prices] - List of prices for different
|
|
5297
|
+
* currencies in this zone.
|
|
5298
|
+
*/
|
|
5299
|
+
|
|
5300
|
+
/**
|
|
5301
|
+
* @typedef AppProductPricesSchema
|
|
5302
|
+
* @property {string} [item_code] - Unique code identifying the item.
|
|
5303
|
+
* @property {number} [brand_uid] - Unique identifier for the brand.
|
|
5304
|
+
* @property {number} [item_id] - Unique identifier for the item.
|
|
5305
|
+
* @property {Object} [discount_meta] - Additional discount metadata.
|
|
5306
|
+
* @property {ProductPrice[]} [product_price] - Pricing information for various
|
|
5307
|
+
* zones and currencies.
|
|
5308
|
+
*/
|
|
5309
|
+
|
|
4940
5310
|
/**
|
|
4941
5311
|
* @typedef ActionPage
|
|
4942
5312
|
* @property {Object} [params] - Parameters that should be considered in path.
|
|
@@ -4987,6 +5357,8 @@ const Joi = require("joi");
|
|
|
4987
5357
|
|
|
4988
5358
|
/** @typedef {"ACTIVE" | "INACTIVE" | "DELETED"} TaxStatusEnum */
|
|
4989
5359
|
|
|
5360
|
+
/** @typedef {"COUNTRY" | "REGION" | "STORE"} TaxVersionScopeEnum */
|
|
5361
|
+
|
|
4990
5362
|
/** @typedef {"HS" | "SAC"} HsTypeEnum */
|
|
4991
5363
|
|
|
4992
5364
|
/**
|
|
@@ -5039,7 +5411,8 @@ const Joi = require("joi");
|
|
|
5039
5411
|
* | "order-status"
|
|
5040
5412
|
* | "locate-us"
|
|
5041
5413
|
* | "single-page-checkout"
|
|
5042
|
-
* | "request-reattempt"
|
|
5414
|
+
* | "request-reattempt"
|
|
5415
|
+
* | "files"} PageType
|
|
5043
5416
|
*/
|
|
5044
5417
|
|
|
5045
5418
|
class CatalogPlatformModel {
|
|
@@ -5061,6 +5434,13 @@ class CatalogPlatformModel {
|
|
|
5061
5434
|
});
|
|
5062
5435
|
}
|
|
5063
5436
|
|
|
5437
|
+
/** @returns {StandardError} */
|
|
5438
|
+
static StandardError() {
|
|
5439
|
+
return Joi.object({
|
|
5440
|
+
message: Joi.string().allow("").required(),
|
|
5441
|
+
});
|
|
5442
|
+
}
|
|
5443
|
+
|
|
5064
5444
|
/** @returns {AllSizes} */
|
|
5065
5445
|
static AllSizes() {
|
|
5066
5446
|
return Joi.object({
|
|
@@ -5162,6 +5542,166 @@ class CatalogPlatformModel {
|
|
|
5162
5542
|
logo: Joi.string().allow(""),
|
|
5163
5543
|
name: Joi.string().allow(""),
|
|
5164
5544
|
priority: Joi.number().required(),
|
|
5545
|
+
weights: CatalogPlatformModel.SortWeights(),
|
|
5546
|
+
cohorts: CatalogPlatformModel.CohortSortingConfiguration(),
|
|
5547
|
+
});
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5550
|
+
/** @returns {SortWeights} */
|
|
5551
|
+
static SortWeights() {
|
|
5552
|
+
return Joi.object({
|
|
5553
|
+
popularity: Joi.number(),
|
|
5554
|
+
availability: Joi.number(),
|
|
5555
|
+
conversion: Joi.number(),
|
|
5556
|
+
sold_quantity: Joi.number(),
|
|
5557
|
+
depth: Joi.number(),
|
|
5558
|
+
listing: Joi.number(),
|
|
5559
|
+
discount: Joi.number(),
|
|
5560
|
+
cancelled: Joi.number(),
|
|
5561
|
+
returns: Joi.number(),
|
|
5562
|
+
catalogue: Joi.number(),
|
|
5563
|
+
revenue: Joi.number(),
|
|
5564
|
+
});
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5567
|
+
/** @returns {CohortWeights} */
|
|
5568
|
+
static CohortWeights() {
|
|
5569
|
+
return Joi.object({
|
|
5570
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5571
|
+
});
|
|
5572
|
+
}
|
|
5573
|
+
|
|
5574
|
+
/** @returns {HighSpenderRepeatCustomerWeights} */
|
|
5575
|
+
static HighSpenderRepeatCustomerWeights() {
|
|
5576
|
+
return Joi.object({
|
|
5577
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5578
|
+
});
|
|
5579
|
+
}
|
|
5580
|
+
|
|
5581
|
+
/** @returns {HyperactiveRepeatCustomerWeights} */
|
|
5582
|
+
static HyperactiveRepeatCustomerWeights() {
|
|
5583
|
+
return Joi.object({
|
|
5584
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5585
|
+
});
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
/** @returns {HighSpenderOccasionalCustomerWeights} */
|
|
5589
|
+
static HighSpenderOccasionalCustomerWeights() {
|
|
5590
|
+
return Joi.object({
|
|
5591
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5592
|
+
});
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
/** @returns {StandardOccasionalCustomerWeights} */
|
|
5596
|
+
static StandardOccasionalCustomerWeights() {
|
|
5597
|
+
return Joi.object({
|
|
5598
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5599
|
+
});
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
/** @returns {DormantPremiumCustomerWeights} */
|
|
5603
|
+
static DormantPremiumCustomerWeights() {
|
|
5604
|
+
return Joi.object({
|
|
5605
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5606
|
+
});
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
/** @returns {BudgetRegularCustomerWeights} */
|
|
5610
|
+
static BudgetRegularCustomerWeights() {
|
|
5611
|
+
return Joi.object({
|
|
5612
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5613
|
+
});
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
/** @returns {HighSpenderRegularCustomerWeights} */
|
|
5617
|
+
static HighSpenderRegularCustomerWeights() {
|
|
5618
|
+
return Joi.object({
|
|
5619
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5620
|
+
});
|
|
5621
|
+
}
|
|
5622
|
+
|
|
5623
|
+
/** @returns {StandardCustomerAboutToChurnWeights} */
|
|
5624
|
+
static StandardCustomerAboutToChurnWeights() {
|
|
5625
|
+
return Joi.object({
|
|
5626
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5627
|
+
});
|
|
5628
|
+
}
|
|
5629
|
+
|
|
5630
|
+
/** @returns {PremiumCustomerAboutToChurnWeights} */
|
|
5631
|
+
static PremiumCustomerAboutToChurnWeights() {
|
|
5632
|
+
return Joi.object({
|
|
5633
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5634
|
+
});
|
|
5635
|
+
}
|
|
5636
|
+
|
|
5637
|
+
/** @returns {HighSpenderCustomerAboutToChurnWeights} */
|
|
5638
|
+
static HighSpenderCustomerAboutToChurnWeights() {
|
|
5639
|
+
return Joi.object({
|
|
5640
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5641
|
+
});
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
/** @returns {StandardDormantCustomerWeights} */
|
|
5645
|
+
static StandardDormantCustomerWeights() {
|
|
5646
|
+
return Joi.object({
|
|
5647
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5648
|
+
});
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
/** @returns {HighSpenderDormantCustomerWeights} */
|
|
5652
|
+
static HighSpenderDormantCustomerWeights() {
|
|
5653
|
+
return Joi.object({
|
|
5654
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5655
|
+
});
|
|
5656
|
+
}
|
|
5657
|
+
|
|
5658
|
+
/** @returns {PotentialCustomerWeights} */
|
|
5659
|
+
static PotentialCustomerWeights() {
|
|
5660
|
+
return Joi.object({
|
|
5661
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5662
|
+
});
|
|
5663
|
+
}
|
|
5664
|
+
|
|
5665
|
+
/** @returns {NewCustomerWeights} */
|
|
5666
|
+
static NewCustomerWeights() {
|
|
5667
|
+
return Joi.object({
|
|
5668
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5669
|
+
});
|
|
5670
|
+
}
|
|
5671
|
+
|
|
5672
|
+
/** @returns {BudgetRepeatCustomerWeights} */
|
|
5673
|
+
static BudgetRepeatCustomerWeights() {
|
|
5674
|
+
return Joi.object({
|
|
5675
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5676
|
+
});
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
/** @returns {AverageSpenderRepeatCustomerWeights} */
|
|
5680
|
+
static AverageSpenderRepeatCustomerWeights() {
|
|
5681
|
+
return Joi.object({
|
|
5682
|
+
weights: CatalogPlatformModel.SortWeights().required(),
|
|
5683
|
+
});
|
|
5684
|
+
}
|
|
5685
|
+
|
|
5686
|
+
/** @returns {CohortSortingConfiguration} */
|
|
5687
|
+
static CohortSortingConfiguration() {
|
|
5688
|
+
return Joi.object({
|
|
5689
|
+
high_spender_repeat_customer: CatalogPlatformModel.HighSpenderRepeatCustomerWeights(),
|
|
5690
|
+
hyperactive_premium_repeat_customer: CatalogPlatformModel.HyperactiveRepeatCustomerWeights(),
|
|
5691
|
+
high_spender_occasional_customer: CatalogPlatformModel.HighSpenderOccasionalCustomerWeights(),
|
|
5692
|
+
standard_occasional_customer: CatalogPlatformModel.StandardOccasionalCustomerWeights(),
|
|
5693
|
+
dormant_premium_customer: CatalogPlatformModel.DormantPremiumCustomerWeights(),
|
|
5694
|
+
budget_regular_customer: CatalogPlatformModel.BudgetRegularCustomerWeights(),
|
|
5695
|
+
high_spender_regular_customer: CatalogPlatformModel.HighSpenderRegularCustomerWeights(),
|
|
5696
|
+
standard_customer_about_to_churn: CatalogPlatformModel.StandardCustomerAboutToChurnWeights(),
|
|
5697
|
+
premium_customer_about_to_churn: CatalogPlatformModel.PremiumCustomerAboutToChurnWeights(),
|
|
5698
|
+
high_spender_customer_about_to_churn: CatalogPlatformModel.HighSpenderCustomerAboutToChurnWeights(),
|
|
5699
|
+
standard_dormant_customer: CatalogPlatformModel.StandardDormantCustomerWeights(),
|
|
5700
|
+
high_spender_dormant_customer: CatalogPlatformModel.HighSpenderDormantCustomerWeights(),
|
|
5701
|
+
potential_customer: CatalogPlatformModel.PotentialCustomerWeights(),
|
|
5702
|
+
new_customer: CatalogPlatformModel.NewCustomerWeights(),
|
|
5703
|
+
budget_repeat_customer: CatalogPlatformModel.BudgetRepeatCustomerWeights(),
|
|
5704
|
+
average_spender_repeat_customer: CatalogPlatformModel.AverageSpenderRepeatCustomerWeights(),
|
|
5165
5705
|
});
|
|
5166
5706
|
}
|
|
5167
5707
|
|
|
@@ -8273,6 +8813,31 @@ class CatalogPlatformModel {
|
|
|
8273
8813
|
});
|
|
8274
8814
|
}
|
|
8275
8815
|
|
|
8816
|
+
/** @returns {PriceStrategySchema} */
|
|
8817
|
+
static PriceStrategySchema() {
|
|
8818
|
+
return Joi.object({
|
|
8819
|
+
currency: Joi.string().allow("").required(),
|
|
8820
|
+
adjustment_value: Joi.number().required(),
|
|
8821
|
+
adjustment_type: Joi.string().allow("").required(),
|
|
8822
|
+
});
|
|
8823
|
+
}
|
|
8824
|
+
|
|
8825
|
+
/** @returns {PriceFactoryResponseSchema} */
|
|
8826
|
+
static PriceFactoryResponseSchema() {
|
|
8827
|
+
return Joi.object({
|
|
8828
|
+
price_zone_id: Joi.string().allow(""),
|
|
8829
|
+
price_factory_id: Joi.string().allow(""),
|
|
8830
|
+
modified_by: Joi.string().allow(""),
|
|
8831
|
+
currencies: Joi.array().items(Joi.string().allow("")),
|
|
8832
|
+
name: Joi.string().allow(""),
|
|
8833
|
+
price_strategy: Joi.array().items(
|
|
8834
|
+
CatalogPlatformModel.PriceStrategySchema()
|
|
8835
|
+
),
|
|
8836
|
+
active: Joi.boolean(),
|
|
8837
|
+
created_by: Joi.string().allow(""),
|
|
8838
|
+
});
|
|
8839
|
+
}
|
|
8840
|
+
|
|
8276
8841
|
/** @returns {Product} */
|
|
8277
8842
|
static Product() {
|
|
8278
8843
|
return Joi.object({
|
|
@@ -10079,6 +10644,53 @@ class CatalogPlatformModel {
|
|
|
10079
10644
|
components: Joi.array()
|
|
10080
10645
|
.items(CatalogPlatformModel.TaxComponent())
|
|
10081
10646
|
.required(),
|
|
10647
|
+
applicable_date: Joi.string().allow(""),
|
|
10648
|
+
region_type: Joi.string().allow(""),
|
|
10649
|
+
areas: CatalogPlatformModel.TaxGeoArea(),
|
|
10650
|
+
store_ids: Joi.array().items(Joi.number()),
|
|
10651
|
+
});
|
|
10652
|
+
}
|
|
10653
|
+
|
|
10654
|
+
/** @returns {TaxGeoArea} */
|
|
10655
|
+
static TaxGeoArea() {
|
|
10656
|
+
return Joi.object({
|
|
10657
|
+
regions: Joi.array().items(Joi.string().allow("")).required(),
|
|
10658
|
+
country: Joi.string().allow("").required(),
|
|
10659
|
+
});
|
|
10660
|
+
}
|
|
10661
|
+
|
|
10662
|
+
/** @returns {AreaDetails} */
|
|
10663
|
+
static AreaDetails() {
|
|
10664
|
+
return Joi.object({
|
|
10665
|
+
uid: Joi.string().allow(""),
|
|
10666
|
+
display_name: Joi.string().allow(""),
|
|
10667
|
+
sub_type: Joi.string().allow(""),
|
|
10668
|
+
parent_id: Joi.array().items(Joi.string().allow("")),
|
|
10669
|
+
});
|
|
10670
|
+
}
|
|
10671
|
+
|
|
10672
|
+
/** @returns {Country} */
|
|
10673
|
+
static Country() {
|
|
10674
|
+
return Joi.object({
|
|
10675
|
+
uid: Joi.string().allow(""),
|
|
10676
|
+
display_name: Joi.string().allow(""),
|
|
10677
|
+
});
|
|
10678
|
+
}
|
|
10679
|
+
|
|
10680
|
+
/** @returns {Area} */
|
|
10681
|
+
static Area() {
|
|
10682
|
+
return Joi.object({
|
|
10683
|
+
regions: Joi.array().items(CatalogPlatformModel.AreaDetails()).required(),
|
|
10684
|
+
country: CatalogPlatformModel.Country().required(),
|
|
10685
|
+
});
|
|
10686
|
+
}
|
|
10687
|
+
|
|
10688
|
+
/** @returns {RegionReference} */
|
|
10689
|
+
static RegionReference() {
|
|
10690
|
+
return Joi.object({
|
|
10691
|
+
name: Joi.string().allow(""),
|
|
10692
|
+
slug: Joi.string().allow(""),
|
|
10693
|
+
areas: Joi.array().items(CatalogPlatformModel.Area()),
|
|
10082
10694
|
});
|
|
10083
10695
|
}
|
|
10084
10696
|
|
|
@@ -10102,6 +10714,10 @@ class CatalogPlatformModel {
|
|
|
10102
10714
|
modified_on: Joi.string().allow(""),
|
|
10103
10715
|
company_id: Joi.number(),
|
|
10104
10716
|
status: CatalogPlatformModel.TaxStatusEnum(),
|
|
10717
|
+
region_type: Joi.string().allow(""),
|
|
10718
|
+
areas: CatalogPlatformModel.TaxGeoArea(),
|
|
10719
|
+
store_ids: Joi.array().items(Joi.number()),
|
|
10720
|
+
scope: CatalogPlatformModel.TaxVersionScopeEnum(),
|
|
10105
10721
|
components: Joi.array().items(
|
|
10106
10722
|
CatalogPlatformModel.TaxComponentResponseSchema()
|
|
10107
10723
|
),
|
|
@@ -10115,6 +10731,9 @@ class CatalogPlatformModel {
|
|
|
10115
10731
|
.items(CatalogPlatformModel.TaxComponentResponseSchema())
|
|
10116
10732
|
.required(),
|
|
10117
10733
|
applicable_date: Joi.string().allow("").required(),
|
|
10734
|
+
region_type: Joi.string().allow(""),
|
|
10735
|
+
areas: CatalogPlatformModel.TaxGeoArea(),
|
|
10736
|
+
store_ids: Joi.array().items(Joi.number()),
|
|
10118
10737
|
});
|
|
10119
10738
|
}
|
|
10120
10739
|
|
|
@@ -10124,7 +10743,10 @@ class CatalogPlatformModel {
|
|
|
10124
10743
|
components: Joi.array()
|
|
10125
10744
|
.items(CatalogPlatformModel.TaxComponent())
|
|
10126
10745
|
.required(),
|
|
10127
|
-
applicable_date: Joi.string().allow("")
|
|
10746
|
+
applicable_date: Joi.string().allow(""),
|
|
10747
|
+
region_type: Joi.string().allow(""),
|
|
10748
|
+
areas: CatalogPlatformModel.TaxGeoArea(),
|
|
10749
|
+
store_ids: Joi.array().items(Joi.number()),
|
|
10128
10750
|
});
|
|
10129
10751
|
}
|
|
10130
10752
|
|
|
@@ -10152,9 +10774,13 @@ class CatalogPlatformModel {
|
|
|
10152
10774
|
modified_on: Joi.string().allow("").required(),
|
|
10153
10775
|
company_id: Joi.number().required(),
|
|
10154
10776
|
status: CatalogPlatformModel.TaxStatusEnum(),
|
|
10777
|
+
region_code: Joi.string().allow(""),
|
|
10778
|
+
store_ids: Joi.array().items(Joi.number()),
|
|
10779
|
+
region: CatalogPlatformModel.RegionReference(),
|
|
10155
10780
|
components: Joi.array()
|
|
10156
10781
|
.items(CatalogPlatformModel.TaxComponent())
|
|
10157
10782
|
.required(),
|
|
10783
|
+
scope: CatalogPlatformModel.TaxVersionScopeEnum(),
|
|
10158
10784
|
version_status: Joi.string().allow("").required(),
|
|
10159
10785
|
});
|
|
10160
10786
|
}
|
|
@@ -10167,16 +10793,6 @@ class CatalogPlatformModel {
|
|
|
10167
10793
|
});
|
|
10168
10794
|
}
|
|
10169
10795
|
|
|
10170
|
-
/** @returns {UpdateTaxVersion} */
|
|
10171
|
-
static UpdateTaxVersion() {
|
|
10172
|
-
return Joi.object({
|
|
10173
|
-
components: Joi.array()
|
|
10174
|
-
.items(CatalogPlatformModel.TaxComponent())
|
|
10175
|
-
.required(),
|
|
10176
|
-
applicable_date: Joi.string().allow("").required(),
|
|
10177
|
-
});
|
|
10178
|
-
}
|
|
10179
|
-
|
|
10180
10796
|
/** @returns {UpdateTaxRequestBody} */
|
|
10181
10797
|
static UpdateTaxRequestBody() {
|
|
10182
10798
|
return Joi.object({
|
|
@@ -10255,6 +10871,188 @@ class CatalogPlatformModel {
|
|
|
10255
10871
|
});
|
|
10256
10872
|
}
|
|
10257
10873
|
|
|
10874
|
+
/** @returns {PriceFactoryListItemsSchema} */
|
|
10875
|
+
static PriceFactoryListItemsSchema() {
|
|
10876
|
+
return Joi.object({
|
|
10877
|
+
price_factory_id: Joi.string().allow(""),
|
|
10878
|
+
name: Joi.string().allow(""),
|
|
10879
|
+
type: Joi.string().allow(""),
|
|
10880
|
+
currencies: Joi.array().items(Joi.string().allow("")),
|
|
10881
|
+
price_strategy: Joi.array().items(
|
|
10882
|
+
CatalogPlatformModel.PriceStrategySchema()
|
|
10883
|
+
),
|
|
10884
|
+
price_zone_id: Joi.string().allow(""),
|
|
10885
|
+
active: Joi.boolean(),
|
|
10886
|
+
modified_by: CatalogPlatformModel.CreatedBy(),
|
|
10887
|
+
created_by: CatalogPlatformModel.CreatedBy(),
|
|
10888
|
+
modified_on: Joi.string().allow(""),
|
|
10889
|
+
});
|
|
10890
|
+
}
|
|
10891
|
+
|
|
10892
|
+
/** @returns {PriceFactoryListResponseSchema} */
|
|
10893
|
+
static PriceFactoryListResponseSchema() {
|
|
10894
|
+
return Joi.object({
|
|
10895
|
+
page: CatalogPlatformModel.Page(),
|
|
10896
|
+
data: Joi.array().items(
|
|
10897
|
+
CatalogPlatformModel.PriceFactoryListItemsSchema()
|
|
10898
|
+
),
|
|
10899
|
+
});
|
|
10900
|
+
}
|
|
10901
|
+
|
|
10902
|
+
/** @returns {CreatePriceFactoryConfigSchema} */
|
|
10903
|
+
static CreatePriceFactoryConfigSchema() {
|
|
10904
|
+
return Joi.object({
|
|
10905
|
+
name: Joi.string().allow(""),
|
|
10906
|
+
type: Joi.string().allow(""),
|
|
10907
|
+
currencies: Joi.array().items(Joi.string().allow("")),
|
|
10908
|
+
price_strategy: Joi.array().items(
|
|
10909
|
+
CatalogPlatformModel.PriceStrategySchema()
|
|
10910
|
+
),
|
|
10911
|
+
price_zone_id: Joi.string().allow(""),
|
|
10912
|
+
});
|
|
10913
|
+
}
|
|
10914
|
+
|
|
10915
|
+
/** @returns {UpdatePriceFactoryConfigSchema} */
|
|
10916
|
+
static UpdatePriceFactoryConfigSchema() {
|
|
10917
|
+
return Joi.object({
|
|
10918
|
+
name: Joi.string().allow(""),
|
|
10919
|
+
currencies: Joi.array().items(Joi.string().allow("")),
|
|
10920
|
+
price_strategy: Joi.array().items(
|
|
10921
|
+
CatalogPlatformModel.PriceStrategySchema()
|
|
10922
|
+
),
|
|
10923
|
+
price_zone_id: Joi.string().allow(""),
|
|
10924
|
+
});
|
|
10925
|
+
}
|
|
10926
|
+
|
|
10927
|
+
/** @returns {PriceFactoryConfigSchema} */
|
|
10928
|
+
static PriceFactoryConfigSchema() {
|
|
10929
|
+
return Joi.object({
|
|
10930
|
+
name: Joi.string().allow(""),
|
|
10931
|
+
type: Joi.string().allow(""),
|
|
10932
|
+
currencies: Joi.array().items(Joi.string().allow("")),
|
|
10933
|
+
price_strategy: Joi.array().items(
|
|
10934
|
+
CatalogPlatformModel.PriceStrategySchema()
|
|
10935
|
+
),
|
|
10936
|
+
price_zone_id: Joi.string().allow(""),
|
|
10937
|
+
created_by: CatalogPlatformModel.CreatedBy(),
|
|
10938
|
+
modified_by: CatalogPlatformModel.CreatedBy(),
|
|
10939
|
+
});
|
|
10940
|
+
}
|
|
10941
|
+
|
|
10942
|
+
/** @returns {CurrencyPriceSchema} */
|
|
10943
|
+
static CurrencyPriceSchema() {
|
|
10944
|
+
return Joi.object({
|
|
10945
|
+
marked_price: Joi.number().required(),
|
|
10946
|
+
selling_price: Joi.number().required(),
|
|
10947
|
+
currency: Joi.string().allow("").required(),
|
|
10948
|
+
});
|
|
10949
|
+
}
|
|
10950
|
+
|
|
10951
|
+
/** @returns {UpsertPriceFactorySizesSchema} */
|
|
10952
|
+
static UpsertPriceFactorySizesSchema() {
|
|
10953
|
+
return Joi.object({
|
|
10954
|
+
size: Joi.string().allow(""),
|
|
10955
|
+
currency_prices: Joi.array().items(
|
|
10956
|
+
CatalogPlatformModel.CurrencyPriceSchema()
|
|
10957
|
+
),
|
|
10958
|
+
});
|
|
10959
|
+
}
|
|
10960
|
+
|
|
10961
|
+
/** @returns {UpsertPriceFactoryProductSchema} */
|
|
10962
|
+
static UpsertPriceFactoryProductSchema() {
|
|
10963
|
+
return Joi.object({
|
|
10964
|
+
sizes: Joi.array().items(
|
|
10965
|
+
CatalogPlatformModel.UpsertPriceFactorySizesSchema()
|
|
10966
|
+
),
|
|
10967
|
+
active: Joi.boolean(),
|
|
10968
|
+
});
|
|
10969
|
+
}
|
|
10970
|
+
|
|
10971
|
+
/** @returns {PriceFactoryCurrencyPriceSchema} */
|
|
10972
|
+
static PriceFactoryCurrencyPriceSchema() {
|
|
10973
|
+
return Joi.object({
|
|
10974
|
+
base_price: Joi.boolean(),
|
|
10975
|
+
currency: Joi.string().allow(""),
|
|
10976
|
+
selling_price: Joi.number(),
|
|
10977
|
+
marked_price: Joi.number(),
|
|
10978
|
+
});
|
|
10979
|
+
}
|
|
10980
|
+
|
|
10981
|
+
/** @returns {PriceFactorySizesSchema} */
|
|
10982
|
+
static PriceFactorySizesSchema() {
|
|
10983
|
+
return Joi.object({
|
|
10984
|
+
price_factory_id: Joi.string().allow(""),
|
|
10985
|
+
seller_identifier: Joi.string().allow(""),
|
|
10986
|
+
size: Joi.string().allow(""),
|
|
10987
|
+
price_zone_id: Joi.string().allow(""),
|
|
10988
|
+
currency_prices: Joi.array().items(
|
|
10989
|
+
CatalogPlatformModel.PriceFactoryCurrencyPriceSchema()
|
|
10990
|
+
),
|
|
10991
|
+
});
|
|
10992
|
+
}
|
|
10993
|
+
|
|
10994
|
+
/** @returns {PriceFactoryProductResponseSchema} */
|
|
10995
|
+
static PriceFactoryProductResponseSchema() {
|
|
10996
|
+
return Joi.object({
|
|
10997
|
+
item_id: Joi.number(),
|
|
10998
|
+
item_code: Joi.string().allow(""),
|
|
10999
|
+
name: Joi.string().allow(""),
|
|
11000
|
+
active: Joi.boolean(),
|
|
11001
|
+
media: Joi.array().items(Joi.string().allow("")),
|
|
11002
|
+
sizes: Joi.array().items(CatalogPlatformModel.PriceFactorySizesSchema()),
|
|
11003
|
+
});
|
|
11004
|
+
}
|
|
11005
|
+
|
|
11006
|
+
/** @returns {PriceFactoryProductListResponseSchema} */
|
|
11007
|
+
static PriceFactoryProductListResponseSchema() {
|
|
11008
|
+
return Joi.object({
|
|
11009
|
+
items: Joi.array().items(
|
|
11010
|
+
CatalogPlatformModel.PriceFactoryProductResponseSchema()
|
|
11011
|
+
),
|
|
11012
|
+
page: CatalogPlatformModel.Page(),
|
|
11013
|
+
});
|
|
11014
|
+
}
|
|
11015
|
+
|
|
11016
|
+
/** @returns {PriceRange} */
|
|
11017
|
+
static PriceRange() {
|
|
11018
|
+
return Joi.object({
|
|
11019
|
+
min: Joi.number(),
|
|
11020
|
+
max: Joi.number(),
|
|
11021
|
+
});
|
|
11022
|
+
}
|
|
11023
|
+
|
|
11024
|
+
/** @returns {CurrencyPrice} */
|
|
11025
|
+
static CurrencyPrice() {
|
|
11026
|
+
return Joi.object({
|
|
11027
|
+
discount: Joi.number(),
|
|
11028
|
+
currency_code: Joi.string().allow(""),
|
|
11029
|
+
currency_symbol: Joi.string().allow(""),
|
|
11030
|
+
marked: CatalogPlatformModel.PriceRange(),
|
|
11031
|
+
effective: CatalogPlatformModel.PriceRange(),
|
|
11032
|
+
selling: CatalogPlatformModel.PriceRange(),
|
|
11033
|
+
});
|
|
11034
|
+
}
|
|
11035
|
+
|
|
11036
|
+
/** @returns {ProductPrice} */
|
|
11037
|
+
static ProductPrice() {
|
|
11038
|
+
return Joi.object({
|
|
11039
|
+
zone_type: Joi.string().allow(""),
|
|
11040
|
+
zone_identifier: Joi.string().allow(""),
|
|
11041
|
+
currency_prices: Joi.array().items(CatalogPlatformModel.CurrencyPrice()),
|
|
11042
|
+
});
|
|
11043
|
+
}
|
|
11044
|
+
|
|
11045
|
+
/** @returns {AppProductPricesSchema} */
|
|
11046
|
+
static AppProductPricesSchema() {
|
|
11047
|
+
return Joi.object({
|
|
11048
|
+
item_code: Joi.string().allow(""),
|
|
11049
|
+
brand_uid: Joi.number(),
|
|
11050
|
+
item_id: Joi.number(),
|
|
11051
|
+
discount_meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
11052
|
+
product_price: Joi.array().items(CatalogPlatformModel.ProductPrice()),
|
|
11053
|
+
});
|
|
11054
|
+
}
|
|
11055
|
+
|
|
10258
11056
|
/** @returns {ActionPage} */
|
|
10259
11057
|
static ActionPage() {
|
|
10260
11058
|
return Joi.object({
|
|
@@ -10331,6 +11129,21 @@ class CatalogPlatformModel {
|
|
|
10331
11129
|
);
|
|
10332
11130
|
}
|
|
10333
11131
|
|
|
11132
|
+
/**
|
|
11133
|
+
* Enum: TaxVersionScopeEnum Used By: Catalog
|
|
11134
|
+
*
|
|
11135
|
+
* @returns {TaxVersionScopeEnum}
|
|
11136
|
+
*/
|
|
11137
|
+
static TaxVersionScopeEnum() {
|
|
11138
|
+
return Joi.string().valid(
|
|
11139
|
+
"COUNTRY",
|
|
11140
|
+
|
|
11141
|
+
"REGION",
|
|
11142
|
+
|
|
11143
|
+
"STORE"
|
|
11144
|
+
);
|
|
11145
|
+
}
|
|
11146
|
+
|
|
10334
11147
|
/**
|
|
10335
11148
|
* Enum: HsTypeEnum Used By: Catalog
|
|
10336
11149
|
*
|
|
@@ -10449,7 +11262,9 @@ class CatalogPlatformModel {
|
|
|
10449
11262
|
|
|
10450
11263
|
"single-page-checkout",
|
|
10451
11264
|
|
|
10452
|
-
"request-reattempt"
|
|
11265
|
+
"request-reattempt",
|
|
11266
|
+
|
|
11267
|
+
"files"
|
|
10453
11268
|
);
|
|
10454
11269
|
}
|
|
10455
11270
|
}
|