@gofynd/fdk-client-javascript 1.4.2-beta.4 → 1.4.2-beta.6
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 +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +62 -62
- package/sdk/application/Cart/CartApplicationClient.js +82 -71
- package/sdk/application/Cart/CartApplicationValidator.d.ts +189 -34
- package/sdk/application/Cart/CartApplicationValidator.js +59 -34
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +78 -78
- package/sdk/application/Catalog/CatalogApplicationClient.js +78 -78
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -67
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +32 -106
- package/sdk/application/Content/ContentApplicationClient.d.ts +34 -64
- package/sdk/application/Content/ContentApplicationClient.js +34 -115
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -42
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -42
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -14
- package/sdk/application/Lead/LeadApplicationClient.js +14 -14
- package/sdk/application/Lead/LeadApplicationModel.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +12 -12
- package/sdk/application/Logistic/LogisticApplicationClient.js +12 -12
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -24
- package/sdk/application/Order/OrderApplicationClient.js +24 -24
- package/sdk/application/Order/OrderApplicationModel.d.ts +23 -1
- package/sdk/application/Order/OrderApplicationModel.js +28 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +89 -89
- package/sdk/application/Payment/PaymentApplicationClient.js +94 -94
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +498 -3
- package/sdk/application/Payment/PaymentApplicationModel.js +316 -2
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +54 -54
- package/sdk/application/PosCart/PosCartApplicationClient.js +54 -54
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -25
- package/sdk/application/Rewards/RewardsApplicationClient.js +14 -41
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -14
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -4
- package/sdk/application/Share/ShareApplicationModel.js +0 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -8
- package/sdk/application/User/UserApplicationClient.d.ts +64 -64
- package/sdk/application/User/UserApplicationClient.js +64 -64
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +246 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/Lead/LeadPartnerModel.js +1 -1
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +38 -38
- package/sdk/partner/Theme/ThemePartnerClient.js +38 -38
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -8
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +8 -8
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +34 -36
- package/sdk/platform/Billing/BillingPlatformClient.js +34 -36
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +98 -175
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +98 -254
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +92 -18
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +28 -18
- package/sdk/platform/Cart/CartPlatformModel.d.ts +12 -0
- package/sdk/platform/Cart/CartPlatformModel.js +12 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +195 -108
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +278 -113
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +335 -136
- package/sdk/platform/Catalog/CatalogPlatformClient.js +551 -136
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +5 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3 -3
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -3
- package/sdk/platform/Common/CommonPlatformClient.js +3 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +115 -290
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +115 -510
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -13
- package/sdk/platform/Communication/CommunicationPlatformClient.js +2 -29
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +32 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -32
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +52 -127
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +52 -204
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +35 -111
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +35 -212
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +142 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +96 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +130 -218
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +136 -314
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +4 -4
- package/sdk/platform/Content/ContentPlatformClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformClient.js +7 -7
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Content/ContentPlatformValidator.js +4 -4
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +22 -48
- package/sdk/platform/Discount/DiscountPlatformClient.js +22 -73
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +20 -56
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +20 -59
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +0 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +14 -50
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +16 -55
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -14
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +12 -16
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +44 -44
- package/sdk/platform/Finance/FinancePlatformClient.js +44 -44
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +12 -12
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -48
- package/sdk/platform/Lead/LeadPlatformClient.js +22 -72
- package/sdk/platform/Lead/LeadPlatformModel.js +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +4 -4
- package/sdk/platform/Order/OrderPlatformClient.d.ts +79 -208
- package/sdk/platform/Order/OrderPlatformClient.js +79 -294
- package/sdk/platform/Order/OrderPlatformModel.d.ts +32 -3
- package/sdk/platform/Order/OrderPlatformModel.js +34 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +4 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +81 -81
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +81 -81
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +23 -40
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +23 -61
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +5 -5
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +4 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +10 -10
- package/sdk/platform/Share/SharePlatformModel.d.ts +0 -4
- package/sdk/platform/Share/SharePlatformModel.js +0 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +56 -56
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +56 -56
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +6 -6
- package/sdk/platform/Theme/ThemePlatformClient.js +6 -6
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +33 -33
- package/sdk/platform/User/UserPlatformApplicationClient.js +33 -33
- package/sdk/platform/User/UserPlatformModel.d.ts +4 -4
- package/sdk/platform/User/UserPlatformModel.js +4 -4
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +32 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +32 -45
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -1
- package/sdk/platform/Webhook/WebhookPlatformModel.js +66 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicClient.js +4 -4
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
214
214
|
The above code will log the curl command in the console
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.2-beta.
|
|
217
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.2-beta.6' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
218
218
|
Active Theme: Emerge
|
|
219
219
|
```
|
|
220
220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gofynd/fdk-client-javascript",
|
|
3
|
-
"version": "1.4.2-beta.
|
|
3
|
+
"version": "1.4.2-beta.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"joi": "^17.7.0",
|
|
18
18
|
"loglevel": "^1.8.1",
|
|
19
19
|
"query-string": "^7.1.3",
|
|
20
|
-
"@gofynd/fp-signature": "^1.0.1"
|
|
20
|
+
"@gofynd/fp-signature": "^1.0.1",
|
|
21
|
+
"@gofynd/flick": "^1.0.3"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"axios-cookiejar-support": "^4.0.6",
|
|
@@ -15,6 +15,8 @@ const Share = require("./Share/ShareApplicationClient");
|
|
|
15
15
|
const Theme = require("./Theme/ThemeApplicationClient");
|
|
16
16
|
const User = require("./User/UserApplicationClient");
|
|
17
17
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
18
|
+
const { Logger } = require("../common/Logger");
|
|
19
|
+
const { convertStringToBase64 } = require("../common/utils");
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* Represents the client for the application.
|
|
@@ -41,6 +43,24 @@ class ApplicationClient {
|
|
|
41
43
|
this.share = new Share(config);
|
|
42
44
|
this.theme = new Theme(config);
|
|
43
45
|
this.user = new User(config);
|
|
46
|
+
if (
|
|
47
|
+
typeof window != "undefined" &&
|
|
48
|
+
config.options &&
|
|
49
|
+
config.options.enable_clickstream
|
|
50
|
+
) {
|
|
51
|
+
const Clickstream = require("@gofynd/flick");
|
|
52
|
+
Logger({
|
|
53
|
+
level: "DEBUG",
|
|
54
|
+
message: `initializing clickstream with base url ${config.domain}`,
|
|
55
|
+
});
|
|
56
|
+
Clickstream.initialize(
|
|
57
|
+
config.domain,
|
|
58
|
+
convertStringToBase64(
|
|
59
|
+
config.applicationID + ":" + config.applicationToken
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
require("../common/Clickstream");
|
|
63
|
+
}
|
|
44
64
|
}
|
|
45
65
|
|
|
46
66
|
/**
|
|
@@ -40,8 +40,8 @@ declare class Cart {
|
|
|
40
40
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
41
41
|
* @returns {Promise<CartApplicationModel.SaveAddressResponse>} - Success response
|
|
42
42
|
* @name addAddress
|
|
43
|
-
* @summary: Add address
|
|
44
|
-
* @description:
|
|
43
|
+
* @summary: Add new address.
|
|
44
|
+
* @description: Saves a new address for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
|
|
45
45
|
*/
|
|
46
46
|
addAddress({ body, requestHeaders }?: CartApplicationValidator.AddAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.SaveAddressResponse>;
|
|
47
47
|
/**
|
|
@@ -50,8 +50,8 @@ declare class Cart {
|
|
|
50
50
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
51
51
|
* @returns {Promise<CartApplicationModel.AddCartDetailResponse>} - Success response
|
|
52
52
|
* @name addItems
|
|
53
|
-
* @summary: Add
|
|
54
|
-
* @description:
|
|
53
|
+
* @summary: Add to cart.
|
|
54
|
+
* @description: Adds selected items to the shopping cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addItems/).
|
|
55
55
|
*/
|
|
56
56
|
addItems({ body, i, b, areaCode, buyNow, id, requestHeaders }?: CartApplicationValidator.AddItemsParam, { responseHeaders }?: object): Promise<CartApplicationModel.AddCartDetailResponse>;
|
|
57
57
|
/**
|
|
@@ -60,18 +60,18 @@ declare class Cart {
|
|
|
60
60
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
61
61
|
* @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
|
|
62
62
|
* @name applyCoupon
|
|
63
|
-
* @summary: Apply
|
|
64
|
-
* @description:
|
|
63
|
+
* @summary: Apply coupon.
|
|
64
|
+
* @description: Applies a coupon code to get discounts on cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyCoupon/).
|
|
65
65
|
*/
|
|
66
|
-
applyCoupon({ body, i, b, p, id, buyNow, requestHeaders }?: CartApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
66
|
+
applyCoupon({ body, i, b, p, id, buyNow, cartType, requestHeaders }?: CartApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
67
67
|
/**
|
|
68
68
|
* @param {CartApplicationValidator.ApplyRewardPointsParam} arg - Arg object.
|
|
69
69
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
70
70
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
71
71
|
* @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
|
|
72
72
|
* @name applyRewardPoints
|
|
73
|
-
* @summary:
|
|
74
|
-
* @description:
|
|
73
|
+
* @summary: Use reward points.
|
|
74
|
+
* @description: Applies user’s reward points to the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyRewardPoints/).
|
|
75
75
|
*/
|
|
76
76
|
applyRewardPoints({ body, id, i, b, buyNow, requestHeaders }?: CartApplicationValidator.ApplyRewardPointsParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
77
77
|
/**
|
|
@@ -80,20 +80,20 @@ declare class Cart {
|
|
|
80
80
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
81
81
|
* @returns {Promise<CartApplicationModel.CartCheckoutResponse>} - Success response
|
|
82
82
|
* @name checkoutCart
|
|
83
|
-
* @summary: Checkout
|
|
84
|
-
* @description:
|
|
83
|
+
* @summary: Checkout cart.
|
|
84
|
+
* @description: Initiates the checkout process for the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCart/).
|
|
85
85
|
*/
|
|
86
|
-
checkoutCart({ body, buyNow, requestHeaders }?: CartApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartCheckoutResponse>;
|
|
86
|
+
checkoutCart({ body, buyNow, cartType, requestHeaders }?: CartApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartCheckoutResponse>;
|
|
87
87
|
/**
|
|
88
88
|
* @param {CartApplicationValidator.CheckoutCartV2Param} arg - Arg object.
|
|
89
89
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
90
90
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
91
91
|
* @returns {Promise<CartApplicationModel.CartCheckoutResponse>} - Success response
|
|
92
92
|
* @name checkoutCartV2
|
|
93
|
-
* @summary:
|
|
94
|
-
* @description:
|
|
93
|
+
* @summary: Enhanced cart checkout process
|
|
94
|
+
* @description: Initiates a more secure and detailed checkout process. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
|
|
95
95
|
*/
|
|
96
|
-
checkoutCartV2({ body, buyNow, requestHeaders }?: CartApplicationValidator.CheckoutCartV2Param, { responseHeaders }?: object): Promise<CartApplicationModel.CartCheckoutResponse>;
|
|
96
|
+
checkoutCartV2({ body, buyNow, cartType, requestHeaders }?: CartApplicationValidator.CheckoutCartV2Param, { responseHeaders }?: object): Promise<CartApplicationModel.CartCheckoutResponse>;
|
|
97
97
|
/**
|
|
98
98
|
* @param {CartApplicationValidator.DeleteCartParam} arg - Arg object.
|
|
99
99
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -101,8 +101,8 @@ declare class Cart {
|
|
|
101
101
|
* @returns {Promise<CartApplicationModel.DeleteCartDetailResponse>} -
|
|
102
102
|
* Success response
|
|
103
103
|
* @name deleteCart
|
|
104
|
-
* @summary:
|
|
105
|
-
* @description:
|
|
104
|
+
* @summary: Clears the cart
|
|
105
|
+
* @description: Removes all items and resets the user's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/deleteCart/).
|
|
106
106
|
*/
|
|
107
107
|
deleteCart({ id, requestHeaders }?: CartApplicationValidator.DeleteCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.DeleteCartDetailResponse>;
|
|
108
108
|
/**
|
|
@@ -111,8 +111,8 @@ declare class Cart {
|
|
|
111
111
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
112
112
|
* @returns {Promise<CartApplicationModel.Address>} - Success response
|
|
113
113
|
* @name getAddressById
|
|
114
|
-
* @summary: Fetch
|
|
115
|
-
* @description:
|
|
114
|
+
* @summary: Fetch address.
|
|
115
|
+
* @description: Retrieves a saved address using its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
|
|
116
116
|
*/
|
|
117
117
|
getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: CartApplicationValidator.GetAddressByIdParam, { responseHeaders }?: object): Promise<CartApplicationModel.Address>;
|
|
118
118
|
/**
|
|
@@ -121,8 +121,8 @@ declare class Cart {
|
|
|
121
121
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
122
122
|
* @returns {Promise<CartApplicationModel.GetAddressesResponse>} - Success response
|
|
123
123
|
* @name getAddresses
|
|
124
|
-
* @summary:
|
|
125
|
-
* @description:
|
|
124
|
+
* @summary: Get saved addresses.
|
|
125
|
+
* @description: Retrieve all saved addresses for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
|
|
126
126
|
*/
|
|
127
127
|
getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: CartApplicationValidator.GetAddressesParam, { responseHeaders }?: object): Promise<CartApplicationModel.GetAddressesResponse>;
|
|
128
128
|
/**
|
|
@@ -131,8 +131,8 @@ declare class Cart {
|
|
|
131
131
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
132
132
|
* @returns {Promise<CartApplicationModel.BulkPriceResponse>} - Success response
|
|
133
133
|
* @name getBulkDiscountOffers
|
|
134
|
-
* @summary:
|
|
135
|
-
* @description:
|
|
134
|
+
* @summary: Bulk discounts.
|
|
135
|
+
* @description: Lists available bulk discount offers for cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/).
|
|
136
136
|
*/
|
|
137
137
|
getBulkDiscountOffers({ itemId, articleId, uid, slug, requestHeaders }?: CartApplicationValidator.GetBulkDiscountOffersParam, { responseHeaders }?: object): Promise<CartApplicationModel.BulkPriceResponse>;
|
|
138
138
|
/**
|
|
@@ -141,8 +141,8 @@ declare class Cart {
|
|
|
141
141
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
142
142
|
* @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
|
|
143
143
|
* @name getCart
|
|
144
|
-
* @summary:
|
|
145
|
-
* @description:
|
|
144
|
+
* @summary: Retrieve cart details.
|
|
145
|
+
* @description: Retrieve the current state and items in the shopping cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCart/).
|
|
146
146
|
*/
|
|
147
147
|
getCart({ id, i, b, c, assignCardId, areaCode, buyNow, requestHeaders }?: CartApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
148
148
|
/**
|
|
@@ -151,8 +151,8 @@ declare class Cart {
|
|
|
151
151
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
152
152
|
* @returns {Promise<any>} - Success response
|
|
153
153
|
* @name getCartLastModified
|
|
154
|
-
* @summary:
|
|
155
|
-
* @description:
|
|
154
|
+
* @summary: Cart modification time.
|
|
155
|
+
* @description: Gets the last modified timestamp for the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartLastModified/).
|
|
156
156
|
*/
|
|
157
157
|
getCartLastModified({ id, requestHeaders }?: CartApplicationValidator.GetCartLastModifiedParam, { responseHeaders }?: object): Promise<any>;
|
|
158
158
|
/**
|
|
@@ -162,8 +162,8 @@ declare class Cart {
|
|
|
162
162
|
* @returns {Promise<CartApplicationModel.GetShareCartLinkResponse>} -
|
|
163
163
|
* Success response
|
|
164
164
|
* @name getCartShareLink
|
|
165
|
-
* @summary:
|
|
166
|
-
* @description:
|
|
165
|
+
* @summary: Share cart link.
|
|
166
|
+
* @description: Generates a shareable link for the current cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/).
|
|
167
167
|
*/
|
|
168
168
|
getCartShareLink({ body, requestHeaders }?: CartApplicationValidator.GetCartShareLinkParam, { responseHeaders }?: object): Promise<CartApplicationModel.GetShareCartLinkResponse>;
|
|
169
169
|
/**
|
|
@@ -172,8 +172,8 @@ declare class Cart {
|
|
|
172
172
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
173
173
|
* @returns {Promise<CartApplicationModel.SharedCartResponse>} - Success response
|
|
174
174
|
* @name getCartSharedItems
|
|
175
|
-
* @summary:
|
|
176
|
-
* @description:
|
|
175
|
+
* @summary: Shared cart items.
|
|
176
|
+
* @description: Retrieves items from a shared cart link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
|
|
177
177
|
*/
|
|
178
178
|
getCartSharedItems({ token, requestHeaders }?: CartApplicationValidator.GetCartSharedItemsParam, { responseHeaders }?: object): Promise<CartApplicationModel.SharedCartResponse>;
|
|
179
179
|
/**
|
|
@@ -182,8 +182,8 @@ declare class Cart {
|
|
|
182
182
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
183
183
|
* @returns {Promise<CartApplicationModel.GetCouponResponse>} - Success response
|
|
184
184
|
* @name getCoupons
|
|
185
|
-
* @summary:
|
|
186
|
-
* @description:
|
|
185
|
+
* @summary: List available coupons.
|
|
186
|
+
* @description: Retrieve coupons that can be applied to the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/).
|
|
187
187
|
*/
|
|
188
188
|
getCoupons({ id, buyNow, slug, storeId, requestHeaders }?: CartApplicationValidator.GetCouponsParam, { responseHeaders }?: object): Promise<CartApplicationModel.GetCouponResponse>;
|
|
189
189
|
/**
|
|
@@ -192,8 +192,8 @@ declare class Cart {
|
|
|
192
192
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
193
193
|
* @returns {Promise<CartApplicationModel.CartItemCountResponse>} - Success response
|
|
194
194
|
* @name getItemCount
|
|
195
|
-
* @summary: Count items
|
|
196
|
-
* @description:
|
|
195
|
+
* @summary: Count cart items.
|
|
196
|
+
* @description: Gets the total number of items in the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCount/).
|
|
197
197
|
*/
|
|
198
198
|
getItemCount({ id, buyNow, requestHeaders }?: CartApplicationValidator.GetItemCountParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartItemCountResponse>;
|
|
199
199
|
/**
|
|
@@ -202,8 +202,8 @@ declare class Cart {
|
|
|
202
202
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
203
203
|
* @returns {Promise<CartApplicationModel.LadderPriceOffers>} - Success response
|
|
204
204
|
* @name getLadderOffers
|
|
205
|
-
* @summary:
|
|
206
|
-
* @description:
|
|
205
|
+
* @summary: Fetches ladder offers.
|
|
206
|
+
* @description: Gets tiered discounts based on cart value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getLadderOffers/).
|
|
207
207
|
*/
|
|
208
208
|
getLadderOffers({ slug, storeId, promotionId, pageSize, requestHeaders }?: CartApplicationValidator.GetLadderOffersParam, { responseHeaders }?: object): Promise<CartApplicationModel.LadderPriceOffers>;
|
|
209
209
|
/**
|
|
@@ -212,18 +212,18 @@ declare class Cart {
|
|
|
212
212
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
213
213
|
* @returns {Promise<CartApplicationModel.PromotionOffersResponse>} - Success response
|
|
214
214
|
* @name getPromotionOffers
|
|
215
|
-
* @summary:
|
|
216
|
-
* @description:
|
|
215
|
+
* @summary: Retrieves promotional offers
|
|
216
|
+
* @description: Lists all available promotional offers for the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/).
|
|
217
217
|
*/
|
|
218
|
-
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, requestHeaders }?: CartApplicationValidator.GetPromotionOffersParam, { responseHeaders }?: object): Promise<CartApplicationModel.PromotionOffersResponse>;
|
|
218
|
+
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, requestHeaders }?: CartApplicationValidator.GetPromotionOffersParam, { responseHeaders }?: object): Promise<CartApplicationModel.PromotionOffersResponse>;
|
|
219
219
|
/**
|
|
220
220
|
* @param {CartApplicationValidator.GetShipmentsParam} arg - Arg object.
|
|
221
221
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
222
222
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
223
223
|
* @returns {Promise<CartApplicationModel.CartShipmentsResponse>} - Success response
|
|
224
224
|
* @name getShipments
|
|
225
|
-
* @summary:
|
|
226
|
-
* @description:
|
|
225
|
+
* @summary: List shipments.
|
|
226
|
+
* @description: Retrieve shipment details for items in the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getShipments/).
|
|
227
227
|
*/
|
|
228
228
|
getShipments({ p, id, buyNow, addressId, areaCode, orderType, requestHeaders }?: CartApplicationValidator.GetShipmentsParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartShipmentsResponse>;
|
|
229
229
|
/**
|
|
@@ -232,8 +232,8 @@ declare class Cart {
|
|
|
232
232
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
233
233
|
* @returns {Promise<CartApplicationModel.DeleteAddressResponse>} - Success response
|
|
234
234
|
* @name removeAddress
|
|
235
|
-
* @summary:
|
|
236
|
-
* @description:
|
|
235
|
+
* @summary: Delete address.
|
|
236
|
+
* @description: Removes a saved address from the user's profile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
|
|
237
237
|
*/
|
|
238
238
|
removeAddress({ id, requestHeaders }?: CartApplicationValidator.RemoveAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.DeleteAddressResponse>;
|
|
239
239
|
/**
|
|
@@ -242,8 +242,8 @@ declare class Cart {
|
|
|
242
242
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
243
243
|
* @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
|
|
244
244
|
* @name removeCoupon
|
|
245
|
-
* @summary: Remove
|
|
246
|
-
* @description:
|
|
245
|
+
* @summary: Remove coupon.
|
|
246
|
+
* @description: Removes an applied coupon from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeCoupon/).
|
|
247
247
|
*/
|
|
248
248
|
removeCoupon({ id, buyNow, requestHeaders }?: CartApplicationValidator.RemoveCouponParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
249
249
|
/**
|
|
@@ -252,8 +252,8 @@ declare class Cart {
|
|
|
252
252
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
253
253
|
* @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
|
|
254
254
|
* @name selectAddress
|
|
255
|
-
* @summary:
|
|
256
|
-
* @description:
|
|
255
|
+
* @summary: Choose delivery address.
|
|
256
|
+
* @description: Selects an address for the cart's delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/).
|
|
257
257
|
*/
|
|
258
258
|
selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: CartApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
259
259
|
/**
|
|
@@ -262,8 +262,8 @@ declare class Cart {
|
|
|
262
262
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
263
263
|
* @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
|
|
264
264
|
* @name selectPaymentMode
|
|
265
|
-
* @summary:
|
|
266
|
-
* @description:
|
|
265
|
+
* @summary: Pick payment method.
|
|
266
|
+
* @description: Chooses a payment mode for the checkout process. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/).
|
|
267
267
|
*/
|
|
268
268
|
selectPaymentMode({ body, id, buyNow, requestHeaders }?: CartApplicationValidator.SelectPaymentModeParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
|
|
269
269
|
/**
|
|
@@ -272,8 +272,8 @@ declare class Cart {
|
|
|
272
272
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
273
273
|
* @returns {Promise<CartApplicationModel.UpdateAddressResponse>} - Success response
|
|
274
274
|
* @name updateAddress
|
|
275
|
-
* @summary: Update address
|
|
276
|
-
* @description:
|
|
275
|
+
* @summary: Update address.
|
|
276
|
+
* @description: Modifies a saved address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
|
|
277
277
|
*/
|
|
278
278
|
updateAddress({ id, body, requestHeaders }?: CartApplicationValidator.UpdateAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.UpdateAddressResponse>;
|
|
279
279
|
/**
|
|
@@ -283,18 +283,18 @@ declare class Cart {
|
|
|
283
283
|
* @returns {Promise<CartApplicationModel.UpdateCartDetailResponse>} -
|
|
284
284
|
* Success response
|
|
285
285
|
* @name updateCart
|
|
286
|
-
* @summary: Update
|
|
287
|
-
* @description:
|
|
286
|
+
* @summary: Update cart.
|
|
287
|
+
* @description: Modifies items and quantities in the existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCart/).
|
|
288
288
|
*/
|
|
289
|
-
updateCart({ body, id, i, b, areaCode, buyNow, requestHeaders }?: CartApplicationValidator.UpdateCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.UpdateCartDetailResponse>;
|
|
289
|
+
updateCart({ body, id, i, b, areaCode, buyNow, cartType, requestHeaders }?: CartApplicationValidator.UpdateCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.UpdateCartDetailResponse>;
|
|
290
290
|
/**
|
|
291
291
|
* @param {CartApplicationValidator.UpdateCartMetaParam} arg - Arg object.
|
|
292
292
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
293
293
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
294
294
|
* @returns {Promise<CartApplicationModel.CartMetaResponse>} - Success response
|
|
295
295
|
* @name updateCartMeta
|
|
296
|
-
* @summary: Update
|
|
297
|
-
* @description:
|
|
296
|
+
* @summary: Update cart metadata.
|
|
297
|
+
* @description: Adds or modifies metadata for the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartMeta/).
|
|
298
298
|
*/
|
|
299
299
|
updateCartMeta({ body, id, buyNow, requestHeaders }?: CartApplicationValidator.UpdateCartMetaParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartMetaResponse>;
|
|
300
300
|
/**
|
|
@@ -303,8 +303,8 @@ declare class Cart {
|
|
|
303
303
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
304
304
|
* @returns {Promise<CartApplicationModel.SharedCartResponse>} - Success response
|
|
305
305
|
* @name updateCartWithSharedItems
|
|
306
|
-
* @summary:
|
|
307
|
-
* @description:
|
|
306
|
+
* @summary: Update with shared items.
|
|
307
|
+
* @description: Updates the cart with items from a shared link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
|
|
308
308
|
*/
|
|
309
309
|
updateCartWithSharedItems({ token, action, requestHeaders }?: CartApplicationValidator.UpdateCartWithSharedItemsParam, { responseHeaders }?: object): Promise<CartApplicationModel.SharedCartResponse>;
|
|
310
310
|
/**
|
|
@@ -313,10 +313,10 @@ declare class Cart {
|
|
|
313
313
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
314
314
|
* @returns {Promise<CartApplicationModel.PaymentCouponValidate>} - Success response
|
|
315
315
|
* @name validateCouponForPayment
|
|
316
|
-
* @summary:
|
|
317
|
-
* @description:
|
|
316
|
+
* @summary: Validate coupon.
|
|
317
|
+
* @description: Checks if a coupon is valid for the selected payment mode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/validateCouponForPayment/).
|
|
318
318
|
*/
|
|
319
|
-
validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, iin, network, type, cardId, requestHeaders, }?: CartApplicationValidator.ValidateCouponForPaymentParam, { responseHeaders }?: object): Promise<CartApplicationModel.PaymentCouponValidate>;
|
|
319
|
+
validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, iin, network, type, cardId, cartType, requestHeaders, }?: CartApplicationValidator.ValidateCouponForPaymentParam, { responseHeaders }?: object): Promise<CartApplicationModel.PaymentCouponValidate>;
|
|
320
320
|
}
|
|
321
321
|
import CartApplicationValidator = require("./CartApplicationValidator");
|
|
322
322
|
import CartApplicationModel = require("./CartApplicationModel");
|