@gofynd/fdk-client-javascript 3.13.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/OrderPlatformModel.d.ts +9 -0
- package/sdk/platform/Order/OrderPlatformModel.js +4 -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:
|
|
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()),
|
|
@@ -2986,6 +2986,9 @@ export = OrderPlatformModel;
|
|
|
2986
2986
|
* placed. Required when the order is placed from one company but fulfilled by another.
|
|
2987
2987
|
* @property {boolean} [is_draft] - Indicates whether the order is a draft.
|
|
2988
2988
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
2989
|
+
* @property {Object} [meta] - Metadata related to the order may include
|
|
2990
|
+
* additional, dynamic information that provides further context about the
|
|
2991
|
+
* order. This information can also be viewed on the Order or Shipment Details page.
|
|
2989
2992
|
*/
|
|
2990
2993
|
/**
|
|
2991
2994
|
* @typedef Page
|
|
@@ -11569,6 +11572,12 @@ type CreateOrderRequestSchema = {
|
|
|
11569
11572
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
11570
11573
|
*/
|
|
11571
11574
|
is_draft?: boolean;
|
|
11575
|
+
/**
|
|
11576
|
+
* - Metadata related to the order may include
|
|
11577
|
+
* additional, dynamic information that provides further context about the
|
|
11578
|
+
* order. This information can also be viewed on the Order or Shipment Details page.
|
|
11579
|
+
*/
|
|
11580
|
+
meta?: any;
|
|
11572
11581
|
};
|
|
11573
11582
|
/** @returns {Page} */
|
|
11574
11583
|
declare function Page(): Page;
|
|
@@ -3254,6 +3254,9 @@ const Joi = require("joi");
|
|
|
3254
3254
|
* placed. Required when the order is placed from one company but fulfilled by another.
|
|
3255
3255
|
* @property {boolean} [is_draft] - Indicates whether the order is a draft.
|
|
3256
3256
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
3257
|
+
* @property {Object} [meta] - Metadata related to the order may include
|
|
3258
|
+
* additional, dynamic information that provides further context about the
|
|
3259
|
+
* order. This information can also be viewed on the Order or Shipment Details page.
|
|
3257
3260
|
*/
|
|
3258
3261
|
|
|
3259
3262
|
/**
|
|
@@ -8932,6 +8935,7 @@ class OrderPlatformModel {
|
|
|
8932
8935
|
b2b_gstin_number: Joi.string().allow(""),
|
|
8933
8936
|
channel_company_id: Joi.string().allow(""),
|
|
8934
8937
|
is_draft: Joi.boolean(),
|
|
8938
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
8935
8939
|
});
|
|
8936
8940
|
}
|
|
8937
8941
|
|