@gofynd/fdk-client-javascript 3.19.0 → 3.20.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.
Files changed (35) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +2 -2
  4. package/sdk/application/Cart/CartApplicationClient.js +12 -4
  5. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +1 -1
  6. package/sdk/partner/Logistics/LogisticsPartnerClient.js +11 -3
  7. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +1 -0
  8. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +5 -5
  9. package/sdk/platform/Cart/CartPlatformApplicationClient.js +50 -7
  10. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +69 -10
  11. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +30 -5
  12. package/sdk/platform/Cart/CartPlatformModel.d.ts +97 -72
  13. package/sdk/platform/Cart/CartPlatformModel.js +54 -35
  14. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  15. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  16. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +17 -11
  17. package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -12
  18. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +353 -156
  19. package/sdk/platform/Catalog/CatalogPlatformModel.js +176 -87
  20. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -38
  21. package/sdk/platform/Catalog/CatalogPlatformValidator.js +22 -21
  22. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
  23. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1 -1
  24. package/sdk/platform/Content/ContentPlatformModel.d.ts +7 -7
  25. package/sdk/platform/Content/ContentPlatformModel.js +5 -5
  26. package/sdk/platform/Order/OrderPlatformModel.d.ts +2 -2
  27. package/sdk/platform/Order/OrderPlatformModel.js +1 -1
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  29. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +12 -3
  30. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +5 -0
  31. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -0
  32. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +4 -2
  33. package/sdk/platform/User/UserPlatformApplicationClient.js +9 -5
  34. package/sdk/platform/User/UserPlatformModel.d.ts +17 -1
  35. package/sdk/platform/User/UserPlatformModel.js +17 -1
@@ -69,7 +69,7 @@ declare class Catalog {
69
69
  * @returns {Promise<CatalogPlatformModel.HSCodeItem>} - Success response
70
70
  * @name createHsCode
71
71
  * @summary: Create HS/SAC code
72
- * @description: Create HS/SAC code. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createHsCode/).
72
+ * @description: Create a new Harmonized System (HS) or Service Accounting Code (SAC). These codes are used for product and service identification in taxation and compliance processes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createHsCode/).
73
73
  */
74
74
  createHsCode({ body, requestHeaders }?: CatalogPlatformValidator.CreateHsCodeParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.HSCodeItem>;
75
75
  /**
@@ -165,7 +165,7 @@ declare class Catalog {
165
165
  * @returns {Promise<CatalogPlatformModel.CreateTax>} - Success response
166
166
  * @name createTax
167
167
  * @summary: Create Tax Rule
168
- * @description: Create a tax rule and its version for under a specific company. This also creates a live version of the rule. The API now supports region-specific versions using optional region_type and areas along with the default country-level rule definition. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTax/).
168
+ * @description: Create a tax rule in a company, including its initial (live) version. The API supports both default (country-level) and region-specific versions by using optional parameters such as 'region_type' and 'areas'. This enables granular taxation rules scoped to different geographic regions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTax/).
169
169
  */
170
170
  createTax({ body, requestHeaders }?: CatalogPlatformValidator.CreateTaxParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.CreateTax>;
171
171
  /**
@@ -252,7 +252,8 @@ declare class Catalog {
252
252
  * @returns {Promise<Object>} - Success response
253
253
  * @name deleteTaxRule
254
254
  * @summary: Delete a tax rule
255
- * @description: Deletes a tax rule along with all its versions using the provided rule_id. You can not delete a rule if 1. it is the default tax rule 2. it is applied to any product. You will need to set any other tax rule as default or will need to attach a different tax rule to the products, then only you can delete the rule.
255
+ * @description: Deletes a tax rule and all its associated versions. Note: A rule cannot be deleted if it is set as the default or is currently assigned to any product.
256
+ * To proceed with deletion, ensure you first assign another rule as the default and unlink this rule from all products.
256
257
  * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteTaxRule/).
257
258
  */
258
259
  deleteTaxRule({ ruleId, requestHeaders }?: CatalogPlatformValidator.DeleteTaxRuleParam, { responseHeaders }?: object): Promise<any>;
@@ -263,7 +264,7 @@ declare class Catalog {
263
264
  * @returns {Promise<Object>} - Success response
264
265
  * @name deleteTaxVersion
265
266
  * @summary: Delete a tax version
266
- * @description: Deletes a tax rule using the provided rule_id. On future/scheduled version can be deleted. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteTaxVersion/).
267
+ * @description: Deletes a tax rule using the provided rule_id. Only future/scheduled version can be deleted. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteTaxVersion/).
267
268
  */
268
269
  deleteTaxVersion({ ruleId, versionId, requestHeaders }?: CatalogPlatformValidator.DeleteTaxVersionParam, { responseHeaders }?: object): Promise<any>;
269
270
  /**
@@ -329,7 +330,7 @@ declare class Catalog {
329
330
  * @returns {Promise<CatalogPlatformModel.TaxRules>} - Success response
330
331
  * @name getAllTaxRules
331
332
  * @summary: Get all tax rules of a company
332
- * @description: Returns array of all tax rules of a company - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAllTaxRules/).
333
+ * @description: Retrieves a list of all tax rules defined for a company, along with their details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAllTaxRules/).
333
334
  */
334
335
  getAllTaxRules({ q, statuses, page, limit, versionStatus, requestHeaders }?: CatalogPlatformValidator.GetAllTaxRulesParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.TaxRules>;
335
336
  /**
@@ -402,8 +403,8 @@ declare class Catalog {
402
403
  * @returns {Promise<CatalogPlatformModel.HSCodes>} - Success response
403
404
  * @name getHsCodes
404
405
  * @summary: Get HS/SAC codes
405
- * @description: Retrieve a list of HS (Harmonized System) or SAC (Service Accounting Code) codes for a company.
406
- * HS codes are used for classifying goods in international trade, while SAC codes are used for classifying services for taxation purposes.
406
+ * @description: Retrieve a list of Harmonized System (HS)) or Service Accounting Code (SAC)) codes for a company.
407
+ * HS codes are used to classify goods in international trade, while SAC codes classify services for taxation purposes.
407
408
  * Supports optional filtering and pagination.
408
409
  * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getHsCodes/).
409
410
  */
@@ -834,7 +835,7 @@ declare class Catalog {
834
835
  * @returns {Promise<CatalogPlatformModel.GetTaxComponents>} - Success response
835
836
  * @name getTaxComponentNames
836
837
  * @summary: Get component names
837
- * @description: Get component names for a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxComponentNames/).
838
+ * @description: Retrieve the list of all tax component names for a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxComponentNames/).
838
839
  */
839
840
  getTaxComponentNames({ requestHeaders }?: any, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetTaxComponents>;
840
841
  /**
@@ -844,7 +845,7 @@ declare class Catalog {
844
845
  * @returns {Promise<CatalogPlatformModel.TaxRuleVersion>} - Success response
845
846
  * @name getTaxVersionDetails
846
847
  * @summary: Get tax versions for a tax rule
847
- * @description: Retrieve versions of a tax rule with support for filtering by status and text search on region names via the `q` parameter. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxVersionDetails/).
848
+ * @description: Retrieve the versions of a tax rule. You can filter results by version status. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxVersionDetails/).
848
849
  */
849
850
  getTaxVersionDetails({ ruleId, versionStatus, q, limit, page, requestHeaders }?: CatalogPlatformValidator.GetTaxVersionDetailsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.TaxRuleVersion>;
850
851
  /**
@@ -1109,7 +1110,7 @@ declare class Catalog {
1109
1110
  * @returns {Promise<CatalogPlatformModel.TaxRule>} - Success response
1110
1111
  * @name updateTaxRule
1111
1112
  * @summary: Update Tax Rule
1112
- * @description: Update an existing tax rule under a specific company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxRule/).
1113
+ * @description: Update the details of an existing tax rule for a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxRule/).
1113
1114
  */
1114
1115
  updateTaxRule({ ruleId, body, requestHeaders }?: CatalogPlatformValidator.UpdateTaxRuleParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.TaxRule>;
1115
1116
  /**
@@ -1119,7 +1120,12 @@ declare class Catalog {
1119
1120
  * @returns {Promise<CatalogPlatformModel.TaxVersion>} - Success response
1120
1121
  * @name updateTaxVersion
1121
1122
  * @summary: Update a tax version
1122
- * @description: Updates a tax version using the provided rule_id. Scheduled versions support editing of components, applicable dates, and regional overrides while live versions allow limited updates. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxVersion/).
1123
+ * @description: When updating a tax version, the rules differ depending on whether it is a live version (that is, its applicable_date is now or in the past) or a scheduled version (with an applicable_date in the future).
1124
+ * For live versions, only the component names may be modified and only when the corresponding _id also matches, while changes to fields such as applicable_date, scope, store_ids, areas, region_type, and any other properties are not allowed.
1125
+ * In contrast, for scheduled (future) versions, you may change the applicable_date using an ISO datetime representing the date and time the version takes effect (at the start of the local day); to avoid changing it, simply pass the current applicable_date value.
1126
+ * Components can be added, updated, or removed: new components may omit _id, and omitting a known _id from the request will remove that component. The scope (COUNTRY by default, or STORE or REGION) can be set; for STORE scope, store_ids are required—if not specified, the existing store_ids are used.
1127
+ * For REGION scope, areas are required and region_type can be provided or will default to the current setting. In all cases, component names are validated, and only one version per rule may exist for each local day.
1128
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxVersion/).
1123
1129
  */
1124
1130
  updateTaxVersion({ ruleId, versionId, body, requestHeaders }?: CatalogPlatformValidator.UpdateTaxVersionParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.TaxVersion>;
1125
1131
  /**
@@ -64,7 +64,7 @@ class Catalog {
64
64
  const response = await PlatformAPIClient.execute(
65
65
  this.config,
66
66
  "post",
67
- `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
67
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
68
68
  query_params,
69
69
  body,
70
70
  { ...xHeaders, ...requestHeaders },
@@ -501,7 +501,7 @@ class Catalog {
501
501
  * @returns {Promise<CatalogPlatformModel.HSCodeItem>} - Success response
502
502
  * @name createHsCode
503
503
  * @summary: Create HS/SAC code
504
- * @description: Create HS/SAC code. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createHsCode/).
504
+ * @description: Create a new Harmonized System (HS) or Service Accounting Code (SAC). These codes are used for product and service identification in taxation and compliance processes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createHsCode/).
505
505
  */
506
506
  async createHsCode(
507
507
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1230,7 +1230,7 @@ class Catalog {
1230
1230
  * @returns {Promise<CatalogPlatformModel.CreateTax>} - Success response
1231
1231
  * @name createTax
1232
1232
  * @summary: Create Tax Rule
1233
- * @description: Create a tax rule and its version for under a specific company. This also creates a live version of the rule. The API now supports region-specific versions using optional region_type and areas along with the default country-level rule definition. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTax/).
1233
+ * @description: Create a tax rule in a company, including its initial (live) version. The API supports both default (country-level) and region-specific versions by using optional parameters such as 'region_type' and 'areas'. This enables granular taxation rules scoped to different geographic regions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/createTax/).
1234
1234
  */
1235
1235
  async createTax(
1236
1236
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1879,7 +1879,8 @@ class Catalog {
1879
1879
  * @returns {Promise<Object>} - Success response
1880
1880
  * @name deleteTaxRule
1881
1881
  * @summary: Delete a tax rule
1882
- * @description: Deletes a tax rule along with all its versions using the provided rule_id. You can not delete a rule if 1. it is the default tax rule 2. it is applied to any product. You will need to set any other tax rule as default or will need to attach a different tax rule to the products, then only you can delete the rule.
1882
+ * @description: Deletes a tax rule and all its associated versions. Note: A rule cannot be deleted if it is set as the default or is currently assigned to any product.
1883
+ * To proceed with deletion, ensure you first assign another rule as the default and unlink this rule from all products.
1883
1884
  * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteTaxRule/).
1884
1885
  */
1885
1886
  async deleteTaxRule(
@@ -1953,7 +1954,7 @@ class Catalog {
1953
1954
  * @returns {Promise<Object>} - Success response
1954
1955
  * @name deleteTaxVersion
1955
1956
  * @summary: Delete a tax version
1956
- * @description: Deletes a tax rule using the provided rule_id. On future/scheduled version can be deleted. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteTaxVersion/).
1957
+ * @description: Deletes a tax rule using the provided rule_id. Only future/scheduled version can be deleted. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteTaxVersion/).
1957
1958
  */
1958
1959
  async deleteTaxVersion(
1959
1960
  { ruleId, versionId, requestHeaders } = { requestHeaders: {} },
@@ -2446,7 +2447,7 @@ class Catalog {
2446
2447
  * @returns {Promise<CatalogPlatformModel.TaxRules>} - Success response
2447
2448
  * @name getAllTaxRules
2448
2449
  * @summary: Get all tax rules of a company
2449
- * @description: Returns array of all tax rules of a company - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAllTaxRules/).
2450
+ * @description: Retrieves a list of all tax rules defined for a company, along with their details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getAllTaxRules/).
2450
2451
  */
2451
2452
  async getAllTaxRules(
2452
2453
  { q, statuses, page, limit, versionStatus, requestHeaders } = {
@@ -3024,8 +3025,8 @@ class Catalog {
3024
3025
  * @returns {Promise<CatalogPlatformModel.HSCodes>} - Success response
3025
3026
  * @name getHsCodes
3026
3027
  * @summary: Get HS/SAC codes
3027
- * @description: Retrieve a list of HS (Harmonized System) or SAC (Service Accounting Code) codes for a company.
3028
- * HS codes are used for classifying goods in international trade, while SAC codes are used for classifying services for taxation purposes.
3028
+ * @description: Retrieve a list of Harmonized System (HS)) or Service Accounting Code (SAC)) codes for a company.
3029
+ * HS codes are used to classify goods in international trade, while SAC codes classify services for taxation purposes.
3029
3030
  * Supports optional filtering and pagination.
3030
3031
  * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getHsCodes/).
3031
3032
  */
@@ -5483,7 +5484,7 @@ class Catalog {
5483
5484
  * @returns {Promise<CatalogPlatformModel.GetTaxComponents>} - Success response
5484
5485
  * @name getTaxComponentNames
5485
5486
  * @summary: Get component names
5486
- * @description: Get component names for a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxComponentNames/).
5487
+ * @description: Retrieve the list of all tax component names for a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxComponentNames/).
5487
5488
  */
5488
5489
  async getTaxComponentNames(
5489
5490
  { requestHeaders } = { requestHeaders: {} },
@@ -5558,7 +5559,7 @@ class Catalog {
5558
5559
  * @returns {Promise<CatalogPlatformModel.TaxRuleVersion>} - Success response
5559
5560
  * @name getTaxVersionDetails
5560
5561
  * @summary: Get tax versions for a tax rule
5561
- * @description: Retrieve versions of a tax rule with support for filtering by status and text search on region names via the `q` parameter. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxVersionDetails/).
5562
+ * @description: Retrieve the versions of a tax rule. You can filter results by version status. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getTaxVersionDetails/).
5562
5563
  */
5563
5564
  async getTaxVersionDetails(
5564
5565
  { ruleId, versionStatus, q, limit, page, requestHeaders } = {
@@ -7260,7 +7261,7 @@ class Catalog {
7260
7261
  * @returns {Promise<CatalogPlatformModel.TaxRule>} - Success response
7261
7262
  * @name updateTaxRule
7262
7263
  * @summary: Update Tax Rule
7263
- * @description: Update an existing tax rule under a specific company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxRule/).
7264
+ * @description: Update the details of an existing tax rule for a company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxRule/).
7264
7265
  */
7265
7266
  async updateTaxRule(
7266
7267
  { ruleId, body, requestHeaders } = { requestHeaders: {} },
@@ -7341,7 +7342,12 @@ class Catalog {
7341
7342
  * @returns {Promise<CatalogPlatformModel.TaxVersion>} - Success response
7342
7343
  * @name updateTaxVersion
7343
7344
  * @summary: Update a tax version
7344
- * @description: Updates a tax version using the provided rule_id. Scheduled versions support editing of components, applicable dates, and regional overrides while live versions allow limited updates. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxVersion/).
7345
+ * @description: When updating a tax version, the rules differ depending on whether it is a live version (that is, its applicable_date is now or in the past) or a scheduled version (with an applicable_date in the future).
7346
+ * For live versions, only the component names may be modified and only when the corresponding _id also matches, while changes to fields such as applicable_date, scope, store_ids, areas, region_type, and any other properties are not allowed.
7347
+ * In contrast, for scheduled (future) versions, you may change the applicable_date using an ISO datetime representing the date and time the version takes effect (at the start of the local day); to avoid changing it, simply pass the current applicable_date value.
7348
+ * Components can be added, updated, or removed: new components may omit _id, and omitting a known _id from the request will remove that component. The scope (COUNTRY by default, or STORE or REGION) can be set; for STORE scope, store_ids are required—if not specified, the existing store_ids are used.
7349
+ * For REGION scope, areas are required and region_type can be provided or will default to the current setting. In all cases, component names are validated, and only one version per rule may exist for each local day.
7350
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateTaxVersion/).
7345
7351
  */
7346
7352
  async updateTaxVersion(
7347
7353
  { ruleId, versionId, body, requestHeaders } = { requestHeaders: {} },