@gofynd/fdk-client-javascript 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +0 -50
- package/sdk/application/Payment/PaymentApplicationClient.js +0 -210
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +4 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +2 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -125
- package/sdk/platform/Catalog/CatalogPlatformClient.js +131 -1111
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +228 -1009
- package/sdk/platform/Catalog/CatalogPlatformModel.js +102 -681
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +5 -200
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +4 -174
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +4 -9
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +4 -4
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8 -60
- package/sdk/platform/Order/OrderPlatformModel.js +3 -33
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +2 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +10 -6
- package/sdk/platform/Partner/PartnerPlatformModel.js +5 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -0
|
@@ -164,11 +164,90 @@ const Joi = require("joi");
|
|
|
164
164
|
* @property {number} [minimum] - The minimum quantity required for purchase.
|
|
165
165
|
*/
|
|
166
166
|
|
|
167
|
+
/**
|
|
168
|
+
* @typedef Scores
|
|
169
|
+
* @property {number} [popularity] - This score captures how trending and
|
|
170
|
+
* popular a product is for a specific sales channel. It evaluates recent
|
|
171
|
+
* customer interactions such as views, wishlist adds, add-to-carts, and
|
|
172
|
+
* orders, applying time-based decay so newer activity matters more. The
|
|
173
|
+
* blended score is ranked within the channel to reflect relative popularity.
|
|
174
|
+
* A higher score means the product is currently engaging more customers,
|
|
175
|
+
* while a lower score shows limited or declining interest.
|
|
176
|
+
* @property {number} [availability] - This score measures how reliably a
|
|
177
|
+
* product is stocked for a specific sales channel. It compares the product’s
|
|
178
|
+
* current inventory with its highest observed inventory level, adjusted for
|
|
179
|
+
* how inventory is distributed across locations. A higher score means the
|
|
180
|
+
* product is readily available, while a lower score indicates limited stock
|
|
181
|
+
* or frequent stockouts. Products with no meaningful inventory history
|
|
182
|
+
* receive a default low score for interpretation.
|
|
183
|
+
* @property {number} [conversion] - This score measures how effectively a
|
|
184
|
+
* product converts customer interest into actual orders for a specific sales
|
|
185
|
+
* channel. It considers product views, wishlist adds, add-to-carts, and
|
|
186
|
+
* completed orders to calculate a conversion rate. The rate is then ranked
|
|
187
|
+
* within the channel to give a normalized score. A higher score means the
|
|
188
|
+
* product turns interest into purchases more successfully, while a lower
|
|
189
|
+
* score indicates weaker conversion performance.
|
|
190
|
+
* @property {number} [sold_quantity] - This score evaluates how many units of a
|
|
191
|
+
* product have been sold for a specific sales channel, compared to other
|
|
192
|
+
* products in the same channel. It calculates total quantities sold and
|
|
193
|
+
* converts them into a percentile rank. A higher score means the product
|
|
194
|
+
* sells in large volumes, while a lower score signals fewer units sold.
|
|
195
|
+
* Products without transactions are assigned a default low score.
|
|
196
|
+
* @property {number} [depth] - This score evaluates how well a product covers
|
|
197
|
+
* different size options for a specific sales channel within its category,
|
|
198
|
+
* while also factoring in the inventory available for each size. It compares
|
|
199
|
+
* the product’s size variety and stock depth against the maximum observed
|
|
200
|
+
* within that category and channel. A higher score means the product offers a
|
|
201
|
+
* broader and better-stocked size range, while a lower score reflects fewer
|
|
202
|
+
* options or limited inventory depth.
|
|
203
|
+
* @property {number} [discount] - This score reflects the level of discount a
|
|
204
|
+
* product offers for a specific sales channel, relative to others in the
|
|
205
|
+
* channel. It compares the product’s listed price (MRP) to its effective
|
|
206
|
+
* selling price (ESP) and ranks products by discount percentage. It also
|
|
207
|
+
* takes into account Discount Rules. A higher score indicates steeper
|
|
208
|
+
* discounts, while a lower score shows smaller or no discounts. Products
|
|
209
|
+
* without valid price data receive a default low score.
|
|
210
|
+
* @property {number} [revenue] - This score measures how much revenue a product
|
|
211
|
+
* generates for a specific sales channel, relative to other products in that
|
|
212
|
+
* channel. It looks at the total value of items sold and assigns a percentile
|
|
213
|
+
* rank. A higher score indicates the product drives stronger sales revenue,
|
|
214
|
+
* while a lower score means it contributes less revenue compared to peers.
|
|
215
|
+
* Products with no sales activity receive a default low score.
|
|
216
|
+
* @property {number} [cancelled] - This score measures the proportion of orders
|
|
217
|
+
* cancelled by the platform for a specific sales channel. A higher score
|
|
218
|
+
* indicates fewer cancellations, suggesting smoother fulfilment and better
|
|
219
|
+
* operational consistency. A lower score highlights products more prone to
|
|
220
|
+
* cancellations, which may result from inventory mismatches, processing
|
|
221
|
+
* issues, or operational inefficiencies.
|
|
222
|
+
* @property {number} [returns] - This score measures the proportion of orders
|
|
223
|
+
* that were returned for a specific sales channel. It is designed so that a
|
|
224
|
+
* higher score indicates fewer returns relative to total orders, reflecting
|
|
225
|
+
* better product reliability and customer satisfaction. A lower score means
|
|
226
|
+
* the product experiences more returns, which could signal quality issues,
|
|
227
|
+
* mismatched expectations, or customer dissatisfaction.
|
|
228
|
+
* @property {number} [catalogue] - This score evaluates the quality and
|
|
229
|
+
* completeness of a product’s catalogue content for a specific sales channel.
|
|
230
|
+
* It considers the presence of images, videos, and 3D models, along with the
|
|
231
|
+
* length of product descriptions. Balanced image counts, supportive media,
|
|
232
|
+
* and detailed descriptions contribute to a higher score. A higher score
|
|
233
|
+
* means the product is well-presented and informative, while a lower score
|
|
234
|
+
* indicates missing media or insufficient descriptions that may reduce
|
|
235
|
+
* customer confidence.
|
|
236
|
+
* @property {number} [listing] - This score reflects how recently a product was
|
|
237
|
+
* listed for a specific sales channel. It uses the product’s listing date to
|
|
238
|
+
* calculate how many days have passed since it became available, then
|
|
239
|
+
* normalizes this against other products in the same channel. A higher score
|
|
240
|
+
* means the product is relatively new and fresh on the channel, while a lower
|
|
241
|
+
* score indicates it has been listed for a longer time or lacks valid listing
|
|
242
|
+
* information.
|
|
243
|
+
*/
|
|
244
|
+
|
|
167
245
|
/**
|
|
168
246
|
* @typedef ApplicationItemMeta
|
|
169
247
|
* @property {Object} [_custom_json] - Custom JSON data for the item
|
|
170
248
|
* @property {MetaFields[]} [_custom_meta] - Custom meta fields for the item
|
|
171
249
|
* @property {Object} [alt_text] - Alternative text for the item's images
|
|
250
|
+
* @property {Scores} [scores]
|
|
172
251
|
* @property {boolean} [is_cod] - Whether the item is available for Cash on
|
|
173
252
|
* Delivery (COD) or not
|
|
174
253
|
* @property {boolean} [is_gift] - Whether the item is a gift or not
|
|
@@ -1409,7 +1488,6 @@ const Joi = require("joi");
|
|
|
1409
1488
|
* the product.
|
|
1410
1489
|
* @property {string} [description] - Detailed description of the product.
|
|
1411
1490
|
* @property {string[]} [highlights] - List of highlights for the product.
|
|
1412
|
-
* @property {string} [hs_code] - HSN code associated with the product for tax purposes.
|
|
1413
1491
|
* @property {string} [hsn_code] - HSN code associated with the product for tax purposes.
|
|
1414
1492
|
* @property {string} [id] - Unique identifier of the product.
|
|
1415
1493
|
* @property {string} [image_nature] - Nature or type of product images.
|
|
@@ -2141,7 +2219,6 @@ const Joi = require("joi");
|
|
|
2141
2219
|
* @property {string} [created_on] - Date and time when the HSN data was created.
|
|
2142
2220
|
* @property {string} description - Description of the HSN data.
|
|
2143
2221
|
* @property {string} hsn_code
|
|
2144
|
-
* @property {string} [tax_rule_id] - Unique identifier of the tax rule.
|
|
2145
2222
|
* @property {string} [hsn_code_id] - Unique identifier of the HSN code.
|
|
2146
2223
|
* @property {string} [modified_on] - Date and time when the HSN data was last modified.
|
|
2147
2224
|
* @property {Object} reporting_hsn - HSN code.
|
|
@@ -3075,8 +3152,6 @@ const Joi = require("joi");
|
|
|
3075
3152
|
* @property {number[]} [departments] - List of department IDs related to the product.
|
|
3076
3153
|
* @property {string} [description] - Full description of the product.
|
|
3077
3154
|
* @property {string[]} [highlights] - List of key highlights of the product.
|
|
3078
|
-
* @property {string} [hs_code] - HSN (Harmonized System Nomenclature) code for
|
|
3079
|
-
* tax classification.
|
|
3080
3155
|
* @property {string} [hsn_code] - HSN (Harmonized System Nomenclature) code for
|
|
3081
3156
|
* tax classification.
|
|
3082
3157
|
* @property {string} [id] - Unique identifier for the product in the system.
|
|
@@ -3301,7 +3376,6 @@ const Joi = require("joi");
|
|
|
3301
3376
|
* @property {string} slug - URL-friendly identifier for the product.
|
|
3302
3377
|
* @property {string[]} [tags] - List of tags associated with the product.
|
|
3303
3378
|
* @property {TaxIdentifier} tax_identifier
|
|
3304
|
-
* @property {string} [hs_code] - HS Code for the product.
|
|
3305
3379
|
* @property {TeaserTag} [teaser_tag]
|
|
3306
3380
|
* @property {string} template_tag - Template tag for the product, used for
|
|
3307
3381
|
* classification.
|
|
@@ -3369,125 +3443,6 @@ const Joi = require("joi");
|
|
|
3369
3443
|
* @property {Object} [variants] - Variants information for the product.
|
|
3370
3444
|
*/
|
|
3371
3445
|
|
|
3372
|
-
/**
|
|
3373
|
-
* @typedef ProductCreateSchemaV3
|
|
3374
|
-
* @property {Object} [_custom_json] - Custom JSON data that can be used for
|
|
3375
|
-
* additional product properties.
|
|
3376
|
-
* @property {string} [action] - The action to perform wrt to the product (e.g.,
|
|
3377
|
-
* upsert, update, delete).
|
|
3378
|
-
* @property {Object} [attributes] - Additional attributes related to the product.
|
|
3379
|
-
* @property {number} brand_uid - Unique identifier for the product's brand.
|
|
3380
|
-
* @property {string} [bulk_job_id] - Job ID associated with bulk operations.
|
|
3381
|
-
* @property {string} category_slug - The category to which the product belongs.
|
|
3382
|
-
* @property {string} [change_request_id] - Change request identifier for product updates.
|
|
3383
|
-
* @property {number} company_id - Unique identifier for the company associated
|
|
3384
|
-
* with the product.
|
|
3385
|
-
* @property {string} country_of_origin - The country where the product was
|
|
3386
|
-
* manufactured or sourced.
|
|
3387
|
-
* @property {string} currency - The currency in which the product's price is listed.
|
|
3388
|
-
* @property {CustomOrder} [custom_order]
|
|
3389
|
-
* @property {number[]} departments - List of department IDs associated with the product.
|
|
3390
|
-
* @property {string} [description] - A detailed description of the product.
|
|
3391
|
-
* @property {string[]} [highlights] - Product highlights or key features.
|
|
3392
|
-
* @property {boolean} [is_active] - Flag to indicate if the product is active.
|
|
3393
|
-
* @property {boolean} [is_dependent] - Flag to indicate if the product is
|
|
3394
|
-
* dependent on other products.
|
|
3395
|
-
* @property {boolean} [is_image_less_product] - Flag to indicate if the product
|
|
3396
|
-
* does not have associated images.
|
|
3397
|
-
* @property {boolean} [is_set] - Flag to indicate if the product is part of a set.
|
|
3398
|
-
* @property {string} item_code - Unique item code or SKU of the product.
|
|
3399
|
-
* @property {string} item_type - Type of the product (e.g., standard, set,
|
|
3400
|
-
* composite, digital).
|
|
3401
|
-
* @property {Media[]} [media] - List of media URLs (images, videos) associated
|
|
3402
|
-
* with the product.
|
|
3403
|
-
* @property {boolean} [multi_size] - Indicates if the product supports multiple sizes.
|
|
3404
|
-
* @property {string} name - The name of the product.
|
|
3405
|
-
* @property {NetQuantity} [net_quantity]
|
|
3406
|
-
* @property {number} [no_of_boxes] - Number of boxes required to package the product.
|
|
3407
|
-
* @property {string[]} [product_group_tag] - Tags to group products together
|
|
3408
|
-
* for classification.
|
|
3409
|
-
* @property {ProductPublish} [product_publish]
|
|
3410
|
-
* @property {string} [requester] - The role requesting the product operation
|
|
3411
|
-
* (admin or user).
|
|
3412
|
-
* @property {ReturnConfig} return_config
|
|
3413
|
-
* @property {string} [short_description] - A short description of the product,
|
|
3414
|
-
* up to 50 characters.
|
|
3415
|
-
* @property {string} [size_guide] - Identifier for the product's size guide.
|
|
3416
|
-
* @property {Object[]} sizes - List of sizes available for the product.
|
|
3417
|
-
* @property {string} slug - URL-friendly identifier for the product.
|
|
3418
|
-
* @property {string[]} [tags] - List of tags associated with the product.
|
|
3419
|
-
* @property {TaxIdentifierV3} tax_identifier
|
|
3420
|
-
* @property {TeaserTag} [teaser_tag]
|
|
3421
|
-
* @property {string} template_tag - Template tag for the product, used for
|
|
3422
|
-
* classification.
|
|
3423
|
-
* @property {Trader[]} trader - List of traders associated with the product.
|
|
3424
|
-
* @property {Object} [variant_group] - Variant group information for the product.
|
|
3425
|
-
* @property {Object} [variant_media] - Media related to product variants.
|
|
3426
|
-
* @property {Object} [variants] - Variants information for the product.
|
|
3427
|
-
* @property {string} [hs_code] - HS Code for the product. This is required for
|
|
3428
|
-
* indian companies.
|
|
3429
|
-
*/
|
|
3430
|
-
|
|
3431
|
-
/**
|
|
3432
|
-
* @typedef ProductUpdateSchemaV3
|
|
3433
|
-
* @property {Object} [_custom_json] - Custom JSON data that can be used for
|
|
3434
|
-
* additional product properties.
|
|
3435
|
-
* @property {string} [action] - The action to perform wrt to the product (e.g.,
|
|
3436
|
-
* upsert, update, delete).
|
|
3437
|
-
* @property {Object} [attributes] - Additional attributes related to the product.
|
|
3438
|
-
* @property {number} brand_uid - Unique identifier for the product's brand.
|
|
3439
|
-
* @property {string} [bulk_job_id] - Job ID associated with bulk operations.
|
|
3440
|
-
* @property {string} category_slug - The category to which the product belongs.
|
|
3441
|
-
* @property {string} [change_request_id] - Change request identifier for product updates.
|
|
3442
|
-
* @property {number} company_id - Unique identifier for the company associated
|
|
3443
|
-
* with the product.
|
|
3444
|
-
* @property {string} country_of_origin - The country where the product was
|
|
3445
|
-
* manufactured or sourced.
|
|
3446
|
-
* @property {string} currency - The currency in which the product's price is listed.
|
|
3447
|
-
* @property {CustomOrder} [custom_order]
|
|
3448
|
-
* @property {number[]} departments - List of department IDs associated with the product.
|
|
3449
|
-
* @property {string} [description] - A detailed description of the product.
|
|
3450
|
-
* @property {string[]} [highlights] - Product highlights or key features.
|
|
3451
|
-
* @property {boolean} [is_active] - Flag to indicate if the product is active.
|
|
3452
|
-
* @property {boolean} [is_dependent] - Flag to indicate if the product is
|
|
3453
|
-
* dependent on other products.
|
|
3454
|
-
* @property {boolean} [is_image_less_product] - Flag to indicate if the product
|
|
3455
|
-
* does not have associated images.
|
|
3456
|
-
* @property {boolean} [is_set] - Flag to indicate if the product is part of a set.
|
|
3457
|
-
* @property {string} item_code - Unique item code or SKU of the product.
|
|
3458
|
-
* @property {string} item_type - Type of the product (e.g., standard, set,
|
|
3459
|
-
* composite, digital).
|
|
3460
|
-
* @property {Media[]} [media] - List of media URLs (images, videos) associated
|
|
3461
|
-
* with the product.
|
|
3462
|
-
* @property {boolean} [multi_size] - Indicates if the product supports multiple sizes.
|
|
3463
|
-
* @property {string} name - The name of the product.
|
|
3464
|
-
* @property {NetQuantity} [net_quantity]
|
|
3465
|
-
* @property {number} [no_of_boxes] - Number of boxes required to package the product.
|
|
3466
|
-
* @property {string[]} [product_group_tag] - Tags to group products together
|
|
3467
|
-
* for classification.
|
|
3468
|
-
* @property {ProductPublish} [product_publish]
|
|
3469
|
-
* @property {string} [requester] - The role requesting the product operation
|
|
3470
|
-
* (admin or user).
|
|
3471
|
-
* @property {ReturnConfig} return_config
|
|
3472
|
-
* @property {string} [short_description] - A short description of the product,
|
|
3473
|
-
* up to 50 characters.
|
|
3474
|
-
* @property {string} [size_guide] - Identifier for the product's size guide.
|
|
3475
|
-
* @property {Object[]} sizes - List of sizes available for the product.
|
|
3476
|
-
* @property {string} slug - URL-friendly identifier for the product.
|
|
3477
|
-
* @property {string[]} [tags] - List of tags associated with the product.
|
|
3478
|
-
* @property {TaxIdentifierV3} tax_identifier
|
|
3479
|
-
* @property {string} [hs_code] - HS Code for the product. This is required for
|
|
3480
|
-
* indian companies.
|
|
3481
|
-
* @property {TeaserTag} [teaser_tag]
|
|
3482
|
-
* @property {string} template_tag - Template tag for the product, used for
|
|
3483
|
-
* classification.
|
|
3484
|
-
* @property {Trader[]} trader - List of traders associated with the product.
|
|
3485
|
-
* @property {number} [uid] - Unique identifier for the product.
|
|
3486
|
-
* @property {Object} [variant_group] - Variant group information for the product.
|
|
3487
|
-
* @property {Object} [variant_media] - Media related to product variants.
|
|
3488
|
-
* @property {Object} [variants] - Variants information for the product.
|
|
3489
|
-
*/
|
|
3490
|
-
|
|
3491
3446
|
/**
|
|
3492
3447
|
* @typedef ProductDetail
|
|
3493
3448
|
* @property {Object} [attributes] - Key-value pairs representing various
|
|
@@ -3937,12 +3892,8 @@ const Joi = require("joi");
|
|
|
3937
3892
|
* the product.
|
|
3938
3893
|
* @property {string} [description] - Long description of the product.
|
|
3939
3894
|
* @property {string[]} [highlights] - Key features or highlights of the product.
|
|
3940
|
-
* @property {string} [
|
|
3941
|
-
* taxation purposes.
|
|
3942
|
-
* @property {string} [hsn_code] - **Deprecated**: Harmonized System
|
|
3943
|
-
* Nomenclature (HSN) code for taxation purposes. Please use the `hs_code`
|
|
3944
|
-
* field instead.\
|
|
3945
|
-
* _Deprecated_*
|
|
3895
|
+
* @property {string} [hsn_code] - Harmonized System Nomenclature (HSN) code for
|
|
3896
|
+
* taxation purposes.
|
|
3946
3897
|
* @property {string} [id] - Unique identifier of the product in the database.
|
|
3947
3898
|
* @property {string} [image_nature] - Describes the nature of the product
|
|
3948
3899
|
* images (e.g., "standard").
|
|
@@ -4099,8 +4050,6 @@ const Joi = require("joi");
|
|
|
4099
4050
|
/**
|
|
4100
4051
|
* @typedef ProductTemplateExportFilterRequestSchema
|
|
4101
4052
|
* @property {string[]} [brands] - The list of the brands that needs to be exported.
|
|
4102
|
-
* @property {string[]} [tax_rule_ids] - The list of the tax rule ids that needs
|
|
4103
|
-
* to be exported.
|
|
4104
4053
|
* @property {string[]} catalogue_types - The list of the type of the catalog
|
|
4105
4054
|
* such as set, standard and composite.
|
|
4106
4055
|
* @property {string} [from_date] - The modified on date from which the data
|
|
@@ -4155,7 +4104,6 @@ const Joi = require("joi");
|
|
|
4155
4104
|
* @property {Object} [custom_order]
|
|
4156
4105
|
* @property {Object} [description]
|
|
4157
4106
|
* @property {Object} [highlights]
|
|
4158
|
-
* @property {Object} [hs_code]
|
|
4159
4107
|
* @property {Object} [hsn_code]
|
|
4160
4108
|
* @property {Object} [is_active]
|
|
4161
4109
|
* @property {Object} [is_dependent]
|
|
@@ -4507,15 +4455,9 @@ const Joi = require("joi");
|
|
|
4507
4455
|
|
|
4508
4456
|
/**
|
|
4509
4457
|
* @typedef TaxIdentifier
|
|
4510
|
-
* @property {string} [
|
|
4511
|
-
* @property {string} [
|
|
4512
|
-
* @property {string} [
|
|
4513
|
-
* @property {string} [reporting_hsn] _Deprecated_*
|
|
4514
|
-
*/
|
|
4515
|
-
|
|
4516
|
-
/**
|
|
4517
|
-
* @typedef TaxIdentifierV3
|
|
4518
|
-
* @property {string} tax_rule_id - The unique identifier of the tax rule.
|
|
4458
|
+
* @property {string} [hsn_code]
|
|
4459
|
+
* @property {string} [hsn_code_id]
|
|
4460
|
+
* @property {string} [reporting_hsn]
|
|
4519
4461
|
*/
|
|
4520
4462
|
|
|
4521
4463
|
/**
|
|
@@ -4875,176 +4817,6 @@ const Joi = require("joi");
|
|
|
4875
4817
|
* or unfollow operation.
|
|
4876
4818
|
*/
|
|
4877
4819
|
|
|
4878
|
-
/**
|
|
4879
|
-
* @typedef TaxReqBodyRule
|
|
4880
|
-
* @property {string} name - Tax rule name
|
|
4881
|
-
* @property {string} [description] - Tax rule description
|
|
4882
|
-
*/
|
|
4883
|
-
|
|
4884
|
-
/**
|
|
4885
|
-
* @typedef TaxThreshold
|
|
4886
|
-
* @property {number} value - Tax rate is applied to products above or equal to
|
|
4887
|
-
* this price.
|
|
4888
|
-
* @property {number} rate - Tax rate ranging from 0 to 1.
|
|
4889
|
-
*/
|
|
4890
|
-
|
|
4891
|
-
/**
|
|
4892
|
-
* @typedef TaxComponent
|
|
4893
|
-
* @property {string} name - Name of the component.
|
|
4894
|
-
* @property {TaxThreshold[]} slabs - List of thresholds.
|
|
4895
|
-
*/
|
|
4896
|
-
|
|
4897
|
-
/**
|
|
4898
|
-
* @typedef TaxComponentRes
|
|
4899
|
-
* @property {string} name - Name of the component.
|
|
4900
|
-
* @property {string} [description] - Description of the tax component.
|
|
4901
|
-
* @property {TaxThreshold[]} slabs - List of thresholds.
|
|
4902
|
-
* @property {string} _id - Unique identifier of the tax component. This _id is
|
|
4903
|
-
* required for updating any tax component; If _id field is not in "update tax
|
|
4904
|
-
* version" request then that component will be created.
|
|
4905
|
-
*/
|
|
4906
|
-
|
|
4907
|
-
/**
|
|
4908
|
-
* @typedef TaxReqBodyVersion
|
|
4909
|
-
* @property {TaxComponent[]} components - List of tax components with their
|
|
4910
|
-
* respective slabs and rates.
|
|
4911
|
-
*/
|
|
4912
|
-
|
|
4913
|
-
/**
|
|
4914
|
-
* @typedef CreateTaxRequestBody
|
|
4915
|
-
* @property {TaxReqBodyRule} rule
|
|
4916
|
-
* @property {TaxReqBodyVersion[]} versions - List of tax versions for the tax rule.
|
|
4917
|
-
*/
|
|
4918
|
-
|
|
4919
|
-
/**
|
|
4920
|
-
* @typedef TaxVersion
|
|
4921
|
-
* @property {string} [_id]
|
|
4922
|
-
* @property {string} [rule_id] - Tax Rule ID.
|
|
4923
|
-
* @property {string} [applicable_date] - It is the date from when this rule
|
|
4924
|
-
* will come in effect.
|
|
4925
|
-
* @property {string} [created_on]
|
|
4926
|
-
* @property {string} [modified_on]
|
|
4927
|
-
* @property {number} [company_id] - Company ID.
|
|
4928
|
-
* @property {TaxStatusEnum} [status]
|
|
4929
|
-
* @property {TaxComponentRes[]} [components] - List of tax components.
|
|
4930
|
-
*/
|
|
4931
|
-
|
|
4932
|
-
/**
|
|
4933
|
-
* @typedef UpdateTaxVersionRequestBody
|
|
4934
|
-
* @property {TaxComponentRes[]} components - List of tax components.
|
|
4935
|
-
* @property {string} applicable_date - It is the date from when this rule will
|
|
4936
|
-
* come in effect. It should be atleast one minute in the future from the current time.
|
|
4937
|
-
*/
|
|
4938
|
-
|
|
4939
|
-
/**
|
|
4940
|
-
* @typedef CreateTaxVersionRequestBody
|
|
4941
|
-
* @property {TaxComponent[]} components - List of tax components.
|
|
4942
|
-
* @property {string} applicable_date - It is the date from when this rule will
|
|
4943
|
-
* come in effect. It should be atleast one minute in the future from the current time.
|
|
4944
|
-
*/
|
|
4945
|
-
|
|
4946
|
-
/**
|
|
4947
|
-
* @typedef TaxRule
|
|
4948
|
-
* @property {string} [_id]
|
|
4949
|
-
* @property {string} [name]
|
|
4950
|
-
* @property {string} [description] - Description of the tax rule.
|
|
4951
|
-
* @property {boolean} [is_default] - Flag to set any tax rule as default, in
|
|
4952
|
-
* case any tax rule is inactive on a product then default tax rule gets applied
|
|
4953
|
-
* @property {number} [company_id]
|
|
4954
|
-
* @property {TaxStatusEnum} [status]
|
|
4955
|
-
* @property {string} [created_on]
|
|
4956
|
-
* @property {string} [modified_on]
|
|
4957
|
-
*/
|
|
4958
|
-
|
|
4959
|
-
/**
|
|
4960
|
-
* @typedef TaxVersionDetail
|
|
4961
|
-
* @property {string} _id
|
|
4962
|
-
* @property {string} rule_id
|
|
4963
|
-
* @property {string} applicable_date
|
|
4964
|
-
* @property {string} created_on
|
|
4965
|
-
* @property {string} modified_on
|
|
4966
|
-
* @property {number} company_id
|
|
4967
|
-
* @property {TaxStatusEnum} [status]
|
|
4968
|
-
* @property {TaxComponent[]} components - List of components.
|
|
4969
|
-
* @property {string} version_status - Specifies the type of tax version.
|
|
4970
|
-
*/
|
|
4971
|
-
|
|
4972
|
-
/**
|
|
4973
|
-
* @typedef CreateTax
|
|
4974
|
-
* @property {TaxRule} [rule]
|
|
4975
|
-
* @property {TaxVersion} [versions]
|
|
4976
|
-
*/
|
|
4977
|
-
|
|
4978
|
-
/**
|
|
4979
|
-
* @typedef UpdateTaxVersion
|
|
4980
|
-
* @property {TaxComponent[]} components - List of components.
|
|
4981
|
-
* @property {string} applicable_date
|
|
4982
|
-
*/
|
|
4983
|
-
|
|
4984
|
-
/**
|
|
4985
|
-
* @typedef UpdateTaxRequestBody
|
|
4986
|
-
* @property {TaxStatusEnum} status
|
|
4987
|
-
* @property {boolean} is_default - Flag to set any tax rule as default, in case
|
|
4988
|
-
* any tax rule is inactive or not available on a product then default tax
|
|
4989
|
-
* rule gets applied.
|
|
4990
|
-
* @property {string} name - New name of the tax rule.
|
|
4991
|
-
*/
|
|
4992
|
-
|
|
4993
|
-
/**
|
|
4994
|
-
* @typedef TaxRuleItem
|
|
4995
|
-
* @property {TaxVersionDetail[]} versions
|
|
4996
|
-
* @property {TaxRule} rule
|
|
4997
|
-
*/
|
|
4998
|
-
|
|
4999
|
-
/**
|
|
5000
|
-
* @typedef TaxRules
|
|
5001
|
-
* @property {TaxRuleItem[]} items - List of tax rules with their versions.
|
|
5002
|
-
* @property {Page} page
|
|
5003
|
-
*/
|
|
5004
|
-
|
|
5005
|
-
/**
|
|
5006
|
-
* @typedef TaxVersionPastData
|
|
5007
|
-
* @property {TaxVersion[]} [data]
|
|
5008
|
-
* @property {Page} [pagination]
|
|
5009
|
-
*/
|
|
5010
|
-
|
|
5011
|
-
/**
|
|
5012
|
-
* @typedef TaxRuleVersion
|
|
5013
|
-
* @property {TaxVersionDetail[]} items - List of tax versions.
|
|
5014
|
-
* @property {TaxRule} rule
|
|
5015
|
-
* @property {Page} page
|
|
5016
|
-
*/
|
|
5017
|
-
|
|
5018
|
-
/**
|
|
5019
|
-
* @typedef HSCodeItem
|
|
5020
|
-
* @property {string} [created_on] - Timestamp of when the HS code was created.
|
|
5021
|
-
* @property {string} [modified_on] - Timestamp of when the HS code was last modified.
|
|
5022
|
-
* @property {HsTypeEnum} type
|
|
5023
|
-
* @property {number} [company_id] - Company ID associated with this HS code.
|
|
5024
|
-
* @property {string} [description] - Description of the HS code.
|
|
5025
|
-
* @property {string} hs_code - The HS code of the product.
|
|
5026
|
-
* @property {string} [_id] - Unique identifier for the HS code entry.
|
|
5027
|
-
* @property {string} [country_iso] - ISO 2-digit country code. Will be set by
|
|
5028
|
-
* default according to company's country.
|
|
5029
|
-
*/
|
|
5030
|
-
|
|
5031
|
-
/**
|
|
5032
|
-
* @typedef HSCodes
|
|
5033
|
-
* @property {HSCodeItem[]} items - Array of HS code responses.
|
|
5034
|
-
* @property {Page} page
|
|
5035
|
-
*/
|
|
5036
|
-
|
|
5037
|
-
/**
|
|
5038
|
-
* @typedef CreateTaxComponentName
|
|
5039
|
-
* @property {string} name - Name of a tax component
|
|
5040
|
-
*/
|
|
5041
|
-
|
|
5042
|
-
/**
|
|
5043
|
-
* @typedef GetTaxComponents
|
|
5044
|
-
* @property {TaxComponentRes[]} items
|
|
5045
|
-
* @property {Page} page
|
|
5046
|
-
*/
|
|
5047
|
-
|
|
5048
4820
|
/**
|
|
5049
4821
|
* @typedef ActionPage
|
|
5050
4822
|
* @property {Object} [params] - Parameters that should be considered in path.
|
|
@@ -5093,10 +4865,6 @@ const Joi = require("joi");
|
|
|
5093
4865
|
* string and length should not exceed 100 characters.
|
|
5094
4866
|
*/
|
|
5095
4867
|
|
|
5096
|
-
/** @typedef {"ACTIVE" | "INACTIVE" | "DELETED"} TaxStatusEnum */
|
|
5097
|
-
|
|
5098
|
-
/** @typedef {"HS" | "SAC"} HsTypeEnum */
|
|
5099
|
-
|
|
5100
4868
|
/**
|
|
5101
4869
|
* @typedef {| "about-us"
|
|
5102
4870
|
* | "addresses"
|
|
@@ -5321,12 +5089,30 @@ class CatalogPlatformModel {
|
|
|
5321
5089
|
});
|
|
5322
5090
|
}
|
|
5323
5091
|
|
|
5092
|
+
/** @returns {Scores} */
|
|
5093
|
+
static Scores() {
|
|
5094
|
+
return Joi.object({
|
|
5095
|
+
popularity: Joi.number().allow(null),
|
|
5096
|
+
availability: Joi.number().allow(null),
|
|
5097
|
+
conversion: Joi.number().allow(null),
|
|
5098
|
+
sold_quantity: Joi.number().allow(null),
|
|
5099
|
+
depth: Joi.number().allow(null),
|
|
5100
|
+
discount: Joi.number().allow(null),
|
|
5101
|
+
revenue: Joi.number().allow(null),
|
|
5102
|
+
cancelled: Joi.number().allow(null),
|
|
5103
|
+
returns: Joi.number().allow(null),
|
|
5104
|
+
catalogue: Joi.number().allow(null),
|
|
5105
|
+
listing: Joi.number().allow(null),
|
|
5106
|
+
});
|
|
5107
|
+
}
|
|
5108
|
+
|
|
5324
5109
|
/** @returns {ApplicationItemMeta} */
|
|
5325
5110
|
static ApplicationItemMeta() {
|
|
5326
5111
|
return Joi.object({
|
|
5327
5112
|
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
5328
5113
|
_custom_meta: Joi.array().items(CatalogPlatformModel.MetaFields()),
|
|
5329
5114
|
alt_text: Joi.object().pattern(/\S/, Joi.any()),
|
|
5115
|
+
scores: CatalogPlatformModel.Scores(),
|
|
5330
5116
|
is_cod: Joi.boolean(),
|
|
5331
5117
|
is_gift: Joi.boolean(),
|
|
5332
5118
|
moq: CatalogPlatformModel.ApplicationItemMOQ(),
|
|
@@ -6674,7 +6460,6 @@ class CatalogPlatformModel {
|
|
|
6674
6460
|
departments: Joi.array().items(Joi.number()),
|
|
6675
6461
|
description: Joi.string().allow(""),
|
|
6676
6462
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
6677
|
-
hs_code: Joi.string().allow(""),
|
|
6678
6463
|
hsn_code: Joi.string().allow(""),
|
|
6679
6464
|
id: Joi.string().allow(""),
|
|
6680
6465
|
image_nature: Joi.string().allow(""),
|
|
@@ -7453,7 +7238,6 @@ class CatalogPlatformModel {
|
|
|
7453
7238
|
created_on: Joi.string().allow(""),
|
|
7454
7239
|
description: Joi.string().allow("").required(),
|
|
7455
7240
|
hsn_code: Joi.string().allow("").required(),
|
|
7456
|
-
tax_rule_id: Joi.string().allow(""),
|
|
7457
7241
|
hsn_code_id: Joi.string().allow(""),
|
|
7458
7242
|
modified_on: Joi.string().allow(""),
|
|
7459
7243
|
reporting_hsn: Joi.any().required(),
|
|
@@ -8473,7 +8257,6 @@ class CatalogPlatformModel {
|
|
|
8473
8257
|
departments: Joi.array().items(Joi.number()),
|
|
8474
8258
|
description: Joi.string().allow(""),
|
|
8475
8259
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
8476
|
-
hs_code: Joi.string().allow(""),
|
|
8477
8260
|
hsn_code: Joi.string().allow(""),
|
|
8478
8261
|
id: Joi.string().allow(""),
|
|
8479
8262
|
image_nature: Joi.string().allow(""),
|
|
@@ -8679,7 +8462,6 @@ class CatalogPlatformModel {
|
|
|
8679
8462
|
slug: Joi.string().allow("").required(),
|
|
8680
8463
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
8681
8464
|
tax_identifier: CatalogPlatformModel.TaxIdentifier().required(),
|
|
8682
|
-
hs_code: Joi.string().allow(""),
|
|
8683
8465
|
teaser_tag: CatalogPlatformModel.TeaserTag(),
|
|
8684
8466
|
template_tag: Joi.string().allow("").required(),
|
|
8685
8467
|
trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
|
|
@@ -8739,107 +8521,6 @@ class CatalogPlatformModel {
|
|
|
8739
8521
|
});
|
|
8740
8522
|
}
|
|
8741
8523
|
|
|
8742
|
-
/** @returns {ProductCreateSchemaV3} */
|
|
8743
|
-
static ProductCreateSchemaV3() {
|
|
8744
|
-
return Joi.object({
|
|
8745
|
-
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
8746
|
-
action: Joi.string().allow(""),
|
|
8747
|
-
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
8748
|
-
brand_uid: Joi.number().required(),
|
|
8749
|
-
bulk_job_id: Joi.string().allow(""),
|
|
8750
|
-
category_slug: Joi.string().allow("").required(),
|
|
8751
|
-
change_request_id: Joi.string().allow("").allow(null),
|
|
8752
|
-
company_id: Joi.number().required(),
|
|
8753
|
-
country_of_origin: Joi.string().allow("").required(),
|
|
8754
|
-
currency: Joi.string().allow("").required(),
|
|
8755
|
-
custom_order: CatalogPlatformModel.CustomOrder(),
|
|
8756
|
-
departments: Joi.array().items(Joi.number()).required(),
|
|
8757
|
-
description: Joi.string().allow(""),
|
|
8758
|
-
highlights: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
8759
|
-
is_active: Joi.boolean(),
|
|
8760
|
-
is_dependent: Joi.boolean(),
|
|
8761
|
-
is_image_less_product: Joi.boolean(),
|
|
8762
|
-
is_set: Joi.boolean(),
|
|
8763
|
-
item_code: Joi.string().allow("").required(),
|
|
8764
|
-
item_type: Joi.string().allow("").required(),
|
|
8765
|
-
media: Joi.array().items(CatalogPlatformModel.Media()).allow(null, ""),
|
|
8766
|
-
multi_size: Joi.boolean(),
|
|
8767
|
-
name: Joi.string().allow("").required(),
|
|
8768
|
-
net_quantity: CatalogPlatformModel.NetQuantity(),
|
|
8769
|
-
no_of_boxes: Joi.number(),
|
|
8770
|
-
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
8771
|
-
product_publish: CatalogPlatformModel.ProductPublish(),
|
|
8772
|
-
requester: Joi.string().allow(""),
|
|
8773
|
-
return_config: CatalogPlatformModel.ReturnConfig().required(),
|
|
8774
|
-
short_description: Joi.string().allow(""),
|
|
8775
|
-
size_guide: Joi.string().allow(""),
|
|
8776
|
-
sizes: Joi.array()
|
|
8777
|
-
.items(Joi.object().pattern(/\S/, Joi.any()))
|
|
8778
|
-
.required(),
|
|
8779
|
-
slug: Joi.string().allow("").required(),
|
|
8780
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
8781
|
-
tax_identifier: CatalogPlatformModel.TaxIdentifierV3().required(),
|
|
8782
|
-
teaser_tag: CatalogPlatformModel.TeaserTag(),
|
|
8783
|
-
template_tag: Joi.string().allow("").required(),
|
|
8784
|
-
trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
|
|
8785
|
-
variant_group: Joi.object().pattern(/\S/, Joi.any()),
|
|
8786
|
-
variant_media: Joi.object().pattern(/\S/, Joi.any()),
|
|
8787
|
-
variants: Joi.object().pattern(/\S/, Joi.any()),
|
|
8788
|
-
hs_code: Joi.string().allow(""),
|
|
8789
|
-
});
|
|
8790
|
-
}
|
|
8791
|
-
|
|
8792
|
-
/** @returns {ProductUpdateSchemaV3} */
|
|
8793
|
-
static ProductUpdateSchemaV3() {
|
|
8794
|
-
return Joi.object({
|
|
8795
|
-
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
8796
|
-
action: Joi.string().allow(""),
|
|
8797
|
-
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
8798
|
-
brand_uid: Joi.number().required(),
|
|
8799
|
-
bulk_job_id: Joi.string().allow(""),
|
|
8800
|
-
category_slug: Joi.string().allow("").required(),
|
|
8801
|
-
change_request_id: Joi.string().allow("").allow(null),
|
|
8802
|
-
company_id: Joi.number().required(),
|
|
8803
|
-
country_of_origin: Joi.string().allow("").required(),
|
|
8804
|
-
currency: Joi.string().allow("").required(),
|
|
8805
|
-
custom_order: CatalogPlatformModel.CustomOrder(),
|
|
8806
|
-
departments: Joi.array().items(Joi.number()).required(),
|
|
8807
|
-
description: Joi.string().allow(""),
|
|
8808
|
-
highlights: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
8809
|
-
is_active: Joi.boolean(),
|
|
8810
|
-
is_dependent: Joi.boolean(),
|
|
8811
|
-
is_image_less_product: Joi.boolean(),
|
|
8812
|
-
is_set: Joi.boolean(),
|
|
8813
|
-
item_code: Joi.string().allow("").required(),
|
|
8814
|
-
item_type: Joi.string().allow("").required(),
|
|
8815
|
-
media: Joi.array().items(CatalogPlatformModel.Media()).allow(null, ""),
|
|
8816
|
-
multi_size: Joi.boolean(),
|
|
8817
|
-
name: Joi.string().allow("").required(),
|
|
8818
|
-
net_quantity: CatalogPlatformModel.NetQuantity(),
|
|
8819
|
-
no_of_boxes: Joi.number(),
|
|
8820
|
-
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
8821
|
-
product_publish: CatalogPlatformModel.ProductPublish(),
|
|
8822
|
-
requester: Joi.string().allow(""),
|
|
8823
|
-
return_config: CatalogPlatformModel.ReturnConfig().required(),
|
|
8824
|
-
short_description: Joi.string().allow(""),
|
|
8825
|
-
size_guide: Joi.string().allow(""),
|
|
8826
|
-
sizes: Joi.array()
|
|
8827
|
-
.items(Joi.object().pattern(/\S/, Joi.any()))
|
|
8828
|
-
.required(),
|
|
8829
|
-
slug: Joi.string().allow("").required(),
|
|
8830
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
8831
|
-
tax_identifier: CatalogPlatformModel.TaxIdentifierV3().required(),
|
|
8832
|
-
hs_code: Joi.string().allow(""),
|
|
8833
|
-
teaser_tag: CatalogPlatformModel.TeaserTag(),
|
|
8834
|
-
template_tag: Joi.string().allow("").required(),
|
|
8835
|
-
trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
|
|
8836
|
-
uid: Joi.number().allow(null),
|
|
8837
|
-
variant_group: Joi.object().pattern(/\S/, Joi.any()),
|
|
8838
|
-
variant_media: Joi.object().pattern(/\S/, Joi.any()),
|
|
8839
|
-
variants: Joi.object().pattern(/\S/, Joi.any()),
|
|
8840
|
-
});
|
|
8841
|
-
}
|
|
8842
|
-
|
|
8843
8524
|
/** @returns {ProductDetail} */
|
|
8844
8525
|
static ProductDetail() {
|
|
8845
8526
|
return Joi.object({
|
|
@@ -9309,7 +8990,6 @@ class CatalogPlatformModel {
|
|
|
9309
8990
|
departments: Joi.array().items(Joi.number()),
|
|
9310
8991
|
description: Joi.string().allow(""),
|
|
9311
8992
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
9312
|
-
hs_code: Joi.string().allow(""),
|
|
9313
8993
|
hsn_code: Joi.string().allow(""),
|
|
9314
8994
|
id: Joi.string().allow(""),
|
|
9315
8995
|
image_nature: Joi.string().allow(""),
|
|
@@ -9457,7 +9137,6 @@ class CatalogPlatformModel {
|
|
|
9457
9137
|
static ProductTemplateExportFilterRequestSchema() {
|
|
9458
9138
|
return Joi.object({
|
|
9459
9139
|
brands: Joi.array().items(Joi.string().allow("")),
|
|
9460
|
-
tax_rule_ids: Joi.array().items(Joi.string().allow("")),
|
|
9461
9140
|
catalogue_types: Joi.array().items(Joi.string().allow("")).required(),
|
|
9462
9141
|
from_date: Joi.string().allow(""),
|
|
9463
9142
|
templates: Joi.array().items(Joi.string().allow("")).required(),
|
|
@@ -9512,7 +9191,6 @@ class CatalogPlatformModel {
|
|
|
9512
9191
|
custom_order: Joi.object().pattern(/\S/, Joi.any()),
|
|
9513
9192
|
description: Joi.object().pattern(/\S/, Joi.any()),
|
|
9514
9193
|
highlights: Joi.object().pattern(/\S/, Joi.any()),
|
|
9515
|
-
hs_code: Joi.object().pattern(/\S/, Joi.any()),
|
|
9516
9194
|
hsn_code: Joi.object().pattern(/\S/, Joi.any()),
|
|
9517
9195
|
is_active: Joi.object().pattern(/\S/, Joi.any()),
|
|
9518
9196
|
is_dependent: Joi.object().pattern(/\S/, Joi.any()),
|
|
@@ -9912,20 +9590,12 @@ class CatalogPlatformModel {
|
|
|
9912
9590
|
/** @returns {TaxIdentifier} */
|
|
9913
9591
|
static TaxIdentifier() {
|
|
9914
9592
|
return Joi.object({
|
|
9915
|
-
tax_rule_id: Joi.string().allow(""),
|
|
9916
9593
|
hsn_code: Joi.string().allow(""),
|
|
9917
9594
|
hsn_code_id: Joi.string().allow(""),
|
|
9918
9595
|
reporting_hsn: Joi.string().allow(""),
|
|
9919
9596
|
});
|
|
9920
9597
|
}
|
|
9921
9598
|
|
|
9922
|
-
/** @returns {TaxIdentifierV3} */
|
|
9923
|
-
static TaxIdentifierV3() {
|
|
9924
|
-
return Joi.object({
|
|
9925
|
-
tax_rule_id: Joi.string().allow("").required(),
|
|
9926
|
-
});
|
|
9927
|
-
}
|
|
9928
|
-
|
|
9929
9599
|
/** @returns {TaxSlab} */
|
|
9930
9600
|
static TaxSlab() {
|
|
9931
9601
|
return Joi.object({
|
|
@@ -10319,227 +9989,6 @@ class CatalogPlatformModel {
|
|
|
10319
9989
|
});
|
|
10320
9990
|
}
|
|
10321
9991
|
|
|
10322
|
-
/** @returns {TaxReqBodyRule} */
|
|
10323
|
-
static TaxReqBodyRule() {
|
|
10324
|
-
return Joi.object({
|
|
10325
|
-
name: Joi.string().allow("").required(),
|
|
10326
|
-
description: Joi.string().allow(""),
|
|
10327
|
-
});
|
|
10328
|
-
}
|
|
10329
|
-
|
|
10330
|
-
/** @returns {TaxThreshold} */
|
|
10331
|
-
static TaxThreshold() {
|
|
10332
|
-
return Joi.object({
|
|
10333
|
-
value: Joi.number().required(),
|
|
10334
|
-
rate: Joi.number().required(),
|
|
10335
|
-
});
|
|
10336
|
-
}
|
|
10337
|
-
|
|
10338
|
-
/** @returns {TaxComponent} */
|
|
10339
|
-
static TaxComponent() {
|
|
10340
|
-
return Joi.object({
|
|
10341
|
-
name: Joi.string().allow("").required(),
|
|
10342
|
-
slabs: Joi.array().items(CatalogPlatformModel.TaxThreshold()).required(),
|
|
10343
|
-
});
|
|
10344
|
-
}
|
|
10345
|
-
|
|
10346
|
-
/** @returns {TaxComponentRes} */
|
|
10347
|
-
static TaxComponentRes() {
|
|
10348
|
-
return Joi.object({
|
|
10349
|
-
name: Joi.string().allow("").required(),
|
|
10350
|
-
description: Joi.string().allow(""),
|
|
10351
|
-
slabs: Joi.array().items(CatalogPlatformModel.TaxThreshold()).required(),
|
|
10352
|
-
_id: Joi.string().allow("").required(),
|
|
10353
|
-
});
|
|
10354
|
-
}
|
|
10355
|
-
|
|
10356
|
-
/** @returns {TaxReqBodyVersion} */
|
|
10357
|
-
static TaxReqBodyVersion() {
|
|
10358
|
-
return Joi.object({
|
|
10359
|
-
components: Joi.array()
|
|
10360
|
-
.items(CatalogPlatformModel.TaxComponent())
|
|
10361
|
-
.required(),
|
|
10362
|
-
});
|
|
10363
|
-
}
|
|
10364
|
-
|
|
10365
|
-
/** @returns {CreateTaxRequestBody} */
|
|
10366
|
-
static CreateTaxRequestBody() {
|
|
10367
|
-
return Joi.object({
|
|
10368
|
-
rule: CatalogPlatformModel.TaxReqBodyRule().required(),
|
|
10369
|
-
versions: Joi.array()
|
|
10370
|
-
.items(CatalogPlatformModel.TaxReqBodyVersion())
|
|
10371
|
-
.required(),
|
|
10372
|
-
});
|
|
10373
|
-
}
|
|
10374
|
-
|
|
10375
|
-
/** @returns {TaxVersion} */
|
|
10376
|
-
static TaxVersion() {
|
|
10377
|
-
return Joi.object({
|
|
10378
|
-
_id: Joi.string().allow(""),
|
|
10379
|
-
rule_id: Joi.string().allow(""),
|
|
10380
|
-
applicable_date: Joi.string().allow(""),
|
|
10381
|
-
created_on: Joi.string().allow(""),
|
|
10382
|
-
modified_on: Joi.string().allow(""),
|
|
10383
|
-
company_id: Joi.number(),
|
|
10384
|
-
status: CatalogPlatformModel.TaxStatusEnum(),
|
|
10385
|
-
components: Joi.array().items(CatalogPlatformModel.TaxComponentRes()),
|
|
10386
|
-
});
|
|
10387
|
-
}
|
|
10388
|
-
|
|
10389
|
-
/** @returns {UpdateTaxVersionRequestBody} */
|
|
10390
|
-
static UpdateTaxVersionRequestBody() {
|
|
10391
|
-
return Joi.object({
|
|
10392
|
-
components: Joi.array()
|
|
10393
|
-
.items(CatalogPlatformModel.TaxComponentRes())
|
|
10394
|
-
.required(),
|
|
10395
|
-
applicable_date: Joi.string().allow("").required(),
|
|
10396
|
-
});
|
|
10397
|
-
}
|
|
10398
|
-
|
|
10399
|
-
/** @returns {CreateTaxVersionRequestBody} */
|
|
10400
|
-
static CreateTaxVersionRequestBody() {
|
|
10401
|
-
return Joi.object({
|
|
10402
|
-
components: Joi.array()
|
|
10403
|
-
.items(CatalogPlatformModel.TaxComponent())
|
|
10404
|
-
.required(),
|
|
10405
|
-
applicable_date: Joi.string().allow("").required(),
|
|
10406
|
-
});
|
|
10407
|
-
}
|
|
10408
|
-
|
|
10409
|
-
/** @returns {TaxRule} */
|
|
10410
|
-
static TaxRule() {
|
|
10411
|
-
return Joi.object({
|
|
10412
|
-
_id: Joi.string().allow(""),
|
|
10413
|
-
name: Joi.string().allow(""),
|
|
10414
|
-
description: Joi.string().allow(""),
|
|
10415
|
-
is_default: Joi.boolean(),
|
|
10416
|
-
company_id: Joi.number(),
|
|
10417
|
-
status: CatalogPlatformModel.TaxStatusEnum(),
|
|
10418
|
-
created_on: Joi.string().allow(""),
|
|
10419
|
-
modified_on: Joi.string().allow(""),
|
|
10420
|
-
});
|
|
10421
|
-
}
|
|
10422
|
-
|
|
10423
|
-
/** @returns {TaxVersionDetail} */
|
|
10424
|
-
static TaxVersionDetail() {
|
|
10425
|
-
return Joi.object({
|
|
10426
|
-
_id: Joi.string().allow("").required(),
|
|
10427
|
-
rule_id: Joi.string().allow("").required(),
|
|
10428
|
-
applicable_date: Joi.string().allow("").required(),
|
|
10429
|
-
created_on: Joi.string().allow("").required(),
|
|
10430
|
-
modified_on: Joi.string().allow("").required(),
|
|
10431
|
-
company_id: Joi.number().required(),
|
|
10432
|
-
status: CatalogPlatformModel.TaxStatusEnum(),
|
|
10433
|
-
components: Joi.array()
|
|
10434
|
-
.items(CatalogPlatformModel.TaxComponent())
|
|
10435
|
-
.required(),
|
|
10436
|
-
version_status: Joi.string().allow("").required(),
|
|
10437
|
-
});
|
|
10438
|
-
}
|
|
10439
|
-
|
|
10440
|
-
/** @returns {CreateTax} */
|
|
10441
|
-
static CreateTax() {
|
|
10442
|
-
return Joi.object({
|
|
10443
|
-
rule: CatalogPlatformModel.TaxRule(),
|
|
10444
|
-
versions: CatalogPlatformModel.TaxVersion(),
|
|
10445
|
-
});
|
|
10446
|
-
}
|
|
10447
|
-
|
|
10448
|
-
/** @returns {UpdateTaxVersion} */
|
|
10449
|
-
static UpdateTaxVersion() {
|
|
10450
|
-
return Joi.object({
|
|
10451
|
-
components: Joi.array()
|
|
10452
|
-
.items(CatalogPlatformModel.TaxComponent())
|
|
10453
|
-
.required(),
|
|
10454
|
-
applicable_date: Joi.string().allow("").required(),
|
|
10455
|
-
});
|
|
10456
|
-
}
|
|
10457
|
-
|
|
10458
|
-
/** @returns {UpdateTaxRequestBody} */
|
|
10459
|
-
static UpdateTaxRequestBody() {
|
|
10460
|
-
return Joi.object({
|
|
10461
|
-
status: CatalogPlatformModel.TaxStatusEnum().required(),
|
|
10462
|
-
is_default: Joi.boolean().required(),
|
|
10463
|
-
name: Joi.string().allow("").required(),
|
|
10464
|
-
});
|
|
10465
|
-
}
|
|
10466
|
-
|
|
10467
|
-
/** @returns {TaxRuleItem} */
|
|
10468
|
-
static TaxRuleItem() {
|
|
10469
|
-
return Joi.object({
|
|
10470
|
-
versions: Joi.array()
|
|
10471
|
-
.items(CatalogPlatformModel.TaxVersionDetail())
|
|
10472
|
-
.required(),
|
|
10473
|
-
rule: CatalogPlatformModel.TaxRule().required(),
|
|
10474
|
-
});
|
|
10475
|
-
}
|
|
10476
|
-
|
|
10477
|
-
/** @returns {TaxRules} */
|
|
10478
|
-
static TaxRules() {
|
|
10479
|
-
return Joi.object({
|
|
10480
|
-
items: Joi.array().items(CatalogPlatformModel.TaxRuleItem()).required(),
|
|
10481
|
-
page: CatalogPlatformModel.Page().required(),
|
|
10482
|
-
});
|
|
10483
|
-
}
|
|
10484
|
-
|
|
10485
|
-
/** @returns {TaxVersionPastData} */
|
|
10486
|
-
static TaxVersionPastData() {
|
|
10487
|
-
return Joi.object({
|
|
10488
|
-
data: Joi.array().items(CatalogPlatformModel.TaxVersion()),
|
|
10489
|
-
pagination: CatalogPlatformModel.Page(),
|
|
10490
|
-
});
|
|
10491
|
-
}
|
|
10492
|
-
|
|
10493
|
-
/** @returns {TaxRuleVersion} */
|
|
10494
|
-
static TaxRuleVersion() {
|
|
10495
|
-
return Joi.object({
|
|
10496
|
-
items: Joi.array()
|
|
10497
|
-
.items(CatalogPlatformModel.TaxVersionDetail())
|
|
10498
|
-
.required(),
|
|
10499
|
-
rule: CatalogPlatformModel.TaxRule().required(),
|
|
10500
|
-
page: CatalogPlatformModel.Page().required(),
|
|
10501
|
-
});
|
|
10502
|
-
}
|
|
10503
|
-
|
|
10504
|
-
/** @returns {HSCodeItem} */
|
|
10505
|
-
static HSCodeItem() {
|
|
10506
|
-
return Joi.object({
|
|
10507
|
-
created_on: Joi.string().allow(""),
|
|
10508
|
-
modified_on: Joi.string().allow(""),
|
|
10509
|
-
type: CatalogPlatformModel.HsTypeEnum().required(),
|
|
10510
|
-
company_id: Joi.number(),
|
|
10511
|
-
description: Joi.string().allow(""),
|
|
10512
|
-
hs_code: Joi.string().allow("").required(),
|
|
10513
|
-
_id: Joi.string().allow(""),
|
|
10514
|
-
country_iso: Joi.string().allow(""),
|
|
10515
|
-
});
|
|
10516
|
-
}
|
|
10517
|
-
|
|
10518
|
-
/** @returns {HSCodes} */
|
|
10519
|
-
static HSCodes() {
|
|
10520
|
-
return Joi.object({
|
|
10521
|
-
items: Joi.array().items(CatalogPlatformModel.HSCodeItem()).required(),
|
|
10522
|
-
page: CatalogPlatformModel.Page().required(),
|
|
10523
|
-
});
|
|
10524
|
-
}
|
|
10525
|
-
|
|
10526
|
-
/** @returns {CreateTaxComponentName} */
|
|
10527
|
-
static CreateTaxComponentName() {
|
|
10528
|
-
return Joi.object({
|
|
10529
|
-
name: Joi.string().allow("").required(),
|
|
10530
|
-
});
|
|
10531
|
-
}
|
|
10532
|
-
|
|
10533
|
-
/** @returns {GetTaxComponents} */
|
|
10534
|
-
static GetTaxComponents() {
|
|
10535
|
-
return Joi.object({
|
|
10536
|
-
items: Joi.array()
|
|
10537
|
-
.items(CatalogPlatformModel.TaxComponentRes())
|
|
10538
|
-
.required(),
|
|
10539
|
-
page: CatalogPlatformModel.Page().required(),
|
|
10540
|
-
});
|
|
10541
|
-
}
|
|
10542
|
-
|
|
10543
9992
|
/** @returns {ActionPage} */
|
|
10544
9993
|
static ActionPage() {
|
|
10545
9994
|
return Joi.object({
|
|
@@ -10601,34 +10050,6 @@ class CatalogPlatformModel {
|
|
|
10601
10050
|
});
|
|
10602
10051
|
}
|
|
10603
10052
|
|
|
10604
|
-
/**
|
|
10605
|
-
* Enum: TaxStatusEnum Used By: Catalog
|
|
10606
|
-
*
|
|
10607
|
-
* @returns {TaxStatusEnum}
|
|
10608
|
-
*/
|
|
10609
|
-
static TaxStatusEnum() {
|
|
10610
|
-
return Joi.string().valid(
|
|
10611
|
-
"ACTIVE",
|
|
10612
|
-
|
|
10613
|
-
"INACTIVE",
|
|
10614
|
-
|
|
10615
|
-
"DELETED"
|
|
10616
|
-
);
|
|
10617
|
-
}
|
|
10618
|
-
|
|
10619
|
-
/**
|
|
10620
|
-
* Enum: HsTypeEnum Used By: Catalog
|
|
10621
|
-
*
|
|
10622
|
-
* @returns {HsTypeEnum}
|
|
10623
|
-
*/
|
|
10624
|
-
static HsTypeEnum() {
|
|
10625
|
-
return Joi.string().valid(
|
|
10626
|
-
"HS",
|
|
10627
|
-
|
|
10628
|
-
"SAC"
|
|
10629
|
-
);
|
|
10630
|
-
}
|
|
10631
|
-
|
|
10632
10053
|
/**
|
|
10633
10054
|
* Enum: PageType Used By: Catalog
|
|
10634
10055
|
*
|