@gofynd/fdk-client-javascript 1.4.15 → 1.4.16-beta.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 +16 -16
- package/sdk/application/Cart/CartApplicationClient.js +101 -48
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +159 -0
- package/sdk/application/Common/CommonApplicationClient.js +6 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +24 -0
- package/sdk/application/Content/ContentApplicationClient.d.ts +59 -7
- package/sdk/application/Content/ContentApplicationClient.js +290 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +24 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +6 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +42 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +69 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +117 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -11
- package/sdk/application/Payment/PaymentApplicationClient.js +15 -39
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +15 -0
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +42 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +36 -0
- package/sdk/application/User/UserApplicationClient.js +6 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +6 -0
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +12 -33
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +38 -209
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +19 -399
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +11 -212
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -3
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -22
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +12 -3
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +49 -28
- package/sdk/platform/Cart/CartPlatformModel.js +23 -13
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -176
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +33 -80
- package/sdk/platform/Catalog/CatalogPlatformModel.js +36 -72
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -45
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -35
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +132 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1104 -122
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +159 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +161 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +220 -5
- package/sdk/platform/Content/ContentPlatformModel.js +214 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +12 -2
- package/sdk/platform/Order/OrderPlatformClient.js +99 -8
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3 -75
- package/sdk/platform/Order/OrderPlatformModel.js +2 -43
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -23
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -95
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +78 -701
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +23 -598
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +20 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +3 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -110
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
- package/sdk/platform/Share/SharePlatformModel.js +4 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +28 -0
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +10 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -0
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
237
237
|
The above code will log the curl command in the console
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
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.
|
|
240
|
+
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.16-beta.2' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
241
241
|
Active Theme: Emerge
|
|
242
242
|
```
|
|
243
243
|
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ declare class Cart {
|
|
|
22
22
|
getLadderOffers: string;
|
|
23
23
|
getPromotionOffers: string;
|
|
24
24
|
getPromotionPaymentOffers: string;
|
|
25
|
+
getPromotions: string;
|
|
25
26
|
getShipments: string;
|
|
26
27
|
removeAddress: string;
|
|
27
28
|
removeCoupon: string;
|
|
@@ -29,7 +30,6 @@ declare class Cart {
|
|
|
29
30
|
selectPaymentMode: string;
|
|
30
31
|
updateAddress: string;
|
|
31
32
|
updateCart: string;
|
|
32
|
-
updateCartBreakup: string;
|
|
33
33
|
updateCartMeta: string;
|
|
34
34
|
updateCartWithSharedItems: string;
|
|
35
35
|
validateCouponForPayment: string;
|
|
@@ -107,7 +107,7 @@ declare class Cart {
|
|
|
107
107
|
* @summary: Get details for a single customer address
|
|
108
108
|
* @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
|
|
109
109
|
*/
|
|
110
|
-
getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<Address>;
|
|
110
|
+
getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<Address>;
|
|
111
111
|
/**
|
|
112
112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
113
113
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -161,7 +161,7 @@ declare class Cart {
|
|
|
161
161
|
* @summary: List shared cart items
|
|
162
162
|
* @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
|
|
163
163
|
*/
|
|
164
|
-
getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SharedCartResult>;
|
|
164
|
+
getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SharedCartResult>;
|
|
165
165
|
/**
|
|
166
166
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
167
167
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -197,7 +197,7 @@ declare class Cart {
|
|
|
197
197
|
* @summary: List available promotion offers
|
|
198
198
|
* @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/).
|
|
199
199
|
*/
|
|
200
|
-
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PromotionOffersResult>;
|
|
200
|
+
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, sortBy, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PromotionOffersResult>;
|
|
201
201
|
/**
|
|
202
202
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
203
203
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -207,6 +207,15 @@ declare class Cart {
|
|
|
207
207
|
* @description: Use this API to get top 5 payment offers available for current product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionPaymentOffers/).
|
|
208
208
|
*/
|
|
209
209
|
getPromotionPaymentOffers({ id, uid, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PromotionPaymentOffersResult>;
|
|
210
|
+
/**
|
|
211
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
212
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
213
|
+
* @returns {Promise<Promotions>} - Success response
|
|
214
|
+
* @name getPromotions
|
|
215
|
+
* @summary: List all available promotions of the sales channel
|
|
216
|
+
* @description: List all promotional offers available for the sales channel, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotions/).
|
|
217
|
+
*/
|
|
218
|
+
getPromotions({ pageSize, pageNo, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<Promotions>;
|
|
210
219
|
/**
|
|
211
220
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
212
221
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -224,7 +233,7 @@ declare class Cart {
|
|
|
224
233
|
* @summary: Removes an address from a customer's address list
|
|
225
234
|
* @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
|
|
226
235
|
*/
|
|
227
|
-
removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<DeleteAddressResult>;
|
|
236
|
+
removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<DeleteAddressResult>;
|
|
228
237
|
/**
|
|
229
238
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
230
239
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -260,7 +269,7 @@ declare class Cart {
|
|
|
260
269
|
* @summary: Updates an existing customer address
|
|
261
270
|
* @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
|
|
262
271
|
*/
|
|
263
|
-
updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateAddressResult>;
|
|
272
|
+
updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<UpdateAddressResult>;
|
|
264
273
|
/**
|
|
265
274
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
266
275
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -270,15 +279,6 @@ declare class Cart {
|
|
|
270
279
|
* @description: Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCart/).
|
|
271
280
|
*/
|
|
272
281
|
updateCart({ body, id, i, b, areaCode, buyNow, cartType, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
|
|
273
|
-
/**
|
|
274
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
275
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
276
|
-
* @returns {Promise<UpdateCartDetailResult>} - Success response
|
|
277
|
-
* @name updateCartBreakup
|
|
278
|
-
* @summary: Update store credits into cart and their items
|
|
279
|
-
* @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartBreakup/).
|
|
280
|
-
*/
|
|
281
|
-
updateCartBreakup({ body, id, i, b, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
|
|
282
282
|
/**
|
|
283
283
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
284
284
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -296,7 +296,7 @@ declare class Cart {
|
|
|
296
296
|
* @summary: Update with shared items
|
|
297
297
|
* @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
|
|
298
298
|
*/
|
|
299
|
-
updateCartWithSharedItems({ token, action, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SharedCartResult>;
|
|
299
|
+
updateCartWithSharedItems({ token, action, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SharedCartResult>;
|
|
300
300
|
/**
|
|
301
301
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
302
302
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
4
10
|
|
|
5
11
|
class Cart {
|
|
6
12
|
constructor(_conf) {
|
|
@@ -26,6 +32,7 @@ class Cart {
|
|
|
26
32
|
getPromotionOffers: "/service/application/cart/v1.0/available-promotions",
|
|
27
33
|
getPromotionPaymentOffers:
|
|
28
34
|
"/service/application/cart/v1.0/available-payment-offers",
|
|
35
|
+
getPromotions: "/service/application/cart/v1.0/promotion",
|
|
29
36
|
getShipments: "/service/application/cart/v1.0/shipment",
|
|
30
37
|
removeAddress: "/service/application/cart/v1.0/address/{id}",
|
|
31
38
|
removeCoupon: "/service/application/cart/v1.0/coupon",
|
|
@@ -33,7 +40,6 @@ class Cart {
|
|
|
33
40
|
selectPaymentMode: "/service/application/cart/v1.0/payment",
|
|
34
41
|
updateAddress: "/service/application/cart/v1.0/address/{id}",
|
|
35
42
|
updateCart: "/service/application/cart/v1.0/detail",
|
|
36
|
-
updateCartBreakup: "/service/application/cart/v1.0/detail",
|
|
37
43
|
updateCartMeta: "/service/application/cart/v1.0/meta",
|
|
38
44
|
updateCartWithSharedItems:
|
|
39
45
|
"/service/application/cart/v1.0/share-cart/{token}/{action}",
|
|
@@ -361,6 +367,15 @@ class Cart {
|
|
|
361
367
|
} = { requestHeaders: {} },
|
|
362
368
|
{ responseHeaders } = { responseHeaders: false }
|
|
363
369
|
) {
|
|
370
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
371
|
+
if (errors.length > 0) {
|
|
372
|
+
const error = new FDKClientValidationError({
|
|
373
|
+
message: "Missing required field",
|
|
374
|
+
details: errors,
|
|
375
|
+
});
|
|
376
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
377
|
+
}
|
|
378
|
+
|
|
364
379
|
const query_params = {};
|
|
365
380
|
query_params["cart_id"] = cartId;
|
|
366
381
|
query_params["buy_now"] = buyNow;
|
|
@@ -626,6 +641,15 @@ class Cart {
|
|
|
626
641
|
{ token, requestHeaders } = { requestHeaders: {} },
|
|
627
642
|
{ responseHeaders } = { responseHeaders: false }
|
|
628
643
|
) {
|
|
644
|
+
const errors = validateRequiredParams(arguments[0], ["token"]);
|
|
645
|
+
if (errors.length > 0) {
|
|
646
|
+
const error = new FDKClientValidationError({
|
|
647
|
+
message: "Missing required field",
|
|
648
|
+
details: errors,
|
|
649
|
+
});
|
|
650
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
651
|
+
}
|
|
652
|
+
|
|
629
653
|
const query_params = {};
|
|
630
654
|
|
|
631
655
|
const xHeaders = {};
|
|
@@ -783,9 +807,15 @@ class Cart {
|
|
|
783
807
|
* @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/).
|
|
784
808
|
*/
|
|
785
809
|
async getPromotionOffers(
|
|
786
|
-
{
|
|
787
|
-
|
|
788
|
-
|
|
810
|
+
{
|
|
811
|
+
slug,
|
|
812
|
+
pageSize,
|
|
813
|
+
promotionGroup,
|
|
814
|
+
storeId,
|
|
815
|
+
cartType,
|
|
816
|
+
sortBy,
|
|
817
|
+
requestHeaders,
|
|
818
|
+
} = { requestHeaders: {} },
|
|
789
819
|
{ responseHeaders } = { responseHeaders: false }
|
|
790
820
|
) {
|
|
791
821
|
const query_params = {};
|
|
@@ -794,6 +824,7 @@ class Cart {
|
|
|
794
824
|
query_params["promotion_group"] = promotionGroup;
|
|
795
825
|
query_params["store_id"] = storeId;
|
|
796
826
|
query_params["cart_type"] = cartType;
|
|
827
|
+
query_params["sort_by"] = sortBy;
|
|
797
828
|
|
|
798
829
|
const xHeaders = {};
|
|
799
830
|
|
|
@@ -857,6 +888,45 @@ class Cart {
|
|
|
857
888
|
return response;
|
|
858
889
|
}
|
|
859
890
|
|
|
891
|
+
/**
|
|
892
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
893
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
894
|
+
* @returns {Promise<Promotions>} - Success response
|
|
895
|
+
* @name getPromotions
|
|
896
|
+
* @summary: List all available promotions of the sales channel
|
|
897
|
+
* @description: List all promotional offers available for the sales channel, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotions/).
|
|
898
|
+
*/
|
|
899
|
+
async getPromotions(
|
|
900
|
+
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
901
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
902
|
+
) {
|
|
903
|
+
const query_params = {};
|
|
904
|
+
query_params["page_size"] = pageSize;
|
|
905
|
+
query_params["page_no"] = pageNo;
|
|
906
|
+
|
|
907
|
+
const xHeaders = {};
|
|
908
|
+
|
|
909
|
+
const response = await ApplicationAPIClient.execute(
|
|
910
|
+
this._conf,
|
|
911
|
+
"get",
|
|
912
|
+
constructUrl({
|
|
913
|
+
url: this._urls["getPromotions"],
|
|
914
|
+
params: {},
|
|
915
|
+
}),
|
|
916
|
+
query_params,
|
|
917
|
+
undefined,
|
|
918
|
+
{ ...xHeaders, ...requestHeaders },
|
|
919
|
+
{ responseHeaders }
|
|
920
|
+
);
|
|
921
|
+
|
|
922
|
+
let responseData = response;
|
|
923
|
+
if (responseHeaders) {
|
|
924
|
+
responseData = response[0];
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
return response;
|
|
928
|
+
}
|
|
929
|
+
|
|
860
930
|
/**
|
|
861
931
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
862
932
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -914,6 +984,15 @@ class Cart {
|
|
|
914
984
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
915
985
|
{ responseHeaders } = { responseHeaders: false }
|
|
916
986
|
) {
|
|
987
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
988
|
+
if (errors.length > 0) {
|
|
989
|
+
const error = new FDKClientValidationError({
|
|
990
|
+
message: "Missing required field",
|
|
991
|
+
details: errors,
|
|
992
|
+
});
|
|
993
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
994
|
+
}
|
|
995
|
+
|
|
917
996
|
const query_params = {};
|
|
918
997
|
|
|
919
998
|
const xHeaders = {};
|
|
@@ -1070,6 +1149,15 @@ class Cart {
|
|
|
1070
1149
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
1071
1150
|
{ responseHeaders } = { responseHeaders: false }
|
|
1072
1151
|
) {
|
|
1152
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
1153
|
+
if (errors.length > 0) {
|
|
1154
|
+
const error = new FDKClientValidationError({
|
|
1155
|
+
message: "Missing required field",
|
|
1156
|
+
details: errors,
|
|
1157
|
+
});
|
|
1158
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1073
1161
|
const query_params = {};
|
|
1074
1162
|
|
|
1075
1163
|
const xHeaders = {};
|
|
@@ -1149,50 +1237,6 @@ class Cart {
|
|
|
1149
1237
|
return response;
|
|
1150
1238
|
}
|
|
1151
1239
|
|
|
1152
|
-
/**
|
|
1153
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1154
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1155
|
-
* @returns {Promise<UpdateCartDetailResult>} - Success response
|
|
1156
|
-
* @name updateCartBreakup
|
|
1157
|
-
* @summary: Update store credits into cart and their items
|
|
1158
|
-
* @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartBreakup/).
|
|
1159
|
-
*/
|
|
1160
|
-
async updateCartBreakup(
|
|
1161
|
-
{ body, id, i, b, buyNow, cartType, requestHeaders } = {
|
|
1162
|
-
requestHeaders: {},
|
|
1163
|
-
},
|
|
1164
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1165
|
-
) {
|
|
1166
|
-
const query_params = {};
|
|
1167
|
-
query_params["id"] = id;
|
|
1168
|
-
query_params["i"] = i;
|
|
1169
|
-
query_params["b"] = b;
|
|
1170
|
-
query_params["buy_now"] = buyNow;
|
|
1171
|
-
query_params["cart_type"] = cartType;
|
|
1172
|
-
|
|
1173
|
-
const xHeaders = {};
|
|
1174
|
-
|
|
1175
|
-
const response = await ApplicationAPIClient.execute(
|
|
1176
|
-
this._conf,
|
|
1177
|
-
"patch",
|
|
1178
|
-
constructUrl({
|
|
1179
|
-
url: this._urls["updateCartBreakup"],
|
|
1180
|
-
params: {},
|
|
1181
|
-
}),
|
|
1182
|
-
query_params,
|
|
1183
|
-
body,
|
|
1184
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1185
|
-
{ responseHeaders }
|
|
1186
|
-
);
|
|
1187
|
-
|
|
1188
|
-
let responseData = response;
|
|
1189
|
-
if (responseHeaders) {
|
|
1190
|
-
responseData = response[0];
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
return response;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
1240
|
/**
|
|
1197
1241
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1198
1242
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -1244,6 +1288,15 @@ class Cart {
|
|
|
1244
1288
|
{ token, action, requestHeaders } = { requestHeaders: {} },
|
|
1245
1289
|
{ responseHeaders } = { responseHeaders: false }
|
|
1246
1290
|
) {
|
|
1291
|
+
const errors = validateRequiredParams(arguments[0], ["token", "action"]);
|
|
1292
|
+
if (errors.length > 0) {
|
|
1293
|
+
const error = new FDKClientValidationError({
|
|
1294
|
+
message: "Missing required field",
|
|
1295
|
+
details: errors,
|
|
1296
|
+
});
|
|
1297
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1247
1300
|
const query_params = {};
|
|
1248
1301
|
|
|
1249
1302
|
const xHeaders = {};
|
|
@@ -44,7 +44,7 @@ declare class Catalog {
|
|
|
44
44
|
* @summary: Create item, brand, product
|
|
45
45
|
* @description: Add a product, brand, or item to the user's followed list by collection Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/).
|
|
46
46
|
*/
|
|
47
|
-
followById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<FollowPostResponseSchema>;
|
|
47
|
+
followById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<FollowPostResponseSchema>;
|
|
48
48
|
/**
|
|
49
49
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
50
50
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -53,7 +53,7 @@ declare class Catalog {
|
|
|
53
53
|
* @summary: Get a brand
|
|
54
54
|
* @description: Get metadata of a brand such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrandDetailBySlug/).
|
|
55
55
|
*/
|
|
56
|
-
getBrandDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<BrandDetailResponseSchema>;
|
|
56
|
+
getBrandDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<BrandDetailResponseSchema>;
|
|
57
57
|
/**
|
|
58
58
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
59
59
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -95,7 +95,7 @@ declare class Catalog {
|
|
|
95
95
|
* @summary: Get category by slug
|
|
96
96
|
* @description: Get detailed information about a specific product category using its slug and get metadata of a category such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategoryDetailBySlug/).
|
|
97
97
|
*/
|
|
98
|
-
getCategoryDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CategoryMetaResponseSchema>;
|
|
98
|
+
getCategoryDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<CategoryMetaResponseSchema>;
|
|
99
99
|
/**
|
|
100
100
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
101
101
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -104,7 +104,7 @@ declare class Catalog {
|
|
|
104
104
|
* @summary: Get a collection
|
|
105
105
|
* @description: Get detailed information about a specific collection using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/).
|
|
106
106
|
*/
|
|
107
|
-
getCollectionDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CollectionDetailResponseSchema>;
|
|
107
|
+
getCollectionDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<CollectionDetailResponseSchema>;
|
|
108
108
|
/**
|
|
109
109
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
110
110
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -113,7 +113,7 @@ declare class Catalog {
|
|
|
113
113
|
* @summary: Lists items of collection
|
|
114
114
|
* @description: Fetch items within a particular collection identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/).
|
|
115
115
|
*/
|
|
116
|
-
getCollectionItemsBySlug({ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductListingResponseSchema>;
|
|
116
|
+
getCollectionItemsBySlug({ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductListingResponseSchema>;
|
|
117
117
|
/**
|
|
118
118
|
* @param {Object} arg - Arg object.
|
|
119
119
|
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
@@ -175,7 +175,7 @@ declare class Catalog {
|
|
|
175
175
|
* @summary: List frequent products
|
|
176
176
|
* @description: Get products that are often compared to the product specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/).
|
|
177
177
|
*/
|
|
178
|
-
getComparedFrequentlyProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductFrequentlyComparedSimilarResponseSchema>;
|
|
178
|
+
getComparedFrequentlyProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductFrequentlyComparedSimilarResponseSchema>;
|
|
179
179
|
/**
|
|
180
180
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
181
181
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -202,7 +202,7 @@ declare class Catalog {
|
|
|
202
202
|
* @summary: List followed products, brands
|
|
203
203
|
* @description: Get a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
|
|
204
204
|
*/
|
|
205
|
-
getFollowedListing({ collectionType, pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetFollowListingResponseSchema>;
|
|
205
|
+
getFollowedListing({ collectionType, pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetFollowListingResponseSchema>;
|
|
206
206
|
/**
|
|
207
207
|
* @param {Object} arg - Arg object.
|
|
208
208
|
* @param {string} arg.collectionType - Type of collection followed, i.e.
|
|
@@ -224,7 +224,7 @@ declare class Catalog {
|
|
|
224
224
|
* @summary: Get follower count
|
|
225
225
|
* @description: Get the total number of followers for a specific item by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/).
|
|
226
226
|
*/
|
|
227
|
-
getFollowerCountById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<FollowerCountResponseSchema>;
|
|
227
|
+
getFollowerCountById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<FollowerCountResponseSchema>;
|
|
228
228
|
/**
|
|
229
229
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
230
230
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -288,7 +288,7 @@ declare class Catalog {
|
|
|
288
288
|
* @summary: Get selling location
|
|
289
289
|
* @description: Get details about a store based on its location Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getLocationDetailsById/).
|
|
290
290
|
*/
|
|
291
|
-
getLocationDetailsById({ locationId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<StoreDetails>;
|
|
291
|
+
getLocationDetailsById({ locationId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<StoreDetails>;
|
|
292
292
|
/**
|
|
293
293
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
294
294
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -315,7 +315,7 @@ declare class Catalog {
|
|
|
315
315
|
* @summary: Get a product
|
|
316
316
|
* @description: Get product details such as price, attributes, HSN code, SKU code, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductDetailBySlug/).
|
|
317
317
|
*/
|
|
318
|
-
getProductDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductDetail>;
|
|
318
|
+
getProductDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductDetail>;
|
|
319
319
|
/**
|
|
320
320
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
321
321
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -324,7 +324,7 @@ declare class Catalog {
|
|
|
324
324
|
* @summary: Get product price
|
|
325
325
|
* @description: Get the price of a product size at all the selling locations near to a PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductPriceBySlug/).
|
|
326
326
|
*/
|
|
327
|
-
getProductPriceBySlug({ slug, size, storeId, moq, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductSizePriceResponseV3>;
|
|
327
|
+
getProductPriceBySlug({ slug, size, storeId, moq, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductSizePriceResponseV3>;
|
|
328
328
|
/**
|
|
329
329
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
330
330
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -333,7 +333,7 @@ declare class Catalog {
|
|
|
333
333
|
* @summary: List sellers
|
|
334
334
|
* @description: List all sellers offering a specific product identified by its slug and size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/).
|
|
335
335
|
*/
|
|
336
|
-
getProductSellersBySlug({ slug, size, strategy, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductSizeSellersResponseV3>;
|
|
336
|
+
getProductSellersBySlug({ slug, size, strategy, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductSizeSellersResponseV3>;
|
|
337
337
|
/**
|
|
338
338
|
* @param {Object} arg - Arg object.
|
|
339
339
|
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
@@ -363,7 +363,7 @@ declare class Catalog {
|
|
|
363
363
|
* @summary: List sizes
|
|
364
364
|
* @description: Provides detailed information about a product, including its availability (sellable), available sizes with quantities, dimensions, weight, availability status, price details (marked, effective, selling), minimum order quantity (MOQ). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSizesBySlug/).
|
|
365
365
|
*/
|
|
366
|
-
getProductSizesBySlug({ slug, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductSizes>;
|
|
366
|
+
getProductSizesBySlug({ slug, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductSizes>;
|
|
367
367
|
/**
|
|
368
368
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
369
369
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -402,7 +402,7 @@ declare class Catalog {
|
|
|
402
402
|
* @summary: List product variants
|
|
403
403
|
* @description: Get all available variants of a specific product identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/).
|
|
404
404
|
*/
|
|
405
|
-
getProductVariantsBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductVariantsResponseSchema>;
|
|
405
|
+
getProductVariantsBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductVariantsResponseSchema>;
|
|
406
406
|
/**
|
|
407
407
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
408
408
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -454,7 +454,7 @@ declare class Catalog {
|
|
|
454
454
|
* @summary: List similar products
|
|
455
455
|
* @description: Get all products within the same category as the one specified by the provided slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/).
|
|
456
456
|
*/
|
|
457
|
-
getSimilarComparisonProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ProductCompareResponseSchema>;
|
|
457
|
+
getSimilarComparisonProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ProductCompareResponseSchema>;
|
|
458
458
|
/**
|
|
459
459
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
460
460
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -497,6 +497,6 @@ declare class Catalog {
|
|
|
497
497
|
* @summary: Delete item, brand, product
|
|
498
498
|
* @description: Remove a followed item, brand, or product using its collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/).
|
|
499
499
|
*/
|
|
500
|
-
unfollowById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<FollowPostResponseSchema>;
|
|
500
|
+
unfollowById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<FollowPostResponseSchema>;
|
|
501
501
|
}
|
|
502
502
|
import Paginator = require("../../common/Paginator");
|