@gofynd/fdk-client-javascript 1.3.11-beta.8 → 1.4.0-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 +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/FileStorage/FileStoragePartnerModel.d.ts +3 -15
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +185 -315
- package/sdk/partner/Theme/ThemePartnerModel.js +182 -222
- 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 +4 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +2 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +14 -3
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +14 -5
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +13 -4
- package/sdk/platform/Content/ContentPlatformClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformClient.js +14 -3
- package/sdk/platform/Content/ContentPlatformModel.d.ts +6 -0
- package/sdk/platform/Content/ContentPlatformModel.js +6 -0
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +12 -3
- package/sdk/platform/Content/ContentPlatformValidator.js +11 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +2 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +118 -58
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +122 -68
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -85
- 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/Theme/ThemePlatformModel.d.ts +103 -21
- package/sdk/platform/Theme/ThemePlatformModel.js +108 -20
- 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]
|
|
@@ -296,16 +325,15 @@ const Joi = require("joi");
|
|
|
296
325
|
* @property {UpiQrcodeGenerator} [upi_qrcode_generator]
|
|
297
326
|
*/
|
|
298
327
|
|
|
299
|
-
/**
|
|
300
|
-
* @typedef Params
|
|
301
|
-
* @property {string} [subpath] - The subpath for the file.
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
328
|
/**
|
|
305
329
|
* @typedef PaymentData
|
|
306
330
|
* @property {number} [amount]
|
|
307
331
|
* @property {string} [date]
|
|
332
|
+
* @property {Object} [meta]
|
|
333
|
+
* @property {string} [mode]
|
|
334
|
+
* @property {string} [name]
|
|
308
335
|
* @property {string} [payment_type]
|
|
336
|
+
* @property {string} [time]
|
|
309
337
|
* @property {string} [transaction_id]
|
|
310
338
|
*/
|
|
311
339
|
|
|
@@ -434,19 +462,22 @@ const Joi = require("joi");
|
|
|
434
462
|
/**
|
|
435
463
|
* @typedef ProductTable
|
|
436
464
|
* @property {number} [cod_charges]
|
|
465
|
+
* @property {number} [coupon]
|
|
437
466
|
* @property {string} [delivery_charge_text]
|
|
438
467
|
* @property {number} [delivery_charges]
|
|
468
|
+
* @property {number} [discount]
|
|
439
469
|
* @property {number} [fynd_discounts]
|
|
470
|
+
* @property {number} [gift_price]
|
|
440
471
|
* @property {number} [grand_total]
|
|
441
472
|
* @property {ItemsProductTable[]} [products]
|
|
473
|
+
* @property {number} [promotion]
|
|
474
|
+
* @property {number} [reward]
|
|
475
|
+
* @property {number} [round_off]
|
|
476
|
+
* @property {number} [sub_total]
|
|
442
477
|
* @property {string} [total_in_words]
|
|
443
478
|
* @property {number} [total_items]
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* @typedef Rates
|
|
448
|
-
* @property {Inr} [inr]
|
|
449
|
-
* @property {Usd} [usd]
|
|
479
|
+
* @property {number} [total_quantity]
|
|
480
|
+
* @property {number} [total_value_of_goods]
|
|
450
481
|
*/
|
|
451
482
|
|
|
452
483
|
/**
|
|
@@ -455,6 +486,8 @@ const Joi = require("joi");
|
|
|
455
486
|
* @property {string} [city]
|
|
456
487
|
* @property {string} [country]
|
|
457
488
|
* @property {string} [country_code]
|
|
489
|
+
* @property {string} [display_address]
|
|
490
|
+
* @property {string} [sector]
|
|
458
491
|
* @property {string} [state]
|
|
459
492
|
* @property {string} [state_code]
|
|
460
493
|
* @property {number} [zip_code]
|
|
@@ -466,7 +499,9 @@ const Joi = require("joi");
|
|
|
466
499
|
* @property {string} [city]
|
|
467
500
|
* @property {string} [country]
|
|
468
501
|
* @property {string} [country_code]
|
|
502
|
+
* @property {string} [display_address]
|
|
469
503
|
* @property {string} [gstin]
|
|
504
|
+
* @property {string} [sector]
|
|
470
505
|
* @property {string} [state]
|
|
471
506
|
* @property {string} [state_code]
|
|
472
507
|
* @property {string} [zip_code]
|
|
@@ -505,7 +540,7 @@ const Joi = require("joi");
|
|
|
505
540
|
* @typedef StartRequest
|
|
506
541
|
* @property {string} content_type
|
|
507
542
|
* @property {string} file_name
|
|
508
|
-
* @property {
|
|
543
|
+
* @property {Object} [params]
|
|
509
544
|
* @property {number} size
|
|
510
545
|
* @property {string[]} [tags]
|
|
511
546
|
*/
|
|
@@ -530,9 +565,12 @@ const Joi = require("joi");
|
|
|
530
565
|
* @property {string} [city]
|
|
531
566
|
* @property {string} [country]
|
|
532
567
|
* @property {string} [country_code]
|
|
568
|
+
* @property {string} [display_address]
|
|
533
569
|
* @property {string} [gstin]
|
|
570
|
+
* @property {string} [sector]
|
|
534
571
|
* @property {string} [state]
|
|
535
572
|
* @property {string} [state_code]
|
|
573
|
+
* @property {string} [store_id]
|
|
536
574
|
* @property {string} [store_name]
|
|
537
575
|
* @property {string} [zip_code]
|
|
538
576
|
*/
|
|
@@ -577,15 +615,15 @@ const Joi = require("joi");
|
|
|
577
615
|
* @property {string} url
|
|
578
616
|
*/
|
|
579
617
|
|
|
580
|
-
/**
|
|
581
|
-
* @typedef Usd
|
|
582
|
-
* @property {string} [name]
|
|
583
|
-
* @property {string} [sub_unit]
|
|
584
|
-
* @property {string} [symbol]
|
|
585
|
-
* @property {number} [value]
|
|
586
|
-
*/
|
|
587
|
-
|
|
588
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
|
+
|
|
589
627
|
/** @returns {AwbNumberLabelBarcodeGenerator} */
|
|
590
628
|
static AwbNumberLabelBarcodeGenerator() {
|
|
591
629
|
return Joi.object({
|
|
@@ -623,17 +661,24 @@ class FileStoragePlatformModel {
|
|
|
623
661
|
static CompanyDetail() {
|
|
624
662
|
return Joi.object({
|
|
625
663
|
address: Joi.string().allow(""),
|
|
664
|
+
business_country_currency: Joi.object().pattern(/\S/, Joi.any()),
|
|
665
|
+
business_country_timezone: Joi.string().allow(""),
|
|
626
666
|
cin: Joi.string().allow(""),
|
|
627
667
|
city: Joi.string().allow(""),
|
|
628
668
|
country: Joi.string().allow(""),
|
|
629
669
|
country_code: Joi.string().allow(""),
|
|
670
|
+
display_address: Joi.string().allow(""),
|
|
630
671
|
email: Joi.string().allow(""),
|
|
631
672
|
gstin: Joi.string().allow(""),
|
|
632
673
|
name: Joi.string().allow(""),
|
|
633
674
|
pan: Joi.string().allow("").allow(null),
|
|
675
|
+
phone: Joi.object().pattern(/\S/, Joi.any()),
|
|
634
676
|
phone_no: Joi.string().allow(""),
|
|
677
|
+
sector: Joi.string().allow(""),
|
|
635
678
|
state: Joi.string().allow(""),
|
|
636
679
|
state_code: Joi.string().allow(""),
|
|
680
|
+
trn: Joi.string().allow(""),
|
|
681
|
+
vat: Joi.string().allow(""),
|
|
637
682
|
website_url: Joi.string().allow(""),
|
|
638
683
|
zip_code: Joi.number(),
|
|
639
684
|
});
|
|
@@ -664,7 +709,7 @@ class FileStoragePlatformModel {
|
|
|
664
709
|
static ConversionRate() {
|
|
665
710
|
return Joi.object({
|
|
666
711
|
base: Joi.string().allow(""),
|
|
667
|
-
rates:
|
|
712
|
+
rates: Joi.object().pattern(/\S/, Joi.any()),
|
|
668
713
|
timestamp: Joi.number(),
|
|
669
714
|
});
|
|
670
715
|
}
|
|
@@ -691,9 +736,12 @@ class FileStoragePlatformModel {
|
|
|
691
736
|
city: Joi.string().allow(""),
|
|
692
737
|
country: Joi.string().allow(""),
|
|
693
738
|
country_code: Joi.string().allow(""),
|
|
739
|
+
display_address: Joi.string().allow(""),
|
|
740
|
+
email: Joi.string().allow(""),
|
|
694
741
|
gstin: Joi.string().allow("").allow(null),
|
|
695
742
|
name: Joi.string().allow(""),
|
|
696
743
|
phone_no: Joi.string().allow(""),
|
|
744
|
+
sector: Joi.string().allow(""),
|
|
697
745
|
state: Joi.string().allow(""),
|
|
698
746
|
state_code: Joi.string().allow(""),
|
|
699
747
|
zip_code: Joi.string().allow(""),
|
|
@@ -707,9 +755,11 @@ class FileStoragePlatformModel {
|
|
|
707
755
|
city: Joi.string().allow(""),
|
|
708
756
|
country: Joi.string().allow(""),
|
|
709
757
|
country_code: Joi.string().allow(""),
|
|
758
|
+
display_address: Joi.string().allow(""),
|
|
710
759
|
gstin: Joi.string().allow("").allow(null),
|
|
711
760
|
name: Joi.string().allow(""),
|
|
712
761
|
phone_no: Joi.string().allow(""),
|
|
762
|
+
sector: Joi.string().allow(""),
|
|
713
763
|
state: Joi.string().allow(""),
|
|
714
764
|
state_code: Joi.string().allow(""),
|
|
715
765
|
zip_code: Joi.string().allow(""),
|
|
@@ -721,8 +771,10 @@ class FileStoragePlatformModel {
|
|
|
721
771
|
return Joi.object({
|
|
722
772
|
awb_number: Joi.string().allow(""),
|
|
723
773
|
awb_number_barcode: Joi.string().allow(""),
|
|
774
|
+
destination: Joi.string().allow(""),
|
|
724
775
|
eway_bill_number: Joi.string().allow("").allow(null),
|
|
725
776
|
name: Joi.string().allow(""),
|
|
777
|
+
origin: Joi.string().allow(""),
|
|
726
778
|
});
|
|
727
779
|
}
|
|
728
780
|
|
|
@@ -781,10 +833,13 @@ class FileStoragePlatformModel {
|
|
|
781
833
|
amount_to_be_collected: Joi.number(),
|
|
782
834
|
app_domain_name: Joi.string().allow(""),
|
|
783
835
|
awb_number_barcode: Joi.string().allow(""),
|
|
836
|
+
b2b_buyer_details: Joi.object().pattern(/\S/, Joi.any()),
|
|
784
837
|
brand_logo: Joi.string().allow(""),
|
|
785
838
|
company_detail: FileStoragePlatformModel.CompanyDetail(),
|
|
786
839
|
conversion_rate: FileStoragePlatformModel.ConversionRate(),
|
|
840
|
+
credit_note_id: Joi.string().allow("").allow(null),
|
|
787
841
|
currency_code: Joi.string().allow(""),
|
|
842
|
+
current_date: Joi.string().allow(""),
|
|
788
843
|
customer_billing_detail: FileStoragePlatformModel.CustomerBillingDetail(),
|
|
789
844
|
customer_shipping_detail: FileStoragePlatformModel.CustomerShippingDetail(),
|
|
790
845
|
declaration_texts: Joi.array().items(Joi.string().allow("")),
|
|
@@ -794,12 +849,16 @@ class FileStoragePlatformModel {
|
|
|
794
849
|
image: FileStoragePlatformModel.Image(),
|
|
795
850
|
invoice_detail: FileStoragePlatformModel.InvoiceDetail(),
|
|
796
851
|
is_export: Joi.boolean(),
|
|
852
|
+
is_export_shipment: Joi.boolean(),
|
|
853
|
+
is_qwik: Joi.object().pattern(/\S/, Joi.any()),
|
|
797
854
|
is_self_pickup: Joi.boolean(),
|
|
798
855
|
is_self_ship: Joi.boolean(),
|
|
799
856
|
meta: FileStoragePlatformModel.Meta(),
|
|
800
857
|
mode: Joi.string().allow(""),
|
|
858
|
+
order_type: Joi.string().allow(""),
|
|
801
859
|
payments: Joi.array().items(FileStoragePlatformModel.PaymentData()),
|
|
802
860
|
platform_name: Joi.string().allow(""),
|
|
861
|
+
po_number: Joi.string().allow(""),
|
|
803
862
|
product_table: FileStoragePlatformModel.ProductTable(),
|
|
804
863
|
registered_company_detail: FileStoragePlatformModel.RegisteredCompanyDetail(),
|
|
805
864
|
return_detail: FileStoragePlatformModel.ReturnDetail(),
|
|
@@ -809,8 +868,11 @@ class FileStoragePlatformModel {
|
|
|
809
868
|
store_detail: FileStoragePlatformModel.StoreDetail(),
|
|
810
869
|
tax_table: FileStoragePlatformModel.TaxTable(),
|
|
811
870
|
total_items: Joi.number(),
|
|
871
|
+
total_value_of_goods: Joi.number(),
|
|
872
|
+
txn_id: Joi.string().allow(""),
|
|
812
873
|
uid: Joi.string().allow(""),
|
|
813
874
|
upi_qrcode: Joi.string().allow(""),
|
|
875
|
+
utr: Joi.string().allow(""),
|
|
814
876
|
waybills: Joi.array().items(Joi.any()),
|
|
815
877
|
});
|
|
816
878
|
}
|
|
@@ -844,23 +906,17 @@ class FileStoragePlatformModel {
|
|
|
844
906
|
});
|
|
845
907
|
}
|
|
846
908
|
|
|
847
|
-
/** @returns {Inr} */
|
|
848
|
-
static Inr() {
|
|
849
|
-
return Joi.object({
|
|
850
|
-
name: Joi.string().allow(""),
|
|
851
|
-
sub_unit: Joi.string().allow(""),
|
|
852
|
-
symbol: Joi.string().allow(""),
|
|
853
|
-
value: Joi.number(),
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
|
|
857
909
|
/** @returns {InvoiceDetail} */
|
|
858
910
|
static InvoiceDetail() {
|
|
859
911
|
return Joi.object({
|
|
912
|
+
channel_order_id: Joi.string().allow(""),
|
|
913
|
+
device_id: Joi.string().allow(""),
|
|
860
914
|
external_order_id: Joi.string().allow(""),
|
|
861
915
|
invoice_date: Joi.string().allow(""),
|
|
862
916
|
invoice_id: Joi.string().allow(""),
|
|
863
917
|
irn: Joi.string().allow(""),
|
|
918
|
+
marketplace_invoice_id: Joi.string().allow(""),
|
|
919
|
+
marketplace_shipment_id: Joi.string().allow(""),
|
|
864
920
|
shipment_id: Joi.string().allow(""),
|
|
865
921
|
signed_qrcode: Joi.string().allow(""),
|
|
866
922
|
upi_qrcode: Joi.string().allow(""),
|
|
@@ -895,9 +951,11 @@ class FileStoragePlatformModel {
|
|
|
895
951
|
static ItemsProductTable() {
|
|
896
952
|
return Joi.object({
|
|
897
953
|
brand: FileStoragePlatformModel.Brand(),
|
|
954
|
+
country_of_origin: Joi.string().allow(""),
|
|
898
955
|
discount: Joi.number(),
|
|
899
956
|
hsn_code: Joi.string().allow(""),
|
|
900
957
|
item_code: Joi.string().allow(""),
|
|
958
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
901
959
|
mrp: Joi.number(),
|
|
902
960
|
name: Joi.string().allow(""),
|
|
903
961
|
seller_identifier: Joi.string().allow(""),
|
|
@@ -942,6 +1000,7 @@ class FileStoragePlatformModel {
|
|
|
942
1000
|
/** @returns {MetaProperty} */
|
|
943
1001
|
static MetaProperty() {
|
|
944
1002
|
return Joi.object({
|
|
1003
|
+
awb_number_barcode_generator: FileStoragePlatformModel.AwbNumberBarcodeGenerator(),
|
|
945
1004
|
awb_number_label_barcode_generator: FileStoragePlatformModel.AwbNumberLabelBarcodeGenerator(),
|
|
946
1005
|
digitalsignature_generator: FileStoragePlatformModel.DigitalsignatureGenerator(),
|
|
947
1006
|
shipment_id_barcode_generator: FileStoragePlatformModel.ShipmentIdBarcodeGenerator(),
|
|
@@ -950,19 +1009,16 @@ class FileStoragePlatformModel {
|
|
|
950
1009
|
});
|
|
951
1010
|
}
|
|
952
1011
|
|
|
953
|
-
/** @returns {Params} */
|
|
954
|
-
static Params() {
|
|
955
|
-
return Joi.object({
|
|
956
|
-
subpath: Joi.string().allow(""),
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
|
|
960
1012
|
/** @returns {PaymentData} */
|
|
961
1013
|
static PaymentData() {
|
|
962
1014
|
return Joi.object({
|
|
963
1015
|
amount: Joi.number(),
|
|
964
1016
|
date: Joi.string().allow(""),
|
|
1017
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1018
|
+
mode: Joi.string().allow(""),
|
|
1019
|
+
name: Joi.string().allow(""),
|
|
965
1020
|
payment_type: Joi.string().allow(""),
|
|
1021
|
+
time: Joi.string().allow(""),
|
|
966
1022
|
transaction_id: Joi.string().allow(""),
|
|
967
1023
|
});
|
|
968
1024
|
}
|
|
@@ -1125,21 +1181,22 @@ class FileStoragePlatformModel {
|
|
|
1125
1181
|
static ProductTable() {
|
|
1126
1182
|
return Joi.object({
|
|
1127
1183
|
cod_charges: Joi.number(),
|
|
1184
|
+
coupon: Joi.number(),
|
|
1128
1185
|
delivery_charge_text: Joi.string().allow(""),
|
|
1129
1186
|
delivery_charges: Joi.number(),
|
|
1187
|
+
discount: Joi.number(),
|
|
1130
1188
|
fynd_discounts: Joi.number(),
|
|
1189
|
+
gift_price: Joi.number(),
|
|
1131
1190
|
grand_total: Joi.number(),
|
|
1132
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(),
|
|
1133
1196
|
total_in_words: Joi.string().allow(""),
|
|
1134
1197
|
total_items: Joi.number(),
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
/** @returns {Rates} */
|
|
1139
|
-
static Rates() {
|
|
1140
|
-
return Joi.object({
|
|
1141
|
-
inr: FileStoragePlatformModel.Inr(),
|
|
1142
|
-
usd: FileStoragePlatformModel.Usd(),
|
|
1198
|
+
total_quantity: Joi.number(),
|
|
1199
|
+
total_value_of_goods: Joi.number(),
|
|
1143
1200
|
});
|
|
1144
1201
|
}
|
|
1145
1202
|
|
|
@@ -1150,6 +1207,8 @@ class FileStoragePlatformModel {
|
|
|
1150
1207
|
city: Joi.string().allow(""),
|
|
1151
1208
|
country: Joi.string().allow(""),
|
|
1152
1209
|
country_code: Joi.string().allow(""),
|
|
1210
|
+
display_address: Joi.string().allow(""),
|
|
1211
|
+
sector: Joi.string().allow(""),
|
|
1153
1212
|
state: Joi.string().allow(""),
|
|
1154
1213
|
state_code: Joi.string().allow(""),
|
|
1155
1214
|
zip_code: Joi.number(),
|
|
@@ -1163,7 +1222,9 @@ class FileStoragePlatformModel {
|
|
|
1163
1222
|
city: Joi.string().allow(""),
|
|
1164
1223
|
country: Joi.string().allow(""),
|
|
1165
1224
|
country_code: Joi.string().allow("").allow(null),
|
|
1166
|
-
|
|
1225
|
+
display_address: Joi.string().allow(""),
|
|
1226
|
+
gstin: Joi.string().allow("").allow(null),
|
|
1227
|
+
sector: Joi.string().allow(""),
|
|
1167
1228
|
state: Joi.string().allow(""),
|
|
1168
1229
|
state_code: Joi.string().allow(""),
|
|
1169
1230
|
zip_code: Joi.string().allow(""),
|
|
@@ -1214,7 +1275,7 @@ class FileStoragePlatformModel {
|
|
|
1214
1275
|
return Joi.object({
|
|
1215
1276
|
content_type: Joi.string().allow("").required(),
|
|
1216
1277
|
file_name: Joi.string().allow("").required(),
|
|
1217
|
-
params:
|
|
1278
|
+
params: Joi.object().pattern(/\S/, Joi.any()),
|
|
1218
1279
|
size: Joi.number().required(),
|
|
1219
1280
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1220
1281
|
});
|
|
@@ -1243,9 +1304,12 @@ class FileStoragePlatformModel {
|
|
|
1243
1304
|
city: Joi.string().allow(""),
|
|
1244
1305
|
country: Joi.string().allow(""),
|
|
1245
1306
|
country_code: Joi.string().allow(""),
|
|
1246
|
-
|
|
1307
|
+
display_address: Joi.string().allow(""),
|
|
1308
|
+
gstin: Joi.string().allow("").allow(null),
|
|
1309
|
+
sector: Joi.string().allow(""),
|
|
1247
1310
|
state: Joi.string().allow(""),
|
|
1248
1311
|
state_code: Joi.string().allow(""),
|
|
1312
|
+
store_id: Joi.string().allow(""),
|
|
1249
1313
|
store_name: Joi.string().allow(""),
|
|
1250
1314
|
zip_code: Joi.string().allow(""),
|
|
1251
1315
|
});
|
|
@@ -1302,15 +1366,5 @@ class FileStoragePlatformModel {
|
|
|
1302
1366
|
url: Joi.string().allow("").required(),
|
|
1303
1367
|
});
|
|
1304
1368
|
}
|
|
1305
|
-
|
|
1306
|
-
/** @returns {Usd} */
|
|
1307
|
-
static Usd() {
|
|
1308
|
-
return Joi.object({
|
|
1309
|
-
name: Joi.string().allow(""),
|
|
1310
|
-
sub_unit: Joi.string().allow(""),
|
|
1311
|
-
symbol: Joi.string().allow(""),
|
|
1312
|
-
value: Joi.number(),
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
1369
|
}
|
|
1316
1370
|
module.exports = FileStoragePlatformModel;
|
|
@@ -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
|
|
@@ -411,91 +411,6 @@ class Order {
|
|
|
411
411
|
return response;
|
|
412
412
|
}
|
|
413
413
|
|
|
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
414
|
/**
|
|
500
415
|
* @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg
|
|
501
416
|
* - 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
|