@gofynd/fdk-client-javascript 3.18.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +2 -2
- package/sdk/application/Cart/CartApplicationClient.js +12 -4
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
- package/sdk/application/Order/OrderApplicationClient.js +49 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
- package/sdk/common/utils.d.ts +1 -1
- package/sdk/common/utils.js +1 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +11 -3
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +1 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +46 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +334 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +222 -1
- package/sdk/partner/Webhook/WebhookPartnerModel.js +165 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +4 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +30 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +5 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +50 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +69 -10
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +30 -5
- package/sdk/platform/Cart/CartPlatformModel.d.ts +97 -72
- package/sdk/platform/Cart/CartPlatformModel.js +54 -35
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +17 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +353 -156
- package/sdk/platform/Catalog/CatalogPlatformModel.js +176 -87
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -38
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +22 -21
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1 -1
- package/sdk/platform/Content/ContentPlatformModel.d.ts +7 -7
- package/sdk/platform/Content/ContentPlatformModel.js +5 -5
- package/sdk/platform/Order/OrderPlatformModel.d.ts +6 -6
- package/sdk/platform/Order/OrderPlatformModel.js +5 -5
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +5 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/User/UserPlatformApplicationClient.js +9 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +43 -3
- package/sdk/platform/User/UserPlatformModel.js +27 -3
|
@@ -1020,6 +1020,8 @@ const Joi = require("joi");
|
|
|
1020
1020
|
* @property {string} [earn_title] - Title to show how many earn points are
|
|
1021
1021
|
* gained for this order.
|
|
1022
1022
|
* @property {string} [title] - Unique title for loyalty program applicable.
|
|
1023
|
+
* @property {number} [discount_amount] - Engage discount amount applied on the
|
|
1024
|
+
* cart as payment mode
|
|
1023
1025
|
*/
|
|
1024
1026
|
|
|
1025
1027
|
/**
|
|
@@ -1036,12 +1038,13 @@ const Joi = require("joi");
|
|
|
1036
1038
|
* @property {number} [cod_charge] - Cod charge value applied to cart. This is
|
|
1037
1039
|
* applied when user select payment mode as COD
|
|
1038
1040
|
* @property {number} [total] - Total payable amount by the customer
|
|
1039
|
-
* @property {number} [discount] - Discount amount
|
|
1041
|
+
* @property {number} [discount] - Discount amount received on cart
|
|
1040
1042
|
* @property {number} [delivery_charge] - Delivery charge applied to cart
|
|
1041
1043
|
* @property {number} [you_saved] - Total amount will be saved if customer
|
|
1042
1044
|
* places the order
|
|
1043
1045
|
* @property {number} [subtotal] - Selling price amount of all products in cart
|
|
1044
1046
|
* @property {number} [convenience_fee] - Convenience fee amount applied to cart
|
|
1047
|
+
* @property {number} [store_credit] - Store credit redeemed on the cart
|
|
1045
1048
|
*/
|
|
1046
1049
|
|
|
1047
1050
|
/**
|
|
@@ -1207,7 +1210,7 @@ const Joi = require("joi");
|
|
|
1207
1210
|
* @property {string[]} [product_group_tags] - List fot the unique identifier
|
|
1208
1211
|
* for the product grouping.
|
|
1209
1212
|
* @property {boolean} [force_new_line_item] - Flag to indicate the item as a
|
|
1210
|
-
*
|
|
1213
|
+
* separate article in cart
|
|
1211
1214
|
* @property {Object} [identifier] - Unique identifier of the article
|
|
1212
1215
|
* @property {number} [mto_quantity] - Quantity of the product which will
|
|
1213
1216
|
* specially manufactured as not available in stock
|
|
@@ -1777,7 +1780,7 @@ const Joi = require("joi");
|
|
|
1777
1780
|
* @property {Object} [_custom_json] - Field to add custom json at article level
|
|
1778
1781
|
* while add items to cart
|
|
1779
1782
|
* @property {boolean} [force_new_line_item] - Field used to decide the product
|
|
1780
|
-
* add as a
|
|
1783
|
+
* add as a separate product in cart
|
|
1781
1784
|
* @property {Object} [meta] - Field to add meta data at article level
|
|
1782
1785
|
* @property {boolean} [pos] - Filed to determine whether user is making request
|
|
1783
1786
|
* from pos or not
|
|
@@ -1830,7 +1833,7 @@ const Joi = require("joi");
|
|
|
1830
1833
|
* @property {Object} [extra_meta] - Field to update extra meta of the product in cart
|
|
1831
1834
|
* @property {Object} [_custom_json] - Field to update custom json of the product in cart
|
|
1832
1835
|
* @property {boolean} [force_new_line_item] - Field used to decide the product
|
|
1833
|
-
* add as a
|
|
1836
|
+
* add as a separate product in cart
|
|
1834
1837
|
* @property {number} [item_id] - Item id of the product that needs to be updated
|
|
1835
1838
|
* @property {number} [item_index] - Item index determines on which index the
|
|
1836
1839
|
* product falls to be updated
|
|
@@ -2503,12 +2506,16 @@ const Joi = require("joi");
|
|
|
2503
2506
|
* checkout API payload
|
|
2504
2507
|
*/
|
|
2505
2508
|
|
|
2509
|
+
/**
|
|
2510
|
+
* @typedef CartCheckoutDetailsData
|
|
2511
|
+
* @property {string} [order_id] - Order id generated after placing order
|
|
2512
|
+
*/
|
|
2513
|
+
|
|
2506
2514
|
/**
|
|
2507
2515
|
* @typedef CartCheckoutDetails
|
|
2508
|
-
* @property {string} [app_intercept_url] - App intercept
|
|
2516
|
+
* @property {string} [app_intercept_url] - App intercept URL which is used to
|
|
2509
2517
|
* redirect on app after payment in confirmed/failed
|
|
2510
|
-
* @property {
|
|
2511
|
-
* data, address, user id, order type etc
|
|
2518
|
+
* @property {CartCheckoutDetailsData} [data]
|
|
2512
2519
|
* @property {CheckCart} [cart]
|
|
2513
2520
|
* @property {boolean} [success] - Success flag of cart checkout API response
|
|
2514
2521
|
* @property {string} [callback_url] - Callback url to be redirected after
|
|
@@ -2612,7 +2619,7 @@ const Joi = require("joi");
|
|
|
2612
2619
|
|
|
2613
2620
|
/**
|
|
2614
2621
|
* @typedef PaymentMethod
|
|
2615
|
-
* @property {string} mode - Payment mode
|
|
2622
|
+
* @property {string} mode - Payment mode used for this payment method
|
|
2616
2623
|
* @property {string} [payment] - Payment name of payment method used to make payment
|
|
2617
2624
|
* @property {PaymentMeta} payment_meta
|
|
2618
2625
|
* @property {number} [amount] - Amount of the payment mode to be paid
|
|
@@ -2623,8 +2630,8 @@ const Joi = require("joi");
|
|
|
2623
2630
|
|
|
2624
2631
|
/**
|
|
2625
2632
|
* @typedef PlatformCartCheckoutDetailV2Creation
|
|
2626
|
-
* @property {string} [address_id] -
|
|
2627
|
-
*
|
|
2633
|
+
* @property {string} [address_id] - Identifier for the address where the order
|
|
2634
|
+
* will be delivered
|
|
2628
2635
|
* @property {string} [payment_identifier] - Payment identifier of the payment
|
|
2629
2636
|
* mode selected to do the payment
|
|
2630
2637
|
* @property {Object} [payment_params] - Payment params which includes payment
|
|
@@ -2633,22 +2640,23 @@ const Joi = require("joi");
|
|
|
2633
2640
|
* added in order
|
|
2634
2641
|
* @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
|
|
2635
2642
|
* payment need not to be collected from user
|
|
2636
|
-
* @property {string} id - Cart
|
|
2637
|
-
* @property {boolean} [pos] -
|
|
2638
|
-
* from
|
|
2639
|
-
* @property {string} [billing_address_id] -
|
|
2640
|
-
*
|
|
2643
|
+
* @property {string} id - Cart identifier of the user cart
|
|
2644
|
+
* @property {boolean} [pos] - Field indicating whether the user is making the
|
|
2645
|
+
* request from a POS
|
|
2646
|
+
* @property {string} [billing_address_id] - Identifier for the customer's
|
|
2647
|
+
* billing address where the invoice will be generated after order placement
|
|
2641
2648
|
* @property {string} [merchant_code] - Merchant code of the payment mode
|
|
2642
2649
|
* selected to do the payment
|
|
2643
2650
|
* @property {string} [aggregator] - Aggregator name of the payment gateway
|
|
2644
2651
|
* @property {number} [pick_at_store_uid] - Store id where we have to pick product
|
|
2645
|
-
* @property {string} [device_id] -
|
|
2646
|
-
* @property {Object} [delivery_address] -
|
|
2647
|
-
* customer address,
|
|
2648
|
-
*
|
|
2652
|
+
* @property {string} [device_id] - Unique identifier for the device used during checkout
|
|
2653
|
+
* @property {Object} [delivery_address] - Complete delivery address object
|
|
2654
|
+
* containing customer address details, phone number, email address, pincode,
|
|
2655
|
+
* landmark, and full name.
|
|
2649
2656
|
* @property {string} [payment_mode] - Payment mode from which the payment to be
|
|
2650
2657
|
* done for the order
|
|
2651
|
-
* @property {string} [checkout_mode] -
|
|
2658
|
+
* @property {string} [checkout_mode] - Checkout mode for the cart, such as
|
|
2659
|
+
* guest and logged-in checkout
|
|
2652
2660
|
* @property {CustomerDetails} [customer_details]
|
|
2653
2661
|
* @property {Object} [meta] - Meta data to be added in order
|
|
2654
2662
|
* @property {PaymentMethod[]} payment_methods - Payment methods list used to
|
|
@@ -2659,24 +2667,26 @@ const Joi = require("joi");
|
|
|
2659
2667
|
* @property {Object} [billing_address] - Billing address json which includes
|
|
2660
2668
|
* customer address, customer phone, customer email, customer pincode,
|
|
2661
2669
|
* customer landmark and customer name
|
|
2662
|
-
* @property {string} [callback_url] - Callback
|
|
2663
|
-
*
|
|
2670
|
+
* @property {string} [callback_url] - Callback URL to redirect the user after
|
|
2671
|
+
* payment is received or has failed
|
|
2672
|
+
* @property {string} [user_id] - Unique identifier of the user associated with the cart
|
|
2664
2673
|
* @property {Object} [extra_meta] - Extra meta to be added while checkout in order
|
|
2665
|
-
* @property {string} order_type - Order type of the order being placed
|
|
2666
|
-
* pickAtStore or HomeDelivery
|
|
2674
|
+
* @property {string} order_type - Order type of the order being placed
|
|
2667
2675
|
* @property {Files[]} [files] - List of file url
|
|
2668
2676
|
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
2669
2677
|
* which the order is getting placed
|
|
2670
|
-
* @property {string} [iin] - Issuer Identification Number
|
|
2671
|
-
* payment
|
|
2672
|
-
* @property {string} [network] -
|
|
2673
|
-
* the payment
|
|
2674
|
-
* @property {string} [type] -
|
|
2675
|
-
*
|
|
2676
|
-
* @property {string} [
|
|
2677
|
-
*
|
|
2678
|
-
* @property {string} [
|
|
2679
|
-
* redirected after payment
|
|
2678
|
+
* @property {string} [iin] - Issuer Identification Number (IIN) of the card to
|
|
2679
|
+
* be used for payment. This field is applicable when the payment mode is set to card.
|
|
2680
|
+
* @property {string} [network] - Card network to use for payment, relevant when
|
|
2681
|
+
* the selected payment mode is a card
|
|
2682
|
+
* @property {string} [type] - Specifies the cart type, particularly when the
|
|
2683
|
+
* payment mode is a card
|
|
2684
|
+
* @property {string} [card_id] - Identifier for the saved card to be used for
|
|
2685
|
+
* payment. This field is applicable when card payment mode has been selected.
|
|
2686
|
+
* @property {string} [success_callback_url] - URL to which the user will be
|
|
2687
|
+
* redirected after successful payment completion
|
|
2688
|
+
* @property {string} [failure_callback_url] - URL to which the user will be
|
|
2689
|
+
* redirected if the payment fails
|
|
2680
2690
|
* @property {OrderTag[]} [order_tags] - Order tags used to identify specific
|
|
2681
2691
|
* type of order which is tagged using order tags
|
|
2682
2692
|
*/
|
|
@@ -4109,6 +4119,7 @@ class CartPlatformModel {
|
|
|
4109
4119
|
earn_points_amount: Joi.number(),
|
|
4110
4120
|
earn_title: Joi.string().allow(""),
|
|
4111
4121
|
title: Joi.string().allow(""),
|
|
4122
|
+
discount_amount: Joi.number(),
|
|
4112
4123
|
});
|
|
4113
4124
|
}
|
|
4114
4125
|
|
|
@@ -4130,6 +4141,7 @@ class CartPlatformModel {
|
|
|
4130
4141
|
you_saved: Joi.number(),
|
|
4131
4142
|
subtotal: Joi.number(),
|
|
4132
4143
|
convenience_fee: Joi.number(),
|
|
4144
|
+
store_credit: Joi.number(),
|
|
4133
4145
|
});
|
|
4134
4146
|
}
|
|
4135
4147
|
|
|
@@ -5630,11 +5642,18 @@ class CartPlatformModel {
|
|
|
5630
5642
|
});
|
|
5631
5643
|
}
|
|
5632
5644
|
|
|
5645
|
+
/** @returns {CartCheckoutDetailsData} */
|
|
5646
|
+
static CartCheckoutDetailsData() {
|
|
5647
|
+
return Joi.object({
|
|
5648
|
+
order_id: Joi.string().allow(""),
|
|
5649
|
+
});
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5633
5652
|
/** @returns {CartCheckoutDetails} */
|
|
5634
5653
|
static CartCheckoutDetails() {
|
|
5635
5654
|
return Joi.object({
|
|
5636
5655
|
app_intercept_url: Joi.string().allow(""),
|
|
5637
|
-
data:
|
|
5656
|
+
data: CartPlatformModel.CartCheckoutDetailsData(),
|
|
5638
5657
|
cart: CartPlatformModel.CheckCart(),
|
|
5639
5658
|
success: Joi.boolean(),
|
|
5640
5659
|
callback_url: Joi.string().allow(""),
|
|
@@ -1076,7 +1076,7 @@ declare class Catalog {
|
|
|
1076
1076
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
1077
1077
|
* @name updateAppCategory
|
|
1078
1078
|
* @summary: Update sales channel category
|
|
1079
|
-
* @description: Modify category data related to the sales channel
|
|
1079
|
+
* @description: Modify category data related to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppCategory/).
|
|
1080
1080
|
*/
|
|
1081
1081
|
updateAppCategory({ categoryUid, body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAppCategoryParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.SuccessResponseObject>;
|
|
1082
1082
|
/**
|
|
@@ -6045,7 +6045,7 @@ class Catalog {
|
|
|
6045
6045
|
* @returns {Promise<CatalogPlatformModel.SuccessResponseObject>} - Success response
|
|
6046
6046
|
* @name updateAppCategory
|
|
6047
6047
|
* @summary: Update sales channel category
|
|
6048
|
-
* @description: Modify category data related to the sales channel
|
|
6048
|
+
* @description: Modify category data related to the sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/updateAppCategory/).
|
|
6049
6049
|
*/
|
|
6050
6050
|
async updateAppCategory(
|
|
6051
6051
|
{ categoryUid, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -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
|
|
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
|
|
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
|
|
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.
|
|
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:
|
|
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
|
|
406
|
-
* HS codes are used
|
|
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:
|
|
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
|
|
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
|
|
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:
|
|
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/
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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:
|
|
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
|
|
3028
|
-
* HS codes are used
|
|
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:
|
|
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
|
|
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
|
|
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:
|
|
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: {} },
|