@gofynd/fdk-client-javascript 1.3.5 → 1.3.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/Cart/CartApplicationModel.d.ts +33 -3
- package/sdk/application/Cart/CartApplicationModel.js +38 -2
- package/sdk/common/AxiosHelper.js +3 -3
- package/sdk/common/BaseOAuthClient.js +1 -1
- package/sdk/partner/OAuthClient.d.ts +5 -4
- package/sdk/partner/OAuthClient.js +78 -9
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +86 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +533 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +54 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +74 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +212 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +166 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +77 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +52 -11
- package/sdk/platform/Order/OrderPlatformModel.js +60 -10
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +20 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -0
|
@@ -391,6 +391,21 @@ const Joi = require("joi");
|
|
|
391
391
|
* @property {string} [mode]
|
|
392
392
|
*/
|
|
393
393
|
|
|
394
|
+
/**
|
|
395
|
+
* @typedef BagReasonMeta
|
|
396
|
+
* @property {boolean} [show_text_area]
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* @typedef BagReasons
|
|
401
|
+
* @property {string} [display_name]
|
|
402
|
+
* @property {number} [id]
|
|
403
|
+
* @property {BagReasonMeta} [meta]
|
|
404
|
+
* @property {string[]} [qc_type]
|
|
405
|
+
* @property {QuestionSet[]} [question_set]
|
|
406
|
+
* @property {BagReasons[]} [reasons]
|
|
407
|
+
*/
|
|
408
|
+
|
|
394
409
|
/**
|
|
395
410
|
* @typedef BagReturnableCancelableStatus
|
|
396
411
|
* @property {boolean} can_be_cancelled
|
|
@@ -1192,6 +1207,7 @@ const Joi = require("joi");
|
|
|
1192
1207
|
* @property {string} [external_invoice_id]
|
|
1193
1208
|
* @property {string} [invoice_url]
|
|
1194
1209
|
* @property {string} [label_url]
|
|
1210
|
+
* @property {Object} [links]
|
|
1195
1211
|
* @property {string} [store_invoice_id]
|
|
1196
1212
|
* @property {string} [updated_date]
|
|
1197
1213
|
*/
|
|
@@ -1299,7 +1315,7 @@ const Joi = require("joi");
|
|
|
1299
1315
|
* @property {boolean} [is_parent]
|
|
1300
1316
|
* @property {PlatformItem} [item]
|
|
1301
1317
|
* @property {number} [line_number]
|
|
1302
|
-
* @property {
|
|
1318
|
+
* @property {Object} [meta]
|
|
1303
1319
|
* @property {Object} [parent_promo_bags]
|
|
1304
1320
|
* @property {BagPaymentMethods[]} [payment_methods]
|
|
1305
1321
|
* @property {Prices} [prices]
|
|
@@ -1330,7 +1346,7 @@ const Joi = require("joi");
|
|
|
1330
1346
|
/**
|
|
1331
1347
|
* @typedef OrderData
|
|
1332
1348
|
* @property {string} fynd_order_id
|
|
1333
|
-
* @property {
|
|
1349
|
+
* @property {Object} [meta]
|
|
1334
1350
|
* @property {string} order_date
|
|
1335
1351
|
* @property {Object} [payment_methods]
|
|
1336
1352
|
* @property {Prices} [prices]
|
|
@@ -1961,6 +1977,12 @@ const Joi = require("joi");
|
|
|
1961
1977
|
* @property {ProcessingDates} [processing_dates]
|
|
1962
1978
|
*/
|
|
1963
1979
|
|
|
1980
|
+
/**
|
|
1981
|
+
* @typedef ShipmentBagReasons
|
|
1982
|
+
* @property {BagReasons[]} [reasons]
|
|
1983
|
+
* @property {boolean} [success]
|
|
1984
|
+
*/
|
|
1985
|
+
|
|
1964
1986
|
/**
|
|
1965
1987
|
* @typedef ShipmentConfig
|
|
1966
1988
|
* @property {string} action
|
|
@@ -2037,7 +2059,7 @@ const Joi = require("joi");
|
|
|
2037
2059
|
* @property {ShipmentItemFulFillingStore} [fulfilling_store]
|
|
2038
2060
|
* @property {string} [invoice_id]
|
|
2039
2061
|
* @property {boolean} [lock_status]
|
|
2040
|
-
* @property {
|
|
2062
|
+
* @property {Object} [meta]
|
|
2041
2063
|
* @property {string} [mode_of_payment]
|
|
2042
2064
|
* @property {string} [order_date]
|
|
2043
2065
|
* @property {string} order_id
|
|
@@ -2582,11 +2604,11 @@ const Joi = require("joi");
|
|
|
2582
2604
|
|
|
2583
2605
|
/**
|
|
2584
2606
|
* @typedef UserInfo
|
|
2585
|
-
* @property {string} email
|
|
2586
2607
|
* @property {string} first_name
|
|
2587
2608
|
* @property {string} [gender]
|
|
2588
2609
|
* @property {string} [last_name]
|
|
2589
|
-
* @property {string}
|
|
2610
|
+
* @property {string} primary_email
|
|
2611
|
+
* @property {string} primary_mobile_number
|
|
2590
2612
|
* @property {string} [user_id]
|
|
2591
2613
|
* @property {string} [user_type]
|
|
2592
2614
|
*/
|
|
@@ -3093,6 +3115,25 @@ class OrderPlatformModel {
|
|
|
3093
3115
|
});
|
|
3094
3116
|
}
|
|
3095
3117
|
|
|
3118
|
+
/** @returns {BagReasonMeta} */
|
|
3119
|
+
static BagReasonMeta() {
|
|
3120
|
+
return Joi.object({
|
|
3121
|
+
show_text_area: Joi.boolean(),
|
|
3122
|
+
});
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
/** @returns {BagReasons} */
|
|
3126
|
+
static BagReasons() {
|
|
3127
|
+
return Joi.object({
|
|
3128
|
+
display_name: Joi.string().allow(""),
|
|
3129
|
+
id: Joi.number(),
|
|
3130
|
+
meta: OrderPlatformModel.BagReasonMeta(),
|
|
3131
|
+
qc_type: Joi.array().items(Joi.string().allow("")),
|
|
3132
|
+
question_set: Joi.array().items(OrderPlatformModel.QuestionSet()),
|
|
3133
|
+
reasons: Joi.array().items(Joi.link("#BagReasons")),
|
|
3134
|
+
}).id("BagReasons");
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3096
3137
|
/** @returns {BagReturnableCancelableStatus} */
|
|
3097
3138
|
static BagReturnableCancelableStatus() {
|
|
3098
3139
|
return Joi.object({
|
|
@@ -4060,6 +4101,7 @@ class OrderPlatformModel {
|
|
|
4060
4101
|
external_invoice_id: Joi.string().allow("").allow(null),
|
|
4061
4102
|
invoice_url: Joi.string().allow("").allow(null),
|
|
4062
4103
|
label_url: Joi.string().allow("").allow(null),
|
|
4104
|
+
links: Joi.object().pattern(/\S/, Joi.any()),
|
|
4063
4105
|
store_invoice_id: Joi.string().allow("").allow(null),
|
|
4064
4106
|
updated_date: Joi.string().allow("").allow(null),
|
|
4065
4107
|
});
|
|
@@ -4189,7 +4231,7 @@ class OrderPlatformModel {
|
|
|
4189
4231
|
is_parent: Joi.boolean().allow(null),
|
|
4190
4232
|
item: OrderPlatformModel.PlatformItem(),
|
|
4191
4233
|
line_number: Joi.number().allow(null),
|
|
4192
|
-
meta:
|
|
4234
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4193
4235
|
parent_promo_bags: Joi.any().allow(null),
|
|
4194
4236
|
payment_methods: Joi.array().items(
|
|
4195
4237
|
OrderPlatformModel.BagPaymentMethods()
|
|
@@ -4230,7 +4272,7 @@ class OrderPlatformModel {
|
|
|
4230
4272
|
static OrderData() {
|
|
4231
4273
|
return Joi.object({
|
|
4232
4274
|
fynd_order_id: Joi.string().allow("").required(),
|
|
4233
|
-
meta:
|
|
4275
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4234
4276
|
order_date: Joi.string().allow("").required(),
|
|
4235
4277
|
payment_methods: Joi.any().allow(null),
|
|
4236
4278
|
prices: OrderPlatformModel.Prices(),
|
|
@@ -4992,6 +5034,14 @@ class OrderPlatformModel {
|
|
|
4992
5034
|
});
|
|
4993
5035
|
}
|
|
4994
5036
|
|
|
5037
|
+
/** @returns {ShipmentBagReasons} */
|
|
5038
|
+
static ShipmentBagReasons() {
|
|
5039
|
+
return Joi.object({
|
|
5040
|
+
reasons: Joi.array().items(OrderPlatformModel.BagReasons()),
|
|
5041
|
+
success: Joi.boolean(),
|
|
5042
|
+
});
|
|
5043
|
+
}
|
|
5044
|
+
|
|
4995
5045
|
/** @returns {ShipmentConfig} */
|
|
4996
5046
|
static ShipmentConfig() {
|
|
4997
5047
|
return Joi.object({
|
|
@@ -5089,7 +5139,7 @@ class OrderPlatformModel {
|
|
|
5089
5139
|
fulfilling_store: OrderPlatformModel.ShipmentItemFulFillingStore(),
|
|
5090
5140
|
invoice_id: Joi.string().allow("").allow(null),
|
|
5091
5141
|
lock_status: Joi.boolean().allow(null),
|
|
5092
|
-
meta:
|
|
5142
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
5093
5143
|
mode_of_payment: Joi.string().allow(""),
|
|
5094
5144
|
order_date: Joi.string().allow("").allow(null),
|
|
5095
5145
|
order_id: Joi.string().allow("").required(),
|
|
@@ -5726,11 +5776,11 @@ class OrderPlatformModel {
|
|
|
5726
5776
|
/** @returns {UserInfo} */
|
|
5727
5777
|
static UserInfo() {
|
|
5728
5778
|
return Joi.object({
|
|
5729
|
-
email: Joi.string().allow("").required(),
|
|
5730
5779
|
first_name: Joi.string().allow("").required(),
|
|
5731
5780
|
gender: Joi.string().allow(""),
|
|
5732
5781
|
last_name: Joi.string().allow(""),
|
|
5733
|
-
|
|
5782
|
+
primary_email: Joi.string().allow("").required(),
|
|
5783
|
+
primary_mobile_number: Joi.string().allow("").required(),
|
|
5734
5784
|
user_id: Joi.string().allow(""),
|
|
5735
5785
|
user_type: Joi.string().allow(""),
|
|
5736
5786
|
});
|
|
@@ -154,6 +154,12 @@ export = OrderPlatformValidator;
|
|
|
154
154
|
* @property {string} [orderType]
|
|
155
155
|
*/
|
|
156
156
|
/** @typedef GetRoleBasedActionsParam */
|
|
157
|
+
/**
|
|
158
|
+
* @typedef GetShipmentBagReasonsParam
|
|
159
|
+
* @property {string} shipmentId - ID of the bag. An order may contain multiple
|
|
160
|
+
* items and may get divided into one or more shipment, each having its own ID.
|
|
161
|
+
* @property {number} lineNumber - Line number of bag.
|
|
162
|
+
*/
|
|
157
163
|
/**
|
|
158
164
|
* @typedef GetShipmentByIdParam
|
|
159
165
|
* @property {string} [channelShipmentId] - App Shipment Id
|
|
@@ -333,6 +339,8 @@ declare class OrderPlatformValidator {
|
|
|
333
339
|
static getOrders(): GetOrdersParam;
|
|
334
340
|
/** @returns {GetRoleBasedActionsParam} */
|
|
335
341
|
static getRoleBasedActions(): any;
|
|
342
|
+
/** @returns {GetShipmentBagReasonsParam} */
|
|
343
|
+
static getShipmentBagReasons(): GetShipmentBagReasonsParam;
|
|
336
344
|
/** @returns {GetShipmentByIdParam} */
|
|
337
345
|
static getShipmentById(): GetShipmentByIdParam;
|
|
338
346
|
/** @returns {GetShipmentHistoryParam} */
|
|
@@ -377,7 +385,7 @@ declare class OrderPlatformValidator {
|
|
|
377
385
|
static verifyMobileOTP(): VerifyMobileOTPParam;
|
|
378
386
|
}
|
|
379
387
|
declare namespace OrderPlatformValidator {
|
|
380
|
-
export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam };
|
|
388
|
+
export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentBagReasonsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam };
|
|
381
389
|
}
|
|
382
390
|
type AttachOrderUserParam = {
|
|
383
391
|
body: OrderPlatformModel.AttachOrderUser;
|
|
@@ -655,6 +663,17 @@ type GetOrdersParam = {
|
|
|
655
663
|
customerId?: string;
|
|
656
664
|
orderType?: string;
|
|
657
665
|
};
|
|
666
|
+
type GetShipmentBagReasonsParam = {
|
|
667
|
+
/**
|
|
668
|
+
* - ID of the bag. An order may contain multiple
|
|
669
|
+
* items and may get divided into one or more shipment, each having its own ID.
|
|
670
|
+
*/
|
|
671
|
+
shipmentId: string;
|
|
672
|
+
/**
|
|
673
|
+
* - Line number of bag.
|
|
674
|
+
*/
|
|
675
|
+
lineNumber: number;
|
|
676
|
+
};
|
|
658
677
|
type GetShipmentByIdParam = {
|
|
659
678
|
/**
|
|
660
679
|
* - App Shipment Id
|
|
@@ -180,6 +180,13 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
180
180
|
|
|
181
181
|
/** @typedef GetRoleBasedActionsParam */
|
|
182
182
|
|
|
183
|
+
/**
|
|
184
|
+
* @typedef GetShipmentBagReasonsParam
|
|
185
|
+
* @property {string} shipmentId - ID of the bag. An order may contain multiple
|
|
186
|
+
* items and may get divided into one or more shipment, each having its own ID.
|
|
187
|
+
* @property {number} lineNumber - Line number of bag.
|
|
188
|
+
*/
|
|
189
|
+
|
|
183
190
|
/**
|
|
184
191
|
* @typedef GetShipmentByIdParam
|
|
185
192
|
* @property {string} [channelShipmentId] - App Shipment Id
|
|
@@ -553,6 +560,14 @@ class OrderPlatformValidator {
|
|
|
553
560
|
return Joi.object({}).required();
|
|
554
561
|
}
|
|
555
562
|
|
|
563
|
+
/** @returns {GetShipmentBagReasonsParam} */
|
|
564
|
+
static getShipmentBagReasons() {
|
|
565
|
+
return Joi.object({
|
|
566
|
+
shipmentId: Joi.string().allow("").required(),
|
|
567
|
+
lineNumber: Joi.number().required(),
|
|
568
|
+
}).required();
|
|
569
|
+
}
|
|
570
|
+
|
|
556
571
|
/** @returns {GetShipmentByIdParam} */
|
|
557
572
|
static getShipmentById() {
|
|
558
573
|
return Joi.object({
|