@gofynd/fdk-client-javascript 1.2.0 → 1.3.0

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 (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +4 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -1,5 +1,107 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef ChannelDisplayName
5
+ * @property {string} [platform_pos]
6
+ */
7
+
8
+ /**
9
+ * @typedef ChannelDisplayNameResponse
10
+ * @property {ChannelDisplayName} [data]
11
+ * @property {boolean} [success]
12
+ */
13
+
14
+ /**
15
+ * @typedef CnDetails
16
+ * @property {string} [channel_of_issuance]
17
+ * @property {string} [date_issued]
18
+ * @property {string} [expiry_date]
19
+ * @property {string} [invoice_number]
20
+ * @property {string} [order_id]
21
+ * @property {string} [ordering_channel]
22
+ * @property {string} [shipment_id]
23
+ * @property {string} [staff_id]
24
+ * @property {string} [store_id]
25
+ */
26
+
27
+ /**
28
+ * @typedef CnDownloadReport
29
+ * @property {string} [affiliate_id]
30
+ * @property {string} [end_date]
31
+ * @property {number} [page]
32
+ * @property {number} [pagesize]
33
+ * @property {string} [search]
34
+ * @property {string} [search_type]
35
+ * @property {string} [start_date]
36
+ * @property {string[]} [status]
37
+ */
38
+
39
+ /**
40
+ * @typedef CnGenerateReport
41
+ * @property {string} [affiliate_id]
42
+ * @property {string} [end_date]
43
+ * @property {CnGenerateReportFilters} [filters]
44
+ * @property {GenerateReportFilters} [meta]
45
+ * @property {number} [page]
46
+ * @property {number} [pagesize]
47
+ * @property {string} [report_id]
48
+ * @property {string} [search]
49
+ * @property {string} [search_type]
50
+ * @property {string} [start_date]
51
+ */
52
+
53
+ /**
54
+ * @typedef CnGenerateReportFilters
55
+ * @property {string[]} [channel_of_issuance]
56
+ * @property {string[]} [ordering_channel]
57
+ * @property {string[]} [staff_id]
58
+ * @property {number[]} [store_id]
59
+ * @property {string[]} [types_of_transaction]
60
+ * @property {string[]} [utilisation]
61
+ */
62
+
63
+ /**
64
+ * @typedef CnGenerateReportItems
65
+ * @property {string} [credit_note_number]
66
+ * @property {string} [date_issued]
67
+ * @property {string} [expiry_date]
68
+ * @property {string} [invoice_number]
69
+ * @property {string} [order_id]
70
+ * @property {string} [shipment_id]
71
+ * @property {string} [status]
72
+ * @property {number} [total_amount]
73
+ */
74
+
75
+ /**
76
+ * @typedef CnReferenceNumber
77
+ * @property {string} [cn_reference_number]
78
+ */
79
+
80
+ /**
81
+ * @typedef CreateSellerCreditNoteConfig
82
+ * @property {string} [affiliate_id]
83
+ * @property {string} [currency_type]
84
+ * @property {boolean} [is_cn_as_refund_method]
85
+ * @property {CreditNoteConfigNotificationEvents} [notification_events]
86
+ * @property {string[]} [ordering_channel]
87
+ * @property {string} [sales_channel_name]
88
+ * @property {number} [seller_id]
89
+ * @property {string[]} [slug_values]
90
+ * @property {string[]} [source_channel]
91
+ * @property {number} [validity]
92
+ */
93
+
94
+ /**
95
+ * @typedef CreateSellerCreditNoteConfigRequest
96
+ * @property {CreateSellerCreditNoteConfig} [data]
97
+ */
98
+
99
+ /**
100
+ * @typedef CreateSellerCreditNoteConfigResponse
101
+ * @property {string} [message]
102
+ * @property {boolean} [success]
103
+ */
104
+
3
105
  /**
4
106
  * @typedef CreditlineDataPlatformPayload
5
107
  * @property {string} [end_end]
@@ -25,6 +127,52 @@ const Joi = require("joi");
25
127
  * @property {boolean} [show_mr]
26
128
  */
27
129
 
130
+ /**
131
+ * @typedef CreditNoteConfigNotificationEvents
132
+ * @property {number} [expiration_reminder_to_customer]
133
+ */
134
+
135
+ /**
136
+ * @typedef CreditNoteDetails
137
+ * @property {number} [available_cn_balance]
138
+ * @property {number} [cn_amount]
139
+ * @property {Object} [cn_details]
140
+ * @property {string} [cn_reference_number]
141
+ * @property {string} [cn_status]
142
+ * @property {string} [customer_mobile_number]
143
+ * @property {RedemptionDetails[]} [redemption_details]
144
+ * @property {number} [remaining_cn_amount]
145
+ */
146
+
147
+ /**
148
+ * @typedef CreditNoteDetailsRequest
149
+ * @property {CnReferenceNumber} [data]
150
+ */
151
+
152
+ /**
153
+ * @typedef CreditNoteDetailsResponse
154
+ * @property {CreditNoteDetails} [data]
155
+ * @property {boolean} [success]
156
+ */
157
+
158
+ /**
159
+ * @typedef DeleteConfig
160
+ * @property {string} [affiliate_id]
161
+ * @property {number} [seller_id]
162
+ * @property {string[]} [slug_values]
163
+ */
164
+
165
+ /**
166
+ * @typedef DeleteConfigRequest
167
+ * @property {DeleteConfig} [data]
168
+ */
169
+
170
+ /**
171
+ * @typedef DeleteConfigResponse
172
+ * @property {string} [message]
173
+ * @property {boolean} [success]
174
+ */
175
+
28
176
  /**
29
177
  * @typedef DownloadCreditDebitNote
30
178
  * @property {string[]} [note_id]
@@ -55,6 +203,16 @@ const Joi = require("joi");
55
203
  * @property {string} [start_date]
56
204
  */
57
205
 
206
+ /**
207
+ * @typedef DownloadReportCustomerCnRequest
208
+ * @property {CnDownloadReport} [data]
209
+ */
210
+
211
+ /**
212
+ * @typedef DownloadReportCustomerCnResponse
213
+ * @property {DownloadReportResponseData[]} [data]
214
+ */
215
+
58
216
  /**
59
217
  * @typedef DownloadReportItems
60
218
  * @property {string} [end_date]
@@ -72,12 +230,53 @@ const Joi = require("joi");
72
230
  * @property {Page} [page]
73
231
  */
74
232
 
233
+ /**
234
+ * @typedef DownloadReportResponseData
235
+ * @property {string} [created_at]
236
+ * @property {string} [display_name]
237
+ * @property {string} [download_link]
238
+ * @property {string} [end_date]
239
+ * @property {Object} [filters]
240
+ * @property {string} [full_name]
241
+ * @property {Object} [meta]
242
+ * @property {string} [msg]
243
+ * @property {string} [report_config_id]
244
+ * @property {string} [report_name]
245
+ * @property {Object} [request_dict]
246
+ * @property {string} [requested_by]
247
+ * @property {string} [start_date]
248
+ * @property {string} [status]
249
+ */
250
+
75
251
  /**
76
252
  * @typedef Error
77
253
  * @property {string} [reason]
78
254
  * @property {boolean} [success]
79
255
  */
80
256
 
257
+ /**
258
+ * @typedef GenerateReportCustomerCnRequest
259
+ * @property {CnGenerateReport} [data]
260
+ */
261
+
262
+ /**
263
+ * @typedef GenerateReportCustomerCnResponse
264
+ * @property {GenerateReportCustomerCnResponseData} [data]
265
+ */
266
+
267
+ /**
268
+ * @typedef GenerateReportCustomerCnResponseData
269
+ * @property {string[]} [allowed_filters]
270
+ * @property {string} [end_date]
271
+ * @property {string[]} [headers]
272
+ * @property {number} [item_count]
273
+ * @property {CnGenerateReportItems[]} [items]
274
+ * @property {Page} [page]
275
+ * @property {string[]} [primary_headers]
276
+ * @property {Object} [row_header_display_order]
277
+ * @property {string} [start_date]
278
+ */
279
+
81
280
  /**
82
281
  * @typedef GenerateReportFilters
83
282
  * @property {string[]} [brand]
@@ -128,21 +327,63 @@ const Joi = require("joi");
128
327
  */
129
328
 
130
329
  /**
131
- * @typedef GetDocs
132
- * @property {Object[]} [docs]
133
- * @property {Object[]} [items]
330
+ * @typedef GetCnConfigRequest
331
+ * @property {DeleteConfig} [data]
134
332
  */
135
333
 
136
334
  /**
137
- * @typedef GetEngineData
138
- * @property {GetEngineFilters} [filters]
139
- * @property {string[]} [project]
140
- * @property {string} [table_name]
335
+ * @typedef GetCnConfigResponse
336
+ * @property {GetCnConfigResponseData} [data]
337
+ * @property {boolean} [success]
338
+ */
339
+
340
+ /**
341
+ * @typedef GetCnConfigResponseData
342
+ * @property {string} [affiliate_id]
343
+ * @property {string} [currency_type]
344
+ * @property {boolean} [is_cn_as_refund_method]
345
+ * @property {GetCnConfigResponseMeta} [meta]
346
+ * @property {CreditNoteConfigNotificationEvents} [notification_events]
347
+ * @property {string[]} [redemption_ordering_channel]
348
+ * @property {number} [seller_id]
349
+ * @property {number} [validity]
350
+ */
351
+
352
+ /**
353
+ * @typedef GetCnConfigResponseMeta
354
+ * @property {string} [reason]
355
+ * @property {string[]} [source_channel]
141
356
  */
142
357
 
143
358
  /**
144
- * @typedef GetEngineFilters
145
- * @property {string} [config_field]
359
+ * @typedef GetCustomerCreditBalance
360
+ * @property {string} [affiliate_id]
361
+ * @property {string} [customer_mobile_number]
362
+ * @property {number} [seller_id]
363
+ */
364
+
365
+ /**
366
+ * @typedef GetCustomerCreditBalanceRequest
367
+ * @property {GetCustomerCreditBalance} [data]
368
+ */
369
+
370
+ /**
371
+ * @typedef GetCustomerCreditBalanceResponse
372
+ * @property {GetCustomerCreditBalanceResponseData} [data]
373
+ * @property {boolean} [success]
374
+ */
375
+
376
+ /**
377
+ * @typedef GetCustomerCreditBalanceResponseData
378
+ * @property {string} [customer_mobile_number]
379
+ * @property {number} [total_credited_balance]
380
+ */
381
+
382
+ /**
383
+ * @typedef GetEngineData
384
+ * @property {Object} [filters]
385
+ * @property {string[]} [project]
386
+ * @property {string} [table_name]
146
387
  */
147
388
 
148
389
  /**
@@ -158,6 +399,23 @@ const Joi = require("joi");
158
399
  * @property {boolean} [success]
159
400
  */
160
401
 
402
+ /**
403
+ * @typedef GetPdfUrlViewRequest
404
+ * @property {CnReferenceNumber} [data]
405
+ */
406
+
407
+ /**
408
+ * @typedef GetPdfUrlViewResponse
409
+ * @property {GetPdfUrlViewResponseData} [data]
410
+ * @property {boolean} [success]
411
+ */
412
+
413
+ /**
414
+ * @typedef GetPdfUrlViewResponseData
415
+ * @property {string} [cn_reference_number]
416
+ * @property {string} [s3_pdf_link]
417
+ */
418
+
161
419
  /**
162
420
  * @typedef GetReason
163
421
  * @property {string} [reason_type]
@@ -170,10 +428,37 @@ const Joi = require("joi");
170
428
 
171
429
  /**
172
430
  * @typedef GetReasonResponse
173
- * @property {GetDocs} [data]
431
+ * @property {number} [item_count]
432
+ * @property {ReasonItem[]} [item_list]
433
+ * @property {Page} [page]
174
434
  * @property {boolean} [success]
175
435
  */
176
436
 
437
+ /**
438
+ * @typedef GetReportingFilters
439
+ * @property {Object[]} [options]
440
+ * @property {string} [text]
441
+ * @property {string} [type]
442
+ * @property {string} [value]
443
+ */
444
+
445
+ /**
446
+ * @typedef GetReportingFiltersResponse
447
+ * @property {GetReportingNestedFilters[]} [filters]
448
+ * @property {GetReportingFilters} [search]
449
+ * @property {GetReportingFilters} [status]
450
+ */
451
+
452
+ /**
453
+ * @typedef GetReportingNestedFilters
454
+ * @property {Object[]} [options]
455
+ * @property {string} [placeholder_text]
456
+ * @property {boolean} [required]
457
+ * @property {string} [text]
458
+ * @property {string} [type]
459
+ * @property {string} [value]
460
+ */
461
+
177
462
  /**
178
463
  * @typedef GetReportListData
179
464
  * @property {boolean} [listing_enabled]
@@ -185,6 +470,14 @@ const Joi = require("joi");
185
470
  * @property {GetReportListData} [data]
186
471
  */
187
472
 
473
+ /**
474
+ * @typedef GetReportListResponse
475
+ * @property {ReportItem[]} [items]
476
+ * @property {Page} [page]
477
+ * @property {boolean} [success]
478
+ * @property {number} [total_count]
479
+ */
480
+
188
481
  /**
189
482
  * @typedef InoviceListingPayloadDataFilters
190
483
  * @property {string[]} [company_id]
@@ -269,6 +562,29 @@ const Joi = require("joi");
269
562
  * @property {string} [value]
270
563
  */
271
564
 
565
+ /**
566
+ * @typedef IsCnRefundMethodData
567
+ * @property {string} [affiliate_id]
568
+ * @property {number} [seller_id]
569
+ * @property {boolean} [toggle_edit_required]
570
+ */
571
+
572
+ /**
573
+ * @typedef IsCnRefundMethodRequest
574
+ * @property {IsCnRefundMethodData} [data]
575
+ */
576
+
577
+ /**
578
+ * @typedef IsCnRefundMethodResponse
579
+ * @property {IsCnRefundMethodResponseData} [data]
580
+ * @property {boolean} [success]
581
+ */
582
+
583
+ /**
584
+ * @typedef IsCnRefundMethodResponseData
585
+ * @property {boolean} [is_first_time_user]
586
+ */
587
+
272
588
  /**
273
589
  * @typedef IsCreditlinePayload
274
590
  * @property {string} [seller_id]
@@ -324,6 +640,36 @@ const Joi = require("joi");
324
640
  * @property {string} [transaction_id]
325
641
  */
326
642
 
643
+ /**
644
+ * @typedef ReasonItem
645
+ * @property {string} [display_name]
646
+ * @property {string} [id]
647
+ * @property {string} [name]
648
+ */
649
+
650
+ /**
651
+ * @typedef RedemptionDetails
652
+ * @property {number} [amount_debited]
653
+ * @property {string} [created_at]
654
+ * @property {string} [invoice_number]
655
+ * @property {string} [order_id]
656
+ * @property {string} [ordering_channel]
657
+ * @property {string} [shipment_id]
658
+ * @property {string} [staff_id]
659
+ * @property {string} [store_id]
660
+ */
661
+
662
+ /**
663
+ * @typedef ReportItem
664
+ * @property {string[]} [allowed_filters]
665
+ * @property {Object} [config_meta]
666
+ * @property {string} [description]
667
+ * @property {string} [display_date]
668
+ * @property {string} [id]
669
+ * @property {string} [name]
670
+ * @property {string} [report_type]
671
+ */
672
+
327
673
  /**
328
674
  * @typedef UnpaidInvoiceDataItems
329
675
  * @property {string} [currency]
@@ -332,6 +678,130 @@ const Joi = require("joi");
332
678
  */
333
679
 
334
680
  class FinancePlatformModel {
681
+ /** @returns {ChannelDisplayName} */
682
+ static ChannelDisplayName() {
683
+ return Joi.object({
684
+ platform_pos: Joi.string().allow(""),
685
+ });
686
+ }
687
+
688
+ /** @returns {ChannelDisplayNameResponse} */
689
+ static ChannelDisplayNameResponse() {
690
+ return Joi.object({
691
+ data: FinancePlatformModel.ChannelDisplayName(),
692
+ success: Joi.boolean(),
693
+ });
694
+ }
695
+
696
+ /** @returns {CnDetails} */
697
+ static CnDetails() {
698
+ return Joi.object({
699
+ channel_of_issuance: Joi.string().allow(""),
700
+ date_issued: Joi.string().allow(""),
701
+ expiry_date: Joi.string().allow(""),
702
+ invoice_number: Joi.string().allow(""),
703
+ order_id: Joi.string().allow(""),
704
+ ordering_channel: Joi.string().allow(""),
705
+ shipment_id: Joi.string().allow(""),
706
+ staff_id: Joi.string().allow(""),
707
+ store_id: Joi.string().allow(""),
708
+ });
709
+ }
710
+
711
+ /** @returns {CnDownloadReport} */
712
+ static CnDownloadReport() {
713
+ return Joi.object({
714
+ affiliate_id: Joi.string().allow(""),
715
+ end_date: Joi.string().allow(""),
716
+ page: Joi.number(),
717
+ pagesize: Joi.number(),
718
+ search: Joi.string().allow(""),
719
+ search_type: Joi.string().allow(""),
720
+ start_date: Joi.string().allow(""),
721
+ status: Joi.array().items(Joi.string().allow("")),
722
+ });
723
+ }
724
+
725
+ /** @returns {CnGenerateReport} */
726
+ static CnGenerateReport() {
727
+ return Joi.object({
728
+ affiliate_id: Joi.string().allow(""),
729
+ end_date: Joi.string().allow(""),
730
+ filters: FinancePlatformModel.CnGenerateReportFilters(),
731
+ meta: FinancePlatformModel.GenerateReportFilters(),
732
+ page: Joi.number(),
733
+ pagesize: Joi.number(),
734
+ report_id: Joi.string().allow(""),
735
+ search: Joi.string().allow(""),
736
+ search_type: Joi.string().allow(""),
737
+ start_date: Joi.string().allow(""),
738
+ });
739
+ }
740
+
741
+ /** @returns {CnGenerateReportFilters} */
742
+ static CnGenerateReportFilters() {
743
+ return Joi.object({
744
+ channel_of_issuance: Joi.array().items(Joi.string().allow("")),
745
+ ordering_channel: Joi.array().items(Joi.string().allow("")),
746
+ staff_id: Joi.array().items(Joi.string().allow("")),
747
+ store_id: Joi.array().items(Joi.number()),
748
+ types_of_transaction: Joi.array().items(Joi.string().allow("")),
749
+ utilisation: Joi.array().items(Joi.string().allow("")),
750
+ });
751
+ }
752
+
753
+ /** @returns {CnGenerateReportItems} */
754
+ static CnGenerateReportItems() {
755
+ return Joi.object({
756
+ credit_note_number: Joi.string().allow(""),
757
+ date_issued: Joi.string().allow(""),
758
+ expiry_date: Joi.string().allow(""),
759
+ invoice_number: Joi.string().allow(""),
760
+ order_id: Joi.string().allow(""),
761
+ shipment_id: Joi.string().allow(""),
762
+ status: Joi.string().allow(""),
763
+ total_amount: Joi.number(),
764
+ });
765
+ }
766
+
767
+ /** @returns {CnReferenceNumber} */
768
+ static CnReferenceNumber() {
769
+ return Joi.object({
770
+ cn_reference_number: Joi.string().allow(""),
771
+ });
772
+ }
773
+
774
+ /** @returns {CreateSellerCreditNoteConfig} */
775
+ static CreateSellerCreditNoteConfig() {
776
+ return Joi.object({
777
+ affiliate_id: Joi.string().allow(""),
778
+ currency_type: Joi.string().allow(""),
779
+ is_cn_as_refund_method: Joi.boolean(),
780
+ notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(),
781
+ ordering_channel: Joi.array().items(Joi.string().allow("")),
782
+ sales_channel_name: Joi.string().allow(""),
783
+ seller_id: Joi.number(),
784
+ slug_values: Joi.array().items(Joi.string().allow("")),
785
+ source_channel: Joi.array().items(Joi.string().allow("")),
786
+ validity: Joi.number(),
787
+ });
788
+ }
789
+
790
+ /** @returns {CreateSellerCreditNoteConfigRequest} */
791
+ static CreateSellerCreditNoteConfigRequest() {
792
+ return Joi.object({
793
+ data: FinancePlatformModel.CreateSellerCreditNoteConfig(),
794
+ });
795
+ }
796
+
797
+ /** @returns {CreateSellerCreditNoteConfigResponse} */
798
+ static CreateSellerCreditNoteConfigResponse() {
799
+ return Joi.object({
800
+ message: Joi.string().allow(""),
801
+ success: Joi.boolean(),
802
+ });
803
+ }
804
+
335
805
  /** @returns {CreditlineDataPlatformPayload} */
336
806
  static CreditlineDataPlatformPayload() {
337
807
  return Joi.object({
@@ -363,6 +833,68 @@ class FinancePlatformModel {
363
833
  });
364
834
  }
365
835
 
836
+ /** @returns {CreditNoteConfigNotificationEvents} */
837
+ static CreditNoteConfigNotificationEvents() {
838
+ return Joi.object({
839
+ expiration_reminder_to_customer: Joi.number(),
840
+ });
841
+ }
842
+
843
+ /** @returns {CreditNoteDetails} */
844
+ static CreditNoteDetails() {
845
+ return Joi.object({
846
+ available_cn_balance: Joi.number(),
847
+ cn_amount: Joi.number(),
848
+ cn_details: Joi.any(),
849
+ cn_reference_number: Joi.string().allow(""),
850
+ cn_status: Joi.string().allow(""),
851
+ customer_mobile_number: Joi.string().allow(""),
852
+ redemption_details: Joi.array().items(
853
+ FinancePlatformModel.RedemptionDetails()
854
+ ),
855
+ remaining_cn_amount: Joi.number(),
856
+ });
857
+ }
858
+
859
+ /** @returns {CreditNoteDetailsRequest} */
860
+ static CreditNoteDetailsRequest() {
861
+ return Joi.object({
862
+ data: FinancePlatformModel.CnReferenceNumber(),
863
+ });
864
+ }
865
+
866
+ /** @returns {CreditNoteDetailsResponse} */
867
+ static CreditNoteDetailsResponse() {
868
+ return Joi.object({
869
+ data: FinancePlatformModel.CreditNoteDetails(),
870
+ success: Joi.boolean(),
871
+ });
872
+ }
873
+
874
+ /** @returns {DeleteConfig} */
875
+ static DeleteConfig() {
876
+ return Joi.object({
877
+ affiliate_id: Joi.string().allow(""),
878
+ seller_id: Joi.number(),
879
+ slug_values: Joi.array().items(Joi.string().allow("")),
880
+ });
881
+ }
882
+
883
+ /** @returns {DeleteConfigRequest} */
884
+ static DeleteConfigRequest() {
885
+ return Joi.object({
886
+ data: FinancePlatformModel.DeleteConfig(),
887
+ });
888
+ }
889
+
890
+ /** @returns {DeleteConfigResponse} */
891
+ static DeleteConfigResponse() {
892
+ return Joi.object({
893
+ message: Joi.string().allow(""),
894
+ success: Joi.boolean(),
895
+ });
896
+ }
897
+
366
898
  /** @returns {DownloadCreditDebitNote} */
367
899
  static DownloadCreditDebitNote() {
368
900
  return Joi.object({
@@ -405,6 +937,22 @@ class FinancePlatformModel {
405
937
  });
406
938
  }
407
939
 
940
+ /** @returns {DownloadReportCustomerCnRequest} */
941
+ static DownloadReportCustomerCnRequest() {
942
+ return Joi.object({
943
+ data: FinancePlatformModel.CnDownloadReport(),
944
+ });
945
+ }
946
+
947
+ /** @returns {DownloadReportCustomerCnResponse} */
948
+ static DownloadReportCustomerCnResponse() {
949
+ return Joi.object({
950
+ data: Joi.array().items(
951
+ FinancePlatformModel.DownloadReportResponseData()
952
+ ),
953
+ });
954
+ }
955
+
408
956
  /** @returns {DownloadReportItems} */
409
957
  static DownloadReportItems() {
410
958
  return Joi.object({
@@ -426,6 +974,26 @@ class FinancePlatformModel {
426
974
  });
427
975
  }
428
976
 
977
+ /** @returns {DownloadReportResponseData} */
978
+ static DownloadReportResponseData() {
979
+ return Joi.object({
980
+ created_at: Joi.string().allow(""),
981
+ display_name: Joi.string().allow(""),
982
+ download_link: Joi.string().allow(""),
983
+ end_date: Joi.string().allow(""),
984
+ filters: Joi.any(),
985
+ full_name: Joi.string().allow(""),
986
+ meta: Joi.any(),
987
+ msg: Joi.string().allow(""),
988
+ report_config_id: Joi.string().allow(""),
989
+ report_name: Joi.string().allow(""),
990
+ request_dict: Joi.any(),
991
+ requested_by: Joi.string().allow(""),
992
+ start_date: Joi.string().allow(""),
993
+ status: Joi.string().allow(""),
994
+ });
995
+ }
996
+
429
997
  /** @returns {Error} */
430
998
  static Error() {
431
999
  return Joi.object({
@@ -434,6 +1002,35 @@ class FinancePlatformModel {
434
1002
  });
435
1003
  }
436
1004
 
1005
+ /** @returns {GenerateReportCustomerCnRequest} */
1006
+ static GenerateReportCustomerCnRequest() {
1007
+ return Joi.object({
1008
+ data: FinancePlatformModel.CnGenerateReport(),
1009
+ });
1010
+ }
1011
+
1012
+ /** @returns {GenerateReportCustomerCnResponse} */
1013
+ static GenerateReportCustomerCnResponse() {
1014
+ return Joi.object({
1015
+ data: FinancePlatformModel.GenerateReportCustomerCnResponseData(),
1016
+ });
1017
+ }
1018
+
1019
+ /** @returns {GenerateReportCustomerCnResponseData} */
1020
+ static GenerateReportCustomerCnResponseData() {
1021
+ return Joi.object({
1022
+ allowed_filters: Joi.array().items(Joi.string().allow("")),
1023
+ end_date: Joi.string().allow(""),
1024
+ headers: Joi.array().items(Joi.string().allow("")),
1025
+ item_count: Joi.number(),
1026
+ items: Joi.array().items(FinancePlatformModel.CnGenerateReportItems()),
1027
+ page: FinancePlatformModel.Page(),
1028
+ primary_headers: Joi.array().items(Joi.string().allow("")),
1029
+ row_header_display_order: Joi.any(),
1030
+ start_date: Joi.string().allow(""),
1031
+ });
1032
+ }
1033
+
437
1034
  /** @returns {GenerateReportFilters} */
438
1035
  static GenerateReportFilters() {
439
1036
  return Joi.object({
@@ -497,27 +1094,81 @@ class FinancePlatformModel {
497
1094
  });
498
1095
  }
499
1096
 
500
- /** @returns {GetDocs} */
501
- static GetDocs() {
1097
+ /** @returns {GetCnConfigRequest} */
1098
+ static GetCnConfigRequest() {
502
1099
  return Joi.object({
503
- docs: Joi.array().items(Joi.any()),
504
- items: Joi.array().items(Joi.any()),
1100
+ data: FinancePlatformModel.DeleteConfig(),
505
1101
  });
506
1102
  }
507
1103
 
508
- /** @returns {GetEngineData} */
509
- static GetEngineData() {
1104
+ /** @returns {GetCnConfigResponse} */
1105
+ static GetCnConfigResponse() {
510
1106
  return Joi.object({
511
- filters: FinancePlatformModel.GetEngineFilters(),
512
- project: Joi.array().items(Joi.string().allow("")),
513
- table_name: Joi.string().allow(""),
1107
+ data: FinancePlatformModel.GetCnConfigResponseData(),
1108
+ success: Joi.boolean(),
1109
+ });
1110
+ }
1111
+
1112
+ /** @returns {GetCnConfigResponseData} */
1113
+ static GetCnConfigResponseData() {
1114
+ return Joi.object({
1115
+ affiliate_id: Joi.string().allow(""),
1116
+ currency_type: Joi.string().allow(""),
1117
+ is_cn_as_refund_method: Joi.boolean(),
1118
+ meta: FinancePlatformModel.GetCnConfigResponseMeta(),
1119
+ notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(),
1120
+ redemption_ordering_channel: Joi.array().items(Joi.string().allow("")),
1121
+ seller_id: Joi.number(),
1122
+ validity: Joi.number(),
1123
+ });
1124
+ }
1125
+
1126
+ /** @returns {GetCnConfigResponseMeta} */
1127
+ static GetCnConfigResponseMeta() {
1128
+ return Joi.object({
1129
+ reason: Joi.string().allow(""),
1130
+ source_channel: Joi.array().items(Joi.string().allow("")),
1131
+ });
1132
+ }
1133
+
1134
+ /** @returns {GetCustomerCreditBalance} */
1135
+ static GetCustomerCreditBalance() {
1136
+ return Joi.object({
1137
+ affiliate_id: Joi.string().allow(""),
1138
+ customer_mobile_number: Joi.string().allow(""),
1139
+ seller_id: Joi.number(),
1140
+ });
1141
+ }
1142
+
1143
+ /** @returns {GetCustomerCreditBalanceRequest} */
1144
+ static GetCustomerCreditBalanceRequest() {
1145
+ return Joi.object({
1146
+ data: FinancePlatformModel.GetCustomerCreditBalance(),
1147
+ });
1148
+ }
1149
+
1150
+ /** @returns {GetCustomerCreditBalanceResponse} */
1151
+ static GetCustomerCreditBalanceResponse() {
1152
+ return Joi.object({
1153
+ data: FinancePlatformModel.GetCustomerCreditBalanceResponseData(),
1154
+ success: Joi.boolean(),
514
1155
  });
515
1156
  }
516
1157
 
517
- /** @returns {GetEngineFilters} */
518
- static GetEngineFilters() {
1158
+ /** @returns {GetCustomerCreditBalanceResponseData} */
1159
+ static GetCustomerCreditBalanceResponseData() {
519
1160
  return Joi.object({
520
- config_field: Joi.string().allow(""),
1161
+ customer_mobile_number: Joi.string().allow(""),
1162
+ total_credited_balance: Joi.number(),
1163
+ });
1164
+ }
1165
+
1166
+ /** @returns {GetEngineData} */
1167
+ static GetEngineData() {
1168
+ return Joi.object({
1169
+ filters: Joi.any(),
1170
+ project: Joi.array().items(Joi.string().allow("")),
1171
+ table_name: Joi.string().allow(""),
521
1172
  });
522
1173
  }
523
1174
 
@@ -538,6 +1189,29 @@ class FinancePlatformModel {
538
1189
  });
539
1190
  }
540
1191
 
1192
+ /** @returns {GetPdfUrlViewRequest} */
1193
+ static GetPdfUrlViewRequest() {
1194
+ return Joi.object({
1195
+ data: FinancePlatformModel.CnReferenceNumber(),
1196
+ });
1197
+ }
1198
+
1199
+ /** @returns {GetPdfUrlViewResponse} */
1200
+ static GetPdfUrlViewResponse() {
1201
+ return Joi.object({
1202
+ data: FinancePlatformModel.GetPdfUrlViewResponseData(),
1203
+ success: Joi.boolean(),
1204
+ });
1205
+ }
1206
+
1207
+ /** @returns {GetPdfUrlViewResponseData} */
1208
+ static GetPdfUrlViewResponseData() {
1209
+ return Joi.object({
1210
+ cn_reference_number: Joi.string().allow(""),
1211
+ s3_pdf_link: Joi.string().allow(""),
1212
+ });
1213
+ }
1214
+
541
1215
  /** @returns {GetReason} */
542
1216
  static GetReason() {
543
1217
  return Joi.object({
@@ -555,11 +1229,46 @@ class FinancePlatformModel {
555
1229
  /** @returns {GetReasonResponse} */
556
1230
  static GetReasonResponse() {
557
1231
  return Joi.object({
558
- data: FinancePlatformModel.GetDocs(),
1232
+ item_count: Joi.number(),
1233
+ item_list: Joi.array().items(FinancePlatformModel.ReasonItem()),
1234
+ page: FinancePlatformModel.Page(),
559
1235
  success: Joi.boolean(),
560
1236
  });
561
1237
  }
562
1238
 
1239
+ /** @returns {GetReportingFilters} */
1240
+ static GetReportingFilters() {
1241
+ return Joi.object({
1242
+ options: Joi.array().items(Joi.any()),
1243
+ text: Joi.string().allow(""),
1244
+ type: Joi.string().allow(""),
1245
+ value: Joi.string().allow(""),
1246
+ });
1247
+ }
1248
+
1249
+ /** @returns {GetReportingFiltersResponse} */
1250
+ static GetReportingFiltersResponse() {
1251
+ return Joi.object({
1252
+ filters: Joi.array().items(
1253
+ FinancePlatformModel.GetReportingNestedFilters()
1254
+ ),
1255
+ search: FinancePlatformModel.GetReportingFilters(),
1256
+ status: FinancePlatformModel.GetReportingFilters(),
1257
+ });
1258
+ }
1259
+
1260
+ /** @returns {GetReportingNestedFilters} */
1261
+ static GetReportingNestedFilters() {
1262
+ return Joi.object({
1263
+ options: Joi.array().items(Joi.any()),
1264
+ placeholder_text: Joi.string().allow(""),
1265
+ required: Joi.boolean(),
1266
+ text: Joi.string().allow(""),
1267
+ type: Joi.string().allow(""),
1268
+ value: Joi.string().allow(""),
1269
+ });
1270
+ }
1271
+
563
1272
  /** @returns {GetReportListData} */
564
1273
  static GetReportListData() {
565
1274
  return Joi.object({
@@ -575,6 +1284,16 @@ class FinancePlatformModel {
575
1284
  });
576
1285
  }
577
1286
 
1287
+ /** @returns {GetReportListResponse} */
1288
+ static GetReportListResponse() {
1289
+ return Joi.object({
1290
+ items: Joi.array().items(FinancePlatformModel.ReportItem()),
1291
+ page: FinancePlatformModel.Page(),
1292
+ success: Joi.boolean(),
1293
+ total_count: Joi.number(),
1294
+ });
1295
+ }
1296
+
578
1297
  /** @returns {InoviceListingPayloadDataFilters} */
579
1298
  static InoviceListingPayloadDataFilters() {
580
1299
  return Joi.object({
@@ -689,6 +1408,37 @@ class FinancePlatformModel {
689
1408
  });
690
1409
  }
691
1410
 
1411
+ /** @returns {IsCnRefundMethodData} */
1412
+ static IsCnRefundMethodData() {
1413
+ return Joi.object({
1414
+ affiliate_id: Joi.string().allow(""),
1415
+ seller_id: Joi.number(),
1416
+ toggle_edit_required: Joi.boolean(),
1417
+ });
1418
+ }
1419
+
1420
+ /** @returns {IsCnRefundMethodRequest} */
1421
+ static IsCnRefundMethodRequest() {
1422
+ return Joi.object({
1423
+ data: FinancePlatformModel.IsCnRefundMethodData(),
1424
+ });
1425
+ }
1426
+
1427
+ /** @returns {IsCnRefundMethodResponse} */
1428
+ static IsCnRefundMethodResponse() {
1429
+ return Joi.object({
1430
+ data: FinancePlatformModel.IsCnRefundMethodResponseData(),
1431
+ success: Joi.boolean(),
1432
+ });
1433
+ }
1434
+
1435
+ /** @returns {IsCnRefundMethodResponseData} */
1436
+ static IsCnRefundMethodResponseData() {
1437
+ return Joi.object({
1438
+ is_first_time_user: Joi.boolean(),
1439
+ });
1440
+ }
1441
+
692
1442
  /** @returns {IsCreditlinePayload} */
693
1443
  static IsCreditlinePayload() {
694
1444
  return Joi.object({
@@ -758,6 +1508,42 @@ class FinancePlatformModel {
758
1508
  });
759
1509
  }
760
1510
 
1511
+ /** @returns {ReasonItem} */
1512
+ static ReasonItem() {
1513
+ return Joi.object({
1514
+ display_name: Joi.string().allow(""),
1515
+ id: Joi.string().allow(""),
1516
+ name: Joi.string().allow(""),
1517
+ });
1518
+ }
1519
+
1520
+ /** @returns {RedemptionDetails} */
1521
+ static RedemptionDetails() {
1522
+ return Joi.object({
1523
+ amount_debited: Joi.number(),
1524
+ created_at: Joi.string().allow(""),
1525
+ invoice_number: Joi.string().allow(""),
1526
+ order_id: Joi.string().allow(""),
1527
+ ordering_channel: Joi.string().allow(""),
1528
+ shipment_id: Joi.string().allow(""),
1529
+ staff_id: Joi.string().allow(""),
1530
+ store_id: Joi.string().allow(""),
1531
+ });
1532
+ }
1533
+
1534
+ /** @returns {ReportItem} */
1535
+ static ReportItem() {
1536
+ return Joi.object({
1537
+ allowed_filters: Joi.array().items(Joi.string().allow("")),
1538
+ config_meta: Joi.any(),
1539
+ description: Joi.string().allow(""),
1540
+ display_date: Joi.string().allow("").allow(null),
1541
+ id: Joi.string().allow(""),
1542
+ name: Joi.string().allow(""),
1543
+ report_type: Joi.string().allow(""),
1544
+ });
1545
+ }
1546
+
761
1547
  /** @returns {UnpaidInvoiceDataItems} */
762
1548
  static UnpaidInvoiceDataItems() {
763
1549
  return Joi.object({