@gofynd/fdk-client-javascript 3.16.3 → 3.17.1
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/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +40 -0
- package/sdk/application/Cart/CartApplicationClient.js +176 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +21 -1
- package/sdk/application/Content/ContentApplicationClient.js +93 -2
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
- package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
- package/sdk/application/Order/OrderApplicationClient.js +50 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +5 -4
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +74 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +637 -36
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +952 -5
- package/sdk/platform/Cart/CartPlatformModel.js +598 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +125 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +831 -41
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -16
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -85
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1025 -159
- package/sdk/platform/Catalog/CatalogPlatformModel.js +840 -165
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +8 -10
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -12
- package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
- package/sdk/platform/Common/CommonPlatformModel.js +14 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -462
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +7 -45
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +4 -55
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +10 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +27 -19
- package/sdk/platform/Order/OrderPlatformClient.js +176 -108
- package/sdk/platform/Order/OrderPlatformModel.d.ts +359 -45
- package/sdk/platform/Order/OrderPlatformModel.js +218 -44
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
- package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +376 -11
- package/sdk/platform/Payment/PaymentPlatformModel.js +243 -10
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +4 -4
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
- package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
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.17.1' --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
|
@@ -20,7 +20,6 @@ declare class ApplicationClient {
|
|
|
20
20
|
logistic: Logistic;
|
|
21
21
|
order: Order;
|
|
22
22
|
payment: Payment;
|
|
23
|
-
rewards: Rewards;
|
|
24
23
|
share: Share;
|
|
25
24
|
theme: Theme;
|
|
26
25
|
user: User;
|
|
@@ -78,7 +77,6 @@ import Lead = require("./Lead/LeadApplicationClient");
|
|
|
78
77
|
import Logistic = require("./Logistic/LogisticApplicationClient");
|
|
79
78
|
import Order = require("./Order/OrderApplicationClient");
|
|
80
79
|
import Payment = require("./Payment/PaymentApplicationClient");
|
|
81
|
-
import Rewards = require("./Rewards/RewardsApplicationClient");
|
|
82
80
|
import Share = require("./Share/ShareApplicationClient");
|
|
83
81
|
import Theme = require("./Theme/ThemeApplicationClient");
|
|
84
82
|
import User = require("./User/UserApplicationClient");
|
|
@@ -10,7 +10,6 @@ const Lead = require("./Lead/LeadApplicationClient");
|
|
|
10
10
|
const Logistic = require("./Logistic/LogisticApplicationClient");
|
|
11
11
|
const Order = require("./Order/OrderApplicationClient");
|
|
12
12
|
const Payment = require("./Payment/PaymentApplicationClient");
|
|
13
|
-
const Rewards = require("./Rewards/RewardsApplicationClient");
|
|
14
13
|
const Share = require("./Share/ShareApplicationClient");
|
|
15
14
|
const Theme = require("./Theme/ThemeApplicationClient");
|
|
16
15
|
const User = require("./User/UserApplicationClient");
|
|
@@ -47,7 +46,6 @@ class ApplicationClient {
|
|
|
47
46
|
this.logistic = new Logistic(this.config);
|
|
48
47
|
this.order = new Order(this.config);
|
|
49
48
|
this.payment = new Payment(this.config);
|
|
50
|
-
this.rewards = new Rewards(this.config);
|
|
51
49
|
this.share = new Share(this.config);
|
|
52
50
|
this.theme = new Theme(this.config);
|
|
53
51
|
this.user = new User(this.config);
|
|
@@ -7,6 +7,7 @@ declare class Cart {
|
|
|
7
7
|
addItems: string;
|
|
8
8
|
applyCoupon: string;
|
|
9
9
|
applyLoyaltyPoints: string;
|
|
10
|
+
applyOffer: string;
|
|
10
11
|
checkoutCart: string;
|
|
11
12
|
checkoutCartV2: string;
|
|
12
13
|
deleteCart: string;
|
|
@@ -20,11 +21,14 @@ declare class Cart {
|
|
|
20
21
|
getCoupons: string;
|
|
21
22
|
getItemCount: string;
|
|
22
23
|
getLadderOffers: string;
|
|
24
|
+
getOffers: string;
|
|
25
|
+
getProductsByOfferId: string;
|
|
23
26
|
getPromotionOffers: string;
|
|
24
27
|
getPromotionPaymentOffers: string;
|
|
25
28
|
getShipments: string;
|
|
26
29
|
removeAddress: string;
|
|
27
30
|
removeCoupon: string;
|
|
31
|
+
removeOffer: string;
|
|
28
32
|
selectAddress: string;
|
|
29
33
|
selectPaymentMode: string;
|
|
30
34
|
updateAddress: string;
|
|
@@ -72,6 +76,15 @@ declare class Cart {
|
|
|
72
76
|
* @description: Users can redeem their accumulated loyalty points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyLoyaltyPoints/).
|
|
73
77
|
*/
|
|
74
78
|
applyLoyaltyPoints({ body, xOrderingSource, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
|
|
79
|
+
/**
|
|
80
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
81
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
82
|
+
* @returns {Promise<OfferListItem>} - Success response
|
|
83
|
+
* @name applyOffer
|
|
84
|
+
* @summary: Apply offer to cart
|
|
85
|
+
* @description: Apply offer to the cart to trigger discounts on eligible items. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyOffer/).
|
|
86
|
+
*/
|
|
87
|
+
applyOffer({ id, body, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OfferListItem>;
|
|
75
88
|
/**
|
|
76
89
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
77
90
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -189,6 +202,24 @@ declare class Cart {
|
|
|
189
202
|
* @description: Get ladder offers associated for the items in the cart. Ladder offers provide discounts or special pricing based on item quantity, allowing users to benefit from bulk purchases or promotional deals. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/getLadderOffers/).
|
|
190
203
|
*/
|
|
191
204
|
getLadderOffers({ slug, storeId, promotionId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<LadderPriceOffers>;
|
|
205
|
+
/**
|
|
206
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
207
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
208
|
+
* @returns {Promise<GetOfferResult>} - Success response
|
|
209
|
+
* @name getOffers
|
|
210
|
+
* @summary: List available offers
|
|
211
|
+
* @description: List all offers available for the items in the cart, including details such as offer text, unique offer ID, validity period, etc. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/getOffers/).
|
|
212
|
+
*/
|
|
213
|
+
getOffers({ mode, id, buyNow, productSlug, storeId, type, productSize, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetOfferResult>;
|
|
214
|
+
/**
|
|
215
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
216
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
217
|
+
* @returns {Promise<EligibleProductsResult>} - Success response
|
|
218
|
+
* @name getProductsByOfferId
|
|
219
|
+
* @summary: List eligible offer products
|
|
220
|
+
* @description: List all products eligible for the given offer id. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/getProductsByOfferId/).
|
|
221
|
+
*/
|
|
222
|
+
getProductsByOfferId({ offerId, page, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<EligibleProductsResult>;
|
|
192
223
|
/**
|
|
193
224
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
194
225
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -234,6 +265,15 @@ declare class Cart {
|
|
|
234
265
|
* @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/removeCoupon/).
|
|
235
266
|
*/
|
|
236
267
|
removeCoupon({ xOrderingSource, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
|
|
268
|
+
/**
|
|
269
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
270
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
271
|
+
* @returns {Promise<OfferListItem>} - Success response
|
|
272
|
+
* @name removeOffer
|
|
273
|
+
* @summary: Remove offer from cart
|
|
274
|
+
* @description: Remove an applied offer from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/removeOffer/).
|
|
275
|
+
*/
|
|
276
|
+
removeOffer({ id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OfferListItem>;
|
|
237
277
|
/**
|
|
238
278
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
239
279
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -16,6 +16,7 @@ class Cart {
|
|
|
16
16
|
addItems: "/service/application/cart/v1.0/detail",
|
|
17
17
|
applyCoupon: "/service/application/cart/v1.0/coupon",
|
|
18
18
|
applyLoyaltyPoints: "/service/application/cart/v1.0/redeem",
|
|
19
|
+
applyOffer: "/service/application/cart/v1.0/offer",
|
|
19
20
|
checkoutCart: "/service/application/cart/v1.0/checkout",
|
|
20
21
|
checkoutCartV2: "/service/application/cart/v2.0/checkout",
|
|
21
22
|
deleteCart: "/service/application/cart/v1.0/cart_archive",
|
|
@@ -29,12 +30,16 @@ class Cart {
|
|
|
29
30
|
getCoupons: "/service/application/cart/v1.0/coupon",
|
|
30
31
|
getItemCount: "/service/application/cart/v1.0/basic",
|
|
31
32
|
getLadderOffers: "/service/application/cart/v1.0/available-ladder-prices",
|
|
33
|
+
getOffers: "/service/application/cart/v1.0/offer",
|
|
34
|
+
getProductsByOfferId:
|
|
35
|
+
"/service/application/cart/v1.0/eligible-offer-products",
|
|
32
36
|
getPromotionOffers: "/service/application/cart/v1.0/available-promotions",
|
|
33
37
|
getPromotionPaymentOffers:
|
|
34
38
|
"/service/application/cart/v1.0/available-payment-offers",
|
|
35
39
|
getShipments: "/service/application/cart/v1.0/shipment",
|
|
36
40
|
removeAddress: "/service/application/cart/v1.0/address/{id}",
|
|
37
41
|
removeCoupon: "/service/application/cart/v1.0/coupon",
|
|
42
|
+
removeOffer: "/service/application/cart/v1.0/offer",
|
|
38
43
|
selectAddress: "/service/application/cart/v1.0/select-address",
|
|
39
44
|
selectPaymentMode: "/service/application/cart/v1.0/payment",
|
|
40
45
|
updateAddress: "/service/application/cart/v1.0/address/{id}",
|
|
@@ -243,6 +248,45 @@ class Cart {
|
|
|
243
248
|
return response;
|
|
244
249
|
}
|
|
245
250
|
|
|
251
|
+
/**
|
|
252
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
253
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
254
|
+
* @returns {Promise<OfferListItem>} - Success response
|
|
255
|
+
* @name applyOffer
|
|
256
|
+
* @summary: Apply offer to cart
|
|
257
|
+
* @description: Apply offer to the cart to trigger discounts on eligible items. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyOffer/).
|
|
258
|
+
*/
|
|
259
|
+
async applyOffer(
|
|
260
|
+
{ id, body, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
261
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
262
|
+
) {
|
|
263
|
+
const query_params = {};
|
|
264
|
+
query_params["id"] = id;
|
|
265
|
+
query_params["buy_now"] = buyNow;
|
|
266
|
+
|
|
267
|
+
const xHeaders = {};
|
|
268
|
+
|
|
269
|
+
const response = await ApplicationAPIClient.execute(
|
|
270
|
+
this._conf,
|
|
271
|
+
"post",
|
|
272
|
+
constructUrl({
|
|
273
|
+
url: this._urls["applyOffer"],
|
|
274
|
+
params: {},
|
|
275
|
+
}),
|
|
276
|
+
query_params,
|
|
277
|
+
body,
|
|
278
|
+
{ ...xHeaders, ...requestHeaders },
|
|
279
|
+
{ responseHeaders }
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
let responseData = response;
|
|
283
|
+
if (responseHeaders) {
|
|
284
|
+
responseData = response[0];
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return response;
|
|
288
|
+
}
|
|
289
|
+
|
|
246
290
|
/**
|
|
247
291
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
248
292
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -821,6 +865,99 @@ class Cart {
|
|
|
821
865
|
return response;
|
|
822
866
|
}
|
|
823
867
|
|
|
868
|
+
/**
|
|
869
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
870
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
871
|
+
* @returns {Promise<GetOfferResult>} - Success response
|
|
872
|
+
* @name getOffers
|
|
873
|
+
* @summary: List available offers
|
|
874
|
+
* @description: List all offers available for the items in the cart, including details such as offer text, unique offer ID, validity period, etc. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/getOffers/).
|
|
875
|
+
*/
|
|
876
|
+
async getOffers(
|
|
877
|
+
{
|
|
878
|
+
mode,
|
|
879
|
+
id,
|
|
880
|
+
buyNow,
|
|
881
|
+
productSlug,
|
|
882
|
+
storeId,
|
|
883
|
+
type,
|
|
884
|
+
productSize,
|
|
885
|
+
requestHeaders,
|
|
886
|
+
} = { requestHeaders: {} },
|
|
887
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
888
|
+
) {
|
|
889
|
+
const query_params = {};
|
|
890
|
+
query_params["mode"] = mode;
|
|
891
|
+
query_params["id"] = id;
|
|
892
|
+
query_params["buy_now"] = buyNow;
|
|
893
|
+
query_params["product_slug"] = productSlug;
|
|
894
|
+
query_params["store_id"] = storeId;
|
|
895
|
+
query_params["type"] = type;
|
|
896
|
+
query_params["product_size"] = productSize;
|
|
897
|
+
|
|
898
|
+
const xHeaders = {};
|
|
899
|
+
|
|
900
|
+
const response = await ApplicationAPIClient.execute(
|
|
901
|
+
this._conf,
|
|
902
|
+
"get",
|
|
903
|
+
constructUrl({
|
|
904
|
+
url: this._urls["getOffers"],
|
|
905
|
+
params: {},
|
|
906
|
+
}),
|
|
907
|
+
query_params,
|
|
908
|
+
undefined,
|
|
909
|
+
{ ...xHeaders, ...requestHeaders },
|
|
910
|
+
{ responseHeaders }
|
|
911
|
+
);
|
|
912
|
+
|
|
913
|
+
let responseData = response;
|
|
914
|
+
if (responseHeaders) {
|
|
915
|
+
responseData = response[0];
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
return response;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
923
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
924
|
+
* @returns {Promise<EligibleProductsResult>} - Success response
|
|
925
|
+
* @name getProductsByOfferId
|
|
926
|
+
* @summary: List eligible offer products
|
|
927
|
+
* @description: List all products eligible for the given offer id. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/getProductsByOfferId/).
|
|
928
|
+
*/
|
|
929
|
+
async getProductsByOfferId(
|
|
930
|
+
{ offerId, page, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
931
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
932
|
+
) {
|
|
933
|
+
const query_params = {};
|
|
934
|
+
query_params["offer_id"] = offerId;
|
|
935
|
+
query_params["page"] = page;
|
|
936
|
+
query_params["page_size"] = pageSize;
|
|
937
|
+
|
|
938
|
+
const xHeaders = {};
|
|
939
|
+
|
|
940
|
+
const response = await ApplicationAPIClient.execute(
|
|
941
|
+
this._conf,
|
|
942
|
+
"get",
|
|
943
|
+
constructUrl({
|
|
944
|
+
url: this._urls["getProductsByOfferId"],
|
|
945
|
+
params: {},
|
|
946
|
+
}),
|
|
947
|
+
query_params,
|
|
948
|
+
undefined,
|
|
949
|
+
{ ...xHeaders, ...requestHeaders },
|
|
950
|
+
{ responseHeaders }
|
|
951
|
+
);
|
|
952
|
+
|
|
953
|
+
let responseData = response;
|
|
954
|
+
if (responseHeaders) {
|
|
955
|
+
responseData = response[0];
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
return response;
|
|
959
|
+
}
|
|
960
|
+
|
|
824
961
|
/**
|
|
825
962
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
826
963
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -1046,6 +1183,45 @@ class Cart {
|
|
|
1046
1183
|
return response;
|
|
1047
1184
|
}
|
|
1048
1185
|
|
|
1186
|
+
/**
|
|
1187
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1188
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1189
|
+
* @returns {Promise<OfferListItem>} - Success response
|
|
1190
|
+
* @name removeOffer
|
|
1191
|
+
* @summary: Remove offer from cart
|
|
1192
|
+
* @description: Remove an applied offer from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/removeOffer/).
|
|
1193
|
+
*/
|
|
1194
|
+
async removeOffer(
|
|
1195
|
+
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
1196
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1197
|
+
) {
|
|
1198
|
+
const query_params = {};
|
|
1199
|
+
query_params["id"] = id;
|
|
1200
|
+
query_params["buy_now"] = buyNow;
|
|
1201
|
+
|
|
1202
|
+
const xHeaders = {};
|
|
1203
|
+
|
|
1204
|
+
const response = await ApplicationAPIClient.execute(
|
|
1205
|
+
this._conf,
|
|
1206
|
+
"delete",
|
|
1207
|
+
constructUrl({
|
|
1208
|
+
url: this._urls["removeOffer"],
|
|
1209
|
+
params: {},
|
|
1210
|
+
}),
|
|
1211
|
+
query_params,
|
|
1212
|
+
undefined,
|
|
1213
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1214
|
+
{ responseHeaders }
|
|
1215
|
+
);
|
|
1216
|
+
|
|
1217
|
+
let responseData = response;
|
|
1218
|
+
if (responseHeaders) {
|
|
1219
|
+
responseData = response[0];
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
return response;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1049
1225
|
/**
|
|
1050
1226
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1051
1227
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -33,6 +33,7 @@ declare class Catalog {
|
|
|
33
33
|
getSearchResults: string;
|
|
34
34
|
getSimilarComparisonProductBySlug: string;
|
|
35
35
|
getStores: string;
|
|
36
|
+
listCountryCurrencyMappings: string;
|
|
36
37
|
unfollowById: string;
|
|
37
38
|
};
|
|
38
39
|
_urls: {};
|
|
@@ -129,8 +130,10 @@ declare class Catalog {
|
|
|
129
130
|
* @param {boolean} [arg.filters] - True for fetching all filter parameters
|
|
130
131
|
* and False for disabling the filter parameters.
|
|
131
132
|
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
132
|
-
* should be sorted
|
|
133
|
-
*
|
|
133
|
+
* should be sorted. Supported values include latest, popular, price_asc,
|
|
134
|
+
* price_dsc, discount_asc, discount_dsc. Custom sort keys configured via
|
|
135
|
+
* listing configuration (e.g., best_selling) are also supported for
|
|
136
|
+
* cohort-based sorting.
|
|
134
137
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
135
138
|
* @returns {Paginator<ProductListingResponseSchema>}
|
|
136
139
|
* @summary: Lists items of collection
|
|
@@ -436,8 +439,10 @@ declare class Catalog {
|
|
|
436
439
|
* @param {boolean} [arg.filters] - True for fetching all filter parameters
|
|
437
440
|
* and False for disabling the filter parameters.
|
|
438
441
|
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
439
|
-
* should be sorted
|
|
440
|
-
*
|
|
442
|
+
* should be sorted. Supported values include latest, popular, price_asc,
|
|
443
|
+
* price_dsc, discount_asc, discount_dsc. Custom sort keys configured via
|
|
444
|
+
* listing configuration (e.g., best_selling) are also supported for
|
|
445
|
+
* cohort-based sorting.
|
|
441
446
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
442
447
|
* @returns {Paginator<ProductListingResponseSchema>}
|
|
443
448
|
* @summary: List products
|
|
@@ -502,6 +507,15 @@ declare class Catalog {
|
|
|
502
507
|
longitude?: number;
|
|
503
508
|
tags?: string;
|
|
504
509
|
}): Paginator<StoreListingResponseSchema>;
|
|
510
|
+
/**
|
|
511
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
512
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
513
|
+
* @returns {Promise<AvailableCountrySchema>} - Success response
|
|
514
|
+
* @name listCountryCurrencyMappings
|
|
515
|
+
* @summary: List country to currency mapping
|
|
516
|
+
* @description: List all country-to-currencies mappings configured during the Price Factory setup for given application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/catalog/listCountryCurrencyMappings/).
|
|
517
|
+
*/
|
|
518
|
+
listCountryCurrencyMappings({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<AvailableCountrySchema>;
|
|
505
519
|
/**
|
|
506
520
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
507
521
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -62,6 +62,8 @@ class Catalog {
|
|
|
62
62
|
getSimilarComparisonProductBySlug:
|
|
63
63
|
"/service/application/catalog/v1.0/products/{slug}/similar/compare/",
|
|
64
64
|
getStores: "/service/application/catalog/v2.0/locations/",
|
|
65
|
+
listCountryCurrencyMappings:
|
|
66
|
+
"/service/application/catalog/v1.0/available-countries/",
|
|
65
67
|
unfollowById:
|
|
66
68
|
"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/",
|
|
67
69
|
};
|
|
@@ -457,8 +459,10 @@ class Catalog {
|
|
|
457
459
|
* @param {boolean} [arg.filters] - True for fetching all filter parameters
|
|
458
460
|
* and False for disabling the filter parameters.
|
|
459
461
|
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
460
|
-
* should be sorted
|
|
461
|
-
*
|
|
462
|
+
* should be sorted. Supported values include latest, popular, price_asc,
|
|
463
|
+
* price_dsc, discount_asc, discount_dsc. Custom sort keys configured via
|
|
464
|
+
* listing configuration (e.g., best_selling) are also supported for
|
|
465
|
+
* cohort-based sorting.
|
|
462
466
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
463
467
|
* @returns {Paginator<ProductListingResponseSchema>}
|
|
464
468
|
* @summary: Lists items of collection
|
|
@@ -1644,8 +1648,10 @@ class Catalog {
|
|
|
1644
1648
|
* @param {boolean} [arg.filters] - True for fetching all filter parameters
|
|
1645
1649
|
* and False for disabling the filter parameters.
|
|
1646
1650
|
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
1647
|
-
* should be sorted
|
|
1648
|
-
*
|
|
1651
|
+
* should be sorted. Supported values include latest, popular, price_asc,
|
|
1652
|
+
* price_dsc, discount_asc, discount_dsc. Custom sort keys configured via
|
|
1653
|
+
* listing configuration (e.g., best_selling) are also supported for
|
|
1654
|
+
* cohort-based sorting.
|
|
1649
1655
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1650
1656
|
* @returns {Paginator<ProductListingResponseSchema>}
|
|
1651
1657
|
* @summary: List products
|
|
@@ -1866,6 +1872,43 @@ class Catalog {
|
|
|
1866
1872
|
return paginator;
|
|
1867
1873
|
}
|
|
1868
1874
|
|
|
1875
|
+
/**
|
|
1876
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1877
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1878
|
+
* @returns {Promise<AvailableCountrySchema>} - Success response
|
|
1879
|
+
* @name listCountryCurrencyMappings
|
|
1880
|
+
* @summary: List country to currency mapping
|
|
1881
|
+
* @description: List all country-to-currencies mappings configured during the Price Factory setup for given application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/catalog/listCountryCurrencyMappings/).
|
|
1882
|
+
*/
|
|
1883
|
+
async listCountryCurrencyMappings(
|
|
1884
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1885
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1886
|
+
) {
|
|
1887
|
+
const query_params = {};
|
|
1888
|
+
|
|
1889
|
+
const xHeaders = {};
|
|
1890
|
+
|
|
1891
|
+
const response = await ApplicationAPIClient.execute(
|
|
1892
|
+
this._conf,
|
|
1893
|
+
"get",
|
|
1894
|
+
constructUrl({
|
|
1895
|
+
url: this._urls["listCountryCurrencyMappings"],
|
|
1896
|
+
params: {},
|
|
1897
|
+
}),
|
|
1898
|
+
query_params,
|
|
1899
|
+
undefined,
|
|
1900
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1901
|
+
{ responseHeaders }
|
|
1902
|
+
);
|
|
1903
|
+
|
|
1904
|
+
let responseData = response;
|
|
1905
|
+
if (responseHeaders) {
|
|
1906
|
+
responseData = response[0];
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
return response;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1869
1912
|
/**
|
|
1870
1913
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1871
1914
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -8,6 +8,7 @@ declare class Content {
|
|
|
8
8
|
getAnnouncements: string;
|
|
9
9
|
getBlog: string;
|
|
10
10
|
getBlogs: string;
|
|
11
|
+
getBulkCustomFieldsByResource: string;
|
|
11
12
|
getCustomFieldsByResourceId: string;
|
|
12
13
|
getCustomObjectBySlug: string;
|
|
13
14
|
getDataLoaders: string;
|
|
@@ -19,6 +20,7 @@ declare class Content {
|
|
|
19
20
|
getLandingPage: string;
|
|
20
21
|
getLegalInformation: string;
|
|
21
22
|
getNavigations: string;
|
|
23
|
+
getOrderTranslation: string;
|
|
22
24
|
getPage: string;
|
|
23
25
|
getPages: string;
|
|
24
26
|
getSEOConfiguration: string;
|
|
@@ -47,7 +49,7 @@ declare class Content {
|
|
|
47
49
|
* @summary: Post Resource Translations
|
|
48
50
|
* @description: Submit and retrieve translations for resources using payload data and locale settings. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/fetchResourceTranslationsWithPayload/).
|
|
49
51
|
*/
|
|
50
|
-
fetchResourceTranslationsWithPayload({ type, locale,
|
|
52
|
+
fetchResourceTranslationsWithPayload({ type, locale, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ResourceTranslations>;
|
|
51
53
|
/**
|
|
52
54
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
53
55
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -75,6 +77,15 @@ declare class Content {
|
|
|
75
77
|
* @description: List all the blogs against an application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getBlogs/).
|
|
76
78
|
*/
|
|
77
79
|
getBlogs({ pageNo, pageSize, tags, search, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<BlogGetDetails>;
|
|
80
|
+
/**
|
|
81
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
82
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
83
|
+
* @returns {Promise<BulkCustomFieldsResponseByResourceSchema>} - Success response
|
|
84
|
+
* @name getBulkCustomFieldsByResource
|
|
85
|
+
* @summary: Get bulk list of custom fields of given resource
|
|
86
|
+
* @description: Retrieves a bulk list of custom fields attached to a particular resource by using the resource and resource IDs. The resource_ids query parameter is required and can accept multiple comma-separated values. Optional filters for keys and namespaces can also be applied. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getBulkCustomFieldsByResource/).
|
|
87
|
+
*/
|
|
88
|
+
getBulkCustomFieldsByResource({ resource, resourceIds, keys, namespaces, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<BulkCustomFieldsResponseByResourceSchema>;
|
|
78
89
|
/**
|
|
79
90
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
80
91
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -174,6 +185,15 @@ declare class Content {
|
|
|
174
185
|
* @description: Get the navigation link items which can be powered to generate menus on application's website or equivalent mobile apps. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getNavigations/).
|
|
175
186
|
*/
|
|
176
187
|
getNavigations({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<NavigationGetDetails>;
|
|
188
|
+
/**
|
|
189
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
190
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
191
|
+
* @returns {Promise<TranslationResult>} - Success response
|
|
192
|
+
* @name getOrderTranslation
|
|
193
|
+
* @summary: Get Order Translations
|
|
194
|
+
* @description: Retrieves translated information for orders or shipments. This endpoint processes the order/shipment payload and returns the same structure with translated details including names, brands, categories, and other localized content. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getOrderTranslation/).
|
|
195
|
+
*/
|
|
196
|
+
getOrderTranslation({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<TranslationResult>;
|
|
177
197
|
/**
|
|
178
198
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
179
199
|
* @param {import("../ApplicationAPIClient").Options} - Options
|