@gofynd/fdk-client-javascript 1.4.5 → 1.4.7
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 +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -2
- package/sdk/application/ApplicationClient.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +5 -5
- package/sdk/application/Catalog/CatalogApplicationClient.js +5 -5
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +6 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +6 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +2 -0
- package/sdk/application/Content/ContentApplicationModel.js +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +1 -1
- package/sdk/application/Order/OrderApplicationModel.d.ts +70 -9
- package/sdk/application/Order/OrderApplicationModel.js +43 -7
- package/sdk/application/Order/OrderApplicationValidator.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationValidator.js +1 -1
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +18 -18
- package/sdk/application/Payment/PaymentApplicationModel.js +41 -35
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +22 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +115 -0
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +37 -0
- package/sdk/application/Webhook/WebhookApplicationModel.js +46 -0
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +16 -0
- package/sdk/application/Webhook/WebhookApplicationValidator.js +19 -0
- package/sdk/application/index.d.ts +1 -1
- package/sdk/application/index.js +2 -2
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
- package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +23 -19
- package/sdk/partner/Webhook/WebhookPartnerModel.js +20 -23
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +43 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +257 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +39 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +45 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +60 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +57 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +80 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +2 -0
- package/sdk/platform/Cart/CartPlatformModel.js +2 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +34 -7
- package/sdk/platform/Catalog/CatalogPlatformClient.js +88 -13
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +120 -17
- package/sdk/platform/Catalog/CatalogPlatformModel.js +153 -27
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +71 -7
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +32 -5
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2 -0
- package/sdk/platform/Content/ContentPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformClient.js +82 -5
- package/sdk/platform/Order/OrderPlatformModel.d.ts +163 -15
- package/sdk/platform/Order/OrderPlatformModel.js +157 -55
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +24 -18
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
- package/sdk/platform/PlatformApplicationClient.js +4 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.js +164 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +71 -18
- package/sdk/platform/Webhook/WebhookPlatformModel.js +76 -23
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +19 -1
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +24 -0
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +2 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +3 -1
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +0 -323
- package/sdk/application/PosCart/PosCartApplicationClient.js +0 -2364
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +0 -1857
- package/sdk/application/PosCart/PosCartApplicationModel.js +0 -1906
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +0 -483
- package/sdk/application/PosCart/PosCartApplicationValidator.js +0 -492
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export = AnalyticsPlatformModel;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef Page
|
|
4
|
+
* @property {number} [item_total]
|
|
5
|
+
* @property {string} [next_id]
|
|
6
|
+
* @property {boolean} [has_previous]
|
|
7
|
+
* @property {boolean} [has_next]
|
|
8
|
+
* @property {number} [current]
|
|
9
|
+
* @property {string} type
|
|
10
|
+
* @property {number} [size]
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @typedef FileDownloadRequestBody
|
|
14
|
+
* @property {string} query - Base64 encoded query to execute on clickhouse.
|
|
15
|
+
* @property {boolean} [split_files] - Flag to indicate whether to split files
|
|
16
|
+
* for larger data.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* @typedef JobExecute
|
|
20
|
+
* @property {string} query - Base64 encoded query to execute on clickhouse.
|
|
21
|
+
* @property {Page} [page]
|
|
22
|
+
*/
|
|
23
|
+
declare class AnalyticsPlatformModel {
|
|
24
|
+
}
|
|
25
|
+
declare namespace AnalyticsPlatformModel {
|
|
26
|
+
export { Page, FileDownloadRequestBody, JobExecute };
|
|
27
|
+
}
|
|
28
|
+
/** @returns {Page} */
|
|
29
|
+
declare function Page(): Page;
|
|
30
|
+
type Page = {
|
|
31
|
+
item_total?: number;
|
|
32
|
+
next_id?: string;
|
|
33
|
+
has_previous?: boolean;
|
|
34
|
+
has_next?: boolean;
|
|
35
|
+
current?: number;
|
|
36
|
+
type: string;
|
|
37
|
+
size?: number;
|
|
38
|
+
};
|
|
39
|
+
/** @returns {FileDownloadRequestBody} */
|
|
40
|
+
declare function FileDownloadRequestBody(): FileDownloadRequestBody;
|
|
41
|
+
type FileDownloadRequestBody = {
|
|
42
|
+
/**
|
|
43
|
+
* - Base64 encoded query to execute on clickhouse.
|
|
44
|
+
*/
|
|
45
|
+
query: string;
|
|
46
|
+
/**
|
|
47
|
+
* - Flag to indicate whether to split files
|
|
48
|
+
* for larger data.
|
|
49
|
+
*/
|
|
50
|
+
split_files?: boolean;
|
|
51
|
+
};
|
|
52
|
+
/** @returns {JobExecute} */
|
|
53
|
+
declare function JobExecute(): JobExecute;
|
|
54
|
+
type JobExecute = {
|
|
55
|
+
/**
|
|
56
|
+
* - Base64 encoded query to execute on clickhouse.
|
|
57
|
+
*/
|
|
58
|
+
query: string;
|
|
59
|
+
page?: Page;
|
|
60
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef Page
|
|
5
|
+
* @property {number} [item_total]
|
|
6
|
+
* @property {string} [next_id]
|
|
7
|
+
* @property {boolean} [has_previous]
|
|
8
|
+
* @property {boolean} [has_next]
|
|
9
|
+
* @property {number} [current]
|
|
10
|
+
* @property {string} type
|
|
11
|
+
* @property {number} [size]
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef FileDownloadRequestBody
|
|
16
|
+
* @property {string} query - Base64 encoded query to execute on clickhouse.
|
|
17
|
+
* @property {boolean} [split_files] - Flag to indicate whether to split files
|
|
18
|
+
* for larger data.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef JobExecute
|
|
23
|
+
* @property {string} query - Base64 encoded query to execute on clickhouse.
|
|
24
|
+
* @property {Page} [page]
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
class AnalyticsPlatformModel {
|
|
28
|
+
/** @returns {Page} */
|
|
29
|
+
static Page() {
|
|
30
|
+
return Joi.object({
|
|
31
|
+
item_total: Joi.number(),
|
|
32
|
+
next_id: Joi.string().allow(""),
|
|
33
|
+
has_previous: Joi.boolean(),
|
|
34
|
+
has_next: Joi.boolean(),
|
|
35
|
+
current: Joi.number(),
|
|
36
|
+
type: Joi.string().allow("").required(),
|
|
37
|
+
size: Joi.number(),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** @returns {FileDownloadRequestBody} */
|
|
42
|
+
static FileDownloadRequestBody() {
|
|
43
|
+
return Joi.object({
|
|
44
|
+
query: Joi.string().allow("").required(),
|
|
45
|
+
split_files: Joi.boolean(),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** @returns {JobExecute} */
|
|
50
|
+
static JobExecute() {
|
|
51
|
+
return Joi.object({
|
|
52
|
+
query: Joi.string().allow("").required(),
|
|
53
|
+
page: AnalyticsPlatformModel.Page(),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
module.exports = AnalyticsPlatformModel;
|
|
@@ -288,6 +288,16 @@ declare class Cart {
|
|
|
288
288
|
* @description: Retrieve the total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getItemCount/).
|
|
289
289
|
*/
|
|
290
290
|
getItemCount({ id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetItemCountParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartItemCountResponse>;
|
|
291
|
+
/**
|
|
292
|
+
* @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object
|
|
293
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
294
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
295
|
+
* @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
|
|
296
|
+
* @name getPriceAdjustments
|
|
297
|
+
* @summary: Get a list of all price adjustments associated with a cart
|
|
298
|
+
* @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/).
|
|
299
|
+
*/
|
|
300
|
+
getPriceAdjustments({ cartId, requestHeaders }?: CartPlatformApplicationValidator.GetPriceAdjustmentsParam, { responseHeaders }?: object): Promise<CartPlatformModel.PriceAdjustmentResponse>;
|
|
291
301
|
/**
|
|
292
302
|
* @param {CartPlatformApplicationValidator.GetPromosCouponConfigParam} arg
|
|
293
303
|
* - Arg object
|
|
@@ -2321,6 +2321,86 @@ class Cart {
|
|
|
2321
2321
|
return response;
|
|
2322
2322
|
}
|
|
2323
2323
|
|
|
2324
|
+
/**
|
|
2325
|
+
* @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object
|
|
2326
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2327
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2328
|
+
* @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
|
|
2329
|
+
* @name getPriceAdjustments
|
|
2330
|
+
* @summary: Get a list of all price adjustments associated with a cart
|
|
2331
|
+
* @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/).
|
|
2332
|
+
*/
|
|
2333
|
+
async getPriceAdjustments(
|
|
2334
|
+
{ cartId, requestHeaders } = { requestHeaders: {} },
|
|
2335
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2336
|
+
) {
|
|
2337
|
+
const {
|
|
2338
|
+
error,
|
|
2339
|
+
} = CartPlatformApplicationValidator.getPriceAdjustments().validate(
|
|
2340
|
+
{
|
|
2341
|
+
cartId,
|
|
2342
|
+
},
|
|
2343
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2344
|
+
);
|
|
2345
|
+
if (error) {
|
|
2346
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2350
|
+
const {
|
|
2351
|
+
error: warrning,
|
|
2352
|
+
} = CartPlatformApplicationValidator.getPriceAdjustments().validate(
|
|
2353
|
+
{
|
|
2354
|
+
cartId,
|
|
2355
|
+
},
|
|
2356
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2357
|
+
);
|
|
2358
|
+
if (warrning) {
|
|
2359
|
+
Logger({
|
|
2360
|
+
level: "WARN",
|
|
2361
|
+
message: `Parameter Validation warrnings for platform > Cart > getPriceAdjustments \n ${warrning}`,
|
|
2362
|
+
});
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
const query_params = {};
|
|
2366
|
+
query_params["cart_id"] = cartId;
|
|
2367
|
+
|
|
2368
|
+
const response = await PlatformAPIClient.execute(
|
|
2369
|
+
this.config,
|
|
2370
|
+
"get",
|
|
2371
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment`,
|
|
2372
|
+
query_params,
|
|
2373
|
+
undefined,
|
|
2374
|
+
requestHeaders,
|
|
2375
|
+
{ responseHeaders }
|
|
2376
|
+
);
|
|
2377
|
+
|
|
2378
|
+
let responseData = response;
|
|
2379
|
+
if (responseHeaders) {
|
|
2380
|
+
responseData = response[0];
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
const {
|
|
2384
|
+
error: res_error,
|
|
2385
|
+
} = CartPlatformModel.PriceAdjustmentResponse().validate(responseData, {
|
|
2386
|
+
abortEarly: false,
|
|
2387
|
+
allowUnknown: true,
|
|
2388
|
+
});
|
|
2389
|
+
|
|
2390
|
+
if (res_error) {
|
|
2391
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2392
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2393
|
+
} else {
|
|
2394
|
+
Logger({
|
|
2395
|
+
level: "WARN",
|
|
2396
|
+
message: `Response Validation Warnings for platform > Cart > getPriceAdjustments \n ${res_error}`,
|
|
2397
|
+
});
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
return response;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2324
2404
|
/**
|
|
2325
2405
|
* @param {CartPlatformApplicationValidator.GetPromosCouponConfigParam} arg
|
|
2326
2406
|
* - Arg object
|
|
@@ -153,6 +153,10 @@ export = CartPlatformApplicationValidator;
|
|
|
153
153
|
* @property {string} [id] - The unique identifier of the cart.
|
|
154
154
|
* @property {boolean} [buyNow] - Boolean value to get buy_now cart.
|
|
155
155
|
*/
|
|
156
|
+
/**
|
|
157
|
+
* @typedef GetPriceAdjustmentsParam
|
|
158
|
+
* @property {string} cartId - Cart Id
|
|
159
|
+
*/
|
|
156
160
|
/**
|
|
157
161
|
* @typedef GetPromosCouponConfigParam
|
|
158
162
|
* @property {string} [entityType] - Entity_type as promotion or coupon
|
|
@@ -410,6 +414,8 @@ declare class CartPlatformApplicationValidator {
|
|
|
410
414
|
static getCoupons(): GetCouponsParam;
|
|
411
415
|
/** @returns {GetItemCountParam} */
|
|
412
416
|
static getItemCount(): GetItemCountParam;
|
|
417
|
+
/** @returns {GetPriceAdjustmentsParam} */
|
|
418
|
+
static getPriceAdjustments(): GetPriceAdjustmentsParam;
|
|
413
419
|
/** @returns {GetPromosCouponConfigParam} */
|
|
414
420
|
static getPromosCouponConfig(): GetPromosCouponConfigParam;
|
|
415
421
|
/** @returns {GetPromotionByIdParam} */
|
|
@@ -472,7 +478,7 @@ declare class CartPlatformApplicationValidator {
|
|
|
472
478
|
static validateCouponForPayment(): ValidateCouponForPaymentParam;
|
|
473
479
|
}
|
|
474
480
|
declare namespace CartPlatformApplicationValidator {
|
|
475
|
-
export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
|
|
481
|
+
export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
|
|
476
482
|
}
|
|
477
483
|
type AddAddressParam = {
|
|
478
484
|
body: CartPlatformModel.PlatformAddress;
|
|
@@ -634,6 +640,12 @@ type GetItemCountParam = {
|
|
|
634
640
|
*/
|
|
635
641
|
buyNow?: boolean;
|
|
636
642
|
};
|
|
643
|
+
type GetPriceAdjustmentsParam = {
|
|
644
|
+
/**
|
|
645
|
+
* - Cart Id
|
|
646
|
+
*/
|
|
647
|
+
cartId: string;
|
|
648
|
+
};
|
|
637
649
|
type GetPromosCouponConfigParam = {
|
|
638
650
|
/**
|
|
639
651
|
* - Entity_type as promotion or coupon
|
|
@@ -183,6 +183,11 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
183
183
|
* @property {boolean} [buyNow] - Boolean value to get buy_now cart.
|
|
184
184
|
*/
|
|
185
185
|
|
|
186
|
+
/**
|
|
187
|
+
* @typedef GetPriceAdjustmentsParam
|
|
188
|
+
* @property {string} cartId - Cart Id
|
|
189
|
+
*/
|
|
190
|
+
|
|
186
191
|
/**
|
|
187
192
|
* @typedef GetPromosCouponConfigParam
|
|
188
193
|
* @property {string} [entityType] - Entity_type as promotion or coupon
|
|
@@ -650,6 +655,13 @@ class CartPlatformApplicationValidator {
|
|
|
650
655
|
}).required();
|
|
651
656
|
}
|
|
652
657
|
|
|
658
|
+
/** @returns {GetPriceAdjustmentsParam} */
|
|
659
|
+
static getPriceAdjustments() {
|
|
660
|
+
return Joi.object({
|
|
661
|
+
cartId: Joi.string().allow("").required(),
|
|
662
|
+
}).required();
|
|
663
|
+
}
|
|
664
|
+
|
|
653
665
|
/** @returns {GetPromosCouponConfigParam} */
|
|
654
666
|
static getPromosCouponConfig() {
|
|
655
667
|
return Joi.object({
|
|
@@ -1204,6 +1204,7 @@ export = CartPlatformModel;
|
|
|
1204
1204
|
* @property {string} currency_code
|
|
1205
1205
|
* @property {string} aggregator
|
|
1206
1206
|
* @property {string} order_type
|
|
1207
|
+
* @property {string} [callback_url]
|
|
1207
1208
|
* @property {OverrideCartItem[]} cart_items
|
|
1208
1209
|
* @property {number} [ordering_store]
|
|
1209
1210
|
* @property {Object} [shipping_address]
|
|
@@ -3420,6 +3421,7 @@ type OverrideCheckoutReq = {
|
|
|
3420
3421
|
currency_code: string;
|
|
3421
3422
|
aggregator: string;
|
|
3422
3423
|
order_type: string;
|
|
3424
|
+
callback_url?: string;
|
|
3423
3425
|
cart_items: OverrideCartItem[];
|
|
3424
3426
|
ordering_store?: number;
|
|
3425
3427
|
shipping_address?: any;
|
|
@@ -1333,6 +1333,7 @@ const Joi = require("joi");
|
|
|
1333
1333
|
* @property {string} currency_code
|
|
1334
1334
|
* @property {string} aggregator
|
|
1335
1335
|
* @property {string} order_type
|
|
1336
|
+
* @property {string} [callback_url]
|
|
1336
1337
|
* @property {OverrideCartItem[]} cart_items
|
|
1337
1338
|
* @property {number} [ordering_store]
|
|
1338
1339
|
* @property {Object} [shipping_address]
|
|
@@ -3501,6 +3502,7 @@ class CartPlatformModel {
|
|
|
3501
3502
|
currency_code: Joi.string().allow("").required(),
|
|
3502
3503
|
aggregator: Joi.string().allow("").required(),
|
|
3503
3504
|
order_type: Joi.string().allow("").required(),
|
|
3505
|
+
callback_url: Joi.string().allow(""),
|
|
3504
3506
|
cart_items: Joi.array()
|
|
3505
3507
|
.items(CartPlatformModel.OverrideCartItem())
|
|
3506
3508
|
.required(),
|
|
@@ -107,12 +107,14 @@ declare class Catalog {
|
|
|
107
107
|
* @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object
|
|
108
108
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
109
109
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
110
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
110
|
+
* @returns {Promise<CatalogPlatformModel.CreateMarketplaceOptinResponse>}
|
|
111
|
+
* - Success response
|
|
112
|
+
*
|
|
111
113
|
* @name createMarketplaceOptin
|
|
112
114
|
* @summary: Create or Update opt-in infomation
|
|
113
|
-
* @description: Allows to create
|
|
115
|
+
* @description: Allows to create opt-in information for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createMarketplaceOptin/).
|
|
114
116
|
*/
|
|
115
|
-
createMarketplaceOptin({
|
|
117
|
+
createMarketplaceOptin({ marketplaceSlug, body, requestHeaders }?: CatalogPlatformValidator.CreateMarketplaceOptinParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.CreateMarketplaceOptinResponse>;
|
|
116
118
|
/**
|
|
117
119
|
* @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object
|
|
118
120
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -363,7 +365,7 @@ declare class Catalog {
|
|
|
363
365
|
* @summary: List Inventory
|
|
364
366
|
* @description: Allows to get Inventories data for particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventories/).
|
|
365
367
|
*/
|
|
366
|
-
getInventories({ itemId, size, pageNo, pageSize, q, sellable, storeIds, sizeIdentifier, requestHeaders, }?: CatalogPlatformValidator.GetInventoriesParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetInventoriesResponse>;
|
|
368
|
+
getInventories({ itemId, size, pageNo, pageSize, pageId, pageType, q, sellable, storeIds, brandIds, sellerIdentifiers, qtyGt, qtyLt, qtyType, fromDate, toDate, sizeIdentifier, requestHeaders, }?: CatalogPlatformValidator.GetInventoriesParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetInventoriesResponse>;
|
|
367
369
|
/**
|
|
368
370
|
* @param {Object} arg - Arg object.
|
|
369
371
|
* @param {string} [arg.itemId] - Item code of the product of which size is to be get.
|
|
@@ -373,19 +375,42 @@ declare class Catalog {
|
|
|
373
375
|
* @param {string} [arg.q] - Search with help of store code.
|
|
374
376
|
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
375
377
|
* @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
|
|
378
|
+
* @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
|
|
379
|
+
* @param {string[]} [arg.sellerIdentifiers] - The Seller Identifier or
|
|
380
|
+
* Primary Identifier of the inventory.
|
|
381
|
+
* @param {number} [arg.qtyGt] - This field allows you to filter for
|
|
382
|
+
* inventories that have quantity greater than to the specified value
|
|
383
|
+
* based on qty_type filter.
|
|
384
|
+
* @param {number} [arg.qtyLt] - This field allows you to filter for
|
|
385
|
+
* inventories that have a quantity less than to the specified value based
|
|
386
|
+
* on qty_type filter.
|
|
387
|
+
* @param {string} [arg.qtyType] - This field provides flexibility in
|
|
388
|
+
* selecting filter for inventory quantity counts and date queries. For
|
|
389
|
+
* example, you might use this field to specify "total" or "sellable" quantity.
|
|
390
|
+
* @param {string} [arg.fromDate] - Inventory updated on filter to get
|
|
391
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
392
|
+
* @param {string} [arg.toDate] - Inventory updated on filter to get
|
|
393
|
+
* inventories less then or equal to provided date based on qty_type value.
|
|
376
394
|
* @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
|
|
377
395
|
* or Primary Identifier) of which inventory is to get.
|
|
378
396
|
* @returns {Paginator<CatalogPlatformModel.GetInventoriesResponse>}
|
|
379
397
|
* @summary: List Inventory
|
|
380
398
|
* @description: Allows to get Inventories data for particular company.
|
|
381
399
|
*/
|
|
382
|
-
getInventoriesPaginator({ itemId, size, pageSize, q, sellable, storeIds, sizeIdentifier, }?: {
|
|
400
|
+
getInventoriesPaginator({ itemId, size, pageSize, q, sellable, storeIds, brandIds, sellerIdentifiers, qtyGt, qtyLt, qtyType, fromDate, toDate, sizeIdentifier, }?: {
|
|
383
401
|
itemId?: string;
|
|
384
402
|
size?: string;
|
|
385
403
|
pageSize?: number;
|
|
386
404
|
q?: string;
|
|
387
405
|
sellable?: boolean;
|
|
388
406
|
storeIds?: number[];
|
|
407
|
+
brandIds?: number[];
|
|
408
|
+
sellerIdentifiers?: string[];
|
|
409
|
+
qtyGt?: number;
|
|
410
|
+
qtyLt?: number;
|
|
411
|
+
qtyType?: string;
|
|
412
|
+
fromDate?: string;
|
|
413
|
+
toDate?: string;
|
|
389
414
|
sizeIdentifier?: string;
|
|
390
415
|
}): Paginator<CatalogPlatformModel.GetInventoriesResponse>;
|
|
391
416
|
/**
|
|
@@ -399,17 +424,19 @@ declare class Catalog {
|
|
|
399
424
|
* @summary: List bulk inventory upload history
|
|
400
425
|
* @description: Helps to get bulk Inventory upload jobs status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBulkUploadHistory/).
|
|
401
426
|
*/
|
|
402
|
-
getInventoryBulkUploadHistory({ pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetInventoryBulkUploadHistoryParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.BulkInventoryGet>;
|
|
427
|
+
getInventoryBulkUploadHistory({ pageNo, pageSize, search, requestHeaders }?: CatalogPlatformValidator.GetInventoryBulkUploadHistoryParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.BulkInventoryGet>;
|
|
403
428
|
/**
|
|
404
429
|
* @param {Object} arg - Arg object.
|
|
405
430
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
406
431
|
* page. Default is 12.
|
|
432
|
+
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
407
433
|
* @returns {Paginator<CatalogPlatformModel.BulkInventoryGet>}
|
|
408
434
|
* @summary: List bulk inventory upload history
|
|
409
435
|
* @description: Helps to get bulk Inventory upload jobs status.
|
|
410
436
|
*/
|
|
411
|
-
getInventoryBulkUploadHistoryPaginator({ pageSize }?: {
|
|
437
|
+
getInventoryBulkUploadHistoryPaginator({ pageSize, search }?: {
|
|
412
438
|
pageSize?: number;
|
|
439
|
+
search?: string;
|
|
413
440
|
}): Paginator<CatalogPlatformModel.BulkInventoryGet>;
|
|
414
441
|
/**
|
|
415
442
|
* @param {CatalogPlatformValidator.GetInventoryBySizeParam} arg - Arg object
|
|
@@ -817,20 +817,22 @@ class Catalog {
|
|
|
817
817
|
* @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object
|
|
818
818
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
819
819
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
820
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
820
|
+
* @returns {Promise<CatalogPlatformModel.CreateMarketplaceOptinResponse>}
|
|
821
|
+
* - Success response
|
|
822
|
+
*
|
|
821
823
|
* @name createMarketplaceOptin
|
|
822
824
|
* @summary: Create or Update opt-in infomation
|
|
823
|
-
* @description: Allows to create
|
|
825
|
+
* @description: Allows to create opt-in information for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createMarketplaceOptin/).
|
|
824
826
|
*/
|
|
825
827
|
async createMarketplaceOptin(
|
|
826
|
-
{
|
|
828
|
+
{ marketplaceSlug, body, requestHeaders } = { requestHeaders: {} },
|
|
827
829
|
{ responseHeaders } = { responseHeaders: false }
|
|
828
830
|
) {
|
|
829
831
|
const {
|
|
830
832
|
error,
|
|
831
833
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
832
834
|
{
|
|
833
|
-
|
|
835
|
+
marketplaceSlug,
|
|
834
836
|
body,
|
|
835
837
|
},
|
|
836
838
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -844,7 +846,7 @@ class Catalog {
|
|
|
844
846
|
error: warrning,
|
|
845
847
|
} = CatalogPlatformValidator.createMarketplaceOptin().validate(
|
|
846
848
|
{
|
|
847
|
-
|
|
849
|
+
marketplaceSlug,
|
|
848
850
|
body,
|
|
849
851
|
},
|
|
850
852
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -863,7 +865,7 @@ class Catalog {
|
|
|
863
865
|
const response = await PlatformAPIClient.execute(
|
|
864
866
|
this.config,
|
|
865
867
|
"post",
|
|
866
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
868
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplaceSlug}/opt-in`,
|
|
867
869
|
query_params,
|
|
868
870
|
body,
|
|
869
871
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -877,10 +879,10 @@ class Catalog {
|
|
|
877
879
|
|
|
878
880
|
const {
|
|
879
881
|
error: res_error,
|
|
880
|
-
} = CatalogPlatformModel.
|
|
881
|
-
|
|
882
|
-
allowUnknown: true
|
|
883
|
-
|
|
882
|
+
} = CatalogPlatformModel.CreateMarketplaceOptinResponse().validate(
|
|
883
|
+
responseData,
|
|
884
|
+
{ abortEarly: false, allowUnknown: true }
|
|
885
|
+
);
|
|
884
886
|
|
|
885
887
|
if (res_error) {
|
|
886
888
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2774,9 +2776,18 @@ class Catalog {
|
|
|
2774
2776
|
size,
|
|
2775
2777
|
pageNo,
|
|
2776
2778
|
pageSize,
|
|
2779
|
+
pageId,
|
|
2780
|
+
pageType,
|
|
2777
2781
|
q,
|
|
2778
2782
|
sellable,
|
|
2779
2783
|
storeIds,
|
|
2784
|
+
brandIds,
|
|
2785
|
+
sellerIdentifiers,
|
|
2786
|
+
qtyGt,
|
|
2787
|
+
qtyLt,
|
|
2788
|
+
qtyType,
|
|
2789
|
+
fromDate,
|
|
2790
|
+
toDate,
|
|
2780
2791
|
sizeIdentifier,
|
|
2781
2792
|
requestHeaders,
|
|
2782
2793
|
} = { requestHeaders: {} },
|
|
@@ -2788,9 +2799,18 @@ class Catalog {
|
|
|
2788
2799
|
size,
|
|
2789
2800
|
pageNo,
|
|
2790
2801
|
pageSize,
|
|
2802
|
+
pageId,
|
|
2803
|
+
pageType,
|
|
2791
2804
|
q,
|
|
2792
2805
|
sellable,
|
|
2793
2806
|
storeIds,
|
|
2807
|
+
brandIds,
|
|
2808
|
+
sellerIdentifiers,
|
|
2809
|
+
qtyGt,
|
|
2810
|
+
qtyLt,
|
|
2811
|
+
qtyType,
|
|
2812
|
+
fromDate,
|
|
2813
|
+
toDate,
|
|
2794
2814
|
sizeIdentifier,
|
|
2795
2815
|
},
|
|
2796
2816
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2808,9 +2828,18 @@ class Catalog {
|
|
|
2808
2828
|
size,
|
|
2809
2829
|
pageNo,
|
|
2810
2830
|
pageSize,
|
|
2831
|
+
pageId,
|
|
2832
|
+
pageType,
|
|
2811
2833
|
q,
|
|
2812
2834
|
sellable,
|
|
2813
2835
|
storeIds,
|
|
2836
|
+
brandIds,
|
|
2837
|
+
sellerIdentifiers,
|
|
2838
|
+
qtyGt,
|
|
2839
|
+
qtyLt,
|
|
2840
|
+
qtyType,
|
|
2841
|
+
fromDate,
|
|
2842
|
+
toDate,
|
|
2814
2843
|
sizeIdentifier,
|
|
2815
2844
|
},
|
|
2816
2845
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2827,9 +2856,18 @@ class Catalog {
|
|
|
2827
2856
|
query_params["size"] = size;
|
|
2828
2857
|
query_params["page_no"] = pageNo;
|
|
2829
2858
|
query_params["page_size"] = pageSize;
|
|
2859
|
+
query_params["page_id"] = pageId;
|
|
2860
|
+
query_params["page_type"] = pageType;
|
|
2830
2861
|
query_params["q"] = q;
|
|
2831
2862
|
query_params["sellable"] = sellable;
|
|
2832
2863
|
query_params["store_ids"] = storeIds;
|
|
2864
|
+
query_params["brand_ids"] = brandIds;
|
|
2865
|
+
query_params["seller_identifiers"] = sellerIdentifiers;
|
|
2866
|
+
query_params["qty_gt"] = qtyGt;
|
|
2867
|
+
query_params["qty_lt"] = qtyLt;
|
|
2868
|
+
query_params["qty_type"] = qtyType;
|
|
2869
|
+
query_params["from_date"] = fromDate;
|
|
2870
|
+
query_params["to_date"] = toDate;
|
|
2833
2871
|
query_params["size_identifier"] = sizeIdentifier;
|
|
2834
2872
|
|
|
2835
2873
|
const xHeaders = {};
|
|
@@ -2879,6 +2917,22 @@ class Catalog {
|
|
|
2879
2917
|
* @param {string} [arg.q] - Search with help of store code.
|
|
2880
2918
|
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
2881
2919
|
* @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
|
|
2920
|
+
* @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
|
|
2921
|
+
* @param {string[]} [arg.sellerIdentifiers] - The Seller Identifier or
|
|
2922
|
+
* Primary Identifier of the inventory.
|
|
2923
|
+
* @param {number} [arg.qtyGt] - This field allows you to filter for
|
|
2924
|
+
* inventories that have quantity greater than to the specified value
|
|
2925
|
+
* based on qty_type filter.
|
|
2926
|
+
* @param {number} [arg.qtyLt] - This field allows you to filter for
|
|
2927
|
+
* inventories that have a quantity less than to the specified value based
|
|
2928
|
+
* on qty_type filter.
|
|
2929
|
+
* @param {string} [arg.qtyType] - This field provides flexibility in
|
|
2930
|
+
* selecting filter for inventory quantity counts and date queries. For
|
|
2931
|
+
* example, you might use this field to specify "total" or "sellable" quantity.
|
|
2932
|
+
* @param {string} [arg.fromDate] - Inventory updated on filter to get
|
|
2933
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
2934
|
+
* @param {string} [arg.toDate] - Inventory updated on filter to get
|
|
2935
|
+
* inventories less then or equal to provided date based on qty_type value.
|
|
2882
2936
|
* @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
|
|
2883
2937
|
* or Primary Identifier) of which inventory is to get.
|
|
2884
2938
|
* @returns {Paginator<CatalogPlatformModel.GetInventoriesResponse>}
|
|
@@ -2892,21 +2946,37 @@ class Catalog {
|
|
|
2892
2946
|
q,
|
|
2893
2947
|
sellable,
|
|
2894
2948
|
storeIds,
|
|
2949
|
+
brandIds,
|
|
2950
|
+
sellerIdentifiers,
|
|
2951
|
+
qtyGt,
|
|
2952
|
+
qtyLt,
|
|
2953
|
+
qtyType,
|
|
2954
|
+
fromDate,
|
|
2955
|
+
toDate,
|
|
2895
2956
|
sizeIdentifier,
|
|
2896
2957
|
} = {}) {
|
|
2897
2958
|
const paginator = new Paginator();
|
|
2898
2959
|
const callback = async () => {
|
|
2899
2960
|
const pageId = paginator.nextId;
|
|
2900
2961
|
const pageNo = paginator.pageNo;
|
|
2901
|
-
const pageType = "
|
|
2962
|
+
const pageType = "cursor";
|
|
2902
2963
|
const data = await this.getInventories({
|
|
2903
2964
|
itemId: itemId,
|
|
2904
2965
|
size: size,
|
|
2905
2966
|
pageNo: pageNo,
|
|
2906
2967
|
pageSize: pageSize,
|
|
2968
|
+
pageId: pageId,
|
|
2969
|
+
pageType: pageType,
|
|
2907
2970
|
q: q,
|
|
2908
2971
|
sellable: sellable,
|
|
2909
2972
|
storeIds: storeIds,
|
|
2973
|
+
brandIds: brandIds,
|
|
2974
|
+
sellerIdentifiers: sellerIdentifiers,
|
|
2975
|
+
qtyGt: qtyGt,
|
|
2976
|
+
qtyLt: qtyLt,
|
|
2977
|
+
qtyType: qtyType,
|
|
2978
|
+
fromDate: fromDate,
|
|
2979
|
+
toDate: toDate,
|
|
2910
2980
|
sizeIdentifier: sizeIdentifier,
|
|
2911
2981
|
});
|
|
2912
2982
|
paginator.setPaginator({
|
|
@@ -2931,7 +3001,7 @@ class Catalog {
|
|
|
2931
3001
|
* @description: Helps to get bulk Inventory upload jobs status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventoryBulkUploadHistory/).
|
|
2932
3002
|
*/
|
|
2933
3003
|
async getInventoryBulkUploadHistory(
|
|
2934
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
3004
|
+
{ pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
|
|
2935
3005
|
{ responseHeaders } = { responseHeaders: false }
|
|
2936
3006
|
) {
|
|
2937
3007
|
const {
|
|
@@ -2940,6 +3010,7 @@ class Catalog {
|
|
|
2940
3010
|
{
|
|
2941
3011
|
pageNo,
|
|
2942
3012
|
pageSize,
|
|
3013
|
+
search,
|
|
2943
3014
|
},
|
|
2944
3015
|
{ abortEarly: false, allowUnknown: true }
|
|
2945
3016
|
);
|
|
@@ -2954,6 +3025,7 @@ class Catalog {
|
|
|
2954
3025
|
{
|
|
2955
3026
|
pageNo,
|
|
2956
3027
|
pageSize,
|
|
3028
|
+
search,
|
|
2957
3029
|
},
|
|
2958
3030
|
{ abortEarly: false, allowUnknown: false }
|
|
2959
3031
|
);
|
|
@@ -2967,6 +3039,7 @@ class Catalog {
|
|
|
2967
3039
|
const query_params = {};
|
|
2968
3040
|
query_params["page_no"] = pageNo;
|
|
2969
3041
|
query_params["page_size"] = pageSize;
|
|
3042
|
+
query_params["search"] = search;
|
|
2970
3043
|
|
|
2971
3044
|
const xHeaders = {};
|
|
2972
3045
|
|
|
@@ -3010,11 +3083,12 @@ class Catalog {
|
|
|
3010
3083
|
* @param {Object} arg - Arg object.
|
|
3011
3084
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
3012
3085
|
* page. Default is 12.
|
|
3086
|
+
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
3013
3087
|
* @returns {Paginator<CatalogPlatformModel.BulkInventoryGet>}
|
|
3014
3088
|
* @summary: List bulk inventory upload history
|
|
3015
3089
|
* @description: Helps to get bulk Inventory upload jobs status.
|
|
3016
3090
|
*/
|
|
3017
|
-
getInventoryBulkUploadHistoryPaginator({ pageSize } = {}) {
|
|
3091
|
+
getInventoryBulkUploadHistoryPaginator({ pageSize, search } = {}) {
|
|
3018
3092
|
const paginator = new Paginator();
|
|
3019
3093
|
const callback = async () => {
|
|
3020
3094
|
const pageId = paginator.nextId;
|
|
@@ -3023,6 +3097,7 @@ class Catalog {
|
|
|
3023
3097
|
const data = await this.getInventoryBulkUploadHistory({
|
|
3024
3098
|
pageNo: pageNo,
|
|
3025
3099
|
pageSize: pageSize,
|
|
3100
|
+
search: search,
|
|
3026
3101
|
});
|
|
3027
3102
|
paginator.setPaginator({
|
|
3028
3103
|
hasNext: data.page.has_next ? true : false,
|