@gofynd/fdk-client-javascript 3.4.4 → 3.6.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/ApplicationAPIClient.d.ts +1 -1
- package/sdk/application/ApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +50 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +210 -0
- package/sdk/partner/OAuthClient.d.ts +3 -3
- package/sdk/partner/PartnerAPIClient.d.ts +1 -1
- package/sdk/partner/PartnerClient.d.ts +2 -2
- package/sdk/platform/Cart/CartPlatformModel.d.ts +11 -0
- package/sdk/platform/Cart/CartPlatformModel.js +5 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +125 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1075 -95
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1017 -46
- package/sdk/platform/Catalog/CatalogPlatformModel.js +681 -5
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +200 -5
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +174 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +17 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +15 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +9 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +4 -4
- package/sdk/platform/OAuthClient.d.ts +3 -3
- package/sdk/platform/Order/OrderPlatformModel.d.ts +49 -1
- package/sdk/platform/Order/OrderPlatformModel.js +28 -0
- package/sdk/platform/PlatformAPIClient.d.ts +1 -1
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +89 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +25 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +17 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +50 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +36 -4
- package/sdk/public/PublicAPIClient.d.ts +1 -1
|
@@ -1409,6 +1409,7 @@ const Joi = require("joi");
|
|
|
1409
1409
|
* the product.
|
|
1410
1410
|
* @property {string} [description] - Detailed description of the product.
|
|
1411
1411
|
* @property {string[]} [highlights] - List of highlights for the product.
|
|
1412
|
+
* @property {string} [hs_code] - HSN code associated with the product for tax purposes.
|
|
1412
1413
|
* @property {string} [hsn_code] - HSN code associated with the product for tax purposes.
|
|
1413
1414
|
* @property {string} [id] - Unique identifier of the product.
|
|
1414
1415
|
* @property {string} [image_nature] - Nature or type of product images.
|
|
@@ -2140,6 +2141,7 @@ const Joi = require("joi");
|
|
|
2140
2141
|
* @property {string} [created_on] - Date and time when the HSN data was created.
|
|
2141
2142
|
* @property {string} description - Description of the HSN data.
|
|
2142
2143
|
* @property {string} hsn_code
|
|
2144
|
+
* @property {string} [tax_rule_id] - Unique identifier of the tax rule.
|
|
2143
2145
|
* @property {string} [hsn_code_id] - Unique identifier of the HSN code.
|
|
2144
2146
|
* @property {string} [modified_on] - Date and time when the HSN data was last modified.
|
|
2145
2147
|
* @property {Object} reporting_hsn - HSN code.
|
|
@@ -3073,6 +3075,8 @@ const Joi = require("joi");
|
|
|
3073
3075
|
* @property {number[]} [departments] - List of department IDs related to the product.
|
|
3074
3076
|
* @property {string} [description] - Full description of the product.
|
|
3075
3077
|
* @property {string[]} [highlights] - List of key highlights of the product.
|
|
3078
|
+
* @property {string} [hs_code] - HSN (Harmonized System Nomenclature) code for
|
|
3079
|
+
* tax classification.
|
|
3076
3080
|
* @property {string} [hsn_code] - HSN (Harmonized System Nomenclature) code for
|
|
3077
3081
|
* tax classification.
|
|
3078
3082
|
* @property {string} [id] - Unique identifier for the product in the system.
|
|
@@ -3297,6 +3301,7 @@ const Joi = require("joi");
|
|
|
3297
3301
|
* @property {string} slug - URL-friendly identifier for the product.
|
|
3298
3302
|
* @property {string[]} [tags] - List of tags associated with the product.
|
|
3299
3303
|
* @property {TaxIdentifier} tax_identifier
|
|
3304
|
+
* @property {string} [hs_code] - HS Code for the product.
|
|
3300
3305
|
* @property {TeaserTag} [teaser_tag]
|
|
3301
3306
|
* @property {string} template_tag - Template tag for the product, used for
|
|
3302
3307
|
* classification.
|
|
@@ -3364,6 +3369,125 @@ const Joi = require("joi");
|
|
|
3364
3369
|
* @property {Object} [variants] - Variants information for the product.
|
|
3365
3370
|
*/
|
|
3366
3371
|
|
|
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
|
+
|
|
3367
3491
|
/**
|
|
3368
3492
|
* @typedef ProductDetail
|
|
3369
3493
|
* @property {Object} [attributes] - Key-value pairs representing various
|
|
@@ -3813,8 +3937,12 @@ const Joi = require("joi");
|
|
|
3813
3937
|
* the product.
|
|
3814
3938
|
* @property {string} [description] - Long description of the product.
|
|
3815
3939
|
* @property {string[]} [highlights] - Key features or highlights of the product.
|
|
3816
|
-
* @property {string} [
|
|
3817
|
-
* taxation purposes.
|
|
3940
|
+
* @property {string} [hs_code] - Harmonized System Nomenclature (HSN) code for
|
|
3941
|
+
* taxation purposes. This is required for indian products.
|
|
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_*
|
|
3818
3946
|
* @property {string} [id] - Unique identifier of the product in the database.
|
|
3819
3947
|
* @property {string} [image_nature] - Describes the nature of the product
|
|
3820
3948
|
* images (e.g., "standard").
|
|
@@ -3971,6 +4099,8 @@ const Joi = require("joi");
|
|
|
3971
4099
|
/**
|
|
3972
4100
|
* @typedef ProductTemplateExportFilterRequestSchema
|
|
3973
4101
|
* @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.
|
|
3974
4104
|
* @property {string[]} catalogue_types - The list of the type of the catalog
|
|
3975
4105
|
* such as set, standard and composite.
|
|
3976
4106
|
* @property {string} [from_date] - The modified on date from which the data
|
|
@@ -4025,6 +4155,7 @@ const Joi = require("joi");
|
|
|
4025
4155
|
* @property {Object} [custom_order]
|
|
4026
4156
|
* @property {Object} [description]
|
|
4027
4157
|
* @property {Object} [highlights]
|
|
4158
|
+
* @property {Object} [hs_code]
|
|
4028
4159
|
* @property {Object} [hsn_code]
|
|
4029
4160
|
* @property {Object} [is_active]
|
|
4030
4161
|
* @property {Object} [is_dependent]
|
|
@@ -4376,9 +4507,15 @@ const Joi = require("joi");
|
|
|
4376
4507
|
|
|
4377
4508
|
/**
|
|
4378
4509
|
* @typedef TaxIdentifier
|
|
4379
|
-
* @property {string} [
|
|
4380
|
-
* @property {string} [
|
|
4381
|
-
* @property {string} [
|
|
4510
|
+
* @property {string} [tax_rule_id] - The unique identifier of the tax rule.
|
|
4511
|
+
* @property {string} [hsn_code] _Deprecated_*
|
|
4512
|
+
* @property {string} [hsn_code_id] _Deprecated_*
|
|
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.
|
|
4382
4519
|
*/
|
|
4383
4520
|
|
|
4384
4521
|
/**
|
|
@@ -4738,6 +4875,176 @@ const Joi = require("joi");
|
|
|
4738
4875
|
* or unfollow operation.
|
|
4739
4876
|
*/
|
|
4740
4877
|
|
|
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
|
+
|
|
4741
5048
|
/**
|
|
4742
5049
|
* @typedef ActionPage
|
|
4743
5050
|
* @property {Object} [params] - Parameters that should be considered in path.
|
|
@@ -4786,6 +5093,10 @@ const Joi = require("joi");
|
|
|
4786
5093
|
* string and length should not exceed 100 characters.
|
|
4787
5094
|
*/
|
|
4788
5095
|
|
|
5096
|
+
/** @typedef {"ACTIVE" | "INACTIVE" | "DELETED"} TaxStatusEnum */
|
|
5097
|
+
|
|
5098
|
+
/** @typedef {"HS" | "SAC"} HsTypeEnum */
|
|
5099
|
+
|
|
4789
5100
|
/**
|
|
4790
5101
|
* @typedef {| "about-us"
|
|
4791
5102
|
* | "addresses"
|
|
@@ -6363,6 +6674,7 @@ class CatalogPlatformModel {
|
|
|
6363
6674
|
departments: Joi.array().items(Joi.number()),
|
|
6364
6675
|
description: Joi.string().allow(""),
|
|
6365
6676
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
6677
|
+
hs_code: Joi.string().allow(""),
|
|
6366
6678
|
hsn_code: Joi.string().allow(""),
|
|
6367
6679
|
id: Joi.string().allow(""),
|
|
6368
6680
|
image_nature: Joi.string().allow(""),
|
|
@@ -7141,6 +7453,7 @@ class CatalogPlatformModel {
|
|
|
7141
7453
|
created_on: Joi.string().allow(""),
|
|
7142
7454
|
description: Joi.string().allow("").required(),
|
|
7143
7455
|
hsn_code: Joi.string().allow("").required(),
|
|
7456
|
+
tax_rule_id: Joi.string().allow(""),
|
|
7144
7457
|
hsn_code_id: Joi.string().allow(""),
|
|
7145
7458
|
modified_on: Joi.string().allow(""),
|
|
7146
7459
|
reporting_hsn: Joi.any().required(),
|
|
@@ -8160,6 +8473,7 @@ class CatalogPlatformModel {
|
|
|
8160
8473
|
departments: Joi.array().items(Joi.number()),
|
|
8161
8474
|
description: Joi.string().allow(""),
|
|
8162
8475
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
8476
|
+
hs_code: Joi.string().allow(""),
|
|
8163
8477
|
hsn_code: Joi.string().allow(""),
|
|
8164
8478
|
id: Joi.string().allow(""),
|
|
8165
8479
|
image_nature: Joi.string().allow(""),
|
|
@@ -8365,6 +8679,7 @@ class CatalogPlatformModel {
|
|
|
8365
8679
|
slug: Joi.string().allow("").required(),
|
|
8366
8680
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
8367
8681
|
tax_identifier: CatalogPlatformModel.TaxIdentifier().required(),
|
|
8682
|
+
hs_code: Joi.string().allow(""),
|
|
8368
8683
|
teaser_tag: CatalogPlatformModel.TeaserTag(),
|
|
8369
8684
|
template_tag: Joi.string().allow("").required(),
|
|
8370
8685
|
trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
|
|
@@ -8424,6 +8739,107 @@ class CatalogPlatformModel {
|
|
|
8424
8739
|
});
|
|
8425
8740
|
}
|
|
8426
8741
|
|
|
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
|
+
|
|
8427
8843
|
/** @returns {ProductDetail} */
|
|
8428
8844
|
static ProductDetail() {
|
|
8429
8845
|
return Joi.object({
|
|
@@ -8893,6 +9309,7 @@ class CatalogPlatformModel {
|
|
|
8893
9309
|
departments: Joi.array().items(Joi.number()),
|
|
8894
9310
|
description: Joi.string().allow(""),
|
|
8895
9311
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
9312
|
+
hs_code: Joi.string().allow(""),
|
|
8896
9313
|
hsn_code: Joi.string().allow(""),
|
|
8897
9314
|
id: Joi.string().allow(""),
|
|
8898
9315
|
image_nature: Joi.string().allow(""),
|
|
@@ -9040,6 +9457,7 @@ class CatalogPlatformModel {
|
|
|
9040
9457
|
static ProductTemplateExportFilterRequestSchema() {
|
|
9041
9458
|
return Joi.object({
|
|
9042
9459
|
brands: Joi.array().items(Joi.string().allow("")),
|
|
9460
|
+
tax_rule_ids: Joi.array().items(Joi.string().allow("")),
|
|
9043
9461
|
catalogue_types: Joi.array().items(Joi.string().allow("")).required(),
|
|
9044
9462
|
from_date: Joi.string().allow(""),
|
|
9045
9463
|
templates: Joi.array().items(Joi.string().allow("")).required(),
|
|
@@ -9094,6 +9512,7 @@ class CatalogPlatformModel {
|
|
|
9094
9512
|
custom_order: Joi.object().pattern(/\S/, Joi.any()),
|
|
9095
9513
|
description: Joi.object().pattern(/\S/, Joi.any()),
|
|
9096
9514
|
highlights: Joi.object().pattern(/\S/, Joi.any()),
|
|
9515
|
+
hs_code: Joi.object().pattern(/\S/, Joi.any()),
|
|
9097
9516
|
hsn_code: Joi.object().pattern(/\S/, Joi.any()),
|
|
9098
9517
|
is_active: Joi.object().pattern(/\S/, Joi.any()),
|
|
9099
9518
|
is_dependent: Joi.object().pattern(/\S/, Joi.any()),
|
|
@@ -9493,12 +9912,20 @@ class CatalogPlatformModel {
|
|
|
9493
9912
|
/** @returns {TaxIdentifier} */
|
|
9494
9913
|
static TaxIdentifier() {
|
|
9495
9914
|
return Joi.object({
|
|
9915
|
+
tax_rule_id: Joi.string().allow(""),
|
|
9496
9916
|
hsn_code: Joi.string().allow(""),
|
|
9497
9917
|
hsn_code_id: Joi.string().allow(""),
|
|
9498
9918
|
reporting_hsn: Joi.string().allow(""),
|
|
9499
9919
|
});
|
|
9500
9920
|
}
|
|
9501
9921
|
|
|
9922
|
+
/** @returns {TaxIdentifierV3} */
|
|
9923
|
+
static TaxIdentifierV3() {
|
|
9924
|
+
return Joi.object({
|
|
9925
|
+
tax_rule_id: Joi.string().allow("").required(),
|
|
9926
|
+
});
|
|
9927
|
+
}
|
|
9928
|
+
|
|
9502
9929
|
/** @returns {TaxSlab} */
|
|
9503
9930
|
static TaxSlab() {
|
|
9504
9931
|
return Joi.object({
|
|
@@ -9892,6 +10319,227 @@ class CatalogPlatformModel {
|
|
|
9892
10319
|
});
|
|
9893
10320
|
}
|
|
9894
10321
|
|
|
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
|
+
|
|
9895
10543
|
/** @returns {ActionPage} */
|
|
9896
10544
|
static ActionPage() {
|
|
9897
10545
|
return Joi.object({
|
|
@@ -9953,6 +10601,34 @@ class CatalogPlatformModel {
|
|
|
9953
10601
|
});
|
|
9954
10602
|
}
|
|
9955
10603
|
|
|
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
|
+
|
|
9956
10632
|
/**
|
|
9957
10633
|
* Enum: PageType Used By: Catalog
|
|
9958
10634
|
*
|