@gofynd/fdk-client-javascript 1.1.2 → 1.1.3
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 -2
- package/index.d.ts +4 -7
- package/index.js +5 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
- package/sdk/application/Cart/CartApplicationClient.js +105 -10
- package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
- package/sdk/application/Cart/CartApplicationModel.js +105 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
- package/sdk/application/Cart/CartApplicationValidator.js +15 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.js +18 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
- package/sdk/platform/Cart/CartPlatformModel.js +580 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +3 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
- package/sdk/platform/Order/OrderPlatformClient.js +541 -114
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +569 -159
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
- package/sdk/platform/PlatformApplicationClient.js +1259 -1035
- package/sdk/platform/PlatformClient.d.ts +9888 -8286
- package/sdk/platform/PlatformClient.js +10960 -9038
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -17,6 +17,7 @@ class CartModel {
|
|
|
17
17
|
static AddCartRequest() {
|
|
18
18
|
return Joi.object({
|
|
19
19
|
items: Joi.array().items(CartModel.AddProductCart()),
|
|
20
|
+
new_cart: Joi.boolean(),
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
static AddProductCart() {
|
|
@@ -28,6 +29,7 @@ class CartModel {
|
|
|
28
29
|
extra_meta: Joi.any(),
|
|
29
30
|
item_id: Joi.number(),
|
|
30
31
|
item_size: Joi.string().allow(""),
|
|
32
|
+
meta: Joi.any(),
|
|
31
33
|
parent_item_identifiers: Joi.array().items(
|
|
32
34
|
Joi.object().pattern(/\S/, Joi.string().allow(""))
|
|
33
35
|
),
|
|
@@ -40,6 +42,7 @@ class CartModel {
|
|
|
40
42
|
}
|
|
41
43
|
static Address() {
|
|
42
44
|
return Joi.object({
|
|
45
|
+
_custom_json: Joi.any(),
|
|
43
46
|
address: Joi.string().allow(""),
|
|
44
47
|
address_type: Joi.string().allow(""),
|
|
45
48
|
area: Joi.string().allow(""),
|
|
@@ -51,6 +54,7 @@ class CartModel {
|
|
|
51
54
|
country_code: Joi.string().allow(""),
|
|
52
55
|
country_iso_code: Joi.string().allow(""),
|
|
53
56
|
country_phone_code: Joi.string().allow(""),
|
|
57
|
+
created_by_user_id: Joi.string().allow(""),
|
|
54
58
|
email: Joi.string().allow(""),
|
|
55
59
|
geo_location: CartModel.GeoLocation(),
|
|
56
60
|
google_map_point: Joi.any(),
|
|
@@ -95,6 +99,11 @@ class CartModel {
|
|
|
95
99
|
coupon_code: Joi.string().allow("").required(),
|
|
96
100
|
});
|
|
97
101
|
}
|
|
102
|
+
static ArticleGiftDetail() {
|
|
103
|
+
return Joi.object({
|
|
104
|
+
article_id: CartModel.GiftDetail(),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
98
107
|
static ArticlePriceInfo() {
|
|
99
108
|
return Joi.object({
|
|
100
109
|
base: CartModel.BasePrice(),
|
|
@@ -154,14 +163,41 @@ class CartModel {
|
|
|
154
163
|
billing_address_id: Joi.string().allow(""),
|
|
155
164
|
callback_url: Joi.string().allow("").allow(null),
|
|
156
165
|
custom_meta: Joi.array().items(CartModel.CartCheckoutCustomMeta()),
|
|
166
|
+
customer_details: CartModel.CustomerDetails(),
|
|
167
|
+
delivery_address: Joi.any(),
|
|
168
|
+
extra_meta: Joi.any(),
|
|
169
|
+
id: Joi.string().allow("").allow(null),
|
|
170
|
+
merchant_code: Joi.string().allow(""),
|
|
171
|
+
meta: Joi.any(),
|
|
172
|
+
order_type: Joi.string().allow(""),
|
|
173
|
+
ordering_store: Joi.number().allow(null),
|
|
174
|
+
payment_auto_confirm: Joi.boolean(),
|
|
175
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
176
|
+
payment_mode: Joi.string().allow("").required(),
|
|
177
|
+
payment_params: Joi.any().allow(null),
|
|
178
|
+
staff: CartModel.StaffCheckout(),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
static CartCheckoutDetailV2Request() {
|
|
182
|
+
return Joi.object({
|
|
183
|
+
address_id: Joi.string().allow(""),
|
|
184
|
+
aggregator: Joi.string().allow(""),
|
|
185
|
+
billing_address: Joi.any(),
|
|
186
|
+
billing_address_id: Joi.string().allow(""),
|
|
187
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
188
|
+
cart_id: Joi.string().allow(""),
|
|
189
|
+
custom_meta: Joi.any(),
|
|
190
|
+
customer_details: CartModel.CustomerDetails(),
|
|
157
191
|
delivery_address: Joi.any(),
|
|
158
192
|
extra_meta: Joi.any(),
|
|
193
|
+
id: Joi.string().allow("").allow(null),
|
|
159
194
|
merchant_code: Joi.string().allow(""),
|
|
160
195
|
meta: Joi.any(),
|
|
161
196
|
order_type: Joi.string().allow(""),
|
|
162
197
|
ordering_store: Joi.number().allow(null),
|
|
163
198
|
payment_auto_confirm: Joi.boolean(),
|
|
164
199
|
payment_identifier: Joi.string().allow("").allow(null),
|
|
200
|
+
payment_methods: Joi.array().items(CartModel.PaymentMethod()).required(),
|
|
165
201
|
payment_mode: Joi.string().allow("").required(),
|
|
166
202
|
payment_params: Joi.any().allow(null),
|
|
167
203
|
staff: CartModel.StaffCheckout(),
|
|
@@ -202,6 +238,8 @@ class CartModel {
|
|
|
202
238
|
items: Joi.array().items(CartModel.CartProductInfo()),
|
|
203
239
|
last_modified: Joi.string().allow(""),
|
|
204
240
|
message: Joi.string().allow(""),
|
|
241
|
+
pan_config: Joi.any(),
|
|
242
|
+
pan_no: Joi.string().allow(""),
|
|
205
243
|
payment_selection_lock: CartModel.PaymentSelectionLock(),
|
|
206
244
|
restrict_checkout: Joi.boolean(),
|
|
207
245
|
});
|
|
@@ -220,23 +258,30 @@ class CartModel {
|
|
|
220
258
|
return Joi.object({
|
|
221
259
|
checkout_mode: Joi.string().allow(""),
|
|
222
260
|
comment: Joi.string().allow(""),
|
|
261
|
+
delivery_slots: Joi.any(),
|
|
262
|
+
gift_details: CartModel.ArticleGiftDetail(),
|
|
223
263
|
gstin: Joi.string().allow(""),
|
|
224
264
|
pick_up_customer_details: Joi.any(),
|
|
225
265
|
});
|
|
226
266
|
}
|
|
227
267
|
static CartMetaResponse() {
|
|
228
268
|
return Joi.object({
|
|
269
|
+
is_valid: Joi.boolean(),
|
|
229
270
|
message: Joi.string().allow(""),
|
|
230
271
|
});
|
|
231
272
|
}
|
|
232
273
|
static CartProduct() {
|
|
233
274
|
return Joi.object({
|
|
275
|
+
_custom_json: Joi.any(),
|
|
234
276
|
action: CartModel.ProductAction(),
|
|
235
277
|
brand: CartModel.BaseInfo(),
|
|
236
278
|
categories: Joi.array().items(CartModel.CategoryInfo()),
|
|
237
279
|
images: Joi.array().items(CartModel.ProductImage()),
|
|
280
|
+
item_code: Joi.string().allow("").allow(null),
|
|
238
281
|
name: Joi.string().allow(""),
|
|
239
282
|
slug: Joi.string().allow(""),
|
|
283
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
284
|
+
teaser_tag: CartModel.Tags(),
|
|
240
285
|
type: Joi.string().allow(""),
|
|
241
286
|
uid: Joi.number(),
|
|
242
287
|
});
|
|
@@ -251,7 +296,9 @@ class CartModel {
|
|
|
251
296
|
article: CartModel.ProductArticle(),
|
|
252
297
|
availability: CartModel.ProductAvailability(),
|
|
253
298
|
bulk_offer: Joi.any(),
|
|
299
|
+
coupon: CartModel.CouponDetails(),
|
|
254
300
|
coupon_message: Joi.string().allow(""),
|
|
301
|
+
custom_order: Joi.any(),
|
|
255
302
|
delivery_promise: CartModel.ShipmentPromise(),
|
|
256
303
|
discount: Joi.string().allow(""),
|
|
257
304
|
identifiers: CartModel.CartProductIdentifer().required(),
|
|
@@ -363,11 +410,19 @@ class CartModel {
|
|
|
363
410
|
value: Joi.number(),
|
|
364
411
|
});
|
|
365
412
|
}
|
|
413
|
+
static CouponDetails() {
|
|
414
|
+
return Joi.object({
|
|
415
|
+
code: Joi.string().allow(""),
|
|
416
|
+
discount_single_quantity: Joi.number(),
|
|
417
|
+
discount_total_quantity: Joi.number(),
|
|
418
|
+
});
|
|
419
|
+
}
|
|
366
420
|
static CouponValidity() {
|
|
367
421
|
return Joi.object({
|
|
368
422
|
code: Joi.string().allow("").allow(null),
|
|
369
423
|
discount: Joi.number(),
|
|
370
424
|
display_message_en: Joi.string().allow("").allow(null),
|
|
425
|
+
next_validation_required: Joi.boolean().allow(null),
|
|
371
426
|
title: Joi.string().allow(""),
|
|
372
427
|
valid: Joi.boolean(),
|
|
373
428
|
});
|
|
@@ -378,6 +433,13 @@ class CartModel {
|
|
|
378
433
|
symbol: Joi.string().allow(""),
|
|
379
434
|
});
|
|
380
435
|
}
|
|
436
|
+
static CustomerDetails() {
|
|
437
|
+
return Joi.object({
|
|
438
|
+
email: Joi.string().allow("").allow(null),
|
|
439
|
+
mobile: Joi.string().allow("").required(),
|
|
440
|
+
name: Joi.string().allow(""),
|
|
441
|
+
});
|
|
442
|
+
}
|
|
381
443
|
static DeleteAddressResponse() {
|
|
382
444
|
return Joi.object({
|
|
383
445
|
id: Joi.string().allow(""),
|
|
@@ -458,6 +520,12 @@ class CartModel {
|
|
|
458
520
|
token: Joi.string().allow(""),
|
|
459
521
|
});
|
|
460
522
|
}
|
|
523
|
+
static GiftDetail() {
|
|
524
|
+
return Joi.object({
|
|
525
|
+
gift_message: Joi.string().allow(""),
|
|
526
|
+
is_gift_applied: Joi.boolean(),
|
|
527
|
+
});
|
|
528
|
+
}
|
|
461
529
|
static LadderOfferItem() {
|
|
462
530
|
return Joi.object({
|
|
463
531
|
margin: Joi.number(),
|
|
@@ -558,6 +626,23 @@ class CartModel {
|
|
|
558
626
|
success: Joi.boolean().required(),
|
|
559
627
|
});
|
|
560
628
|
}
|
|
629
|
+
static PaymentMeta() {
|
|
630
|
+
return Joi.object({
|
|
631
|
+
merchant_code: Joi.string().allow(""),
|
|
632
|
+
payment_gateway: Joi.string().allow(""),
|
|
633
|
+
payment_identifier: Joi.string().allow("").allow(null),
|
|
634
|
+
type: Joi.string().allow(""),
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
static PaymentMethod() {
|
|
638
|
+
return Joi.object({
|
|
639
|
+
amount: Joi.number().allow(null),
|
|
640
|
+
mode: Joi.string().allow("").required(),
|
|
641
|
+
name: Joi.string().allow(""),
|
|
642
|
+
payment: Joi.string().allow(""),
|
|
643
|
+
payment_meta: CartModel.PaymentMeta().required(),
|
|
644
|
+
});
|
|
645
|
+
}
|
|
561
646
|
static PaymentSelectionLock() {
|
|
562
647
|
return Joi.object({
|
|
563
648
|
default_options: Joi.string().allow(""),
|
|
@@ -575,8 +660,13 @@ class CartModel {
|
|
|
575
660
|
static ProductArticle() {
|
|
576
661
|
return Joi.object({
|
|
577
662
|
_custom_json: Joi.any(),
|
|
663
|
+
cart_item_meta: Joi.any(),
|
|
578
664
|
extra_meta: Joi.any(),
|
|
665
|
+
gift_card: Joi.any(),
|
|
579
666
|
identifier: Joi.any(),
|
|
667
|
+
is_gift_visible: Joi.boolean(),
|
|
668
|
+
meta: Joi.any(),
|
|
669
|
+
mto_quantity: Joi.number(),
|
|
580
670
|
parent_item_identifiers: Joi.any(),
|
|
581
671
|
price: CartModel.ArticlePriceInfo(),
|
|
582
672
|
product_group_tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -584,7 +674,7 @@ class CartModel {
|
|
|
584
674
|
seller: CartModel.BaseInfo(),
|
|
585
675
|
seller_identifier: Joi.string().allow(""),
|
|
586
676
|
size: Joi.string().allow(""),
|
|
587
|
-
store: CartModel.
|
|
677
|
+
store: CartModel.StoreInfo(),
|
|
588
678
|
type: Joi.string().allow(""),
|
|
589
679
|
uid: Joi.string().allow(""),
|
|
590
680
|
});
|
|
@@ -671,6 +761,7 @@ class CartModel {
|
|
|
671
761
|
delivery_charge: Joi.number(),
|
|
672
762
|
discount: Joi.number(),
|
|
673
763
|
fynd_cash: Joi.number(),
|
|
764
|
+
gift_card: Joi.number(),
|
|
674
765
|
gst_charges: Joi.number(),
|
|
675
766
|
mrp_total: Joi.number(),
|
|
676
767
|
subtotal: Joi.number(),
|
|
@@ -765,6 +856,18 @@ class CartModel {
|
|
|
765
856
|
user: Joi.string().allow("").required(),
|
|
766
857
|
});
|
|
767
858
|
}
|
|
859
|
+
static StoreInfo() {
|
|
860
|
+
return Joi.object({
|
|
861
|
+
name: Joi.string().allow(""),
|
|
862
|
+
store_code: Joi.string().allow(""),
|
|
863
|
+
uid: Joi.number(),
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
static Tags() {
|
|
867
|
+
return Joi.object({
|
|
868
|
+
tags: Joi.any(),
|
|
869
|
+
});
|
|
870
|
+
}
|
|
768
871
|
static UpdateAddressResponse() {
|
|
769
872
|
return Joi.object({
|
|
770
873
|
id: Joi.string().allow(""),
|
|
@@ -805,6 +908,7 @@ class CartModel {
|
|
|
805
908
|
item_id: Joi.number(),
|
|
806
909
|
item_index: Joi.number(),
|
|
807
910
|
item_size: Joi.string().allow(""),
|
|
911
|
+
meta: Joi.any(),
|
|
808
912
|
parent_item_identifiers: Joi.any(),
|
|
809
913
|
quantity: Joi.number(),
|
|
810
914
|
});
|
|
@@ -14,6 +14,7 @@ class CartValidator {
|
|
|
14
14
|
b: Joi.boolean(),
|
|
15
15
|
areaCode: Joi.string().allow(""),
|
|
16
16
|
buyNow: Joi.boolean(),
|
|
17
|
+
id: Joi.string().allow(""),
|
|
17
18
|
body: CartModel.AddCartRequest().required(),
|
|
18
19
|
}).required();
|
|
19
20
|
}
|
|
@@ -46,9 +47,16 @@ class CartValidator {
|
|
|
46
47
|
}).required();
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
static checkoutCartV2() {
|
|
51
|
+
return Joi.object({
|
|
52
|
+
buyNow: Joi.boolean(),
|
|
53
|
+
body: CartModel.CartCheckoutDetailV2Request().required(),
|
|
54
|
+
}).required();
|
|
55
|
+
}
|
|
56
|
+
|
|
49
57
|
static deleteCart() {
|
|
50
58
|
return Joi.object({
|
|
51
|
-
id: Joi.
|
|
59
|
+
id: Joi.string().allow(""),
|
|
52
60
|
});
|
|
53
61
|
}
|
|
54
62
|
|
|
@@ -141,6 +149,7 @@ class CartValidator {
|
|
|
141
149
|
slug: Joi.string().allow(""),
|
|
142
150
|
pageSize: Joi.number(),
|
|
143
151
|
promotionGroup: Joi.string().allow(""),
|
|
152
|
+
storeId: Joi.number(),
|
|
144
153
|
});
|
|
145
154
|
}
|
|
146
155
|
|
|
@@ -151,6 +160,7 @@ class CartValidator {
|
|
|
151
160
|
buyNow: Joi.boolean(),
|
|
152
161
|
addressId: Joi.string().allow(""),
|
|
153
162
|
areaCode: Joi.string().allow(""),
|
|
163
|
+
orderType: Joi.string().allow(""),
|
|
154
164
|
});
|
|
155
165
|
}
|
|
156
166
|
|
|
@@ -227,6 +237,10 @@ class CartValidator {
|
|
|
227
237
|
paymentIdentifier: Joi.string().allow(""),
|
|
228
238
|
aggregatorName: Joi.string().allow(""),
|
|
229
239
|
merchantCode: Joi.string().allow(""),
|
|
240
|
+
iin: Joi.string().allow(""),
|
|
241
|
+
network: Joi.string().allow(""),
|
|
242
|
+
type: Joi.string().allow(""),
|
|
243
|
+
cardId: Joi.string().allow(""),
|
|
230
244
|
});
|
|
231
245
|
}
|
|
232
246
|
}
|
|
@@ -56,6 +56,7 @@ declare class CatalogModel {
|
|
|
56
56
|
static ProductCompareResponse(): any;
|
|
57
57
|
static ProductDetail(): any;
|
|
58
58
|
static ProductDetailAttribute(): any;
|
|
59
|
+
static ProductDetailCustomOrder(): any;
|
|
59
60
|
static ProductDetailGroupedAttribute(): any;
|
|
60
61
|
static ProductDetails(): any;
|
|
61
62
|
static ProductFilters(): any;
|
|
@@ -436,6 +436,7 @@ class CatalogModel {
|
|
|
436
436
|
categories: Joi.array().items(CatalogModel.ProductBrand()),
|
|
437
437
|
category_map: CatalogModel.ProductCategoryMap(),
|
|
438
438
|
color: Joi.string().allow(""),
|
|
439
|
+
custom_order: CatalogModel.ProductDetailCustomOrder(),
|
|
439
440
|
description: Joi.string().allow(""),
|
|
440
441
|
discount: Joi.string().allow(""),
|
|
441
442
|
grouped_attributes: Joi.array().items(
|
|
@@ -452,6 +453,7 @@ class CatalogModel {
|
|
|
452
453
|
name: Joi.string().allow(""),
|
|
453
454
|
net_quantity: CatalogModel.NetQuantity(),
|
|
454
455
|
price: CatalogModel.ProductListingPrice(),
|
|
456
|
+
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
455
457
|
product_online_date: Joi.string().allow(""),
|
|
456
458
|
rating: Joi.number(),
|
|
457
459
|
rating_count: Joi.number(),
|
|
@@ -473,6 +475,13 @@ class CatalogModel {
|
|
|
473
475
|
value: Joi.string().allow(""),
|
|
474
476
|
});
|
|
475
477
|
}
|
|
478
|
+
static ProductDetailCustomOrder() {
|
|
479
|
+
return Joi.object({
|
|
480
|
+
is_custom_order: Joi.boolean(),
|
|
481
|
+
manufacturing_time: Joi.number(),
|
|
482
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
483
|
+
});
|
|
484
|
+
}
|
|
476
485
|
static ProductDetailGroupedAttribute() {
|
|
477
486
|
return Joi.object({
|
|
478
487
|
details: Joi.array().items(CatalogModel.ProductDetailAttribute()),
|
|
@@ -605,6 +614,7 @@ class CatalogModel {
|
|
|
605
614
|
categories: Joi.array().items(CatalogModel.ProductBrand()),
|
|
606
615
|
category_map: CatalogModel.ProductCategoryMap(),
|
|
607
616
|
color: Joi.string().allow(""),
|
|
617
|
+
custom_order: CatalogModel.ProductDetailCustomOrder(),
|
|
608
618
|
description: Joi.string().allow(""),
|
|
609
619
|
discount: Joi.string().allow(""),
|
|
610
620
|
grouped_attributes: Joi.array().items(
|
|
@@ -622,6 +632,7 @@ class CatalogModel {
|
|
|
622
632
|
name: Joi.string().allow(""),
|
|
623
633
|
net_quantity: CatalogModel.NetQuantity(),
|
|
624
634
|
price: CatalogModel.ProductListingPrice(),
|
|
635
|
+
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
625
636
|
product_online_date: Joi.string().allow(""),
|
|
626
637
|
rating: Joi.number(),
|
|
627
638
|
rating_count: Joi.number(),
|
|
@@ -752,7 +763,9 @@ class CatalogModel {
|
|
|
752
763
|
}
|
|
753
764
|
static ProductSortOn() {
|
|
754
765
|
return Joi.object({
|
|
766
|
+
display: Joi.string().allow(""),
|
|
755
767
|
is_selected: Joi.boolean(),
|
|
768
|
+
logo: Joi.string().allow(""),
|
|
756
769
|
name: Joi.string().allow(""),
|
|
757
770
|
value: Joi.string().allow(""),
|
|
758
771
|
});
|
|
@@ -39,16 +39,18 @@ declare class Configuration {
|
|
|
39
39
|
* retrieving staff members working at a particular ordering store.
|
|
40
40
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
41
41
|
* the details of a particular staff member.
|
|
42
|
+
* @param {string} [arg.userName] - User name of the member
|
|
42
43
|
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
43
44
|
* @summary: Get a list of staff.
|
|
44
45
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
45
46
|
*/
|
|
46
|
-
getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user, }?: {
|
|
47
|
+
getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user, userName, }?: {
|
|
47
48
|
pageNo?: number;
|
|
48
49
|
pageSize?: number;
|
|
49
50
|
orderIncent?: boolean;
|
|
50
51
|
orderingStore?: number;
|
|
51
52
|
user?: string;
|
|
53
|
+
userName?: string;
|
|
52
54
|
}): Promise<AppStaffListResponse>;
|
|
53
55
|
/**
|
|
54
56
|
* @param {Object} arg - Arg object.
|
|
@@ -59,14 +61,16 @@ declare class Configuration {
|
|
|
59
61
|
* retrieving staff members working at a particular ordering store.
|
|
60
62
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
61
63
|
* the details of a particular staff member.
|
|
64
|
+
* @param {string} [arg.userName] - User name of the member
|
|
62
65
|
* @summary: Get a list of staff.
|
|
63
66
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
64
67
|
*/
|
|
65
|
-
getAppStaffListPaginator({ pageSize, orderIncent, orderingStore, user, }?: {
|
|
68
|
+
getAppStaffListPaginator({ pageSize, orderIncent, orderingStore, user, userName, }?: {
|
|
66
69
|
pageSize?: number;
|
|
67
70
|
orderIncent?: boolean;
|
|
68
71
|
orderingStore?: number;
|
|
69
72
|
user?: string;
|
|
73
|
+
userName?: string;
|
|
70
74
|
}): Paginator;
|
|
71
75
|
/**
|
|
72
76
|
* @param {Object} arg - Arg object.
|
|
@@ -88,14 +92,14 @@ declare class Configuration {
|
|
|
88
92
|
/**
|
|
89
93
|
* @param {Object} arg - Arg object.
|
|
90
94
|
* @returns {Promise<Application>} - Success response
|
|
91
|
-
* @summary: Get current
|
|
92
|
-
* @description: Use this API to get the current
|
|
95
|
+
* @summary: Get current sales channel details
|
|
96
|
+
* @description: Use this API to get the current sales channel details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
|
|
93
97
|
*/
|
|
94
98
|
getApplication({}?: any): Promise<Application>;
|
|
95
99
|
/**
|
|
96
100
|
* @param {Object} arg - Arg object.
|
|
97
101
|
* @returns {Promise<ApplicationDetail>} - Success response
|
|
98
|
-
* @summary: Get basic application
|
|
102
|
+
* @summary: Get basic details of the application
|
|
99
103
|
* @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
|
|
100
104
|
*/
|
|
101
105
|
getBasicDetails({}?: any): Promise<ApplicationDetail>;
|
|
@@ -141,7 +145,7 @@ declare class Configuration {
|
|
|
141
145
|
* @param {Object} arg - Arg object.
|
|
142
146
|
* @returns {Promise<LanguageResponse>} - Success response
|
|
143
147
|
* @summary: Get list of languages
|
|
144
|
-
* @description: Use this API to get a list of languages supported in the application
|
|
148
|
+
* @description: Use this API to get a list of languages supported in the application
|
|
145
149
|
*/
|
|
146
150
|
getLanguages({}?: any): Promise<LanguageResponse>;
|
|
147
151
|
/**
|
|
@@ -162,7 +166,7 @@ declare class Configuration {
|
|
|
162
166
|
* page. Default value is 10.
|
|
163
167
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
164
168
|
* @returns {Promise<OrderingStores>} - Success response
|
|
165
|
-
* @summary: Get deployment stores
|
|
169
|
+
* @summary: Get all deployment stores
|
|
166
170
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
167
171
|
*/
|
|
168
172
|
getOrderingStores({ pageNo, pageSize, q }?: {
|
|
@@ -175,7 +179,7 @@ declare class Configuration {
|
|
|
175
179
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
176
180
|
* page. Default value is 10.
|
|
177
181
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
178
|
-
* @summary: Get deployment stores
|
|
182
|
+
* @summary: Get all deployment stores
|
|
179
183
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
180
184
|
*/
|
|
181
185
|
getOrderingStoresPaginator({ pageSize, q }?: {
|
|
@@ -185,8 +189,8 @@ declare class Configuration {
|
|
|
185
189
|
/**
|
|
186
190
|
* @param {Object} arg - Arg object.
|
|
187
191
|
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
188
|
-
* @summary: Get
|
|
189
|
-
* @description: Use this API to get the current
|
|
192
|
+
* @summary: Get sales channel, owner and seller information
|
|
193
|
+
* @description: Use this API to get the current sales channel details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
|
|
190
194
|
*/
|
|
191
195
|
getOwnerInfo({}?: any): Promise<ApplicationAboutResponse>;
|
|
192
196
|
/**
|
|
@@ -122,6 +122,7 @@ class Configuration {
|
|
|
122
122
|
* retrieving staff members working at a particular ordering store.
|
|
123
123
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
124
124
|
* the details of a particular staff member.
|
|
125
|
+
* @param {string} [arg.userName] - User name of the member
|
|
125
126
|
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
126
127
|
* @summary: Get a list of staff.
|
|
127
128
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
@@ -132,9 +133,10 @@ class Configuration {
|
|
|
132
133
|
orderIncent,
|
|
133
134
|
orderingStore,
|
|
134
135
|
user,
|
|
136
|
+
userName,
|
|
135
137
|
} = {}) {
|
|
136
138
|
const { error } = ConfigurationValidator.getAppStaffList().validate(
|
|
137
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
139
|
+
{ pageNo, pageSize, orderIncent, orderingStore, user, userName },
|
|
138
140
|
{ abortEarly: false, allowUnknown: true }
|
|
139
141
|
);
|
|
140
142
|
if (error) {
|
|
@@ -145,7 +147,7 @@ class Configuration {
|
|
|
145
147
|
const {
|
|
146
148
|
error: warrning,
|
|
147
149
|
} = ConfigurationValidator.getAppStaffList().validate(
|
|
148
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
150
|
+
{ pageNo, pageSize, orderIncent, orderingStore, user, userName },
|
|
149
151
|
{ abortEarly: false, allowUnknown: false }
|
|
150
152
|
);
|
|
151
153
|
if (warrning) {
|
|
@@ -162,6 +164,7 @@ class Configuration {
|
|
|
162
164
|
query_params["order_incent"] = orderIncent;
|
|
163
165
|
query_params["ordering_store"] = orderingStore;
|
|
164
166
|
query_params["user"] = user;
|
|
167
|
+
query_params["user_name"] = userName;
|
|
165
168
|
|
|
166
169
|
const xHeaders = {};
|
|
167
170
|
|
|
@@ -204,6 +207,7 @@ class Configuration {
|
|
|
204
207
|
* retrieving staff members working at a particular ordering store.
|
|
205
208
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
206
209
|
* the details of a particular staff member.
|
|
210
|
+
* @param {string} [arg.userName] - User name of the member
|
|
207
211
|
* @summary: Get a list of staff.
|
|
208
212
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
209
213
|
*/
|
|
@@ -212,6 +216,7 @@ class Configuration {
|
|
|
212
216
|
orderIncent,
|
|
213
217
|
orderingStore,
|
|
214
218
|
user,
|
|
219
|
+
userName,
|
|
215
220
|
} = {}) {
|
|
216
221
|
const paginator = new Paginator();
|
|
217
222
|
const callback = async () => {
|
|
@@ -224,6 +229,7 @@ class Configuration {
|
|
|
224
229
|
orderIncent: orderIncent,
|
|
225
230
|
orderingStore: orderingStore,
|
|
226
231
|
user: user,
|
|
232
|
+
userName: userName,
|
|
227
233
|
});
|
|
228
234
|
paginator.setPaginator({
|
|
229
235
|
hasNext: data.page.has_next ? true : false,
|
|
@@ -309,8 +315,8 @@ class Configuration {
|
|
|
309
315
|
/**
|
|
310
316
|
* @param {Object} arg - Arg object.
|
|
311
317
|
* @returns {Promise<Application>} - Success response
|
|
312
|
-
* @summary: Get current
|
|
313
|
-
* @description: Use this API to get the current
|
|
318
|
+
* @summary: Get current sales channel details
|
|
319
|
+
* @description: Use this API to get the current sales channel details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
|
|
314
320
|
*/
|
|
315
321
|
async getApplication({} = {}) {
|
|
316
322
|
const { error } = ConfigurationValidator.getApplication().validate(
|
|
@@ -373,7 +379,7 @@ class Configuration {
|
|
|
373
379
|
/**
|
|
374
380
|
* @param {Object} arg - Arg object.
|
|
375
381
|
* @returns {Promise<ApplicationDetail>} - Success response
|
|
376
|
-
* @summary: Get basic application
|
|
382
|
+
* @summary: Get basic details of the application
|
|
377
383
|
* @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
|
|
378
384
|
*/
|
|
379
385
|
async getBasicDetails({} = {}) {
|
|
@@ -755,7 +761,7 @@ class Configuration {
|
|
|
755
761
|
* @param {Object} arg - Arg object.
|
|
756
762
|
* @returns {Promise<LanguageResponse>} - Success response
|
|
757
763
|
* @summary: Get list of languages
|
|
758
|
-
* @description: Use this API to get a list of languages supported in the application
|
|
764
|
+
* @description: Use this API to get a list of languages supported in the application
|
|
759
765
|
*/
|
|
760
766
|
async getLanguages({} = {}) {
|
|
761
767
|
const { error } = ConfigurationValidator.getLanguages().validate(
|
|
@@ -886,7 +892,7 @@ class Configuration {
|
|
|
886
892
|
* page. Default value is 10.
|
|
887
893
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
888
894
|
* @returns {Promise<OrderingStores>} - Success response
|
|
889
|
-
* @summary: Get deployment stores
|
|
895
|
+
* @summary: Get all deployment stores
|
|
890
896
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
891
897
|
*/
|
|
892
898
|
async getOrderingStores({ pageNo, pageSize, q } = {}) {
|
|
@@ -955,7 +961,7 @@ class Configuration {
|
|
|
955
961
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
956
962
|
* page. Default value is 10.
|
|
957
963
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
958
|
-
* @summary: Get deployment stores
|
|
964
|
+
* @summary: Get all deployment stores
|
|
959
965
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
960
966
|
*/
|
|
961
967
|
getOrderingStoresPaginator({ pageSize, q } = {}) {
|
|
@@ -982,8 +988,8 @@ class Configuration {
|
|
|
982
988
|
/**
|
|
983
989
|
* @param {Object} arg - Arg object.
|
|
984
990
|
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
985
|
-
* @summary: Get
|
|
986
|
-
* @description: Use this API to get the current
|
|
991
|
+
* @summary: Get sales channel, owner and seller information
|
|
992
|
+
* @description: Use this API to get the current sales channel details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
|
|
987
993
|
*/
|
|
988
994
|
async getOwnerInfo({} = {}) {
|
|
989
995
|
const { error } = ConfigurationValidator.getOwnerInfo().validate(
|
|
@@ -108,14 +108,15 @@ class LogisticModel {
|
|
|
108
108
|
articles: Joi.array().items(Joi.any()).required(),
|
|
109
109
|
configuration: Joi.any().required(),
|
|
110
110
|
identifier: Joi.string().allow("").required(),
|
|
111
|
-
ignored_locations: Joi.array().items(Joi.
|
|
111
|
+
ignored_locations: Joi.array().items(Joi.number()).required(),
|
|
112
112
|
to_pincode: Joi.string().allow("").required(),
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
static ReAssignStoreResponse() {
|
|
116
116
|
return Joi.object({
|
|
117
|
-
|
|
117
|
+
assigned_stores: Joi.array().items(Joi.any()),
|
|
118
118
|
error: Joi.any().required(),
|
|
119
|
+
pystormbreaker_uuid: Joi.string().allow("").required(),
|
|
119
120
|
success: Joi.boolean().required(),
|
|
120
121
|
to_pincode: Joi.string().allow("").required(),
|
|
121
122
|
});
|
|
@@ -83,13 +83,13 @@ declare class Order {
|
|
|
83
83
|
* @param {Object} arg - Arg object.
|
|
84
84
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
85
85
|
* tracking your orders.
|
|
86
|
-
* @returns {Promise<
|
|
86
|
+
* @returns {Promise<OrderById>} - Success response
|
|
87
87
|
* @summary: Get POS Order
|
|
88
88
|
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
89
89
|
*/
|
|
90
90
|
getPosOrderById({ orderId }?: {
|
|
91
91
|
orderId: string;
|
|
92
|
-
}): Promise<
|
|
92
|
+
}): Promise<OrderById>;
|
|
93
93
|
/**
|
|
94
94
|
* @param {Object} arg - Arg object.
|
|
95
95
|
* @param {string} arg.shipmentId - ID of the bag. An order may contain
|
|
@@ -336,7 +336,7 @@ class Order {
|
|
|
336
336
|
* @param {Object} arg - Arg object.
|
|
337
337
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
338
338
|
* tracking your orders.
|
|
339
|
-
* @returns {Promise<
|
|
339
|
+
* @returns {Promise<OrderById>} - Success response
|
|
340
340
|
* @summary: Get POS Order
|
|
341
341
|
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
342
342
|
*/
|
|
@@ -378,7 +378,7 @@ class Order {
|
|
|
378
378
|
xHeaders
|
|
379
379
|
);
|
|
380
380
|
|
|
381
|
-
const { error: res_error } = OrderModel.
|
|
381
|
+
const { error: res_error } = OrderModel.OrderById().validate(response, {
|
|
382
382
|
abortEarly: false,
|
|
383
383
|
allowUnknown: false,
|
|
384
384
|
});
|