@gofynd/fdk-client-javascript 1.3.4-beta.1 → 1.3.4
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/Catalog/CatalogApplicationModel.d.ts +18 -1
- package/sdk/application/Catalog/CatalogApplicationModel.js +20 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -9
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +21 -7
- package/sdk/application/User/UserApplicationClient.d.ts +56 -0
- package/sdk/application/User/UserApplicationClient.js +385 -0
- package/sdk/application/User/UserApplicationModel.d.ts +93 -1
- package/sdk/application/User/UserApplicationModel.js +110 -0
- package/sdk/application/User/UserApplicationValidator.d.ts +66 -1
- package/sdk/application/User/UserApplicationValidator.js +68 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +96 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +177 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +139 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +6 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +33 -0
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/index.d.ts +1 -0
- package/sdk/partner/index.js +2 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +11 -79
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +12 -8
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -9
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +37 -27
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -56
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +22 -11
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +24 -10
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +4 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +832 -150
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +940 -138
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +1 -1
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10 -2
- package/sdk/platform/Order/OrderPlatformModel.js +10 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +4 -4
- package/sdk/platform/Order/OrderPlatformValidator.js +4 -4
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +42 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +241 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +41 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +40 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +72 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +54 -0
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @typedef BulkUploadFailResponse
|
|
11
|
-
* @property {Status} status
|
|
4
|
+
* @typedef AwbNumberLabelBarcodeGenerator
|
|
5
|
+
* @property {KwargsAwbNumber} [kwargs]
|
|
6
|
+
* @property {string} [method]
|
|
12
7
|
*/
|
|
13
8
|
|
|
14
9
|
/**
|
|
15
|
-
* @typedef
|
|
16
|
-
* @property {
|
|
17
|
-
* @property {
|
|
10
|
+
* @typedef Brand
|
|
11
|
+
* @property {string} [logo]
|
|
12
|
+
* @property {string} [name]
|
|
18
13
|
*/
|
|
19
14
|
|
|
20
15
|
/**
|
|
@@ -24,11 +19,37 @@ const Joi = require("joi");
|
|
|
24
19
|
* @property {string} url
|
|
25
20
|
*/
|
|
26
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @typedef Cgst
|
|
24
|
+
* @property {number} [percent]
|
|
25
|
+
* @property {number} [value]
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef CompanyDetail
|
|
30
|
+
* @property {string} [address]
|
|
31
|
+
* @property {string} [cin]
|
|
32
|
+
* @property {string} [city]
|
|
33
|
+
* @property {string} [country]
|
|
34
|
+
* @property {string} [country_code]
|
|
35
|
+
* @property {string} [email]
|
|
36
|
+
* @property {string} [gstin]
|
|
37
|
+
* @property {string} [name]
|
|
38
|
+
* @property {string} [pan]
|
|
39
|
+
* @property {string} [phone_no]
|
|
40
|
+
* @property {string} [state]
|
|
41
|
+
* @property {string} [state_code]
|
|
42
|
+
* @property {string} [website_url]
|
|
43
|
+
* @property {number} [zip_code]
|
|
44
|
+
*/
|
|
45
|
+
|
|
27
46
|
/**
|
|
28
47
|
* @typedef CompleteResponse
|
|
29
48
|
* @property {string} _id
|
|
30
49
|
* @property {CDN} cdn
|
|
50
|
+
* @property {number} company_id
|
|
31
51
|
* @property {string} content_type
|
|
52
|
+
* @property {CreatedBy} [created_by]
|
|
32
53
|
* @property {string} created_on
|
|
33
54
|
* @property {string} file_name
|
|
34
55
|
* @property {string} file_path
|
|
@@ -41,26 +62,58 @@ const Joi = require("joi");
|
|
|
41
62
|
* @property {Upload} upload
|
|
42
63
|
*/
|
|
43
64
|
|
|
65
|
+
/**
|
|
66
|
+
* @typedef ConversionRate
|
|
67
|
+
* @property {string} [base]
|
|
68
|
+
* @property {Rates} [rates]
|
|
69
|
+
* @property {number} [timestamp]
|
|
70
|
+
*/
|
|
71
|
+
|
|
44
72
|
/**
|
|
45
73
|
* @typedef CopyFiles
|
|
46
74
|
* @property {DestinationNamespace} destination
|
|
47
|
-
* @property {string[]} urls
|
|
75
|
+
* @property {string[]} [urls]
|
|
48
76
|
*/
|
|
49
77
|
|
|
50
78
|
/**
|
|
51
|
-
* @typedef
|
|
52
|
-
* @property {string}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
* @
|
|
57
|
-
* @property {string}
|
|
58
|
-
* @property {string}
|
|
59
|
-
* @property {string}
|
|
60
|
-
* @property {string} [
|
|
61
|
-
* @property {
|
|
62
|
-
* @property {string[]
|
|
63
|
-
* @property {
|
|
79
|
+
* @typedef CreatedBy
|
|
80
|
+
* @property {string} [username]
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @typedef CustomerBillingDetail
|
|
85
|
+
* @property {string} [address]
|
|
86
|
+
* @property {string} [city]
|
|
87
|
+
* @property {string} [country]
|
|
88
|
+
* @property {string} [country_code]
|
|
89
|
+
* @property {string} [gstin]
|
|
90
|
+
* @property {string} [name]
|
|
91
|
+
* @property {string} [phone_no]
|
|
92
|
+
* @property {string} [state]
|
|
93
|
+
* @property {string} [state_code]
|
|
94
|
+
* @property {string} [zip_code]
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @typedef CustomerShippingDetail
|
|
99
|
+
* @property {string} [address]
|
|
100
|
+
* @property {string} [city]
|
|
101
|
+
* @property {string} [country]
|
|
102
|
+
* @property {string} [country_code]
|
|
103
|
+
* @property {string} [gstin]
|
|
104
|
+
* @property {string} [name]
|
|
105
|
+
* @property {string} [phone_no]
|
|
106
|
+
* @property {string} [state]
|
|
107
|
+
* @property {string} [state_code]
|
|
108
|
+
* @property {string} [zip_code]
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @typedef DeliveryPartnerDetail
|
|
113
|
+
* @property {string} [awb_number]
|
|
114
|
+
* @property {string} [awb_number_barcode]
|
|
115
|
+
* @property {string} [eway_bill_number]
|
|
116
|
+
* @property {string} [name]
|
|
64
117
|
*/
|
|
65
118
|
|
|
66
119
|
/**
|
|
@@ -69,11 +122,72 @@ const Joi = require("joi");
|
|
|
69
122
|
*/
|
|
70
123
|
|
|
71
124
|
/**
|
|
72
|
-
* @typedef
|
|
125
|
+
* @typedef DigitalsignatureGenerator
|
|
126
|
+
* @property {Kwargs} [kwargs]
|
|
127
|
+
* @property {string} [method]
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @typedef Document
|
|
73
132
|
* @property {number} [__v]
|
|
74
133
|
* @property {string} [_id]
|
|
75
|
-
* @property {
|
|
134
|
+
* @property {string} [country_code]
|
|
135
|
+
* @property {string} [format]
|
|
76
136
|
* @property {number} [pdf_type_id]
|
|
137
|
+
* @property {string} [template]
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @typedef DummyTemplateData
|
|
142
|
+
* @property {number} [__v]
|
|
143
|
+
* @property {string} [_id]
|
|
144
|
+
* @property {DummyTemplateDataPayload} payload
|
|
145
|
+
* @property {number} [pdf_type_id]
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @typedef DummyTemplateDataItems
|
|
150
|
+
* @property {DummyTemplateData[]} data
|
|
151
|
+
* @property {boolean} success
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @typedef DummyTemplateDataPayload
|
|
156
|
+
* @property {number} [amount_paid]
|
|
157
|
+
* @property {number} [amount_to_be_collected]
|
|
158
|
+
* @property {string} [app_domain_name]
|
|
159
|
+
* @property {string} [awb_number_barcode]
|
|
160
|
+
* @property {string} [brand_logo]
|
|
161
|
+
* @property {CompanyDetail} [company_detail]
|
|
162
|
+
* @property {ConversionRate} [conversion_rate]
|
|
163
|
+
* @property {string} [currency_code]
|
|
164
|
+
* @property {CustomerBillingDetail} [customer_billing_detail]
|
|
165
|
+
* @property {CustomerShippingDetail} [customer_shipping_detail]
|
|
166
|
+
* @property {string[]} [declaration_texts]
|
|
167
|
+
* @property {DeliveryPartnerDetail} [delivery_partner_detail]
|
|
168
|
+
* @property {string} [digitalsignature]
|
|
169
|
+
* @property {string} [disclaimer]
|
|
170
|
+
* @property {Image} [image]
|
|
171
|
+
* @property {InvoiceDetail} [invoice_detail]
|
|
172
|
+
* @property {boolean} [is_international]
|
|
173
|
+
* @property {boolean} [is_self_pickup]
|
|
174
|
+
* @property {boolean} [is_self_ship]
|
|
175
|
+
* @property {Meta} [meta]
|
|
176
|
+
* @property {string} [mode]
|
|
177
|
+
* @property {PaymentData[]} [payments]
|
|
178
|
+
* @property {string} [platform_name]
|
|
179
|
+
* @property {ProductTable} [product_table]
|
|
180
|
+
* @property {RegisteredCompanyDetail} [registered_company_detail]
|
|
181
|
+
* @property {ReturnDetail} [return_detail]
|
|
182
|
+
* @property {string} [shipment_id]
|
|
183
|
+
* @property {string} [shipment_id_barcode]
|
|
184
|
+
* @property {string} [signed_qrcode]
|
|
185
|
+
* @property {StoreDetail} [store_detail]
|
|
186
|
+
* @property {TaxTable} [tax_table]
|
|
187
|
+
* @property {number} [total_items]
|
|
188
|
+
* @property {string} [uid]
|
|
189
|
+
* @property {string} [upi_qrcode]
|
|
190
|
+
* @property {Object[]} [waybills]
|
|
77
191
|
*/
|
|
78
192
|
|
|
79
193
|
/**
|
|
@@ -82,47 +196,189 @@ const Joi = require("joi");
|
|
|
82
196
|
*/
|
|
83
197
|
|
|
84
198
|
/**
|
|
85
|
-
* @typedef
|
|
86
|
-
* @property {
|
|
199
|
+
* @typedef Igst
|
|
200
|
+
* @property {number} [percent]
|
|
201
|
+
* @property {number} [value]
|
|
87
202
|
*/
|
|
88
203
|
|
|
89
204
|
/**
|
|
90
|
-
* @typedef
|
|
91
|
-
* @property {string} [
|
|
92
|
-
* @property {string} [namespace]
|
|
93
|
-
* @property {string} url
|
|
205
|
+
* @typedef Image
|
|
206
|
+
* @property {string} [sales_channel_logo]
|
|
94
207
|
*/
|
|
95
208
|
|
|
96
209
|
/**
|
|
97
|
-
* @typedef
|
|
98
|
-
* @property {
|
|
99
|
-
* @property {
|
|
210
|
+
* @typedef Inr
|
|
211
|
+
* @property {string} [name]
|
|
212
|
+
* @property {string} [sub_unit]
|
|
213
|
+
* @property {string} [symbol]
|
|
214
|
+
* @property {number} [value]
|
|
100
215
|
*/
|
|
101
216
|
|
|
102
217
|
/**
|
|
103
|
-
* @typedef
|
|
218
|
+
* @typedef InvoiceDetail
|
|
219
|
+
* @property {string} [external_order_id]
|
|
220
|
+
* @property {string} [invoice_date]
|
|
221
|
+
* @property {string} [invoice_id]
|
|
222
|
+
* @property {string} [irn]
|
|
223
|
+
* @property {string} [shipment_id]
|
|
224
|
+
* @property {string} [signed_qrcode]
|
|
225
|
+
* @property {string} [upi_qrcode]
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @typedef InvoiceTypesDataResponse
|
|
104
230
|
* @property {number} __v
|
|
105
231
|
* @property {string} _id
|
|
232
|
+
* @property {string} [country_code]
|
|
106
233
|
* @property {string[]} format
|
|
107
234
|
* @property {string} name
|
|
108
235
|
* @property {number} pdf_type_id
|
|
109
|
-
* @property {
|
|
236
|
+
* @property {boolean} [status]
|
|
110
237
|
* @property {boolean} visibility
|
|
111
238
|
*/
|
|
112
239
|
|
|
113
240
|
/**
|
|
114
|
-
* @typedef
|
|
115
|
-
* @property {
|
|
116
|
-
* @property {boolean}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
* @
|
|
121
|
-
* @property {
|
|
241
|
+
* @typedef InvoiceTypesResponse
|
|
242
|
+
* @property {InvoiceTypesDataResponse[]} data
|
|
243
|
+
* @property {boolean} success
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @typedef ItemsProductTable
|
|
248
|
+
* @property {Brand} [brand]
|
|
249
|
+
* @property {number} [discount]
|
|
250
|
+
* @property {string} [hsn_code]
|
|
251
|
+
* @property {string} [item_code]
|
|
252
|
+
* @property {number} [mrp]
|
|
253
|
+
* @property {string} [name]
|
|
254
|
+
* @property {string} [seller_identifier]
|
|
255
|
+
* @property {string} [size]
|
|
256
|
+
* @property {Tax} [tax]
|
|
257
|
+
* @property {number} [taxable_amount]
|
|
258
|
+
* @property {number} [total]
|
|
259
|
+
* @property {number} [total_taxable_amount]
|
|
260
|
+
* @property {number} [total_units]
|
|
261
|
+
*/
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @typedef Kwargs
|
|
265
|
+
* @property {string} [value]
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @typedef KwargsAwbNumber
|
|
270
|
+
* @property {Object[]} [value]
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @typedef KwargsUpiQrcode
|
|
275
|
+
* @property {string} [qr_data]
|
|
276
|
+
* @property {string} [qr_url]
|
|
277
|
+
*/
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @typedef Meta
|
|
281
|
+
* @property {MetaProperty} [generator]
|
|
282
|
+
*/
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* @typedef MetaProperty
|
|
286
|
+
* @property {AwbNumberLabelBarcodeGenerator} [awb_number_label_barcode_generator]
|
|
287
|
+
* @property {DigitalsignatureGenerator} [digitalsignature_generator]
|
|
288
|
+
* @property {ShipmentIdBarcodeGenerator} [shipment_id_barcode_generator]
|
|
289
|
+
* @property {SignedQrcodeGenerator} [signed_qrcode_generator]
|
|
290
|
+
* @property {UpiQrcodeGenerator} [upi_qrcode_generator]
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @typedef Params
|
|
295
|
+
* @property {string} [subpath] - The subpath for the file.
|
|
296
|
+
*/
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @typedef PaymentData
|
|
300
|
+
* @property {number} [amount]
|
|
301
|
+
* @property {string} [date]
|
|
302
|
+
* @property {string} [payment_type]
|
|
303
|
+
* @property {string} [transaction_id]
|
|
304
|
+
*/
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* @typedef PaymentReceiptCustomerDetails
|
|
308
|
+
* @property {string} [email_id]
|
|
309
|
+
* @property {string} [first_name]
|
|
310
|
+
* @property {string} [id]
|
|
311
|
+
* @property {string} [last_name]
|
|
312
|
+
* @property {string} [mobile_number]
|
|
313
|
+
*/
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @typedef PaymentReceiptFormat
|
|
317
|
+
* @property {string[]} [payment_receipt]
|
|
122
318
|
*/
|
|
123
319
|
|
|
124
320
|
/**
|
|
125
|
-
* @typedef
|
|
321
|
+
* @typedef PaymentReceiptMeta
|
|
322
|
+
* @property {string} [action]
|
|
323
|
+
* @property {string[]} [application_id]
|
|
324
|
+
* @property {number} [company_id]
|
|
325
|
+
* @property {number} [created_timestamp]
|
|
326
|
+
* @property {Object} [event]
|
|
327
|
+
* @property {Object} [event_trace_info]
|
|
328
|
+
* @property {PaymentReceiptFormat} [format]
|
|
329
|
+
* @property {string} [job_type]
|
|
330
|
+
* @property {string} [organizaton_id]
|
|
331
|
+
* @property {PaymentReceiptService} [service]
|
|
332
|
+
* @property {string} [trace]
|
|
333
|
+
* @property {string[]} [trace_id]
|
|
334
|
+
*/
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @typedef PaymentReceiptOrderDetails
|
|
338
|
+
* @property {number} [final_amount]
|
|
339
|
+
* @property {string} [final_amount_in_words]
|
|
340
|
+
* @property {string} [jiomart_order_id]
|
|
341
|
+
* @property {string} [order_created_date]
|
|
342
|
+
* @property {string} [order_created_time]
|
|
343
|
+
* @property {string} [prm_id]
|
|
344
|
+
* @property {string} [receipt_no]
|
|
345
|
+
* @property {PaymentReceiptTaxes} [taxes]
|
|
346
|
+
* @property {number} [total_items]
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @typedef PaymentReceiptPayload
|
|
351
|
+
* @property {PaymentReceiptCustomerDetails} [customer_detail]
|
|
352
|
+
* @property {PaymentReceiptOrderDetails} [order_detail]
|
|
353
|
+
* @property {PaymentReceiptPayments[]} [payments]
|
|
354
|
+
* @property {string} [uid]
|
|
355
|
+
*/
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @typedef PaymentReceiptPayments
|
|
359
|
+
* @property {string} [payment_desc]
|
|
360
|
+
* @property {string} [txn_date]
|
|
361
|
+
*/
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* @typedef PaymentReceiptRequestBody
|
|
365
|
+
* @property {PaymentReceiptMeta} [meta]
|
|
366
|
+
* @property {PaymentReceiptPayload} [payload]
|
|
367
|
+
*/
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @typedef PaymentReceiptService
|
|
371
|
+
* @property {string} [name]
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @typedef PaymentReceiptTaxes
|
|
376
|
+
* @property {string} [gstin]
|
|
377
|
+
* @property {string} [pancard]
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @typedef PdfConfig
|
|
126
382
|
* @property {string} [format] - This is invoice document format such as A4, A6, POS
|
|
127
383
|
* @property {number} [pdf_type_id]
|
|
128
384
|
* @property {string} [template] - This is html template string
|
|
@@ -130,6 +386,12 @@ const Joi = require("joi");
|
|
|
130
386
|
|
|
131
387
|
/**
|
|
132
388
|
* @typedef PdfConfigSaveSuccess
|
|
389
|
+
* @property {PdfConfigSaveSuccessData} [data]
|
|
390
|
+
* @property {boolean} [success]
|
|
391
|
+
*/
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @typedef PdfConfigSaveSuccessData
|
|
133
395
|
* @property {number} [__v]
|
|
134
396
|
* @property {string} [_id]
|
|
135
397
|
* @property {string} [application_id]
|
|
@@ -141,10 +403,17 @@ const Joi = require("joi");
|
|
|
141
403
|
|
|
142
404
|
/**
|
|
143
405
|
* @typedef PdfConfigSuccess
|
|
406
|
+
* @property {PdfConfigSuccessData[]} [data]
|
|
407
|
+
* @property {boolean} [success]
|
|
408
|
+
*/
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @typedef PdfConfigSuccessData
|
|
144
412
|
* @property {number} [__v]
|
|
145
413
|
* @property {string} [_id]
|
|
146
414
|
* @property {string} [application_id]
|
|
147
415
|
* @property {number} [company_id]
|
|
416
|
+
* @property {string} [country_code]
|
|
148
417
|
* @property {string} [format]
|
|
149
418
|
* @property {number} [pdf_type_id]
|
|
150
419
|
* @property {string} [template]
|
|
@@ -152,18 +421,67 @@ const Joi = require("joi");
|
|
|
152
421
|
|
|
153
422
|
/**
|
|
154
423
|
* @typedef PdfDefaultTemplateSuccess
|
|
155
|
-
* @property {
|
|
156
|
-
* @property {
|
|
157
|
-
* @property {string} [format]
|
|
158
|
-
* @property {number} [pdf_type_id]
|
|
159
|
-
* @property {string} [template]
|
|
424
|
+
* @property {Document[]} [data]
|
|
425
|
+
* @property {boolean} [success] - Indicates if the request was successful.
|
|
160
426
|
*/
|
|
161
427
|
|
|
162
428
|
/**
|
|
163
|
-
* @typedef
|
|
164
|
-
* @property {
|
|
165
|
-
* @property {
|
|
166
|
-
* @property {
|
|
429
|
+
* @typedef ProductTable
|
|
430
|
+
* @property {number} [cod_charges]
|
|
431
|
+
* @property {string} [delivery_charge_text]
|
|
432
|
+
* @property {number} [delivery_charges]
|
|
433
|
+
* @property {number} [fynd_discounts]
|
|
434
|
+
* @property {number} [grand_total]
|
|
435
|
+
* @property {ItemsProductTable[]} [products]
|
|
436
|
+
* @property {string} [total_in_words]
|
|
437
|
+
* @property {number} [total_items]
|
|
438
|
+
*/
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* @typedef Rates
|
|
442
|
+
* @property {Inr} [inr]
|
|
443
|
+
* @property {Usd} [usd]
|
|
444
|
+
*/
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* @typedef RegisteredCompanyDetail
|
|
448
|
+
* @property {string} [address]
|
|
449
|
+
* @property {string} [city]
|
|
450
|
+
* @property {string} [country]
|
|
451
|
+
* @property {string} [country_code]
|
|
452
|
+
* @property {string} [state]
|
|
453
|
+
* @property {string} [state_code]
|
|
454
|
+
* @property {number} [zip_code]
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* @typedef ReturnDetail
|
|
459
|
+
* @property {string} [address]
|
|
460
|
+
* @property {string} [city]
|
|
461
|
+
* @property {string} [country]
|
|
462
|
+
* @property {string} [country_code]
|
|
463
|
+
* @property {string} [gstin]
|
|
464
|
+
* @property {string} [state]
|
|
465
|
+
* @property {string} [state_code]
|
|
466
|
+
* @property {string} [zip_code]
|
|
467
|
+
*/
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @typedef Sgst
|
|
471
|
+
* @property {number} [percent]
|
|
472
|
+
* @property {number} [value]
|
|
473
|
+
*/
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @typedef ShipmentIdBarcodeGenerator
|
|
477
|
+
* @property {Kwargs} [kwargs]
|
|
478
|
+
* @property {string} [method]
|
|
479
|
+
*/
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* @typedef SignedQrcodeGenerator
|
|
483
|
+
* @property {Kwargs} [kwargs]
|
|
484
|
+
* @property {string} [method]
|
|
167
485
|
*/
|
|
168
486
|
|
|
169
487
|
/**
|
|
@@ -181,7 +499,7 @@ const Joi = require("joi");
|
|
|
181
499
|
* @typedef StartRequest
|
|
182
500
|
* @property {string} content_type
|
|
183
501
|
* @property {string} file_name
|
|
184
|
-
* @property {
|
|
502
|
+
* @property {Params} [params]
|
|
185
503
|
* @property {number} size
|
|
186
504
|
* @property {string[]} [tags]
|
|
187
505
|
*/
|
|
@@ -201,11 +519,43 @@ const Joi = require("joi");
|
|
|
201
519
|
*/
|
|
202
520
|
|
|
203
521
|
/**
|
|
204
|
-
* @typedef
|
|
205
|
-
* @property {
|
|
206
|
-
* @property {string} [
|
|
207
|
-
* @property {
|
|
208
|
-
* @property {
|
|
522
|
+
* @typedef StoreDetail
|
|
523
|
+
* @property {string} [address]
|
|
524
|
+
* @property {string} [city]
|
|
525
|
+
* @property {string} [country]
|
|
526
|
+
* @property {string} [country_code]
|
|
527
|
+
* @property {string} [gstin]
|
|
528
|
+
* @property {string} [state]
|
|
529
|
+
* @property {string} [state_code]
|
|
530
|
+
* @property {string} [store_name]
|
|
531
|
+
* @property {string} [zip_code]
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* @typedef Tax
|
|
536
|
+
* @property {Cgst} [cgst]
|
|
537
|
+
* @property {Igst} [igst]
|
|
538
|
+
* @property {Sgst} [sgst]
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* @typedef Taxes
|
|
543
|
+
* @property {string} [hsn_code]
|
|
544
|
+
* @property {Tax} [tax]
|
|
545
|
+
* @property {number} [total_tax_value]
|
|
546
|
+
*/
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* @typedef TaxTable
|
|
550
|
+
* @property {string} [tax_in_words]
|
|
551
|
+
* @property {Taxes[]} [taxes]
|
|
552
|
+
* @property {number} [total_tax]
|
|
553
|
+
*/
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* @typedef UpiQrcodeGenerator
|
|
557
|
+
* @property {KwargsUpiQrcode} [kwargs]
|
|
558
|
+
* @property {string} [method]
|
|
209
559
|
*/
|
|
210
560
|
|
|
211
561
|
/**
|
|
@@ -221,27 +571,28 @@ const Joi = require("joi");
|
|
|
221
571
|
* @property {string} url
|
|
222
572
|
*/
|
|
223
573
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
574
|
+
/**
|
|
575
|
+
* @typedef Usd
|
|
576
|
+
* @property {string} [name]
|
|
577
|
+
* @property {string} [sub_unit]
|
|
578
|
+
* @property {string} [symbol]
|
|
579
|
+
* @property {number} [value]
|
|
580
|
+
*/
|
|
232
581
|
|
|
233
|
-
|
|
234
|
-
|
|
582
|
+
class FileStoragePlatformModel {
|
|
583
|
+
/** @returns {AwbNumberLabelBarcodeGenerator} */
|
|
584
|
+
static AwbNumberLabelBarcodeGenerator() {
|
|
235
585
|
return Joi.object({
|
|
236
|
-
|
|
586
|
+
kwargs: FileStoragePlatformModel.KwargsAwbNumber(),
|
|
587
|
+
method: Joi.string().allow(""),
|
|
237
588
|
});
|
|
238
589
|
}
|
|
239
590
|
|
|
240
|
-
/** @returns {
|
|
241
|
-
static
|
|
591
|
+
/** @returns {Brand} */
|
|
592
|
+
static Brand() {
|
|
242
593
|
return Joi.object({
|
|
243
|
-
|
|
244
|
-
|
|
594
|
+
logo: Joi.string().allow(""),
|
|
595
|
+
name: Joi.string().allow(""),
|
|
245
596
|
});
|
|
246
597
|
}
|
|
247
598
|
|
|
@@ -254,12 +605,42 @@ class FileStoragePlatformModel {
|
|
|
254
605
|
});
|
|
255
606
|
}
|
|
256
607
|
|
|
608
|
+
/** @returns {Cgst} */
|
|
609
|
+
static Cgst() {
|
|
610
|
+
return Joi.object({
|
|
611
|
+
percent: Joi.number(),
|
|
612
|
+
value: Joi.number(),
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/** @returns {CompanyDetail} */
|
|
617
|
+
static CompanyDetail() {
|
|
618
|
+
return Joi.object({
|
|
619
|
+
address: Joi.string().allow(""),
|
|
620
|
+
cin: Joi.string().allow(""),
|
|
621
|
+
city: Joi.string().allow(""),
|
|
622
|
+
country: Joi.string().allow(""),
|
|
623
|
+
country_code: Joi.string().allow(""),
|
|
624
|
+
email: Joi.string().allow(""),
|
|
625
|
+
gstin: Joi.string().allow(""),
|
|
626
|
+
name: Joi.string().allow(""),
|
|
627
|
+
pan: Joi.string().allow("").allow(null),
|
|
628
|
+
phone_no: Joi.string().allow(""),
|
|
629
|
+
state: Joi.string().allow(""),
|
|
630
|
+
state_code: Joi.string().allow(""),
|
|
631
|
+
website_url: Joi.string().allow(""),
|
|
632
|
+
zip_code: Joi.number(),
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
|
|
257
636
|
/** @returns {CompleteResponse} */
|
|
258
637
|
static CompleteResponse() {
|
|
259
638
|
return Joi.object({
|
|
260
639
|
_id: Joi.string().allow("").required(),
|
|
261
640
|
cdn: FileStoragePlatformModel.CDN().required(),
|
|
641
|
+
company_id: Joi.number().required(),
|
|
262
642
|
content_type: Joi.string().allow("").required(),
|
|
643
|
+
created_by: FileStoragePlatformModel.CreatedBy(),
|
|
263
644
|
created_on: Joi.string().allow("").required(),
|
|
264
645
|
file_name: Joi.string().allow("").required(),
|
|
265
646
|
file_path: Joi.string().allow("").required(),
|
|
@@ -273,29 +654,69 @@ class FileStoragePlatformModel {
|
|
|
273
654
|
});
|
|
274
655
|
}
|
|
275
656
|
|
|
657
|
+
/** @returns {ConversionRate} */
|
|
658
|
+
static ConversionRate() {
|
|
659
|
+
return Joi.object({
|
|
660
|
+
base: Joi.string().allow(""),
|
|
661
|
+
rates: FileStoragePlatformModel.Rates(),
|
|
662
|
+
timestamp: Joi.number(),
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
|
|
276
666
|
/** @returns {CopyFiles} */
|
|
277
667
|
static CopyFiles() {
|
|
278
668
|
return Joi.object({
|
|
279
669
|
destination: FileStoragePlatformModel.DestinationNamespace().required(),
|
|
280
|
-
urls: Joi.array().items(Joi.string().allow(""))
|
|
670
|
+
urls: Joi.array().items(Joi.string().allow("")),
|
|
281
671
|
});
|
|
282
672
|
}
|
|
283
673
|
|
|
284
|
-
/** @returns {
|
|
285
|
-
static
|
|
674
|
+
/** @returns {CreatedBy} */
|
|
675
|
+
static CreatedBy() {
|
|
286
676
|
return Joi.object({
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
677
|
+
username: Joi.string().allow(""),
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/** @returns {CustomerBillingDetail} */
|
|
682
|
+
static CustomerBillingDetail() {
|
|
683
|
+
return Joi.object({
|
|
684
|
+
address: Joi.string().allow(""),
|
|
685
|
+
city: Joi.string().allow(""),
|
|
686
|
+
country: Joi.string().allow(""),
|
|
687
|
+
country_code: Joi.string().allow(""),
|
|
688
|
+
gstin: Joi.string().allow("").allow(null),
|
|
689
|
+
name: Joi.string().allow(""),
|
|
690
|
+
phone_no: Joi.string().allow(""),
|
|
691
|
+
state: Joi.string().allow(""),
|
|
692
|
+
state_code: Joi.string().allow(""),
|
|
693
|
+
zip_code: Joi.string().allow(""),
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/** @returns {CustomerShippingDetail} */
|
|
698
|
+
static CustomerShippingDetail() {
|
|
699
|
+
return Joi.object({
|
|
700
|
+
address: Joi.string().allow(""),
|
|
701
|
+
city: Joi.string().allow(""),
|
|
702
|
+
country: Joi.string().allow(""),
|
|
703
|
+
country_code: Joi.string().allow(""),
|
|
704
|
+
gstin: Joi.string().allow("").allow(null),
|
|
705
|
+
name: Joi.string().allow(""),
|
|
706
|
+
phone_no: Joi.string().allow(""),
|
|
707
|
+
state: Joi.string().allow(""),
|
|
708
|
+
state_code: Joi.string().allow(""),
|
|
709
|
+
zip_code: Joi.string().allow(""),
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/** @returns {DeliveryPartnerDetail} */
|
|
714
|
+
static DeliveryPartnerDetail() {
|
|
715
|
+
return Joi.object({
|
|
716
|
+
awb_number: Joi.string().allow(""),
|
|
717
|
+
awb_number_barcode: Joi.string().allow(""),
|
|
718
|
+
eway_bill_number: Joi.string().allow("").allow(null),
|
|
719
|
+
name: Joi.string().allow(""),
|
|
299
720
|
});
|
|
300
721
|
}
|
|
301
722
|
|
|
@@ -306,16 +727,87 @@ class FileStoragePlatformModel {
|
|
|
306
727
|
});
|
|
307
728
|
}
|
|
308
729
|
|
|
309
|
-
/** @returns {
|
|
310
|
-
static
|
|
730
|
+
/** @returns {DigitalsignatureGenerator} */
|
|
731
|
+
static DigitalsignatureGenerator() {
|
|
732
|
+
return Joi.object({
|
|
733
|
+
kwargs: FileStoragePlatformModel.Kwargs(),
|
|
734
|
+
method: Joi.string().allow(""),
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/** @returns {Document} */
|
|
739
|
+
static Document() {
|
|
311
740
|
return Joi.object({
|
|
312
741
|
__v: Joi.number(),
|
|
313
742
|
_id: Joi.string().allow(""),
|
|
314
|
-
|
|
743
|
+
country_code: Joi.string().allow(""),
|
|
744
|
+
format: Joi.string().allow(""),
|
|
745
|
+
pdf_type_id: Joi.number(),
|
|
746
|
+
template: Joi.string().allow(""),
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/** @returns {DummyTemplateData} */
|
|
751
|
+
static DummyTemplateData() {
|
|
752
|
+
return Joi.object({
|
|
753
|
+
__v: Joi.number(),
|
|
754
|
+
_id: Joi.string().allow(""),
|
|
755
|
+
payload: FileStoragePlatformModel.DummyTemplateDataPayload().required(),
|
|
315
756
|
pdf_type_id: Joi.number(),
|
|
316
757
|
});
|
|
317
758
|
}
|
|
318
759
|
|
|
760
|
+
/** @returns {DummyTemplateDataItems} */
|
|
761
|
+
static DummyTemplateDataItems() {
|
|
762
|
+
return Joi.object({
|
|
763
|
+
data: Joi.array()
|
|
764
|
+
.items(FileStoragePlatformModel.DummyTemplateData())
|
|
765
|
+
.required(),
|
|
766
|
+
success: Joi.boolean().required(),
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/** @returns {DummyTemplateDataPayload} */
|
|
771
|
+
static DummyTemplateDataPayload() {
|
|
772
|
+
return Joi.object({
|
|
773
|
+
amount_paid: Joi.number(),
|
|
774
|
+
amount_to_be_collected: Joi.number(),
|
|
775
|
+
app_domain_name: Joi.string().allow(""),
|
|
776
|
+
awb_number_barcode: Joi.string().allow(""),
|
|
777
|
+
brand_logo: Joi.string().allow(""),
|
|
778
|
+
company_detail: FileStoragePlatformModel.CompanyDetail(),
|
|
779
|
+
conversion_rate: FileStoragePlatformModel.ConversionRate(),
|
|
780
|
+
currency_code: Joi.string().allow(""),
|
|
781
|
+
customer_billing_detail: FileStoragePlatformModel.CustomerBillingDetail(),
|
|
782
|
+
customer_shipping_detail: FileStoragePlatformModel.CustomerShippingDetail(),
|
|
783
|
+
declaration_texts: Joi.array().items(Joi.string().allow("")),
|
|
784
|
+
delivery_partner_detail: FileStoragePlatformModel.DeliveryPartnerDetail(),
|
|
785
|
+
digitalsignature: Joi.string().allow(""),
|
|
786
|
+
disclaimer: Joi.string().allow(""),
|
|
787
|
+
image: FileStoragePlatformModel.Image(),
|
|
788
|
+
invoice_detail: FileStoragePlatformModel.InvoiceDetail(),
|
|
789
|
+
is_international: Joi.boolean(),
|
|
790
|
+
is_self_pickup: Joi.boolean(),
|
|
791
|
+
is_self_ship: Joi.boolean(),
|
|
792
|
+
meta: FileStoragePlatformModel.Meta(),
|
|
793
|
+
mode: Joi.string().allow(""),
|
|
794
|
+
payments: Joi.array().items(FileStoragePlatformModel.PaymentData()),
|
|
795
|
+
platform_name: Joi.string().allow(""),
|
|
796
|
+
product_table: FileStoragePlatformModel.ProductTable(),
|
|
797
|
+
registered_company_detail: FileStoragePlatformModel.RegisteredCompanyDetail(),
|
|
798
|
+
return_detail: FileStoragePlatformModel.ReturnDetail(),
|
|
799
|
+
shipment_id: Joi.string().allow(""),
|
|
800
|
+
shipment_id_barcode: Joi.string().allow(""),
|
|
801
|
+
signed_qrcode: Joi.string().allow(""),
|
|
802
|
+
store_detail: FileStoragePlatformModel.StoreDetail(),
|
|
803
|
+
tax_table: FileStoragePlatformModel.TaxTable(),
|
|
804
|
+
total_items: Joi.number(),
|
|
805
|
+
uid: Joi.string().allow(""),
|
|
806
|
+
upi_qrcode: Joi.string().allow(""),
|
|
807
|
+
waybills: Joi.array().items(Joi.any()),
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
|
|
319
811
|
/** @returns {FailedResponse} */
|
|
320
812
|
static FailedResponse() {
|
|
321
813
|
return Joi.object({
|
|
@@ -323,58 +815,240 @@ class FileStoragePlatformModel {
|
|
|
323
815
|
});
|
|
324
816
|
}
|
|
325
817
|
|
|
326
|
-
/** @returns {
|
|
327
|
-
static
|
|
818
|
+
/** @returns {Igst} */
|
|
819
|
+
static Igst() {
|
|
328
820
|
return Joi.object({
|
|
329
|
-
|
|
821
|
+
percent: Joi.number(),
|
|
822
|
+
value: Joi.number(),
|
|
330
823
|
});
|
|
331
824
|
}
|
|
332
825
|
|
|
333
|
-
/** @returns {
|
|
334
|
-
static
|
|
826
|
+
/** @returns {Image} */
|
|
827
|
+
static Image() {
|
|
335
828
|
return Joi.object({
|
|
336
|
-
|
|
337
|
-
namespace: Joi.string().allow(""),
|
|
338
|
-
url: Joi.string().allow("").required(),
|
|
829
|
+
sales_channel_logo: Joi.string().allow(""),
|
|
339
830
|
});
|
|
340
831
|
}
|
|
341
832
|
|
|
342
|
-
/** @returns {
|
|
343
|
-
static
|
|
833
|
+
/** @returns {Inr} */
|
|
834
|
+
static Inr() {
|
|
344
835
|
return Joi.object({
|
|
345
|
-
|
|
346
|
-
|
|
836
|
+
name: Joi.string().allow(""),
|
|
837
|
+
sub_unit: Joi.string().allow(""),
|
|
838
|
+
symbol: Joi.string().allow(""),
|
|
839
|
+
value: Joi.number(),
|
|
347
840
|
});
|
|
348
841
|
}
|
|
349
842
|
|
|
350
|
-
/** @returns {
|
|
351
|
-
static
|
|
843
|
+
/** @returns {InvoiceDetail} */
|
|
844
|
+
static InvoiceDetail() {
|
|
845
|
+
return Joi.object({
|
|
846
|
+
external_order_id: Joi.string().allow(""),
|
|
847
|
+
invoice_date: Joi.string().allow(""),
|
|
848
|
+
invoice_id: Joi.string().allow(""),
|
|
849
|
+
irn: Joi.string().allow(""),
|
|
850
|
+
shipment_id: Joi.string().allow(""),
|
|
851
|
+
signed_qrcode: Joi.string().allow(""),
|
|
852
|
+
upi_qrcode: Joi.string().allow(""),
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/** @returns {InvoiceTypesDataResponse} */
|
|
857
|
+
static InvoiceTypesDataResponse() {
|
|
352
858
|
return Joi.object({
|
|
353
859
|
__v: Joi.number().required(),
|
|
354
860
|
_id: Joi.string().allow("").required(),
|
|
861
|
+
country_code: Joi.string().allow(""),
|
|
355
862
|
format: Joi.array().items(Joi.string().allow("")).required(),
|
|
356
863
|
name: Joi.string().allow("").required(),
|
|
357
864
|
pdf_type_id: Joi.number().required(),
|
|
358
|
-
|
|
865
|
+
status: Joi.boolean(),
|
|
359
866
|
visibility: Joi.boolean().required(),
|
|
360
867
|
});
|
|
361
868
|
}
|
|
362
869
|
|
|
363
|
-
/** @returns {
|
|
364
|
-
static
|
|
870
|
+
/** @returns {InvoiceTypesResponse} */
|
|
871
|
+
static InvoiceTypesResponse() {
|
|
872
|
+
return Joi.object({
|
|
873
|
+
data: Joi.array()
|
|
874
|
+
.items(FileStoragePlatformModel.InvoiceTypesDataResponse())
|
|
875
|
+
.required(),
|
|
876
|
+
success: Joi.boolean().required(),
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/** @returns {ItemsProductTable} */
|
|
881
|
+
static ItemsProductTable() {
|
|
882
|
+
return Joi.object({
|
|
883
|
+
brand: FileStoragePlatformModel.Brand(),
|
|
884
|
+
discount: Joi.number(),
|
|
885
|
+
hsn_code: Joi.string().allow(""),
|
|
886
|
+
item_code: Joi.string().allow(""),
|
|
887
|
+
mrp: Joi.number(),
|
|
888
|
+
name: Joi.string().allow(""),
|
|
889
|
+
seller_identifier: Joi.string().allow(""),
|
|
890
|
+
size: Joi.string().allow(""),
|
|
891
|
+
tax: FileStoragePlatformModel.Tax(),
|
|
892
|
+
taxable_amount: Joi.number(),
|
|
893
|
+
total: Joi.number(),
|
|
894
|
+
total_taxable_amount: Joi.number(),
|
|
895
|
+
total_units: Joi.number(),
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/** @returns {Kwargs} */
|
|
900
|
+
static Kwargs() {
|
|
901
|
+
return Joi.object({
|
|
902
|
+
value: Joi.string().allow(""),
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/** @returns {KwargsAwbNumber} */
|
|
907
|
+
static KwargsAwbNumber() {
|
|
908
|
+
return Joi.object({
|
|
909
|
+
value: Joi.array().items(Joi.any()),
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/** @returns {KwargsUpiQrcode} */
|
|
914
|
+
static KwargsUpiQrcode() {
|
|
915
|
+
return Joi.object({
|
|
916
|
+
qr_data: Joi.string().allow(""),
|
|
917
|
+
qr_url: Joi.string().allow(""),
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/** @returns {Meta} */
|
|
922
|
+
static Meta() {
|
|
923
|
+
return Joi.object({
|
|
924
|
+
generator: FileStoragePlatformModel.MetaProperty(),
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/** @returns {MetaProperty} */
|
|
929
|
+
static MetaProperty() {
|
|
930
|
+
return Joi.object({
|
|
931
|
+
awb_number_label_barcode_generator: FileStoragePlatformModel.AwbNumberLabelBarcodeGenerator(),
|
|
932
|
+
digitalsignature_generator: FileStoragePlatformModel.DigitalsignatureGenerator(),
|
|
933
|
+
shipment_id_barcode_generator: FileStoragePlatformModel.ShipmentIdBarcodeGenerator(),
|
|
934
|
+
signed_qrcode_generator: FileStoragePlatformModel.SignedQrcodeGenerator(),
|
|
935
|
+
upi_qrcode_generator: FileStoragePlatformModel.UpiQrcodeGenerator(),
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/** @returns {Params} */
|
|
940
|
+
static Params() {
|
|
941
|
+
return Joi.object({
|
|
942
|
+
subpath: Joi.string().allow(""),
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/** @returns {PaymentData} */
|
|
947
|
+
static PaymentData() {
|
|
948
|
+
return Joi.object({
|
|
949
|
+
amount: Joi.number(),
|
|
950
|
+
date: Joi.string().allow(""),
|
|
951
|
+
payment_type: Joi.string().allow(""),
|
|
952
|
+
transaction_id: Joi.string().allow(""),
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/** @returns {PaymentReceiptCustomerDetails} */
|
|
957
|
+
static PaymentReceiptCustomerDetails() {
|
|
958
|
+
return Joi.object({
|
|
959
|
+
email_id: Joi.string().allow(""),
|
|
960
|
+
first_name: Joi.string().allow(""),
|
|
961
|
+
id: Joi.string().allow(""),
|
|
962
|
+
last_name: Joi.string().allow(""),
|
|
963
|
+
mobile_number: Joi.string().allow(""),
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/** @returns {PaymentReceiptFormat} */
|
|
968
|
+
static PaymentReceiptFormat() {
|
|
969
|
+
return Joi.object({
|
|
970
|
+
payment_receipt: Joi.array().items(Joi.string().allow("")),
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/** @returns {PaymentReceiptMeta} */
|
|
975
|
+
static PaymentReceiptMeta() {
|
|
976
|
+
return Joi.object({
|
|
977
|
+
action: Joi.string().allow(""),
|
|
978
|
+
application_id: Joi.array().items(Joi.string().allow("")),
|
|
979
|
+
company_id: Joi.number(),
|
|
980
|
+
created_timestamp: Joi.number(),
|
|
981
|
+
event: Joi.any(),
|
|
982
|
+
event_trace_info: Joi.any(),
|
|
983
|
+
format: FileStoragePlatformModel.PaymentReceiptFormat(),
|
|
984
|
+
job_type: Joi.string().allow(""),
|
|
985
|
+
organizaton_id: Joi.string().allow(""),
|
|
986
|
+
service: FileStoragePlatformModel.PaymentReceiptService(),
|
|
987
|
+
trace: Joi.string().allow(""),
|
|
988
|
+
trace_id: Joi.array().items(Joi.string().allow("")),
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/** @returns {PaymentReceiptOrderDetails} */
|
|
993
|
+
static PaymentReceiptOrderDetails() {
|
|
994
|
+
return Joi.object({
|
|
995
|
+
final_amount: Joi.number(),
|
|
996
|
+
final_amount_in_words: Joi.string().allow(""),
|
|
997
|
+
jiomart_order_id: Joi.string().allow(""),
|
|
998
|
+
order_created_date: Joi.string().allow(""),
|
|
999
|
+
order_created_time: Joi.string().allow(""),
|
|
1000
|
+
prm_id: Joi.string().allow(""),
|
|
1001
|
+
receipt_no: Joi.string().allow(""),
|
|
1002
|
+
taxes: FileStoragePlatformModel.PaymentReceiptTaxes(),
|
|
1003
|
+
total_items: Joi.number(),
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
/** @returns {PaymentReceiptPayload} */
|
|
1008
|
+
static PaymentReceiptPayload() {
|
|
1009
|
+
return Joi.object({
|
|
1010
|
+
customer_detail: FileStoragePlatformModel.PaymentReceiptCustomerDetails(),
|
|
1011
|
+
order_detail: FileStoragePlatformModel.PaymentReceiptOrderDetails(),
|
|
1012
|
+
payments: Joi.array().items(
|
|
1013
|
+
FileStoragePlatformModel.PaymentReceiptPayments()
|
|
1014
|
+
),
|
|
1015
|
+
uid: Joi.string().allow(""),
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/** @returns {PaymentReceiptPayments} */
|
|
1020
|
+
static PaymentReceiptPayments() {
|
|
1021
|
+
return Joi.object({
|
|
1022
|
+
payment_desc: Joi.string().allow(""),
|
|
1023
|
+
txn_date: Joi.string().allow(""),
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/** @returns {PaymentReceiptRequestBody} */
|
|
1028
|
+
static PaymentReceiptRequestBody() {
|
|
365
1029
|
return Joi.object({
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
has_previous: Joi.boolean(),
|
|
369
|
-
item_total: Joi.number(),
|
|
370
|
-
next_id: Joi.string().allow(""),
|
|
371
|
-
size: Joi.number(),
|
|
372
|
-
type: Joi.string().allow("").required(),
|
|
1030
|
+
meta: FileStoragePlatformModel.PaymentReceiptMeta(),
|
|
1031
|
+
payload: FileStoragePlatformModel.PaymentReceiptPayload(),
|
|
373
1032
|
});
|
|
374
1033
|
}
|
|
375
1034
|
|
|
376
|
-
/** @returns {
|
|
377
|
-
static
|
|
1035
|
+
/** @returns {PaymentReceiptService} */
|
|
1036
|
+
static PaymentReceiptService() {
|
|
1037
|
+
return Joi.object({
|
|
1038
|
+
name: Joi.string().allow(""),
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/** @returns {PaymentReceiptTaxes} */
|
|
1043
|
+
static PaymentReceiptTaxes() {
|
|
1044
|
+
return Joi.object({
|
|
1045
|
+
gstin: Joi.string().allow(""),
|
|
1046
|
+
pancard: Joi.string().allow(""),
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/** @returns {PdfConfig} */
|
|
1051
|
+
static PdfConfig() {
|
|
378
1052
|
return Joi.object({
|
|
379
1053
|
format: Joi.string().allow(""),
|
|
380
1054
|
pdf_type_id: Joi.number(),
|
|
@@ -384,6 +1058,14 @@ class FileStoragePlatformModel {
|
|
|
384
1058
|
|
|
385
1059
|
/** @returns {PdfConfigSaveSuccess} */
|
|
386
1060
|
static PdfConfigSaveSuccess() {
|
|
1061
|
+
return Joi.object({
|
|
1062
|
+
data: FileStoragePlatformModel.PdfConfigSaveSuccessData(),
|
|
1063
|
+
success: Joi.boolean(),
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/** @returns {PdfConfigSaveSuccessData} */
|
|
1068
|
+
static PdfConfigSaveSuccessData() {
|
|
387
1069
|
return Joi.object({
|
|
388
1070
|
__v: Joi.number(),
|
|
389
1071
|
_id: Joi.string().allow(""),
|
|
@@ -397,11 +1079,20 @@ class FileStoragePlatformModel {
|
|
|
397
1079
|
|
|
398
1080
|
/** @returns {PdfConfigSuccess} */
|
|
399
1081
|
static PdfConfigSuccess() {
|
|
1082
|
+
return Joi.object({
|
|
1083
|
+
data: Joi.array().items(FileStoragePlatformModel.PdfConfigSuccessData()),
|
|
1084
|
+
success: Joi.boolean(),
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
/** @returns {PdfConfigSuccessData} */
|
|
1089
|
+
static PdfConfigSuccessData() {
|
|
400
1090
|
return Joi.object({
|
|
401
1091
|
__v: Joi.number(),
|
|
402
1092
|
_id: Joi.string().allow(""),
|
|
403
1093
|
application_id: Joi.string().allow(""),
|
|
404
1094
|
company_id: Joi.number(),
|
|
1095
|
+
country_code: Joi.string().allow(""),
|
|
405
1096
|
format: Joi.string().allow(""),
|
|
406
1097
|
pdf_type_id: Joi.number(),
|
|
407
1098
|
template: Joi.string().allow(""),
|
|
@@ -411,20 +1102,81 @@ class FileStoragePlatformModel {
|
|
|
411
1102
|
/** @returns {PdfDefaultTemplateSuccess} */
|
|
412
1103
|
static PdfDefaultTemplateSuccess() {
|
|
413
1104
|
return Joi.object({
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
format: Joi.string().allow(""),
|
|
417
|
-
pdf_type_id: Joi.number(),
|
|
418
|
-
template: Joi.string().allow(""),
|
|
1105
|
+
data: Joi.array().items(FileStoragePlatformModel.Document()),
|
|
1106
|
+
success: Joi.boolean(),
|
|
419
1107
|
});
|
|
420
1108
|
}
|
|
421
1109
|
|
|
422
|
-
/** @returns {
|
|
423
|
-
static
|
|
1110
|
+
/** @returns {ProductTable} */
|
|
1111
|
+
static ProductTable() {
|
|
424
1112
|
return Joi.object({
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
1113
|
+
cod_charges: Joi.number(),
|
|
1114
|
+
delivery_charge_text: Joi.string().allow(""),
|
|
1115
|
+
delivery_charges: Joi.number(),
|
|
1116
|
+
fynd_discounts: Joi.number(),
|
|
1117
|
+
grand_total: Joi.number(),
|
|
1118
|
+
products: Joi.array().items(FileStoragePlatformModel.ItemsProductTable()),
|
|
1119
|
+
total_in_words: Joi.string().allow(""),
|
|
1120
|
+
total_items: Joi.number(),
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/** @returns {Rates} */
|
|
1125
|
+
static Rates() {
|
|
1126
|
+
return Joi.object({
|
|
1127
|
+
inr: FileStoragePlatformModel.Inr(),
|
|
1128
|
+
usd: FileStoragePlatformModel.Usd(),
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/** @returns {RegisteredCompanyDetail} */
|
|
1133
|
+
static RegisteredCompanyDetail() {
|
|
1134
|
+
return Joi.object({
|
|
1135
|
+
address: Joi.string().allow(""),
|
|
1136
|
+
city: Joi.string().allow(""),
|
|
1137
|
+
country: Joi.string().allow(""),
|
|
1138
|
+
country_code: Joi.string().allow(""),
|
|
1139
|
+
state: Joi.string().allow(""),
|
|
1140
|
+
state_code: Joi.string().allow(""),
|
|
1141
|
+
zip_code: Joi.number(),
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/** @returns {ReturnDetail} */
|
|
1146
|
+
static ReturnDetail() {
|
|
1147
|
+
return Joi.object({
|
|
1148
|
+
address: Joi.string().allow(""),
|
|
1149
|
+
city: Joi.string().allow(""),
|
|
1150
|
+
country: Joi.string().allow(""),
|
|
1151
|
+
country_code: Joi.string().allow("").allow(null),
|
|
1152
|
+
gstin: Joi.string().allow(""),
|
|
1153
|
+
state: Joi.string().allow(""),
|
|
1154
|
+
state_code: Joi.string().allow(""),
|
|
1155
|
+
zip_code: Joi.string().allow(""),
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
/** @returns {Sgst} */
|
|
1160
|
+
static Sgst() {
|
|
1161
|
+
return Joi.object({
|
|
1162
|
+
percent: Joi.number(),
|
|
1163
|
+
value: Joi.number(),
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/** @returns {ShipmentIdBarcodeGenerator} */
|
|
1168
|
+
static ShipmentIdBarcodeGenerator() {
|
|
1169
|
+
return Joi.object({
|
|
1170
|
+
kwargs: FileStoragePlatformModel.Kwargs(),
|
|
1171
|
+
method: Joi.string().allow(""),
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/** @returns {SignedQrcodeGenerator} */
|
|
1176
|
+
static SignedQrcodeGenerator() {
|
|
1177
|
+
return Joi.object({
|
|
1178
|
+
kwargs: FileStoragePlatformModel.Kwargs(),
|
|
1179
|
+
method: Joi.string().allow(""),
|
|
428
1180
|
});
|
|
429
1181
|
}
|
|
430
1182
|
|
|
@@ -448,7 +1200,7 @@ class FileStoragePlatformModel {
|
|
|
448
1200
|
return Joi.object({
|
|
449
1201
|
content_type: Joi.string().allow("").required(),
|
|
450
1202
|
file_name: Joi.string().allow("").required(),
|
|
451
|
-
params:
|
|
1203
|
+
params: FileStoragePlatformModel.Params(),
|
|
452
1204
|
size: Joi.number().required(),
|
|
453
1205
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
454
1206
|
});
|
|
@@ -470,13 +1222,53 @@ class FileStoragePlatformModel {
|
|
|
470
1222
|
});
|
|
471
1223
|
}
|
|
472
1224
|
|
|
473
|
-
/** @returns {
|
|
474
|
-
static
|
|
1225
|
+
/** @returns {StoreDetail} */
|
|
1226
|
+
static StoreDetail() {
|
|
1227
|
+
return Joi.object({
|
|
1228
|
+
address: Joi.string().allow(""),
|
|
1229
|
+
city: Joi.string().allow(""),
|
|
1230
|
+
country: Joi.string().allow(""),
|
|
1231
|
+
country_code: Joi.string().allow(""),
|
|
1232
|
+
gstin: Joi.string().allow(""),
|
|
1233
|
+
state: Joi.string().allow(""),
|
|
1234
|
+
state_code: Joi.string().allow(""),
|
|
1235
|
+
store_name: Joi.string().allow(""),
|
|
1236
|
+
zip_code: Joi.string().allow(""),
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/** @returns {Tax} */
|
|
1241
|
+
static Tax() {
|
|
475
1242
|
return Joi.object({
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
1243
|
+
cgst: FileStoragePlatformModel.Cgst(),
|
|
1244
|
+
igst: FileStoragePlatformModel.Igst(),
|
|
1245
|
+
sgst: FileStoragePlatformModel.Sgst(),
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
/** @returns {Taxes} */
|
|
1250
|
+
static Taxes() {
|
|
1251
|
+
return Joi.object({
|
|
1252
|
+
hsn_code: Joi.string().allow(""),
|
|
1253
|
+
tax: FileStoragePlatformModel.Tax(),
|
|
1254
|
+
total_tax_value: Joi.number(),
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/** @returns {TaxTable} */
|
|
1259
|
+
static TaxTable() {
|
|
1260
|
+
return Joi.object({
|
|
1261
|
+
tax_in_words: Joi.string().allow(""),
|
|
1262
|
+
taxes: Joi.array().items(FileStoragePlatformModel.Taxes()),
|
|
1263
|
+
total_tax: Joi.number(),
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
/** @returns {UpiQrcodeGenerator} */
|
|
1268
|
+
static UpiQrcodeGenerator() {
|
|
1269
|
+
return Joi.object({
|
|
1270
|
+
kwargs: FileStoragePlatformModel.KwargsUpiQrcode(),
|
|
1271
|
+
method: Joi.string().allow(""),
|
|
480
1272
|
});
|
|
481
1273
|
}
|
|
482
1274
|
|
|
@@ -496,5 +1288,15 @@ class FileStoragePlatformModel {
|
|
|
496
1288
|
url: Joi.string().allow("").required(),
|
|
497
1289
|
});
|
|
498
1290
|
}
|
|
1291
|
+
|
|
1292
|
+
/** @returns {Usd} */
|
|
1293
|
+
static Usd() {
|
|
1294
|
+
return Joi.object({
|
|
1295
|
+
name: Joi.string().allow(""),
|
|
1296
|
+
sub_unit: Joi.string().allow(""),
|
|
1297
|
+
symbol: Joi.string().allow(""),
|
|
1298
|
+
value: Joi.number(),
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
499
1301
|
}
|
|
500
1302
|
module.exports = FileStoragePlatformModel;
|