@gofynd/fdk-client-javascript 1.1.1 → 1.1.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.
Files changed (140) hide show
  1. package/README.md +1 -2
  2. package/index.d.ts +4 -7
  3. package/index.js +5 -12
  4. package/package.json +1 -1
  5. package/sdk/application/ApplicationClient.d.ts +20 -20
  6. package/sdk/application/ApplicationClient.js +26 -26
  7. package/sdk/application/Cart/CartApplicationClient.d.ts +45 -4
  8. package/sdk/application/Cart/CartApplicationClient.js +169 -9
  9. package/sdk/application/Cart/CartApplicationModel.d.ts +15 -0
  10. package/sdk/application/Cart/CartApplicationModel.js +177 -1
  11. package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
  12. package/sdk/application/Cart/CartApplicationValidator.js +20 -0
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +14 -4
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +18 -6
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
  17. package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
  19. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
  21. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  22. package/sdk/application/Content/ContentApplicationModel.js +4 -1
  23. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -2
  24. package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -2
  25. package/sdk/application/FileStorage/FileStorageApplicationModel.js +2 -2
  26. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
  27. package/sdk/application/Order/OrderApplicationClient.d.ts +17 -2
  28. package/sdk/application/Order/OrderApplicationClient.js +70 -2
  29. package/sdk/application/Order/OrderApplicationModel.d.ts +17 -0
  30. package/sdk/application/Order/OrderApplicationModel.js +129 -8
  31. package/sdk/application/Order/OrderApplicationValidator.d.ts +1 -0
  32. package/sdk/application/Order/OrderApplicationValidator.js +7 -0
  33. package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
  34. package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
  35. package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
  36. package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
  37. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
  38. package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
  39. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
  40. package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
  41. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +10 -0
  42. package/sdk/application/PosCart/PosCartApplicationModel.js +113 -1
  43. package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
  44. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +8 -8
  45. package/sdk/application/Rewards/RewardsApplicationClient.js +8 -8
  46. package/sdk/application/index.d.ts +10 -10
  47. package/sdk/application/index.js +13 -13
  48. package/sdk/common/AxiosHelper.js +1 -1
  49. package/sdk/common/Constant.d.ts +5 -0
  50. package/sdk/common/Constant.js +5 -0
  51. package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
  52. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +479 -0
  53. package/sdk/platform/Cart/CartPlatformApplicationClient.js +2574 -307
  54. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +31 -0
  55. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +263 -0
  56. package/sdk/platform/Cart/CartPlatformModel.d.ts +61 -0
  57. package/sdk/platform/Cart/CartPlatformModel.js +697 -2
  58. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
  59. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
  60. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  61. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
  62. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
  63. package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
  64. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
  65. package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
  66. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
  69. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
  70. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
  71. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
  72. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
  73. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
  74. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
  75. package/sdk/platform/Content/ContentPlatformModel.js +4 -1
  76. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +10 -4
  77. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +15 -9
  78. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  79. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  80. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -2
  81. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -2
  82. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
  83. package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
  84. package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
  85. package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
  86. package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
  87. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
  88. package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
  89. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
  90. package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
  91. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
  92. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
  93. package/sdk/platform/Order/OrderPlatformClient.d.ts +161 -81
  94. package/sdk/platform/Order/OrderPlatformClient.js +546 -119
  95. package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
  96. package/sdk/platform/Order/OrderPlatformModel.js +570 -158
  97. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  98. package/sdk/platform/Order/OrderPlatformValidator.js +52 -10
  99. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
  100. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
  101. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
  102. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
  103. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
  104. package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
  105. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
  106. package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
  107. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
  108. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
  109. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
  110. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
  111. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
  112. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
  113. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  114. package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
  115. package/sdk/platform/PlatformApplicationClient.d.ts +1149 -930
  116. package/sdk/platform/PlatformApplicationClient.js +1260 -1027
  117. package/sdk/platform/PlatformClient.d.ts +10360 -8660
  118. package/sdk/platform/PlatformClient.js +11126 -9093
  119. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -26
  120. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +14 -74
  121. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -1
  122. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -7
  123. package/sdk/platform/index.d.ts +15 -14
  124. package/sdk/platform/index.js +20 -18
  125. package/sdk/public/PublicClient.d.ts +2 -2
  126. package/sdk/public/PublicClient.js +4 -4
  127. package/sdk/public/index.d.ts +1 -1
  128. package/sdk/public/index.js +2 -2
  129. package/partner.d.ts +0 -4
  130. package/partner.js +0 -7
  131. package/sdk/partner/OAuthClient.d.ts +0 -14
  132. package/sdk/partner/OAuthClient.js +0 -112
  133. package/sdk/partner/PartnerAPIClient.d.ts +0 -12
  134. package/sdk/partner/PartnerAPIClient.js +0 -42
  135. package/sdk/partner/PartnerClient.d.ts +0 -6
  136. package/sdk/partner/PartnerClient.js +0 -17
  137. package/sdk/partner/PartnerConfig.d.ts +0 -30
  138. package/sdk/partner/PartnerConfig.js +0 -39
  139. package/sdk/partner/index.d.ts +0 -3
  140. package/sdk/partner/index.js +0 -5
@@ -16,6 +16,18 @@ class PaymentModel {
16
16
  ifsc_code: Joi.string().allow("").required(),
17
17
  });
18
18
  }
19
+ static CancelOrResendPaymentLinkRequest() {
20
+ return Joi.object({
21
+ payment_link_id: Joi.string().allow("").required(),
22
+ });
23
+ }
24
+ static CancelPaymentLinkResponse() {
25
+ return Joi.object({
26
+ message: Joi.string().allow("").required(),
27
+ status_code: Joi.number().required(),
28
+ success: Joi.boolean().required(),
29
+ });
30
+ }
19
31
  static CODdata() {
20
32
  return Joi.object({
21
33
  is_active: Joi.boolean().required(),
@@ -25,6 +37,42 @@ class PaymentModel {
25
37
  user_id: Joi.string().allow("").required(),
26
38
  });
27
39
  }
40
+ static Code() {
41
+ return Joi.object({
42
+ code: Joi.string().allow("").required(),
43
+ merchant_code: Joi.string().allow("").required(),
44
+ name: Joi.string().allow("").required(),
45
+ });
46
+ }
47
+ static CreatePaymentLinkMeta() {
48
+ return Joi.object({
49
+ amount: Joi.string().allow("").required(),
50
+ assign_card_id: Joi.string().allow("").allow(null),
51
+ cart_id: Joi.string().allow("").required(),
52
+ checkout_mode: Joi.string().allow("").required(),
53
+ pincode: Joi.string().allow("").required(),
54
+ });
55
+ }
56
+ static CreatePaymentLinkRequest() {
57
+ return Joi.object({
58
+ amount: Joi.number().required(),
59
+ description: Joi.string().allow("").allow(null),
60
+ email: Joi.string().allow("").required(),
61
+ external_order_id: Joi.string().allow("").required(),
62
+ meta: PaymentModel.CreatePaymentLinkMeta().required(),
63
+ mobile_number: Joi.string().allow("").required(),
64
+ });
65
+ }
66
+ static CreatePaymentLinkResponse() {
67
+ return Joi.object({
68
+ message: Joi.string().allow("").required(),
69
+ payment_link_id: Joi.string().allow("").allow(null),
70
+ payment_link_url: Joi.string().allow("").allow(null),
71
+ polling_timeout: Joi.number().allow(null),
72
+ status_code: Joi.number().required(),
73
+ success: Joi.boolean().required(),
74
+ });
75
+ }
28
76
  static DeletePayoutResponse() {
29
77
  return Joi.object({
30
78
  success: Joi.boolean().required(),
@@ -35,6 +83,85 @@ class PaymentModel {
35
83
  success: Joi.boolean().required(),
36
84
  });
37
85
  }
86
+ static EdcAddRequest() {
87
+ return Joi.object({
88
+ aggregator_id: Joi.number().required(),
89
+ device_tag: Joi.string().allow("").allow(null),
90
+ edc_device_serial_no: Joi.string().allow("").required(),
91
+ edc_model: Joi.string().allow("").required(),
92
+ store_id: Joi.number().required(),
93
+ terminal_serial_no: Joi.string().allow("").required(),
94
+ });
95
+ }
96
+ static EdcAggregatorAndModelListResponse() {
97
+ return Joi.object({
98
+ data: Joi.array().items(PaymentModel.EdcModelData()).required(),
99
+ success: Joi.boolean().required(),
100
+ });
101
+ }
102
+ static EdcDevice() {
103
+ return Joi.object({
104
+ aggregator_id: Joi.number().required(),
105
+ aggregator_name: Joi.string().allow(""),
106
+ application_id: Joi.string().allow("").required(),
107
+ device_tag: Joi.string().allow("").required(),
108
+ edc_device_serial_no: Joi.string().allow("").required(),
109
+ edc_model: Joi.string().allow(""),
110
+ is_active: Joi.boolean().required(),
111
+ merchant_store_pos_code: Joi.string().allow("").allow(null),
112
+ store_id: Joi.number().required(),
113
+ terminal_serial_no: Joi.string().allow("").required(),
114
+ terminal_unique_identifier: Joi.string().allow("").required(),
115
+ });
116
+ }
117
+ static EdcDeviceAddResponse() {
118
+ return Joi.object({
119
+ data: PaymentModel.EdcDevice().required(),
120
+ success: Joi.boolean().required(),
121
+ });
122
+ }
123
+ static EdcDeviceDetailsResponse() {
124
+ return Joi.object({
125
+ data: PaymentModel.EdcDevice().required(),
126
+ success: Joi.boolean().required(),
127
+ });
128
+ }
129
+ static EdcDeviceListResponse() {
130
+ return Joi.object({
131
+ items: Joi.array().items(PaymentModel.EdcDevice()).required(),
132
+ page: PaymentModel.Page().required(),
133
+ success: Joi.boolean().required(),
134
+ });
135
+ }
136
+ static EdcDeviceStatsResponse() {
137
+ return Joi.object({
138
+ statistics: PaymentModel.StatisticsData().required(),
139
+ success: Joi.boolean().required(),
140
+ });
141
+ }
142
+ static EdcDeviceUpdateResponse() {
143
+ return Joi.object({
144
+ success: Joi.boolean().required(),
145
+ });
146
+ }
147
+ static EdcModelData() {
148
+ return Joi.object({
149
+ aggregator: Joi.string().allow("").required(),
150
+ aggregator_id: Joi.number().required(),
151
+ models: Joi.array().items(Joi.string().allow("")).required(),
152
+ });
153
+ }
154
+ static EdcUpdateRequest() {
155
+ return Joi.object({
156
+ aggregator_id: Joi.number(),
157
+ device_tag: Joi.string().allow("").allow(null),
158
+ edc_device_serial_no: Joi.string().allow(""),
159
+ edc_model: Joi.string().allow(""),
160
+ is_active: Joi.boolean(),
161
+ merchant_store_pos_code: Joi.string().allow(""),
162
+ store_id: Joi.number(),
163
+ });
164
+ }
38
165
  static ErrorCodeAndDescription() {
39
166
  return Joi.object({
40
167
  code: Joi.string().allow("").required(),
@@ -48,12 +175,56 @@ class PaymentModel {
48
175
  success: Joi.boolean().required(),
49
176
  });
50
177
  }
178
+ static ErrorDescription() {
179
+ return Joi.object({
180
+ amount: Joi.number().allow(null),
181
+ cancelled: Joi.boolean().allow(null),
182
+ expired: Joi.boolean().allow(null),
183
+ invalid_id: Joi.boolean().allow(null),
184
+ merchant_name: Joi.string().allow("").allow(null),
185
+ merchant_order_id: Joi.string().allow("").allow(null),
186
+ msg: Joi.string().allow("").allow(null),
187
+ payment_transaction_id: Joi.string().allow("").allow(null),
188
+ });
189
+ }
190
+ static ErrorResponse() {
191
+ return Joi.object({
192
+ error: PaymentModel.ErrorDescription(),
193
+ message: Joi.string().allow("").required(),
194
+ status_code: Joi.number().required(),
195
+ success: Joi.boolean().required(),
196
+ });
197
+ }
51
198
  static GetOauthUrlResponse() {
52
199
  return Joi.object({
53
200
  success: Joi.boolean().required(),
54
201
  url: Joi.string().allow("").required(),
55
202
  });
56
203
  }
204
+ static GetPaymentCode() {
205
+ return Joi.object({
206
+ method_code: PaymentModel.PaymentCode().required(),
207
+ });
208
+ }
209
+ static GetPaymentCodeResponse() {
210
+ return Joi.object({
211
+ data: PaymentModel.GetPaymentCode().required(),
212
+ success: Joi.boolean().required(),
213
+ });
214
+ }
215
+ static GetPaymentLinkResponse() {
216
+ return Joi.object({
217
+ amount: Joi.number().allow(null),
218
+ external_order_id: Joi.string().allow("").allow(null),
219
+ merchant_name: Joi.string().allow("").allow(null),
220
+ message: Joi.string().allow("").required(),
221
+ payment_link_current_status: Joi.string().allow("").allow(null),
222
+ payment_link_url: Joi.string().allow("").allow(null),
223
+ polling_timeout: Joi.number().allow(null),
224
+ status_code: Joi.number().required(),
225
+ success: Joi.boolean().required(),
226
+ });
227
+ }
57
228
  static GetUserCODLimitResponse() {
58
229
  return Joi.object({
59
230
  success: Joi.boolean().required(),
@@ -87,6 +258,27 @@ class PaymentModel {
87
258
  package_name: Joi.string().allow("").allow(null),
88
259
  });
89
260
  }
261
+ static LinkStatus() {
262
+ return Joi.object({
263
+ message: Joi.string().allow("").required(),
264
+ status: Joi.boolean().required(),
265
+ });
266
+ }
267
+ static MerchantOnBoardingRequest() {
268
+ return Joi.object({
269
+ aggregator: Joi.string().allow("").required(),
270
+ app_id: Joi.string().allow("").required(),
271
+ credit_line_id: Joi.string().allow("").required(),
272
+ status: Joi.string().allow("").required(),
273
+ user_id: Joi.string().allow("").required(),
274
+ });
275
+ }
276
+ static MerchantOnBoardingResponse() {
277
+ return Joi.object({
278
+ data: Joi.any().required(),
279
+ success: Joi.boolean().required(),
280
+ });
281
+ }
90
282
  static MultiTenderPaymentMeta() {
91
283
  return Joi.object({
92
284
  current_status: Joi.string().allow(""),
@@ -140,6 +332,25 @@ class PaymentModel {
140
332
  show_beneficiary_details: Joi.boolean(),
141
333
  });
142
334
  }
335
+ static Page() {
336
+ return Joi.object({
337
+ current: Joi.number(),
338
+ has_next: Joi.boolean(),
339
+ has_previous: Joi.boolean(),
340
+ item_total: Joi.number(),
341
+ next_id: Joi.string().allow(""),
342
+ size: Joi.number(),
343
+ type: Joi.string().allow("").required(),
344
+ });
345
+ }
346
+ static PaymentCode() {
347
+ return Joi.object({
348
+ codes: PaymentModel.Code().required(),
349
+ name: Joi.string().allow("").required(),
350
+ networks: Joi.string().allow("").required(),
351
+ types: Joi.string().allow("").required(),
352
+ });
353
+ }
143
354
  static PaymentConfirmationRequest() {
144
355
  return Joi.object({
145
356
  order_id: Joi.string().allow("").required(),
@@ -187,6 +398,44 @@ class PaymentModel {
187
398
  success: Joi.boolean().required(),
188
399
  });
189
400
  }
401
+ static PaymentInitializationRequest() {
402
+ return Joi.object({
403
+ aggregator: Joi.string().allow("").required(),
404
+ amount: Joi.number().allow(null).required(),
405
+ contact: Joi.string().allow("").required(),
406
+ currency: Joi.string().allow("").required(),
407
+ customer_id: Joi.string().allow("").required(),
408
+ device_id: Joi.string().allow("").allow(null),
409
+ email: Joi.string().allow("").required(),
410
+ merchant_order_id: Joi.string().allow("").required(),
411
+ method: Joi.string().allow("").required(),
412
+ order_id: Joi.string().allow("").required(),
413
+ razorpay_payment_id: Joi.string().allow("").allow(null),
414
+ timeout: Joi.number().allow(null),
415
+ vpa: Joi.string().allow("").allow(null),
416
+ });
417
+ }
418
+ static PaymentInitializationResponse() {
419
+ return Joi.object({
420
+ aggregator: Joi.string().allow("").required(),
421
+ aggregator_order_id: Joi.string().allow(""),
422
+ amount: Joi.number().allow(null),
423
+ bqr_image: Joi.string().allow("").allow(null),
424
+ currency: Joi.string().allow("").allow(null),
425
+ customer_id: Joi.string().allow("").allow(null),
426
+ device_id: Joi.string().allow("").allow(null),
427
+ merchant_order_id: Joi.string().allow("").required(),
428
+ method: Joi.string().allow("").required(),
429
+ polling_url: Joi.string().allow("").required(),
430
+ razorpay_payment_id: Joi.string().allow("").allow(null),
431
+ status: Joi.string().allow(""),
432
+ success: Joi.boolean().required(),
433
+ timeout: Joi.number().allow(null),
434
+ upi_poll_url: Joi.string().allow("").allow(null),
435
+ virtual_id: Joi.string().allow("").allow(null),
436
+ vpa: Joi.string().allow("").allow(null),
437
+ });
438
+ }
190
439
  static PaymentModeList() {
191
440
  return Joi.object({
192
441
  aggregator_name: Joi.string().allow("").required(),
@@ -232,6 +481,28 @@ class PaymentModel {
232
481
  small: Joi.string().allow("").required(),
233
482
  });
234
483
  }
484
+ static PaymentObjectListSerializer() {
485
+ return Joi.object({
486
+ aggregator_payment_object: Joi.any().allow(null),
487
+ all_status: Joi.array().items(Joi.string().allow("")).required(),
488
+ amount_in_paisa: Joi.string().allow("").required(),
489
+ application_id: Joi.string().allow("").required(),
490
+ collected_by: Joi.string().allow("").required(),
491
+ company_id: Joi.string().allow("").required(),
492
+ created_on: Joi.string().allow("").required(),
493
+ currency: Joi.string().allow("").required(),
494
+ current_status: Joi.string().allow("").required(),
495
+ id: Joi.string().allow("").required(),
496
+ modified_on: Joi.string().allow("").required(),
497
+ payment_gateway: Joi.string().allow("").required(),
498
+ payment_id: Joi.string().allow("").allow(null),
499
+ payment_mode: Joi.string().allow("").required(),
500
+ payment_mode_identifier: Joi.string().allow("").required(),
501
+ refund_object: Joi.any().allow(null),
502
+ refunded_by: Joi.string().allow("").required(),
503
+ user_object: Joi.any().required(),
504
+ });
505
+ }
235
506
  static PaymentOptions() {
236
507
  return Joi.object({
237
508
  payment_option: Joi.array()
@@ -245,6 +516,54 @@ class PaymentModel {
245
516
  success: Joi.boolean().required(),
246
517
  });
247
518
  }
519
+ static PaymentStatusBulkHandlerRequest() {
520
+ return Joi.object({
521
+ merchant_order_id: Joi.array().items(Joi.string().allow("")).required(),
522
+ });
523
+ }
524
+ static PaymentStatusBulkHandlerResponse() {
525
+ return Joi.object({
526
+ count: Joi.number(),
527
+ data: Joi.array().items(PaymentModel.PaymentStatusObject()),
528
+ error: Joi.string().allow(""),
529
+ status: Joi.number().required(),
530
+ success: Joi.string().allow("").required(),
531
+ });
532
+ }
533
+ static PaymentStatusObject() {
534
+ return Joi.object({
535
+ merchant_order_id: Joi.string().allow("").required(),
536
+ payment_object_list: Joi.array().items(
537
+ PaymentModel.PaymentObjectListSerializer()
538
+ ),
539
+ });
540
+ }
541
+ static PaymentStatusUpdateRequest() {
542
+ return Joi.object({
543
+ aggregator: Joi.string().allow("").required(),
544
+ amount: Joi.number().allow(null).required(),
545
+ contact: Joi.string().allow("").required(),
546
+ currency: Joi.string().allow("").required(),
547
+ customer_id: Joi.string().allow("").required(),
548
+ device_id: Joi.string().allow("").allow(null),
549
+ email: Joi.string().allow("").required(),
550
+ merchant_order_id: Joi.string().allow("").required(),
551
+ merchant_transaction_id: Joi.string().allow("").required(),
552
+ method: Joi.string().allow("").required(),
553
+ order_id: Joi.string().allow("").required(),
554
+ status: Joi.string().allow("").required(),
555
+ vpa: Joi.string().allow(""),
556
+ });
557
+ }
558
+ static PaymentStatusUpdateResponse() {
559
+ return Joi.object({
560
+ aggregator_name: Joi.string().allow("").required(),
561
+ redirect_url: Joi.string().allow("").allow(null),
562
+ retry: Joi.boolean().required(),
563
+ status: Joi.string().allow("").required(),
564
+ success: Joi.boolean().allow(null),
565
+ });
566
+ }
248
567
  static PayoutBankDetails() {
249
568
  return Joi.object({
250
569
  account_holder: Joi.string().allow(""),
@@ -294,6 +613,20 @@ class PaymentModel {
294
613
  unique_transfer_no: Joi.any().required(),
295
614
  });
296
615
  }
616
+ static PollingPaymentLinkResponse() {
617
+ return Joi.object({
618
+ aggregator_name: Joi.string().allow("").allow(null),
619
+ amount: Joi.number().allow(null),
620
+ http_status: Joi.number().allow(null),
621
+ message: Joi.string().allow("").allow(null),
622
+ order_id: Joi.string().allow("").allow(null),
623
+ payment_link_id: Joi.string().allow("").allow(null),
624
+ redirect_url: Joi.string().allow("").allow(null),
625
+ status: Joi.string().allow("").allow(null),
626
+ status_code: Joi.number().allow(null),
627
+ success: Joi.boolean().allow(null),
628
+ });
629
+ }
297
630
  static RefundAccountResponse() {
298
631
  return Joi.object({
299
632
  data: Joi.any(),
@@ -302,6 +635,58 @@ class PaymentModel {
302
635
  success: Joi.boolean().required(),
303
636
  });
304
637
  }
638
+ static RepaymentDetailsSerialiserPayAll() {
639
+ return Joi.object({
640
+ aggregator_order_id: Joi.string().allow("").required(),
641
+ aggregator_transaction_id: Joi.string().allow("").required(),
642
+ extension_order_id: Joi.string().allow("").allow(null).required(),
643
+ shipment_details: Joi.array().items(
644
+ PaymentModel.RepaymentRequestDetails()
645
+ ),
646
+ total_amount: Joi.number().required(),
647
+ });
648
+ }
649
+ static RepaymentRequestDetails() {
650
+ return Joi.object({
651
+ aggregator: Joi.string().allow("").required(),
652
+ aggregator_order_id: Joi.string().allow("").required(),
653
+ aggregator_transaction_id: Joi.string().allow("").required(),
654
+ amount: Joi.number().required(),
655
+ current_status: Joi.string().allow("").required(),
656
+ fwd_shipment_id: Joi.string().allow("").required(),
657
+ merchant_order_id: Joi.string().allow("").required(),
658
+ outstanding_details_id: Joi.number().required(),
659
+ payment_mode: Joi.string().allow("").required(),
660
+ payment_mode_identifier: Joi.string().allow("").required(),
661
+ });
662
+ }
663
+ static RepaymentResponse() {
664
+ return Joi.object({
665
+ data: Joi.any().required(),
666
+ success: Joi.boolean().required(),
667
+ });
668
+ }
669
+ static ResendOrCancelPaymentRequest() {
670
+ return Joi.object({
671
+ device_id: Joi.string().allow("").allow(null),
672
+ order_id: Joi.string().allow("").required(),
673
+ request_type: Joi.string().allow("").required(),
674
+ });
675
+ }
676
+ static ResendOrCancelPaymentResponse() {
677
+ return Joi.object({
678
+ data: PaymentModel.LinkStatus().required(),
679
+ success: Joi.boolean().required(),
680
+ });
681
+ }
682
+ static ResendPaymentLinkResponse() {
683
+ return Joi.object({
684
+ message: Joi.string().allow("").required(),
685
+ polling_timeout: Joi.number().allow(null),
686
+ status_code: Joi.number().required(),
687
+ success: Joi.boolean().required(),
688
+ });
689
+ }
305
690
  static RevokeOAuthToken() {
306
691
  return Joi.object({
307
692
  message: Joi.string().allow("").required(),
@@ -345,6 +730,12 @@ class PaymentModel {
345
730
  success: Joi.boolean().required(),
346
731
  });
347
732
  }
733
+ static StatisticsData() {
734
+ return Joi.object({
735
+ active_device_count: Joi.number().required(),
736
+ inactive_device_count: Joi.number().required(),
737
+ });
738
+ }
348
739
  static SubscriptionConfigResponse() {
349
740
  return Joi.object({
350
741
  aggregator: Joi.string().allow("").required(),
@@ -372,5 +763,24 @@ class PaymentModel {
372
763
  success: Joi.boolean().required(),
373
764
  });
374
765
  }
766
+ static ValidateCustomerRequest() {
767
+ return Joi.object({
768
+ aggregator: Joi.string().allow("").required(),
769
+ billing_address: Joi.any(),
770
+ delivery_address: Joi.any(),
771
+ merchant_params: Joi.any(),
772
+ order_items: Joi.array().items(Joi.any()),
773
+ payload: Joi.string().allow("").allow(null),
774
+ phone_number: Joi.string().allow("").required(),
775
+ transaction_amount_in_paise: Joi.number().required(),
776
+ });
777
+ }
778
+ static ValidateCustomerResponse() {
779
+ return Joi.object({
780
+ data: Joi.any().required(),
781
+ message: Joi.string().allow("").required(),
782
+ success: Joi.boolean().required(),
783
+ });
784
+ }
375
785
  }
376
786
  module.exports = PaymentModel;