@gofynd/fdk-client-javascript 1.4.15-beta.3 → 1.4.15-beta.5

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 (241) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
  6. package/sdk/application/Cart/CartApplicationClient.js +304 -114
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +437 -30
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +22 -1
  11. package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.js +157 -10
  14. package/sdk/application/Content/ContentApplicationClient.d.ts +30 -19
  15. package/sdk/application/Content/ContentApplicationClient.js +297 -28
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -8
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.js +50 -7
  18. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  19. package/sdk/application/Lead/LeadApplicationClient.js +74 -1
  20. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
  21. package/sdk/application/Logistic/LogisticApplicationClient.js +159 -87
  22. package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
  23. package/sdk/application/Order/OrderApplicationClient.js +195 -47
  24. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  25. package/sdk/application/Payment/PaymentApplicationClient.js +473 -46
  26. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  27. package/sdk/application/Rewards/RewardsApplicationClient.js +75 -7
  28. package/sdk/application/Share/ShareApplicationClient.js +96 -0
  29. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  30. package/sdk/application/Theme/ThemeApplicationClient.js +66 -4
  31. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  32. package/sdk/application/User/UserApplicationClient.js +418 -6
  33. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  34. package/sdk/application/Webhook/WebhookApplicationClient.js +16 -3
  35. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  37. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +19 -116
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +14 -121
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  41. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  42. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  44. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  45. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  47. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
  49. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
  51. package/sdk/partner/OAuthClient.js +1 -0
  52. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  53. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  54. package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
  55. package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
  56. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  57. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  58. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  59. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  60. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  62. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  64. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  66. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  72. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  73. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  74. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  75. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  76. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  77. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  78. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  80. package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -118
  82. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
  83. package/sdk/platform/Cart/CartPlatformModel.d.ts +1298 -5037
  84. package/sdk/platform/Cart/CartPlatformModel.js +1217 -1976
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
  88. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
  89. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
  90. package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
  91. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6385
  92. package/sdk/platform/Catalog/CatalogPlatformModel.js +1680 -3217
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
  94. package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
  95. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  96. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  97. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  98. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  103. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  104. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  110. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  116. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
  118. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  120. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
  122. package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
  124. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
  125. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  126. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  127. package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
  128. package/sdk/platform/Content/ContentPlatformModel.js +390 -521
  129. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  130. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  131. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  132. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  133. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  134. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  135. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +36 -94
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +60 -462
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  142. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +101 -370
  144. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +84 -313
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  146. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  147. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  148. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  149. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  150. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  151. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  152. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  153. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  154. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  155. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  156. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  157. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
  159. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
  161. package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
  162. package/sdk/platform/Order/OrderPlatformClient.js +198 -416
  163. package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
  164. package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
  165. package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
  166. package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
  167. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  168. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  169. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  170. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
  172. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  174. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  175. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  176. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  177. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
  178. package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
  179. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  180. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  181. package/sdk/platform/PlatformClient.d.ts +2 -0
  182. package/sdk/platform/PlatformClient.js +4 -0
  183. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  184. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  185. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  188. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +64 -58
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +46 -42
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +28 -26
  199. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  200. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  201. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
  202. package/sdk/platform/Share/SharePlatformModel.js +4 -27
  203. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  204. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  205. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  206. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  207. package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
  208. package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
  209. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  210. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  211. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  212. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  213. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  214. package/sdk/platform/User/UserPlatformModel.js +23 -23
  215. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  216. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  217. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  218. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  219. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  220. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  221. package/sdk/platform/index.d.ts +1 -0
  222. package/sdk/platform/index.js +2 -0
  223. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  224. package/sdk/public/Configuration/ConfigurationPublicClient.js +21 -6
  225. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  226. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  227. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  228. package/sdk/public/Content/ContentPublicClient.js +20 -791
  229. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  230. package/sdk/public/Content/ContentPublicModel.js +3 -649
  231. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  232. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  233. package/sdk/public/Partner/PartnerPublicClient.js +15 -0
  234. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  235. package/sdk/public/Webhook/WebhookPublicClient.js +48 -8
  236. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  237. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  238. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  239. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  240. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  241. package/sdk/application/Finance/FinanceApplicationClient.js +0 -105
@@ -0,0 +1,2148 @@
1
+ const Joi = require("joi");
2
+
3
+ /**
4
+ * @typedef OrederFreezeResponse
5
+ * @property {boolean} [success] - Indicates whether the operation was successful or not.
6
+ * @property {boolean} [oms_freeze] - Flag indicating if the system is frozen
7
+ * for order management.
8
+ * @property {string} [source] - Optional field indicating the data source of
9
+ * the information.
10
+ */
11
+
12
+ /**
13
+ * @typedef GenerateReportMeta
14
+ * @property {string} [brand] - The brand name associated with the report meta
15
+ * information.
16
+ * @property {string} [company] - The company name associated with the report
17
+ * meta information.
18
+ * @property {string} [channel] - The sale channel name associated with seller.
19
+ */
20
+
21
+ /**
22
+ * @typedef GenerateReportFilters
23
+ * @property {string[]} [brand] - An array of brand names to filter the report data.
24
+ * @property {string[]} [company] - An array of company id to filter the report data.
25
+ * @property {string[]} [channel] - An array of sale channel names associated
26
+ * with seller to filter the report data.
27
+ */
28
+
29
+ /**
30
+ * @typedef GenerateReportPlatform
31
+ * @property {string} [start_date] - The start date to generate report specific preiod.
32
+ * @property {string} [end_date] - The end date to generate report specific preiod.
33
+ * @property {GenerateReportMeta} [meta]
34
+ * @property {string} [report_id] - The unique identifier of the generate report
35
+ * where different report configure.
36
+ * @property {GenerateReportFilters} [filters]
37
+ */
38
+
39
+ /**
40
+ * @typedef GenerateReportReq
41
+ * @property {GenerateReportPlatform} [data]
42
+ */
43
+
44
+ /**
45
+ * @typedef Page
46
+ * @property {number} [item_total] - The total number of items on the page.
47
+ * @property {string} [next_id] - The identifier for the next page.
48
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
49
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
50
+ * @property {number} [current] - The current page number.
51
+ * @property {string} type - The type of the page, such as 'PageType'.
52
+ * @property {number} [size] - The number of items per page.
53
+ */
54
+
55
+ /**
56
+ * @typedef Currency
57
+ * @property {string} [code] - The unique currency code.
58
+ * @property {string} [symbol] - The unique currency symbol.
59
+ * @property {string} [name] - The unique currency name.
60
+ */
61
+
62
+ /**
63
+ * @typedef GenerateReportJson
64
+ * @property {Object} [data]
65
+ * @property {number} [item_count] - Total number of items in the report.
66
+ * @property {Page} [page]
67
+ * @property {string} [end_date] - The end date to generate report specific preiod.
68
+ * @property {string} [start_date] - The start date to generate report specific preiod.
69
+ * @property {string[][]} [items] - Nested array structure representing report
70
+ * items or data.
71
+ * @property {string[]} [headers] - Headers describing each item in the report data.
72
+ */
73
+
74
+ /**
75
+ * @typedef Error
76
+ * @property {number} [status]
77
+ * @property {string} [reason]
78
+ * @property {boolean} [success]
79
+ * @property {string} [message]
80
+ * @property {string} [code]
81
+ * @property {string} [exception]
82
+ * @property {string} [info]
83
+ * @property {string} [request_id]
84
+ * @property {string} [stack_trace]
85
+ * @property {ErrorMeta} [meta]
86
+ */
87
+
88
+ /**
89
+ * @typedef ErrorMeta
90
+ * @property {ErrorMetaItems[]} [columns_errors]
91
+ */
92
+
93
+ /**
94
+ * @typedef ErrorMetaItems
95
+ * @property {number} [code]
96
+ * @property {string} [message]
97
+ */
98
+
99
+ /**
100
+ * @typedef DownloadReport
101
+ * @property {DownloadReportData} [data]
102
+ */
103
+
104
+ /**
105
+ * @typedef DownloadReportData
106
+ * @property {number} [page] - The current page number of the report.
107
+ * @property {number} [page_size] - The number of items displayed per page.
108
+ * @property {string} [start_date] - The start date for fetching the report
109
+ * history for download.
110
+ * @property {string} [end_date] - The end date for fetching the report history
111
+ * for download.
112
+ */
113
+
114
+ /**
115
+ * @typedef DownloadReportItems
116
+ * @property {string} [start_date] - The start date for the report item.
117
+ * @property {string} [end_date] - The end date for the report item.
118
+ * @property {GenerateReportMeta} [meta]
119
+ * @property {string} [report_id] - The unique identifier of the report item.
120
+ * @property {GenerateReportFilters} [filters]
121
+ */
122
+
123
+ /**
124
+ * @typedef DownloadReportList
125
+ * @property {DownloadReportItems[]} [items] - A list of report items available
126
+ * for download.
127
+ * @property {Page} [page]
128
+ * @property {number} [item_count] - The total number of items in the report list.
129
+ */
130
+
131
+ /**
132
+ * @typedef GetEngineFilters
133
+ * @property {string} [config_field] - The configuration field used for filtering.
134
+ * @property {string} [status] - The status used for filtering.
135
+ * @property {boolean} [is_active] - Flag indicating if the filter is active.
136
+ * @property {string} [seller_id] - The seller ID used for filtering.
137
+ */
138
+
139
+ /**
140
+ * @typedef GetEngineData
141
+ * @property {string} [status] - Status of the request.
142
+ * @property {GetEngineFilters} [filters]
143
+ * @property {string[]} [project] - A list of fields to get data from tables.
144
+ * @property {string} [table_name] - The name of the table from which to retrieve data.
145
+ * @property {Object} [search] - Search criteria for querying on given table
146
+ * specific fields.
147
+ * @property {number} [page] - The current page number for pagination.
148
+ * @property {number} [page_size] - The number of items displayed per page.
149
+ * @property {string} [order_by] - The field by which to order the results.
150
+ */
151
+
152
+ /**
153
+ * @typedef GetEngineReq
154
+ * @property {GetEngineData} [data]
155
+ */
156
+
157
+ /**
158
+ * @typedef GetEngineResponse
159
+ * @property {boolean} [success] - Indicates whether the request was successful.
160
+ * @property {Object[]} [items] - A list of items returned by the request.
161
+ * @property {Page} [page]
162
+ * @property {number} [item_count] - The total number of items returned by the request.
163
+ */
164
+
165
+ /**
166
+ * @typedef GetReason
167
+ * @property {string} [reason_type] - The type of reason associated with the request.
168
+ */
169
+
170
+ /**
171
+ * @typedef GetReasonReq
172
+ * @property {GetReason} [data]
173
+ */
174
+
175
+ /**
176
+ * @typedef ReasonItem
177
+ * @property {string} [id] - Id of the reason for reason_type.
178
+ * @property {string} [name] - Code of the reason for reason_type.
179
+ * @property {string} [display_name] - Display name of the reason for reason_type.
180
+ */
181
+
182
+ /**
183
+ * @typedef GetReasonResponse
184
+ * @property {boolean} [success] - Indicates whether the request was successfull.
185
+ * @property {ReasonItem[]} [item_list] - The list of items returned in the response.
186
+ * @property {number} [item_count] - The number of items in the response.
187
+ * @property {Page} [page]
188
+ */
189
+
190
+ /**
191
+ * @typedef GetReportListData
192
+ * @property {string} [role_name] - The name of the role requesting the report list.
193
+ * @property {boolean} [listing_enabled] - Indicates whether listing is enabled
194
+ * for the role.
195
+ */
196
+
197
+ /**
198
+ * @typedef GetReportListReq
199
+ * @property {GetReportListData} [data]
200
+ */
201
+
202
+ /**
203
+ * @typedef GetReportListResponse
204
+ * @property {boolean} [success] - Indicates whether the request was successful.
205
+ * @property {ReportItem[]} [items] - The list of report items.
206
+ * @property {Page} [page]
207
+ * @property {number} [total_count] - The total number of items in the report list.
208
+ */
209
+
210
+ /**
211
+ * @typedef ReportItem
212
+ * @property {string} [id] - The unique identifier for the report item.
213
+ * @property {string} [name] - The name of the report item.
214
+ * @property {string} [description] - A brief description of the report item.
215
+ * @property {string[]} [allowed_filters] - The filters that can be applied to
216
+ * the report item.
217
+ * @property {Object} [config_meta] - Metadata related to the report item configuration.
218
+ * @property {string} [report_type] - The type of the report item.
219
+ * @property {string} [display_date] - The display date of the report item, if applicable.
220
+ */
221
+
222
+ /**
223
+ * @typedef GetAffiliate
224
+ * @property {number} [company_id] - The unique identifier of the company
225
+ * associated with the affiliate.
226
+ */
227
+
228
+ /**
229
+ * @typedef GetAffiliateResponse
230
+ * @property {string} [reason] - The reason for the response, if applicable.
231
+ * @property {boolean} [success] - Indicates whether the request was successful.
232
+ * @property {Object[]} [docs] - List of items or data related to the affiliate.
233
+ */
234
+
235
+ /**
236
+ * @typedef DownloadCreditDebitNote
237
+ * @property {string[]} [note_id] - List of unique identifiers for the
238
+ * credit/debit notes to be download.
239
+ */
240
+
241
+ /**
242
+ * @typedef DownloadCreditDebitNoteReq
243
+ * @property {DownloadCreditDebitNote} [data]
244
+ */
245
+
246
+ /**
247
+ * @typedef DownloadCreditDebitNoteResponseData
248
+ * @property {string} [id] - The unique identifier of the download credit/debit note.
249
+ * @property {string} [pdf_s3_url] - The URL where the PDF of the credit/debit
250
+ * note is stored.
251
+ */
252
+
253
+ /**
254
+ * @typedef DownloadCreditDebitNoteResponse
255
+ * @property {boolean} [success] - Indicates whether the request to download the
256
+ * credit/debit notes was successful.
257
+ * @property {DownloadCreditDebitNoteResponseData[]} [data] - List of
258
+ * credit/debit notes download data.
259
+ */
260
+
261
+ /**
262
+ * @typedef InvoiceBillingItem
263
+ * @property {string} [invoice_number] - The number of the invoice associated
264
+ * with the billing item.
265
+ * @property {number} [amount] - The amount of the billing item.
266
+ */
267
+
268
+ /**
269
+ * @typedef PaymentProcessPayload
270
+ * @property {string} [platform] - The platform through which the payment is processed.
271
+ * @property {number} [amount] - The total amount to be processed in the payment.
272
+ * @property {string} [transaction_type] - The type of transaction (e.g., seller_online).
273
+ * @property {string} [source_reference] - The reference for the source of the payment.
274
+ * @property {number} [total_amount] - The total amount to be processed in the payment.
275
+ * @property {Object} [meta] - Additional metadata related to the payment.
276
+ * @property {string} [currency] - The currency in which the payment is made.
277
+ * @property {string} [seller_id] - The unique identifier for the seller
278
+ * receiving the payment.
279
+ * @property {string} [mode_of_payment] - The mode of payment (e.g., online).
280
+ * @property {InvoiceBillingItem[]} [invoice_billing_items]
281
+ */
282
+
283
+ /**
284
+ * @typedef PaymentProcessReq
285
+ * @property {PaymentProcessPayload} [data]
286
+ */
287
+
288
+ /**
289
+ * @typedef PaymentProcessResponse
290
+ * @property {number} [code] - Response code indicating the status of the payment process.
291
+ * @property {string} [message] - A message providing additional information
292
+ * about the payment process response.
293
+ * @property {Object} [meta] - Additional metadata related to the payment
294
+ * process response.
295
+ * @property {string} [transaction_id] - The unique identifier for the payment
296
+ * transaction.
297
+ * @property {string} [redirect_url] - URL to redirect the user to complete the
298
+ * payment process, if applicable.
299
+ */
300
+
301
+ /**
302
+ * @typedef CreditlineDataPlatformPayload
303
+ * @property {number} [page] - The page number for pagination.
304
+ * @property {string} [seller_id] - The unique identifier for the seller.
305
+ * @property {string} [end_date] - The end date for the query.
306
+ * @property {string} [start_date] - The start date for the query.
307
+ * @property {number} [page_size] - The number of items per page.
308
+ */
309
+
310
+ /**
311
+ * @typedef CreditlineDataPlatformReq
312
+ * @property {CreditlineDataPlatformPayload} [data]
313
+ */
314
+
315
+ /**
316
+ * @typedef CreditlineDataPlatformResponse
317
+ * @property {Object[]} [items] - The list of items in the response.
318
+ * @property {number} [code] - The response status code.
319
+ * @property {boolean} [show_mr] - A flag indicating whether to show MR (some
320
+ * specific field).
321
+ * @property {Page} [page]
322
+ * @property {string} [message] - The response message.
323
+ * @property {string[]} [headers] - The list of response headers.
324
+ * @property {number} [item_count] - The total number of items.
325
+ */
326
+
327
+ /**
328
+ * @typedef IsCreditlinePayload
329
+ * @property {string} [seller_id] - The unique identifier for the seller to
330
+ * check for credit line eligibility.
331
+ */
332
+
333
+ /**
334
+ * @typedef IsCreditlinePlatformReq
335
+ * @property {IsCreditlinePayload} [data]
336
+ */
337
+
338
+ /**
339
+ * @typedef IsCreditlinePlatformResponse
340
+ * @property {boolean} [is_creditline_opted] - Indicates whether the seller has
341
+ * opted for a credit line.
342
+ * @property {number} [code] - Response code indicating the status of the credit
343
+ * line check.
344
+ */
345
+
346
+ /**
347
+ * @typedef InvoiceTypePayloadData
348
+ * @property {boolean} [is_active] - Indicates if the invoice type is active.
349
+ */
350
+
351
+ /**
352
+ * @typedef InvoiceTypeReq
353
+ * @property {InvoiceTypePayloadData} [data]
354
+ */
355
+
356
+ /**
357
+ * @typedef InvoiceTypeResponseItems
358
+ * @property {string} [text] - The text description of the invoice type.
359
+ * @property {string} [value] - The value or code representing the invoice type.
360
+ */
361
+
362
+ /**
363
+ * @typedef InvoiceTypeResponse
364
+ * @property {boolean} [success] - Indicates whether the request was successful.
365
+ * @property {InvoiceTypeResponseItems[]} [invoice_type_list] - List of invoice
366
+ * types available.
367
+ * @property {InvoiceTypeResponseItems[]} [payment_status_list] - List of
368
+ * payment statuses available.
369
+ */
370
+
371
+ /**
372
+ * @typedef InoviceListingPayloadDataFilters
373
+ * @property {string[]} [payment_status] - List of payment statuses to filter by.
374
+ * @property {string[]} [invoice_type] - List of invoice types to filter by.
375
+ * @property {string[]} [company_id] - List of company IDs to filter by.
376
+ */
377
+
378
+ /**
379
+ * @typedef InvoiceListingPayloadData
380
+ * @property {number} [page_size] - The number of items per page for pagination.
381
+ * @property {number} [page] - The page number for pagination.
382
+ * @property {string} [start_date] - The start date for the invoice listing filter.
383
+ * @property {string} [end_date] - The end date for the invoice listing filter.
384
+ * @property {string} [search] - Search term for filtering invoices.
385
+ * @property {InoviceListingPayloadDataFilters} [filters]
386
+ */
387
+
388
+ /**
389
+ * @typedef InvoiceListingReq
390
+ * @property {InvoiceListingPayloadData} [data]
391
+ */
392
+
393
+ /**
394
+ * @typedef UnpaidInvoiceDataItems
395
+ * @property {number} [total_unpaid_invoice_count] - The total count of unpaid invoices.
396
+ * @property {string} [currency] - The currency used for unpaid invoices.
397
+ * @property {number} [total_unpaid_amount] - The total amount of unpaid invoices.
398
+ */
399
+
400
+ /**
401
+ * @typedef InvoiceListingResponseItems
402
+ * @property {number} [amount] - The amount of the invoice.
403
+ * @property {string} [company] - The name of the company associated with the invoice.
404
+ * @property {string} [status] - The current status of the invoice (e.g.,
405
+ * 'paid', 'unpaid').
406
+ * @property {string} [due_date] - The due date of the invoice.
407
+ * @property {string} [invoice_date] - The date when the invoice was issued.
408
+ * @property {string} [invoice_type] - The type of invoice.
409
+ * @property {string} [period] - The period covered by the invoice.
410
+ * @property {string} [invoice_number] - The invoice number.
411
+ * @property {boolean} [is_downloadable] - Indicates if the invoice is available
412
+ * for download.
413
+ * @property {string} [invoice_id] - The unique identifier of the invoice.
414
+ * @property {Currency} [currency]
415
+ */
416
+
417
+ /**
418
+ * @typedef InvoiceListingResponse
419
+ * @property {boolean} [success] - Indicates whether the request was successful.
420
+ * @property {string[]} [headers] - Headers related to the invoice listing response.
421
+ * @property {UnpaidInvoiceDataItems} [unpaid_invoice_data]
422
+ * @property {InvoiceListingResponseItems[]} [items] - List of invoice items in
423
+ * the response.
424
+ * @property {Page} [page]
425
+ * @property {number} [item_count] - The total number of invoice items in the response.
426
+ */
427
+
428
+ /**
429
+ * @typedef InvoicePdfPayloadData
430
+ * @property {string[]} [invoice_number] - List of invoice numbers for which
431
+ * PDFs are requested.
432
+ */
433
+
434
+ /**
435
+ * @typedef InvoicePdfReq
436
+ * @property {InvoicePdfPayloadData} [data]
437
+ */
438
+
439
+ /**
440
+ * @typedef InvoicePdfResponse
441
+ * @property {boolean} [success] - Indicates whether the PDF generation request
442
+ * was successful.
443
+ * @property {string[]} [data] - List of URLs or paths to the generated PDF files.
444
+ * @property {string[]} [error] - List of errors encountered while generating the PDFs.
445
+ */
446
+
447
+ /**
448
+ * @typedef IsCnRefundMethodData
449
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
450
+ * application as affiliate_id associated with the seller.
451
+ * @property {boolean} [toggle_edit_required] - Indicates whether editing the
452
+ * refund method is required.
453
+ * @property {number} [seller_id] - Unique identifier for the seller.
454
+ */
455
+
456
+ /**
457
+ * @typedef IsCnRefundMethodReq
458
+ * @property {IsCnRefundMethodData} [data]
459
+ */
460
+
461
+ /**
462
+ * @typedef IsCnRefundMethodResponseData
463
+ * @property {boolean} [is_first_time_user] - Indicates whether the seller for
464
+ * specific sale channel is using the refund method for the first time.
465
+ */
466
+
467
+ /**
468
+ * @typedef IsCnRefundMethodResponse
469
+ * @property {boolean} [success] - Indicates whether the request to determine
470
+ * the refund method was successful.
471
+ * @property {IsCnRefundMethodResponseData} [data]
472
+ */
473
+
474
+ /**
475
+ * @typedef CreditNoteConfigNotificationEvents
476
+ * @property {number} [expiration_reminder_to_customer] - Number of days before
477
+ * the expiration date to send a reminder notification to the customer.
478
+ */
479
+
480
+ /**
481
+ * @typedef CreateSellerCreditNoteConfig
482
+ * @property {boolean} [is_cn_as_refund_method] - Indicates if the credit note
483
+ * is used as a refund method.
484
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
485
+ * application as affiliate_id associated with the seller.
486
+ * @property {string[]} [source_channel] - List of source channels associated
487
+ * with the credit note configuration.
488
+ * @property {number} [seller_id] - Unique identifier for the seller.
489
+ * @property {CreditNoteConfigNotificationEvents} [notification_events]
490
+ * @property {string} [sales_channel_name] - Name of the sales channel.
491
+ * @property {string[]} [ordering_channel] - List of ordering channels
492
+ * associated with the credit note configuration.
493
+ * @property {number} [validity] - Validity period of the credit note in days.
494
+ * @property {string} [currency_type] - Type of currency used for the credit note.
495
+ * @property {string[]} [slug_values] - List of slug values associated with the
496
+ * credit note configuration.
497
+ */
498
+
499
+ /**
500
+ * @typedef CreateSellerCreditNoteConfigReq
501
+ * @property {CreateSellerCreditNoteConfig} [data]
502
+ */
503
+
504
+ /**
505
+ * @typedef CreateSellerCreditNoteConfigResponse
506
+ * @property {boolean} [success] - Indicates if the credit note configuration
507
+ * creation was successful.
508
+ * @property {string} [message] - Additional information or message about the
509
+ * credit note configuration creation process.
510
+ */
511
+
512
+ /**
513
+ * @typedef DeleteConfig
514
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
515
+ * application as affiliate_id associated with the seller.
516
+ * @property {string[]} [slug_values] - List of slug values associated with the
517
+ * credit note configuration.
518
+ * @property {number} [seller_id] - Unique identifier for the seller.
519
+ */
520
+
521
+ /**
522
+ * @typedef DeleteConfigReq
523
+ * @property {DeleteConfig} [data]
524
+ */
525
+
526
+ /**
527
+ * @typedef DeleteConfigResponse
528
+ * @property {boolean} [success] - Indicates if the configuration deletion was successful.
529
+ * @property {string} [message] - Additional information or message about the
530
+ * configuration deletion process.
531
+ */
532
+
533
+ /**
534
+ * @typedef ChannelDisplayNameItems
535
+ * @property {string} [key] - The unique key identifying the channel.
536
+ * @property {string} [value] - The display name of the channel associated with the key.
537
+ */
538
+
539
+ /**
540
+ * @typedef ChannelDisplayNameResponse
541
+ * @property {boolean} [success] - Indicates if the retrieval of channel display
542
+ * names was successful.
543
+ * @property {ChannelDisplayNameItems[]} [items] - List of items containing
544
+ * key-value pairs for channel display names.
545
+ */
546
+
547
+ /**
548
+ * @typedef CnReferenceNumber
549
+ * @property {string} [cn_reference_number] - The unique reference number of the
550
+ * credit note.
551
+ */
552
+
553
+ /**
554
+ * @typedef GetPdfUrlViewReq
555
+ * @property {CnReferenceNumber} [data]
556
+ */
557
+
558
+ /**
559
+ * @typedef GetPdfUrlViewResponseData
560
+ * @property {string} [s3_pdf_link] - The URL link where credit nore pdf stored
561
+ * to view and download.
562
+ * @property {string} [cn_reference_number] - The unique reference number of the
563
+ * credit note.
564
+ */
565
+
566
+ /**
567
+ * @typedef GetPdfUrlViewResponse
568
+ * @property {boolean} [success] - Indicates if the retrieval of the pdf URL was
569
+ * successful.
570
+ * @property {GetPdfUrlViewResponseData} [data]
571
+ */
572
+
573
+ /**
574
+ * @typedef CreditNoteDetailsReq
575
+ * @property {CnReferenceNumber} [data]
576
+ */
577
+
578
+ /**
579
+ * @typedef CnDetails
580
+ * @property {string} [staff_id] - ID of the staff member associated with the credit note.
581
+ * @property {string} [expiry_date] - Expiry date of the credit note.
582
+ * @property {string} [channel_of_issuance] - Channel through which the credit
583
+ * note was issued.
584
+ * @property {string} [order_id] - Order ID of order for which credit note created.
585
+ * @property {string} [date_issued] - Date when the credit note was issued.
586
+ * @property {string} [ordering_channel] - Ordering channel associated with the
587
+ * credit note.
588
+ * @property {string} [shipment_id] - Shipment Id associated with the credit note.
589
+ * @property {string} [store_id] - Store Id associated with the credit note.
590
+ * @property {string} [invoice_number] - Invoice number associated with the credit note.
591
+ */
592
+
593
+ /**
594
+ * @typedef RedemptionDetails
595
+ * @property {Object} [meta] - Additional metadata related to the redemption details.
596
+ * @property {string} [staff_id] - ID of the staff member who processed the redemption.
597
+ * @property {string} [created_at] - Date and time when the redemption was processed.
598
+ * @property {string} [order_id] - Order Id of the order associated with the redemption.
599
+ * @property {string} [store_id] - Store Id of the order associated with the redemption.
600
+ * @property {string} [shipment_id] - Shipment Id of the order associated with
601
+ * the redemption.
602
+ * @property {string} [ordering_channel] - Ordering channel associated with the
603
+ * redemption.
604
+ * @property {number} [amount_debited] - Amount debited from the credit note
605
+ * during redemption.
606
+ * @property {string} [invoice_number] - Invoice number associated with the redemption.
607
+ */
608
+
609
+ /**
610
+ * @typedef CreditNoteDetails
611
+ * @property {string} [currency] - Currency in which the credit note is issued.
612
+ * @property {number} [current_amount_used] - Current amount used from the credit note.
613
+ * @property {string} [cn_status] - Status of the credit note.
614
+ * @property {string} [customer_mobile_number] - Mobile number of the customer
615
+ * associated with the credit note.
616
+ * @property {string} [cn_reference_number] - Unique Credit number of the credit note.
617
+ * @property {CnDetails} [cn_details]
618
+ * @property {RedemptionDetails[]} [redemption_details] - List of redemption
619
+ * details associated with the credit note.
620
+ * @property {number} [remaining_cn_amount] - Remaining amount left in the credit note.
621
+ * @property {number} [available_cn_balance] - Available balance in the credit note.
622
+ * @property {number} [cn_amount] - Total amount of the credit note.
623
+ */
624
+
625
+ /**
626
+ * @typedef CreditNoteDetailsResponse
627
+ * @property {boolean} [success] - Indicates if the retrieval of credit note
628
+ * details was successful.
629
+ * @property {CreditNoteDetails} [data]
630
+ */
631
+
632
+ /**
633
+ * @typedef GetCustomerCreditBalance
634
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
635
+ * application as affiliate_id associated with the seller.
636
+ * @property {number} [seller_id] - Unique identifier for the seller.
637
+ * @property {string} [customer_mobile_number] - Mobile number of the customer
638
+ * for whom the credit balance is requested.
639
+ */
640
+
641
+ /**
642
+ * @typedef GetCustomerCreditBalanceReq
643
+ * @property {GetCustomerCreditBalance} [data]
644
+ */
645
+
646
+ /**
647
+ * @typedef GetCustomerCreditBalanceResponseData
648
+ * @property {string} [customer_mobile_number] - Mobile number of the customer.
649
+ * @property {number} [total_credited_balance] - Total credited balance
650
+ * available for the customer.
651
+ */
652
+
653
+ /**
654
+ * @typedef GetCustomerCreditBalanceResponse
655
+ * @property {boolean} [success] - Indicates if the retrieval of customer credit
656
+ * balance was successful.
657
+ * @property {GetCustomerCreditBalanceResponseData} [data]
658
+ */
659
+
660
+ /**
661
+ * @typedef GetCnConfigReq
662
+ * @property {DeleteConfig} [data]
663
+ */
664
+
665
+ /**
666
+ * @typedef GetCnConfigResponseMeta
667
+ * @property {string} [reason] - Reason associated with the configuration response.
668
+ * @property {string[]} [source_channel] - List of source channels associated
669
+ * with the credit note configuration.
670
+ */
671
+
672
+ /**
673
+ * @typedef GetCnConfigResponseData
674
+ * @property {boolean} [is_cn_as_refund_method] - Indicates if the credit note
675
+ * is configured as a refund method.
676
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
677
+ * application as affiliate_id associated with the seller.
678
+ * @property {Object} [meta]
679
+ * @property {number} [seller_id] - Unique identifier for the seller.
680
+ * @property {CreditNoteConfigNotificationEvents} [notification_events]
681
+ * @property {number} [validity] - Validity period of the credit note
682
+ * configuration in days.
683
+ * @property {string[]} [redemption_ordering_channel] - List of ordering
684
+ * channels associated with credit note redemption.
685
+ * @property {string} [currency_type] - Type of currency used for the credit note.
686
+ */
687
+
688
+ /**
689
+ * @typedef GetCnConfigResponse
690
+ * @property {boolean} [success] - Indicates if the retrieval of credit note
691
+ * configuration was successful.
692
+ * @property {GetCnConfigResponseData} [data]
693
+ */
694
+
695
+ /**
696
+ * @typedef CnGenerateReportFilters
697
+ * @property {string[]} [staff_id] - Array of staff IDs for filtering credit note reports.
698
+ * @property {string[]} [channel_of_issuance] - Array of channels through which
699
+ * credit notes were issued.
700
+ * @property {string[]} [utilisation] - Array of utilisation types for filtering
701
+ * credit note reports.
702
+ * @property {string[]} [ordering_channel] - Array of ordering channels
703
+ * associated with credit note reports.
704
+ * @property {number[]} [store_id] - Array of store IDs for filtering credit note reports.
705
+ * @property {string[]} [type_of_transaction] - Array of transaction types for
706
+ * filtering credit note reports.
707
+ * @property {string[]} [issuance_channel] - Array of issuance channels for
708
+ * filtering credit note reports.
709
+ */
710
+
711
+ /**
712
+ * @typedef CnGenerateReport
713
+ * @property {number} [page] - Page number of the credit note report.
714
+ * @property {string} [end_date] - End date for filtering credit note data.
715
+ * @property {number} [page_size] - Number of items per page in the credit note report.
716
+ * @property {CnGenerateReportFilters} [filters]
717
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
718
+ * application as affiliate_id associated with the seller.
719
+ * @property {GenerateReportFilters} [meta]
720
+ * @property {string} [search] - Search query to filter credit note data by keyword.
721
+ * @property {string} [report_id] - Unique identifier for the credit note report.
722
+ * @property {string} [search_type] - Type of search criteria used for filtering
723
+ * credit note data.
724
+ * @property {string} [start_date] - Start date for filtering credit note data.
725
+ */
726
+
727
+ /**
728
+ * @typedef GenerateReportCustomerCnReq
729
+ * @property {CnGenerateReport} [data]
730
+ */
731
+
732
+ /**
733
+ * @typedef CnGenerateReportItems
734
+ * @property {string} [expiry_date] - Expiry date of the credit note item.
735
+ * @property {string} [status] - Status of the credit note item.
736
+ * @property {number} [total_amount] - Total amount of the credit note item.
737
+ * @property {string} [order_id] - Order ID of the order associated with the
738
+ * credit note item.
739
+ * @property {string} [date_issued] - Date when the credit note item was issued.
740
+ * @property {string} [shipment_id] - Shipment ID of the order associated with
741
+ * the credit note item.
742
+ * @property {string} [invoice_number] - Invoice number associated with the
743
+ * credit note item.
744
+ * @property {string} [credit_note_number] - Unique number of the credit note item.
745
+ */
746
+
747
+ /**
748
+ * @typedef GenerateReportCustomerCnResponseData
749
+ * @property {boolean} [success] - Indicates if the credit note report
750
+ * generation was successful.
751
+ * @property {string} [message] - Additional message or information related to
752
+ * the credit note report.
753
+ * @property {CnGenerateReportItems[]} [items] - List of credit note items in the report.
754
+ * @property {Object} [row_header_display_order] - Display order for row headers
755
+ * in the report.
756
+ * @property {string} [end_date] - End date used in the credit note report.
757
+ * @property {Page} [page]
758
+ * @property {string[]} [headers] - Headers included in the credit note report.
759
+ * @property {string[]} [primary_headers] - Primary headers used in the credit
760
+ * note report.
761
+ * @property {string[]} [allowed_filters] - Allowed filters for the credit note report.
762
+ * @property {string} [start_date] - Start date used in the credit note report.
763
+ * @property {number} [item_count] - Total count of credit note items in the report.
764
+ */
765
+
766
+ /**
767
+ * @typedef GenerateReportCustomerCnResponse
768
+ * @property {GenerateReportCustomerCnResponseData} [data]
769
+ */
770
+
771
+ /**
772
+ * @typedef CnDownloadReport
773
+ * @property {number} [page] - Page number of the download report.
774
+ * @property {string} [start_date] - Start date for filtering credit note data
775
+ * in the report.
776
+ * @property {string} [end_date] - End date for filtering credit note data in the report.
777
+ * @property {string} [affiliate_id] - The unique identifier of sale channels or
778
+ * application as affiliate_id associated with the seller.
779
+ * @property {string} [search] - Search query to filter credit note data by keyword.
780
+ * @property {string} [status] - Status of the credit note data in the report.
781
+ * @property {string} [search_type] - Type of search criteria used for filtering
782
+ * credit note data.
783
+ * @property {number} [page_size] - Number of items per page in the download report.
784
+ */
785
+
786
+ /**
787
+ * @typedef DownloadReportCustomerCnReq
788
+ * @property {CnDownloadReport} [data]
789
+ */
790
+
791
+ /**
792
+ * @typedef DownloadReportResponseData
793
+ * @property {string} [report_config_id] - Unique identifier for the report configuration.
794
+ * @property {string} [full_name] - Full name associated with the report request.
795
+ * @property {string} [requested_by] - User who requested the report.
796
+ * @property {string} [start_date] - Start date used in the report.
797
+ * @property {string} [end_date] - End date used in the report.
798
+ * @property {Object} [request_dict] - Dictionary containing request parameters
799
+ * for the report.
800
+ * @property {string} [download_link] - Download link for accessing the generated report.
801
+ * @property {string} [created_at] - Date and time when the report was created.
802
+ * @property {Object} [meta] - Additional metadata associated with the report.
803
+ * @property {string} [msg] - Message related to the report status or generation.
804
+ * @property {string} [report_name] - Name of the generated report.
805
+ * @property {string} [status] - Status of the report.
806
+ * @property {string} [display_name] - Display name of the report.
807
+ * @property {Object} [filters] - Filters applied to generate the report.
808
+ */
809
+
810
+ /**
811
+ * @typedef DownloadReportCustomerCnResponse
812
+ * @property {DownloadReportResponseData[]} [items] - List of download report data items.
813
+ * @property {number} [item_count] - Total count of items in the download report.
814
+ * @property {Page} [page]
815
+ */
816
+
817
+ /**
818
+ * @typedef GetReportingFilters
819
+ * @property {string} [text] - Display text for the filter.
820
+ * @property {string} [type] - Type of the fields like seach, filter(e.g.,
821
+ * single, multi select).
822
+ * @property {Object[]} [options] - Options available for the filter.
823
+ * @property {string} [value] - Value to be pass in response select from options.
824
+ */
825
+
826
+ /**
827
+ * @typedef GetReportingNestedFilters
828
+ * @property {string} [text] - Display text for the nested filter.
829
+ * @property {Object[]} [options] - Options available for the nested filter.
830
+ * @property {boolean} [required] - Indicates if the nested filter is required.
831
+ * @property {string} [placeholder_text] - Placeholder text for the nested filter.
832
+ * @property {string} [type] - Type of the nested filter (e.g., single, multi select).
833
+ * @property {string} [value] - Value to be pass in response select from options.
834
+ */
835
+
836
+ /**
837
+ * @typedef GetReportingFiltersReasonOptions
838
+ * @property {string} [text] - Display text for the reason option.
839
+ * @property {string} [value] - Value of the reason option.
840
+ * @property {string} [placeholder_text] - Placeholder text for the reason option.
841
+ */
842
+
843
+ /**
844
+ * @typedef GetReportingFiltersReason
845
+ * @property {string} [text] - Display text for the reason.
846
+ * @property {string} [type] - Type of the reason.
847
+ * @property {string} [value] - Value to be pass in response.
848
+ * @property {GetReportingFiltersReasonOptions[]} [options] - Options available
849
+ * for the reasons select from options.
850
+ */
851
+
852
+ /**
853
+ * @typedef GetReportingFiltersResponse
854
+ * @property {GetReportingFiltersReason} [reason]
855
+ * @property {GetReportingFilters} [search]
856
+ * @property {GetReportingNestedFilters[]} [filters] - Array of nested filter objects.
857
+ * @property {GetReportingFilters} [status]
858
+ */
859
+
860
+ /**
861
+ * @typedef InvoicePaymentOptionsPayloadData
862
+ * @property {string[]} [invoice_numbers] - List of invoice numbers for which
863
+ * payment options are being requested.
864
+ */
865
+
866
+ /**
867
+ * @typedef InvoicePaymentOptionsReq
868
+ * @property {InvoicePaymentOptionsPayloadData} [data]
869
+ */
870
+
871
+ /**
872
+ * @typedef InvoicePaymentOptionsResponsePayableAmounts
873
+ * @property {number} [amount] - Amount that is payable for the invoice.
874
+ * @property {string} [amount_key] - Key associated with the payable amount for
875
+ * identification.
876
+ * @property {string} [header] - Header describing the payable amount.
877
+ */
878
+
879
+ /**
880
+ * @typedef InvoicePaymentOptionsResponseDeductedAmounts
881
+ * @property {number} [amount] - Amount deducted from the invoice.
882
+ * @property {string} [header] - Header describing the deducted amount.
883
+ * @property {string} [amount_key] - Key associated with the deducted amount for
884
+ * identification.
885
+ * @property {boolean} [is_payable] - Indicates whether the deducted amount is payable.
886
+ * @property {string} [symbol] - Currency symbol associated with the deducted amount.
887
+ */
888
+
889
+ /**
890
+ * @typedef InvoicePaymentOptionsResponseData
891
+ * @property {string} [invoice_number] - Invoice number for which payment
892
+ * options are provided.
893
+ * @property {string} [invoice_type] - Type of the invoice (e.g., 'Seller Fynd',
894
+ * 'Platform Subscription').
895
+ * @property {InvoicePaymentOptionsResponsePayableAmounts[]} [display_amounts]
896
+ * - List of amounts that are payable for the invoice.
897
+ *
898
+ * @property {Object} [total_amount] - Total amount for the invoice.
899
+ * @property {Object} [deducted_amounts] - Amounts deducted from the total,
900
+ * including any associated details.
901
+ * @property {InvoicePaymentOptionsResponsePayableAmounts[]} [payable_amounts]
902
+ * - Amounts that are payable for the invoice.
903
+ *
904
+ * @property {Currency} [currency]
905
+ */
906
+
907
+ /**
908
+ * @typedef InvoicePaymentOptionsResponse
909
+ * @property {string} [reason] - Reason for the response or any errors encountered.
910
+ * @property {InvoicePaymentOptionsResponseData[]} [data] - List of data objects
911
+ * containing details about invoice payment options.
912
+ * @property {number} [total_payable_amount] - Total amount payable for the invoices.
913
+ * @property {number} [invoice_count] - Number of invoices included in the response.
914
+ * @property {boolean} [success] - Indicates whether the request to retrieve
915
+ * invoice payment options was successful.
916
+ */
917
+
918
+ /**
919
+ * @typedef PaymentDetail
920
+ * @property {string} [display_name] - Name or label displayed for the payment detail.
921
+ * @property {string} [value] - Value associated with the payment detail (e.g.,
922
+ * amount, transaction ID).
923
+ */
924
+
925
+ /**
926
+ * @typedef PaidInvoicePaymentDetail
927
+ * @property {PaymentDetail[]} [payment_details] - List of payment details for
928
+ * the invoice.
929
+ * @property {string} [date_of_payment] - Date when the payment was made.
930
+ * @property {number} [amount] - Amount paid towards the invoice.
931
+ */
932
+
933
+ /**
934
+ * @typedef InvoicePaymentDetailsResponseData
935
+ * @property {PaidInvoicePaymentDetail[]} [paid_invoice_payment_details] - List
936
+ * of details for paid invoices.
937
+ * @property {Object[]} [failed_attempts_details] - Details of any failed
938
+ * payment attempts for the invoices.
939
+ */
940
+
941
+ /**
942
+ * @typedef InvoicePaymentDetailsResponse
943
+ * @property {string} [reason] - Reason for the response or any errors encountered.
944
+ * @property {InvoicePaymentDetailsResponseData} [data]
945
+ * @property {boolean} [success] - Indicates whether the request to retrieve
946
+ * invoice payment details was successful.
947
+ * @property {boolean} [payment_details_visible] - Indicates whether payment
948
+ * details are visible or hidden in the response.
949
+ */
950
+
951
+ /**
952
+ * @typedef InvoiceActivityLogsResponseData
953
+ * @property {string} [performed_by] - Identifier of the user or system that
954
+ * performed the activity.
955
+ * @property {string} [status] - Status of the activity (e.g., 'Completed', 'Pending').
956
+ * @property {string} [reason] - Reason for the activity status or any related notes.
957
+ * @property {boolean} [is_resolved] - Indicates whether the activity issue is resolved.
958
+ * @property {number} [retry_attempts] - Number of retry attempts made for the activity.
959
+ * @property {number} [max_retry_attempts] - Maximum number of retry attempts
960
+ * allowed for the activity.
961
+ */
962
+
963
+ /**
964
+ * @typedef InvoiceActivityLogsResponse
965
+ * @property {InvoiceActivityLogsResponseData[]} [data] - List of activity logs
966
+ * related to invoices.
967
+ */
968
+
969
+ /**
970
+ * @typedef InvoiceActivityLogError
971
+ * @property {string} [reason] - Reason for the error or issue encountered with
972
+ * the invoice activity logs.
973
+ */
974
+
975
+ /**
976
+ * @typedef UnlockCreditNoteRequestData
977
+ * @property {string} [seller_id] - The unique identifier for the seller.
978
+ * @property {string[]} [locked_credit_notes] - A list of credit notes that are locked.
979
+ * @property {string} [unlock_reason] - The reason for unlocking the credit notes.
980
+ * @property {string} [description] - Additional details or comments about the
981
+ * unlock request.
982
+ */
983
+
984
+ /**
985
+ * @typedef UnlockCreditNoteReq
986
+ * @property {UnlockCreditNoteRequestData} [data]
987
+ */
988
+
989
+ /**
990
+ * @typedef UnlockCreditNoteResponseData
991
+ * @property {boolean} [is_cn_unlocked] - Indicates whether the credit note is unlocked.
992
+ * @property {string} [status] - The current status of the each credit notes.
993
+ */
994
+
995
+ /**
996
+ * @typedef UnlockCreditNoteResponse
997
+ * @property {boolean} [success] - Indicates whether the credit note unlock
998
+ * request was successful.
999
+ * @property {UnlockCreditNoteResponseData} [data]
1000
+ */
1001
+
1002
+ class FinancePlatformModel {
1003
+ /** @returns {OrederFreezeResponse} */
1004
+ static OrederFreezeResponse() {
1005
+ return Joi.object({
1006
+ success: Joi.boolean(),
1007
+ oms_freeze: Joi.boolean(),
1008
+ source: Joi.string().allow("").allow(null),
1009
+ });
1010
+ }
1011
+
1012
+ /** @returns {GenerateReportMeta} */
1013
+ static GenerateReportMeta() {
1014
+ return Joi.object({
1015
+ brand: Joi.string().allow(""),
1016
+ company: Joi.string().allow(""),
1017
+ channel: Joi.string().allow(""),
1018
+ });
1019
+ }
1020
+
1021
+ /** @returns {GenerateReportFilters} */
1022
+ static GenerateReportFilters() {
1023
+ return Joi.object({
1024
+ brand: Joi.array().items(Joi.string().allow("")),
1025
+ company: Joi.array().items(Joi.string().allow("")),
1026
+ channel: Joi.array().items(Joi.string().allow("")),
1027
+ });
1028
+ }
1029
+
1030
+ /** @returns {GenerateReportPlatform} */
1031
+ static GenerateReportPlatform() {
1032
+ return Joi.object({
1033
+ start_date: Joi.string().allow(""),
1034
+ end_date: Joi.string().allow(""),
1035
+ meta: FinancePlatformModel.GenerateReportMeta(),
1036
+ report_id: Joi.string().allow(""),
1037
+ filters: FinancePlatformModel.GenerateReportFilters(),
1038
+ });
1039
+ }
1040
+
1041
+ /** @returns {GenerateReportReq} */
1042
+ static GenerateReportReq() {
1043
+ return Joi.object({
1044
+ data: FinancePlatformModel.GenerateReportPlatform(),
1045
+ });
1046
+ }
1047
+
1048
+ /** @returns {Page} */
1049
+ static Page() {
1050
+ return Joi.object({
1051
+ item_total: Joi.number(),
1052
+ next_id: Joi.string().allow(""),
1053
+ has_previous: Joi.boolean(),
1054
+ has_next: Joi.boolean(),
1055
+ current: Joi.number(),
1056
+ type: Joi.string().allow("").required(),
1057
+ size: Joi.number(),
1058
+ });
1059
+ }
1060
+
1061
+ /** @returns {Currency} */
1062
+ static Currency() {
1063
+ return Joi.object({
1064
+ code: Joi.string().allow(""),
1065
+ symbol: Joi.string().allow(""),
1066
+ name: Joi.string().allow(""),
1067
+ }).allow(null);
1068
+ }
1069
+
1070
+ /** @returns {GenerateReportJson} */
1071
+ static GenerateReportJson() {
1072
+ return Joi.object({
1073
+ data: Joi.any(),
1074
+ item_count: Joi.number(),
1075
+ page: FinancePlatformModel.Page(),
1076
+ end_date: Joi.string().allow(""),
1077
+ start_date: Joi.string().allow(""),
1078
+ items: Joi.array().items(Joi.array().items(Joi.string().allow(""))),
1079
+ headers: Joi.array().items(Joi.string().allow("")),
1080
+ });
1081
+ }
1082
+
1083
+ /** @returns {Error} */
1084
+ static Error() {
1085
+ return Joi.object({
1086
+ status: Joi.number(),
1087
+ reason: Joi.string().allow(""),
1088
+ success: Joi.boolean(),
1089
+ message: Joi.string().allow(""),
1090
+ code: Joi.string().allow("").allow(null),
1091
+ exception: Joi.string().allow(""),
1092
+ info: Joi.string().allow("").allow(null),
1093
+ request_id: Joi.string().allow("").allow(null),
1094
+ stack_trace: Joi.string().allow("").allow(null),
1095
+ meta: FinancePlatformModel.ErrorMeta(),
1096
+ });
1097
+ }
1098
+
1099
+ /** @returns {ErrorMeta} */
1100
+ static ErrorMeta() {
1101
+ return Joi.object({
1102
+ columns_errors: Joi.array().items(FinancePlatformModel.ErrorMetaItems()),
1103
+ });
1104
+ }
1105
+
1106
+ /** @returns {ErrorMetaItems} */
1107
+ static ErrorMetaItems() {
1108
+ return Joi.object({
1109
+ code: Joi.number().allow(null),
1110
+ message: Joi.string().allow("").allow(null),
1111
+ });
1112
+ }
1113
+
1114
+ /** @returns {DownloadReport} */
1115
+ static DownloadReport() {
1116
+ return Joi.object({
1117
+ data: FinancePlatformModel.DownloadReportData(),
1118
+ });
1119
+ }
1120
+
1121
+ /** @returns {DownloadReportData} */
1122
+ static DownloadReportData() {
1123
+ return Joi.object({
1124
+ page: Joi.number(),
1125
+ page_size: Joi.number(),
1126
+ start_date: Joi.string().allow(""),
1127
+ end_date: Joi.string().allow(""),
1128
+ });
1129
+ }
1130
+
1131
+ /** @returns {DownloadReportItems} */
1132
+ static DownloadReportItems() {
1133
+ return Joi.object({
1134
+ start_date: Joi.string().allow(""),
1135
+ end_date: Joi.string().allow(""),
1136
+ meta: FinancePlatformModel.GenerateReportMeta(),
1137
+ report_id: Joi.string().allow(""),
1138
+ filters: FinancePlatformModel.GenerateReportFilters(),
1139
+ });
1140
+ }
1141
+
1142
+ /** @returns {DownloadReportList} */
1143
+ static DownloadReportList() {
1144
+ return Joi.object({
1145
+ items: Joi.array().items(FinancePlatformModel.DownloadReportItems()),
1146
+ page: FinancePlatformModel.Page(),
1147
+ item_count: Joi.number(),
1148
+ });
1149
+ }
1150
+
1151
+ /** @returns {GetEngineFilters} */
1152
+ static GetEngineFilters() {
1153
+ return Joi.object({
1154
+ config_field: Joi.string().allow(""),
1155
+ status: Joi.string().allow(""),
1156
+ is_active: Joi.boolean(),
1157
+ seller_id: Joi.string().allow(""),
1158
+ });
1159
+ }
1160
+
1161
+ /** @returns {GetEngineData} */
1162
+ static GetEngineData() {
1163
+ return Joi.object({
1164
+ status: Joi.string().allow(""),
1165
+ filters: FinancePlatformModel.GetEngineFilters(),
1166
+ project: Joi.array().items(Joi.string().allow("")),
1167
+ table_name: Joi.string().allow(""),
1168
+ search: Joi.any(),
1169
+ page: Joi.number(),
1170
+ page_size: Joi.number(),
1171
+ order_by: Joi.string().allow(""),
1172
+ });
1173
+ }
1174
+
1175
+ /** @returns {GetEngineReq} */
1176
+ static GetEngineReq() {
1177
+ return Joi.object({
1178
+ data: FinancePlatformModel.GetEngineData(),
1179
+ });
1180
+ }
1181
+
1182
+ /** @returns {GetEngineResponse} */
1183
+ static GetEngineResponse() {
1184
+ return Joi.object({
1185
+ success: Joi.boolean(),
1186
+ items: Joi.array().items(Joi.any()),
1187
+ page: FinancePlatformModel.Page(),
1188
+ item_count: Joi.number(),
1189
+ });
1190
+ }
1191
+
1192
+ /** @returns {GetReason} */
1193
+ static GetReason() {
1194
+ return Joi.object({
1195
+ reason_type: Joi.string().allow(""),
1196
+ });
1197
+ }
1198
+
1199
+ /** @returns {GetReasonReq} */
1200
+ static GetReasonReq() {
1201
+ return Joi.object({
1202
+ data: FinancePlatformModel.GetReason(),
1203
+ });
1204
+ }
1205
+
1206
+ /** @returns {ReasonItem} */
1207
+ static ReasonItem() {
1208
+ return Joi.object({
1209
+ id: Joi.string().allow(""),
1210
+ name: Joi.string().allow(""),
1211
+ display_name: Joi.string().allow(""),
1212
+ });
1213
+ }
1214
+
1215
+ /** @returns {GetReasonResponse} */
1216
+ static GetReasonResponse() {
1217
+ return Joi.object({
1218
+ success: Joi.boolean(),
1219
+ item_list: Joi.array().items(FinancePlatformModel.ReasonItem()),
1220
+ item_count: Joi.number(),
1221
+ page: FinancePlatformModel.Page(),
1222
+ });
1223
+ }
1224
+
1225
+ /** @returns {GetReportListData} */
1226
+ static GetReportListData() {
1227
+ return Joi.object({
1228
+ role_name: Joi.string().allow(""),
1229
+ listing_enabled: Joi.boolean(),
1230
+ });
1231
+ }
1232
+
1233
+ /** @returns {GetReportListReq} */
1234
+ static GetReportListReq() {
1235
+ return Joi.object({
1236
+ data: FinancePlatformModel.GetReportListData(),
1237
+ });
1238
+ }
1239
+
1240
+ /** @returns {GetReportListResponse} */
1241
+ static GetReportListResponse() {
1242
+ return Joi.object({
1243
+ success: Joi.boolean(),
1244
+ items: Joi.array().items(FinancePlatformModel.ReportItem()),
1245
+ page: FinancePlatformModel.Page(),
1246
+ total_count: Joi.number(),
1247
+ });
1248
+ }
1249
+
1250
+ /** @returns {ReportItem} */
1251
+ static ReportItem() {
1252
+ return Joi.object({
1253
+ id: Joi.string().allow(""),
1254
+ name: Joi.string().allow(""),
1255
+ description: Joi.string().allow(""),
1256
+ allowed_filters: Joi.array().items(Joi.string().allow("")),
1257
+ config_meta: Joi.any(),
1258
+ report_type: Joi.string().allow(""),
1259
+ display_date: Joi.string().allow("").allow(null),
1260
+ });
1261
+ }
1262
+
1263
+ /** @returns {GetAffiliate} */
1264
+ static GetAffiliate() {
1265
+ return Joi.object({
1266
+ company_id: Joi.number(),
1267
+ });
1268
+ }
1269
+
1270
+ /** @returns {GetAffiliateResponse} */
1271
+ static GetAffiliateResponse() {
1272
+ return Joi.object({
1273
+ reason: Joi.string().allow(""),
1274
+ success: Joi.boolean(),
1275
+ docs: Joi.array().items(Joi.any()),
1276
+ });
1277
+ }
1278
+
1279
+ /** @returns {DownloadCreditDebitNote} */
1280
+ static DownloadCreditDebitNote() {
1281
+ return Joi.object({
1282
+ note_id: Joi.array().items(Joi.string().allow("")),
1283
+ });
1284
+ }
1285
+
1286
+ /** @returns {DownloadCreditDebitNoteReq} */
1287
+ static DownloadCreditDebitNoteReq() {
1288
+ return Joi.object({
1289
+ data: FinancePlatformModel.DownloadCreditDebitNote(),
1290
+ });
1291
+ }
1292
+
1293
+ /** @returns {DownloadCreditDebitNoteResponseData} */
1294
+ static DownloadCreditDebitNoteResponseData() {
1295
+ return Joi.object({
1296
+ id: Joi.string().allow(""),
1297
+ pdf_s3_url: Joi.string().allow(""),
1298
+ });
1299
+ }
1300
+
1301
+ /** @returns {DownloadCreditDebitNoteResponse} */
1302
+ static DownloadCreditDebitNoteResponse() {
1303
+ return Joi.object({
1304
+ success: Joi.boolean(),
1305
+ data: Joi.array().items(
1306
+ FinancePlatformModel.DownloadCreditDebitNoteResponseData()
1307
+ ),
1308
+ });
1309
+ }
1310
+
1311
+ /** @returns {InvoiceBillingItem} */
1312
+ static InvoiceBillingItem() {
1313
+ return Joi.object({
1314
+ invoice_number: Joi.string().allow(""),
1315
+ amount: Joi.number(),
1316
+ });
1317
+ }
1318
+
1319
+ /** @returns {PaymentProcessPayload} */
1320
+ static PaymentProcessPayload() {
1321
+ return Joi.object({
1322
+ platform: Joi.string().allow(""),
1323
+ amount: Joi.number(),
1324
+ transaction_type: Joi.string().allow(""),
1325
+ source_reference: Joi.string().allow(""),
1326
+ total_amount: Joi.number(),
1327
+ meta: Joi.any(),
1328
+ currency: Joi.string().allow(""),
1329
+ seller_id: Joi.string().allow(""),
1330
+ mode_of_payment: Joi.string().allow(""),
1331
+ invoice_billing_items: Joi.array().items(
1332
+ FinancePlatformModel.InvoiceBillingItem()
1333
+ ),
1334
+ });
1335
+ }
1336
+
1337
+ /** @returns {PaymentProcessReq} */
1338
+ static PaymentProcessReq() {
1339
+ return Joi.object({
1340
+ data: FinancePlatformModel.PaymentProcessPayload(),
1341
+ });
1342
+ }
1343
+
1344
+ /** @returns {PaymentProcessResponse} */
1345
+ static PaymentProcessResponse() {
1346
+ return Joi.object({
1347
+ code: Joi.number(),
1348
+ message: Joi.string().allow(""),
1349
+ meta: Joi.any(),
1350
+ transaction_id: Joi.string().allow(""),
1351
+ redirect_url: Joi.string().allow(""),
1352
+ });
1353
+ }
1354
+
1355
+ /** @returns {CreditlineDataPlatformPayload} */
1356
+ static CreditlineDataPlatformPayload() {
1357
+ return Joi.object({
1358
+ page: Joi.number(),
1359
+ seller_id: Joi.string().allow(""),
1360
+ end_date: Joi.string().allow(""),
1361
+ start_date: Joi.string().allow(""),
1362
+ page_size: Joi.number(),
1363
+ });
1364
+ }
1365
+
1366
+ /** @returns {CreditlineDataPlatformReq} */
1367
+ static CreditlineDataPlatformReq() {
1368
+ return Joi.object({
1369
+ data: FinancePlatformModel.CreditlineDataPlatformPayload(),
1370
+ });
1371
+ }
1372
+
1373
+ /** @returns {CreditlineDataPlatformResponse} */
1374
+ static CreditlineDataPlatformResponse() {
1375
+ return Joi.object({
1376
+ items: Joi.array().items(Joi.any()),
1377
+ code: Joi.number(),
1378
+ show_mr: Joi.boolean(),
1379
+ page: FinancePlatformModel.Page(),
1380
+ message: Joi.string().allow(""),
1381
+ headers: Joi.array().items(Joi.string().allow("")),
1382
+ item_count: Joi.number(),
1383
+ });
1384
+ }
1385
+
1386
+ /** @returns {IsCreditlinePayload} */
1387
+ static IsCreditlinePayload() {
1388
+ return Joi.object({
1389
+ seller_id: Joi.string().allow(""),
1390
+ });
1391
+ }
1392
+
1393
+ /** @returns {IsCreditlinePlatformReq} */
1394
+ static IsCreditlinePlatformReq() {
1395
+ return Joi.object({
1396
+ data: FinancePlatformModel.IsCreditlinePayload(),
1397
+ });
1398
+ }
1399
+
1400
+ /** @returns {IsCreditlinePlatformResponse} */
1401
+ static IsCreditlinePlatformResponse() {
1402
+ return Joi.object({
1403
+ is_creditline_opted: Joi.boolean(),
1404
+ code: Joi.number(),
1405
+ });
1406
+ }
1407
+
1408
+ /** @returns {InvoiceTypePayloadData} */
1409
+ static InvoiceTypePayloadData() {
1410
+ return Joi.object({
1411
+ is_active: Joi.boolean(),
1412
+ });
1413
+ }
1414
+
1415
+ /** @returns {InvoiceTypeReq} */
1416
+ static InvoiceTypeReq() {
1417
+ return Joi.object({
1418
+ data: FinancePlatformModel.InvoiceTypePayloadData(),
1419
+ });
1420
+ }
1421
+
1422
+ /** @returns {InvoiceTypeResponseItems} */
1423
+ static InvoiceTypeResponseItems() {
1424
+ return Joi.object({
1425
+ text: Joi.string().allow(""),
1426
+ value: Joi.string().allow(""),
1427
+ });
1428
+ }
1429
+
1430
+ /** @returns {InvoiceTypeResponse} */
1431
+ static InvoiceTypeResponse() {
1432
+ return Joi.object({
1433
+ success: Joi.boolean(),
1434
+ invoice_type_list: Joi.array().items(
1435
+ FinancePlatformModel.InvoiceTypeResponseItems()
1436
+ ),
1437
+ payment_status_list: Joi.array().items(
1438
+ FinancePlatformModel.InvoiceTypeResponseItems()
1439
+ ),
1440
+ });
1441
+ }
1442
+
1443
+ /** @returns {InoviceListingPayloadDataFilters} */
1444
+ static InoviceListingPayloadDataFilters() {
1445
+ return Joi.object({
1446
+ payment_status: Joi.array().items(Joi.string().allow("")),
1447
+ invoice_type: Joi.array().items(Joi.string().allow("")),
1448
+ company_id: Joi.array().items(Joi.string().allow("")),
1449
+ });
1450
+ }
1451
+
1452
+ /** @returns {InvoiceListingPayloadData} */
1453
+ static InvoiceListingPayloadData() {
1454
+ return Joi.object({
1455
+ page_size: Joi.number(),
1456
+ page: Joi.number(),
1457
+ start_date: Joi.string().allow(""),
1458
+ end_date: Joi.string().allow(""),
1459
+ search: Joi.string().allow(""),
1460
+ filters: FinancePlatformModel.InoviceListingPayloadDataFilters(),
1461
+ });
1462
+ }
1463
+
1464
+ /** @returns {InvoiceListingReq} */
1465
+ static InvoiceListingReq() {
1466
+ return Joi.object({
1467
+ data: FinancePlatformModel.InvoiceListingPayloadData(),
1468
+ });
1469
+ }
1470
+
1471
+ /** @returns {UnpaidInvoiceDataItems} */
1472
+ static UnpaidInvoiceDataItems() {
1473
+ return Joi.object({
1474
+ total_unpaid_invoice_count: Joi.number(),
1475
+ currency: Joi.string().allow(""),
1476
+ total_unpaid_amount: Joi.number(),
1477
+ });
1478
+ }
1479
+
1480
+ /** @returns {InvoiceListingResponseItems} */
1481
+ static InvoiceListingResponseItems() {
1482
+ return Joi.object({
1483
+ amount: Joi.number(),
1484
+ company: Joi.string().allow(""),
1485
+ status: Joi.string().allow(""),
1486
+ due_date: Joi.string().allow(""),
1487
+ invoice_date: Joi.string().allow(""),
1488
+ invoice_type: Joi.string().allow(""),
1489
+ period: Joi.string().allow(""),
1490
+ invoice_number: Joi.string().allow(""),
1491
+ is_downloadable: Joi.boolean(),
1492
+ invoice_id: Joi.string().allow(""),
1493
+ currency: FinancePlatformModel.Currency(),
1494
+ });
1495
+ }
1496
+
1497
+ /** @returns {InvoiceListingResponse} */
1498
+ static InvoiceListingResponse() {
1499
+ return Joi.object({
1500
+ success: Joi.boolean(),
1501
+ headers: Joi.array().items(Joi.string().allow("")),
1502
+ unpaid_invoice_data: FinancePlatformModel.UnpaidInvoiceDataItems(),
1503
+ items: Joi.array().items(
1504
+ FinancePlatformModel.InvoiceListingResponseItems()
1505
+ ),
1506
+ page: FinancePlatformModel.Page(),
1507
+ item_count: Joi.number(),
1508
+ });
1509
+ }
1510
+
1511
+ /** @returns {InvoicePdfPayloadData} */
1512
+ static InvoicePdfPayloadData() {
1513
+ return Joi.object({
1514
+ invoice_number: Joi.array().items(Joi.string().allow("")),
1515
+ });
1516
+ }
1517
+
1518
+ /** @returns {InvoicePdfReq} */
1519
+ static InvoicePdfReq() {
1520
+ return Joi.object({
1521
+ data: FinancePlatformModel.InvoicePdfPayloadData(),
1522
+ });
1523
+ }
1524
+
1525
+ /** @returns {InvoicePdfResponse} */
1526
+ static InvoicePdfResponse() {
1527
+ return Joi.object({
1528
+ success: Joi.boolean(),
1529
+ data: Joi.array().items(Joi.string().allow("")),
1530
+ error: Joi.array().items(Joi.string().allow("")),
1531
+ });
1532
+ }
1533
+
1534
+ /** @returns {IsCnRefundMethodData} */
1535
+ static IsCnRefundMethodData() {
1536
+ return Joi.object({
1537
+ affiliate_id: Joi.string().allow(""),
1538
+ toggle_edit_required: Joi.boolean(),
1539
+ seller_id: Joi.number(),
1540
+ });
1541
+ }
1542
+
1543
+ /** @returns {IsCnRefundMethodReq} */
1544
+ static IsCnRefundMethodReq() {
1545
+ return Joi.object({
1546
+ data: FinancePlatformModel.IsCnRefundMethodData(),
1547
+ });
1548
+ }
1549
+
1550
+ /** @returns {IsCnRefundMethodResponseData} */
1551
+ static IsCnRefundMethodResponseData() {
1552
+ return Joi.object({
1553
+ is_first_time_user: Joi.boolean(),
1554
+ });
1555
+ }
1556
+
1557
+ /** @returns {IsCnRefundMethodResponse} */
1558
+ static IsCnRefundMethodResponse() {
1559
+ return Joi.object({
1560
+ success: Joi.boolean(),
1561
+ data: FinancePlatformModel.IsCnRefundMethodResponseData(),
1562
+ });
1563
+ }
1564
+
1565
+ /** @returns {CreditNoteConfigNotificationEvents} */
1566
+ static CreditNoteConfigNotificationEvents() {
1567
+ return Joi.object({
1568
+ expiration_reminder_to_customer: Joi.number(),
1569
+ });
1570
+ }
1571
+
1572
+ /** @returns {CreateSellerCreditNoteConfig} */
1573
+ static CreateSellerCreditNoteConfig() {
1574
+ return Joi.object({
1575
+ is_cn_as_refund_method: Joi.boolean(),
1576
+ affiliate_id: Joi.string().allow(""),
1577
+ source_channel: Joi.array().items(Joi.string().allow("")),
1578
+ seller_id: Joi.number(),
1579
+ notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(),
1580
+ sales_channel_name: Joi.string().allow(""),
1581
+ ordering_channel: Joi.array().items(Joi.string().allow("")),
1582
+ validity: Joi.number(),
1583
+ currency_type: Joi.string().allow(""),
1584
+ slug_values: Joi.array().items(Joi.string().allow("")),
1585
+ });
1586
+ }
1587
+
1588
+ /** @returns {CreateSellerCreditNoteConfigReq} */
1589
+ static CreateSellerCreditNoteConfigReq() {
1590
+ return Joi.object({
1591
+ data: FinancePlatformModel.CreateSellerCreditNoteConfig(),
1592
+ });
1593
+ }
1594
+
1595
+ /** @returns {CreateSellerCreditNoteConfigResponse} */
1596
+ static CreateSellerCreditNoteConfigResponse() {
1597
+ return Joi.object({
1598
+ success: Joi.boolean(),
1599
+ message: Joi.string().allow(""),
1600
+ });
1601
+ }
1602
+
1603
+ /** @returns {DeleteConfig} */
1604
+ static DeleteConfig() {
1605
+ return Joi.object({
1606
+ affiliate_id: Joi.string().allow(""),
1607
+ slug_values: Joi.array().items(Joi.string().allow("")),
1608
+ seller_id: Joi.number(),
1609
+ });
1610
+ }
1611
+
1612
+ /** @returns {DeleteConfigReq} */
1613
+ static DeleteConfigReq() {
1614
+ return Joi.object({
1615
+ data: FinancePlatformModel.DeleteConfig(),
1616
+ });
1617
+ }
1618
+
1619
+ /** @returns {DeleteConfigResponse} */
1620
+ static DeleteConfigResponse() {
1621
+ return Joi.object({
1622
+ success: Joi.boolean(),
1623
+ message: Joi.string().allow(""),
1624
+ });
1625
+ }
1626
+
1627
+ /** @returns {ChannelDisplayNameItems} */
1628
+ static ChannelDisplayNameItems() {
1629
+ return Joi.object({
1630
+ key: Joi.string().allow(""),
1631
+ value: Joi.string().allow(""),
1632
+ });
1633
+ }
1634
+
1635
+ /** @returns {ChannelDisplayNameResponse} */
1636
+ static ChannelDisplayNameResponse() {
1637
+ return Joi.object({
1638
+ success: Joi.boolean(),
1639
+ items: Joi.array().items(FinancePlatformModel.ChannelDisplayNameItems()),
1640
+ });
1641
+ }
1642
+
1643
+ /** @returns {CnReferenceNumber} */
1644
+ static CnReferenceNumber() {
1645
+ return Joi.object({
1646
+ cn_reference_number: Joi.string().allow(""),
1647
+ });
1648
+ }
1649
+
1650
+ /** @returns {GetPdfUrlViewReq} */
1651
+ static GetPdfUrlViewReq() {
1652
+ return Joi.object({
1653
+ data: FinancePlatformModel.CnReferenceNumber(),
1654
+ });
1655
+ }
1656
+
1657
+ /** @returns {GetPdfUrlViewResponseData} */
1658
+ static GetPdfUrlViewResponseData() {
1659
+ return Joi.object({
1660
+ s3_pdf_link: Joi.string().allow(""),
1661
+ cn_reference_number: Joi.string().allow(""),
1662
+ });
1663
+ }
1664
+
1665
+ /** @returns {GetPdfUrlViewResponse} */
1666
+ static GetPdfUrlViewResponse() {
1667
+ return Joi.object({
1668
+ success: Joi.boolean(),
1669
+ data: FinancePlatformModel.GetPdfUrlViewResponseData(),
1670
+ });
1671
+ }
1672
+
1673
+ /** @returns {CreditNoteDetailsReq} */
1674
+ static CreditNoteDetailsReq() {
1675
+ return Joi.object({
1676
+ data: FinancePlatformModel.CnReferenceNumber(),
1677
+ });
1678
+ }
1679
+
1680
+ /** @returns {CnDetails} */
1681
+ static CnDetails() {
1682
+ return Joi.object({
1683
+ staff_id: Joi.string().allow(""),
1684
+ expiry_date: Joi.string().allow(""),
1685
+ channel_of_issuance: Joi.string().allow(""),
1686
+ order_id: Joi.string().allow(""),
1687
+ date_issued: Joi.string().allow(""),
1688
+ ordering_channel: Joi.string().allow(""),
1689
+ shipment_id: Joi.string().allow(""),
1690
+ store_id: Joi.string().allow(""),
1691
+ invoice_number: Joi.string().allow(""),
1692
+ });
1693
+ }
1694
+
1695
+ /** @returns {RedemptionDetails} */
1696
+ static RedemptionDetails() {
1697
+ return Joi.object({
1698
+ meta: Joi.any(),
1699
+ staff_id: Joi.string().allow(""),
1700
+ created_at: Joi.string().allow(""),
1701
+ order_id: Joi.string().allow(""),
1702
+ store_id: Joi.string().allow(""),
1703
+ shipment_id: Joi.string().allow(""),
1704
+ ordering_channel: Joi.string().allow(""),
1705
+ amount_debited: Joi.number(),
1706
+ invoice_number: Joi.string().allow(""),
1707
+ });
1708
+ }
1709
+
1710
+ /** @returns {CreditNoteDetails} */
1711
+ static CreditNoteDetails() {
1712
+ return Joi.object({
1713
+ currency: Joi.string().allow("").allow(null),
1714
+ current_amount_used: Joi.number(),
1715
+ cn_status: Joi.string().allow(""),
1716
+ customer_mobile_number: Joi.string().allow(""),
1717
+ cn_reference_number: Joi.string().allow(""),
1718
+ cn_details: FinancePlatformModel.CnDetails(),
1719
+ redemption_details: Joi.array().items(
1720
+ FinancePlatformModel.RedemptionDetails()
1721
+ ),
1722
+ remaining_cn_amount: Joi.number(),
1723
+ available_cn_balance: Joi.number(),
1724
+ cn_amount: Joi.number(),
1725
+ });
1726
+ }
1727
+
1728
+ /** @returns {CreditNoteDetailsResponse} */
1729
+ static CreditNoteDetailsResponse() {
1730
+ return Joi.object({
1731
+ success: Joi.boolean(),
1732
+ data: FinancePlatformModel.CreditNoteDetails(),
1733
+ });
1734
+ }
1735
+
1736
+ /** @returns {GetCustomerCreditBalance} */
1737
+ static GetCustomerCreditBalance() {
1738
+ return Joi.object({
1739
+ affiliate_id: Joi.string().allow(""),
1740
+ seller_id: Joi.number(),
1741
+ customer_mobile_number: Joi.string().allow(""),
1742
+ });
1743
+ }
1744
+
1745
+ /** @returns {GetCustomerCreditBalanceReq} */
1746
+ static GetCustomerCreditBalanceReq() {
1747
+ return Joi.object({
1748
+ data: FinancePlatformModel.GetCustomerCreditBalance(),
1749
+ });
1750
+ }
1751
+
1752
+ /** @returns {GetCustomerCreditBalanceResponseData} */
1753
+ static GetCustomerCreditBalanceResponseData() {
1754
+ return Joi.object({
1755
+ customer_mobile_number: Joi.string().allow(""),
1756
+ total_credited_balance: Joi.number(),
1757
+ });
1758
+ }
1759
+
1760
+ /** @returns {GetCustomerCreditBalanceResponse} */
1761
+ static GetCustomerCreditBalanceResponse() {
1762
+ return Joi.object({
1763
+ success: Joi.boolean(),
1764
+ data: FinancePlatformModel.GetCustomerCreditBalanceResponseData(),
1765
+ });
1766
+ }
1767
+
1768
+ /** @returns {GetCnConfigReq} */
1769
+ static GetCnConfigReq() {
1770
+ return Joi.object({
1771
+ data: FinancePlatformModel.DeleteConfig(),
1772
+ });
1773
+ }
1774
+
1775
+ /** @returns {GetCnConfigResponseMeta} */
1776
+ static GetCnConfigResponseMeta() {
1777
+ return Joi.object({
1778
+ reason: Joi.string().allow("").allow(null),
1779
+ source_channel: Joi.array().items(Joi.string().allow("")),
1780
+ });
1781
+ }
1782
+
1783
+ /** @returns {GetCnConfigResponseData} */
1784
+ static GetCnConfigResponseData() {
1785
+ return Joi.object({
1786
+ is_cn_as_refund_method: Joi.boolean(),
1787
+ affiliate_id: Joi.string().allow(""),
1788
+ meta: Joi.any(),
1789
+ seller_id: Joi.number(),
1790
+ notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(),
1791
+ validity: Joi.number(),
1792
+ redemption_ordering_channel: Joi.array().items(Joi.string().allow("")),
1793
+ currency_type: Joi.string().allow(""),
1794
+ });
1795
+ }
1796
+
1797
+ /** @returns {GetCnConfigResponse} */
1798
+ static GetCnConfigResponse() {
1799
+ return Joi.object({
1800
+ success: Joi.boolean(),
1801
+ data: FinancePlatformModel.GetCnConfigResponseData(),
1802
+ });
1803
+ }
1804
+
1805
+ /** @returns {CnGenerateReportFilters} */
1806
+ static CnGenerateReportFilters() {
1807
+ return Joi.object({
1808
+ staff_id: Joi.array().items(Joi.string().allow("")),
1809
+ channel_of_issuance: Joi.array().items(Joi.string().allow("")),
1810
+ utilisation: Joi.array().items(Joi.string().allow("")),
1811
+ ordering_channel: Joi.array().items(Joi.string().allow("")),
1812
+ store_id: Joi.array().items(Joi.number()),
1813
+ type_of_transaction: Joi.array().items(Joi.string().allow("")),
1814
+ issuance_channel: Joi.array().items(Joi.string().allow("")),
1815
+ });
1816
+ }
1817
+
1818
+ /** @returns {CnGenerateReport} */
1819
+ static CnGenerateReport() {
1820
+ return Joi.object({
1821
+ page: Joi.number(),
1822
+ end_date: Joi.string().allow(""),
1823
+ page_size: Joi.number(),
1824
+ filters: FinancePlatformModel.CnGenerateReportFilters(),
1825
+ affiliate_id: Joi.string().allow(""),
1826
+ meta: FinancePlatformModel.GenerateReportFilters(),
1827
+ search: Joi.string().allow(""),
1828
+ report_id: Joi.string().allow(""),
1829
+ search_type: Joi.string().allow(""),
1830
+ start_date: Joi.string().allow(""),
1831
+ });
1832
+ }
1833
+
1834
+ /** @returns {GenerateReportCustomerCnReq} */
1835
+ static GenerateReportCustomerCnReq() {
1836
+ return Joi.object({
1837
+ data: FinancePlatformModel.CnGenerateReport(),
1838
+ });
1839
+ }
1840
+
1841
+ /** @returns {CnGenerateReportItems} */
1842
+ static CnGenerateReportItems() {
1843
+ return Joi.object({
1844
+ expiry_date: Joi.string().allow(""),
1845
+ status: Joi.string().allow(""),
1846
+ total_amount: Joi.number(),
1847
+ order_id: Joi.string().allow(""),
1848
+ date_issued: Joi.string().allow(""),
1849
+ shipment_id: Joi.string().allow(""),
1850
+ invoice_number: Joi.string().allow(""),
1851
+ credit_note_number: Joi.string().allow(""),
1852
+ });
1853
+ }
1854
+
1855
+ /** @returns {GenerateReportCustomerCnResponseData} */
1856
+ static GenerateReportCustomerCnResponseData() {
1857
+ return Joi.object({
1858
+ success: Joi.boolean(),
1859
+ message: Joi.string().allow(""),
1860
+ items: Joi.array().items(FinancePlatformModel.CnGenerateReportItems()),
1861
+ row_header_display_order: Joi.any(),
1862
+ end_date: Joi.string().allow(""),
1863
+ page: FinancePlatformModel.Page(),
1864
+ headers: Joi.array().items(Joi.string().allow("")),
1865
+ primary_headers: Joi.array().items(Joi.string().allow("")),
1866
+ allowed_filters: Joi.array().items(Joi.string().allow("")),
1867
+ start_date: Joi.string().allow(""),
1868
+ item_count: Joi.number(),
1869
+ });
1870
+ }
1871
+
1872
+ /** @returns {GenerateReportCustomerCnResponse} */
1873
+ static GenerateReportCustomerCnResponse() {
1874
+ return Joi.object({
1875
+ data: FinancePlatformModel.GenerateReportCustomerCnResponseData(),
1876
+ });
1877
+ }
1878
+
1879
+ /** @returns {CnDownloadReport} */
1880
+ static CnDownloadReport() {
1881
+ return Joi.object({
1882
+ page: Joi.number(),
1883
+ start_date: Joi.string().allow(""),
1884
+ end_date: Joi.string().allow(""),
1885
+ affiliate_id: Joi.string().allow(""),
1886
+ search: Joi.string().allow(""),
1887
+ status: Joi.string().allow(""),
1888
+ search_type: Joi.string().allow(""),
1889
+ page_size: Joi.number(),
1890
+ });
1891
+ }
1892
+
1893
+ /** @returns {DownloadReportCustomerCnReq} */
1894
+ static DownloadReportCustomerCnReq() {
1895
+ return Joi.object({
1896
+ data: FinancePlatformModel.CnDownloadReport(),
1897
+ });
1898
+ }
1899
+
1900
+ /** @returns {DownloadReportResponseData} */
1901
+ static DownloadReportResponseData() {
1902
+ return Joi.object({
1903
+ report_config_id: Joi.string().allow(""),
1904
+ full_name: Joi.string().allow(""),
1905
+ requested_by: Joi.string().allow(""),
1906
+ start_date: Joi.string().allow(""),
1907
+ end_date: Joi.string().allow(""),
1908
+ request_dict: Joi.any(),
1909
+ download_link: Joi.string().allow(""),
1910
+ created_at: Joi.string().allow(""),
1911
+ meta: Joi.any(),
1912
+ msg: Joi.string().allow(""),
1913
+ report_name: Joi.string().allow(""),
1914
+ status: Joi.string().allow(""),
1915
+ display_name: Joi.string().allow(""),
1916
+ filters: Joi.any(),
1917
+ });
1918
+ }
1919
+
1920
+ /** @returns {DownloadReportCustomerCnResponse} */
1921
+ static DownloadReportCustomerCnResponse() {
1922
+ return Joi.object({
1923
+ items: Joi.array().items(
1924
+ FinancePlatformModel.DownloadReportResponseData()
1925
+ ),
1926
+ item_count: Joi.number(),
1927
+ page: FinancePlatformModel.Page(),
1928
+ });
1929
+ }
1930
+
1931
+ /** @returns {GetReportingFilters} */
1932
+ static GetReportingFilters() {
1933
+ return Joi.object({
1934
+ text: Joi.string().allow(""),
1935
+ type: Joi.string().allow(""),
1936
+ options: Joi.array().items(Joi.any()),
1937
+ value: Joi.string().allow(""),
1938
+ });
1939
+ }
1940
+
1941
+ /** @returns {GetReportingNestedFilters} */
1942
+ static GetReportingNestedFilters() {
1943
+ return Joi.object({
1944
+ text: Joi.string().allow(""),
1945
+ options: Joi.array().items(Joi.any()),
1946
+ required: Joi.boolean(),
1947
+ placeholder_text: Joi.string().allow(""),
1948
+ type: Joi.string().allow(""),
1949
+ value: Joi.string().allow(""),
1950
+ });
1951
+ }
1952
+
1953
+ /** @returns {GetReportingFiltersReasonOptions} */
1954
+ static GetReportingFiltersReasonOptions() {
1955
+ return Joi.object({
1956
+ text: Joi.string().allow(""),
1957
+ value: Joi.string().allow(""),
1958
+ placeholder_text: Joi.string().allow(""),
1959
+ });
1960
+ }
1961
+
1962
+ /** @returns {GetReportingFiltersReason} */
1963
+ static GetReportingFiltersReason() {
1964
+ return Joi.object({
1965
+ text: Joi.string().allow(""),
1966
+ type: Joi.string().allow(""),
1967
+ value: Joi.string().allow(""),
1968
+ options: Joi.array().items(
1969
+ FinancePlatformModel.GetReportingFiltersReasonOptions()
1970
+ ),
1971
+ });
1972
+ }
1973
+
1974
+ /** @returns {GetReportingFiltersResponse} */
1975
+ static GetReportingFiltersResponse() {
1976
+ return Joi.object({
1977
+ reason: FinancePlatformModel.GetReportingFiltersReason(),
1978
+ search: FinancePlatformModel.GetReportingFilters(),
1979
+ filters: Joi.array().items(
1980
+ FinancePlatformModel.GetReportingNestedFilters()
1981
+ ),
1982
+ status: FinancePlatformModel.GetReportingFilters(),
1983
+ });
1984
+ }
1985
+
1986
+ /** @returns {InvoicePaymentOptionsPayloadData} */
1987
+ static InvoicePaymentOptionsPayloadData() {
1988
+ return Joi.object({
1989
+ invoice_numbers: Joi.array().items(Joi.string().allow("")),
1990
+ });
1991
+ }
1992
+
1993
+ /** @returns {InvoicePaymentOptionsReq} */
1994
+ static InvoicePaymentOptionsReq() {
1995
+ return Joi.object({
1996
+ data: FinancePlatformModel.InvoicePaymentOptionsPayloadData(),
1997
+ });
1998
+ }
1999
+
2000
+ /** @returns {InvoicePaymentOptionsResponsePayableAmounts} */
2001
+ static InvoicePaymentOptionsResponsePayableAmounts() {
2002
+ return Joi.object({
2003
+ amount: Joi.number(),
2004
+ amount_key: Joi.string().allow(""),
2005
+ header: Joi.string().allow(""),
2006
+ });
2007
+ }
2008
+
2009
+ /** @returns {InvoicePaymentOptionsResponseDeductedAmounts} */
2010
+ static InvoicePaymentOptionsResponseDeductedAmounts() {
2011
+ return Joi.object({
2012
+ amount: Joi.number(),
2013
+ header: Joi.string().allow(""),
2014
+ amount_key: Joi.string().allow(""),
2015
+ is_payable: Joi.boolean(),
2016
+ symbol: Joi.string().allow(""),
2017
+ });
2018
+ }
2019
+
2020
+ /** @returns {InvoicePaymentOptionsResponseData} */
2021
+ static InvoicePaymentOptionsResponseData() {
2022
+ return Joi.object({
2023
+ invoice_number: Joi.string().allow(""),
2024
+ invoice_type: Joi.string().allow(""),
2025
+ display_amounts: Joi.array().items(
2026
+ FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts()
2027
+ ),
2028
+ total_amount: Joi.any(),
2029
+ deducted_amounts: Joi.any(),
2030
+ payable_amounts: Joi.array().items(
2031
+ FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts()
2032
+ ),
2033
+ currency: FinancePlatformModel.Currency(),
2034
+ });
2035
+ }
2036
+
2037
+ /** @returns {InvoicePaymentOptionsResponse} */
2038
+ static InvoicePaymentOptionsResponse() {
2039
+ return Joi.object({
2040
+ reason: Joi.string().allow(""),
2041
+ data: Joi.array().items(
2042
+ FinancePlatformModel.InvoicePaymentOptionsResponseData()
2043
+ ),
2044
+ total_payable_amount: Joi.number(),
2045
+ invoice_count: Joi.number(),
2046
+ success: Joi.boolean(),
2047
+ });
2048
+ }
2049
+
2050
+ /** @returns {PaymentDetail} */
2051
+ static PaymentDetail() {
2052
+ return Joi.object({
2053
+ display_name: Joi.string().allow(""),
2054
+ value: Joi.string().allow(""),
2055
+ });
2056
+ }
2057
+
2058
+ /** @returns {PaidInvoicePaymentDetail} */
2059
+ static PaidInvoicePaymentDetail() {
2060
+ return Joi.object({
2061
+ payment_details: Joi.array().items(FinancePlatformModel.PaymentDetail()),
2062
+ date_of_payment: Joi.string().allow(""),
2063
+ amount: Joi.number(),
2064
+ });
2065
+ }
2066
+
2067
+ /** @returns {InvoicePaymentDetailsResponseData} */
2068
+ static InvoicePaymentDetailsResponseData() {
2069
+ return Joi.object({
2070
+ paid_invoice_payment_details: Joi.array().items(
2071
+ FinancePlatformModel.PaidInvoicePaymentDetail()
2072
+ ),
2073
+ failed_attempts_details: Joi.array().items(Joi.any()),
2074
+ });
2075
+ }
2076
+
2077
+ /** @returns {InvoicePaymentDetailsResponse} */
2078
+ static InvoicePaymentDetailsResponse() {
2079
+ return Joi.object({
2080
+ reason: Joi.string().allow(""),
2081
+ data: FinancePlatformModel.InvoicePaymentDetailsResponseData(),
2082
+ success: Joi.boolean(),
2083
+ payment_details_visible: Joi.boolean(),
2084
+ });
2085
+ }
2086
+
2087
+ /** @returns {InvoiceActivityLogsResponseData} */
2088
+ static InvoiceActivityLogsResponseData() {
2089
+ return Joi.object({
2090
+ performed_by: Joi.string().allow("").allow(null),
2091
+ status: Joi.string().allow(""),
2092
+ reason: Joi.string().allow("").allow(null),
2093
+ is_resolved: Joi.boolean(),
2094
+ retry_attempts: Joi.number(),
2095
+ max_retry_attempts: Joi.number().allow(null),
2096
+ });
2097
+ }
2098
+
2099
+ /** @returns {InvoiceActivityLogsResponse} */
2100
+ static InvoiceActivityLogsResponse() {
2101
+ return Joi.object({
2102
+ data: Joi.array().items(
2103
+ FinancePlatformModel.InvoiceActivityLogsResponseData()
2104
+ ),
2105
+ });
2106
+ }
2107
+
2108
+ /** @returns {InvoiceActivityLogError} */
2109
+ static InvoiceActivityLogError() {
2110
+ return Joi.object({
2111
+ reason: Joi.string().allow(""),
2112
+ });
2113
+ }
2114
+
2115
+ /** @returns {UnlockCreditNoteRequestData} */
2116
+ static UnlockCreditNoteRequestData() {
2117
+ return Joi.object({
2118
+ seller_id: Joi.string().allow(""),
2119
+ locked_credit_notes: Joi.array().items(Joi.string().allow("")),
2120
+ unlock_reason: Joi.string().allow(""),
2121
+ description: Joi.string().allow(""),
2122
+ });
2123
+ }
2124
+
2125
+ /** @returns {UnlockCreditNoteReq} */
2126
+ static UnlockCreditNoteReq() {
2127
+ return Joi.object({
2128
+ data: FinancePlatformModel.UnlockCreditNoteRequestData(),
2129
+ });
2130
+ }
2131
+
2132
+ /** @returns {UnlockCreditNoteResponseData} */
2133
+ static UnlockCreditNoteResponseData() {
2134
+ return Joi.object({
2135
+ is_cn_unlocked: Joi.boolean(),
2136
+ status: Joi.string().allow(""),
2137
+ });
2138
+ }
2139
+
2140
+ /** @returns {UnlockCreditNoteResponse} */
2141
+ static UnlockCreditNoteResponse() {
2142
+ return Joi.object({
2143
+ success: Joi.boolean(),
2144
+ data: FinancePlatformModel.UnlockCreditNoteResponseData(),
2145
+ });
2146
+ }
2147
+ }
2148
+ module.exports = FinancePlatformModel;