@gofynd/fdk-client-javascript 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +5 -5
- package/sdk/application/Catalog/CatalogApplicationClient.js +5 -5
- 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/OrderApplicationValidator.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationValidator.js +1 -1
- package/sdk/application/Payment/PaymentApplicationModel.js +23 -17
- package/sdk/application/index.d.ts +0 -1
- package/sdk/application/index.js +0 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +25 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +69 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +2 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +16 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +59 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +25 -0
- package/sdk/platform/Order/OrderPlatformModel.js +65 -41
- package/sdk/platform/Payment/PaymentPlatformModel.js +22 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +1 -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
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
214
214
|
The above code will log the curl command in the console
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.
|
|
217
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.6' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
218
218
|
Active Theme: Emerge
|
|
219
219
|
```
|
|
220
220
|
|
package/package.json
CHANGED
|
@@ -19,7 +19,6 @@ declare class ApplicationClient {
|
|
|
19
19
|
logistic: Logistic;
|
|
20
20
|
order: Order;
|
|
21
21
|
payment: Payment;
|
|
22
|
-
posCart: PosCart;
|
|
23
22
|
rewards: Rewards;
|
|
24
23
|
share: Share;
|
|
25
24
|
theme: Theme;
|
|
@@ -67,7 +66,6 @@ import Lead = require("./Lead/LeadApplicationClient");
|
|
|
67
66
|
import Logistic = require("./Logistic/LogisticApplicationClient");
|
|
68
67
|
import Order = require("./Order/OrderApplicationClient");
|
|
69
68
|
import Payment = require("./Payment/PaymentApplicationClient");
|
|
70
|
-
import PosCart = require("./PosCart/PosCartApplicationClient");
|
|
71
69
|
import Rewards = require("./Rewards/RewardsApplicationClient");
|
|
72
70
|
import Share = require("./Share/ShareApplicationClient");
|
|
73
71
|
import Theme = require("./Theme/ThemeApplicationClient");
|
|
@@ -9,7 +9,6 @@ const Lead = require("./Lead/LeadApplicationClient");
|
|
|
9
9
|
const Logistic = require("./Logistic/LogisticApplicationClient");
|
|
10
10
|
const Order = require("./Order/OrderApplicationClient");
|
|
11
11
|
const Payment = require("./Payment/PaymentApplicationClient");
|
|
12
|
-
const PosCart = require("./PosCart/PosCartApplicationClient");
|
|
13
12
|
const Rewards = require("./Rewards/RewardsApplicationClient");
|
|
14
13
|
const Share = require("./Share/ShareApplicationClient");
|
|
15
14
|
const Theme = require("./Theme/ThemeApplicationClient");
|
|
@@ -38,7 +37,6 @@ class ApplicationClient {
|
|
|
38
37
|
this.logistic = new Logistic(config);
|
|
39
38
|
this.order = new Order(config);
|
|
40
39
|
this.payment = new Payment(config);
|
|
41
|
-
this.posCart = new PosCart(config);
|
|
42
40
|
this.rewards = new Rewards(config);
|
|
43
41
|
this.share = new Share(config);
|
|
44
42
|
this.theme = new Theme(config);
|
|
@@ -164,7 +164,7 @@ declare class Catalog {
|
|
|
164
164
|
* - Success response
|
|
165
165
|
*
|
|
166
166
|
* @name getCollections
|
|
167
|
-
* @summary: List
|
|
167
|
+
* @summary: List collections
|
|
168
168
|
* @description: Retrieve a list of curated product collections with filtering options based on tags and collection names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/).
|
|
169
169
|
*/
|
|
170
170
|
getCollections({ pageNo, pageSize, tag, q, requestHeaders }?: CatalogApplicationValidator.GetCollectionsParam, { responseHeaders }?: object): Promise<CatalogApplicationModel.GetCollectionListingResponse>;
|
|
@@ -174,7 +174,7 @@ declare class Catalog {
|
|
|
174
174
|
* @param {string[]} [arg.tag] - List of tags to filter collections
|
|
175
175
|
* @param {string} [arg.q] - Name of the collection to filter collection
|
|
176
176
|
* @returns {Paginator<CatalogApplicationModel.GetCollectionListingResponse>}
|
|
177
|
-
* @summary: List
|
|
177
|
+
* @summary: List collections
|
|
178
178
|
* @description: Retrieve a list of curated product collections with filtering options based on tags and collection names.
|
|
179
179
|
*/
|
|
180
180
|
getCollectionsPaginator({ pageSize, tag, q }?: {
|
|
@@ -223,7 +223,7 @@ declare class Catalog {
|
|
|
223
223
|
* @returns {Promise<CatalogApplicationModel.GetFollowListingResponse>} -
|
|
224
224
|
* Success response
|
|
225
225
|
* @name getFollowedListing
|
|
226
|
-
* @summary: List followed products
|
|
226
|
+
* @summary: List followed products, brands
|
|
227
227
|
* @description: Retrieve a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
|
|
228
228
|
*/
|
|
229
229
|
getFollowedListing({ collectionType, pageId, pageSize, requestHeaders }?: CatalogApplicationValidator.GetFollowedListingParam, { responseHeaders }?: object): Promise<CatalogApplicationModel.GetFollowListingResponse>;
|
|
@@ -233,7 +233,7 @@ declare class Catalog {
|
|
|
233
233
|
* products, brands, or collections.
|
|
234
234
|
* @param {number} [arg.pageSize] - Page ID to retrieve next set of results.
|
|
235
235
|
* @returns {Paginator<CatalogApplicationModel.GetFollowListingResponse>}
|
|
236
|
-
* @summary: List followed products
|
|
236
|
+
* @summary: List followed products, brands
|
|
237
237
|
* @description: Retrieve a list of products or brands the user is following.
|
|
238
238
|
*/
|
|
239
239
|
getFollowedListingPaginator({ collectionType, pageSize }?: {
|
|
@@ -449,7 +449,7 @@ declare class Catalog {
|
|
|
449
449
|
* @returns {Promise<CatalogApplicationModel.ProductVariantsResponse>} -
|
|
450
450
|
* Success response
|
|
451
451
|
* @name getProductVariantsBySlug
|
|
452
|
-
* @summary: List product
|
|
452
|
+
* @summary: List product variants
|
|
453
453
|
* @description: Retrieves 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/).
|
|
454
454
|
*/
|
|
455
455
|
getProductVariantsBySlug({ slug, requestHeaders }?: CatalogApplicationValidator.GetProductVariantsBySlugParam, { responseHeaders }?: object): Promise<CatalogApplicationModel.ProductVariantsResponse>;
|
|
@@ -759,7 +759,7 @@ class Catalog {
|
|
|
759
759
|
* - Success response
|
|
760
760
|
*
|
|
761
761
|
* @name getCollections
|
|
762
|
-
* @summary: List
|
|
762
|
+
* @summary: List collections
|
|
763
763
|
* @description: Retrieve a list of curated product collections with filtering options based on tags and collection names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/).
|
|
764
764
|
*/
|
|
765
765
|
async getCollections(
|
|
@@ -841,7 +841,7 @@ class Catalog {
|
|
|
841
841
|
* @param {string[]} [arg.tag] - List of tags to filter collections
|
|
842
842
|
* @param {string} [arg.q] - Name of the collection to filter collection
|
|
843
843
|
* @returns {Paginator<CatalogApplicationModel.GetCollectionListingResponse>}
|
|
844
|
-
* @summary: List
|
|
844
|
+
* @summary: List collections
|
|
845
845
|
* @description: Retrieve a list of curated product collections with filtering options based on tags and collection names.
|
|
846
846
|
*/
|
|
847
847
|
getCollectionsPaginator({ pageSize, tag, q } = {}) {
|
|
@@ -1114,7 +1114,7 @@ class Catalog {
|
|
|
1114
1114
|
* @returns {Promise<CatalogApplicationModel.GetFollowListingResponse>} -
|
|
1115
1115
|
* Success response
|
|
1116
1116
|
* @name getFollowedListing
|
|
1117
|
-
* @summary: List followed products
|
|
1117
|
+
* @summary: List followed products, brands
|
|
1118
1118
|
* @description: Retrieve a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
|
|
1119
1119
|
*/
|
|
1120
1120
|
async getFollowedListing(
|
|
@@ -1196,7 +1196,7 @@ class Catalog {
|
|
|
1196
1196
|
* products, brands, or collections.
|
|
1197
1197
|
* @param {number} [arg.pageSize] - Page ID to retrieve next set of results.
|
|
1198
1198
|
* @returns {Paginator<CatalogApplicationModel.GetFollowListingResponse>}
|
|
1199
|
-
* @summary: List followed products
|
|
1199
|
+
* @summary: List followed products, brands
|
|
1200
1200
|
* @description: Retrieve a list of products or brands the user is following.
|
|
1201
1201
|
*/
|
|
1202
1202
|
getFollowedListingPaginator({ collectionType, pageSize } = {}) {
|
|
@@ -2380,7 +2380,7 @@ class Catalog {
|
|
|
2380
2380
|
* @returns {Promise<CatalogApplicationModel.ProductVariantsResponse>} -
|
|
2381
2381
|
* Success response
|
|
2382
2382
|
* @name getProductVariantsBySlug
|
|
2383
|
-
* @summary: List product
|
|
2383
|
+
* @summary: List product variants
|
|
2384
2384
|
* @description: Retrieves 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/).
|
|
2385
2385
|
*/
|
|
2386
2386
|
async getProductVariantsBySlug(
|
|
@@ -772,7 +772,7 @@ class LogisticApplicationModel {
|
|
|
772
772
|
display_name: Joi.string().allow(""),
|
|
773
773
|
iso2: Joi.string().allow(""),
|
|
774
774
|
iso3: Joi.string().allow(""),
|
|
775
|
-
timezones: Joi.array().items(Joi.string().allow("")),
|
|
775
|
+
timezones: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
776
776
|
hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
|
|
777
777
|
phone_code: Joi.string().allow(""),
|
|
778
778
|
latitude: Joi.string().allow(""),
|
|
@@ -900,7 +900,7 @@ class LogisticApplicationModel {
|
|
|
900
900
|
display_name: Joi.string().allow(""),
|
|
901
901
|
iso2: Joi.string().allow(""),
|
|
902
902
|
iso3: Joi.string().allow(""),
|
|
903
|
-
timezones: Joi.array().items(Joi.string().allow("")),
|
|
903
|
+
timezones: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
904
904
|
hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
|
|
905
905
|
phone_code: Joi.string().allow(""),
|
|
906
906
|
latitude: Joi.string().allow(""),
|
|
@@ -47,7 +47,7 @@ declare class Order {
|
|
|
47
47
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
48
48
|
* @returns {Promise<OrderApplicationModel.OrderById>} - Success response
|
|
49
49
|
* @name getOrderById
|
|
50
|
-
* @summary: Get
|
|
50
|
+
* @summary: Get an order
|
|
51
51
|
* @description: Retrieve order details such as tracking details, shipment, store information using Fynd Order ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
52
52
|
*/
|
|
53
53
|
getOrderById({ orderId, allowInactive, requestHeaders }?: OrderApplicationValidator.GetOrderByIdParam, { responseHeaders }?: object): Promise<OrderApplicationModel.OrderById>;
|
|
@@ -221,7 +221,7 @@ class Order {
|
|
|
221
221
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
222
222
|
* @returns {Promise<OrderApplicationModel.OrderById>} - Success response
|
|
223
223
|
* @name getOrderById
|
|
224
|
-
* @summary: Get
|
|
224
|
+
* @summary: Get an order
|
|
225
225
|
* @description: Retrieve order details such as tracking details, shipment, store information using Fynd Order ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
226
226
|
*/
|
|
227
227
|
async getOrderById(
|
|
@@ -14,7 +14,7 @@ export = OrderApplicationValidator;
|
|
|
14
14
|
/**
|
|
15
15
|
* @typedef GetOrderByIdParam
|
|
16
16
|
* @property {string} orderId - A unique number used for identifying and
|
|
17
|
-
* tracking
|
|
17
|
+
* tracking an order.
|
|
18
18
|
* @property {boolean} [allowInactive] - Flag to allow inactive shipments
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
@@ -133,7 +133,7 @@ type GetInvoiceByShipmentIdParam = {
|
|
|
133
133
|
type GetOrderByIdParam = {
|
|
134
134
|
/**
|
|
135
135
|
* - A unique number used for identifying and
|
|
136
|
-
* tracking
|
|
136
|
+
* tracking an order.
|
|
137
137
|
*/
|
|
138
138
|
orderId: string;
|
|
139
139
|
/**
|
|
@@ -19,7 +19,7 @@ const OrderApplicationModel = require("./OrderApplicationModel");
|
|
|
19
19
|
/**
|
|
20
20
|
* @typedef GetOrderByIdParam
|
|
21
21
|
* @property {string} orderId - A unique number used for identifying and
|
|
22
|
-
* tracking
|
|
22
|
+
* tracking an order.
|
|
23
23
|
* @property {boolean} [allowInactive] - Flag to allow inactive shipments
|
|
24
24
|
*/
|
|
25
25
|
|
|
@@ -1464,13 +1464,17 @@ class PaymentApplicationModel {
|
|
|
1464
1464
|
cod_limit: Joi.number().allow(null),
|
|
1465
1465
|
intent_flow: Joi.boolean().allow(null),
|
|
1466
1466
|
fynd_vpa: Joi.string().allow("").allow(null),
|
|
1467
|
-
intent_app_error_dict_list: Joi.array()
|
|
1468
|
-
PaymentApplicationModel.IntentAppErrorList()
|
|
1469
|
-
|
|
1467
|
+
intent_app_error_dict_list: Joi.array()
|
|
1468
|
+
.items(PaymentApplicationModel.IntentAppErrorList())
|
|
1469
|
+
.allow(null, ""),
|
|
1470
1470
|
aggregator_name: Joi.string().allow("").required(),
|
|
1471
1471
|
card_fingerprint: Joi.string().allow("").allow(null),
|
|
1472
|
-
intent_app_error_list: Joi.array()
|
|
1473
|
-
|
|
1472
|
+
intent_app_error_list: Joi.array()
|
|
1473
|
+
.items(Joi.string().allow(""))
|
|
1474
|
+
.allow(null, ""),
|
|
1475
|
+
intent_app: Joi.array()
|
|
1476
|
+
.items(PaymentApplicationModel.IntentApp())
|
|
1477
|
+
.allow(null, ""),
|
|
1474
1478
|
expired: Joi.boolean().allow(null),
|
|
1475
1479
|
retry_count: Joi.number().allow(null),
|
|
1476
1480
|
exp_year: Joi.number().allow(null),
|
|
@@ -1571,9 +1575,9 @@ class PaymentApplicationModel {
|
|
|
1571
1575
|
prepayment_value: Joi.number().allow(null),
|
|
1572
1576
|
cancellation_type: Joi.string().allow("").allow(null),
|
|
1573
1577
|
refund_time_limit: Joi.number().allow(null),
|
|
1574
|
-
all_prepayment_type: Joi.array()
|
|
1575
|
-
Joi.string().allow("").allow(null)
|
|
1576
|
-
|
|
1578
|
+
all_prepayment_type: Joi.array()
|
|
1579
|
+
.items(Joi.string().allow("").allow(null))
|
|
1580
|
+
.allow(null, ""),
|
|
1577
1581
|
allow_custom_advance_amount: Joi.boolean().allow(null),
|
|
1578
1582
|
});
|
|
1579
1583
|
}
|
|
@@ -1594,7 +1598,9 @@ class PaymentApplicationModel {
|
|
|
1594
1598
|
display_priority: Joi.number().allow(null),
|
|
1595
1599
|
payment_mode_id: Joi.number().allow(null),
|
|
1596
1600
|
display_name: Joi.string().allow("").allow(null),
|
|
1597
|
-
list: Joi.array()
|
|
1601
|
+
list: Joi.array()
|
|
1602
|
+
.items(PaymentApplicationModel.PaymentModeList())
|
|
1603
|
+
.allow(null, ""),
|
|
1598
1604
|
split: PaymentApplicationModel.SplitObject(),
|
|
1599
1605
|
advance: PaymentApplicationModel.AdvanceObject(),
|
|
1600
1606
|
});
|
|
@@ -1606,9 +1612,9 @@ class PaymentApplicationModel {
|
|
|
1606
1612
|
payment_options: PaymentApplicationModel.PaymentOptionAndFlow().required(),
|
|
1607
1613
|
success: Joi.boolean().required(),
|
|
1608
1614
|
payment_breakup: Joi.any(),
|
|
1609
|
-
advance_payment: Joi.array()
|
|
1610
|
-
PaymentApplicationModel.AdvancePaymentObject()
|
|
1611
|
-
|
|
1615
|
+
advance_payment: Joi.array()
|
|
1616
|
+
.items(PaymentApplicationModel.AdvancePaymentObject())
|
|
1617
|
+
.allow(null, ""),
|
|
1612
1618
|
});
|
|
1613
1619
|
}
|
|
1614
1620
|
|
|
@@ -1847,9 +1853,9 @@ class PaymentApplicationModel {
|
|
|
1847
1853
|
static OrderBeneficiaryResponse() {
|
|
1848
1854
|
return Joi.object({
|
|
1849
1855
|
show_beneficiary_details: Joi.boolean(),
|
|
1850
|
-
beneficiaries: Joi.array()
|
|
1851
|
-
PaymentApplicationModel.OrderBeneficiaryDetails()
|
|
1852
|
-
|
|
1856
|
+
beneficiaries: Joi.array()
|
|
1857
|
+
.items(PaymentApplicationModel.OrderBeneficiaryDetails())
|
|
1858
|
+
.allow(null, ""),
|
|
1853
1859
|
});
|
|
1854
1860
|
}
|
|
1855
1861
|
|
|
@@ -2355,7 +2361,7 @@ class PaymentApplicationModel {
|
|
|
2355
2361
|
static OutstandingOrderDetailsResponse() {
|
|
2356
2362
|
return Joi.object({
|
|
2357
2363
|
status_code: Joi.number().required(),
|
|
2358
|
-
data: Joi.array().items(Joi.any()),
|
|
2364
|
+
data: Joi.array().items(Joi.any()).allow(null, ""),
|
|
2359
2365
|
success: Joi.boolean().required(),
|
|
2360
2366
|
message: Joi.string().allow("").allow(null),
|
|
2361
2367
|
});
|
|
@@ -2365,7 +2371,7 @@ class PaymentApplicationModel {
|
|
|
2365
2371
|
static PaidOrderDetailsResponse() {
|
|
2366
2372
|
return Joi.object({
|
|
2367
2373
|
status_code: Joi.number().required(),
|
|
2368
|
-
data: Joi.array().items(Joi.any()),
|
|
2374
|
+
data: Joi.array().items(Joi.any()).allow(null, ""),
|
|
2369
2375
|
success: Joi.boolean().required(),
|
|
2370
2376
|
message: Joi.string().allow("").allow(null),
|
|
2371
2377
|
});
|
|
@@ -12,7 +12,6 @@ export namespace ApplicationModel {
|
|
|
12
12
|
const LogisticApplicationModel: typeof import("./Logistic/LogisticApplicationModel");
|
|
13
13
|
const OrderApplicationModel: typeof import("./Order/OrderApplicationModel");
|
|
14
14
|
const PaymentApplicationModel: typeof import("./Payment/PaymentApplicationModel");
|
|
15
|
-
const PosCartApplicationModel: typeof import("./PosCart/PosCartApplicationModel");
|
|
16
15
|
const RewardsApplicationModel: typeof import("./Rewards/RewardsApplicationModel");
|
|
17
16
|
const ShareApplicationModel: typeof import("./Share/ShareApplicationModel");
|
|
18
17
|
const ThemeApplicationModel: typeof import("./Theme/ThemeApplicationModel");
|
package/sdk/application/index.js
CHANGED
|
@@ -24,8 +24,6 @@ module.exports = {
|
|
|
24
24
|
|
|
25
25
|
PaymentApplicationModel: require("./Payment/PaymentApplicationModel"),
|
|
26
26
|
|
|
27
|
-
PosCartApplicationModel: require("./PosCart/PosCartApplicationModel"),
|
|
28
|
-
|
|
29
27
|
RewardsApplicationModel: require("./Rewards/RewardsApplicationModel"),
|
|
30
28
|
|
|
31
29
|
ShareApplicationModel: require("./Share/ShareApplicationModel"),
|
|
@@ -308,7 +308,7 @@ class WebhookPartnerModel {
|
|
|
308
308
|
event_name: Joi.string().allow(""),
|
|
309
309
|
event_type: Joi.string().allow(""),
|
|
310
310
|
event_category: Joi.string().allow(""),
|
|
311
|
-
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
311
|
+
event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
312
312
|
version: Joi.string().allow(""),
|
|
313
313
|
display_name: Joi.string().allow(""),
|
|
314
314
|
description: Joi.string().allow("").allow(null),
|
|
@@ -363,7 +363,7 @@ declare class Catalog {
|
|
|
363
363
|
* @summary: List Inventory
|
|
364
364
|
* @description: Allows to get Inventories data for particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventories/).
|
|
365
365
|
*/
|
|
366
|
-
getInventories({ itemId, size, pageNo, pageSize, q, sellable, storeIds, sizeIdentifier, requestHeaders, }?: CatalogPlatformValidator.GetInventoriesParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetInventoriesResponse>;
|
|
366
|
+
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
367
|
/**
|
|
368
368
|
* @param {Object} arg - Arg object.
|
|
369
369
|
* @param {string} [arg.itemId] - Item code of the product of which size is to be get.
|
|
@@ -373,19 +373,42 @@ declare class Catalog {
|
|
|
373
373
|
* @param {string} [arg.q] - Search with help of store code.
|
|
374
374
|
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
375
375
|
* @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
|
|
376
|
+
* @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
|
|
377
|
+
* @param {string[]} [arg.sellerIdentifiers] - The Seller Identifier or
|
|
378
|
+
* Primary Identifier of the inventory.
|
|
379
|
+
* @param {number} [arg.qtyGt] - This field allows you to filter for
|
|
380
|
+
* inventories that have quantity greater than to the specified value
|
|
381
|
+
* based on qty_type filter.
|
|
382
|
+
* @param {number} [arg.qtyLt] - This field allows you to filter for
|
|
383
|
+
* inventories that have a quantity less than to the specified value based
|
|
384
|
+
* on qty_type filter.
|
|
385
|
+
* @param {string} [arg.qtyType] - This field provides flexibility in
|
|
386
|
+
* selecting filter for inventory quantity counts and date queries. For
|
|
387
|
+
* example, you might use this field to specify "total" or "sellable" quantity.
|
|
388
|
+
* @param {string} [arg.fromDate] - Inventory updated on filter to get
|
|
389
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
390
|
+
* @param {string} [arg.toDate] - Inventory updated on filter to get
|
|
391
|
+
* inventories less then or equal to provided date based on qty_type value.
|
|
376
392
|
* @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
|
|
377
393
|
* or Primary Identifier) of which inventory is to get.
|
|
378
394
|
* @returns {Paginator<CatalogPlatformModel.GetInventoriesResponse>}
|
|
379
395
|
* @summary: List Inventory
|
|
380
396
|
* @description: Allows to get Inventories data for particular company.
|
|
381
397
|
*/
|
|
382
|
-
getInventoriesPaginator({ itemId, size, pageSize, q, sellable, storeIds, sizeIdentifier, }?: {
|
|
398
|
+
getInventoriesPaginator({ itemId, size, pageSize, q, sellable, storeIds, brandIds, sellerIdentifiers, qtyGt, qtyLt, qtyType, fromDate, toDate, sizeIdentifier, }?: {
|
|
383
399
|
itemId?: string;
|
|
384
400
|
size?: string;
|
|
385
401
|
pageSize?: number;
|
|
386
402
|
q?: string;
|
|
387
403
|
sellable?: boolean;
|
|
388
404
|
storeIds?: number[];
|
|
405
|
+
brandIds?: number[];
|
|
406
|
+
sellerIdentifiers?: string[];
|
|
407
|
+
qtyGt?: number;
|
|
408
|
+
qtyLt?: number;
|
|
409
|
+
qtyType?: string;
|
|
410
|
+
fromDate?: string;
|
|
411
|
+
toDate?: string;
|
|
389
412
|
sizeIdentifier?: string;
|
|
390
413
|
}): Paginator<CatalogPlatformModel.GetInventoriesResponse>;
|
|
391
414
|
/**
|
|
@@ -2774,9 +2774,18 @@ class Catalog {
|
|
|
2774
2774
|
size,
|
|
2775
2775
|
pageNo,
|
|
2776
2776
|
pageSize,
|
|
2777
|
+
pageId,
|
|
2778
|
+
pageType,
|
|
2777
2779
|
q,
|
|
2778
2780
|
sellable,
|
|
2779
2781
|
storeIds,
|
|
2782
|
+
brandIds,
|
|
2783
|
+
sellerIdentifiers,
|
|
2784
|
+
qtyGt,
|
|
2785
|
+
qtyLt,
|
|
2786
|
+
qtyType,
|
|
2787
|
+
fromDate,
|
|
2788
|
+
toDate,
|
|
2780
2789
|
sizeIdentifier,
|
|
2781
2790
|
requestHeaders,
|
|
2782
2791
|
} = { requestHeaders: {} },
|
|
@@ -2788,9 +2797,18 @@ class Catalog {
|
|
|
2788
2797
|
size,
|
|
2789
2798
|
pageNo,
|
|
2790
2799
|
pageSize,
|
|
2800
|
+
pageId,
|
|
2801
|
+
pageType,
|
|
2791
2802
|
q,
|
|
2792
2803
|
sellable,
|
|
2793
2804
|
storeIds,
|
|
2805
|
+
brandIds,
|
|
2806
|
+
sellerIdentifiers,
|
|
2807
|
+
qtyGt,
|
|
2808
|
+
qtyLt,
|
|
2809
|
+
qtyType,
|
|
2810
|
+
fromDate,
|
|
2811
|
+
toDate,
|
|
2794
2812
|
sizeIdentifier,
|
|
2795
2813
|
},
|
|
2796
2814
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2808,9 +2826,18 @@ class Catalog {
|
|
|
2808
2826
|
size,
|
|
2809
2827
|
pageNo,
|
|
2810
2828
|
pageSize,
|
|
2829
|
+
pageId,
|
|
2830
|
+
pageType,
|
|
2811
2831
|
q,
|
|
2812
2832
|
sellable,
|
|
2813
2833
|
storeIds,
|
|
2834
|
+
brandIds,
|
|
2835
|
+
sellerIdentifiers,
|
|
2836
|
+
qtyGt,
|
|
2837
|
+
qtyLt,
|
|
2838
|
+
qtyType,
|
|
2839
|
+
fromDate,
|
|
2840
|
+
toDate,
|
|
2814
2841
|
sizeIdentifier,
|
|
2815
2842
|
},
|
|
2816
2843
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2827,9 +2854,18 @@ class Catalog {
|
|
|
2827
2854
|
query_params["size"] = size;
|
|
2828
2855
|
query_params["page_no"] = pageNo;
|
|
2829
2856
|
query_params["page_size"] = pageSize;
|
|
2857
|
+
query_params["page_id"] = pageId;
|
|
2858
|
+
query_params["page_type"] = pageType;
|
|
2830
2859
|
query_params["q"] = q;
|
|
2831
2860
|
query_params["sellable"] = sellable;
|
|
2832
2861
|
query_params["store_ids"] = storeIds;
|
|
2862
|
+
query_params["brand_ids"] = brandIds;
|
|
2863
|
+
query_params["seller_identifiers"] = sellerIdentifiers;
|
|
2864
|
+
query_params["qty_gt"] = qtyGt;
|
|
2865
|
+
query_params["qty_lt"] = qtyLt;
|
|
2866
|
+
query_params["qty_type"] = qtyType;
|
|
2867
|
+
query_params["from_date"] = fromDate;
|
|
2868
|
+
query_params["to_date"] = toDate;
|
|
2833
2869
|
query_params["size_identifier"] = sizeIdentifier;
|
|
2834
2870
|
|
|
2835
2871
|
const xHeaders = {};
|
|
@@ -2879,6 +2915,22 @@ class Catalog {
|
|
|
2879
2915
|
* @param {string} [arg.q] - Search with help of store code.
|
|
2880
2916
|
* @param {boolean} [arg.sellable] - Filter on whether product is in stock or not.
|
|
2881
2917
|
* @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
|
|
2918
|
+
* @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
|
|
2919
|
+
* @param {string[]} [arg.sellerIdentifiers] - The Seller Identifier or
|
|
2920
|
+
* Primary Identifier of the inventory.
|
|
2921
|
+
* @param {number} [arg.qtyGt] - This field allows you to filter for
|
|
2922
|
+
* inventories that have quantity greater than to the specified value
|
|
2923
|
+
* based on qty_type filter.
|
|
2924
|
+
* @param {number} [arg.qtyLt] - This field allows you to filter for
|
|
2925
|
+
* inventories that have a quantity less than to the specified value based
|
|
2926
|
+
* on qty_type filter.
|
|
2927
|
+
* @param {string} [arg.qtyType] - This field provides flexibility in
|
|
2928
|
+
* selecting filter for inventory quantity counts and date queries. For
|
|
2929
|
+
* example, you might use this field to specify "total" or "sellable" quantity.
|
|
2930
|
+
* @param {string} [arg.fromDate] - Inventory updated on filter to get
|
|
2931
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
2932
|
+
* @param {string} [arg.toDate] - Inventory updated on filter to get
|
|
2933
|
+
* inventories less then or equal to provided date based on qty_type value.
|
|
2882
2934
|
* @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier
|
|
2883
2935
|
* or Primary Identifier) of which inventory is to get.
|
|
2884
2936
|
* @returns {Paginator<CatalogPlatformModel.GetInventoriesResponse>}
|
|
@@ -2892,21 +2944,37 @@ class Catalog {
|
|
|
2892
2944
|
q,
|
|
2893
2945
|
sellable,
|
|
2894
2946
|
storeIds,
|
|
2947
|
+
brandIds,
|
|
2948
|
+
sellerIdentifiers,
|
|
2949
|
+
qtyGt,
|
|
2950
|
+
qtyLt,
|
|
2951
|
+
qtyType,
|
|
2952
|
+
fromDate,
|
|
2953
|
+
toDate,
|
|
2895
2954
|
sizeIdentifier,
|
|
2896
2955
|
} = {}) {
|
|
2897
2956
|
const paginator = new Paginator();
|
|
2898
2957
|
const callback = async () => {
|
|
2899
2958
|
const pageId = paginator.nextId;
|
|
2900
2959
|
const pageNo = paginator.pageNo;
|
|
2901
|
-
const pageType = "
|
|
2960
|
+
const pageType = "cursor";
|
|
2902
2961
|
const data = await this.getInventories({
|
|
2903
2962
|
itemId: itemId,
|
|
2904
2963
|
size: size,
|
|
2905
2964
|
pageNo: pageNo,
|
|
2906
2965
|
pageSize: pageSize,
|
|
2966
|
+
pageId: pageId,
|
|
2967
|
+
pageType: pageType,
|
|
2907
2968
|
q: q,
|
|
2908
2969
|
sellable: sellable,
|
|
2909
2970
|
storeIds: storeIds,
|
|
2971
|
+
brandIds: brandIds,
|
|
2972
|
+
sellerIdentifiers: sellerIdentifiers,
|
|
2973
|
+
qtyGt: qtyGt,
|
|
2974
|
+
qtyLt: qtyLt,
|
|
2975
|
+
qtyType: qtyType,
|
|
2976
|
+
fromDate: fromDate,
|
|
2977
|
+
toDate: toDate,
|
|
2910
2978
|
sizeIdentifier: sizeIdentifier,
|
|
2911
2979
|
});
|
|
2912
2980
|
paginator.setPaginator({
|
|
@@ -2752,6 +2752,7 @@ export = CatalogPlatformModel;
|
|
|
2752
2752
|
/**
|
|
2753
2753
|
* @typedef Quantity
|
|
2754
2754
|
* @property {number} [count]
|
|
2755
|
+
* @property {string} [updated_at]
|
|
2755
2756
|
*/
|
|
2756
2757
|
/**
|
|
2757
2758
|
* @typedef QuantityBase
|
|
@@ -7320,6 +7321,7 @@ type QuantitiesArticle = {
|
|
|
7320
7321
|
declare function Quantity(): Quantity;
|
|
7321
7322
|
type Quantity = {
|
|
7322
7323
|
count?: number;
|
|
7324
|
+
updated_at?: string;
|
|
7323
7325
|
};
|
|
7324
7326
|
/** @returns {QuantityBase} */
|
|
7325
7327
|
declare function QuantityBase(): QuantityBase;
|
|
@@ -3054,6 +3054,7 @@ const Joi = require("joi");
|
|
|
3054
3054
|
/**
|
|
3055
3055
|
* @typedef Quantity
|
|
3056
3056
|
* @property {number} [count]
|
|
3057
|
+
* @property {string} [updated_at]
|
|
3057
3058
|
*/
|
|
3058
3059
|
|
|
3059
3060
|
/**
|
|
@@ -6000,7 +6001,7 @@ class CatalogPlatformModel {
|
|
|
6000
6001
|
quantity: Joi.number(),
|
|
6001
6002
|
seller_identifier: Joi.string().allow("").required(),
|
|
6002
6003
|
store_code: Joi.string().allow("").required(),
|
|
6003
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
6004
|
+
tags: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
6004
6005
|
total_quantity: Joi.number(),
|
|
6005
6006
|
trace_id: Joi.string().allow("").allow(null),
|
|
6006
6007
|
});
|
|
@@ -6025,7 +6026,7 @@ class CatalogPlatformModel {
|
|
|
6025
6026
|
price_marked: Joi.number(),
|
|
6026
6027
|
seller_identifier: Joi.string().allow("").required(),
|
|
6027
6028
|
store_id: Joi.number().required(),
|
|
6028
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
6029
|
+
tags: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
6029
6030
|
total_quantity: Joi.number().allow(null),
|
|
6030
6031
|
trace_id: Joi.string().allow(""),
|
|
6031
6032
|
});
|
|
@@ -6123,12 +6124,12 @@ class CatalogPlatformModel {
|
|
|
6123
6124
|
size: Joi.string().allow("").required(),
|
|
6124
6125
|
stage: Joi.string().allow(""),
|
|
6125
6126
|
store: CatalogPlatformModel.StoreMeta().required(),
|
|
6126
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
6127
|
+
tags: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
6127
6128
|
tax_identifier: Joi.any(),
|
|
6128
6129
|
total_quantity: Joi.number().required(),
|
|
6129
6130
|
trace_id: Joi.string().allow(""),
|
|
6130
6131
|
track_inventory: Joi.boolean(),
|
|
6131
|
-
trader: Joi.array().items(CatalogPlatformModel.Trader1()),
|
|
6132
|
+
trader: Joi.array().items(CatalogPlatformModel.Trader1()).allow(null, ""),
|
|
6132
6133
|
uid: Joi.string().allow("").required(),
|
|
6133
6134
|
weight: CatalogPlatformModel.WeightResponse().required(),
|
|
6134
6135
|
});
|
|
@@ -6808,14 +6809,16 @@ class CatalogPlatformModel {
|
|
|
6808
6809
|
custom_order: CatalogPlatformModel.CustomOrder(),
|
|
6809
6810
|
departments: Joi.array().items(Joi.number()).required(),
|
|
6810
6811
|
description: Joi.string().allow(""),
|
|
6811
|
-
highlights: Joi.array()
|
|
6812
|
+
highlights: Joi.array()
|
|
6813
|
+
.items(Joi.string().allow("").allow(null))
|
|
6814
|
+
.allow(null, ""),
|
|
6812
6815
|
is_active: Joi.boolean(),
|
|
6813
6816
|
is_dependent: Joi.boolean(),
|
|
6814
6817
|
is_image_less_product: Joi.boolean(),
|
|
6815
6818
|
is_set: Joi.boolean(),
|
|
6816
6819
|
item_code: Joi.string().allow("").required(),
|
|
6817
6820
|
item_type: Joi.string().allow("").required(),
|
|
6818
|
-
media: Joi.array().items(CatalogPlatformModel.Media()),
|
|
6821
|
+
media: Joi.array().items(CatalogPlatformModel.Media()).allow(null, ""),
|
|
6819
6822
|
multi_size: Joi.boolean(),
|
|
6820
6823
|
name: Joi.string().allow("").required(),
|
|
6821
6824
|
net_quantity: CatalogPlatformModel.NetQuantity(),
|
|
@@ -7164,11 +7167,11 @@ class CatalogPlatformModel {
|
|
|
7164
7167
|
/** @returns {ProductTemplate} */
|
|
7165
7168
|
static ProductTemplate() {
|
|
7166
7169
|
return Joi.object({
|
|
7167
|
-
attributes: Joi.array().items(Joi.string().allow("")),
|
|
7168
|
-
categories: Joi.array().items(Joi.string().allow("")),
|
|
7170
|
+
attributes: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
7171
|
+
categories: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
7169
7172
|
created_by: Joi.any(),
|
|
7170
7173
|
created_on: Joi.string().allow(""),
|
|
7171
|
-
departments: Joi.array().items(Joi.string().allow("")),
|
|
7174
|
+
departments: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
7172
7175
|
description: Joi.string().allow(""),
|
|
7173
7176
|
is_active: Joi.boolean(),
|
|
7174
7177
|
is_archived: Joi.boolean(),
|
|
@@ -7298,6 +7301,7 @@ class CatalogPlatformModel {
|
|
|
7298
7301
|
static Quantity() {
|
|
7299
7302
|
return Joi.object({
|
|
7300
7303
|
count: Joi.number(),
|
|
7304
|
+
updated_at: Joi.string().allow(""),
|
|
7301
7305
|
});
|
|
7302
7306
|
}
|
|
7303
7307
|
|
|
@@ -7625,9 +7629,9 @@ class CatalogPlatformModel {
|
|
|
7625
7629
|
/** @returns {TemplateDetails} */
|
|
7626
7630
|
static TemplateDetails() {
|
|
7627
7631
|
return Joi.object({
|
|
7628
|
-
attributes: Joi.array().items(Joi.string().allow("")),
|
|
7629
|
-
categories: Joi.array().items(Joi.string().allow("")),
|
|
7630
|
-
departments: Joi.array().items(Joi.string().allow("")),
|
|
7632
|
+
attributes: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
7633
|
+
categories: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
7634
|
+
departments: Joi.array().items(Joi.string().allow("")).allow(null, ""),
|
|
7631
7635
|
description: Joi.string().allow(""),
|
|
7632
7636
|
id: Joi.string().allow(""),
|
|
7633
7637
|
is_active: Joi.boolean(),
|