@gofynd/fdk-client-javascript 1.4.0-beta.1 → 1.4.0-beta.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 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationModel.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +2 -0
- package/sdk/application/Order/OrderApplicationModel.js +2 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +240 -315
- package/sdk/partner/Theme/ThemePartnerModel.js +332 -222
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +4 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +4 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -12
- package/sdk/platform/Catalog/CatalogPlatformClient.js +17 -87
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +11 -25
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +4 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +8 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +4 -1
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +2 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -44
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +120 -54
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +4 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +4 -86
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -12
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -14
- package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -61
- package/sdk/platform/Order/OrderPlatformClient.js +87 -481
- package/sdk/platform/Order/OrderPlatformModel.d.ts +442 -171
- package/sdk/platform/Order/OrderPlatformModel.js +483 -169
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +22 -69
- package/sdk/platform/Order/OrderPlatformValidator.js +17 -79
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +4 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +4 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +4 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +4 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +4 -1
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -1
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -21
- package/sdk/platform/Theme/ThemePlatformModel.js +108 -20
- package/sdk/platform/User/UserPlatformApplicationClient.js +4 -1
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +2 -2
- package/sdk/platform/Webhook/WebhookPlatformClient.js +4 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +21 -27
- package/sdk/platform/Webhook/WebhookPlatformModel.js +30 -27
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef AwbNumberBarcodeGenerator
|
|
5
|
+
* @property {Kwargs} [kwargs]
|
|
6
|
+
* @property {string} [method]
|
|
7
|
+
*/
|
|
8
|
+
|
|
3
9
|
/**
|
|
4
10
|
* @typedef AwbNumberLabelBarcodeGenerator
|
|
5
11
|
* @property {KwargsAwbNumber} [kwargs]
|
|
@@ -28,17 +34,24 @@ const Joi = require("joi");
|
|
|
28
34
|
/**
|
|
29
35
|
* @typedef CompanyDetail
|
|
30
36
|
* @property {string} [address]
|
|
37
|
+
* @property {Object} [business_country_currency]
|
|
38
|
+
* @property {string} [business_country_timezone]
|
|
31
39
|
* @property {string} [cin]
|
|
32
40
|
* @property {string} [city]
|
|
33
41
|
* @property {string} [country]
|
|
34
42
|
* @property {string} [country_code]
|
|
43
|
+
* @property {string} [display_address]
|
|
35
44
|
* @property {string} [email]
|
|
36
45
|
* @property {string} [gstin]
|
|
37
46
|
* @property {string} [name]
|
|
38
47
|
* @property {string} [pan]
|
|
48
|
+
* @property {Object} [phone]
|
|
39
49
|
* @property {string} [phone_no]
|
|
50
|
+
* @property {string} [sector]
|
|
40
51
|
* @property {string} [state]
|
|
41
52
|
* @property {string} [state_code]
|
|
53
|
+
* @property {string} [trn]
|
|
54
|
+
* @property {string} [vat]
|
|
42
55
|
* @property {string} [website_url]
|
|
43
56
|
* @property {number} [zip_code]
|
|
44
57
|
*/
|
|
@@ -65,7 +78,7 @@ const Joi = require("joi");
|
|
|
65
78
|
/**
|
|
66
79
|
* @typedef ConversionRate
|
|
67
80
|
* @property {string} [base]
|
|
68
|
-
* @property {
|
|
81
|
+
* @property {Object} [rates]
|
|
69
82
|
* @property {number} [timestamp]
|
|
70
83
|
*/
|
|
71
84
|
|
|
@@ -86,9 +99,12 @@ const Joi = require("joi");
|
|
|
86
99
|
* @property {string} [city]
|
|
87
100
|
* @property {string} [country]
|
|
88
101
|
* @property {string} [country_code]
|
|
102
|
+
* @property {string} [display_address]
|
|
103
|
+
* @property {string} [email]
|
|
89
104
|
* @property {string} [gstin]
|
|
90
105
|
* @property {string} [name]
|
|
91
106
|
* @property {string} [phone_no]
|
|
107
|
+
* @property {string} [sector]
|
|
92
108
|
* @property {string} [state]
|
|
93
109
|
* @property {string} [state_code]
|
|
94
110
|
* @property {string} [zip_code]
|
|
@@ -100,9 +116,11 @@ const Joi = require("joi");
|
|
|
100
116
|
* @property {string} [city]
|
|
101
117
|
* @property {string} [country]
|
|
102
118
|
* @property {string} [country_code]
|
|
119
|
+
* @property {string} [display_address]
|
|
103
120
|
* @property {string} [gstin]
|
|
104
121
|
* @property {string} [name]
|
|
105
122
|
* @property {string} [phone_no]
|
|
123
|
+
* @property {string} [sector]
|
|
106
124
|
* @property {string} [state]
|
|
107
125
|
* @property {string} [state_code]
|
|
108
126
|
* @property {string} [zip_code]
|
|
@@ -112,8 +130,10 @@ const Joi = require("joi");
|
|
|
112
130
|
* @typedef DeliveryPartnerDetail
|
|
113
131
|
* @property {string} [awb_number]
|
|
114
132
|
* @property {string} [awb_number_barcode]
|
|
133
|
+
* @property {string} [destination]
|
|
115
134
|
* @property {string} [eway_bill_number]
|
|
116
135
|
* @property {string} [name]
|
|
136
|
+
* @property {string} [origin]
|
|
117
137
|
*/
|
|
118
138
|
|
|
119
139
|
/**
|
|
@@ -158,10 +178,13 @@ const Joi = require("joi");
|
|
|
158
178
|
* @property {number} [amount_to_be_collected]
|
|
159
179
|
* @property {string} [app_domain_name]
|
|
160
180
|
* @property {string} [awb_number_barcode]
|
|
181
|
+
* @property {Object} [b2b_buyer_details]
|
|
161
182
|
* @property {string} [brand_logo]
|
|
162
183
|
* @property {CompanyDetail} [company_detail]
|
|
163
184
|
* @property {ConversionRate} [conversion_rate]
|
|
185
|
+
* @property {string} [credit_note_id]
|
|
164
186
|
* @property {string} [currency_code]
|
|
187
|
+
* @property {string} [current_date]
|
|
165
188
|
* @property {CustomerBillingDetail} [customer_billing_detail]
|
|
166
189
|
* @property {CustomerShippingDetail} [customer_shipping_detail]
|
|
167
190
|
* @property {string[]} [declaration_texts]
|
|
@@ -171,12 +194,16 @@ const Joi = require("joi");
|
|
|
171
194
|
* @property {Image} [image]
|
|
172
195
|
* @property {InvoiceDetail} [invoice_detail]
|
|
173
196
|
* @property {boolean} [is_export]
|
|
197
|
+
* @property {boolean} [is_export_shipment]
|
|
198
|
+
* @property {Object} [is_qwik]
|
|
174
199
|
* @property {boolean} [is_self_pickup]
|
|
175
200
|
* @property {boolean} [is_self_ship]
|
|
176
201
|
* @property {Meta} [meta]
|
|
177
202
|
* @property {string} [mode]
|
|
203
|
+
* @property {string} [order_type]
|
|
178
204
|
* @property {PaymentData[]} [payments]
|
|
179
205
|
* @property {string} [platform_name]
|
|
206
|
+
* @property {string} [po_number]
|
|
180
207
|
* @property {ProductTable} [product_table]
|
|
181
208
|
* @property {RegisteredCompanyDetail} [registered_company_detail]
|
|
182
209
|
* @property {ReturnDetail} [return_detail]
|
|
@@ -186,8 +213,11 @@ const Joi = require("joi");
|
|
|
186
213
|
* @property {StoreDetail} [store_detail]
|
|
187
214
|
* @property {TaxTable} [tax_table]
|
|
188
215
|
* @property {number} [total_items]
|
|
216
|
+
* @property {number} [total_value_of_goods]
|
|
217
|
+
* @property {string} [txn_id]
|
|
189
218
|
* @property {string} [uid]
|
|
190
219
|
* @property {string} [upi_qrcode]
|
|
220
|
+
* @property {string} [utr]
|
|
191
221
|
* @property {Object[]} [waybills]
|
|
192
222
|
*/
|
|
193
223
|
|
|
@@ -212,20 +242,16 @@ const Joi = require("joi");
|
|
|
212
242
|
* @property {string} [sales_channel_logo]
|
|
213
243
|
*/
|
|
214
244
|
|
|
215
|
-
/**
|
|
216
|
-
* @typedef Inr
|
|
217
|
-
* @property {string} [name]
|
|
218
|
-
* @property {string} [sub_unit]
|
|
219
|
-
* @property {string} [symbol]
|
|
220
|
-
* @property {number} [value]
|
|
221
|
-
*/
|
|
222
|
-
|
|
223
245
|
/**
|
|
224
246
|
* @typedef InvoiceDetail
|
|
247
|
+
* @property {string} [channel_order_id]
|
|
248
|
+
* @property {string} [device_id]
|
|
225
249
|
* @property {string} [external_order_id]
|
|
226
250
|
* @property {string} [invoice_date]
|
|
227
251
|
* @property {string} [invoice_id]
|
|
228
252
|
* @property {string} [irn]
|
|
253
|
+
* @property {string} [marketplace_invoice_id]
|
|
254
|
+
* @property {string} [marketplace_shipment_id]
|
|
229
255
|
* @property {string} [shipment_id]
|
|
230
256
|
* @property {string} [signed_qrcode]
|
|
231
257
|
* @property {string} [upi_qrcode]
|
|
@@ -252,9 +278,11 @@ const Joi = require("joi");
|
|
|
252
278
|
/**
|
|
253
279
|
* @typedef ItemsProductTable
|
|
254
280
|
* @property {Brand} [brand]
|
|
281
|
+
* @property {string} [country_of_origin]
|
|
255
282
|
* @property {number} [discount]
|
|
256
283
|
* @property {string} [hsn_code]
|
|
257
284
|
* @property {string} [item_code]
|
|
285
|
+
* @property {Object} [meta]
|
|
258
286
|
* @property {number} [mrp]
|
|
259
287
|
* @property {string} [name]
|
|
260
288
|
* @property {string} [seller_identifier]
|
|
@@ -289,6 +317,7 @@ const Joi = require("joi");
|
|
|
289
317
|
|
|
290
318
|
/**
|
|
291
319
|
* @typedef MetaProperty
|
|
320
|
+
* @property {AwbNumberBarcodeGenerator} [awb_number_barcode_generator]
|
|
292
321
|
* @property {AwbNumberLabelBarcodeGenerator} [awb_number_label_barcode_generator]
|
|
293
322
|
* @property {DigitalsignatureGenerator} [digitalsignature_generator]
|
|
294
323
|
* @property {ShipmentIdBarcodeGenerator} [shipment_id_barcode_generator]
|
|
@@ -300,7 +329,11 @@ const Joi = require("joi");
|
|
|
300
329
|
* @typedef PaymentData
|
|
301
330
|
* @property {number} [amount]
|
|
302
331
|
* @property {string} [date]
|
|
332
|
+
* @property {Object} [meta]
|
|
333
|
+
* @property {string} [mode]
|
|
334
|
+
* @property {string} [name]
|
|
303
335
|
* @property {string} [payment_type]
|
|
336
|
+
* @property {string} [time]
|
|
304
337
|
* @property {string} [transaction_id]
|
|
305
338
|
*/
|
|
306
339
|
|
|
@@ -429,19 +462,22 @@ const Joi = require("joi");
|
|
|
429
462
|
/**
|
|
430
463
|
* @typedef ProductTable
|
|
431
464
|
* @property {number} [cod_charges]
|
|
465
|
+
* @property {number} [coupon]
|
|
432
466
|
* @property {string} [delivery_charge_text]
|
|
433
467
|
* @property {number} [delivery_charges]
|
|
468
|
+
* @property {number} [discount]
|
|
434
469
|
* @property {number} [fynd_discounts]
|
|
470
|
+
* @property {number} [gift_price]
|
|
435
471
|
* @property {number} [grand_total]
|
|
436
472
|
* @property {ItemsProductTable[]} [products]
|
|
473
|
+
* @property {number} [promotion]
|
|
474
|
+
* @property {number} [reward]
|
|
475
|
+
* @property {number} [round_off]
|
|
476
|
+
* @property {number} [sub_total]
|
|
437
477
|
* @property {string} [total_in_words]
|
|
438
478
|
* @property {number} [total_items]
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* @typedef Rates
|
|
443
|
-
* @property {Inr} [inr]
|
|
444
|
-
* @property {Usd} [usd]
|
|
479
|
+
* @property {number} [total_quantity]
|
|
480
|
+
* @property {number} [total_value_of_goods]
|
|
445
481
|
*/
|
|
446
482
|
|
|
447
483
|
/**
|
|
@@ -450,6 +486,8 @@ const Joi = require("joi");
|
|
|
450
486
|
* @property {string} [city]
|
|
451
487
|
* @property {string} [country]
|
|
452
488
|
* @property {string} [country_code]
|
|
489
|
+
* @property {string} [display_address]
|
|
490
|
+
* @property {string} [sector]
|
|
453
491
|
* @property {string} [state]
|
|
454
492
|
* @property {string} [state_code]
|
|
455
493
|
* @property {number} [zip_code]
|
|
@@ -461,7 +499,9 @@ const Joi = require("joi");
|
|
|
461
499
|
* @property {string} [city]
|
|
462
500
|
* @property {string} [country]
|
|
463
501
|
* @property {string} [country_code]
|
|
502
|
+
* @property {string} [display_address]
|
|
464
503
|
* @property {string} [gstin]
|
|
504
|
+
* @property {string} [sector]
|
|
465
505
|
* @property {string} [state]
|
|
466
506
|
* @property {string} [state_code]
|
|
467
507
|
* @property {string} [zip_code]
|
|
@@ -525,9 +565,12 @@ const Joi = require("joi");
|
|
|
525
565
|
* @property {string} [city]
|
|
526
566
|
* @property {string} [country]
|
|
527
567
|
* @property {string} [country_code]
|
|
568
|
+
* @property {string} [display_address]
|
|
528
569
|
* @property {string} [gstin]
|
|
570
|
+
* @property {string} [sector]
|
|
529
571
|
* @property {string} [state]
|
|
530
572
|
* @property {string} [state_code]
|
|
573
|
+
* @property {string} [store_id]
|
|
531
574
|
* @property {string} [store_name]
|
|
532
575
|
* @property {string} [zip_code]
|
|
533
576
|
*/
|
|
@@ -572,15 +615,15 @@ const Joi = require("joi");
|
|
|
572
615
|
* @property {string} url
|
|
573
616
|
*/
|
|
574
617
|
|
|
575
|
-
/**
|
|
576
|
-
* @typedef Usd
|
|
577
|
-
* @property {string} [name]
|
|
578
|
-
* @property {string} [sub_unit]
|
|
579
|
-
* @property {string} [symbol]
|
|
580
|
-
* @property {number} [value]
|
|
581
|
-
*/
|
|
582
|
-
|
|
583
618
|
class FileStoragePlatformModel {
|
|
619
|
+
/** @returns {AwbNumberBarcodeGenerator} */
|
|
620
|
+
static AwbNumberBarcodeGenerator() {
|
|
621
|
+
return Joi.object({
|
|
622
|
+
kwargs: FileStoragePlatformModel.Kwargs(),
|
|
623
|
+
method: Joi.string().allow(""),
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
|
|
584
627
|
/** @returns {AwbNumberLabelBarcodeGenerator} */
|
|
585
628
|
static AwbNumberLabelBarcodeGenerator() {
|
|
586
629
|
return Joi.object({
|
|
@@ -618,17 +661,24 @@ class FileStoragePlatformModel {
|
|
|
618
661
|
static CompanyDetail() {
|
|
619
662
|
return Joi.object({
|
|
620
663
|
address: Joi.string().allow(""),
|
|
664
|
+
business_country_currency: Joi.object().pattern(/\S/, Joi.any()),
|
|
665
|
+
business_country_timezone: Joi.string().allow(""),
|
|
621
666
|
cin: Joi.string().allow(""),
|
|
622
667
|
city: Joi.string().allow(""),
|
|
623
668
|
country: Joi.string().allow(""),
|
|
624
669
|
country_code: Joi.string().allow(""),
|
|
670
|
+
display_address: Joi.string().allow(""),
|
|
625
671
|
email: Joi.string().allow(""),
|
|
626
672
|
gstin: Joi.string().allow(""),
|
|
627
673
|
name: Joi.string().allow(""),
|
|
628
674
|
pan: Joi.string().allow("").allow(null),
|
|
675
|
+
phone: Joi.object().pattern(/\S/, Joi.any()),
|
|
629
676
|
phone_no: Joi.string().allow(""),
|
|
677
|
+
sector: Joi.string().allow(""),
|
|
630
678
|
state: Joi.string().allow(""),
|
|
631
679
|
state_code: Joi.string().allow(""),
|
|
680
|
+
trn: Joi.string().allow(""),
|
|
681
|
+
vat: Joi.string().allow(""),
|
|
632
682
|
website_url: Joi.string().allow(""),
|
|
633
683
|
zip_code: Joi.number(),
|
|
634
684
|
});
|
|
@@ -659,7 +709,7 @@ class FileStoragePlatformModel {
|
|
|
659
709
|
static ConversionRate() {
|
|
660
710
|
return Joi.object({
|
|
661
711
|
base: Joi.string().allow(""),
|
|
662
|
-
rates:
|
|
712
|
+
rates: Joi.object().pattern(/\S/, Joi.any()),
|
|
663
713
|
timestamp: Joi.number(),
|
|
664
714
|
});
|
|
665
715
|
}
|
|
@@ -686,9 +736,12 @@ class FileStoragePlatformModel {
|
|
|
686
736
|
city: Joi.string().allow(""),
|
|
687
737
|
country: Joi.string().allow(""),
|
|
688
738
|
country_code: Joi.string().allow(""),
|
|
739
|
+
display_address: Joi.string().allow(""),
|
|
740
|
+
email: Joi.string().allow(""),
|
|
689
741
|
gstin: Joi.string().allow("").allow(null),
|
|
690
742
|
name: Joi.string().allow(""),
|
|
691
743
|
phone_no: Joi.string().allow(""),
|
|
744
|
+
sector: Joi.string().allow(""),
|
|
692
745
|
state: Joi.string().allow(""),
|
|
693
746
|
state_code: Joi.string().allow(""),
|
|
694
747
|
zip_code: Joi.string().allow(""),
|
|
@@ -702,9 +755,11 @@ class FileStoragePlatformModel {
|
|
|
702
755
|
city: Joi.string().allow(""),
|
|
703
756
|
country: Joi.string().allow(""),
|
|
704
757
|
country_code: Joi.string().allow(""),
|
|
758
|
+
display_address: Joi.string().allow(""),
|
|
705
759
|
gstin: Joi.string().allow("").allow(null),
|
|
706
760
|
name: Joi.string().allow(""),
|
|
707
761
|
phone_no: Joi.string().allow(""),
|
|
762
|
+
sector: Joi.string().allow(""),
|
|
708
763
|
state: Joi.string().allow(""),
|
|
709
764
|
state_code: Joi.string().allow(""),
|
|
710
765
|
zip_code: Joi.string().allow(""),
|
|
@@ -716,8 +771,10 @@ class FileStoragePlatformModel {
|
|
|
716
771
|
return Joi.object({
|
|
717
772
|
awb_number: Joi.string().allow(""),
|
|
718
773
|
awb_number_barcode: Joi.string().allow(""),
|
|
774
|
+
destination: Joi.string().allow(""),
|
|
719
775
|
eway_bill_number: Joi.string().allow("").allow(null),
|
|
720
776
|
name: Joi.string().allow(""),
|
|
777
|
+
origin: Joi.string().allow(""),
|
|
721
778
|
});
|
|
722
779
|
}
|
|
723
780
|
|
|
@@ -776,10 +833,13 @@ class FileStoragePlatformModel {
|
|
|
776
833
|
amount_to_be_collected: Joi.number(),
|
|
777
834
|
app_domain_name: Joi.string().allow(""),
|
|
778
835
|
awb_number_barcode: Joi.string().allow(""),
|
|
836
|
+
b2b_buyer_details: Joi.object().pattern(/\S/, Joi.any()),
|
|
779
837
|
brand_logo: Joi.string().allow(""),
|
|
780
838
|
company_detail: FileStoragePlatformModel.CompanyDetail(),
|
|
781
839
|
conversion_rate: FileStoragePlatformModel.ConversionRate(),
|
|
840
|
+
credit_note_id: Joi.string().allow("").allow(null),
|
|
782
841
|
currency_code: Joi.string().allow(""),
|
|
842
|
+
current_date: Joi.string().allow(""),
|
|
783
843
|
customer_billing_detail: FileStoragePlatformModel.CustomerBillingDetail(),
|
|
784
844
|
customer_shipping_detail: FileStoragePlatformModel.CustomerShippingDetail(),
|
|
785
845
|
declaration_texts: Joi.array().items(Joi.string().allow("")),
|
|
@@ -789,12 +849,16 @@ class FileStoragePlatformModel {
|
|
|
789
849
|
image: FileStoragePlatformModel.Image(),
|
|
790
850
|
invoice_detail: FileStoragePlatformModel.InvoiceDetail(),
|
|
791
851
|
is_export: Joi.boolean(),
|
|
852
|
+
is_export_shipment: Joi.boolean(),
|
|
853
|
+
is_qwik: Joi.object().pattern(/\S/, Joi.any()),
|
|
792
854
|
is_self_pickup: Joi.boolean(),
|
|
793
855
|
is_self_ship: Joi.boolean(),
|
|
794
856
|
meta: FileStoragePlatformModel.Meta(),
|
|
795
857
|
mode: Joi.string().allow(""),
|
|
858
|
+
order_type: Joi.string().allow(""),
|
|
796
859
|
payments: Joi.array().items(FileStoragePlatformModel.PaymentData()),
|
|
797
860
|
platform_name: Joi.string().allow(""),
|
|
861
|
+
po_number: Joi.string().allow(""),
|
|
798
862
|
product_table: FileStoragePlatformModel.ProductTable(),
|
|
799
863
|
registered_company_detail: FileStoragePlatformModel.RegisteredCompanyDetail(),
|
|
800
864
|
return_detail: FileStoragePlatformModel.ReturnDetail(),
|
|
@@ -804,8 +868,11 @@ class FileStoragePlatformModel {
|
|
|
804
868
|
store_detail: FileStoragePlatformModel.StoreDetail(),
|
|
805
869
|
tax_table: FileStoragePlatformModel.TaxTable(),
|
|
806
870
|
total_items: Joi.number(),
|
|
871
|
+
total_value_of_goods: Joi.number(),
|
|
872
|
+
txn_id: Joi.string().allow(""),
|
|
807
873
|
uid: Joi.string().allow(""),
|
|
808
874
|
upi_qrcode: Joi.string().allow(""),
|
|
875
|
+
utr: Joi.string().allow(""),
|
|
809
876
|
waybills: Joi.array().items(Joi.any()),
|
|
810
877
|
});
|
|
811
878
|
}
|
|
@@ -839,23 +906,17 @@ class FileStoragePlatformModel {
|
|
|
839
906
|
});
|
|
840
907
|
}
|
|
841
908
|
|
|
842
|
-
/** @returns {Inr} */
|
|
843
|
-
static Inr() {
|
|
844
|
-
return Joi.object({
|
|
845
|
-
name: Joi.string().allow(""),
|
|
846
|
-
sub_unit: Joi.string().allow(""),
|
|
847
|
-
symbol: Joi.string().allow(""),
|
|
848
|
-
value: Joi.number(),
|
|
849
|
-
});
|
|
850
|
-
}
|
|
851
|
-
|
|
852
909
|
/** @returns {InvoiceDetail} */
|
|
853
910
|
static InvoiceDetail() {
|
|
854
911
|
return Joi.object({
|
|
912
|
+
channel_order_id: Joi.string().allow(""),
|
|
913
|
+
device_id: Joi.string().allow(""),
|
|
855
914
|
external_order_id: Joi.string().allow(""),
|
|
856
915
|
invoice_date: Joi.string().allow(""),
|
|
857
916
|
invoice_id: Joi.string().allow(""),
|
|
858
917
|
irn: Joi.string().allow(""),
|
|
918
|
+
marketplace_invoice_id: Joi.string().allow(""),
|
|
919
|
+
marketplace_shipment_id: Joi.string().allow(""),
|
|
859
920
|
shipment_id: Joi.string().allow(""),
|
|
860
921
|
signed_qrcode: Joi.string().allow(""),
|
|
861
922
|
upi_qrcode: Joi.string().allow(""),
|
|
@@ -890,9 +951,11 @@ class FileStoragePlatformModel {
|
|
|
890
951
|
static ItemsProductTable() {
|
|
891
952
|
return Joi.object({
|
|
892
953
|
brand: FileStoragePlatformModel.Brand(),
|
|
954
|
+
country_of_origin: Joi.string().allow(""),
|
|
893
955
|
discount: Joi.number(),
|
|
894
956
|
hsn_code: Joi.string().allow(""),
|
|
895
957
|
item_code: Joi.string().allow(""),
|
|
958
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
896
959
|
mrp: Joi.number(),
|
|
897
960
|
name: Joi.string().allow(""),
|
|
898
961
|
seller_identifier: Joi.string().allow(""),
|
|
@@ -937,6 +1000,7 @@ class FileStoragePlatformModel {
|
|
|
937
1000
|
/** @returns {MetaProperty} */
|
|
938
1001
|
static MetaProperty() {
|
|
939
1002
|
return Joi.object({
|
|
1003
|
+
awb_number_barcode_generator: FileStoragePlatformModel.AwbNumberBarcodeGenerator(),
|
|
940
1004
|
awb_number_label_barcode_generator: FileStoragePlatformModel.AwbNumberLabelBarcodeGenerator(),
|
|
941
1005
|
digitalsignature_generator: FileStoragePlatformModel.DigitalsignatureGenerator(),
|
|
942
1006
|
shipment_id_barcode_generator: FileStoragePlatformModel.ShipmentIdBarcodeGenerator(),
|
|
@@ -950,7 +1014,11 @@ class FileStoragePlatformModel {
|
|
|
950
1014
|
return Joi.object({
|
|
951
1015
|
amount: Joi.number(),
|
|
952
1016
|
date: Joi.string().allow(""),
|
|
1017
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1018
|
+
mode: Joi.string().allow(""),
|
|
1019
|
+
name: Joi.string().allow(""),
|
|
953
1020
|
payment_type: Joi.string().allow(""),
|
|
1021
|
+
time: Joi.string().allow(""),
|
|
954
1022
|
transaction_id: Joi.string().allow(""),
|
|
955
1023
|
});
|
|
956
1024
|
}
|
|
@@ -1113,21 +1181,22 @@ class FileStoragePlatformModel {
|
|
|
1113
1181
|
static ProductTable() {
|
|
1114
1182
|
return Joi.object({
|
|
1115
1183
|
cod_charges: Joi.number(),
|
|
1184
|
+
coupon: Joi.number(),
|
|
1116
1185
|
delivery_charge_text: Joi.string().allow(""),
|
|
1117
1186
|
delivery_charges: Joi.number(),
|
|
1187
|
+
discount: Joi.number(),
|
|
1118
1188
|
fynd_discounts: Joi.number(),
|
|
1189
|
+
gift_price: Joi.number(),
|
|
1119
1190
|
grand_total: Joi.number(),
|
|
1120
1191
|
products: Joi.array().items(FileStoragePlatformModel.ItemsProductTable()),
|
|
1192
|
+
promotion: Joi.number(),
|
|
1193
|
+
reward: Joi.number(),
|
|
1194
|
+
round_off: Joi.number(),
|
|
1195
|
+
sub_total: Joi.number(),
|
|
1121
1196
|
total_in_words: Joi.string().allow(""),
|
|
1122
1197
|
total_items: Joi.number(),
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
/** @returns {Rates} */
|
|
1127
|
-
static Rates() {
|
|
1128
|
-
return Joi.object({
|
|
1129
|
-
inr: FileStoragePlatformModel.Inr(),
|
|
1130
|
-
usd: FileStoragePlatformModel.Usd(),
|
|
1198
|
+
total_quantity: Joi.number(),
|
|
1199
|
+
total_value_of_goods: Joi.number(),
|
|
1131
1200
|
});
|
|
1132
1201
|
}
|
|
1133
1202
|
|
|
@@ -1138,6 +1207,8 @@ class FileStoragePlatformModel {
|
|
|
1138
1207
|
city: Joi.string().allow(""),
|
|
1139
1208
|
country: Joi.string().allow(""),
|
|
1140
1209
|
country_code: Joi.string().allow(""),
|
|
1210
|
+
display_address: Joi.string().allow(""),
|
|
1211
|
+
sector: Joi.string().allow(""),
|
|
1141
1212
|
state: Joi.string().allow(""),
|
|
1142
1213
|
state_code: Joi.string().allow(""),
|
|
1143
1214
|
zip_code: Joi.number(),
|
|
@@ -1151,7 +1222,9 @@ class FileStoragePlatformModel {
|
|
|
1151
1222
|
city: Joi.string().allow(""),
|
|
1152
1223
|
country: Joi.string().allow(""),
|
|
1153
1224
|
country_code: Joi.string().allow("").allow(null),
|
|
1154
|
-
|
|
1225
|
+
display_address: Joi.string().allow(""),
|
|
1226
|
+
gstin: Joi.string().allow("").allow(null),
|
|
1227
|
+
sector: Joi.string().allow(""),
|
|
1155
1228
|
state: Joi.string().allow(""),
|
|
1156
1229
|
state_code: Joi.string().allow(""),
|
|
1157
1230
|
zip_code: Joi.string().allow(""),
|
|
@@ -1231,9 +1304,12 @@ class FileStoragePlatformModel {
|
|
|
1231
1304
|
city: Joi.string().allow(""),
|
|
1232
1305
|
country: Joi.string().allow(""),
|
|
1233
1306
|
country_code: Joi.string().allow(""),
|
|
1234
|
-
|
|
1307
|
+
display_address: Joi.string().allow(""),
|
|
1308
|
+
gstin: Joi.string().allow("").allow(null),
|
|
1309
|
+
sector: Joi.string().allow(""),
|
|
1235
1310
|
state: Joi.string().allow(""),
|
|
1236
1311
|
state_code: Joi.string().allow(""),
|
|
1312
|
+
store_id: Joi.string().allow(""),
|
|
1237
1313
|
store_name: Joi.string().allow(""),
|
|
1238
1314
|
zip_code: Joi.string().allow(""),
|
|
1239
1315
|
});
|
|
@@ -1290,15 +1366,5 @@ class FileStoragePlatformModel {
|
|
|
1290
1366
|
url: Joi.string().allow("").required(),
|
|
1291
1367
|
});
|
|
1292
1368
|
}
|
|
1293
|
-
|
|
1294
|
-
/** @returns {Usd} */
|
|
1295
|
-
static Usd() {
|
|
1296
|
-
return Joi.object({
|
|
1297
|
-
name: Joi.string().allow(""),
|
|
1298
|
-
sub_unit: Joi.string().allow(""),
|
|
1299
|
-
symbol: Joi.string().allow(""),
|
|
1300
|
-
value: Joi.number(),
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
1369
|
}
|
|
1304
1370
|
module.exports = FileStoragePlatformModel;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const Paginator = require("../../common/Paginator");
|
|
4
7
|
const LeadPlatformApplicationValidator = require("./LeadPlatformApplicationValidator");
|
|
5
8
|
const LeadPlatformModel = require("./LeadPlatformModel");
|
|
@@ -51,18 +51,6 @@ declare class Order {
|
|
|
51
51
|
* @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/).
|
|
52
52
|
*/
|
|
53
53
|
getShipmentBagReasons({ shipmentId, lineNumber, requestHeaders }?: OrderPlatformApplicationValidator.GetShipmentBagReasonsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentBagReasons>;
|
|
54
|
-
/**
|
|
55
|
-
* @param {OrderPlatformApplicationValidator.GetStateManagerStatesParam} arg
|
|
56
|
-
* - Arg object
|
|
57
|
-
*
|
|
58
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
59
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
60
|
-
* @returns {Promise<OrderPlatformModel.PaginatedStates>} - Success response
|
|
61
|
-
* @name getStateManagerStates
|
|
62
|
-
* @summary: Get all states for a company and channel
|
|
63
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerStates/).
|
|
64
|
-
*/
|
|
65
|
-
getStateManagerStates({ pageNo, pageSize, requestHeaders }?: OrderPlatformApplicationValidator.GetStateManagerStatesParam, { responseHeaders }?: object): Promise<OrderPlatformModel.PaginatedStates>;
|
|
66
54
|
/**
|
|
67
55
|
* @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg
|
|
68
56
|
* - Arg object
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
FDKClientValidationError,
|
|
4
|
+
FDKResponseValidationError,
|
|
5
|
+
} = require("../../common/FDKError");
|
|
3
6
|
const Paginator = require("../../common/Paginator");
|
|
4
7
|
const OrderPlatformApplicationValidator = require("./OrderPlatformApplicationValidator");
|
|
5
8
|
const OrderPlatformModel = require("./OrderPlatformModel");
|
|
@@ -411,91 +414,6 @@ class Order {
|
|
|
411
414
|
return response;
|
|
412
415
|
}
|
|
413
416
|
|
|
414
|
-
/**
|
|
415
|
-
* @param {OrderPlatformApplicationValidator.GetStateManagerStatesParam} arg
|
|
416
|
-
* - Arg object
|
|
417
|
-
*
|
|
418
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
419
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
420
|
-
* @returns {Promise<OrderPlatformModel.PaginatedStates>} - Success response
|
|
421
|
-
* @name getStateManagerStates
|
|
422
|
-
* @summary: Get all states for a company and channel
|
|
423
|
-
* @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerStates/).
|
|
424
|
-
*/
|
|
425
|
-
async getStateManagerStates(
|
|
426
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
427
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
428
|
-
) {
|
|
429
|
-
const {
|
|
430
|
-
error,
|
|
431
|
-
} = OrderPlatformApplicationValidator.getStateManagerStates().validate(
|
|
432
|
-
{
|
|
433
|
-
pageNo,
|
|
434
|
-
pageSize,
|
|
435
|
-
},
|
|
436
|
-
{ abortEarly: false, allowUnknown: true }
|
|
437
|
-
);
|
|
438
|
-
if (error) {
|
|
439
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// Showing warrnings if extra unknown parameters are found
|
|
443
|
-
const {
|
|
444
|
-
error: warrning,
|
|
445
|
-
} = OrderPlatformApplicationValidator.getStateManagerStates().validate(
|
|
446
|
-
{
|
|
447
|
-
pageNo,
|
|
448
|
-
pageSize,
|
|
449
|
-
},
|
|
450
|
-
{ abortEarly: false, allowUnknown: false }
|
|
451
|
-
);
|
|
452
|
-
if (warrning) {
|
|
453
|
-
Logger({
|
|
454
|
-
level: "WARN",
|
|
455
|
-
message: `Parameter Validation warrnings for platform > Order > getStateManagerStates \n ${warrning}`,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
const query_params = {};
|
|
460
|
-
query_params["page_no"] = pageNo;
|
|
461
|
-
query_params["page_size"] = pageSize;
|
|
462
|
-
|
|
463
|
-
const response = await PlatformAPIClient.execute(
|
|
464
|
-
this.config,
|
|
465
|
-
"get",
|
|
466
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/states`,
|
|
467
|
-
query_params,
|
|
468
|
-
undefined,
|
|
469
|
-
requestHeaders,
|
|
470
|
-
{ responseHeaders }
|
|
471
|
-
);
|
|
472
|
-
|
|
473
|
-
let responseData = response;
|
|
474
|
-
if (responseHeaders) {
|
|
475
|
-
responseData = response[0];
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
const {
|
|
479
|
-
error: res_error,
|
|
480
|
-
} = OrderPlatformModel.PaginatedStates().validate(responseData, {
|
|
481
|
-
abortEarly: false,
|
|
482
|
-
allowUnknown: true,
|
|
483
|
-
});
|
|
484
|
-
|
|
485
|
-
if (res_error) {
|
|
486
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
487
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
488
|
-
} else {
|
|
489
|
-
Logger({
|
|
490
|
-
level: "WARN",
|
|
491
|
-
message: `Response Validation Warnings for platform > Order > getStateManagerStates \n ${res_error}`,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
return response;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
417
|
/**
|
|
500
418
|
* @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg
|
|
501
419
|
* - Arg object
|
|
@@ -34,11 +34,6 @@ export = OrderPlatformApplicationValidator;
|
|
|
34
34
|
* items and may get divided into one or more shipment, each having its own ID.
|
|
35
35
|
* @property {number} lineNumber - Line number of bag.
|
|
36
36
|
*/
|
|
37
|
-
/**
|
|
38
|
-
* @typedef GetStateManagerStatesParam
|
|
39
|
-
* @property {number} [pageNo]
|
|
40
|
-
* @property {number} [pageSize]
|
|
41
|
-
*/
|
|
42
37
|
/**
|
|
43
38
|
* @typedef TrackShipmentPlatformParam
|
|
44
39
|
* @property {string} shipmentId - Shipment Id
|
|
@@ -52,13 +47,11 @@ declare class OrderPlatformApplicationValidator {
|
|
|
52
47
|
static getPlatformShipmentReasons(): GetPlatformShipmentReasonsParam;
|
|
53
48
|
/** @returns {GetShipmentBagReasonsParam} */
|
|
54
49
|
static getShipmentBagReasons(): GetShipmentBagReasonsParam;
|
|
55
|
-
/** @returns {GetStateManagerStatesParam} */
|
|
56
|
-
static getStateManagerStates(): GetStateManagerStatesParam;
|
|
57
50
|
/** @returns {TrackShipmentPlatformParam} */
|
|
58
51
|
static trackShipmentPlatform(): TrackShipmentPlatformParam;
|
|
59
52
|
}
|
|
60
53
|
declare namespace OrderPlatformApplicationValidator {
|
|
61
|
-
export { FailedOrderLogsParam, GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetShipmentBagReasonsParam,
|
|
54
|
+
export { FailedOrderLogsParam, GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetShipmentBagReasonsParam, TrackShipmentPlatformParam };
|
|
62
55
|
}
|
|
63
56
|
type FailedOrderLogsParam = {
|
|
64
57
|
/**
|
|
@@ -109,10 +102,6 @@ type GetShipmentBagReasonsParam = {
|
|
|
109
102
|
*/
|
|
110
103
|
lineNumber: number;
|
|
111
104
|
};
|
|
112
|
-
type GetStateManagerStatesParam = {
|
|
113
|
-
pageNo?: number;
|
|
114
|
-
pageSize?: number;
|
|
115
|
-
};
|
|
116
105
|
type TrackShipmentPlatformParam = {
|
|
117
106
|
/**
|
|
118
107
|
* - Shipment Id
|