@gofynd/fdk-client-javascript 1.3.5 → 1.3.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +33 -3
- package/sdk/application/Cart/CartApplicationModel.js +38 -2
- 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/OrderPlatformModel.d.ts +8 -6
- package/sdk/platform/Order/OrderPlatformModel.js +8 -6
|
@@ -47,6 +47,22 @@ const Joi = require("joi");
|
|
|
47
47
|
* @property {string} [type]
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* @typedef AppCategoryReturnConfig
|
|
52
|
+
* @property {number} category_id - Unique identifier for L3 category
|
|
53
|
+
* @property {ProductReturnConfigBaseSerializer} return_config - Return
|
|
54
|
+
* configuration details
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @typedef AppCategoryReturnConfigResponse
|
|
59
|
+
* @property {string} [app_id] - Channel identifier
|
|
60
|
+
* @property {number} [category_id] - Unique identifer of L3 category
|
|
61
|
+
* @property {string} [logo]
|
|
62
|
+
* @property {string} [name] - Name of L3 category
|
|
63
|
+
* @property {ProductReturnConfigBaseSerializer} [return_config]
|
|
64
|
+
*/
|
|
65
|
+
|
|
50
66
|
/**
|
|
51
67
|
* @typedef AppConfiguration
|
|
52
68
|
* @property {string} app_id
|
|
@@ -184,6 +200,19 @@ const Joi = require("joi");
|
|
|
184
200
|
* @property {Object} _custom_json
|
|
185
201
|
*/
|
|
186
202
|
|
|
203
|
+
/**
|
|
204
|
+
* @typedef AppReturnConfigResponse
|
|
205
|
+
* @property {string} [app_id] - Channel identifier
|
|
206
|
+
* @property {number} [category_count] - Count of L3 category return config set
|
|
207
|
+
* for application
|
|
208
|
+
* @property {number} [company_id] - Unique identifer of company
|
|
209
|
+
* @property {Object} [created_by] - User details
|
|
210
|
+
* @property {Object} [modified_by] - User details
|
|
211
|
+
* @property {string} [modified_on] - Modification date
|
|
212
|
+
* @property {string} [return_config_level] - Configuration level of return
|
|
213
|
+
* window category|product|no-return
|
|
214
|
+
*/
|
|
215
|
+
|
|
187
216
|
/**
|
|
188
217
|
* @typedef ArticleAssignment
|
|
189
218
|
* @property {string} [level]
|
|
@@ -342,6 +371,19 @@ const Joi = require("joi");
|
|
|
342
371
|
* @property {string} [url]
|
|
343
372
|
*/
|
|
344
373
|
|
|
374
|
+
/**
|
|
375
|
+
* @typedef BaseAppCategoryReturnConfig
|
|
376
|
+
* @property {string} app_id - Channel identifier
|
|
377
|
+
* @property {number} company_id - Unique identifer of company
|
|
378
|
+
* @property {AppCategoryReturnConfig[]} data - Category level return config details
|
|
379
|
+
*/
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @typedef BaseAppCategoryReturnConfigResponse
|
|
383
|
+
* @property {AppCategoryReturnConfigResponse[]} [data]
|
|
384
|
+
* @property {PageResponse} [page]
|
|
385
|
+
*/
|
|
386
|
+
|
|
345
387
|
/**
|
|
346
388
|
* @typedef Brand
|
|
347
389
|
* @property {Logo} [logo]
|
|
@@ -934,6 +976,14 @@ const Joi = require("joi");
|
|
|
934
976
|
* @property {string[]} [words]
|
|
935
977
|
*/
|
|
936
978
|
|
|
979
|
+
/**
|
|
980
|
+
* @typedef CreateUpdateAppReturnConfig
|
|
981
|
+
* @property {string} app_id - Channel identifier
|
|
982
|
+
* @property {number} company_id - Unique identifer of company
|
|
983
|
+
* @property {string} return_config_level - Return configurtion Level
|
|
984
|
+
* category|product|no-return
|
|
985
|
+
*/
|
|
986
|
+
|
|
937
987
|
/**
|
|
938
988
|
* @typedef CrossSellingData
|
|
939
989
|
* @property {number} [articles]
|
|
@@ -966,6 +1016,13 @@ const Joi = require("joi");
|
|
|
966
1016
|
* @property {string} default_key
|
|
967
1017
|
*/
|
|
968
1018
|
|
|
1019
|
+
/**
|
|
1020
|
+
* @typedef DeleteAppCategoryReturnConfig
|
|
1021
|
+
* @property {string} app_id - Channel identifier
|
|
1022
|
+
* @property {number[]} category_ids - List of category_ids to be deleted.
|
|
1023
|
+
* @property {number} company_id - Unique identifer of company
|
|
1024
|
+
*/
|
|
1025
|
+
|
|
969
1026
|
/**
|
|
970
1027
|
* @typedef DeleteResponse
|
|
971
1028
|
* @property {string} [message]
|
|
@@ -2177,6 +2234,16 @@ const Joi = require("joi");
|
|
|
2177
2234
|
* @property {number} [size] - It is the size of each page.
|
|
2178
2235
|
*/
|
|
2179
2236
|
|
|
2237
|
+
/**
|
|
2238
|
+
* @typedef PageResponse1
|
|
2239
|
+
* @property {number} [current]
|
|
2240
|
+
* @property {boolean} [has_next]
|
|
2241
|
+
* @property {boolean} [has_previous]
|
|
2242
|
+
* @property {number} [item_total]
|
|
2243
|
+
* @property {number} [size]
|
|
2244
|
+
* @property {string} [type]
|
|
2245
|
+
*/
|
|
2246
|
+
|
|
2180
2247
|
/**
|
|
2181
2248
|
* @typedef PageResponseType
|
|
2182
2249
|
* @property {number} current
|
|
@@ -2578,6 +2645,13 @@ const Joi = require("joi");
|
|
|
2578
2645
|
* @property {number} [product_online_date]
|
|
2579
2646
|
*/
|
|
2580
2647
|
|
|
2648
|
+
/**
|
|
2649
|
+
* @typedef ProductReturnConfigBaseSerializer
|
|
2650
|
+
* @property {boolean} returnable - Boolean Flag for item returnable
|
|
2651
|
+
* @property {number} time - Valid return time for an item
|
|
2652
|
+
* @property {string} unit - Unit of return config days|hours
|
|
2653
|
+
*/
|
|
2654
|
+
|
|
2581
2655
|
/**
|
|
2582
2656
|
* @typedef ProductReturnConfigSerializer
|
|
2583
2657
|
* @property {boolean} [on_same_store]
|
|
@@ -3461,6 +3535,25 @@ class CatalogPlatformModel {
|
|
|
3461
3535
|
});
|
|
3462
3536
|
}
|
|
3463
3537
|
|
|
3538
|
+
/** @returns {AppCategoryReturnConfig} */
|
|
3539
|
+
static AppCategoryReturnConfig() {
|
|
3540
|
+
return Joi.object({
|
|
3541
|
+
category_id: Joi.number().required(),
|
|
3542
|
+
return_config: CatalogPlatformModel.ProductReturnConfigBaseSerializer().required(),
|
|
3543
|
+
});
|
|
3544
|
+
}
|
|
3545
|
+
|
|
3546
|
+
/** @returns {AppCategoryReturnConfigResponse} */
|
|
3547
|
+
static AppCategoryReturnConfigResponse() {
|
|
3548
|
+
return Joi.object({
|
|
3549
|
+
app_id: Joi.string().allow(""),
|
|
3550
|
+
category_id: Joi.number(),
|
|
3551
|
+
logo: Joi.string().allow(""),
|
|
3552
|
+
name: Joi.string().allow(""),
|
|
3553
|
+
return_config: CatalogPlatformModel.ProductReturnConfigBaseSerializer(),
|
|
3554
|
+
});
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3464
3557
|
/** @returns {AppConfiguration} */
|
|
3465
3558
|
static AppConfiguration() {
|
|
3466
3559
|
return Joi.object({
|
|
@@ -3634,6 +3727,19 @@ class CatalogPlatformModel {
|
|
|
3634
3727
|
});
|
|
3635
3728
|
}
|
|
3636
3729
|
|
|
3730
|
+
/** @returns {AppReturnConfigResponse} */
|
|
3731
|
+
static AppReturnConfigResponse() {
|
|
3732
|
+
return Joi.object({
|
|
3733
|
+
app_id: Joi.string().allow(""),
|
|
3734
|
+
category_count: Joi.number(),
|
|
3735
|
+
company_id: Joi.number(),
|
|
3736
|
+
created_by: Joi.any(),
|
|
3737
|
+
modified_by: Joi.any(),
|
|
3738
|
+
modified_on: Joi.string().allow(""),
|
|
3739
|
+
return_config_level: Joi.string().allow(""),
|
|
3740
|
+
});
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3637
3743
|
/** @returns {ArticleAssignment} */
|
|
3638
3744
|
static ArticleAssignment() {
|
|
3639
3745
|
return Joi.object({
|
|
@@ -3832,6 +3938,27 @@ class CatalogPlatformModel {
|
|
|
3832
3938
|
});
|
|
3833
3939
|
}
|
|
3834
3940
|
|
|
3941
|
+
/** @returns {BaseAppCategoryReturnConfig} */
|
|
3942
|
+
static BaseAppCategoryReturnConfig() {
|
|
3943
|
+
return Joi.object({
|
|
3944
|
+
app_id: Joi.string().allow("").required(),
|
|
3945
|
+
company_id: Joi.number().required(),
|
|
3946
|
+
data: Joi.array()
|
|
3947
|
+
.items(CatalogPlatformModel.AppCategoryReturnConfig())
|
|
3948
|
+
.required(),
|
|
3949
|
+
});
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
/** @returns {BaseAppCategoryReturnConfigResponse} */
|
|
3953
|
+
static BaseAppCategoryReturnConfigResponse() {
|
|
3954
|
+
return Joi.object({
|
|
3955
|
+
data: Joi.array().items(
|
|
3956
|
+
CatalogPlatformModel.AppCategoryReturnConfigResponse()
|
|
3957
|
+
),
|
|
3958
|
+
page: CatalogPlatformModel.PageResponse(),
|
|
3959
|
+
});
|
|
3960
|
+
}
|
|
3961
|
+
|
|
3835
3962
|
/** @returns {Brand} */
|
|
3836
3963
|
static Brand() {
|
|
3837
3964
|
return Joi.object({
|
|
@@ -4546,6 +4673,15 @@ class CatalogPlatformModel {
|
|
|
4546
4673
|
});
|
|
4547
4674
|
}
|
|
4548
4675
|
|
|
4676
|
+
/** @returns {CreateUpdateAppReturnConfig} */
|
|
4677
|
+
static CreateUpdateAppReturnConfig() {
|
|
4678
|
+
return Joi.object({
|
|
4679
|
+
app_id: Joi.string().allow("").required(),
|
|
4680
|
+
company_id: Joi.number().required(),
|
|
4681
|
+
return_config_level: Joi.string().allow("").required(),
|
|
4682
|
+
});
|
|
4683
|
+
}
|
|
4684
|
+
|
|
4549
4685
|
/** @returns {CrossSellingData} */
|
|
4550
4686
|
static CrossSellingData() {
|
|
4551
4687
|
return Joi.object({
|
|
@@ -4588,6 +4724,15 @@ class CatalogPlatformModel {
|
|
|
4588
4724
|
});
|
|
4589
4725
|
}
|
|
4590
4726
|
|
|
4727
|
+
/** @returns {DeleteAppCategoryReturnConfig} */
|
|
4728
|
+
static DeleteAppCategoryReturnConfig() {
|
|
4729
|
+
return Joi.object({
|
|
4730
|
+
app_id: Joi.string().allow("").required(),
|
|
4731
|
+
category_ids: Joi.array().items(Joi.number()).required(),
|
|
4732
|
+
company_id: Joi.number().required(),
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4735
|
+
|
|
4591
4736
|
/** @returns {DeleteResponse} */
|
|
4592
4737
|
static DeleteResponse() {
|
|
4593
4738
|
return Joi.object({
|
|
@@ -6026,6 +6171,18 @@ class CatalogPlatformModel {
|
|
|
6026
6171
|
});
|
|
6027
6172
|
}
|
|
6028
6173
|
|
|
6174
|
+
/** @returns {PageResponse1} */
|
|
6175
|
+
static PageResponse1() {
|
|
6176
|
+
return Joi.object({
|
|
6177
|
+
current: Joi.number(),
|
|
6178
|
+
has_next: Joi.boolean(),
|
|
6179
|
+
has_previous: Joi.boolean(),
|
|
6180
|
+
item_total: Joi.number(),
|
|
6181
|
+
size: Joi.number(),
|
|
6182
|
+
type: Joi.string().allow(""),
|
|
6183
|
+
});
|
|
6184
|
+
}
|
|
6185
|
+
|
|
6029
6186
|
/** @returns {PageResponseType} */
|
|
6030
6187
|
static PageResponseType() {
|
|
6031
6188
|
return Joi.object({
|
|
@@ -6503,6 +6660,15 @@ class CatalogPlatformModel {
|
|
|
6503
6660
|
});
|
|
6504
6661
|
}
|
|
6505
6662
|
|
|
6663
|
+
/** @returns {ProductReturnConfigBaseSerializer} */
|
|
6664
|
+
static ProductReturnConfigBaseSerializer() {
|
|
6665
|
+
return Joi.object({
|
|
6666
|
+
returnable: Joi.boolean().required(),
|
|
6667
|
+
time: Joi.number().required(),
|
|
6668
|
+
unit: Joi.string().allow("").required(),
|
|
6669
|
+
});
|
|
6670
|
+
}
|
|
6671
|
+
|
|
6506
6672
|
/** @returns {ProductReturnConfigSerializer} */
|
|
6507
6673
|
static ProductReturnConfigSerializer() {
|
|
6508
6674
|
return Joi.object({
|
|
@@ -1074,6 +1074,7 @@ export = OrderPlatformModel;
|
|
|
1074
1074
|
* @property {string} [external_invoice_id]
|
|
1075
1075
|
* @property {string} [invoice_url]
|
|
1076
1076
|
* @property {string} [label_url]
|
|
1077
|
+
* @property {Object} [links]
|
|
1077
1078
|
* @property {string} [store_invoice_id]
|
|
1078
1079
|
* @property {string} [updated_date]
|
|
1079
1080
|
*/
|
|
@@ -1171,7 +1172,7 @@ export = OrderPlatformModel;
|
|
|
1171
1172
|
* @property {boolean} [is_parent]
|
|
1172
1173
|
* @property {PlatformItem} [item]
|
|
1173
1174
|
* @property {number} [line_number]
|
|
1174
|
-
* @property {
|
|
1175
|
+
* @property {Object} [meta]
|
|
1175
1176
|
* @property {Object} [parent_promo_bags]
|
|
1176
1177
|
* @property {BagPaymentMethods[]} [payment_methods]
|
|
1177
1178
|
* @property {Prices} [prices]
|
|
@@ -1199,7 +1200,7 @@ export = OrderPlatformModel;
|
|
|
1199
1200
|
/**
|
|
1200
1201
|
* @typedef OrderData
|
|
1201
1202
|
* @property {string} fynd_order_id
|
|
1202
|
-
* @property {
|
|
1203
|
+
* @property {Object} [meta]
|
|
1203
1204
|
* @property {string} order_date
|
|
1204
1205
|
* @property {Object} [payment_methods]
|
|
1205
1206
|
* @property {Prices} [prices]
|
|
@@ -1835,7 +1836,7 @@ export = OrderPlatformModel;
|
|
|
1835
1836
|
* @property {ShipmentItemFulFillingStore} [fulfilling_store]
|
|
1836
1837
|
* @property {string} [invoice_id]
|
|
1837
1838
|
* @property {boolean} [lock_status]
|
|
1838
|
-
* @property {
|
|
1839
|
+
* @property {Object} [meta]
|
|
1839
1840
|
* @property {string} [mode_of_payment]
|
|
1840
1841
|
* @property {string} [order_date]
|
|
1841
1842
|
* @property {string} order_id
|
|
@@ -3738,6 +3739,7 @@ type InvoiceInfo = {
|
|
|
3738
3739
|
external_invoice_id?: string;
|
|
3739
3740
|
invoice_url?: string;
|
|
3740
3741
|
label_url?: string;
|
|
3742
|
+
links?: any;
|
|
3741
3743
|
store_invoice_id?: string;
|
|
3742
3744
|
updated_date?: string;
|
|
3743
3745
|
};
|
|
@@ -3845,7 +3847,7 @@ type OrderBags = {
|
|
|
3845
3847
|
is_parent?: boolean;
|
|
3846
3848
|
item?: PlatformItem;
|
|
3847
3849
|
line_number?: number;
|
|
3848
|
-
meta?:
|
|
3850
|
+
meta?: any;
|
|
3849
3851
|
parent_promo_bags?: any;
|
|
3850
3852
|
payment_methods?: BagPaymentMethods[];
|
|
3851
3853
|
prices?: Prices;
|
|
@@ -3876,7 +3878,7 @@ type OrderConfig = {
|
|
|
3876
3878
|
declare function OrderData(): OrderData;
|
|
3877
3879
|
type OrderData = {
|
|
3878
3880
|
fynd_order_id: string;
|
|
3879
|
-
meta?:
|
|
3881
|
+
meta?: any;
|
|
3880
3882
|
order_date: string;
|
|
3881
3883
|
payment_methods?: any;
|
|
3882
3884
|
prices?: Prices;
|
|
@@ -4634,7 +4636,7 @@ type ShipmentItem = {
|
|
|
4634
4636
|
fulfilling_store?: ShipmentItemFulFillingStore;
|
|
4635
4637
|
invoice_id?: string;
|
|
4636
4638
|
lock_status?: boolean;
|
|
4637
|
-
meta?:
|
|
4639
|
+
meta?: any;
|
|
4638
4640
|
mode_of_payment?: string;
|
|
4639
4641
|
order_date?: string;
|
|
4640
4642
|
order_id: string;
|
|
@@ -1192,6 +1192,7 @@ const Joi = require("joi");
|
|
|
1192
1192
|
* @property {string} [external_invoice_id]
|
|
1193
1193
|
* @property {string} [invoice_url]
|
|
1194
1194
|
* @property {string} [label_url]
|
|
1195
|
+
* @property {Object} [links]
|
|
1195
1196
|
* @property {string} [store_invoice_id]
|
|
1196
1197
|
* @property {string} [updated_date]
|
|
1197
1198
|
*/
|
|
@@ -1299,7 +1300,7 @@ const Joi = require("joi");
|
|
|
1299
1300
|
* @property {boolean} [is_parent]
|
|
1300
1301
|
* @property {PlatformItem} [item]
|
|
1301
1302
|
* @property {number} [line_number]
|
|
1302
|
-
* @property {
|
|
1303
|
+
* @property {Object} [meta]
|
|
1303
1304
|
* @property {Object} [parent_promo_bags]
|
|
1304
1305
|
* @property {BagPaymentMethods[]} [payment_methods]
|
|
1305
1306
|
* @property {Prices} [prices]
|
|
@@ -1330,7 +1331,7 @@ const Joi = require("joi");
|
|
|
1330
1331
|
/**
|
|
1331
1332
|
* @typedef OrderData
|
|
1332
1333
|
* @property {string} fynd_order_id
|
|
1333
|
-
* @property {
|
|
1334
|
+
* @property {Object} [meta]
|
|
1334
1335
|
* @property {string} order_date
|
|
1335
1336
|
* @property {Object} [payment_methods]
|
|
1336
1337
|
* @property {Prices} [prices]
|
|
@@ -2037,7 +2038,7 @@ const Joi = require("joi");
|
|
|
2037
2038
|
* @property {ShipmentItemFulFillingStore} [fulfilling_store]
|
|
2038
2039
|
* @property {string} [invoice_id]
|
|
2039
2040
|
* @property {boolean} [lock_status]
|
|
2040
|
-
* @property {
|
|
2041
|
+
* @property {Object} [meta]
|
|
2041
2042
|
* @property {string} [mode_of_payment]
|
|
2042
2043
|
* @property {string} [order_date]
|
|
2043
2044
|
* @property {string} order_id
|
|
@@ -4060,6 +4061,7 @@ class OrderPlatformModel {
|
|
|
4060
4061
|
external_invoice_id: Joi.string().allow("").allow(null),
|
|
4061
4062
|
invoice_url: Joi.string().allow("").allow(null),
|
|
4062
4063
|
label_url: Joi.string().allow("").allow(null),
|
|
4064
|
+
links: Joi.object().pattern(/\S/, Joi.any()),
|
|
4063
4065
|
store_invoice_id: Joi.string().allow("").allow(null),
|
|
4064
4066
|
updated_date: Joi.string().allow("").allow(null),
|
|
4065
4067
|
});
|
|
@@ -4189,7 +4191,7 @@ class OrderPlatformModel {
|
|
|
4189
4191
|
is_parent: Joi.boolean().allow(null),
|
|
4190
4192
|
item: OrderPlatformModel.PlatformItem(),
|
|
4191
4193
|
line_number: Joi.number().allow(null),
|
|
4192
|
-
meta:
|
|
4194
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4193
4195
|
parent_promo_bags: Joi.any().allow(null),
|
|
4194
4196
|
payment_methods: Joi.array().items(
|
|
4195
4197
|
OrderPlatformModel.BagPaymentMethods()
|
|
@@ -4230,7 +4232,7 @@ class OrderPlatformModel {
|
|
|
4230
4232
|
static OrderData() {
|
|
4231
4233
|
return Joi.object({
|
|
4232
4234
|
fynd_order_id: Joi.string().allow("").required(),
|
|
4233
|
-
meta:
|
|
4235
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
4234
4236
|
order_date: Joi.string().allow("").required(),
|
|
4235
4237
|
payment_methods: Joi.any().allow(null),
|
|
4236
4238
|
prices: OrderPlatformModel.Prices(),
|
|
@@ -5089,7 +5091,7 @@ class OrderPlatformModel {
|
|
|
5089
5091
|
fulfilling_store: OrderPlatformModel.ShipmentItemFulFillingStore(),
|
|
5090
5092
|
invoice_id: Joi.string().allow("").allow(null),
|
|
5091
5093
|
lock_status: Joi.boolean().allow(null),
|
|
5092
|
-
meta:
|
|
5094
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
5093
5095
|
mode_of_payment: Joi.string().allow(""),
|
|
5094
5096
|
order_date: Joi.string().allow("").allow(null),
|
|
5095
5097
|
order_id: Joi.string().allow("").required(),
|