@gofynd/fdk-client-javascript 3.17.0 → 3.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +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 +11 -1
- package/sdk/application/Content/ContentApplicationClient.js +40 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
- package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +72 -10
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +634 -33
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +951 -1
- package/sdk/platform/Cart/CartPlatformModel.js +597 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +123 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +829 -39
- 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 -5
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1023 -31
- package/sdk/platform/Catalog/CatalogPlatformModel.js +841 -26
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +7 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +7 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +3 -3
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -8
- package/sdk/platform/Content/ContentPlatformModel.js +11 -8
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +2 -2
- package/sdk/platform/Order/OrderPlatformModel.d.ts +20 -2
- package/sdk/platform/Order/OrderPlatformModel.js +9 -1
- 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 +356 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +229 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
- package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -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.17.
|
|
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.2' --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
|
@@ -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
|
|
@@ -20,6 +20,7 @@ declare class Content {
|
|
|
20
20
|
getLandingPage: string;
|
|
21
21
|
getLegalInformation: string;
|
|
22
22
|
getNavigations: string;
|
|
23
|
+
getOrderTranslation: string;
|
|
23
24
|
getPage: string;
|
|
24
25
|
getPages: string;
|
|
25
26
|
getSEOConfiguration: string;
|
|
@@ -48,7 +49,7 @@ declare class Content {
|
|
|
48
49
|
* @summary: Post Resource Translations
|
|
49
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/).
|
|
50
51
|
*/
|
|
51
|
-
fetchResourceTranslationsWithPayload({ type, locale,
|
|
52
|
+
fetchResourceTranslationsWithPayload({ type, locale, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ResourceTranslations>;
|
|
52
53
|
/**
|
|
53
54
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
54
55
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -184,6 +185,15 @@ declare class Content {
|
|
|
184
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/).
|
|
185
186
|
*/
|
|
186
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>;
|
|
187
197
|
/**
|
|
188
198
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
189
199
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -36,6 +36,8 @@ class Content {
|
|
|
36
36
|
getLandingPage: "/service/application/content/v1.0/landing-page",
|
|
37
37
|
getLegalInformation: "/service/application/content/v1.0/legal",
|
|
38
38
|
getNavigations: "/service/application/content/v1.0/navigations",
|
|
39
|
+
getOrderTranslation:
|
|
40
|
+
"/service/application/content/v1.0/resource/translations/orders",
|
|
39
41
|
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
40
42
|
getPages: "/service/application/content/v2.0/pages",
|
|
41
43
|
getSEOConfiguration: "/service/application/content/v1.0/seo",
|
|
@@ -118,7 +120,7 @@ class Content {
|
|
|
118
120
|
* @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/).
|
|
119
121
|
*/
|
|
120
122
|
async fetchResourceTranslationsWithPayload(
|
|
121
|
-
{ type, locale,
|
|
123
|
+
{ type, locale, body, requestHeaders } = { requestHeaders: {} },
|
|
122
124
|
{ responseHeaders } = { responseHeaders: false }
|
|
123
125
|
) {
|
|
124
126
|
const errors = validateRequiredParams(arguments[0], ["type", "locale"]);
|
|
@@ -131,7 +133,6 @@ class Content {
|
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
const query_params = {};
|
|
134
|
-
query_params["resource_id"] = resourceId;
|
|
135
136
|
|
|
136
137
|
const xHeaders = {};
|
|
137
138
|
|
|
@@ -793,6 +794,43 @@ class Content {
|
|
|
793
794
|
return response;
|
|
794
795
|
}
|
|
795
796
|
|
|
797
|
+
/**
|
|
798
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
799
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
800
|
+
* @returns {Promise<TranslationResult>} - Success response
|
|
801
|
+
* @name getOrderTranslation
|
|
802
|
+
* @summary: Get Order Translations
|
|
803
|
+
* @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/).
|
|
804
|
+
*/
|
|
805
|
+
async getOrderTranslation(
|
|
806
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
807
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
808
|
+
) {
|
|
809
|
+
const query_params = {};
|
|
810
|
+
|
|
811
|
+
const xHeaders = {};
|
|
812
|
+
|
|
813
|
+
const response = await ApplicationAPIClient.execute(
|
|
814
|
+
this._conf,
|
|
815
|
+
"post",
|
|
816
|
+
constructUrl({
|
|
817
|
+
url: this._urls["getOrderTranslation"],
|
|
818
|
+
params: {},
|
|
819
|
+
}),
|
|
820
|
+
query_params,
|
|
821
|
+
body,
|
|
822
|
+
{ ...xHeaders, ...requestHeaders },
|
|
823
|
+
{ responseHeaders }
|
|
824
|
+
);
|
|
825
|
+
|
|
826
|
+
let responseData = response;
|
|
827
|
+
if (responseHeaders) {
|
|
828
|
+
responseData = response[0];
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
return response;
|
|
832
|
+
}
|
|
833
|
+
|
|
796
834
|
/**
|
|
797
835
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
798
836
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -288,7 +288,7 @@ declare class Payment {
|
|
|
288
288
|
* @summary: Get payment modes
|
|
289
289
|
* @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getPaymentModeRoutes/).
|
|
290
290
|
*/
|
|
291
|
-
getPaymentModeRoutes({ amount, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PaymentModeRouteDetails>;
|
|
291
|
+
getPaymentModeRoutes({ amount, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, fulfillmentOption, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PaymentModeRouteDetails>;
|
|
292
292
|
/**
|
|
293
293
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
294
294
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -1084,6 +1084,7 @@ class Payment {
|
|
|
1084
1084
|
displaySplit,
|
|
1085
1085
|
advancePayment,
|
|
1086
1086
|
shipmentId,
|
|
1087
|
+
fulfillmentOption,
|
|
1087
1088
|
requestHeaders,
|
|
1088
1089
|
} = { requestHeaders: {} },
|
|
1089
1090
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -1099,6 +1100,7 @@ class Payment {
|
|
|
1099
1100
|
query_params["display_split"] = displaySplit;
|
|
1100
1101
|
query_params["advance_payment"] = advancePayment;
|
|
1101
1102
|
query_params["shipment_id"] = shipmentId;
|
|
1103
|
+
query_params["fulfillment_option"] = fulfillmentOption;
|
|
1102
1104
|
|
|
1103
1105
|
const xHeaders = {};
|
|
1104
1106
|
|
package/sdk/common/Constant.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export namespace AVAILABLE_PAGE_TYPE {
|
|
|
49
49
|
const LOCATE_US: string;
|
|
50
50
|
const SINGLE_PAGE_CHECKOUT: string;
|
|
51
51
|
const REQUEST_REATTEMPT: string;
|
|
52
|
+
const FILES: string;
|
|
52
53
|
}
|
|
53
54
|
export const NAVIGATORS: {
|
|
54
55
|
"about-us": {
|
|
@@ -315,4 +316,12 @@ export const NAVIGATORS: {
|
|
|
315
316
|
required: boolean;
|
|
316
317
|
}[];
|
|
317
318
|
};
|
|
319
|
+
files: {
|
|
320
|
+
name: string;
|
|
321
|
+
link: string;
|
|
322
|
+
params: {
|
|
323
|
+
key: string;
|
|
324
|
+
required: boolean;
|
|
325
|
+
}[];
|
|
326
|
+
};
|
|
318
327
|
};
|
package/sdk/common/Constant.js
CHANGED
|
@@ -49,6 +49,7 @@ const AVAILABLE_PAGE_TYPE = {
|
|
|
49
49
|
LOCATE_US: "locate-us",
|
|
50
50
|
SINGLE_PAGE_CHECKOUT: "single-page-checkout",
|
|
51
51
|
REQUEST_REATTEMPT: "request-reattempt",
|
|
52
|
+
FILES: "files",
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
Object.freeze(AVAILABLE_PAGE_TYPE);
|
|
@@ -350,6 +351,16 @@ const NAVIGATORS = {
|
|
|
350
351
|
},
|
|
351
352
|
],
|
|
352
353
|
},
|
|
354
|
+
files: {
|
|
355
|
+
name: "Files",
|
|
356
|
+
link: "/files/:file_name",
|
|
357
|
+
params: [
|
|
358
|
+
{
|
|
359
|
+
key: "file_name",
|
|
360
|
+
required: true,
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
},
|
|
353
364
|
};
|
|
354
365
|
|
|
355
366
|
module.exports = {
|
|
@@ -675,7 +675,8 @@ export = ThemePartnerModel;
|
|
|
675
675
|
* | "order-status"
|
|
676
676
|
* | "locate-us"
|
|
677
677
|
* | "single-page-checkout"
|
|
678
|
-
* | "request-reattempt"
|
|
678
|
+
* | "request-reattempt"
|
|
679
|
+
* | "files"} PageType
|
|
679
680
|
*/
|
|
680
681
|
declare class ThemePartnerModel {
|
|
681
682
|
}
|
|
@@ -1897,4 +1898,4 @@ type ActionPage = {
|
|
|
1897
1898
|
* @returns {PageType}
|
|
1898
1899
|
*/
|
|
1899
1900
|
declare function PageType(): PageType;
|
|
1900
|
-
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-email" | "profile-phone" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us" | "single-page-checkout" | "request-reattempt";
|
|
1901
|
+
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-email" | "profile-phone" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us" | "single-page-checkout" | "request-reattempt" | "files";
|
|
@@ -767,7 +767,8 @@ const Joi = require("joi");
|
|
|
767
767
|
* | "order-status"
|
|
768
768
|
* | "locate-us"
|
|
769
769
|
* | "single-page-checkout"
|
|
770
|
-
* | "request-reattempt"
|
|
770
|
+
* | "request-reattempt"
|
|
771
|
+
* | "files"} PageType
|
|
771
772
|
*/
|
|
772
773
|
|
|
773
774
|
class ThemePartnerModel {
|
|
@@ -1780,7 +1781,9 @@ class ThemePartnerModel {
|
|
|
1780
1781
|
|
|
1781
1782
|
"single-page-checkout",
|
|
1782
1783
|
|
|
1783
|
-
"request-reattempt"
|
|
1784
|
+
"request-reattempt",
|
|
1785
|
+
|
|
1786
|
+
"files"
|
|
1784
1787
|
);
|
|
1785
1788
|
}
|
|
1786
1789
|
}
|