@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
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.7' --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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gofynd/fdk-client-javascript",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"loglevel": "^1.8.1",
|
|
20
20
|
"query-string": "^7.1.3",
|
|
21
21
|
"@gofynd/fp-signature": "^1.0.1",
|
|
22
|
-
"@gofynd/flick": "^1.0.
|
|
22
|
+
"@gofynd/flick": "^1.0.7"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"axios-cookiejar-support": "^4.0.6",
|
|
@@ -19,11 +19,11 @@ 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;
|
|
26
25
|
user: User;
|
|
26
|
+
webhook: Webhook;
|
|
27
27
|
/**
|
|
28
28
|
* Sets the cookie for the application.
|
|
29
29
|
*
|
|
@@ -67,8 +67,8 @@ import Lead = require("./Lead/LeadApplicationClient");
|
|
|
67
67
|
import Logistic = require("./Logistic/LogisticApplicationClient");
|
|
68
68
|
import Order = require("./Order/OrderApplicationClient");
|
|
69
69
|
import Payment = require("./Payment/PaymentApplicationClient");
|
|
70
|
-
import PosCart = require("./PosCart/PosCartApplicationClient");
|
|
71
70
|
import Rewards = require("./Rewards/RewardsApplicationClient");
|
|
72
71
|
import Share = require("./Share/ShareApplicationClient");
|
|
73
72
|
import Theme = require("./Theme/ThemeApplicationClient");
|
|
74
73
|
import User = require("./User/UserApplicationClient");
|
|
74
|
+
import Webhook = require("./Webhook/WebhookApplicationClient");
|
|
@@ -9,11 +9,11 @@ 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");
|
|
16
15
|
const User = require("./User/UserApplicationClient");
|
|
16
|
+
const Webhook = require("./Webhook/WebhookApplicationClient");
|
|
17
17
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
18
18
|
const { Logger } = require("../common/Logger");
|
|
19
19
|
const { convertStringToBase64 } = require("../common/utils");
|
|
@@ -38,11 +38,11 @@ class ApplicationClient {
|
|
|
38
38
|
this.logistic = new Logistic(config);
|
|
39
39
|
this.order = new Order(config);
|
|
40
40
|
this.payment = new Payment(config);
|
|
41
|
-
this.posCart = new PosCart(config);
|
|
42
41
|
this.rewards = new Rewards(config);
|
|
43
42
|
this.share = new Share(config);
|
|
44
43
|
this.theme = new Theme(config);
|
|
45
44
|
this.user = new User(config);
|
|
45
|
+
this.webhook = new Webhook(config);
|
|
46
46
|
if (
|
|
47
47
|
typeof window != "undefined" &&
|
|
48
48
|
config.options &&
|
|
@@ -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(
|
|
@@ -220,6 +220,7 @@ export = CatalogApplicationModel;
|
|
|
220
220
|
* @typedef ProductSizes
|
|
221
221
|
* @property {ProductSize[]} [sizes]
|
|
222
222
|
* @property {ProductSizesPrice} [price]
|
|
223
|
+
* @property {ProductSizesPrice} [price_per_piece]
|
|
223
224
|
* @property {SizeChart} [size_chart]
|
|
224
225
|
* @property {boolean} [sellable]
|
|
225
226
|
* @property {boolean} [multi_size]
|
|
@@ -266,6 +267,7 @@ export = CatalogApplicationModel;
|
|
|
266
267
|
* @property {string} [name]
|
|
267
268
|
* @property {string} [value]
|
|
268
269
|
* @property {string} [slug]
|
|
270
|
+
* @property {Object} [_custom_json]
|
|
269
271
|
* @property {ProductListingAction} [action]
|
|
270
272
|
*/
|
|
271
273
|
/**
|
|
@@ -274,6 +276,7 @@ export = CatalogApplicationModel;
|
|
|
274
276
|
* @property {string} [header]
|
|
275
277
|
* @property {ProductVariantItemResponse[]} [items]
|
|
276
278
|
* @property {string} [key]
|
|
279
|
+
* @property {string} [logo]
|
|
277
280
|
*/
|
|
278
281
|
/**
|
|
279
282
|
* @typedef ProductVariantsResponse
|
|
@@ -1303,6 +1306,7 @@ declare function ProductSizes(): ProductSizes;
|
|
|
1303
1306
|
type ProductSizes = {
|
|
1304
1307
|
sizes?: ProductSize[];
|
|
1305
1308
|
price?: ProductSizesPrice;
|
|
1309
|
+
price_per_piece?: ProductSizesPrice;
|
|
1306
1310
|
size_chart?: SizeChart;
|
|
1307
1311
|
sellable?: boolean;
|
|
1308
1312
|
multi_size?: boolean;
|
|
@@ -1355,6 +1359,7 @@ type ProductVariantItemResponse = {
|
|
|
1355
1359
|
name?: string;
|
|
1356
1360
|
value?: string;
|
|
1357
1361
|
slug?: string;
|
|
1362
|
+
_custom_json?: any;
|
|
1358
1363
|
action?: ProductListingAction;
|
|
1359
1364
|
};
|
|
1360
1365
|
/** @returns {ProductVariantResponse} */
|
|
@@ -1364,6 +1369,7 @@ type ProductVariantResponse = {
|
|
|
1364
1369
|
header?: string;
|
|
1365
1370
|
items?: ProductVariantItemResponse[];
|
|
1366
1371
|
key?: string;
|
|
1372
|
+
logo?: string;
|
|
1367
1373
|
};
|
|
1368
1374
|
/** @returns {ProductVariantsResponse} */
|
|
1369
1375
|
declare function ProductVariantsResponse(): ProductVariantsResponse;
|
|
@@ -249,6 +249,7 @@ const Joi = require("joi");
|
|
|
249
249
|
* @typedef ProductSizes
|
|
250
250
|
* @property {ProductSize[]} [sizes]
|
|
251
251
|
* @property {ProductSizesPrice} [price]
|
|
252
|
+
* @property {ProductSizesPrice} [price_per_piece]
|
|
252
253
|
* @property {SizeChart} [size_chart]
|
|
253
254
|
* @property {boolean} [sellable]
|
|
254
255
|
* @property {boolean} [multi_size]
|
|
@@ -301,6 +302,7 @@ const Joi = require("joi");
|
|
|
301
302
|
* @property {string} [name]
|
|
302
303
|
* @property {string} [value]
|
|
303
304
|
* @property {string} [slug]
|
|
305
|
+
* @property {Object} [_custom_json]
|
|
304
306
|
* @property {ProductListingAction} [action]
|
|
305
307
|
*/
|
|
306
308
|
|
|
@@ -310,6 +312,7 @@ const Joi = require("joi");
|
|
|
310
312
|
* @property {string} [header]
|
|
311
313
|
* @property {ProductVariantItemResponse[]} [items]
|
|
312
314
|
* @property {string} [key]
|
|
315
|
+
* @property {string} [logo]
|
|
313
316
|
*/
|
|
314
317
|
|
|
315
318
|
/**
|
|
@@ -1400,6 +1403,7 @@ class CatalogApplicationModel {
|
|
|
1400
1403
|
return Joi.object({
|
|
1401
1404
|
sizes: Joi.array().items(CatalogApplicationModel.ProductSize()),
|
|
1402
1405
|
price: CatalogApplicationModel.ProductSizesPrice(),
|
|
1406
|
+
price_per_piece: CatalogApplicationModel.ProductSizesPrice(),
|
|
1403
1407
|
size_chart: CatalogApplicationModel.SizeChart(),
|
|
1404
1408
|
sellable: Joi.boolean(),
|
|
1405
1409
|
multi_size: Joi.boolean(),
|
|
@@ -1470,6 +1474,7 @@ class CatalogApplicationModel {
|
|
|
1470
1474
|
name: Joi.string().allow(""),
|
|
1471
1475
|
value: Joi.string().allow(""),
|
|
1472
1476
|
slug: Joi.string().allow(""),
|
|
1477
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1473
1478
|
action: CatalogApplicationModel.ProductListingAction(),
|
|
1474
1479
|
});
|
|
1475
1480
|
}
|
|
@@ -1483,6 +1488,7 @@ class CatalogApplicationModel {
|
|
|
1483
1488
|
CatalogApplicationModel.ProductVariantItemResponse()
|
|
1484
1489
|
),
|
|
1485
1490
|
key: Joi.string().allow(""),
|
|
1491
|
+
logo: Joi.string().allow(""),
|
|
1486
1492
|
});
|
|
1487
1493
|
}
|
|
1488
1494
|
|
|
@@ -119,6 +119,7 @@ export = ContentApplicationModel;
|
|
|
119
119
|
* @property {string} [reading_time]
|
|
120
120
|
* @property {string} [slug]
|
|
121
121
|
* @property {string[]} [tags]
|
|
122
|
+
* @property {string} [publish_date]
|
|
122
123
|
* @property {SEO} [seo]
|
|
123
124
|
* @property {CronSchedule} [_schedule]
|
|
124
125
|
* @property {string} [title]
|
|
@@ -727,6 +728,7 @@ type BlogSchema = {
|
|
|
727
728
|
reading_time?: string;
|
|
728
729
|
slug?: string;
|
|
729
730
|
tags?: string[];
|
|
731
|
+
publish_date?: string;
|
|
730
732
|
seo?: SEO;
|
|
731
733
|
_schedule?: CronSchedule;
|
|
732
734
|
title?: string;
|
|
@@ -136,6 +136,7 @@ const Joi = require("joi");
|
|
|
136
136
|
* @property {string} [reading_time]
|
|
137
137
|
* @property {string} [slug]
|
|
138
138
|
* @property {string[]} [tags]
|
|
139
|
+
* @property {string} [publish_date]
|
|
139
140
|
* @property {SEO} [seo]
|
|
140
141
|
* @property {CronSchedule} [_schedule]
|
|
141
142
|
* @property {string} [title]
|
|
@@ -833,6 +834,7 @@ class ContentApplicationModel {
|
|
|
833
834
|
reading_time: Joi.string().allow(""),
|
|
834
835
|
slug: Joi.string().allow(""),
|
|
835
836
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
837
|
+
publish_date: Joi.string().allow(""),
|
|
836
838
|
seo: ContentApplicationModel.SEO(),
|
|
837
839
|
_schedule: ContentApplicationModel.CronSchedule(),
|
|
838
840
|
title: Joi.string().allow(""),
|
|
@@ -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(
|
|
@@ -33,6 +33,20 @@ export = OrderApplicationModel;
|
|
|
33
33
|
* @property {string} [logo]
|
|
34
34
|
* @property {string} [display_name]
|
|
35
35
|
*/
|
|
36
|
+
/**
|
|
37
|
+
* @typedef ShipmentPaymentInfo
|
|
38
|
+
* @property {string} [mop] - Stands for "Mode of Payment". This is a short code
|
|
39
|
+
* (like "COD" for Cash On Delivery) that represents the payment method used.
|
|
40
|
+
* @property {string} [payment_mode] - Information about the payment mode,
|
|
41
|
+
* indicates whether COD or PREPAID
|
|
42
|
+
* @property {string} [status] - Indicates the current status of the payment,
|
|
43
|
+
* Paid or Unpaid
|
|
44
|
+
* @property {string} [mode] - Information about the payment source. For eg, NB_ICICI
|
|
45
|
+
* @property {string} [logo] - A URL to an image representing the payment method
|
|
46
|
+
* @property {string} [display_name] - The name of the payment method as it
|
|
47
|
+
* should be displayed to the user
|
|
48
|
+
* @property {number} [amount] - Amount paid using this payment method
|
|
49
|
+
*/
|
|
36
50
|
/**
|
|
37
51
|
* @typedef ShipmentUserInfo
|
|
38
52
|
* @property {string} [first_name]
|
|
@@ -232,7 +246,7 @@ export = OrderApplicationModel;
|
|
|
232
246
|
* @property {string[]} [tags]
|
|
233
247
|
*/
|
|
234
248
|
/**
|
|
235
|
-
* @typedef
|
|
249
|
+
* @typedef Address
|
|
236
250
|
* @property {string} [pincode]
|
|
237
251
|
* @property {string} [phone]
|
|
238
252
|
* @property {number} [latitude]
|
|
@@ -260,7 +274,9 @@ export = OrderApplicationModel;
|
|
|
260
274
|
/**
|
|
261
275
|
* @typedef Shipments
|
|
262
276
|
* @property {ShipmentPayment} [payment]
|
|
263
|
-
* @property {
|
|
277
|
+
* @property {ShipmentPaymentInfo[]} [payment_info] - "Array of objects
|
|
278
|
+
* containing payment methods used for placing an order. Each object will
|
|
279
|
+
* provide information about corresponding payment method with relevant details."
|
|
264
280
|
* @property {string} [order_type]
|
|
265
281
|
* @property {boolean} [show_download_invoice]
|
|
266
282
|
* @property {boolean} [can_cancel]
|
|
@@ -291,7 +307,8 @@ export = OrderApplicationModel;
|
|
|
291
307
|
* @property {boolean} [beneficiary_details]
|
|
292
308
|
* @property {FulfillingCompany} [fulfilling_company]
|
|
293
309
|
* @property {boolean} [can_return]
|
|
294
|
-
* @property {
|
|
310
|
+
* @property {Address} [delivery_address]
|
|
311
|
+
* @property {Address} [billing_address]
|
|
295
312
|
* @property {string} [track_url]
|
|
296
313
|
* @property {string} [order_id]
|
|
297
314
|
* @property {string} [need_help_url]
|
|
@@ -316,6 +333,7 @@ export = OrderApplicationModel;
|
|
|
316
333
|
/**
|
|
317
334
|
* @typedef OrderSchema
|
|
318
335
|
* @property {number} [total_shipments_in_order]
|
|
336
|
+
* @property {string} [gstin_code]
|
|
319
337
|
* @property {UserInfo} [user_info]
|
|
320
338
|
* @property {BreakupValues[]} [breakup_values]
|
|
321
339
|
* @property {string} [order_created_time]
|
|
@@ -536,7 +554,7 @@ export = OrderApplicationModel;
|
|
|
536
554
|
declare class OrderApplicationModel {
|
|
537
555
|
}
|
|
538
556
|
declare namespace OrderApplicationModel {
|
|
539
|
-
export { OrderPage, UserInfo, BreakupValues, ShipmentPayment, ShipmentUserInfo, FulfillingStore, ShipmentStatus, Invoice, NestedTrackingDetails, TrackingDetails, TimeStampData, Promise, ShipmentTotalDetails, Prices, ItemBrand, Item, AppliedFreeArticles, AppliedPromos, Identifiers, FinancialBreakup, CurrentStatus, Bags, FulfillingCompany, Article,
|
|
557
|
+
export { OrderPage, UserInfo, BreakupValues, ShipmentPayment, ShipmentPaymentInfo, ShipmentUserInfo, FulfillingStore, ShipmentStatus, Invoice, NestedTrackingDetails, TrackingDetails, TimeStampData, Promise, ShipmentTotalDetails, Prices, ItemBrand, Item, AppliedFreeArticles, AppliedPromos, Identifiers, FinancialBreakup, CurrentStatus, Bags, FulfillingCompany, Article, Address, Shipments, BagsForReorderArticleAssignment, BagsForReorder, OrderSchema, OrderStatuses, OrderFilters, OrderList, ApefaceApiError, OrderById, ShipmentById, ResponseGetInvoiceShipment, Track, ShipmentTrack, CustomerDetailsResponse, SendOtpToCustomerResponse, VerifyOtp, VerifyOtpResponse, BagReasonMeta, QuestionSet, BagReasons, ShipmentBagReasons, ShipmentReason, ShipmentReasons, ProductsReasonsData, ProductsReasonsFilters, ProductsReasons, EntityReasonData, EntitiesReasons, ReasonsData, Products, ProductsDataUpdatesFilters, ProductsDataUpdates, EntitiesDataUpdates, DataUpdates, ShipmentsRequest, StatuesRequest, OrderRequest, UpdateShipmentStatusRequest, StatusesBodyResponse, ShipmentApplicationStatusResponse, ErrorResponse };
|
|
540
558
|
}
|
|
541
559
|
/** @returns {OrderPage} */
|
|
542
560
|
declare function OrderPage(): OrderPage;
|
|
@@ -576,6 +594,42 @@ type ShipmentPayment = {
|
|
|
576
594
|
logo?: string;
|
|
577
595
|
display_name?: string;
|
|
578
596
|
};
|
|
597
|
+
/** @returns {ShipmentPaymentInfo} */
|
|
598
|
+
declare function ShipmentPaymentInfo(): ShipmentPaymentInfo;
|
|
599
|
+
type ShipmentPaymentInfo = {
|
|
600
|
+
/**
|
|
601
|
+
* - Stands for "Mode of Payment". This is a short code
|
|
602
|
+
* (like "COD" for Cash On Delivery) that represents the payment method used.
|
|
603
|
+
*/
|
|
604
|
+
mop?: string;
|
|
605
|
+
/**
|
|
606
|
+
* - Information about the payment mode,
|
|
607
|
+
* indicates whether COD or PREPAID
|
|
608
|
+
*/
|
|
609
|
+
payment_mode?: string;
|
|
610
|
+
/**
|
|
611
|
+
* - Indicates the current status of the payment,
|
|
612
|
+
* Paid or Unpaid
|
|
613
|
+
*/
|
|
614
|
+
status?: string;
|
|
615
|
+
/**
|
|
616
|
+
* - Information about the payment source. For eg, NB_ICICI
|
|
617
|
+
*/
|
|
618
|
+
mode?: string;
|
|
619
|
+
/**
|
|
620
|
+
* - A URL to an image representing the payment method
|
|
621
|
+
*/
|
|
622
|
+
logo?: string;
|
|
623
|
+
/**
|
|
624
|
+
* - The name of the payment method as it
|
|
625
|
+
* should be displayed to the user
|
|
626
|
+
*/
|
|
627
|
+
display_name?: string;
|
|
628
|
+
/**
|
|
629
|
+
* - Amount paid using this payment method
|
|
630
|
+
*/
|
|
631
|
+
amount?: number;
|
|
632
|
+
};
|
|
579
633
|
/** @returns {ShipmentUserInfo} */
|
|
580
634
|
declare function ShipmentUserInfo(): ShipmentUserInfo;
|
|
581
635
|
type ShipmentUserInfo = {
|
|
@@ -794,9 +848,9 @@ declare function Article(): Article;
|
|
|
794
848
|
type Article = {
|
|
795
849
|
tags?: string[];
|
|
796
850
|
};
|
|
797
|
-
/** @returns {
|
|
798
|
-
declare function
|
|
799
|
-
type
|
|
851
|
+
/** @returns {Address} */
|
|
852
|
+
declare function Address(): Address;
|
|
853
|
+
type Address = {
|
|
800
854
|
pincode?: string;
|
|
801
855
|
phone?: string;
|
|
802
856
|
latitude?: number;
|
|
@@ -825,7 +879,12 @@ type DeliveryAddress = {
|
|
|
825
879
|
declare function Shipments(): Shipments;
|
|
826
880
|
type Shipments = {
|
|
827
881
|
payment?: ShipmentPayment;
|
|
828
|
-
|
|
882
|
+
/**
|
|
883
|
+
* - "Array of objects
|
|
884
|
+
* containing payment methods used for placing an order. Each object will
|
|
885
|
+
* provide information about corresponding payment method with relevant details."
|
|
886
|
+
*/
|
|
887
|
+
payment_info?: ShipmentPaymentInfo[];
|
|
829
888
|
order_type?: string;
|
|
830
889
|
show_download_invoice?: boolean;
|
|
831
890
|
can_cancel?: boolean;
|
|
@@ -856,7 +915,8 @@ type Shipments = {
|
|
|
856
915
|
beneficiary_details?: boolean;
|
|
857
916
|
fulfilling_company?: FulfillingCompany;
|
|
858
917
|
can_return?: boolean;
|
|
859
|
-
delivery_address?:
|
|
918
|
+
delivery_address?: Address;
|
|
919
|
+
billing_address?: Address;
|
|
860
920
|
track_url?: string;
|
|
861
921
|
order_id?: string;
|
|
862
922
|
need_help_url?: string;
|
|
@@ -884,6 +944,7 @@ type BagsForReorder = {
|
|
|
884
944
|
declare function OrderSchema(): OrderSchema;
|
|
885
945
|
type OrderSchema = {
|
|
886
946
|
total_shipments_in_order?: number;
|
|
947
|
+
gstin_code?: string;
|
|
887
948
|
user_info?: UserInfo;
|
|
888
949
|
breakup_values?: BreakupValues[];
|
|
889
950
|
order_created_time?: string;
|
|
@@ -38,6 +38,21 @@ const Joi = require("joi");
|
|
|
38
38
|
* @property {string} [display_name]
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @typedef ShipmentPaymentInfo
|
|
43
|
+
* @property {string} [mop] - Stands for "Mode of Payment". This is a short code
|
|
44
|
+
* (like "COD" for Cash On Delivery) that represents the payment method used.
|
|
45
|
+
* @property {string} [payment_mode] - Information about the payment mode,
|
|
46
|
+
* indicates whether COD or PREPAID
|
|
47
|
+
* @property {string} [status] - Indicates the current status of the payment,
|
|
48
|
+
* Paid or Unpaid
|
|
49
|
+
* @property {string} [mode] - Information about the payment source. For eg, NB_ICICI
|
|
50
|
+
* @property {string} [logo] - A URL to an image representing the payment method
|
|
51
|
+
* @property {string} [display_name] - The name of the payment method as it
|
|
52
|
+
* should be displayed to the user
|
|
53
|
+
* @property {number} [amount] - Amount paid using this payment method
|
|
54
|
+
*/
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* @typedef ShipmentUserInfo
|
|
43
58
|
* @property {string} [first_name]
|
|
@@ -257,7 +272,7 @@ const Joi = require("joi");
|
|
|
257
272
|
*/
|
|
258
273
|
|
|
259
274
|
/**
|
|
260
|
-
* @typedef
|
|
275
|
+
* @typedef Address
|
|
261
276
|
* @property {string} [pincode]
|
|
262
277
|
* @property {string} [phone]
|
|
263
278
|
* @property {number} [latitude]
|
|
@@ -286,7 +301,9 @@ const Joi = require("joi");
|
|
|
286
301
|
/**
|
|
287
302
|
* @typedef Shipments
|
|
288
303
|
* @property {ShipmentPayment} [payment]
|
|
289
|
-
* @property {
|
|
304
|
+
* @property {ShipmentPaymentInfo[]} [payment_info] - "Array of objects
|
|
305
|
+
* containing payment methods used for placing an order. Each object will
|
|
306
|
+
* provide information about corresponding payment method with relevant details."
|
|
290
307
|
* @property {string} [order_type]
|
|
291
308
|
* @property {boolean} [show_download_invoice]
|
|
292
309
|
* @property {boolean} [can_cancel]
|
|
@@ -317,7 +334,8 @@ const Joi = require("joi");
|
|
|
317
334
|
* @property {boolean} [beneficiary_details]
|
|
318
335
|
* @property {FulfillingCompany} [fulfilling_company]
|
|
319
336
|
* @property {boolean} [can_return]
|
|
320
|
-
* @property {
|
|
337
|
+
* @property {Address} [delivery_address]
|
|
338
|
+
* @property {Address} [billing_address]
|
|
321
339
|
* @property {string} [track_url]
|
|
322
340
|
* @property {string} [order_id]
|
|
323
341
|
* @property {string} [need_help_url]
|
|
@@ -345,6 +363,7 @@ const Joi = require("joi");
|
|
|
345
363
|
/**
|
|
346
364
|
* @typedef OrderSchema
|
|
347
365
|
* @property {number} [total_shipments_in_order]
|
|
366
|
+
* @property {string} [gstin_code]
|
|
348
367
|
* @property {UserInfo} [user_info]
|
|
349
368
|
* @property {BreakupValues[]} [breakup_values]
|
|
350
369
|
* @property {string} [order_created_time]
|
|
@@ -647,6 +666,19 @@ class OrderApplicationModel {
|
|
|
647
666
|
});
|
|
648
667
|
}
|
|
649
668
|
|
|
669
|
+
/** @returns {ShipmentPaymentInfo} */
|
|
670
|
+
static ShipmentPaymentInfo() {
|
|
671
|
+
return Joi.object({
|
|
672
|
+
mop: Joi.string().allow(""),
|
|
673
|
+
payment_mode: Joi.string().allow(""),
|
|
674
|
+
status: Joi.string().allow(""),
|
|
675
|
+
mode: Joi.string().allow(""),
|
|
676
|
+
logo: Joi.string().allow(""),
|
|
677
|
+
display_name: Joi.string().allow(""),
|
|
678
|
+
amount: Joi.number(),
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
|
|
650
682
|
/** @returns {ShipmentUserInfo} */
|
|
651
683
|
static ShipmentUserInfo() {
|
|
652
684
|
return Joi.object({
|
|
@@ -911,8 +943,8 @@ class OrderApplicationModel {
|
|
|
911
943
|
});
|
|
912
944
|
}
|
|
913
945
|
|
|
914
|
-
/** @returns {
|
|
915
|
-
static
|
|
946
|
+
/** @returns {Address} */
|
|
947
|
+
static Address() {
|
|
916
948
|
return Joi.object({
|
|
917
949
|
pincode: Joi.string().allow(""),
|
|
918
950
|
phone: Joi.string().allow(""),
|
|
@@ -944,7 +976,9 @@ class OrderApplicationModel {
|
|
|
944
976
|
static Shipments() {
|
|
945
977
|
return Joi.object({
|
|
946
978
|
payment: OrderApplicationModel.ShipmentPayment(),
|
|
947
|
-
payment_info: Joi.array().items(
|
|
979
|
+
payment_info: Joi.array().items(
|
|
980
|
+
OrderApplicationModel.ShipmentPaymentInfo()
|
|
981
|
+
),
|
|
948
982
|
order_type: Joi.string().allow("").allow(null),
|
|
949
983
|
show_download_invoice: Joi.boolean(),
|
|
950
984
|
can_cancel: Joi.boolean(),
|
|
@@ -977,7 +1011,8 @@ class OrderApplicationModel {
|
|
|
977
1011
|
beneficiary_details: Joi.boolean(),
|
|
978
1012
|
fulfilling_company: OrderApplicationModel.FulfillingCompany(),
|
|
979
1013
|
can_return: Joi.boolean(),
|
|
980
|
-
delivery_address: OrderApplicationModel.
|
|
1014
|
+
delivery_address: OrderApplicationModel.Address(),
|
|
1015
|
+
billing_address: OrderApplicationModel.Address(),
|
|
981
1016
|
track_url: Joi.string().allow(""),
|
|
982
1017
|
order_id: Joi.string().allow(""),
|
|
983
1018
|
need_help_url: Joi.string().allow(""),
|
|
@@ -1011,6 +1046,7 @@ class OrderApplicationModel {
|
|
|
1011
1046
|
static OrderSchema() {
|
|
1012
1047
|
return Joi.object({
|
|
1013
1048
|
total_shipments_in_order: Joi.number(),
|
|
1049
|
+
gstin_code: Joi.string().allow(""),
|
|
1014
1050
|
user_info: OrderApplicationModel.UserInfo(),
|
|
1015
1051
|
breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()),
|
|
1016
1052
|
order_created_time: Joi.string().allow(""),
|
|
@@ -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
|
|