@gofynd/fdk-client-javascript 1.4.7 → 1.4.8-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/CartApplicationClient.d.ts +16 -3
- package/sdk/application/Cart/CartApplicationClient.js +118 -13
- package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
- package/sdk/application/Cart/CartApplicationModel.js +98 -26
- package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
- package/sdk/application/Cart/CartApplicationValidator.js +26 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +4 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +4 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.js +5 -3
- package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
- package/sdk/application/Content/ContentApplicationModel.js +6 -20
- package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationValidator.js +4 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
- package/sdk/application/Lead/LeadApplicationClient.js +0 -167
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
- package/sdk/application/Lead/LeadApplicationModel.js +0 -126
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
- package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +4 -0
- package/sdk/application/Order/OrderApplicationModel.js +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +9 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +5 -2
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
- package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +47 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +56 -4
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +2 -2
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
- package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
- package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
- package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +28 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +198 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +81 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +214 -40
- package/sdk/platform/Cart/CartPlatformModel.js +164 -24
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +20 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +28 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +12 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
- package/sdk/platform/Content/ContentPlatformModel.js +8 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +369 -129
- package/sdk/platform/Finance/FinancePlatformModel.js +404 -110
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
- package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
- package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
- package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
- package/sdk/platform/Order/OrderPlatformModel.d.ts +126 -15
- package/sdk/platform/Order/OrderPlatformModel.js +55 -14
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +5 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +20 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +26 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
- package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +0 -2
- package/sdk/platform/User/UserPlatformModel.js +0 -2
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +0 -40
- package/sdk/platform/Webhook/WebhookPlatformClient.js +0 -307
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +94 -146
- package/sdk/platform/Webhook/WebhookPlatformModel.js +100 -151
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +9 -35
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +8 -46
- package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
- package/sdk/public/Billing/BillingPublicClient.js +156 -3
- package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
- package/sdk/public/Billing/BillingPublicModel.js +317 -18
- package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
- package/sdk/public/Billing/BillingPublicValidator.js +22 -3
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +22 -22
- package/sdk/public/Webhook/WebhookPublicModel.js +22 -22
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef OrederFreezeResponse
|
|
5
|
+
* @property {boolean} [success]
|
|
6
|
+
* @property {boolean} [oms_freeze]
|
|
7
|
+
* @property {string} [source]
|
|
8
|
+
*/
|
|
9
|
+
|
|
3
10
|
/**
|
|
4
11
|
* @typedef GenerateReportMeta
|
|
5
12
|
* @property {string} [brand]
|
|
@@ -24,7 +31,7 @@ const Joi = require("joi");
|
|
|
24
31
|
*/
|
|
25
32
|
|
|
26
33
|
/**
|
|
27
|
-
* @typedef
|
|
34
|
+
* @typedef GenerateReportReq
|
|
28
35
|
* @property {GenerateReportPlatform} [data]
|
|
29
36
|
*/
|
|
30
37
|
|
|
@@ -48,24 +55,49 @@ const Joi = require("joi");
|
|
|
48
55
|
|
|
49
56
|
/**
|
|
50
57
|
* @typedef GenerateReportJson
|
|
51
|
-
* @property {
|
|
58
|
+
* @property {Object} [data]
|
|
59
|
+
* @property {number} [item_count]
|
|
52
60
|
* @property {Page} [page]
|
|
53
61
|
* @property {string} [end_date]
|
|
54
|
-
* @property {string[]} [headers]
|
|
55
62
|
* @property {string} [start_date]
|
|
56
|
-
* @property {
|
|
63
|
+
* @property {string[][]} [items]
|
|
64
|
+
* @property {string[]} [headers]
|
|
57
65
|
*/
|
|
58
66
|
|
|
59
67
|
/**
|
|
60
68
|
* @typedef Error
|
|
69
|
+
* @property {number} [status]
|
|
61
70
|
* @property {string} [reason]
|
|
62
71
|
* @property {boolean} [success]
|
|
72
|
+
* @property {string} [message]
|
|
73
|
+
* @property {string} [code]
|
|
74
|
+
* @property {string} [exception]
|
|
75
|
+
* @property {string} [info]
|
|
76
|
+
* @property {string} [request_id]
|
|
77
|
+
* @property {string} [stack_trace]
|
|
78
|
+
* @property {ErrorMeta} [meta]
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @typedef ErrorMeta
|
|
83
|
+
* @property {ErrorMetaItems[]} [columns_errors]
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @typedef ErrorMetaItems
|
|
88
|
+
* @property {number} [code]
|
|
89
|
+
* @property {string} [message]
|
|
63
90
|
*/
|
|
64
91
|
|
|
65
92
|
/**
|
|
66
93
|
* @typedef DownloadReport
|
|
94
|
+
* @property {DownloadReportData} [data]
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @typedef DownloadReportData
|
|
67
99
|
* @property {number} [page]
|
|
68
|
-
* @property {number} [
|
|
100
|
+
* @property {number} [page_size]
|
|
69
101
|
* @property {string} [start_date]
|
|
70
102
|
* @property {string} [end_date]
|
|
71
103
|
*/
|
|
@@ -87,15 +119,28 @@ const Joi = require("joi");
|
|
|
87
119
|
* @property {number} [item_count]
|
|
88
120
|
*/
|
|
89
121
|
|
|
122
|
+
/**
|
|
123
|
+
* @typedef GetEngineFilters
|
|
124
|
+
* @property {string} [config_field]
|
|
125
|
+
* @property {string} [status]
|
|
126
|
+
* @property {boolean} [is_active]
|
|
127
|
+
* @property {string} [seller_id]
|
|
128
|
+
*/
|
|
129
|
+
|
|
90
130
|
/**
|
|
91
131
|
* @typedef GetEngineData
|
|
92
|
-
* @property {string} [
|
|
132
|
+
* @property {string} [status]
|
|
133
|
+
* @property {GetEngineFilters} [filters]
|
|
93
134
|
* @property {string[]} [project]
|
|
94
|
-
* @property {
|
|
135
|
+
* @property {string} [table_name]
|
|
136
|
+
* @property {Object} [search]
|
|
137
|
+
* @property {number} [page]
|
|
138
|
+
* @property {number} [page_size]
|
|
139
|
+
* @property {string} [order_by]
|
|
95
140
|
*/
|
|
96
141
|
|
|
97
142
|
/**
|
|
98
|
-
* @typedef
|
|
143
|
+
* @typedef GetEngineReq
|
|
99
144
|
* @property {GetEngineData} [data]
|
|
100
145
|
*/
|
|
101
146
|
|
|
@@ -113,7 +158,7 @@ const Joi = require("joi");
|
|
|
113
158
|
*/
|
|
114
159
|
|
|
115
160
|
/**
|
|
116
|
-
* @typedef
|
|
161
|
+
* @typedef GetReasonReq
|
|
117
162
|
* @property {GetReason} [data]
|
|
118
163
|
*/
|
|
119
164
|
|
|
@@ -139,7 +184,7 @@ const Joi = require("joi");
|
|
|
139
184
|
*/
|
|
140
185
|
|
|
141
186
|
/**
|
|
142
|
-
* @typedef
|
|
187
|
+
* @typedef GetReportListReq
|
|
143
188
|
* @property {GetReportListData} [data]
|
|
144
189
|
*/
|
|
145
190
|
|
|
@@ -169,6 +214,7 @@ const Joi = require("joi");
|
|
|
169
214
|
|
|
170
215
|
/**
|
|
171
216
|
* @typedef GetAffiliateResponse
|
|
217
|
+
* @property {string} [reason]
|
|
172
218
|
* @property {boolean} [success]
|
|
173
219
|
* @property {Object[]} [docs]
|
|
174
220
|
*/
|
|
@@ -179,7 +225,7 @@ const Joi = require("joi");
|
|
|
179
225
|
*/
|
|
180
226
|
|
|
181
227
|
/**
|
|
182
|
-
* @typedef
|
|
228
|
+
* @typedef DownloadCreditDebitNoteReq
|
|
183
229
|
* @property {DownloadCreditDebitNote} [data]
|
|
184
230
|
*/
|
|
185
231
|
|
|
@@ -195,22 +241,28 @@ const Joi = require("joi");
|
|
|
195
241
|
* @property {DownloadCreditDebitNoteResponseData[]} [data]
|
|
196
242
|
*/
|
|
197
243
|
|
|
244
|
+
/**
|
|
245
|
+
* @typedef InvoiceBillingItem
|
|
246
|
+
* @property {string} [invoice_number]
|
|
247
|
+
* @property {number} [amount]
|
|
248
|
+
*/
|
|
249
|
+
|
|
198
250
|
/**
|
|
199
251
|
* @typedef PaymentProcessPayload
|
|
200
252
|
* @property {string} [platform]
|
|
201
|
-
* @property {
|
|
253
|
+
* @property {number} [amount]
|
|
202
254
|
* @property {string} [transaction_type]
|
|
203
255
|
* @property {string} [source_reference]
|
|
204
|
-
* @property {
|
|
256
|
+
* @property {number} [total_amount]
|
|
205
257
|
* @property {Object} [meta]
|
|
206
258
|
* @property {string} [currency]
|
|
207
259
|
* @property {string} [seller_id]
|
|
208
260
|
* @property {string} [mode_of_payment]
|
|
209
|
-
* @property {
|
|
261
|
+
* @property {InvoiceBillingItem[]} [invoice_billing_items]
|
|
210
262
|
*/
|
|
211
263
|
|
|
212
264
|
/**
|
|
213
|
-
* @typedef
|
|
265
|
+
* @typedef PaymentProcessReq
|
|
214
266
|
* @property {PaymentProcessPayload} [data]
|
|
215
267
|
*/
|
|
216
268
|
|
|
@@ -227,13 +279,13 @@ const Joi = require("joi");
|
|
|
227
279
|
* @typedef CreditlineDataPlatformPayload
|
|
228
280
|
* @property {number} [page]
|
|
229
281
|
* @property {string} [seller_id]
|
|
230
|
-
* @property {string} [
|
|
231
|
-
* @property {string} [
|
|
232
|
-
* @property {number} [
|
|
282
|
+
* @property {string} [end_date]
|
|
283
|
+
* @property {string} [start_date]
|
|
284
|
+
* @property {number} [page_size]
|
|
233
285
|
*/
|
|
234
286
|
|
|
235
287
|
/**
|
|
236
|
-
* @typedef
|
|
288
|
+
* @typedef CreditlineDataPlatformReq
|
|
237
289
|
* @property {CreditlineDataPlatformPayload} [data]
|
|
238
290
|
*/
|
|
239
291
|
|
|
@@ -254,7 +306,7 @@ const Joi = require("joi");
|
|
|
254
306
|
*/
|
|
255
307
|
|
|
256
308
|
/**
|
|
257
|
-
* @typedef
|
|
309
|
+
* @typedef IsCreditlinePlatformReq
|
|
258
310
|
* @property {IsCreditlinePayload} [data]
|
|
259
311
|
*/
|
|
260
312
|
|
|
@@ -270,7 +322,7 @@ const Joi = require("joi");
|
|
|
270
322
|
*/
|
|
271
323
|
|
|
272
324
|
/**
|
|
273
|
-
* @typedef
|
|
325
|
+
* @typedef InvoiceTypeReq
|
|
274
326
|
* @property {InvoiceTypePayloadData} [data]
|
|
275
327
|
*/
|
|
276
328
|
|
|
@@ -305,7 +357,7 @@ const Joi = require("joi");
|
|
|
305
357
|
*/
|
|
306
358
|
|
|
307
359
|
/**
|
|
308
|
-
* @typedef
|
|
360
|
+
* @typedef InvoiceListingReq
|
|
309
361
|
* @property {InvoiceListingPayloadData} [data]
|
|
310
362
|
*/
|
|
311
363
|
|
|
@@ -318,7 +370,7 @@ const Joi = require("joi");
|
|
|
318
370
|
|
|
319
371
|
/**
|
|
320
372
|
* @typedef InvoiceListingResponseItems
|
|
321
|
-
* @property {
|
|
373
|
+
* @property {number} [amount]
|
|
322
374
|
* @property {string} [company]
|
|
323
375
|
* @property {string} [status]
|
|
324
376
|
* @property {string} [due_date]
|
|
@@ -333,6 +385,8 @@ const Joi = require("joi");
|
|
|
333
385
|
|
|
334
386
|
/**
|
|
335
387
|
* @typedef InvoiceListingResponse
|
|
388
|
+
* @property {boolean} [success]
|
|
389
|
+
* @property {string[]} [headers]
|
|
336
390
|
* @property {UnpaidInvoiceDataItems} [unpaid_invoice_data]
|
|
337
391
|
* @property {InvoiceListingResponseItems[]} [items]
|
|
338
392
|
* @property {Page} [page]
|
|
@@ -345,7 +399,7 @@ const Joi = require("joi");
|
|
|
345
399
|
*/
|
|
346
400
|
|
|
347
401
|
/**
|
|
348
|
-
* @typedef
|
|
402
|
+
* @typedef InvoicePdfReq
|
|
349
403
|
* @property {InvoicePdfPayloadData} [data]
|
|
350
404
|
*/
|
|
351
405
|
|
|
@@ -364,7 +418,7 @@ const Joi = require("joi");
|
|
|
364
418
|
*/
|
|
365
419
|
|
|
366
420
|
/**
|
|
367
|
-
* @typedef
|
|
421
|
+
* @typedef IsCnRefundMethodReq
|
|
368
422
|
* @property {IsCnRefundMethodData} [data]
|
|
369
423
|
*/
|
|
370
424
|
|
|
@@ -399,7 +453,7 @@ const Joi = require("joi");
|
|
|
399
453
|
*/
|
|
400
454
|
|
|
401
455
|
/**
|
|
402
|
-
* @typedef
|
|
456
|
+
* @typedef CreateSellerCreditNoteConfigReq
|
|
403
457
|
* @property {CreateSellerCreditNoteConfig} [data]
|
|
404
458
|
*/
|
|
405
459
|
|
|
@@ -417,7 +471,7 @@ const Joi = require("joi");
|
|
|
417
471
|
*/
|
|
418
472
|
|
|
419
473
|
/**
|
|
420
|
-
* @typedef
|
|
474
|
+
* @typedef DeleteConfigReq
|
|
421
475
|
* @property {DeleteConfig} [data]
|
|
422
476
|
*/
|
|
423
477
|
|
|
@@ -428,14 +482,15 @@ const Joi = require("joi");
|
|
|
428
482
|
*/
|
|
429
483
|
|
|
430
484
|
/**
|
|
431
|
-
* @typedef
|
|
432
|
-
* @property {string} [
|
|
485
|
+
* @typedef ChannelDisplayNameItems
|
|
486
|
+
* @property {string} [key]
|
|
487
|
+
* @property {string} [value]
|
|
433
488
|
*/
|
|
434
489
|
|
|
435
490
|
/**
|
|
436
491
|
* @typedef ChannelDisplayNameResponse
|
|
437
492
|
* @property {boolean} [success]
|
|
438
|
-
* @property {
|
|
493
|
+
* @property {ChannelDisplayNameItems[]} [items]
|
|
439
494
|
*/
|
|
440
495
|
|
|
441
496
|
/**
|
|
@@ -444,7 +499,7 @@ const Joi = require("joi");
|
|
|
444
499
|
*/
|
|
445
500
|
|
|
446
501
|
/**
|
|
447
|
-
* @typedef
|
|
502
|
+
* @typedef GetPdfUrlViewReq
|
|
448
503
|
* @property {CnReferenceNumber} [data]
|
|
449
504
|
*/
|
|
450
505
|
|
|
@@ -461,7 +516,7 @@ const Joi = require("joi");
|
|
|
461
516
|
*/
|
|
462
517
|
|
|
463
518
|
/**
|
|
464
|
-
* @typedef
|
|
519
|
+
* @typedef CreditNoteDetailsReq
|
|
465
520
|
* @property {CnReferenceNumber} [data]
|
|
466
521
|
*/
|
|
467
522
|
|
|
@@ -480,6 +535,7 @@ const Joi = require("joi");
|
|
|
480
535
|
|
|
481
536
|
/**
|
|
482
537
|
* @typedef RedemptionDetails
|
|
538
|
+
* @property {Object} [meta]
|
|
483
539
|
* @property {string} [staff_id]
|
|
484
540
|
* @property {string} [created_at]
|
|
485
541
|
* @property {string} [order_id]
|
|
@@ -492,6 +548,8 @@ const Joi = require("joi");
|
|
|
492
548
|
|
|
493
549
|
/**
|
|
494
550
|
* @typedef CreditNoteDetails
|
|
551
|
+
* @property {string} [currency]
|
|
552
|
+
* @property {number} [current_amount_used]
|
|
495
553
|
* @property {string} [cn_status]
|
|
496
554
|
* @property {string} [customer_mobile_number]
|
|
497
555
|
* @property {string} [cn_reference_number]
|
|
@@ -516,7 +574,7 @@ const Joi = require("joi");
|
|
|
516
574
|
*/
|
|
517
575
|
|
|
518
576
|
/**
|
|
519
|
-
* @typedef
|
|
577
|
+
* @typedef GetCustomerCreditBalanceReq
|
|
520
578
|
* @property {GetCustomerCreditBalance} [data]
|
|
521
579
|
*/
|
|
522
580
|
|
|
@@ -533,7 +591,7 @@ const Joi = require("joi");
|
|
|
533
591
|
*/
|
|
534
592
|
|
|
535
593
|
/**
|
|
536
|
-
* @typedef
|
|
594
|
+
* @typedef GetCnConfigReq
|
|
537
595
|
* @property {DeleteConfig} [data]
|
|
538
596
|
*/
|
|
539
597
|
|
|
@@ -547,7 +605,7 @@ const Joi = require("joi");
|
|
|
547
605
|
* @typedef GetCnConfigResponseData
|
|
548
606
|
* @property {boolean} [is_cn_as_refund_method]
|
|
549
607
|
* @property {string} [affiliate_id]
|
|
550
|
-
* @property {
|
|
608
|
+
* @property {Object} [meta]
|
|
551
609
|
* @property {number} [seller_id]
|
|
552
610
|
* @property {CreditNoteConfigNotificationEvents} [notification_events]
|
|
553
611
|
* @property {number} [validity]
|
|
@@ -568,14 +626,15 @@ const Joi = require("joi");
|
|
|
568
626
|
* @property {string[]} [utilisation]
|
|
569
627
|
* @property {string[]} [ordering_channel]
|
|
570
628
|
* @property {number[]} [store_id]
|
|
571
|
-
* @property {string[]} [
|
|
629
|
+
* @property {string[]} [type_of_transaction]
|
|
630
|
+
* @property {string[]} [issuance_channel]
|
|
572
631
|
*/
|
|
573
632
|
|
|
574
633
|
/**
|
|
575
634
|
* @typedef CnGenerateReport
|
|
576
635
|
* @property {number} [page]
|
|
577
636
|
* @property {string} [end_date]
|
|
578
|
-
* @property {number} [
|
|
637
|
+
* @property {number} [page_size]
|
|
579
638
|
* @property {CnGenerateReportFilters} [filters]
|
|
580
639
|
* @property {string} [affiliate_id]
|
|
581
640
|
* @property {GenerateReportFilters} [meta]
|
|
@@ -586,7 +645,7 @@ const Joi = require("joi");
|
|
|
586
645
|
*/
|
|
587
646
|
|
|
588
647
|
/**
|
|
589
|
-
* @typedef
|
|
648
|
+
* @typedef GenerateReportCustomerCnReq
|
|
590
649
|
* @property {CnGenerateReport} [data]
|
|
591
650
|
*/
|
|
592
651
|
|
|
@@ -604,6 +663,8 @@ const Joi = require("joi");
|
|
|
604
663
|
|
|
605
664
|
/**
|
|
606
665
|
* @typedef GenerateReportCustomerCnResponseData
|
|
666
|
+
* @property {boolean} [success]
|
|
667
|
+
* @property {string} [message]
|
|
607
668
|
* @property {CnGenerateReportItems[]} [items]
|
|
608
669
|
* @property {Object} [row_header_display_order]
|
|
609
670
|
* @property {string} [end_date]
|
|
@@ -627,13 +688,13 @@ const Joi = require("joi");
|
|
|
627
688
|
* @property {string} [end_date]
|
|
628
689
|
* @property {string} [affiliate_id]
|
|
629
690
|
* @property {string} [search]
|
|
630
|
-
* @property {string
|
|
691
|
+
* @property {string} [status]
|
|
631
692
|
* @property {string} [search_type]
|
|
632
|
-
* @property {number} [
|
|
693
|
+
* @property {number} [page_size]
|
|
633
694
|
*/
|
|
634
695
|
|
|
635
696
|
/**
|
|
636
|
-
* @typedef
|
|
697
|
+
* @typedef DownloadReportCustomerCnReq
|
|
637
698
|
* @property {CnDownloadReport} [data]
|
|
638
699
|
*/
|
|
639
700
|
|
|
@@ -657,7 +718,10 @@ const Joi = require("joi");
|
|
|
657
718
|
|
|
658
719
|
/**
|
|
659
720
|
* @typedef DownloadReportCustomerCnResponse
|
|
721
|
+
* @property {DownloadReportResponseData[]} [items]
|
|
660
722
|
* @property {DownloadReportResponseData[]} [data]
|
|
723
|
+
* @property {number} [item_count]
|
|
724
|
+
* @property {Page} [page]
|
|
661
725
|
*/
|
|
662
726
|
|
|
663
727
|
/**
|
|
@@ -678,13 +742,75 @@ const Joi = require("joi");
|
|
|
678
742
|
* @property {string} [value]
|
|
679
743
|
*/
|
|
680
744
|
|
|
745
|
+
/**
|
|
746
|
+
* @typedef GetReportingFiltersReasonOptions
|
|
747
|
+
* @property {string} [text]
|
|
748
|
+
* @property {string} [value]
|
|
749
|
+
* @property {string} [placeholder_text]
|
|
750
|
+
*/
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* @typedef GetReportingFiltersReason
|
|
754
|
+
* @property {string} [text]
|
|
755
|
+
* @property {string} [type]
|
|
756
|
+
* @property {string} [value]
|
|
757
|
+
* @property {GetReportingFiltersReasonOptions[]} [options]
|
|
758
|
+
*/
|
|
759
|
+
|
|
681
760
|
/**
|
|
682
761
|
* @typedef GetReportingFiltersResponse
|
|
762
|
+
* @property {GetReportingFiltersReason} [reason]
|
|
683
763
|
* @property {GetReportingFilters} [search]
|
|
684
764
|
* @property {GetReportingNestedFilters[]} [filters]
|
|
685
765
|
* @property {GetReportingFilters} [status]
|
|
686
766
|
*/
|
|
687
767
|
|
|
768
|
+
/**
|
|
769
|
+
* @typedef InvoicePaymentOptionsPayloadData
|
|
770
|
+
* @property {string[]} [invoice_numbers]
|
|
771
|
+
*/
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @typedef InvoicePaymentOptionsReq
|
|
775
|
+
* @property {InvoicePaymentOptionsPayloadData} [data]
|
|
776
|
+
*/
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* @typedef InvoicePaymentOptionsResponsePayableAmounts
|
|
780
|
+
* @property {number} [amount]
|
|
781
|
+
* @property {string} [amount_key]
|
|
782
|
+
* @property {string} [header]
|
|
783
|
+
*/
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* @typedef InvoicePaymentOptionsResponseDeductedAmounts
|
|
787
|
+
* @property {number} [amount]
|
|
788
|
+
* @property {string} [header]
|
|
789
|
+
* @property {string} [amount_key]
|
|
790
|
+
* @property {boolean} [is_payable]
|
|
791
|
+
* @property {string} [symbol]
|
|
792
|
+
*/
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* @typedef InvoicePaymentOptionsResponseData
|
|
796
|
+
* @property {string} [invoice_number]
|
|
797
|
+
* @property {string} [invoice_type]
|
|
798
|
+
* @property {InvoicePaymentOptionsResponsePayableAmounts[]} [display_amounts]
|
|
799
|
+
* @property {Object} [total_amount]
|
|
800
|
+
* @property {Object} [deducted_amounts]
|
|
801
|
+
* @property {InvoicePaymentOptionsResponsePayableAmounts[]} [payable_amounts]
|
|
802
|
+
* @property {Currency} [currency]
|
|
803
|
+
*/
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* @typedef InvoicePaymentOptionsResponse
|
|
807
|
+
* @property {string} [reason]
|
|
808
|
+
* @property {InvoicePaymentOptionsResponseData[]} [data]
|
|
809
|
+
* @property {number} [total_payable_amount]
|
|
810
|
+
* @property {number} [invoice_count]
|
|
811
|
+
* @property {boolean} [success]
|
|
812
|
+
*/
|
|
813
|
+
|
|
688
814
|
/**
|
|
689
815
|
* @typedef PaymentDetail
|
|
690
816
|
* @property {string} [display_name]
|
|
@@ -706,6 +832,7 @@ const Joi = require("joi");
|
|
|
706
832
|
|
|
707
833
|
/**
|
|
708
834
|
* @typedef InvoicePaymentDetailsResponse
|
|
835
|
+
* @property {string} [reason]
|
|
709
836
|
* @property {InvoicePaymentDetailsResponseData} [data]
|
|
710
837
|
* @property {boolean} [success]
|
|
711
838
|
* @property {boolean} [payment_details_visible]
|
|
@@ -740,7 +867,7 @@ const Joi = require("joi");
|
|
|
740
867
|
*/
|
|
741
868
|
|
|
742
869
|
/**
|
|
743
|
-
* @typedef
|
|
870
|
+
* @typedef UnlockCreditNoteReq
|
|
744
871
|
* @property {UnlockCreditNoteRequestData} [data]
|
|
745
872
|
*/
|
|
746
873
|
|
|
@@ -757,6 +884,15 @@ const Joi = require("joi");
|
|
|
757
884
|
*/
|
|
758
885
|
|
|
759
886
|
class FinancePlatformModel {
|
|
887
|
+
/** @returns {OrederFreezeResponse} */
|
|
888
|
+
static OrederFreezeResponse() {
|
|
889
|
+
return Joi.object({
|
|
890
|
+
success: Joi.boolean(),
|
|
891
|
+
oms_freeze: Joi.boolean(),
|
|
892
|
+
source: Joi.string().allow("").allow(null),
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
|
|
760
896
|
/** @returns {GenerateReportMeta} */
|
|
761
897
|
static GenerateReportMeta() {
|
|
762
898
|
return Joi.object({
|
|
@@ -786,8 +922,8 @@ class FinancePlatformModel {
|
|
|
786
922
|
});
|
|
787
923
|
}
|
|
788
924
|
|
|
789
|
-
/** @returns {
|
|
790
|
-
static
|
|
925
|
+
/** @returns {GenerateReportReq} */
|
|
926
|
+
static GenerateReportReq() {
|
|
791
927
|
return Joi.object({
|
|
792
928
|
data: FinancePlatformModel.GenerateReportPlatform(),
|
|
793
929
|
});
|
|
@@ -818,28 +954,59 @@ class FinancePlatformModel {
|
|
|
818
954
|
/** @returns {GenerateReportJson} */
|
|
819
955
|
static GenerateReportJson() {
|
|
820
956
|
return Joi.object({
|
|
821
|
-
|
|
957
|
+
data: Joi.any(),
|
|
958
|
+
item_count: Joi.number(),
|
|
822
959
|
page: FinancePlatformModel.Page(),
|
|
823
960
|
end_date: Joi.string().allow(""),
|
|
824
|
-
headers: Joi.array().items(Joi.string().allow("")),
|
|
825
961
|
start_date: Joi.string().allow(""),
|
|
826
|
-
|
|
962
|
+
items: Joi.array().items(Joi.array().items(Joi.string().allow(""))),
|
|
963
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
827
964
|
});
|
|
828
965
|
}
|
|
829
966
|
|
|
830
967
|
/** @returns {Error} */
|
|
831
968
|
static Error() {
|
|
832
969
|
return Joi.object({
|
|
970
|
+
status: Joi.number(),
|
|
833
971
|
reason: Joi.string().allow(""),
|
|
834
972
|
success: Joi.boolean(),
|
|
973
|
+
message: Joi.string().allow(""),
|
|
974
|
+
code: Joi.string().allow("").allow(null),
|
|
975
|
+
exception: Joi.string().allow(""),
|
|
976
|
+
info: Joi.string().allow("").allow(null),
|
|
977
|
+
request_id: Joi.string().allow("").allow(null),
|
|
978
|
+
stack_trace: Joi.string().allow("").allow(null),
|
|
979
|
+
meta: FinancePlatformModel.ErrorMeta(),
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/** @returns {ErrorMeta} */
|
|
984
|
+
static ErrorMeta() {
|
|
985
|
+
return Joi.object({
|
|
986
|
+
columns_errors: Joi.array().items(FinancePlatformModel.ErrorMetaItems()),
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
/** @returns {ErrorMetaItems} */
|
|
991
|
+
static ErrorMetaItems() {
|
|
992
|
+
return Joi.object({
|
|
993
|
+
code: Joi.number().allow(null),
|
|
994
|
+
message: Joi.string().allow("").allow(null),
|
|
835
995
|
});
|
|
836
996
|
}
|
|
837
997
|
|
|
838
998
|
/** @returns {DownloadReport} */
|
|
839
999
|
static DownloadReport() {
|
|
1000
|
+
return Joi.object({
|
|
1001
|
+
data: FinancePlatformModel.DownloadReportData(),
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/** @returns {DownloadReportData} */
|
|
1006
|
+
static DownloadReportData() {
|
|
840
1007
|
return Joi.object({
|
|
841
1008
|
page: Joi.number(),
|
|
842
|
-
|
|
1009
|
+
page_size: Joi.number(),
|
|
843
1010
|
start_date: Joi.string().allow(""),
|
|
844
1011
|
end_date: Joi.string().allow(""),
|
|
845
1012
|
});
|
|
@@ -866,17 +1033,32 @@ class FinancePlatformModel {
|
|
|
866
1033
|
});
|
|
867
1034
|
}
|
|
868
1035
|
|
|
1036
|
+
/** @returns {GetEngineFilters} */
|
|
1037
|
+
static GetEngineFilters() {
|
|
1038
|
+
return Joi.object({
|
|
1039
|
+
config_field: Joi.string().allow(""),
|
|
1040
|
+
status: Joi.string().allow(""),
|
|
1041
|
+
is_active: Joi.boolean(),
|
|
1042
|
+
seller_id: Joi.string().allow(""),
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
|
|
869
1046
|
/** @returns {GetEngineData} */
|
|
870
1047
|
static GetEngineData() {
|
|
871
1048
|
return Joi.object({
|
|
872
|
-
|
|
1049
|
+
status: Joi.string().allow(""),
|
|
1050
|
+
filters: FinancePlatformModel.GetEngineFilters(),
|
|
873
1051
|
project: Joi.array().items(Joi.string().allow("")),
|
|
874
|
-
|
|
1052
|
+
table_name: Joi.string().allow(""),
|
|
1053
|
+
search: Joi.any(),
|
|
1054
|
+
page: Joi.number(),
|
|
1055
|
+
page_size: Joi.number(),
|
|
1056
|
+
order_by: Joi.string().allow(""),
|
|
875
1057
|
});
|
|
876
1058
|
}
|
|
877
1059
|
|
|
878
|
-
/** @returns {
|
|
879
|
-
static
|
|
1060
|
+
/** @returns {GetEngineReq} */
|
|
1061
|
+
static GetEngineReq() {
|
|
880
1062
|
return Joi.object({
|
|
881
1063
|
data: FinancePlatformModel.GetEngineData(),
|
|
882
1064
|
});
|
|
@@ -899,8 +1081,8 @@ class FinancePlatformModel {
|
|
|
899
1081
|
});
|
|
900
1082
|
}
|
|
901
1083
|
|
|
902
|
-
/** @returns {
|
|
903
|
-
static
|
|
1084
|
+
/** @returns {GetReasonReq} */
|
|
1085
|
+
static GetReasonReq() {
|
|
904
1086
|
return Joi.object({
|
|
905
1087
|
data: FinancePlatformModel.GetReason(),
|
|
906
1088
|
});
|
|
@@ -933,8 +1115,8 @@ class FinancePlatformModel {
|
|
|
933
1115
|
});
|
|
934
1116
|
}
|
|
935
1117
|
|
|
936
|
-
/** @returns {
|
|
937
|
-
static
|
|
1118
|
+
/** @returns {GetReportListReq} */
|
|
1119
|
+
static GetReportListReq() {
|
|
938
1120
|
return Joi.object({
|
|
939
1121
|
data: FinancePlatformModel.GetReportListData(),
|
|
940
1122
|
});
|
|
@@ -973,6 +1155,7 @@ class FinancePlatformModel {
|
|
|
973
1155
|
/** @returns {GetAffiliateResponse} */
|
|
974
1156
|
static GetAffiliateResponse() {
|
|
975
1157
|
return Joi.object({
|
|
1158
|
+
reason: Joi.string().allow(""),
|
|
976
1159
|
success: Joi.boolean(),
|
|
977
1160
|
docs: Joi.array().items(Joi.any()),
|
|
978
1161
|
});
|
|
@@ -985,8 +1168,8 @@ class FinancePlatformModel {
|
|
|
985
1168
|
});
|
|
986
1169
|
}
|
|
987
1170
|
|
|
988
|
-
/** @returns {
|
|
989
|
-
static
|
|
1171
|
+
/** @returns {DownloadCreditDebitNoteReq} */
|
|
1172
|
+
static DownloadCreditDebitNoteReq() {
|
|
990
1173
|
return Joi.object({
|
|
991
1174
|
data: FinancePlatformModel.DownloadCreditDebitNote(),
|
|
992
1175
|
});
|
|
@@ -1010,24 +1193,34 @@ class FinancePlatformModel {
|
|
|
1010
1193
|
});
|
|
1011
1194
|
}
|
|
1012
1195
|
|
|
1196
|
+
/** @returns {InvoiceBillingItem} */
|
|
1197
|
+
static InvoiceBillingItem() {
|
|
1198
|
+
return Joi.object({
|
|
1199
|
+
invoice_number: Joi.string().allow(""),
|
|
1200
|
+
amount: Joi.number(),
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1013
1204
|
/** @returns {PaymentProcessPayload} */
|
|
1014
1205
|
static PaymentProcessPayload() {
|
|
1015
1206
|
return Joi.object({
|
|
1016
1207
|
platform: Joi.string().allow(""),
|
|
1017
|
-
amount: Joi.
|
|
1208
|
+
amount: Joi.number(),
|
|
1018
1209
|
transaction_type: Joi.string().allow(""),
|
|
1019
1210
|
source_reference: Joi.string().allow(""),
|
|
1020
|
-
total_amount: Joi.
|
|
1211
|
+
total_amount: Joi.number(),
|
|
1021
1212
|
meta: Joi.any(),
|
|
1022
1213
|
currency: Joi.string().allow(""),
|
|
1023
1214
|
seller_id: Joi.string().allow(""),
|
|
1024
1215
|
mode_of_payment: Joi.string().allow(""),
|
|
1025
|
-
|
|
1216
|
+
invoice_billing_items: Joi.array().items(
|
|
1217
|
+
FinancePlatformModel.InvoiceBillingItem()
|
|
1218
|
+
),
|
|
1026
1219
|
});
|
|
1027
1220
|
}
|
|
1028
1221
|
|
|
1029
|
-
/** @returns {
|
|
1030
|
-
static
|
|
1222
|
+
/** @returns {PaymentProcessReq} */
|
|
1223
|
+
static PaymentProcessReq() {
|
|
1031
1224
|
return Joi.object({
|
|
1032
1225
|
data: FinancePlatformModel.PaymentProcessPayload(),
|
|
1033
1226
|
});
|
|
@@ -1049,14 +1242,14 @@ class FinancePlatformModel {
|
|
|
1049
1242
|
return Joi.object({
|
|
1050
1243
|
page: Joi.number(),
|
|
1051
1244
|
seller_id: Joi.string().allow(""),
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1245
|
+
end_date: Joi.string().allow(""),
|
|
1246
|
+
start_date: Joi.string().allow(""),
|
|
1247
|
+
page_size: Joi.number(),
|
|
1055
1248
|
});
|
|
1056
1249
|
}
|
|
1057
1250
|
|
|
1058
|
-
/** @returns {
|
|
1059
|
-
static
|
|
1251
|
+
/** @returns {CreditlineDataPlatformReq} */
|
|
1252
|
+
static CreditlineDataPlatformReq() {
|
|
1060
1253
|
return Joi.object({
|
|
1061
1254
|
data: FinancePlatformModel.CreditlineDataPlatformPayload(),
|
|
1062
1255
|
});
|
|
@@ -1082,8 +1275,8 @@ class FinancePlatformModel {
|
|
|
1082
1275
|
});
|
|
1083
1276
|
}
|
|
1084
1277
|
|
|
1085
|
-
/** @returns {
|
|
1086
|
-
static
|
|
1278
|
+
/** @returns {IsCreditlinePlatformReq} */
|
|
1279
|
+
static IsCreditlinePlatformReq() {
|
|
1087
1280
|
return Joi.object({
|
|
1088
1281
|
data: FinancePlatformModel.IsCreditlinePayload(),
|
|
1089
1282
|
});
|
|
@@ -1104,8 +1297,8 @@ class FinancePlatformModel {
|
|
|
1104
1297
|
});
|
|
1105
1298
|
}
|
|
1106
1299
|
|
|
1107
|
-
/** @returns {
|
|
1108
|
-
static
|
|
1300
|
+
/** @returns {InvoiceTypeReq} */
|
|
1301
|
+
static InvoiceTypeReq() {
|
|
1109
1302
|
return Joi.object({
|
|
1110
1303
|
data: FinancePlatformModel.InvoiceTypePayloadData(),
|
|
1111
1304
|
});
|
|
@@ -1153,8 +1346,8 @@ class FinancePlatformModel {
|
|
|
1153
1346
|
});
|
|
1154
1347
|
}
|
|
1155
1348
|
|
|
1156
|
-
/** @returns {
|
|
1157
|
-
static
|
|
1349
|
+
/** @returns {InvoiceListingReq} */
|
|
1350
|
+
static InvoiceListingReq() {
|
|
1158
1351
|
return Joi.object({
|
|
1159
1352
|
data: FinancePlatformModel.InvoiceListingPayloadData(),
|
|
1160
1353
|
});
|
|
@@ -1172,7 +1365,7 @@ class FinancePlatformModel {
|
|
|
1172
1365
|
/** @returns {InvoiceListingResponseItems} */
|
|
1173
1366
|
static InvoiceListingResponseItems() {
|
|
1174
1367
|
return Joi.object({
|
|
1175
|
-
amount: Joi.
|
|
1368
|
+
amount: Joi.number(),
|
|
1176
1369
|
company: Joi.string().allow(""),
|
|
1177
1370
|
status: Joi.string().allow(""),
|
|
1178
1371
|
due_date: Joi.string().allow(""),
|
|
@@ -1189,6 +1382,8 @@ class FinancePlatformModel {
|
|
|
1189
1382
|
/** @returns {InvoiceListingResponse} */
|
|
1190
1383
|
static InvoiceListingResponse() {
|
|
1191
1384
|
return Joi.object({
|
|
1385
|
+
success: Joi.boolean(),
|
|
1386
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
1192
1387
|
unpaid_invoice_data: FinancePlatformModel.UnpaidInvoiceDataItems(),
|
|
1193
1388
|
items: Joi.array().items(
|
|
1194
1389
|
FinancePlatformModel.InvoiceListingResponseItems()
|
|
@@ -1205,8 +1400,8 @@ class FinancePlatformModel {
|
|
|
1205
1400
|
});
|
|
1206
1401
|
}
|
|
1207
1402
|
|
|
1208
|
-
/** @returns {
|
|
1209
|
-
static
|
|
1403
|
+
/** @returns {InvoicePdfReq} */
|
|
1404
|
+
static InvoicePdfReq() {
|
|
1210
1405
|
return Joi.object({
|
|
1211
1406
|
data: FinancePlatformModel.InvoicePdfPayloadData(),
|
|
1212
1407
|
});
|
|
@@ -1230,8 +1425,8 @@ class FinancePlatformModel {
|
|
|
1230
1425
|
});
|
|
1231
1426
|
}
|
|
1232
1427
|
|
|
1233
|
-
/** @returns {
|
|
1234
|
-
static
|
|
1428
|
+
/** @returns {IsCnRefundMethodReq} */
|
|
1429
|
+
static IsCnRefundMethodReq() {
|
|
1235
1430
|
return Joi.object({
|
|
1236
1431
|
data: FinancePlatformModel.IsCnRefundMethodData(),
|
|
1237
1432
|
});
|
|
@@ -1275,8 +1470,8 @@ class FinancePlatformModel {
|
|
|
1275
1470
|
});
|
|
1276
1471
|
}
|
|
1277
1472
|
|
|
1278
|
-
/** @returns {
|
|
1279
|
-
static
|
|
1473
|
+
/** @returns {CreateSellerCreditNoteConfigReq} */
|
|
1474
|
+
static CreateSellerCreditNoteConfigReq() {
|
|
1280
1475
|
return Joi.object({
|
|
1281
1476
|
data: FinancePlatformModel.CreateSellerCreditNoteConfig(),
|
|
1282
1477
|
});
|
|
@@ -1299,8 +1494,8 @@ class FinancePlatformModel {
|
|
|
1299
1494
|
});
|
|
1300
1495
|
}
|
|
1301
1496
|
|
|
1302
|
-
/** @returns {
|
|
1303
|
-
static
|
|
1497
|
+
/** @returns {DeleteConfigReq} */
|
|
1498
|
+
static DeleteConfigReq() {
|
|
1304
1499
|
return Joi.object({
|
|
1305
1500
|
data: FinancePlatformModel.DeleteConfig(),
|
|
1306
1501
|
});
|
|
@@ -1314,10 +1509,11 @@ class FinancePlatformModel {
|
|
|
1314
1509
|
});
|
|
1315
1510
|
}
|
|
1316
1511
|
|
|
1317
|
-
/** @returns {
|
|
1318
|
-
static
|
|
1512
|
+
/** @returns {ChannelDisplayNameItems} */
|
|
1513
|
+
static ChannelDisplayNameItems() {
|
|
1319
1514
|
return Joi.object({
|
|
1320
|
-
|
|
1515
|
+
key: Joi.string().allow(""),
|
|
1516
|
+
value: Joi.string().allow(""),
|
|
1321
1517
|
});
|
|
1322
1518
|
}
|
|
1323
1519
|
|
|
@@ -1325,7 +1521,7 @@ class FinancePlatformModel {
|
|
|
1325
1521
|
static ChannelDisplayNameResponse() {
|
|
1326
1522
|
return Joi.object({
|
|
1327
1523
|
success: Joi.boolean(),
|
|
1328
|
-
|
|
1524
|
+
items: Joi.array().items(FinancePlatformModel.ChannelDisplayNameItems()),
|
|
1329
1525
|
});
|
|
1330
1526
|
}
|
|
1331
1527
|
|
|
@@ -1336,8 +1532,8 @@ class FinancePlatformModel {
|
|
|
1336
1532
|
});
|
|
1337
1533
|
}
|
|
1338
1534
|
|
|
1339
|
-
/** @returns {
|
|
1340
|
-
static
|
|
1535
|
+
/** @returns {GetPdfUrlViewReq} */
|
|
1536
|
+
static GetPdfUrlViewReq() {
|
|
1341
1537
|
return Joi.object({
|
|
1342
1538
|
data: FinancePlatformModel.CnReferenceNumber(),
|
|
1343
1539
|
});
|
|
@@ -1359,8 +1555,8 @@ class FinancePlatformModel {
|
|
|
1359
1555
|
});
|
|
1360
1556
|
}
|
|
1361
1557
|
|
|
1362
|
-
/** @returns {
|
|
1363
|
-
static
|
|
1558
|
+
/** @returns {CreditNoteDetailsReq} */
|
|
1559
|
+
static CreditNoteDetailsReq() {
|
|
1364
1560
|
return Joi.object({
|
|
1365
1561
|
data: FinancePlatformModel.CnReferenceNumber(),
|
|
1366
1562
|
});
|
|
@@ -1384,6 +1580,7 @@ class FinancePlatformModel {
|
|
|
1384
1580
|
/** @returns {RedemptionDetails} */
|
|
1385
1581
|
static RedemptionDetails() {
|
|
1386
1582
|
return Joi.object({
|
|
1583
|
+
meta: Joi.any(),
|
|
1387
1584
|
staff_id: Joi.string().allow(""),
|
|
1388
1585
|
created_at: Joi.string().allow(""),
|
|
1389
1586
|
order_id: Joi.string().allow(""),
|
|
@@ -1398,6 +1595,8 @@ class FinancePlatformModel {
|
|
|
1398
1595
|
/** @returns {CreditNoteDetails} */
|
|
1399
1596
|
static CreditNoteDetails() {
|
|
1400
1597
|
return Joi.object({
|
|
1598
|
+
currency: Joi.string().allow("").allow(null),
|
|
1599
|
+
current_amount_used: Joi.number(),
|
|
1401
1600
|
cn_status: Joi.string().allow(""),
|
|
1402
1601
|
customer_mobile_number: Joi.string().allow(""),
|
|
1403
1602
|
cn_reference_number: Joi.string().allow(""),
|
|
@@ -1428,8 +1627,8 @@ class FinancePlatformModel {
|
|
|
1428
1627
|
});
|
|
1429
1628
|
}
|
|
1430
1629
|
|
|
1431
|
-
/** @returns {
|
|
1432
|
-
static
|
|
1630
|
+
/** @returns {GetCustomerCreditBalanceReq} */
|
|
1631
|
+
static GetCustomerCreditBalanceReq() {
|
|
1433
1632
|
return Joi.object({
|
|
1434
1633
|
data: FinancePlatformModel.GetCustomerCreditBalance(),
|
|
1435
1634
|
});
|
|
@@ -1451,8 +1650,8 @@ class FinancePlatformModel {
|
|
|
1451
1650
|
});
|
|
1452
1651
|
}
|
|
1453
1652
|
|
|
1454
|
-
/** @returns {
|
|
1455
|
-
static
|
|
1653
|
+
/** @returns {GetCnConfigReq} */
|
|
1654
|
+
static GetCnConfigReq() {
|
|
1456
1655
|
return Joi.object({
|
|
1457
1656
|
data: FinancePlatformModel.DeleteConfig(),
|
|
1458
1657
|
});
|
|
@@ -1461,7 +1660,7 @@ class FinancePlatformModel {
|
|
|
1461
1660
|
/** @returns {GetCnConfigResponseMeta} */
|
|
1462
1661
|
static GetCnConfigResponseMeta() {
|
|
1463
1662
|
return Joi.object({
|
|
1464
|
-
reason: Joi.string().allow(""),
|
|
1663
|
+
reason: Joi.string().allow("").allow(null),
|
|
1465
1664
|
source_channel: Joi.array().items(Joi.string().allow("")),
|
|
1466
1665
|
});
|
|
1467
1666
|
}
|
|
@@ -1471,7 +1670,7 @@ class FinancePlatformModel {
|
|
|
1471
1670
|
return Joi.object({
|
|
1472
1671
|
is_cn_as_refund_method: Joi.boolean(),
|
|
1473
1672
|
affiliate_id: Joi.string().allow(""),
|
|
1474
|
-
meta:
|
|
1673
|
+
meta: Joi.any(),
|
|
1475
1674
|
seller_id: Joi.number(),
|
|
1476
1675
|
notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(),
|
|
1477
1676
|
validity: Joi.number(),
|
|
@@ -1496,7 +1695,8 @@ class FinancePlatformModel {
|
|
|
1496
1695
|
utilisation: Joi.array().items(Joi.string().allow("")),
|
|
1497
1696
|
ordering_channel: Joi.array().items(Joi.string().allow("")),
|
|
1498
1697
|
store_id: Joi.array().items(Joi.number()),
|
|
1499
|
-
|
|
1698
|
+
type_of_transaction: Joi.array().items(Joi.string().allow("")),
|
|
1699
|
+
issuance_channel: Joi.array().items(Joi.string().allow("")),
|
|
1500
1700
|
});
|
|
1501
1701
|
}
|
|
1502
1702
|
|
|
@@ -1505,7 +1705,7 @@ class FinancePlatformModel {
|
|
|
1505
1705
|
return Joi.object({
|
|
1506
1706
|
page: Joi.number(),
|
|
1507
1707
|
end_date: Joi.string().allow(""),
|
|
1508
|
-
|
|
1708
|
+
page_size: Joi.number(),
|
|
1509
1709
|
filters: FinancePlatformModel.CnGenerateReportFilters(),
|
|
1510
1710
|
affiliate_id: Joi.string().allow(""),
|
|
1511
1711
|
meta: FinancePlatformModel.GenerateReportFilters(),
|
|
@@ -1516,8 +1716,8 @@ class FinancePlatformModel {
|
|
|
1516
1716
|
});
|
|
1517
1717
|
}
|
|
1518
1718
|
|
|
1519
|
-
/** @returns {
|
|
1520
|
-
static
|
|
1719
|
+
/** @returns {GenerateReportCustomerCnReq} */
|
|
1720
|
+
static GenerateReportCustomerCnReq() {
|
|
1521
1721
|
return Joi.object({
|
|
1522
1722
|
data: FinancePlatformModel.CnGenerateReport(),
|
|
1523
1723
|
});
|
|
@@ -1540,6 +1740,8 @@ class FinancePlatformModel {
|
|
|
1540
1740
|
/** @returns {GenerateReportCustomerCnResponseData} */
|
|
1541
1741
|
static GenerateReportCustomerCnResponseData() {
|
|
1542
1742
|
return Joi.object({
|
|
1743
|
+
success: Joi.boolean(),
|
|
1744
|
+
message: Joi.string().allow(""),
|
|
1543
1745
|
items: Joi.array().items(FinancePlatformModel.CnGenerateReportItems()),
|
|
1544
1746
|
row_header_display_order: Joi.any(),
|
|
1545
1747
|
end_date: Joi.string().allow(""),
|
|
@@ -1567,14 +1769,14 @@ class FinancePlatformModel {
|
|
|
1567
1769
|
end_date: Joi.string().allow(""),
|
|
1568
1770
|
affiliate_id: Joi.string().allow(""),
|
|
1569
1771
|
search: Joi.string().allow(""),
|
|
1570
|
-
status: Joi.
|
|
1772
|
+
status: Joi.string().allow(""),
|
|
1571
1773
|
search_type: Joi.string().allow(""),
|
|
1572
|
-
|
|
1774
|
+
page_size: Joi.number(),
|
|
1573
1775
|
});
|
|
1574
1776
|
}
|
|
1575
1777
|
|
|
1576
|
-
/** @returns {
|
|
1577
|
-
static
|
|
1778
|
+
/** @returns {DownloadReportCustomerCnReq} */
|
|
1779
|
+
static DownloadReportCustomerCnReq() {
|
|
1578
1780
|
return Joi.object({
|
|
1579
1781
|
data: FinancePlatformModel.CnDownloadReport(),
|
|
1580
1782
|
});
|
|
@@ -1603,9 +1805,14 @@ class FinancePlatformModel {
|
|
|
1603
1805
|
/** @returns {DownloadReportCustomerCnResponse} */
|
|
1604
1806
|
static DownloadReportCustomerCnResponse() {
|
|
1605
1807
|
return Joi.object({
|
|
1808
|
+
items: Joi.array().items(
|
|
1809
|
+
FinancePlatformModel.DownloadReportResponseData()
|
|
1810
|
+
),
|
|
1606
1811
|
data: Joi.array().items(
|
|
1607
1812
|
FinancePlatformModel.DownloadReportResponseData()
|
|
1608
1813
|
),
|
|
1814
|
+
item_count: Joi.number(),
|
|
1815
|
+
page: FinancePlatformModel.Page(),
|
|
1609
1816
|
});
|
|
1610
1817
|
}
|
|
1611
1818
|
|
|
@@ -1631,9 +1838,31 @@ class FinancePlatformModel {
|
|
|
1631
1838
|
});
|
|
1632
1839
|
}
|
|
1633
1840
|
|
|
1841
|
+
/** @returns {GetReportingFiltersReasonOptions} */
|
|
1842
|
+
static GetReportingFiltersReasonOptions() {
|
|
1843
|
+
return Joi.object({
|
|
1844
|
+
text: Joi.string().allow(""),
|
|
1845
|
+
value: Joi.string().allow(""),
|
|
1846
|
+
placeholder_text: Joi.string().allow(""),
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
/** @returns {GetReportingFiltersReason} */
|
|
1851
|
+
static GetReportingFiltersReason() {
|
|
1852
|
+
return Joi.object({
|
|
1853
|
+
text: Joi.string().allow(""),
|
|
1854
|
+
type: Joi.string().allow(""),
|
|
1855
|
+
value: Joi.string().allow(""),
|
|
1856
|
+
options: Joi.array().items(
|
|
1857
|
+
FinancePlatformModel.GetReportingFiltersReasonOptions()
|
|
1858
|
+
),
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1634
1862
|
/** @returns {GetReportingFiltersResponse} */
|
|
1635
1863
|
static GetReportingFiltersResponse() {
|
|
1636
1864
|
return Joi.object({
|
|
1865
|
+
reason: FinancePlatformModel.GetReportingFiltersReason(),
|
|
1637
1866
|
search: FinancePlatformModel.GetReportingFilters(),
|
|
1638
1867
|
filters: Joi.array().items(
|
|
1639
1868
|
FinancePlatformModel.GetReportingNestedFilters()
|
|
@@ -1642,6 +1871,70 @@ class FinancePlatformModel {
|
|
|
1642
1871
|
});
|
|
1643
1872
|
}
|
|
1644
1873
|
|
|
1874
|
+
/** @returns {InvoicePaymentOptionsPayloadData} */
|
|
1875
|
+
static InvoicePaymentOptionsPayloadData() {
|
|
1876
|
+
return Joi.object({
|
|
1877
|
+
invoice_numbers: Joi.array().items(Joi.string().allow("")),
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
/** @returns {InvoicePaymentOptionsReq} */
|
|
1882
|
+
static InvoicePaymentOptionsReq() {
|
|
1883
|
+
return Joi.object({
|
|
1884
|
+
data: FinancePlatformModel.InvoicePaymentOptionsPayloadData(),
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/** @returns {InvoicePaymentOptionsResponsePayableAmounts} */
|
|
1889
|
+
static InvoicePaymentOptionsResponsePayableAmounts() {
|
|
1890
|
+
return Joi.object({
|
|
1891
|
+
amount: Joi.number(),
|
|
1892
|
+
amount_key: Joi.string().allow(""),
|
|
1893
|
+
header: Joi.string().allow(""),
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
/** @returns {InvoicePaymentOptionsResponseDeductedAmounts} */
|
|
1898
|
+
static InvoicePaymentOptionsResponseDeductedAmounts() {
|
|
1899
|
+
return Joi.object({
|
|
1900
|
+
amount: Joi.number(),
|
|
1901
|
+
header: Joi.string().allow(""),
|
|
1902
|
+
amount_key: Joi.string().allow(""),
|
|
1903
|
+
is_payable: Joi.boolean(),
|
|
1904
|
+
symbol: Joi.string().allow(""),
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
/** @returns {InvoicePaymentOptionsResponseData} */
|
|
1909
|
+
static InvoicePaymentOptionsResponseData() {
|
|
1910
|
+
return Joi.object({
|
|
1911
|
+
invoice_number: Joi.string().allow(""),
|
|
1912
|
+
invoice_type: Joi.string().allow(""),
|
|
1913
|
+
display_amounts: Joi.array().items(
|
|
1914
|
+
FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts()
|
|
1915
|
+
),
|
|
1916
|
+
total_amount: Joi.any(),
|
|
1917
|
+
deducted_amounts: Joi.any(),
|
|
1918
|
+
payable_amounts: Joi.array().items(
|
|
1919
|
+
FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts()
|
|
1920
|
+
),
|
|
1921
|
+
currency: FinancePlatformModel.Currency(),
|
|
1922
|
+
});
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
/** @returns {InvoicePaymentOptionsResponse} */
|
|
1926
|
+
static InvoicePaymentOptionsResponse() {
|
|
1927
|
+
return Joi.object({
|
|
1928
|
+
reason: Joi.string().allow(""),
|
|
1929
|
+
data: Joi.array().items(
|
|
1930
|
+
FinancePlatformModel.InvoicePaymentOptionsResponseData()
|
|
1931
|
+
),
|
|
1932
|
+
total_payable_amount: Joi.number(),
|
|
1933
|
+
invoice_count: Joi.number(),
|
|
1934
|
+
success: Joi.boolean(),
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1645
1938
|
/** @returns {PaymentDetail} */
|
|
1646
1939
|
static PaymentDetail() {
|
|
1647
1940
|
return Joi.object({
|
|
@@ -1672,6 +1965,7 @@ class FinancePlatformModel {
|
|
|
1672
1965
|
/** @returns {InvoicePaymentDetailsResponse} */
|
|
1673
1966
|
static InvoicePaymentDetailsResponse() {
|
|
1674
1967
|
return Joi.object({
|
|
1968
|
+
reason: Joi.string().allow(""),
|
|
1675
1969
|
data: FinancePlatformModel.InvoicePaymentDetailsResponseData(),
|
|
1676
1970
|
success: Joi.boolean(),
|
|
1677
1971
|
payment_details_visible: Joi.boolean(),
|
|
@@ -1681,12 +1975,12 @@ class FinancePlatformModel {
|
|
|
1681
1975
|
/** @returns {InvoiceActivityLogsResponseData} */
|
|
1682
1976
|
static InvoiceActivityLogsResponseData() {
|
|
1683
1977
|
return Joi.object({
|
|
1684
|
-
performed_by: Joi.string().allow(""),
|
|
1978
|
+
performed_by: Joi.string().allow("").allow(null),
|
|
1685
1979
|
status: Joi.string().allow(""),
|
|
1686
|
-
reason: Joi.string().allow(""),
|
|
1980
|
+
reason: Joi.string().allow("").allow(null),
|
|
1687
1981
|
is_resolved: Joi.boolean(),
|
|
1688
1982
|
retry_attempts: Joi.number(),
|
|
1689
|
-
max_retry_attempts: Joi.number(),
|
|
1983
|
+
max_retry_attempts: Joi.number().allow(null),
|
|
1690
1984
|
});
|
|
1691
1985
|
}
|
|
1692
1986
|
|
|
@@ -1716,8 +2010,8 @@ class FinancePlatformModel {
|
|
|
1716
2010
|
});
|
|
1717
2011
|
}
|
|
1718
2012
|
|
|
1719
|
-
/** @returns {
|
|
1720
|
-
static
|
|
2013
|
+
/** @returns {UnlockCreditNoteReq} */
|
|
2014
|
+
static UnlockCreditNoteReq() {
|
|
1721
2015
|
return Joi.object({
|
|
1722
2016
|
data: FinancePlatformModel.UnlockCreditNoteRequestData(),
|
|
1723
2017
|
});
|