@gofynd/fdk-client-javascript 1.4.7 → 1.4.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/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 +5 -18
- package/sdk/application/Content/ContentApplicationModel.js +4 -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 +2 -0
- package/sdk/application/Order/OrderApplicationModel.js +2 -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.js +4 -4
- 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/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 +6 -4
- package/sdk/platform/Content/ContentPlatformModel.js +6 -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 +350 -127
- package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
- 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 +108 -15
- package/sdk/platform/Order/OrderPlatformModel.js +47 -14
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +5 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.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/Webhook/WebhookPlatformClient.d.ts +0 -40
- package/sdk/platform/Webhook/WebhookPlatformClient.js +0 -307
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +112 -164
- package/sdk/platform/Webhook/WebhookPlatformModel.js +118 -169
- 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
|
|
|
@@ -198,10 +244,10 @@ const Joi = require("joi");
|
|
|
198
244
|
/**
|
|
199
245
|
* @typedef PaymentProcessPayload
|
|
200
246
|
* @property {string} [platform]
|
|
201
|
-
* @property {
|
|
247
|
+
* @property {number} [amount]
|
|
202
248
|
* @property {string} [transaction_type]
|
|
203
249
|
* @property {string} [source_reference]
|
|
204
|
-
* @property {
|
|
250
|
+
* @property {number} [total_amount]
|
|
205
251
|
* @property {Object} [meta]
|
|
206
252
|
* @property {string} [currency]
|
|
207
253
|
* @property {string} [seller_id]
|
|
@@ -210,7 +256,7 @@ const Joi = require("joi");
|
|
|
210
256
|
*/
|
|
211
257
|
|
|
212
258
|
/**
|
|
213
|
-
* @typedef
|
|
259
|
+
* @typedef PaymentProcessReq
|
|
214
260
|
* @property {PaymentProcessPayload} [data]
|
|
215
261
|
*/
|
|
216
262
|
|
|
@@ -227,13 +273,13 @@ const Joi = require("joi");
|
|
|
227
273
|
* @typedef CreditlineDataPlatformPayload
|
|
228
274
|
* @property {number} [page]
|
|
229
275
|
* @property {string} [seller_id]
|
|
230
|
-
* @property {string} [
|
|
231
|
-
* @property {string} [
|
|
232
|
-
* @property {number} [
|
|
276
|
+
* @property {string} [end_date]
|
|
277
|
+
* @property {string} [start_date]
|
|
278
|
+
* @property {number} [page_size]
|
|
233
279
|
*/
|
|
234
280
|
|
|
235
281
|
/**
|
|
236
|
-
* @typedef
|
|
282
|
+
* @typedef CreditlineDataPlatformReq
|
|
237
283
|
* @property {CreditlineDataPlatformPayload} [data]
|
|
238
284
|
*/
|
|
239
285
|
|
|
@@ -254,7 +300,7 @@ const Joi = require("joi");
|
|
|
254
300
|
*/
|
|
255
301
|
|
|
256
302
|
/**
|
|
257
|
-
* @typedef
|
|
303
|
+
* @typedef IsCreditlinePlatformReq
|
|
258
304
|
* @property {IsCreditlinePayload} [data]
|
|
259
305
|
*/
|
|
260
306
|
|
|
@@ -270,7 +316,7 @@ const Joi = require("joi");
|
|
|
270
316
|
*/
|
|
271
317
|
|
|
272
318
|
/**
|
|
273
|
-
* @typedef
|
|
319
|
+
* @typedef InvoiceTypeReq
|
|
274
320
|
* @property {InvoiceTypePayloadData} [data]
|
|
275
321
|
*/
|
|
276
322
|
|
|
@@ -305,7 +351,7 @@ const Joi = require("joi");
|
|
|
305
351
|
*/
|
|
306
352
|
|
|
307
353
|
/**
|
|
308
|
-
* @typedef
|
|
354
|
+
* @typedef InvoiceListingReq
|
|
309
355
|
* @property {InvoiceListingPayloadData} [data]
|
|
310
356
|
*/
|
|
311
357
|
|
|
@@ -318,7 +364,7 @@ const Joi = require("joi");
|
|
|
318
364
|
|
|
319
365
|
/**
|
|
320
366
|
* @typedef InvoiceListingResponseItems
|
|
321
|
-
* @property {
|
|
367
|
+
* @property {number} [amount]
|
|
322
368
|
* @property {string} [company]
|
|
323
369
|
* @property {string} [status]
|
|
324
370
|
* @property {string} [due_date]
|
|
@@ -333,6 +379,8 @@ const Joi = require("joi");
|
|
|
333
379
|
|
|
334
380
|
/**
|
|
335
381
|
* @typedef InvoiceListingResponse
|
|
382
|
+
* @property {boolean} [success]
|
|
383
|
+
* @property {string[]} [headers]
|
|
336
384
|
* @property {UnpaidInvoiceDataItems} [unpaid_invoice_data]
|
|
337
385
|
* @property {InvoiceListingResponseItems[]} [items]
|
|
338
386
|
* @property {Page} [page]
|
|
@@ -345,7 +393,7 @@ const Joi = require("joi");
|
|
|
345
393
|
*/
|
|
346
394
|
|
|
347
395
|
/**
|
|
348
|
-
* @typedef
|
|
396
|
+
* @typedef InvoicePdfReq
|
|
349
397
|
* @property {InvoicePdfPayloadData} [data]
|
|
350
398
|
*/
|
|
351
399
|
|
|
@@ -364,7 +412,7 @@ const Joi = require("joi");
|
|
|
364
412
|
*/
|
|
365
413
|
|
|
366
414
|
/**
|
|
367
|
-
* @typedef
|
|
415
|
+
* @typedef IsCnRefundMethodReq
|
|
368
416
|
* @property {IsCnRefundMethodData} [data]
|
|
369
417
|
*/
|
|
370
418
|
|
|
@@ -399,7 +447,7 @@ const Joi = require("joi");
|
|
|
399
447
|
*/
|
|
400
448
|
|
|
401
449
|
/**
|
|
402
|
-
* @typedef
|
|
450
|
+
* @typedef CreateSellerCreditNoteConfigReq
|
|
403
451
|
* @property {CreateSellerCreditNoteConfig} [data]
|
|
404
452
|
*/
|
|
405
453
|
|
|
@@ -417,7 +465,7 @@ const Joi = require("joi");
|
|
|
417
465
|
*/
|
|
418
466
|
|
|
419
467
|
/**
|
|
420
|
-
* @typedef
|
|
468
|
+
* @typedef DeleteConfigReq
|
|
421
469
|
* @property {DeleteConfig} [data]
|
|
422
470
|
*/
|
|
423
471
|
|
|
@@ -428,14 +476,15 @@ const Joi = require("joi");
|
|
|
428
476
|
*/
|
|
429
477
|
|
|
430
478
|
/**
|
|
431
|
-
* @typedef
|
|
432
|
-
* @property {string} [
|
|
479
|
+
* @typedef ChannelDisplayNameItems
|
|
480
|
+
* @property {string} [key]
|
|
481
|
+
* @property {string} [value]
|
|
433
482
|
*/
|
|
434
483
|
|
|
435
484
|
/**
|
|
436
485
|
* @typedef ChannelDisplayNameResponse
|
|
437
486
|
* @property {boolean} [success]
|
|
438
|
-
* @property {
|
|
487
|
+
* @property {ChannelDisplayNameItems[]} [items]
|
|
439
488
|
*/
|
|
440
489
|
|
|
441
490
|
/**
|
|
@@ -444,7 +493,7 @@ const Joi = require("joi");
|
|
|
444
493
|
*/
|
|
445
494
|
|
|
446
495
|
/**
|
|
447
|
-
* @typedef
|
|
496
|
+
* @typedef GetPdfUrlViewReq
|
|
448
497
|
* @property {CnReferenceNumber} [data]
|
|
449
498
|
*/
|
|
450
499
|
|
|
@@ -461,7 +510,7 @@ const Joi = require("joi");
|
|
|
461
510
|
*/
|
|
462
511
|
|
|
463
512
|
/**
|
|
464
|
-
* @typedef
|
|
513
|
+
* @typedef CreditNoteDetailsReq
|
|
465
514
|
* @property {CnReferenceNumber} [data]
|
|
466
515
|
*/
|
|
467
516
|
|
|
@@ -480,6 +529,7 @@ const Joi = require("joi");
|
|
|
480
529
|
|
|
481
530
|
/**
|
|
482
531
|
* @typedef RedemptionDetails
|
|
532
|
+
* @property {Object} [meta]
|
|
483
533
|
* @property {string} [staff_id]
|
|
484
534
|
* @property {string} [created_at]
|
|
485
535
|
* @property {string} [order_id]
|
|
@@ -492,6 +542,8 @@ const Joi = require("joi");
|
|
|
492
542
|
|
|
493
543
|
/**
|
|
494
544
|
* @typedef CreditNoteDetails
|
|
545
|
+
* @property {string} [currency]
|
|
546
|
+
* @property {number} [current_amount_used]
|
|
495
547
|
* @property {string} [cn_status]
|
|
496
548
|
* @property {string} [customer_mobile_number]
|
|
497
549
|
* @property {string} [cn_reference_number]
|
|
@@ -516,7 +568,7 @@ const Joi = require("joi");
|
|
|
516
568
|
*/
|
|
517
569
|
|
|
518
570
|
/**
|
|
519
|
-
* @typedef
|
|
571
|
+
* @typedef GetCustomerCreditBalanceReq
|
|
520
572
|
* @property {GetCustomerCreditBalance} [data]
|
|
521
573
|
*/
|
|
522
574
|
|
|
@@ -533,7 +585,7 @@ const Joi = require("joi");
|
|
|
533
585
|
*/
|
|
534
586
|
|
|
535
587
|
/**
|
|
536
|
-
* @typedef
|
|
588
|
+
* @typedef GetCnConfigReq
|
|
537
589
|
* @property {DeleteConfig} [data]
|
|
538
590
|
*/
|
|
539
591
|
|
|
@@ -547,7 +599,7 @@ const Joi = require("joi");
|
|
|
547
599
|
* @typedef GetCnConfigResponseData
|
|
548
600
|
* @property {boolean} [is_cn_as_refund_method]
|
|
549
601
|
* @property {string} [affiliate_id]
|
|
550
|
-
* @property {
|
|
602
|
+
* @property {Object} [meta]
|
|
551
603
|
* @property {number} [seller_id]
|
|
552
604
|
* @property {CreditNoteConfigNotificationEvents} [notification_events]
|
|
553
605
|
* @property {number} [validity]
|
|
@@ -568,14 +620,15 @@ const Joi = require("joi");
|
|
|
568
620
|
* @property {string[]} [utilisation]
|
|
569
621
|
* @property {string[]} [ordering_channel]
|
|
570
622
|
* @property {number[]} [store_id]
|
|
571
|
-
* @property {string[]} [
|
|
623
|
+
* @property {string[]} [type_of_transaction]
|
|
624
|
+
* @property {string[]} [issuance_channel]
|
|
572
625
|
*/
|
|
573
626
|
|
|
574
627
|
/**
|
|
575
628
|
* @typedef CnGenerateReport
|
|
576
629
|
* @property {number} [page]
|
|
577
630
|
* @property {string} [end_date]
|
|
578
|
-
* @property {number} [
|
|
631
|
+
* @property {number} [page_size]
|
|
579
632
|
* @property {CnGenerateReportFilters} [filters]
|
|
580
633
|
* @property {string} [affiliate_id]
|
|
581
634
|
* @property {GenerateReportFilters} [meta]
|
|
@@ -586,7 +639,7 @@ const Joi = require("joi");
|
|
|
586
639
|
*/
|
|
587
640
|
|
|
588
641
|
/**
|
|
589
|
-
* @typedef
|
|
642
|
+
* @typedef GenerateReportCustomerCnReq
|
|
590
643
|
* @property {CnGenerateReport} [data]
|
|
591
644
|
*/
|
|
592
645
|
|
|
@@ -604,6 +657,8 @@ const Joi = require("joi");
|
|
|
604
657
|
|
|
605
658
|
/**
|
|
606
659
|
* @typedef GenerateReportCustomerCnResponseData
|
|
660
|
+
* @property {boolean} [success]
|
|
661
|
+
* @property {string} [message]
|
|
607
662
|
* @property {CnGenerateReportItems[]} [items]
|
|
608
663
|
* @property {Object} [row_header_display_order]
|
|
609
664
|
* @property {string} [end_date]
|
|
@@ -627,13 +682,13 @@ const Joi = require("joi");
|
|
|
627
682
|
* @property {string} [end_date]
|
|
628
683
|
* @property {string} [affiliate_id]
|
|
629
684
|
* @property {string} [search]
|
|
630
|
-
* @property {string
|
|
685
|
+
* @property {string} [status]
|
|
631
686
|
* @property {string} [search_type]
|
|
632
|
-
* @property {number} [
|
|
687
|
+
* @property {number} [page_size]
|
|
633
688
|
*/
|
|
634
689
|
|
|
635
690
|
/**
|
|
636
|
-
* @typedef
|
|
691
|
+
* @typedef DownloadReportCustomerCnReq
|
|
637
692
|
* @property {CnDownloadReport} [data]
|
|
638
693
|
*/
|
|
639
694
|
|
|
@@ -657,7 +712,10 @@ const Joi = require("joi");
|
|
|
657
712
|
|
|
658
713
|
/**
|
|
659
714
|
* @typedef DownloadReportCustomerCnResponse
|
|
715
|
+
* @property {DownloadReportResponseData[]} [items]
|
|
660
716
|
* @property {DownloadReportResponseData[]} [data]
|
|
717
|
+
* @property {number} [item_count]
|
|
718
|
+
* @property {Page} [page]
|
|
661
719
|
*/
|
|
662
720
|
|
|
663
721
|
/**
|
|
@@ -678,13 +736,72 @@ const Joi = require("joi");
|
|
|
678
736
|
* @property {string} [value]
|
|
679
737
|
*/
|
|
680
738
|
|
|
739
|
+
/**
|
|
740
|
+
* @typedef GetReportingFiltersReasonOptions
|
|
741
|
+
* @property {string} [text]
|
|
742
|
+
* @property {string} [value]
|
|
743
|
+
* @property {string} [placeholder_text]
|
|
744
|
+
*/
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @typedef GetReportingFiltersReason
|
|
748
|
+
* @property {string} [text]
|
|
749
|
+
* @property {string} [type]
|
|
750
|
+
* @property {string} [value]
|
|
751
|
+
* @property {GetReportingFiltersReasonOptions[]} [options]
|
|
752
|
+
*/
|
|
753
|
+
|
|
681
754
|
/**
|
|
682
755
|
* @typedef GetReportingFiltersResponse
|
|
756
|
+
* @property {GetReportingFiltersReason} [reason]
|
|
683
757
|
* @property {GetReportingFilters} [search]
|
|
684
758
|
* @property {GetReportingNestedFilters[]} [filters]
|
|
685
759
|
* @property {GetReportingFilters} [status]
|
|
686
760
|
*/
|
|
687
761
|
|
|
762
|
+
/**
|
|
763
|
+
* @typedef InvoicePaymentOptionsPayloadData
|
|
764
|
+
* @property {string} [invoice_number]
|
|
765
|
+
*/
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* @typedef InvoicePaymentOptionsReq
|
|
769
|
+
* @property {InvoicePaymentOptionsPayloadData} [data]
|
|
770
|
+
*/
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* @typedef InvoicePaymentOptionsResponsePayableAmounts
|
|
774
|
+
* @property {number} [amount]
|
|
775
|
+
* @property {string} [amount_key]
|
|
776
|
+
* @property {string} [header]
|
|
777
|
+
*/
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* @typedef InvoicePaymentOptionsResponseDeductedAmounts
|
|
781
|
+
* @property {number} [amount]
|
|
782
|
+
* @property {string} [header]
|
|
783
|
+
* @property {string} [amount_key]
|
|
784
|
+
* @property {boolean} [is_payable]
|
|
785
|
+
* @property {string} [symbol]
|
|
786
|
+
*/
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* @typedef InvoicePaymentOptionsResponseData
|
|
790
|
+
* @property {Currency} [currency]
|
|
791
|
+
* @property {string} [invoice_type]
|
|
792
|
+
* @property {InvoicePaymentOptionsResponsePayableAmounts[]} [display_amounts]
|
|
793
|
+
* @property {Object} [total_amount]
|
|
794
|
+
* @property {Object} [deducted_amounts]
|
|
795
|
+
* @property {InvoicePaymentOptionsResponsePayableAmounts[]} [payable_amounts]
|
|
796
|
+
*/
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* @typedef InvoicePaymentOptionsResponse
|
|
800
|
+
* @property {string} [reason]
|
|
801
|
+
* @property {InvoicePaymentOptionsResponseData} [data]
|
|
802
|
+
* @property {boolean} [success]
|
|
803
|
+
*/
|
|
804
|
+
|
|
688
805
|
/**
|
|
689
806
|
* @typedef PaymentDetail
|
|
690
807
|
* @property {string} [display_name]
|
|
@@ -706,6 +823,7 @@ const Joi = require("joi");
|
|
|
706
823
|
|
|
707
824
|
/**
|
|
708
825
|
* @typedef InvoicePaymentDetailsResponse
|
|
826
|
+
* @property {string} [reason]
|
|
709
827
|
* @property {InvoicePaymentDetailsResponseData} [data]
|
|
710
828
|
* @property {boolean} [success]
|
|
711
829
|
* @property {boolean} [payment_details_visible]
|
|
@@ -740,7 +858,7 @@ const Joi = require("joi");
|
|
|
740
858
|
*/
|
|
741
859
|
|
|
742
860
|
/**
|
|
743
|
-
* @typedef
|
|
861
|
+
* @typedef UnlockCreditNoteReq
|
|
744
862
|
* @property {UnlockCreditNoteRequestData} [data]
|
|
745
863
|
*/
|
|
746
864
|
|
|
@@ -757,6 +875,15 @@ const Joi = require("joi");
|
|
|
757
875
|
*/
|
|
758
876
|
|
|
759
877
|
class FinancePlatformModel {
|
|
878
|
+
/** @returns {OrederFreezeResponse} */
|
|
879
|
+
static OrederFreezeResponse() {
|
|
880
|
+
return Joi.object({
|
|
881
|
+
success: Joi.boolean(),
|
|
882
|
+
oms_freeze: Joi.boolean(),
|
|
883
|
+
source: Joi.string().allow("").allow(null),
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
|
|
760
887
|
/** @returns {GenerateReportMeta} */
|
|
761
888
|
static GenerateReportMeta() {
|
|
762
889
|
return Joi.object({
|
|
@@ -786,8 +913,8 @@ class FinancePlatformModel {
|
|
|
786
913
|
});
|
|
787
914
|
}
|
|
788
915
|
|
|
789
|
-
/** @returns {
|
|
790
|
-
static
|
|
916
|
+
/** @returns {GenerateReportReq} */
|
|
917
|
+
static GenerateReportReq() {
|
|
791
918
|
return Joi.object({
|
|
792
919
|
data: FinancePlatformModel.GenerateReportPlatform(),
|
|
793
920
|
});
|
|
@@ -818,28 +945,59 @@ class FinancePlatformModel {
|
|
|
818
945
|
/** @returns {GenerateReportJson} */
|
|
819
946
|
static GenerateReportJson() {
|
|
820
947
|
return Joi.object({
|
|
821
|
-
|
|
948
|
+
data: Joi.any(),
|
|
949
|
+
item_count: Joi.number(),
|
|
822
950
|
page: FinancePlatformModel.Page(),
|
|
823
951
|
end_date: Joi.string().allow(""),
|
|
824
|
-
headers: Joi.array().items(Joi.string().allow("")),
|
|
825
952
|
start_date: Joi.string().allow(""),
|
|
826
|
-
|
|
953
|
+
items: Joi.array().items(Joi.array().items(Joi.string().allow(""))),
|
|
954
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
827
955
|
});
|
|
828
956
|
}
|
|
829
957
|
|
|
830
958
|
/** @returns {Error} */
|
|
831
959
|
static Error() {
|
|
832
960
|
return Joi.object({
|
|
961
|
+
status: Joi.number(),
|
|
833
962
|
reason: Joi.string().allow(""),
|
|
834
963
|
success: Joi.boolean(),
|
|
964
|
+
message: Joi.string().allow(""),
|
|
965
|
+
code: Joi.string().allow("").allow(null),
|
|
966
|
+
exception: Joi.string().allow(""),
|
|
967
|
+
info: Joi.string().allow("").allow(null),
|
|
968
|
+
request_id: Joi.string().allow("").allow(null),
|
|
969
|
+
stack_trace: Joi.string().allow("").allow(null),
|
|
970
|
+
meta: FinancePlatformModel.ErrorMeta(),
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/** @returns {ErrorMeta} */
|
|
975
|
+
static ErrorMeta() {
|
|
976
|
+
return Joi.object({
|
|
977
|
+
columns_errors: Joi.array().items(FinancePlatformModel.ErrorMetaItems()),
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/** @returns {ErrorMetaItems} */
|
|
982
|
+
static ErrorMetaItems() {
|
|
983
|
+
return Joi.object({
|
|
984
|
+
code: Joi.number().allow(null),
|
|
985
|
+
message: Joi.string().allow("").allow(null),
|
|
835
986
|
});
|
|
836
987
|
}
|
|
837
988
|
|
|
838
989
|
/** @returns {DownloadReport} */
|
|
839
990
|
static DownloadReport() {
|
|
991
|
+
return Joi.object({
|
|
992
|
+
data: FinancePlatformModel.DownloadReportData(),
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/** @returns {DownloadReportData} */
|
|
997
|
+
static DownloadReportData() {
|
|
840
998
|
return Joi.object({
|
|
841
999
|
page: Joi.number(),
|
|
842
|
-
|
|
1000
|
+
page_size: Joi.number(),
|
|
843
1001
|
start_date: Joi.string().allow(""),
|
|
844
1002
|
end_date: Joi.string().allow(""),
|
|
845
1003
|
});
|
|
@@ -866,17 +1024,32 @@ class FinancePlatformModel {
|
|
|
866
1024
|
});
|
|
867
1025
|
}
|
|
868
1026
|
|
|
1027
|
+
/** @returns {GetEngineFilters} */
|
|
1028
|
+
static GetEngineFilters() {
|
|
1029
|
+
return Joi.object({
|
|
1030
|
+
config_field: Joi.string().allow(""),
|
|
1031
|
+
status: Joi.string().allow(""),
|
|
1032
|
+
is_active: Joi.boolean(),
|
|
1033
|
+
seller_id: Joi.string().allow(""),
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
|
|
869
1037
|
/** @returns {GetEngineData} */
|
|
870
1038
|
static GetEngineData() {
|
|
871
1039
|
return Joi.object({
|
|
872
|
-
|
|
1040
|
+
status: Joi.string().allow(""),
|
|
1041
|
+
filters: FinancePlatformModel.GetEngineFilters(),
|
|
873
1042
|
project: Joi.array().items(Joi.string().allow("")),
|
|
874
|
-
|
|
1043
|
+
table_name: Joi.string().allow(""),
|
|
1044
|
+
search: Joi.any(),
|
|
1045
|
+
page: Joi.number(),
|
|
1046
|
+
page_size: Joi.number(),
|
|
1047
|
+
order_by: Joi.string().allow(""),
|
|
875
1048
|
});
|
|
876
1049
|
}
|
|
877
1050
|
|
|
878
|
-
/** @returns {
|
|
879
|
-
static
|
|
1051
|
+
/** @returns {GetEngineReq} */
|
|
1052
|
+
static GetEngineReq() {
|
|
880
1053
|
return Joi.object({
|
|
881
1054
|
data: FinancePlatformModel.GetEngineData(),
|
|
882
1055
|
});
|
|
@@ -899,8 +1072,8 @@ class FinancePlatformModel {
|
|
|
899
1072
|
});
|
|
900
1073
|
}
|
|
901
1074
|
|
|
902
|
-
/** @returns {
|
|
903
|
-
static
|
|
1075
|
+
/** @returns {GetReasonReq} */
|
|
1076
|
+
static GetReasonReq() {
|
|
904
1077
|
return Joi.object({
|
|
905
1078
|
data: FinancePlatformModel.GetReason(),
|
|
906
1079
|
});
|
|
@@ -933,8 +1106,8 @@ class FinancePlatformModel {
|
|
|
933
1106
|
});
|
|
934
1107
|
}
|
|
935
1108
|
|
|
936
|
-
/** @returns {
|
|
937
|
-
static
|
|
1109
|
+
/** @returns {GetReportListReq} */
|
|
1110
|
+
static GetReportListReq() {
|
|
938
1111
|
return Joi.object({
|
|
939
1112
|
data: FinancePlatformModel.GetReportListData(),
|
|
940
1113
|
});
|
|
@@ -973,6 +1146,7 @@ class FinancePlatformModel {
|
|
|
973
1146
|
/** @returns {GetAffiliateResponse} */
|
|
974
1147
|
static GetAffiliateResponse() {
|
|
975
1148
|
return Joi.object({
|
|
1149
|
+
reason: Joi.string().allow(""),
|
|
976
1150
|
success: Joi.boolean(),
|
|
977
1151
|
docs: Joi.array().items(Joi.any()),
|
|
978
1152
|
});
|
|
@@ -985,8 +1159,8 @@ class FinancePlatformModel {
|
|
|
985
1159
|
});
|
|
986
1160
|
}
|
|
987
1161
|
|
|
988
|
-
/** @returns {
|
|
989
|
-
static
|
|
1162
|
+
/** @returns {DownloadCreditDebitNoteReq} */
|
|
1163
|
+
static DownloadCreditDebitNoteReq() {
|
|
990
1164
|
return Joi.object({
|
|
991
1165
|
data: FinancePlatformModel.DownloadCreditDebitNote(),
|
|
992
1166
|
});
|
|
@@ -1014,10 +1188,10 @@ class FinancePlatformModel {
|
|
|
1014
1188
|
static PaymentProcessPayload() {
|
|
1015
1189
|
return Joi.object({
|
|
1016
1190
|
platform: Joi.string().allow(""),
|
|
1017
|
-
amount: Joi.
|
|
1191
|
+
amount: Joi.number(),
|
|
1018
1192
|
transaction_type: Joi.string().allow(""),
|
|
1019
1193
|
source_reference: Joi.string().allow(""),
|
|
1020
|
-
total_amount: Joi.
|
|
1194
|
+
total_amount: Joi.number(),
|
|
1021
1195
|
meta: Joi.any(),
|
|
1022
1196
|
currency: Joi.string().allow(""),
|
|
1023
1197
|
seller_id: Joi.string().allow(""),
|
|
@@ -1026,8 +1200,8 @@ class FinancePlatformModel {
|
|
|
1026
1200
|
});
|
|
1027
1201
|
}
|
|
1028
1202
|
|
|
1029
|
-
/** @returns {
|
|
1030
|
-
static
|
|
1203
|
+
/** @returns {PaymentProcessReq} */
|
|
1204
|
+
static PaymentProcessReq() {
|
|
1031
1205
|
return Joi.object({
|
|
1032
1206
|
data: FinancePlatformModel.PaymentProcessPayload(),
|
|
1033
1207
|
});
|
|
@@ -1049,14 +1223,14 @@ class FinancePlatformModel {
|
|
|
1049
1223
|
return Joi.object({
|
|
1050
1224
|
page: Joi.number(),
|
|
1051
1225
|
seller_id: Joi.string().allow(""),
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1226
|
+
end_date: Joi.string().allow(""),
|
|
1227
|
+
start_date: Joi.string().allow(""),
|
|
1228
|
+
page_size: Joi.number(),
|
|
1055
1229
|
});
|
|
1056
1230
|
}
|
|
1057
1231
|
|
|
1058
|
-
/** @returns {
|
|
1059
|
-
static
|
|
1232
|
+
/** @returns {CreditlineDataPlatformReq} */
|
|
1233
|
+
static CreditlineDataPlatformReq() {
|
|
1060
1234
|
return Joi.object({
|
|
1061
1235
|
data: FinancePlatformModel.CreditlineDataPlatformPayload(),
|
|
1062
1236
|
});
|
|
@@ -1082,8 +1256,8 @@ class FinancePlatformModel {
|
|
|
1082
1256
|
});
|
|
1083
1257
|
}
|
|
1084
1258
|
|
|
1085
|
-
/** @returns {
|
|
1086
|
-
static
|
|
1259
|
+
/** @returns {IsCreditlinePlatformReq} */
|
|
1260
|
+
static IsCreditlinePlatformReq() {
|
|
1087
1261
|
return Joi.object({
|
|
1088
1262
|
data: FinancePlatformModel.IsCreditlinePayload(),
|
|
1089
1263
|
});
|
|
@@ -1104,8 +1278,8 @@ class FinancePlatformModel {
|
|
|
1104
1278
|
});
|
|
1105
1279
|
}
|
|
1106
1280
|
|
|
1107
|
-
/** @returns {
|
|
1108
|
-
static
|
|
1281
|
+
/** @returns {InvoiceTypeReq} */
|
|
1282
|
+
static InvoiceTypeReq() {
|
|
1109
1283
|
return Joi.object({
|
|
1110
1284
|
data: FinancePlatformModel.InvoiceTypePayloadData(),
|
|
1111
1285
|
});
|
|
@@ -1153,8 +1327,8 @@ class FinancePlatformModel {
|
|
|
1153
1327
|
});
|
|
1154
1328
|
}
|
|
1155
1329
|
|
|
1156
|
-
/** @returns {
|
|
1157
|
-
static
|
|
1330
|
+
/** @returns {InvoiceListingReq} */
|
|
1331
|
+
static InvoiceListingReq() {
|
|
1158
1332
|
return Joi.object({
|
|
1159
1333
|
data: FinancePlatformModel.InvoiceListingPayloadData(),
|
|
1160
1334
|
});
|
|
@@ -1172,7 +1346,7 @@ class FinancePlatformModel {
|
|
|
1172
1346
|
/** @returns {InvoiceListingResponseItems} */
|
|
1173
1347
|
static InvoiceListingResponseItems() {
|
|
1174
1348
|
return Joi.object({
|
|
1175
|
-
amount: Joi.
|
|
1349
|
+
amount: Joi.number(),
|
|
1176
1350
|
company: Joi.string().allow(""),
|
|
1177
1351
|
status: Joi.string().allow(""),
|
|
1178
1352
|
due_date: Joi.string().allow(""),
|
|
@@ -1189,6 +1363,8 @@ class FinancePlatformModel {
|
|
|
1189
1363
|
/** @returns {InvoiceListingResponse} */
|
|
1190
1364
|
static InvoiceListingResponse() {
|
|
1191
1365
|
return Joi.object({
|
|
1366
|
+
success: Joi.boolean(),
|
|
1367
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
1192
1368
|
unpaid_invoice_data: FinancePlatformModel.UnpaidInvoiceDataItems(),
|
|
1193
1369
|
items: Joi.array().items(
|
|
1194
1370
|
FinancePlatformModel.InvoiceListingResponseItems()
|
|
@@ -1205,8 +1381,8 @@ class FinancePlatformModel {
|
|
|
1205
1381
|
});
|
|
1206
1382
|
}
|
|
1207
1383
|
|
|
1208
|
-
/** @returns {
|
|
1209
|
-
static
|
|
1384
|
+
/** @returns {InvoicePdfReq} */
|
|
1385
|
+
static InvoicePdfReq() {
|
|
1210
1386
|
return Joi.object({
|
|
1211
1387
|
data: FinancePlatformModel.InvoicePdfPayloadData(),
|
|
1212
1388
|
});
|
|
@@ -1230,8 +1406,8 @@ class FinancePlatformModel {
|
|
|
1230
1406
|
});
|
|
1231
1407
|
}
|
|
1232
1408
|
|
|
1233
|
-
/** @returns {
|
|
1234
|
-
static
|
|
1409
|
+
/** @returns {IsCnRefundMethodReq} */
|
|
1410
|
+
static IsCnRefundMethodReq() {
|
|
1235
1411
|
return Joi.object({
|
|
1236
1412
|
data: FinancePlatformModel.IsCnRefundMethodData(),
|
|
1237
1413
|
});
|
|
@@ -1275,8 +1451,8 @@ class FinancePlatformModel {
|
|
|
1275
1451
|
});
|
|
1276
1452
|
}
|
|
1277
1453
|
|
|
1278
|
-
/** @returns {
|
|
1279
|
-
static
|
|
1454
|
+
/** @returns {CreateSellerCreditNoteConfigReq} */
|
|
1455
|
+
static CreateSellerCreditNoteConfigReq() {
|
|
1280
1456
|
return Joi.object({
|
|
1281
1457
|
data: FinancePlatformModel.CreateSellerCreditNoteConfig(),
|
|
1282
1458
|
});
|
|
@@ -1299,8 +1475,8 @@ class FinancePlatformModel {
|
|
|
1299
1475
|
});
|
|
1300
1476
|
}
|
|
1301
1477
|
|
|
1302
|
-
/** @returns {
|
|
1303
|
-
static
|
|
1478
|
+
/** @returns {DeleteConfigReq} */
|
|
1479
|
+
static DeleteConfigReq() {
|
|
1304
1480
|
return Joi.object({
|
|
1305
1481
|
data: FinancePlatformModel.DeleteConfig(),
|
|
1306
1482
|
});
|
|
@@ -1314,10 +1490,11 @@ class FinancePlatformModel {
|
|
|
1314
1490
|
});
|
|
1315
1491
|
}
|
|
1316
1492
|
|
|
1317
|
-
/** @returns {
|
|
1318
|
-
static
|
|
1493
|
+
/** @returns {ChannelDisplayNameItems} */
|
|
1494
|
+
static ChannelDisplayNameItems() {
|
|
1319
1495
|
return Joi.object({
|
|
1320
|
-
|
|
1496
|
+
key: Joi.string().allow(""),
|
|
1497
|
+
value: Joi.string().allow(""),
|
|
1321
1498
|
});
|
|
1322
1499
|
}
|
|
1323
1500
|
|
|
@@ -1325,7 +1502,7 @@ class FinancePlatformModel {
|
|
|
1325
1502
|
static ChannelDisplayNameResponse() {
|
|
1326
1503
|
return Joi.object({
|
|
1327
1504
|
success: Joi.boolean(),
|
|
1328
|
-
|
|
1505
|
+
items: Joi.array().items(FinancePlatformModel.ChannelDisplayNameItems()),
|
|
1329
1506
|
});
|
|
1330
1507
|
}
|
|
1331
1508
|
|
|
@@ -1336,8 +1513,8 @@ class FinancePlatformModel {
|
|
|
1336
1513
|
});
|
|
1337
1514
|
}
|
|
1338
1515
|
|
|
1339
|
-
/** @returns {
|
|
1340
|
-
static
|
|
1516
|
+
/** @returns {GetPdfUrlViewReq} */
|
|
1517
|
+
static GetPdfUrlViewReq() {
|
|
1341
1518
|
return Joi.object({
|
|
1342
1519
|
data: FinancePlatformModel.CnReferenceNumber(),
|
|
1343
1520
|
});
|
|
@@ -1359,8 +1536,8 @@ class FinancePlatformModel {
|
|
|
1359
1536
|
});
|
|
1360
1537
|
}
|
|
1361
1538
|
|
|
1362
|
-
/** @returns {
|
|
1363
|
-
static
|
|
1539
|
+
/** @returns {CreditNoteDetailsReq} */
|
|
1540
|
+
static CreditNoteDetailsReq() {
|
|
1364
1541
|
return Joi.object({
|
|
1365
1542
|
data: FinancePlatformModel.CnReferenceNumber(),
|
|
1366
1543
|
});
|
|
@@ -1384,6 +1561,7 @@ class FinancePlatformModel {
|
|
|
1384
1561
|
/** @returns {RedemptionDetails} */
|
|
1385
1562
|
static RedemptionDetails() {
|
|
1386
1563
|
return Joi.object({
|
|
1564
|
+
meta: Joi.any(),
|
|
1387
1565
|
staff_id: Joi.string().allow(""),
|
|
1388
1566
|
created_at: Joi.string().allow(""),
|
|
1389
1567
|
order_id: Joi.string().allow(""),
|
|
@@ -1398,6 +1576,8 @@ class FinancePlatformModel {
|
|
|
1398
1576
|
/** @returns {CreditNoteDetails} */
|
|
1399
1577
|
static CreditNoteDetails() {
|
|
1400
1578
|
return Joi.object({
|
|
1579
|
+
currency: Joi.string().allow("").allow(null),
|
|
1580
|
+
current_amount_used: Joi.number(),
|
|
1401
1581
|
cn_status: Joi.string().allow(""),
|
|
1402
1582
|
customer_mobile_number: Joi.string().allow(""),
|
|
1403
1583
|
cn_reference_number: Joi.string().allow(""),
|
|
@@ -1428,8 +1608,8 @@ class FinancePlatformModel {
|
|
|
1428
1608
|
});
|
|
1429
1609
|
}
|
|
1430
1610
|
|
|
1431
|
-
/** @returns {
|
|
1432
|
-
static
|
|
1611
|
+
/** @returns {GetCustomerCreditBalanceReq} */
|
|
1612
|
+
static GetCustomerCreditBalanceReq() {
|
|
1433
1613
|
return Joi.object({
|
|
1434
1614
|
data: FinancePlatformModel.GetCustomerCreditBalance(),
|
|
1435
1615
|
});
|
|
@@ -1451,8 +1631,8 @@ class FinancePlatformModel {
|
|
|
1451
1631
|
});
|
|
1452
1632
|
}
|
|
1453
1633
|
|
|
1454
|
-
/** @returns {
|
|
1455
|
-
static
|
|
1634
|
+
/** @returns {GetCnConfigReq} */
|
|
1635
|
+
static GetCnConfigReq() {
|
|
1456
1636
|
return Joi.object({
|
|
1457
1637
|
data: FinancePlatformModel.DeleteConfig(),
|
|
1458
1638
|
});
|
|
@@ -1461,7 +1641,7 @@ class FinancePlatformModel {
|
|
|
1461
1641
|
/** @returns {GetCnConfigResponseMeta} */
|
|
1462
1642
|
static GetCnConfigResponseMeta() {
|
|
1463
1643
|
return Joi.object({
|
|
1464
|
-
reason: Joi.string().allow(""),
|
|
1644
|
+
reason: Joi.string().allow("").allow(null),
|
|
1465
1645
|
source_channel: Joi.array().items(Joi.string().allow("")),
|
|
1466
1646
|
});
|
|
1467
1647
|
}
|
|
@@ -1471,7 +1651,7 @@ class FinancePlatformModel {
|
|
|
1471
1651
|
return Joi.object({
|
|
1472
1652
|
is_cn_as_refund_method: Joi.boolean(),
|
|
1473
1653
|
affiliate_id: Joi.string().allow(""),
|
|
1474
|
-
meta:
|
|
1654
|
+
meta: Joi.any(),
|
|
1475
1655
|
seller_id: Joi.number(),
|
|
1476
1656
|
notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(),
|
|
1477
1657
|
validity: Joi.number(),
|
|
@@ -1496,7 +1676,8 @@ class FinancePlatformModel {
|
|
|
1496
1676
|
utilisation: Joi.array().items(Joi.string().allow("")),
|
|
1497
1677
|
ordering_channel: Joi.array().items(Joi.string().allow("")),
|
|
1498
1678
|
store_id: Joi.array().items(Joi.number()),
|
|
1499
|
-
|
|
1679
|
+
type_of_transaction: Joi.array().items(Joi.string().allow("")),
|
|
1680
|
+
issuance_channel: Joi.array().items(Joi.string().allow("")),
|
|
1500
1681
|
});
|
|
1501
1682
|
}
|
|
1502
1683
|
|
|
@@ -1505,7 +1686,7 @@ class FinancePlatformModel {
|
|
|
1505
1686
|
return Joi.object({
|
|
1506
1687
|
page: Joi.number(),
|
|
1507
1688
|
end_date: Joi.string().allow(""),
|
|
1508
|
-
|
|
1689
|
+
page_size: Joi.number(),
|
|
1509
1690
|
filters: FinancePlatformModel.CnGenerateReportFilters(),
|
|
1510
1691
|
affiliate_id: Joi.string().allow(""),
|
|
1511
1692
|
meta: FinancePlatformModel.GenerateReportFilters(),
|
|
@@ -1516,8 +1697,8 @@ class FinancePlatformModel {
|
|
|
1516
1697
|
});
|
|
1517
1698
|
}
|
|
1518
1699
|
|
|
1519
|
-
/** @returns {
|
|
1520
|
-
static
|
|
1700
|
+
/** @returns {GenerateReportCustomerCnReq} */
|
|
1701
|
+
static GenerateReportCustomerCnReq() {
|
|
1521
1702
|
return Joi.object({
|
|
1522
1703
|
data: FinancePlatformModel.CnGenerateReport(),
|
|
1523
1704
|
});
|
|
@@ -1540,6 +1721,8 @@ class FinancePlatformModel {
|
|
|
1540
1721
|
/** @returns {GenerateReportCustomerCnResponseData} */
|
|
1541
1722
|
static GenerateReportCustomerCnResponseData() {
|
|
1542
1723
|
return Joi.object({
|
|
1724
|
+
success: Joi.boolean(),
|
|
1725
|
+
message: Joi.string().allow(""),
|
|
1543
1726
|
items: Joi.array().items(FinancePlatformModel.CnGenerateReportItems()),
|
|
1544
1727
|
row_header_display_order: Joi.any(),
|
|
1545
1728
|
end_date: Joi.string().allow(""),
|
|
@@ -1567,14 +1750,14 @@ class FinancePlatformModel {
|
|
|
1567
1750
|
end_date: Joi.string().allow(""),
|
|
1568
1751
|
affiliate_id: Joi.string().allow(""),
|
|
1569
1752
|
search: Joi.string().allow(""),
|
|
1570
|
-
status: Joi.
|
|
1753
|
+
status: Joi.string().allow(""),
|
|
1571
1754
|
search_type: Joi.string().allow(""),
|
|
1572
|
-
|
|
1755
|
+
page_size: Joi.number(),
|
|
1573
1756
|
});
|
|
1574
1757
|
}
|
|
1575
1758
|
|
|
1576
|
-
/** @returns {
|
|
1577
|
-
static
|
|
1759
|
+
/** @returns {DownloadReportCustomerCnReq} */
|
|
1760
|
+
static DownloadReportCustomerCnReq() {
|
|
1578
1761
|
return Joi.object({
|
|
1579
1762
|
data: FinancePlatformModel.CnDownloadReport(),
|
|
1580
1763
|
});
|
|
@@ -1603,9 +1786,14 @@ class FinancePlatformModel {
|
|
|
1603
1786
|
/** @returns {DownloadReportCustomerCnResponse} */
|
|
1604
1787
|
static DownloadReportCustomerCnResponse() {
|
|
1605
1788
|
return Joi.object({
|
|
1789
|
+
items: Joi.array().items(
|
|
1790
|
+
FinancePlatformModel.DownloadReportResponseData()
|
|
1791
|
+
),
|
|
1606
1792
|
data: Joi.array().items(
|
|
1607
1793
|
FinancePlatformModel.DownloadReportResponseData()
|
|
1608
1794
|
),
|
|
1795
|
+
item_count: Joi.number(),
|
|
1796
|
+
page: FinancePlatformModel.Page(),
|
|
1609
1797
|
});
|
|
1610
1798
|
}
|
|
1611
1799
|
|
|
@@ -1631,9 +1819,31 @@ class FinancePlatformModel {
|
|
|
1631
1819
|
});
|
|
1632
1820
|
}
|
|
1633
1821
|
|
|
1822
|
+
/** @returns {GetReportingFiltersReasonOptions} */
|
|
1823
|
+
static GetReportingFiltersReasonOptions() {
|
|
1824
|
+
return Joi.object({
|
|
1825
|
+
text: Joi.string().allow(""),
|
|
1826
|
+
value: Joi.string().allow(""),
|
|
1827
|
+
placeholder_text: Joi.string().allow(""),
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/** @returns {GetReportingFiltersReason} */
|
|
1832
|
+
static GetReportingFiltersReason() {
|
|
1833
|
+
return Joi.object({
|
|
1834
|
+
text: Joi.string().allow(""),
|
|
1835
|
+
type: Joi.string().allow(""),
|
|
1836
|
+
value: Joi.string().allow(""),
|
|
1837
|
+
options: Joi.array().items(
|
|
1838
|
+
FinancePlatformModel.GetReportingFiltersReasonOptions()
|
|
1839
|
+
),
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1634
1843
|
/** @returns {GetReportingFiltersResponse} */
|
|
1635
1844
|
static GetReportingFiltersResponse() {
|
|
1636
1845
|
return Joi.object({
|
|
1846
|
+
reason: FinancePlatformModel.GetReportingFiltersReason(),
|
|
1637
1847
|
search: FinancePlatformModel.GetReportingFilters(),
|
|
1638
1848
|
filters: Joi.array().items(
|
|
1639
1849
|
FinancePlatformModel.GetReportingNestedFilters()
|
|
@@ -1642,6 +1852,65 @@ class FinancePlatformModel {
|
|
|
1642
1852
|
});
|
|
1643
1853
|
}
|
|
1644
1854
|
|
|
1855
|
+
/** @returns {InvoicePaymentOptionsPayloadData} */
|
|
1856
|
+
static InvoicePaymentOptionsPayloadData() {
|
|
1857
|
+
return Joi.object({
|
|
1858
|
+
invoice_number: Joi.string().allow(""),
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
/** @returns {InvoicePaymentOptionsReq} */
|
|
1863
|
+
static InvoicePaymentOptionsReq() {
|
|
1864
|
+
return Joi.object({
|
|
1865
|
+
data: FinancePlatformModel.InvoicePaymentOptionsPayloadData(),
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
/** @returns {InvoicePaymentOptionsResponsePayableAmounts} */
|
|
1870
|
+
static InvoicePaymentOptionsResponsePayableAmounts() {
|
|
1871
|
+
return Joi.object({
|
|
1872
|
+
amount: Joi.number(),
|
|
1873
|
+
amount_key: Joi.string().allow(""),
|
|
1874
|
+
header: Joi.string().allow(""),
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/** @returns {InvoicePaymentOptionsResponseDeductedAmounts} */
|
|
1879
|
+
static InvoicePaymentOptionsResponseDeductedAmounts() {
|
|
1880
|
+
return Joi.object({
|
|
1881
|
+
amount: Joi.number(),
|
|
1882
|
+
header: Joi.string().allow(""),
|
|
1883
|
+
amount_key: Joi.string().allow(""),
|
|
1884
|
+
is_payable: Joi.boolean(),
|
|
1885
|
+
symbol: Joi.string().allow(""),
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
/** @returns {InvoicePaymentOptionsResponseData} */
|
|
1890
|
+
static InvoicePaymentOptionsResponseData() {
|
|
1891
|
+
return Joi.object({
|
|
1892
|
+
currency: FinancePlatformModel.Currency(),
|
|
1893
|
+
invoice_type: Joi.string().allow(""),
|
|
1894
|
+
display_amounts: Joi.array().items(
|
|
1895
|
+
FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts()
|
|
1896
|
+
),
|
|
1897
|
+
total_amount: Joi.any(),
|
|
1898
|
+
deducted_amounts: Joi.any(),
|
|
1899
|
+
payable_amounts: Joi.array().items(
|
|
1900
|
+
FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts()
|
|
1901
|
+
),
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
/** @returns {InvoicePaymentOptionsResponse} */
|
|
1906
|
+
static InvoicePaymentOptionsResponse() {
|
|
1907
|
+
return Joi.object({
|
|
1908
|
+
reason: Joi.string().allow(""),
|
|
1909
|
+
data: FinancePlatformModel.InvoicePaymentOptionsResponseData(),
|
|
1910
|
+
success: Joi.boolean(),
|
|
1911
|
+
});
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1645
1914
|
/** @returns {PaymentDetail} */
|
|
1646
1915
|
static PaymentDetail() {
|
|
1647
1916
|
return Joi.object({
|
|
@@ -1672,6 +1941,7 @@ class FinancePlatformModel {
|
|
|
1672
1941
|
/** @returns {InvoicePaymentDetailsResponse} */
|
|
1673
1942
|
static InvoicePaymentDetailsResponse() {
|
|
1674
1943
|
return Joi.object({
|
|
1944
|
+
reason: Joi.string().allow(""),
|
|
1675
1945
|
data: FinancePlatformModel.InvoicePaymentDetailsResponseData(),
|
|
1676
1946
|
success: Joi.boolean(),
|
|
1677
1947
|
payment_details_visible: Joi.boolean(),
|
|
@@ -1681,12 +1951,12 @@ class FinancePlatformModel {
|
|
|
1681
1951
|
/** @returns {InvoiceActivityLogsResponseData} */
|
|
1682
1952
|
static InvoiceActivityLogsResponseData() {
|
|
1683
1953
|
return Joi.object({
|
|
1684
|
-
performed_by: Joi.string().allow(""),
|
|
1954
|
+
performed_by: Joi.string().allow("").allow(null),
|
|
1685
1955
|
status: Joi.string().allow(""),
|
|
1686
|
-
reason: Joi.string().allow(""),
|
|
1956
|
+
reason: Joi.string().allow("").allow(null),
|
|
1687
1957
|
is_resolved: Joi.boolean(),
|
|
1688
1958
|
retry_attempts: Joi.number(),
|
|
1689
|
-
max_retry_attempts: Joi.number(),
|
|
1959
|
+
max_retry_attempts: Joi.number().allow(null),
|
|
1690
1960
|
});
|
|
1691
1961
|
}
|
|
1692
1962
|
|
|
@@ -1716,8 +1986,8 @@ class FinancePlatformModel {
|
|
|
1716
1986
|
});
|
|
1717
1987
|
}
|
|
1718
1988
|
|
|
1719
|
-
/** @returns {
|
|
1720
|
-
static
|
|
1989
|
+
/** @returns {UnlockCreditNoteReq} */
|
|
1990
|
+
static UnlockCreditNoteReq() {
|
|
1721
1991
|
return Joi.object({
|
|
1722
1992
|
data: FinancePlatformModel.UnlockCreditNoteRequestData(),
|
|
1723
1993
|
});
|