@gofynd/fdk-client-javascript 3.12.0 → 3.14.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/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +21 -8
- package/sdk/platform/Cart/CartPlatformModel.js +10 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformClient.js +1 -1
- package/sdk/platform/Order/OrderPlatformModel.d.ts +241 -207
- package/sdk/platform/Order/OrderPlatformModel.js +117 -104
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +16 -4
- package/sdk/platform/Order/OrderPlatformValidator.js +8 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +85 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +861 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +534 -84
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +5 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
234
234
|
The above code will log the curl command in the console
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.
|
|
237
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.14.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
238
238
|
Active Theme: Emerge
|
|
239
239
|
```
|
|
240
240
|
|
package/package.json
CHANGED
|
@@ -434,7 +434,7 @@ declare class Cart {
|
|
|
434
434
|
* @returns {Promise<CartPlatformModel.AddCartDetailResult>} - Success response
|
|
435
435
|
* @name platformAddItems
|
|
436
436
|
* @summary: Add items to cart
|
|
437
|
-
* @description:
|
|
437
|
+
* @description: Adds product items to a customer's shopping cart. If the customer does not have an existing cart, a new one is created automatically. - The `new_cart` flag forces creation of a new cart even if one already exists. - The `default_cart` flag determines whether the item is added to the user's default storefront-visible cart. If `true`, the item is added to the user's default cart that is accessible via the storefront. If `false`, an existing active cart is fetched if available; otherwise, a new hidden cart is created. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformAddItems/).
|
|
438
438
|
*/
|
|
439
439
|
platformAddItems({ body, xOrderingSource, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.AddCartDetailResult>;
|
|
440
440
|
/**
|
|
@@ -3558,7 +3558,7 @@ class Cart {
|
|
|
3558
3558
|
* @returns {Promise<CartPlatformModel.AddCartDetailResult>} - Success response
|
|
3559
3559
|
* @name platformAddItems
|
|
3560
3560
|
* @summary: Add items to cart
|
|
3561
|
-
* @description:
|
|
3561
|
+
* @description: Adds product items to a customer's shopping cart. If the customer does not have an existing cart, a new one is created automatically. - The `new_cart` flag forces creation of a new cart even if one already exists. - The `default_cart` flag determines whether the item is added to the user's default storefront-visible cart. If `true`, the item is added to the user's default cart that is accessible via the storefront. If `false`, an existing active cart is fetched if available; otherwise, a new hidden cart is created. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformAddItems/).
|
|
3562
3562
|
*/
|
|
3563
3563
|
async platformAddItems(
|
|
3564
3564
|
{ body, xOrderingSource, i, b, buyNow, orderType, id, requestHeaders } = {
|
|
@@ -1884,10 +1884,15 @@ export = CartPlatformModel;
|
|
|
1884
1884
|
*/
|
|
1885
1885
|
/**
|
|
1886
1886
|
* @typedef PlatformAddCartDetails
|
|
1887
|
-
* @property {string} [user_id] - The
|
|
1888
|
-
*
|
|
1889
|
-
* @property {boolean} [new_cart] -
|
|
1890
|
-
*
|
|
1887
|
+
* @property {string} [user_id] - The unique identifier of the user for whom
|
|
1888
|
+
* items are being added to the cart
|
|
1889
|
+
* @property {boolean} [new_cart] - Indicates whether a new cart should be
|
|
1890
|
+
* created. If `true`, a new cart is created even if one already exists.
|
|
1891
|
+
* @property {boolean} [default_cart] - Determines whether the item is added to
|
|
1892
|
+
* the user's default visible cart on the storefront. If `true`, the item is
|
|
1893
|
+
* added to the user's default cart that is accessible via the storefront. If
|
|
1894
|
+
* `false`, an existing active cart is fetched if available; otherwise, a new
|
|
1895
|
+
* hidden cart is created. Defaults to `true`.
|
|
1891
1896
|
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
1892
1897
|
* added to cart like item id, item size, and item quantity
|
|
1893
1898
|
*/
|
|
@@ -7278,15 +7283,23 @@ type UserCartMappingResult = {
|
|
|
7278
7283
|
declare function PlatformAddCartDetails(): PlatformAddCartDetails;
|
|
7279
7284
|
type PlatformAddCartDetails = {
|
|
7280
7285
|
/**
|
|
7281
|
-
* - The
|
|
7282
|
-
*
|
|
7286
|
+
* - The unique identifier of the user for whom
|
|
7287
|
+
* items are being added to the cart
|
|
7283
7288
|
*/
|
|
7284
7289
|
user_id?: string;
|
|
7285
7290
|
/**
|
|
7286
|
-
* -
|
|
7287
|
-
*
|
|
7291
|
+
* - Indicates whether a new cart should be
|
|
7292
|
+
* created. If `true`, a new cart is created even if one already exists.
|
|
7288
7293
|
*/
|
|
7289
7294
|
new_cart?: boolean;
|
|
7295
|
+
/**
|
|
7296
|
+
* - Determines whether the item is added to
|
|
7297
|
+
* the user's default visible cart on the storefront. If `true`, the item is
|
|
7298
|
+
* added to the user's default cart that is accessible via the storefront. If
|
|
7299
|
+
* `false`, an existing active cart is fetched if available; otherwise, a new
|
|
7300
|
+
* hidden cart is created. Defaults to `true`.
|
|
7301
|
+
*/
|
|
7302
|
+
default_cart?: boolean;
|
|
7290
7303
|
/**
|
|
7291
7304
|
* - List of items detail which need to be
|
|
7292
7305
|
* added to cart like item id, item size, and item quantity
|
|
@@ -2046,10 +2046,15 @@ const Joi = require("joi");
|
|
|
2046
2046
|
|
|
2047
2047
|
/**
|
|
2048
2048
|
* @typedef PlatformAddCartDetails
|
|
2049
|
-
* @property {string} [user_id] - The
|
|
2050
|
-
*
|
|
2051
|
-
* @property {boolean} [new_cart] -
|
|
2052
|
-
*
|
|
2049
|
+
* @property {string} [user_id] - The unique identifier of the user for whom
|
|
2050
|
+
* items are being added to the cart
|
|
2051
|
+
* @property {boolean} [new_cart] - Indicates whether a new cart should be
|
|
2052
|
+
* created. If `true`, a new cart is created even if one already exists.
|
|
2053
|
+
* @property {boolean} [default_cart] - Determines whether the item is added to
|
|
2054
|
+
* the user's default visible cart on the storefront. If `true`, the item is
|
|
2055
|
+
* added to the user's default cart that is accessible via the storefront. If
|
|
2056
|
+
* `false`, an existing active cart is fetched if available; otherwise, a new
|
|
2057
|
+
* hidden cart is created. Defaults to `true`.
|
|
2053
2058
|
* @property {AddProductCart[]} [items] - List of items detail which need to be
|
|
2054
2059
|
* added to cart like item id, item size, and item quantity
|
|
2055
2060
|
*/
|
|
@@ -4836,6 +4841,7 @@ class CartPlatformModel {
|
|
|
4836
4841
|
return Joi.object({
|
|
4837
4842
|
user_id: Joi.string().allow(""),
|
|
4838
4843
|
new_cart: Joi.boolean(),
|
|
4844
|
+
default_cart: Joi.boolean(),
|
|
4839
4845
|
items: Joi.array().items(CartPlatformModel.AddProductCart()),
|
|
4840
4846
|
});
|
|
4841
4847
|
}
|
|
@@ -6643,7 +6643,7 @@ class CatalogPlatformModel {
|
|
|
6643
6643
|
departments: Joi.array().items(Joi.number()),
|
|
6644
6644
|
description: Joi.string().allow(""),
|
|
6645
6645
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
6646
|
-
hs_code: Joi.string().allow(""),
|
|
6646
|
+
hs_code: Joi.string().allow("").allow(null),
|
|
6647
6647
|
hsn_code: Joi.string().allow(""),
|
|
6648
6648
|
id: Joi.string().allow(""),
|
|
6649
6649
|
image_nature: Joi.string().allow(""),
|
|
@@ -8402,7 +8402,7 @@ class CatalogPlatformModel {
|
|
|
8402
8402
|
departments: Joi.array().items(Joi.number()),
|
|
8403
8403
|
description: Joi.string().allow(""),
|
|
8404
8404
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
8405
|
-
hs_code: Joi.string().allow(""),
|
|
8405
|
+
hs_code: Joi.string().allow("").allow(null),
|
|
8406
8406
|
hsn_code: Joi.string().allow(""),
|
|
8407
8407
|
id: Joi.string().allow(""),
|
|
8408
8408
|
image_nature: Joi.string().allow(""),
|
|
@@ -8562,7 +8562,7 @@ class CatalogPlatformModel {
|
|
|
8562
8562
|
variant_group: Joi.object().pattern(/\S/, Joi.any()),
|
|
8563
8563
|
variant_media: Joi.object().pattern(/\S/, Joi.any()),
|
|
8564
8564
|
variants: Joi.object().pattern(/\S/, Joi.any()),
|
|
8565
|
-
hs_code: Joi.string().allow(""),
|
|
8565
|
+
hs_code: Joi.string().allow("").allow(null),
|
|
8566
8566
|
bundle_details: Joi.array()
|
|
8567
8567
|
.items(CatalogPlatformModel.BundleDetails())
|
|
8568
8568
|
.allow(null, ""),
|
|
@@ -8609,7 +8609,7 @@ class CatalogPlatformModel {
|
|
|
8609
8609
|
slug: Joi.string().allow("").required(),
|
|
8610
8610
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
8611
8611
|
tax_identifier: CatalogPlatformModel.TaxIdentifierV3().required(),
|
|
8612
|
-
hs_code: Joi.string().allow(""),
|
|
8612
|
+
hs_code: Joi.string().allow("").allow(null),
|
|
8613
8613
|
teaser_tag: CatalogPlatformModel.TeaserTag(),
|
|
8614
8614
|
template_tag: Joi.string().allow("").required(),
|
|
8615
8615
|
trader: Joi.array().items(CatalogPlatformModel.Trader()).required(),
|
|
@@ -8645,7 +8645,7 @@ class CatalogPlatformModel {
|
|
|
8645
8645
|
sizes: Joi.array().items(CatalogPlatformModel.ProductSizePatch()),
|
|
8646
8646
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
8647
8647
|
tax_identifier: CatalogPlatformModel.TaxIdentifierV3(),
|
|
8648
|
-
hs_code: Joi.string().allow(""),
|
|
8648
|
+
hs_code: Joi.string().allow("").allow(null),
|
|
8649
8649
|
teaser_tag: CatalogPlatformModel.TeaserTag(),
|
|
8650
8650
|
template_tag: Joi.string().allow(""),
|
|
8651
8651
|
trader: Joi.array().items(CatalogPlatformModel.Trader()),
|
|
@@ -9140,7 +9140,7 @@ class CatalogPlatformModel {
|
|
|
9140
9140
|
departments: Joi.array().items(Joi.number()),
|
|
9141
9141
|
description: Joi.string().allow(""),
|
|
9142
9142
|
highlights: Joi.array().items(Joi.string().allow("")),
|
|
9143
|
-
hs_code: Joi.string().allow(""),
|
|
9143
|
+
hs_code: Joi.string().allow("").allow(null),
|
|
9144
9144
|
hsn_code: Joi.string().allow(""),
|
|
9145
9145
|
id: Joi.string().allow(""),
|
|
9146
9146
|
image_nature: Joi.string().allow(""),
|
|
@@ -9343,7 +9343,7 @@ class CatalogPlatformModel {
|
|
|
9343
9343
|
custom_order: Joi.object().pattern(/\S/, Joi.any()),
|
|
9344
9344
|
description: Joi.object().pattern(/\S/, Joi.any()),
|
|
9345
9345
|
highlights: Joi.object().pattern(/\S/, Joi.any()),
|
|
9346
|
-
hs_code: Joi.object().pattern(/\S/, Joi.any()),
|
|
9346
|
+
hs_code: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
9347
9347
|
hsn_code: Joi.object().pattern(/\S/, Joi.any()),
|
|
9348
9348
|
is_active: Joi.object().pattern(/\S/, Joi.any()),
|
|
9349
9349
|
is_dependent: Joi.object().pattern(/\S/, Joi.any()),
|
|
@@ -85,7 +85,7 @@ declare class Order {
|
|
|
85
85
|
* @returns {Promise<Object>} - Success response
|
|
86
86
|
* @name createOrder
|
|
87
87
|
* @summary: Create Order
|
|
88
|
-
* @description: Creates an order in the OMS. Note: Use the Serviceability API (
|
|
88
|
+
* @description: Creates an order in the OMS. Note: Use the Serviceability API (<a href='/commerce/sdk/latest/platform/company/serviceability#createShipments'>createShipments</a>) to determine shipments before creating an order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
|
|
89
89
|
*/
|
|
90
90
|
createOrder({ xOrderingSource, body, xApplicationId, xExtensionId, requestHeaders }?: OrderPlatformValidator.CreateOrderParam, { responseHeaders }?: object): Promise<any>;
|
|
91
91
|
/**
|
|
@@ -604,7 +604,7 @@ class Order {
|
|
|
604
604
|
* @returns {Promise<Object>} - Success response
|
|
605
605
|
* @name createOrder
|
|
606
606
|
* @summary: Create Order
|
|
607
|
-
* @description: Creates an order in the OMS. Note: Use the Serviceability API (
|
|
607
|
+
* @description: Creates an order in the OMS. Note: Use the Serviceability API (<a href='/commerce/sdk/latest/platform/company/serviceability#createShipments'>createShipments</a>) to determine shipments before creating an order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
|
|
608
608
|
*/
|
|
609
609
|
async createOrder(
|
|
610
610
|
{ xOrderingSource, body, xApplicationId, xExtensionId, requestHeaders } = {
|