@gofynd/fdk-client-javascript 3.7.0 → 3.8.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.
@@ -1488,6 +1488,7 @@ const Joi = require("joi");
1488
1488
  * the product.
1489
1489
  * @property {string} [description] - Detailed description of the product.
1490
1490
  * @property {string[]} [highlights] - List of highlights for the product.
1491
+ * @property {string} [hs_code] - HSN code associated with the product for tax purposes.
1491
1492
  * @property {string} [hsn_code] - HSN code associated with the product for tax purposes.
1492
1493
  * @property {string} [id] - Unique identifier of the product.
1493
1494
  * @property {string} [image_nature] - Nature or type of product images.
@@ -2219,6 +2220,7 @@ const Joi = require("joi");
2219
2220
  * @property {string} [created_on] - Date and time when the HSN data was created.
2220
2221
  * @property {string} description - Description of the HSN data.
2221
2222
  * @property {string} hsn_code
2223
+ * @property {string} [tax_rule_id] - Unique identifier of the tax rule.
2222
2224
  * @property {string} [hsn_code_id] - Unique identifier of the HSN code.
2223
2225
  * @property {string} [modified_on] - Date and time when the HSN data was last modified.
2224
2226
  * @property {Object} reporting_hsn - HSN code.
@@ -3152,6 +3154,8 @@ const Joi = require("joi");
3152
3154
  * @property {number[]} [departments] - List of department IDs related to the product.
3153
3155
  * @property {string} [description] - Full description of the product.
3154
3156
  * @property {string[]} [highlights] - List of key highlights of the product.
3157
+ * @property {string} [hs_code] - HSN (Harmonized System Nomenclature) code for
3158
+ * tax classification.
3155
3159
  * @property {string} [hsn_code] - HSN (Harmonized System Nomenclature) code for
3156
3160
  * tax classification.
3157
3161
  * @property {string} [id] - Unique identifier for the product in the system.
@@ -3376,6 +3380,7 @@ const Joi = require("joi");
3376
3380
  * @property {string} slug - URL-friendly identifier for the product.
3377
3381
  * @property {string[]} [tags] - List of tags associated with the product.
3378
3382
  * @property {TaxIdentifier} tax_identifier
3383
+ * @property {string} [hs_code] - HS Code for the product.
3379
3384
  * @property {TeaserTag} [teaser_tag]
3380
3385
  * @property {string} template_tag - Template tag for the product, used for
3381
3386
  * classification.
@@ -3443,6 +3448,125 @@ const Joi = require("joi");
3443
3448
  * @property {Object} [variants] - Variants information for the product.
3444
3449
  */
3445
3450
 
3451
+ /**
3452
+ * @typedef ProductCreateSchemaV3
3453
+ * @property {Object} [_custom_json] - Custom JSON data that can be used for
3454
+ * additional product properties.
3455
+ * @property {string} [action] - The action to perform wrt to the product (e.g.,
3456
+ * upsert, update, delete).
3457
+ * @property {Object} [attributes] - Additional attributes related to the product.
3458
+ * @property {number} brand_uid - Unique identifier for the product's brand.
3459
+ * @property {string} [bulk_job_id] - Job ID associated with bulk operations.
3460
+ * @property {string} category_slug - The category to which the product belongs.
3461
+ * @property {string} [change_request_id] - Change request identifier for product updates.
3462
+ * @property {number} company_id - Unique identifier for the company associated
3463
+ * with the product.
3464
+ * @property {string} country_of_origin - The country where the product was
3465
+ * manufactured or sourced.
3466
+ * @property {string} currency - The currency in which the product's price is listed.
3467
+ * @property {CustomOrder} [custom_order]
3468
+ * @property {number[]} departments - List of department IDs associated with the product.
3469
+ * @property {string} [description] - A detailed description of the product.
3470
+ * @property {string[]} [highlights] - Product highlights or key features.
3471
+ * @property {boolean} [is_active] - Flag to indicate if the product is active.
3472
+ * @property {boolean} [is_dependent] - Flag to indicate if the product is
3473
+ * dependent on other products.
3474
+ * @property {boolean} [is_image_less_product] - Flag to indicate if the product
3475
+ * does not have associated images.
3476
+ * @property {boolean} [is_set] - Flag to indicate if the product is part of a set.
3477
+ * @property {string} item_code - Unique item code or SKU of the product.
3478
+ * @property {string} item_type - Type of the product (e.g., standard, set,
3479
+ * composite, digital).
3480
+ * @property {Media[]} [media] - List of media URLs (images, videos) associated
3481
+ * with the product.
3482
+ * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes.
3483
+ * @property {string} name - The name of the product.
3484
+ * @property {NetQuantity} [net_quantity]
3485
+ * @property {number} [no_of_boxes] - Number of boxes required to package the product.
3486
+ * @property {string[]} [product_group_tag] - Tags to group products together
3487
+ * for classification.
3488
+ * @property {ProductPublish} [product_publish]
3489
+ * @property {string} [requester] - The role requesting the product operation
3490
+ * (admin or user).
3491
+ * @property {ReturnConfig} return_config
3492
+ * @property {string} [short_description] - A short description of the product,
3493
+ * up to 50 characters.
3494
+ * @property {string} [size_guide] - Identifier for the product's size guide.
3495
+ * @property {Object[]} sizes - List of sizes available for the product.
3496
+ * @property {string} slug - URL-friendly identifier for the product.
3497
+ * @property {string[]} [tags] - List of tags associated with the product.
3498
+ * @property {TaxIdentifierV3} tax_identifier
3499
+ * @property {TeaserTag} [teaser_tag]
3500
+ * @property {string} template_tag - Template tag for the product, used for
3501
+ * classification.
3502
+ * @property {Trader[]} trader - List of traders associated with the product.
3503
+ * @property {Object} [variant_group] - Variant group information for the product.
3504
+ * @property {Object} [variant_media] - Media related to product variants.
3505
+ * @property {Object} [variants] - Variants information for the product.
3506
+ * @property {string} [hs_code] - HS Code for the product. This is required for
3507
+ * indian companies.
3508
+ */
3509
+
3510
+ /**
3511
+ * @typedef ProductUpdateSchemaV3
3512
+ * @property {Object} [_custom_json] - Custom JSON data that can be used for
3513
+ * additional product properties.
3514
+ * @property {string} [action] - The action to perform wrt to the product (e.g.,
3515
+ * upsert, update, delete).
3516
+ * @property {Object} [attributes] - Additional attributes related to the product.
3517
+ * @property {number} brand_uid - Unique identifier for the product's brand.
3518
+ * @property {string} [bulk_job_id] - Job ID associated with bulk operations.
3519
+ * @property {string} category_slug - The category to which the product belongs.
3520
+ * @property {string} [change_request_id] - Change request identifier for product updates.
3521
+ * @property {number} company_id - Unique identifier for the company associated
3522
+ * with the product.
3523
+ * @property {string} country_of_origin - The country where the product was
3524
+ * manufactured or sourced.
3525
+ * @property {string} currency - The currency in which the product's price is listed.
3526
+ * @property {CustomOrder} [custom_order]
3527
+ * @property {number[]} departments - List of department IDs associated with the product.
3528
+ * @property {string} [description] - A detailed description of the product.
3529
+ * @property {string[]} [highlights] - Product highlights or key features.
3530
+ * @property {boolean} [is_active] - Flag to indicate if the product is active.
3531
+ * @property {boolean} [is_dependent] - Flag to indicate if the product is
3532
+ * dependent on other products.
3533
+ * @property {boolean} [is_image_less_product] - Flag to indicate if the product
3534
+ * does not have associated images.
3535
+ * @property {boolean} [is_set] - Flag to indicate if the product is part of a set.
3536
+ * @property {string} item_code - Unique item code or SKU of the product.
3537
+ * @property {string} item_type - Type of the product (e.g., standard, set,
3538
+ * composite, digital).
3539
+ * @property {Media[]} [media] - List of media URLs (images, videos) associated
3540
+ * with the product.
3541
+ * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes.
3542
+ * @property {string} name - The name of the product.
3543
+ * @property {NetQuantity} [net_quantity]
3544
+ * @property {number} [no_of_boxes] - Number of boxes required to package the product.
3545
+ * @property {string[]} [product_group_tag] - Tags to group products together
3546
+ * for classification.
3547
+ * @property {ProductPublish} [product_publish]
3548
+ * @property {string} [requester] - The role requesting the product operation
3549
+ * (admin or user).
3550
+ * @property {ReturnConfig} return_config
3551
+ * @property {string} [short_description] - A short description of the product,
3552
+ * up to 50 characters.
3553
+ * @property {string} [size_guide] - Identifier for the product's size guide.
3554
+ * @property {Object[]} sizes - List of sizes available for the product.
3555
+ * @property {string} slug - URL-friendly identifier for the product.
3556
+ * @property {string[]} [tags] - List of tags associated with the product.
3557
+ * @property {TaxIdentifierV3} tax_identifier
3558
+ * @property {string} [hs_code] - HS Code for the product. This is required for
3559
+ * indian companies.
3560
+ * @property {TeaserTag} [teaser_tag]
3561
+ * @property {string} template_tag - Template tag for the product, used for
3562
+ * classification.
3563
+ * @property {Trader[]} trader - List of traders associated with the product.
3564
+ * @property {number} [uid] - Unique identifier for the product.
3565
+ * @property {Object} [variant_group] - Variant group information for the product.
3566
+ * @property {Object} [variant_media] - Media related to product variants.
3567
+ * @property {Object} [variants] - Variants information for the product.
3568
+ */
3569
+
3446
3570
  /**
3447
3571
  * @typedef ProductDetail
3448
3572
  * @property {Object} [attributes] - Key-value pairs representing various
@@ -3892,8 +4016,12 @@ const Joi = require("joi");
3892
4016
  * the product.
3893
4017
  * @property {string} [description] - Long description of the product.
3894
4018
  * @property {string[]} [highlights] - Key features or highlights of the product.
3895
- * @property {string} [hsn_code] - Harmonized System Nomenclature (HSN) code for
3896
- * taxation purposes.
4019
+ * @property {string} [hs_code] - Harmonized System Nomenclature (HSN) code for
4020
+ * taxation purposes. This is required for indian products.
4021
+ * @property {string} [hsn_code] - **Deprecated**: Harmonized System
4022
+ * Nomenclature (HSN) code for taxation purposes. Please use the `hs_code`
4023
+ * field instead.\
4024
+ * _Deprecated_*
3897
4025
  * @property {string} [id] - Unique identifier of the product in the database.
3898
4026
  * @property {string} [image_nature] - Describes the nature of the product
3899
4027
  * images (e.g., "standard").
@@ -4050,6 +4178,8 @@ const Joi = require("joi");
4050
4178
  /**
4051
4179
  * @typedef ProductTemplateExportFilterRequestSchema
4052
4180
  * @property {string[]} [brands] - The list of the brands that needs to be exported.
4181
+ * @property {string[]} [tax_rule_ids] - The list of the tax rule ids that needs
4182
+ * to be exported.
4053
4183
  * @property {string[]} catalogue_types - The list of the type of the catalog
4054
4184
  * such as set, standard and composite.
4055
4185
  * @property {string} [from_date] - The modified on date from which the data
@@ -4104,6 +4234,7 @@ const Joi = require("joi");
4104
4234
  * @property {Object} [custom_order]
4105
4235
  * @property {Object} [description]
4106
4236
  * @property {Object} [highlights]
4237
+ * @property {Object} [hs_code]
4107
4238
  * @property {Object} [hsn_code]
4108
4239
  * @property {Object} [is_active]
4109
4240
  * @property {Object} [is_dependent]
@@ -4455,9 +4586,15 @@ const Joi = require("joi");
4455
4586
 
4456
4587
  /**
4457
4588
  * @typedef TaxIdentifier
4458
- * @property {string} [hsn_code]
4459
- * @property {string} [hsn_code_id]
4460
- * @property {string} [reporting_hsn]
4589
+ * @property {string} [tax_rule_id] - The unique identifier of the tax rule.
4590
+ * @property {string} [hsn_code] _Deprecated_*
4591
+ * @property {string} [hsn_code_id] _Deprecated_*
4592
+ * @property {string} [reporting_hsn] _Deprecated_*
4593
+ */
4594
+
4595
+ /**
4596
+ * @typedef TaxIdentifierV3
4597
+ * @property {string} tax_rule_id - The unique identifier of the tax rule.
4461
4598
  */
4462
4599
 
4463
4600
  /**
@@ -4817,6 +4954,194 @@ const Joi = require("joi");
4817
4954
  * or unfollow operation.
4818
4955
  */
4819
4956
 
4957
+ /**
4958
+ * @typedef TaxReqBodyRule
4959
+ * @property {string} name - Tax rule name
4960
+ * @property {string} [description] - Tax rule description
4961
+ */
4962
+
4963
+ /**
4964
+ * @typedef TaxThreshold
4965
+ * @property {number} value - Tax rate is applied to products above or equal to
4966
+ * this price.
4967
+ * @property {number} rate - Tax rate ranging from 0 to 1.
4968
+ */
4969
+
4970
+ /**
4971
+ * @typedef TaxComponent
4972
+ * @property {string} name - Name represent different types of taxes that may be
4973
+ * applied to products or transactions, such as sales tax, value-added tax
4974
+ * (VAT), goods and services tax, consumption tax, or other region-specific
4975
+ * taxation systems.
4976
+ * @property {TaxThreshold[]} slabs - List of slabs which comprises of tax rate
4977
+ * and their respective threshold value
4978
+ */
4979
+
4980
+ /**
4981
+ * @typedef TaxComponentResponseSchema
4982
+ * @property {string} name - Name of the component.
4983
+ * @property {string} [description] - Description of the tax component.
4984
+ * @property {TaxThreshold[]} slabs - List of slabs that comprises of tax rate
4985
+ * and their respective threshold.
4986
+ * @property {string} _id - Unique identifier of the tax component. This _id is
4987
+ * required for updating any tax component; If _id field is not in "update tax
4988
+ * version" request then that component will be created.
4989
+ */
4990
+
4991
+ /**
4992
+ * @typedef TaxComponentName
4993
+ * @property {string} _id - Unique identifier for the tax component name
4994
+ * @property {number} company_id - Identifier of the company this component name
4995
+ * belongs to
4996
+ * @property {string} name - Name of the tax component
4997
+ * @property {string} [description] - Description of the tax component name
4998
+ * @property {string} [created_on] - Timestamp when the component name was created
4999
+ * @property {string} [modified_on] - Timestamp when the component name was last modified
5000
+ */
5001
+
5002
+ /**
5003
+ * @typedef CreateTaxComponentNameRequestSchema
5004
+ * @property {string} name - Name of the tax component
5005
+ * @property {string} [description] - Description of the tax component name
5006
+ */
5007
+
5008
+ /**
5009
+ * @typedef TaxReqBodyVersion
5010
+ * @property {TaxComponent[]} components - List of tax components with their
5011
+ * respective slabs and rates.
5012
+ */
5013
+
5014
+ /**
5015
+ * @typedef CreateTaxRequestBody
5016
+ * @property {TaxReqBodyRule} rule
5017
+ * @property {TaxReqBodyVersion[]} versions - List of tax versions for the tax rule.
5018
+ */
5019
+
5020
+ /**
5021
+ * @typedef TaxVersion
5022
+ * @property {string} [_id]
5023
+ * @property {string} [rule_id] - Tax Rule ID.
5024
+ * @property {string} [applicable_date] - It is the date from when this rule
5025
+ * will come in effect.
5026
+ * @property {string} [created_on]
5027
+ * @property {string} [modified_on]
5028
+ * @property {number} [company_id] - Company ID.
5029
+ * @property {TaxStatusEnum} [status]
5030
+ * @property {TaxComponentResponseSchema[]} [components] - List of tax components.
5031
+ */
5032
+
5033
+ /**
5034
+ * @typedef UpdateTaxVersionRequestBody
5035
+ * @property {TaxComponentResponseSchema[]} components - List of tax components.
5036
+ * @property {string} applicable_date - It is the date from when this rule will
5037
+ * come in effect. It should be atleast one minute in the future from the current time.
5038
+ */
5039
+
5040
+ /**
5041
+ * @typedef CreateTaxVersionRequestBody
5042
+ * @property {TaxComponent[]} components - List of tax components.
5043
+ * @property {string} applicable_date - It is the date from when this rule will
5044
+ * come in effect. It should be atleast one minute in the future from the
5045
+ * current time. Date time format YYYY-MM-DDThh:mm:ss±hh:mm.
5046
+ */
5047
+
5048
+ /**
5049
+ * @typedef TaxRule
5050
+ * @property {string} [_id]
5051
+ * @property {string} [name]
5052
+ * @property {string} [description] - Description of the tax rule.
5053
+ * @property {boolean} [is_default] - Flag to set any tax rule as default, in
5054
+ * case any tax rule is inactive on a product then default tax rule gets applied
5055
+ * @property {number} [company_id]
5056
+ * @property {TaxStatusEnum} [status]
5057
+ * @property {string} [created_on]
5058
+ * @property {string} [modified_on]
5059
+ */
5060
+
5061
+ /**
5062
+ * @typedef TaxVersionDetail
5063
+ * @property {string} _id
5064
+ * @property {string} rule_id
5065
+ * @property {string} applicable_date
5066
+ * @property {string} created_on
5067
+ * @property {string} modified_on
5068
+ * @property {number} company_id
5069
+ * @property {TaxStatusEnum} [status]
5070
+ * @property {TaxComponent[]} components - List of components.
5071
+ * @property {string} version_status - Specifies the type of tax version.
5072
+ */
5073
+
5074
+ /**
5075
+ * @typedef CreateTax
5076
+ * @property {TaxRule} [rule]
5077
+ * @property {TaxVersion} [versions]
5078
+ */
5079
+
5080
+ /**
5081
+ * @typedef UpdateTaxVersion
5082
+ * @property {TaxComponent[]} components - List of components.
5083
+ * @property {string} applicable_date
5084
+ */
5085
+
5086
+ /**
5087
+ * @typedef UpdateTaxRequestBody
5088
+ * @property {TaxStatusEnum} status
5089
+ * @property {boolean} is_default - Flag to set any tax rule as default, in case
5090
+ * any tax rule is inactive or not available on a product then default tax
5091
+ * rule gets applied.
5092
+ * @property {string} name - New name of the tax rule.
5093
+ */
5094
+
5095
+ /**
5096
+ * @typedef TaxRuleItem
5097
+ * @property {TaxVersionDetail[]} versions
5098
+ * @property {TaxRule} rule
5099
+ */
5100
+
5101
+ /**
5102
+ * @typedef TaxRules
5103
+ * @property {TaxRuleItem[]} items - List of tax rules with their versions.
5104
+ * @property {Page} page
5105
+ */
5106
+
5107
+ /**
5108
+ * @typedef TaxVersionPastData
5109
+ * @property {TaxVersion[]} [data]
5110
+ * @property {Page} [pagination]
5111
+ */
5112
+
5113
+ /**
5114
+ * @typedef TaxRuleVersion
5115
+ * @property {TaxVersionDetail[]} items - List of tax versions.
5116
+ * @property {TaxRule} rule
5117
+ * @property {Page} page
5118
+ */
5119
+
5120
+ /**
5121
+ * @typedef HSCodeItem
5122
+ * @property {string} [created_on] - Timestamp of when the HS code was created.
5123
+ * @property {string} [modified_on] - Timestamp of when the HS code was last modified.
5124
+ * @property {HsTypeEnum} type
5125
+ * @property {number} [company_id] - Company ID associated with this HS code.
5126
+ * @property {string} [description] - Description of the HS code.
5127
+ * @property {string} hs_code - The HS code of the product.
5128
+ * @property {string} [_id] - Unique identifier for the HS code entry.
5129
+ * @property {string} [country_iso] - ISO 2-digit country code. Will be set by
5130
+ * default according to company's country.
5131
+ */
5132
+
5133
+ /**
5134
+ * @typedef HSCodes
5135
+ * @property {HSCodeItem[]} items - Array of HS code responses.
5136
+ * @property {Page} page
5137
+ */
5138
+
5139
+ /**
5140
+ * @typedef GetTaxComponents
5141
+ * @property {TaxComponentResponseSchema[]} items
5142
+ * @property {Page} page
5143
+ */
5144
+
4820
5145
  /**
4821
5146
  * @typedef ActionPage
4822
5147
  * @property {Object} [params] - Parameters that should be considered in path.
@@ -4865,6 +5190,10 @@ const Joi = require("joi");
4865
5190
  * string and length should not exceed 100 characters.
4866
5191
  */
4867
5192
 
5193
+ /** @typedef {"ACTIVE" | "INACTIVE" | "DELETED"} TaxStatusEnum */
5194
+
5195
+ /** @typedef {"HS" | "SAC"} HsTypeEnum */
5196
+
4868
5197
  /**
4869
5198
  * @typedef {| "about-us"
4870
5199
  * | "addresses"
@@ -6460,6 +6789,7 @@ class CatalogPlatformModel {
6460
6789
  departments: Joi.array().items(Joi.number()),
6461
6790
  description: Joi.string().allow(""),
6462
6791
  highlights: Joi.array().items(Joi.string().allow("")),
6792
+ hs_code: Joi.string().allow(""),
6463
6793
  hsn_code: Joi.string().allow(""),
6464
6794
  id: Joi.string().allow(""),
6465
6795
  image_nature: Joi.string().allow(""),
@@ -7238,6 +7568,7 @@ class CatalogPlatformModel {
7238
7568
  created_on: Joi.string().allow(""),
7239
7569
  description: Joi.string().allow("").required(),
7240
7570
  hsn_code: Joi.string().allow("").required(),
7571
+ tax_rule_id: Joi.string().allow(""),
7241
7572
  hsn_code_id: Joi.string().allow(""),
7242
7573
  modified_on: Joi.string().allow(""),
7243
7574
  reporting_hsn: Joi.any().required(),
@@ -8257,6 +8588,7 @@ class CatalogPlatformModel {
8257
8588
  departments: Joi.array().items(Joi.number()),
8258
8589
  description: Joi.string().allow(""),
8259
8590
  highlights: Joi.array().items(Joi.string().allow("")),
8591
+ hs_code: Joi.string().allow(""),
8260
8592
  hsn_code: Joi.string().allow(""),
8261
8593
  id: Joi.string().allow(""),
8262
8594
  image_nature: Joi.string().allow(""),
@@ -8462,6 +8794,7 @@ class CatalogPlatformModel {
8462
8794
  slug: Joi.string().allow("").required(),
8463
8795
  tags: Joi.array().items(Joi.string().allow("")),
8464
8796
  tax_identifier: CatalogPlatformModel.TaxIdentifier().required(),
8797
+ hs_code: Joi.string().allow(""),
8465
8798
  teaser_tag: CatalogPlatformModel.TeaserTag(),
8466
8799
  template_tag: Joi.string().allow("").required(),
8467
8800
  trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
@@ -8521,6 +8854,107 @@ class CatalogPlatformModel {
8521
8854
  });
8522
8855
  }
8523
8856
 
8857
+ /** @returns {ProductCreateSchemaV3} */
8858
+ static ProductCreateSchemaV3() {
8859
+ return Joi.object({
8860
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
8861
+ action: Joi.string().allow(""),
8862
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
8863
+ brand_uid: Joi.number().required(),
8864
+ bulk_job_id: Joi.string().allow(""),
8865
+ category_slug: Joi.string().allow("").required(),
8866
+ change_request_id: Joi.string().allow("").allow(null),
8867
+ company_id: Joi.number().required(),
8868
+ country_of_origin: Joi.string().allow("").required(),
8869
+ currency: Joi.string().allow("").required(),
8870
+ custom_order: CatalogPlatformModel.CustomOrder(),
8871
+ departments: Joi.array().items(Joi.number()).required(),
8872
+ description: Joi.string().allow(""),
8873
+ highlights: Joi.array().items(Joi.string().allow("")).allow(null, ""),
8874
+ is_active: Joi.boolean(),
8875
+ is_dependent: Joi.boolean(),
8876
+ is_image_less_product: Joi.boolean(),
8877
+ is_set: Joi.boolean(),
8878
+ item_code: Joi.string().allow("").required(),
8879
+ item_type: Joi.string().allow("").required(),
8880
+ media: Joi.array().items(CatalogPlatformModel.Media()).allow(null, ""),
8881
+ multi_size: Joi.boolean(),
8882
+ name: Joi.string().allow("").required(),
8883
+ net_quantity: CatalogPlatformModel.NetQuantity(),
8884
+ no_of_boxes: Joi.number(),
8885
+ product_group_tag: Joi.array().items(Joi.string().allow("")),
8886
+ product_publish: CatalogPlatformModel.ProductPublish(),
8887
+ requester: Joi.string().allow(""),
8888
+ return_config: CatalogPlatformModel.ReturnConfig().required(),
8889
+ short_description: Joi.string().allow(""),
8890
+ size_guide: Joi.string().allow(""),
8891
+ sizes: Joi.array()
8892
+ .items(Joi.object().pattern(/\S/, Joi.any()))
8893
+ .required(),
8894
+ slug: Joi.string().allow("").required(),
8895
+ tags: Joi.array().items(Joi.string().allow("")),
8896
+ tax_identifier: CatalogPlatformModel.TaxIdentifierV3().required(),
8897
+ teaser_tag: CatalogPlatformModel.TeaserTag(),
8898
+ template_tag: Joi.string().allow("").required(),
8899
+ trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
8900
+ variant_group: Joi.object().pattern(/\S/, Joi.any()),
8901
+ variant_media: Joi.object().pattern(/\S/, Joi.any()),
8902
+ variants: Joi.object().pattern(/\S/, Joi.any()),
8903
+ hs_code: Joi.string().allow(""),
8904
+ });
8905
+ }
8906
+
8907
+ /** @returns {ProductUpdateSchemaV3} */
8908
+ static ProductUpdateSchemaV3() {
8909
+ return Joi.object({
8910
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
8911
+ action: Joi.string().allow(""),
8912
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
8913
+ brand_uid: Joi.number().required(),
8914
+ bulk_job_id: Joi.string().allow(""),
8915
+ category_slug: Joi.string().allow("").required(),
8916
+ change_request_id: Joi.string().allow("").allow(null),
8917
+ company_id: Joi.number().required(),
8918
+ country_of_origin: Joi.string().allow("").required(),
8919
+ currency: Joi.string().allow("").required(),
8920
+ custom_order: CatalogPlatformModel.CustomOrder(),
8921
+ departments: Joi.array().items(Joi.number()).required(),
8922
+ description: Joi.string().allow(""),
8923
+ highlights: Joi.array().items(Joi.string().allow("")).allow(null, ""),
8924
+ is_active: Joi.boolean(),
8925
+ is_dependent: Joi.boolean(),
8926
+ is_image_less_product: Joi.boolean(),
8927
+ is_set: Joi.boolean(),
8928
+ item_code: Joi.string().allow("").required(),
8929
+ item_type: Joi.string().allow("").required(),
8930
+ media: Joi.array().items(CatalogPlatformModel.Media()).allow(null, ""),
8931
+ multi_size: Joi.boolean(),
8932
+ name: Joi.string().allow("").required(),
8933
+ net_quantity: CatalogPlatformModel.NetQuantity(),
8934
+ no_of_boxes: Joi.number(),
8935
+ product_group_tag: Joi.array().items(Joi.string().allow("")),
8936
+ product_publish: CatalogPlatformModel.ProductPublish(),
8937
+ requester: Joi.string().allow(""),
8938
+ return_config: CatalogPlatformModel.ReturnConfig().required(),
8939
+ short_description: Joi.string().allow(""),
8940
+ size_guide: Joi.string().allow(""),
8941
+ sizes: Joi.array()
8942
+ .items(Joi.object().pattern(/\S/, Joi.any()))
8943
+ .required(),
8944
+ slug: Joi.string().allow("").required(),
8945
+ tags: Joi.array().items(Joi.string().allow("")),
8946
+ tax_identifier: CatalogPlatformModel.TaxIdentifierV3().required(),
8947
+ hs_code: Joi.string().allow(""),
8948
+ teaser_tag: CatalogPlatformModel.TeaserTag(),
8949
+ template_tag: Joi.string().allow("").required(),
8950
+ trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
8951
+ uid: Joi.number().allow(null),
8952
+ variant_group: Joi.object().pattern(/\S/, Joi.any()),
8953
+ variant_media: Joi.object().pattern(/\S/, Joi.any()),
8954
+ variants: Joi.object().pattern(/\S/, Joi.any()),
8955
+ });
8956
+ }
8957
+
8524
8958
  /** @returns {ProductDetail} */
8525
8959
  static ProductDetail() {
8526
8960
  return Joi.object({
@@ -8990,6 +9424,7 @@ class CatalogPlatformModel {
8990
9424
  departments: Joi.array().items(Joi.number()),
8991
9425
  description: Joi.string().allow(""),
8992
9426
  highlights: Joi.array().items(Joi.string().allow("")),
9427
+ hs_code: Joi.string().allow(""),
8993
9428
  hsn_code: Joi.string().allow(""),
8994
9429
  id: Joi.string().allow(""),
8995
9430
  image_nature: Joi.string().allow(""),
@@ -9137,6 +9572,7 @@ class CatalogPlatformModel {
9137
9572
  static ProductTemplateExportFilterRequestSchema() {
9138
9573
  return Joi.object({
9139
9574
  brands: Joi.array().items(Joi.string().allow("")),
9575
+ tax_rule_ids: Joi.array().items(Joi.string().allow("")),
9140
9576
  catalogue_types: Joi.array().items(Joi.string().allow("")).required(),
9141
9577
  from_date: Joi.string().allow(""),
9142
9578
  templates: Joi.array().items(Joi.string().allow("")).required(),
@@ -9191,6 +9627,7 @@ class CatalogPlatformModel {
9191
9627
  custom_order: Joi.object().pattern(/\S/, Joi.any()),
9192
9628
  description: Joi.object().pattern(/\S/, Joi.any()),
9193
9629
  highlights: Joi.object().pattern(/\S/, Joi.any()),
9630
+ hs_code: Joi.object().pattern(/\S/, Joi.any()),
9194
9631
  hsn_code: Joi.object().pattern(/\S/, Joi.any()),
9195
9632
  is_active: Joi.object().pattern(/\S/, Joi.any()),
9196
9633
  is_dependent: Joi.object().pattern(/\S/, Joi.any()),
@@ -9590,12 +10027,20 @@ class CatalogPlatformModel {
9590
10027
  /** @returns {TaxIdentifier} */
9591
10028
  static TaxIdentifier() {
9592
10029
  return Joi.object({
10030
+ tax_rule_id: Joi.string().allow(""),
9593
10031
  hsn_code: Joi.string().allow(""),
9594
10032
  hsn_code_id: Joi.string().allow(""),
9595
10033
  reporting_hsn: Joi.string().allow(""),
9596
10034
  });
9597
10035
  }
9598
10036
 
10037
+ /** @returns {TaxIdentifierV3} */
10038
+ static TaxIdentifierV3() {
10039
+ return Joi.object({
10040
+ tax_rule_id: Joi.string().allow("").required(),
10041
+ });
10042
+ }
10043
+
9599
10044
  /** @returns {TaxSlab} */
9600
10045
  static TaxSlab() {
9601
10046
  return Joi.object({
@@ -9989,6 +10434,242 @@ class CatalogPlatformModel {
9989
10434
  });
9990
10435
  }
9991
10436
 
10437
+ /** @returns {TaxReqBodyRule} */
10438
+ static TaxReqBodyRule() {
10439
+ return Joi.object({
10440
+ name: Joi.string().allow("").required(),
10441
+ description: Joi.string().allow(""),
10442
+ });
10443
+ }
10444
+
10445
+ /** @returns {TaxThreshold} */
10446
+ static TaxThreshold() {
10447
+ return Joi.object({
10448
+ value: Joi.number().required(),
10449
+ rate: Joi.number().required(),
10450
+ });
10451
+ }
10452
+
10453
+ /** @returns {TaxComponent} */
10454
+ static TaxComponent() {
10455
+ return Joi.object({
10456
+ name: Joi.string().allow("").required(),
10457
+ slabs: Joi.array().items(CatalogPlatformModel.TaxThreshold()).required(),
10458
+ });
10459
+ }
10460
+
10461
+ /** @returns {TaxComponentResponseSchema} */
10462
+ static TaxComponentResponseSchema() {
10463
+ return Joi.object({
10464
+ name: Joi.string().allow("").required(),
10465
+ description: Joi.string().allow(""),
10466
+ slabs: Joi.array().items(CatalogPlatformModel.TaxThreshold()).required(),
10467
+ _id: Joi.string().allow("").required(),
10468
+ });
10469
+ }
10470
+
10471
+ /** @returns {TaxComponentName} */
10472
+ static TaxComponentName() {
10473
+ return Joi.object({
10474
+ _id: Joi.string().allow("").required(),
10475
+ company_id: Joi.number().required(),
10476
+ name: Joi.string().allow("").required(),
10477
+ description: Joi.string().allow(""),
10478
+ created_on: Joi.string().allow(""),
10479
+ modified_on: Joi.string().allow(""),
10480
+ });
10481
+ }
10482
+
10483
+ /** @returns {CreateTaxComponentNameRequestSchema} */
10484
+ static CreateTaxComponentNameRequestSchema() {
10485
+ return Joi.object({
10486
+ name: Joi.string().allow("").required(),
10487
+ description: Joi.string().allow(""),
10488
+ });
10489
+ }
10490
+
10491
+ /** @returns {TaxReqBodyVersion} */
10492
+ static TaxReqBodyVersion() {
10493
+ return Joi.object({
10494
+ components: Joi.array()
10495
+ .items(CatalogPlatformModel.TaxComponent())
10496
+ .required(),
10497
+ });
10498
+ }
10499
+
10500
+ /** @returns {CreateTaxRequestBody} */
10501
+ static CreateTaxRequestBody() {
10502
+ return Joi.object({
10503
+ rule: CatalogPlatformModel.TaxReqBodyRule().required(),
10504
+ versions: Joi.array()
10505
+ .items(CatalogPlatformModel.TaxReqBodyVersion())
10506
+ .required(),
10507
+ });
10508
+ }
10509
+
10510
+ /** @returns {TaxVersion} */
10511
+ static TaxVersion() {
10512
+ return Joi.object({
10513
+ _id: Joi.string().allow(""),
10514
+ rule_id: Joi.string().allow(""),
10515
+ applicable_date: Joi.string().allow(""),
10516
+ created_on: Joi.string().allow(""),
10517
+ modified_on: Joi.string().allow(""),
10518
+ company_id: Joi.number(),
10519
+ status: CatalogPlatformModel.TaxStatusEnum(),
10520
+ components: Joi.array().items(
10521
+ CatalogPlatformModel.TaxComponentResponseSchema()
10522
+ ),
10523
+ });
10524
+ }
10525
+
10526
+ /** @returns {UpdateTaxVersionRequestBody} */
10527
+ static UpdateTaxVersionRequestBody() {
10528
+ return Joi.object({
10529
+ components: Joi.array()
10530
+ .items(CatalogPlatformModel.TaxComponentResponseSchema())
10531
+ .required(),
10532
+ applicable_date: Joi.string().allow("").required(),
10533
+ });
10534
+ }
10535
+
10536
+ /** @returns {CreateTaxVersionRequestBody} */
10537
+ static CreateTaxVersionRequestBody() {
10538
+ return Joi.object({
10539
+ components: Joi.array()
10540
+ .items(CatalogPlatformModel.TaxComponent())
10541
+ .required(),
10542
+ applicable_date: Joi.string().allow("").required(),
10543
+ });
10544
+ }
10545
+
10546
+ /** @returns {TaxRule} */
10547
+ static TaxRule() {
10548
+ return Joi.object({
10549
+ _id: Joi.string().allow(""),
10550
+ name: Joi.string().allow(""),
10551
+ description: Joi.string().allow(""),
10552
+ is_default: Joi.boolean(),
10553
+ company_id: Joi.number(),
10554
+ status: CatalogPlatformModel.TaxStatusEnum(),
10555
+ created_on: Joi.string().allow(""),
10556
+ modified_on: Joi.string().allow(""),
10557
+ });
10558
+ }
10559
+
10560
+ /** @returns {TaxVersionDetail} */
10561
+ static TaxVersionDetail() {
10562
+ return Joi.object({
10563
+ _id: Joi.string().allow("").required(),
10564
+ rule_id: Joi.string().allow("").required(),
10565
+ applicable_date: Joi.string().allow("").required(),
10566
+ created_on: Joi.string().allow("").required(),
10567
+ modified_on: Joi.string().allow("").required(),
10568
+ company_id: Joi.number().required(),
10569
+ status: CatalogPlatformModel.TaxStatusEnum(),
10570
+ components: Joi.array()
10571
+ .items(CatalogPlatformModel.TaxComponent())
10572
+ .required(),
10573
+ version_status: Joi.string().allow("").required(),
10574
+ });
10575
+ }
10576
+
10577
+ /** @returns {CreateTax} */
10578
+ static CreateTax() {
10579
+ return Joi.object({
10580
+ rule: CatalogPlatformModel.TaxRule(),
10581
+ versions: CatalogPlatformModel.TaxVersion(),
10582
+ });
10583
+ }
10584
+
10585
+ /** @returns {UpdateTaxVersion} */
10586
+ static UpdateTaxVersion() {
10587
+ return Joi.object({
10588
+ components: Joi.array()
10589
+ .items(CatalogPlatformModel.TaxComponent())
10590
+ .required(),
10591
+ applicable_date: Joi.string().allow("").required(),
10592
+ });
10593
+ }
10594
+
10595
+ /** @returns {UpdateTaxRequestBody} */
10596
+ static UpdateTaxRequestBody() {
10597
+ return Joi.object({
10598
+ status: CatalogPlatformModel.TaxStatusEnum().required(),
10599
+ is_default: Joi.boolean().required(),
10600
+ name: Joi.string().allow("").required(),
10601
+ });
10602
+ }
10603
+
10604
+ /** @returns {TaxRuleItem} */
10605
+ static TaxRuleItem() {
10606
+ return Joi.object({
10607
+ versions: Joi.array()
10608
+ .items(CatalogPlatformModel.TaxVersionDetail())
10609
+ .required(),
10610
+ rule: CatalogPlatformModel.TaxRule().required(),
10611
+ });
10612
+ }
10613
+
10614
+ /** @returns {TaxRules} */
10615
+ static TaxRules() {
10616
+ return Joi.object({
10617
+ items: Joi.array().items(CatalogPlatformModel.TaxRuleItem()).required(),
10618
+ page: CatalogPlatformModel.Page().required(),
10619
+ });
10620
+ }
10621
+
10622
+ /** @returns {TaxVersionPastData} */
10623
+ static TaxVersionPastData() {
10624
+ return Joi.object({
10625
+ data: Joi.array().items(CatalogPlatformModel.TaxVersion()),
10626
+ pagination: CatalogPlatformModel.Page(),
10627
+ });
10628
+ }
10629
+
10630
+ /** @returns {TaxRuleVersion} */
10631
+ static TaxRuleVersion() {
10632
+ return Joi.object({
10633
+ items: Joi.array()
10634
+ .items(CatalogPlatformModel.TaxVersionDetail())
10635
+ .required(),
10636
+ rule: CatalogPlatformModel.TaxRule().required(),
10637
+ page: CatalogPlatformModel.Page().required(),
10638
+ });
10639
+ }
10640
+
10641
+ /** @returns {HSCodeItem} */
10642
+ static HSCodeItem() {
10643
+ return Joi.object({
10644
+ created_on: Joi.string().allow(""),
10645
+ modified_on: Joi.string().allow(""),
10646
+ type: CatalogPlatformModel.HsTypeEnum().required(),
10647
+ company_id: Joi.number(),
10648
+ description: Joi.string().allow(""),
10649
+ hs_code: Joi.string().allow("").required(),
10650
+ _id: Joi.string().allow(""),
10651
+ country_iso: Joi.string().allow(""),
10652
+ });
10653
+ }
10654
+
10655
+ /** @returns {HSCodes} */
10656
+ static HSCodes() {
10657
+ return Joi.object({
10658
+ items: Joi.array().items(CatalogPlatformModel.HSCodeItem()).required(),
10659
+ page: CatalogPlatformModel.Page().required(),
10660
+ });
10661
+ }
10662
+
10663
+ /** @returns {GetTaxComponents} */
10664
+ static GetTaxComponents() {
10665
+ return Joi.object({
10666
+ items: Joi.array()
10667
+ .items(CatalogPlatformModel.TaxComponentResponseSchema())
10668
+ .required(),
10669
+ page: CatalogPlatformModel.Page().required(),
10670
+ });
10671
+ }
10672
+
9992
10673
  /** @returns {ActionPage} */
9993
10674
  static ActionPage() {
9994
10675
  return Joi.object({
@@ -10050,6 +10731,34 @@ class CatalogPlatformModel {
10050
10731
  });
10051
10732
  }
10052
10733
 
10734
+ /**
10735
+ * Enum: TaxStatusEnum Used By: Catalog
10736
+ *
10737
+ * @returns {TaxStatusEnum}
10738
+ */
10739
+ static TaxStatusEnum() {
10740
+ return Joi.string().valid(
10741
+ "ACTIVE",
10742
+
10743
+ "INACTIVE",
10744
+
10745
+ "DELETED"
10746
+ );
10747
+ }
10748
+
10749
+ /**
10750
+ * Enum: HsTypeEnum Used By: Catalog
10751
+ *
10752
+ * @returns {HsTypeEnum}
10753
+ */
10754
+ static HsTypeEnum() {
10755
+ return Joi.string().valid(
10756
+ "HS",
10757
+
10758
+ "SAC"
10759
+ );
10760
+ }
10761
+
10053
10762
  /**
10054
10763
  * Enum: PageType Used By: Catalog
10055
10764
  *