@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10

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 (326) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.d.ts +0 -2
  8. package/sdk/application/ApplicationClient.js +0 -20
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
  10. package/sdk/application/Cart/CartApplicationClient.js +60 -1262
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
  13. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
  14. package/sdk/application/Common/CommonApplicationClient.js +5 -90
  15. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
  19. package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
  20. package/sdk/application/Content/ContentApplicationClient.js +126 -942
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
  22. package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
  23. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
  24. package/sdk/application/Lead/LeadApplicationClient.js +32 -201
  25. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
  26. package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
  27. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
  28. package/sdk/application/Order/OrderApplicationClient.js +86 -555
  29. package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
  30. package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
  31. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
  32. package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
  33. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  34. package/sdk/application/Share/ShareApplicationClient.js +34 -294
  35. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  36. package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
  37. package/sdk/application/User/UserApplicationClient.d.ts +87 -138
  38. package/sdk/application/User/UserApplicationClient.js +47 -1817
  39. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
  40. package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
  41. package/sdk/application/index.d.ts +0 -19
  42. package/sdk/application/index.js +0 -35
  43. package/sdk/common/Utility.d.ts +1 -1
  44. package/sdk/common/Utility.js +10 -7
  45. package/sdk/common/Validator.d.ts +1 -0
  46. package/sdk/common/Validator.js +20 -0
  47. package/sdk/common/utils.d.ts +0 -1
  48. package/sdk/common/utils.js +0 -14
  49. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  50. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  51. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
  52. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
  53. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  54. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  56. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  58. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  59. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  60. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  61. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
  62. package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
  63. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  64. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
  65. package/sdk/partner/OAuthClient.js +1 -0
  66. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  67. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  68. package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
  69. package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
  70. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  71. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  72. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  73. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  74. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  75. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  76. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  87. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  88. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  90. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +1328 -4975
  98. package/sdk/platform/Cart/CartPlatformModel.js +1229 -1922
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1744 -1501
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  110. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  112. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  117. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  118. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  125. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  126. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  127. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  129. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  130. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  131. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +138 -283
  132. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -219
  133. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  134. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  135. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
  137. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
  138. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
  139. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  140. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  141. package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
  142. package/sdk/platform/Content/ContentPlatformModel.js +390 -521
  143. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  144. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  145. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  146. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  147. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  148. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  149. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  150. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  151. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
  152. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
  153. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  154. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  155. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
  156. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
  157. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
  158. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
  159. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  160. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  161. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  162. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  163. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  164. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  165. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  166. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  167. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  168. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  169. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  170. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -25
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
  173. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
  174. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
  175. package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
  176. package/sdk/platform/Order/OrderPlatformClient.js +275 -528
  177. package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
  178. package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
  179. package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
  180. package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
  181. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  182. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
  193. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
  194. package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
  195. package/sdk/platform/PlatformClient.d.ts +2 -0
  196. package/sdk/platform/PlatformClient.js +4 -0
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  199. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  200. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  201. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  202. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
  213. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  214. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  215. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
  216. package/sdk/platform/Share/SharePlatformModel.js +4 -27
  217. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  218. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  219. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  220. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  221. package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
  222. package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  227. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  228. package/sdk/platform/User/UserPlatformModel.js +23 -23
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  235. package/sdk/platform/index.d.ts +1 -0
  236. package/sdk/platform/index.js +2 -0
  237. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  238. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -8
  239. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  240. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  241. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  242. package/sdk/public/Content/ContentPublicClient.js +19 -793
  243. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  244. package/sdk/public/Content/ContentPublicModel.js +3 -649
  245. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  246. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  247. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  248. package/sdk/public/Partner/PartnerPublicClient.js +14 -2
  249. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  250. package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
  251. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  252. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  253. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  254. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  255. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -4340
  256. package/sdk/application/Cart/CartApplicationModel.js +0 -2718
  257. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
  258. package/sdk/application/Cart/CartApplicationValidator.js +0 -546
  259. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
  260. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
  261. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  262. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  263. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  264. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  265. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  266. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  267. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  268. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  269. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  270. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  271. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
  272. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
  273. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  274. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  275. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
  276. package/sdk/application/Content/ContentApplicationModel.js +0 -1640
  277. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
  278. package/sdk/application/Content/ContentApplicationValidator.js +0 -269
  279. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
  280. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
  281. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  282. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  283. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
  284. package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
  285. package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
  286. package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
  287. package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
  288. package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
  289. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  290. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  291. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  292. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  293. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
  294. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
  295. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
  296. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
  297. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
  298. package/sdk/application/Order/OrderApplicationModel.js +0 -1669
  299. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
  300. package/sdk/application/Order/OrderApplicationValidator.js +0 -210
  301. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
  302. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
  303. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  304. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  305. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  306. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  307. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  308. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  309. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  310. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  311. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  312. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  313. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
  314. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
  315. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
  316. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
  317. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  318. package/sdk/application/User/UserApplicationModel.js +0 -1382
  319. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  320. package/sdk/application/User/UserApplicationValidator.js +0 -573
  321. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
  322. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
  323. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  324. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  325. package/sdk/common/Clickstream.d.ts +0 -1
  326. package/sdk/common/Clickstream.js +0 -464
@@ -3,41 +3,96 @@ const Joi = require("joi");
3
3
  /**
4
4
  * @typedef SubscriptionChargeRes
5
5
  * @property {string} [_id] - Unique identifier for the subscription charge
6
- * @property {string} [product_suit_id] - A unique identifier for a product
7
- * suite, which represents a specific collection or group of products within
8
- * the system.
9
- * @property {string} [entity_id] - Unique identifier for the entity (eg. extension)
10
- * @property {string} [entity_type] - Specifies the type of entity related to
11
- * the operation, such as 'extension' or 'subscription'
12
- * @property {string} [name] - The name of the extension plan
13
- * @property {string} [status] - Current status of the extension subscription
14
- * @property {number} [trial_days] - The number of days allocated for the trial period
6
+ * @property {string} [product_suit_id] - ID of the product suit associated with
7
+ * the charge
8
+ * @property {string} [entity_id] - Unique identifier for the entity
9
+ * @property {string} [entity_type] - Type of entity (e.g., subscription, extension)
10
+ * @property {string} [name] - Name of the subscription charge
11
+ * @property {string} [status] - Current status of the subscription charge
12
+ * @property {number} [trial_days] - Number of trial days provided
15
13
  * @property {string} [activated_on] - Date when the charge was activated
16
14
  * @property {string} [cancelled_on] - Date when the charge was cancelled
17
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
18
- * a test mode.
15
+ * @property {boolean} [is_test] - Indicates if the charge is for testing purposes
19
16
  * @property {string} [created_at] - Timestamp when the charge was created
20
17
  * @property {string} [modified_at] - Timestamp when the charge was last modified
21
- * @property {string} [company_id] - The unique identifier of the company.
18
+ * @property {string} [company_id] - Company id
22
19
  * @property {Object[]} [line_items] - List of line items associated with the charge
23
20
  */
24
21
 
25
22
  /**
26
- * @typedef BadRequestSchema
27
- * @property {string} [message] - Failure message.
23
+ * @typedef ChargeDetails
24
+ * @property {string} [_id] - Unique identifier for the charge.
25
+ * @property {string} [entity_type] - The type of entity associated with the
26
+ * charge (e.g., 'extension', 'subscription').
27
+ * @property {string} [entity_id] - Unique identifier for the entity associated
28
+ * with the charge.
29
+ * @property {string} [name] - The name of the charge.
30
+ * @property {string} [term] - Description of the charge term.
31
+ * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
32
+ * 'recurring').
33
+ * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
34
+ * 'one_time', 'recurring').
35
+ * @property {EntityChargePrice} [price]
36
+ * @property {ChargeRecurring} [recurring]
37
+ * @property {string} [status] - Current status of the charge.
38
+ * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
39
+ * @property {string} [activated_on] - Date and time when the charge was activated.
40
+ * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
41
+ * @property {string} [billing_date] - Date and time when the charge was billed.
42
+ * @property {SubscriptionTrialPeriod} [current_period]
43
+ * @property {string} [modified_at] - Date and time when the charge details were
44
+ * last modified.
45
+ * @property {string} [created_at] - Date and time when the charge was created.
46
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
47
+ * @property {string} [company_id] - Company id.
48
+ * @property {Object} [meta] - Additional metadata associated with the charge.
49
+ * @property {number} [__v] - Internal version key for the charge record.
28
50
  */
29
51
 
30
52
  /**
31
53
  * @typedef ResourceNotFound
32
54
  * @property {string} [message] - Resource not found with {id}
33
- * @property {number} [code] - The HTTP status code associated with the error
34
- * @property {boolean} [success] - Indicates if the request was successful
55
+ * @property {Object} [code]
56
+ * @property {Object} [success]
35
57
  */
36
58
 
37
59
  /**
38
- * @typedef SubscriptionTrialPeriod
39
- * @property {string} [start_date] - The start date and time of the trial period.
40
- * @property {string} [end_date] - The end date and time of the trial period.
60
+ * @typedef CreateOneTimeCharge
61
+ * @property {string} [name] - The name of the one-time charge to be created.
62
+ * @property {OneTimeChargeItem} [charge]
63
+ * @property {boolean} [is_test] - Indicates whether the charge creation is for
64
+ * testing purposes.
65
+ * @property {string} [return_url] - URL to which the user will be redirected
66
+ * after creating the charge.
67
+ */
68
+
69
+ /**
70
+ * @typedef CreateOneTimeChargeResponse
71
+ * @property {Charge} [charge]
72
+ * @property {string} [confirm_url] - URL to which users are redirected to
73
+ * confirm or complete the payment or subscription process.
74
+ */
75
+
76
+ /**
77
+ * @typedef BadRequest
78
+ * @property {string} [message] - Failure message.
79
+ */
80
+
81
+ /**
82
+ * @typedef CreateSubscriptionCharge
83
+ * @property {string} name - The name of the charge.
84
+ * @property {number} [trial_days]
85
+ * @property {ChargeLineItem[]} line_items
86
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
87
+ * @property {string} return_url - The URL passed in request which extension
88
+ * expects in return.
89
+ */
90
+
91
+ /**
92
+ * @typedef CreateSubscriptionResponse
93
+ * @property {EntitySubscription} [subscription]
94
+ * @property {string} [confirm_url] - URL to which users are redirected to
95
+ * confirm or complete the payment or subscription process.
41
96
  */
42
97
 
43
98
  /**
@@ -46,6 +101,23 @@ const Joi = require("joi");
46
101
  * @property {string} [currency_code] - The currency code for the price
47
102
  */
48
103
 
104
+ /**
105
+ * @typedef ChargeRecurring
106
+ * @property {string} [interval]
107
+ * @property {number} [interval_time]
108
+ */
109
+
110
+ /**
111
+ * @typedef SubscriptionTrialPeriod
112
+ * @property {string} [start_date] - The start date and time of the trial period.
113
+ * @property {string} [end_date] - The end date and time of the trial period.
114
+ */
115
+
116
+ /**
117
+ * @typedef Charge
118
+ * @property {OneTimeChargeEntity} [final_charge]
119
+ */
120
+
49
121
  /**
50
122
  * @typedef OneTimeChargeItem
51
123
  * @property {string} [name] - The name of the one-time charge item.
@@ -53,59 +125,43 @@ const Joi = require("joi");
53
125
  * @property {string} [pricing_type] - The type of pricing for the charge item.
54
126
  * @property {EntityChargePrice} [price]
55
127
  * @property {number} [capped_amount] - The maximum amount that can be charged
56
- * for a particular service or item
57
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
58
- * a test mode.
128
+ * for this item, if applicable.
129
+ * @property {boolean} [is_test] - Indicates whether the charge item is for
130
+ * testing purposes.
59
131
  * @property {Object} [metadata] - Additional metadata associated with the charge item.
60
132
  */
61
133
 
62
134
  /**
63
- * @typedef CreateOneTimeCharge
64
- * @property {string} [name] - The name of the one-time charge to be created.
65
- * @property {OneTimeChargeItem} [charge]
66
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
67
- * a test mode.
68
- * @property {string} [return_url] - URL to which the user will be redirected
69
- * after creating the charge.
70
- */
71
-
72
- /**
73
- * @typedef ChargeRecurring
74
- * @property {string} [interval] - The interval at which the recurring charge is
75
- * applied. Examples include "month", "year", etc.
76
- * @property {number} [interval_time]
135
+ * @typedef ChargeLineItem
136
+ * @property {string} name - Its name of the extension plan.
137
+ * @property {string} term - It indicates how it will be charged.
138
+ * @property {string} pricing_type - It indicates the extension subscription
139
+ * will be auto renewed timely.
140
+ * @property {EntityChargePrice} price
141
+ * @property {EntityChargeRecurring} [recurring]
142
+ * @property {number} [capped_amount]
143
+ * @property {number} [trial_days]
144
+ * @property {boolean} [is_test]
145
+ * @property {Object} [metadata]
77
146
  */
78
147
 
79
148
  /**
80
- * @typedef ChargeDetails
81
- * @property {string} [_id] - Unique identifier for the charge.
82
- * @property {string} [entity_type] - Specifies the type of entity related to
83
- * the operation, such as 'extension' or 'subscription'
84
- * @property {string} [entity_id] - Unique identifier for the entity (eg. extension)
85
- * @property {string} [name] - The name of the extension plan
86
- * @property {string} [term] - Description of the charge term.
87
- * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
88
- * 'recurring').
89
- * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
90
- * 'one_time', 'recurring').
91
- * @property {EntityChargePrice} [price]
92
- * @property {ChargeRecurring} [recurring]
93
- * @property {string} [status] - Current status of the charge.
94
- * @property {number} [capped_amount] - The maximum amount that can be charged
95
- * for a particular service or item
96
- * @property {string} [activated_on] - Date and time when the charge was activated.
97
- * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
98
- * @property {string} [billing_date] - The date when the billing occurred. This
99
- * field is optional and may be null if the billing date is not specified.
100
- * @property {SubscriptionTrialPeriod} [current_period]
101
- * @property {string} [modified_at] - Date and time when the charge details were
102
- * last modified.
103
- * @property {string} [created_at] - Date and time when the charge was created.
104
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
105
- * a test mode.
106
- * @property {string} [company_id] - The unique identifier of the company.
107
- * @property {Object} [meta] - Additional metadata associated with the charge.
108
- * @property {number} [__v] - Internal version key for the charge record.
149
+ * @typedef EntitySubscription
150
+ * @property {string} [_id] - Unique identifier for the subscription charge
151
+ * @property {string} [product_suit_id] - ID of the product suit associated with
152
+ * the charge
153
+ * @property {string} [entity_id] - Unique identifier for the entity
154
+ * @property {string} [entity_type] - Type of entity (e.g., subscription, extension)
155
+ * @property {string} [name] - Name of the subscription charge
156
+ * @property {string} [status] - Current status of the subscription charge
157
+ * @property {number} [trial_days] - Number of trial days provided
158
+ * @property {boolean} [is_test] - Indicates if the charge is for testing purposes
159
+ * @property {string} [created_at] - Timestamp when the charge was created
160
+ * @property {string} [modified_at] - Timestamp when the charge was last modified
161
+ * @property {string} [subscriber_id] - Unique Identifier of the company
162
+ * @property {EntityChargeDetails[]} [line_items]
163
+ * @property {string} [return_url] - The URL passed in request which extension
164
+ * expects in return.
109
165
  */
110
166
 
111
167
  /**
@@ -113,93 +169,53 @@ const Joi = require("joi");
113
169
  * @property {string} [term] - Description of the charge term or usage.
114
170
  * @property {string} [charge_type] - Type of the charge (e.g., 'subscription',
115
171
  * 'extension').
116
- * @property {number} [capped_amount] - The maximum amount that can be charged
117
- * for a particular service or item
118
- * @property {string} [billing_date] - The date when the billing occurred. This
119
- * field is optional and may be null if the billing date is not specified.
172
+ * @property {number} [capped_amount] - Maximum amount that can be charged. If
173
+ * no cap, the value should be 0.
174
+ * @property {string} [billing_date] - Date when the charge was billed. Null if
175
+ * not yet billed.
120
176
  * @property {string} [created_at] - Date and time when the charge entity was created.
121
177
  * @property {string} [modified_at] - Date and time when the charge entity was
122
178
  * last modified.
123
179
  * @property {number} [__v] - Internal version key for the charge record.
124
180
  * @property {string} [_id] - Unique identifier for the charge entity.
125
181
  * @property {string} [name] - The name of the one-time charge.
126
- * @property {string} [status] - Current status of the charge (e.g., 'pending').
182
+ * @property {string} [status] - Current status of the charge (e.g., 'pending',
183
+ * 'completed').
127
184
  * @property {string} [activated_on] - Date and time when the charge was
128
185
  * activated. Null if not yet activated.
129
186
  * @property {string} [cancelled_on] - Date and time when the charge was
130
187
  * cancelled. Null if not cancelled.
131
188
  * @property {Object} [metadata] - Additional metadata associated with the charge.
132
189
  * @property {string} [return_url] - URL to redirect to after processing the charge.
133
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
134
- * a test mode.
190
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
135
191
  * @property {string} [pricing_type] - Pricing model for the charge (e.g., 'one_time').
136
- * @property {string} [subscriber_id] - The unique identifier for the company in
137
- * the system.
138
- * @property {string} [entity_type] - Specifies the type of entity related to
139
- * the operation, such as 'extension' or 'subscription'
140
- * @property {string} [entity_id] - Unique identifier for the entity (eg. extension)
192
+ * @property {string} [subscriber_id] - Unique identifier for the subscriber
193
+ * associated with the charge.
194
+ * @property {string} [entity_type] - Type of the entity related to the charge
195
+ * (e.g., 'subscription', 'user').
196
+ * @property {string} [entity_id] - Unique identifier for the entity associated
197
+ * with the charge.
141
198
  * @property {Object} [meta] - Additional metadata associated with the charge.
142
199
  * @property {EntityChargePrice} [price]
143
200
  */
144
201
 
145
- /**
146
- * @typedef CreateOneTimeChargeResponseSchemas
147
- * @property {Charge} [charge]
148
- * @property {string} [confirm_url] - URL to which users are redirected to
149
- * confirm or complete the payment or subscription process.
150
- */
151
-
152
- /**
153
- * @typedef Charge
154
- * @property {OneTimeChargeEntity} [final_charge]
155
- */
156
-
157
202
  /**
158
203
  * @typedef EntityChargeRecurring
159
- * @property {string} interval - The interval at which the recurring charge is
160
- * applied. Examples include "month", "year", etc.
161
- */
162
-
163
- /**
164
- * @typedef ChargeLineItem
165
- * @property {string} name - Its name of the extension plan.
166
- * @property {string} term - It indicates how it will be charged.
167
- * @property {string} pricing_type - Specifies the type of pricing for the
168
- * extension subscription. It indicates whether the subscription will be
169
- * automatically renewed, charged once, or based on usage.
170
- * @property {EntityChargePrice} price
171
- * @property {EntityChargeRecurring} [recurring]
172
- * @property {number} [capped_amount] - The maximum amount that can be charged
173
- * for a particular service or item
174
- * @property {number} [trial_days] - The number of days allocated for the trial period
175
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
176
- * a test mode.
177
- * @property {Object} [metadata]
178
- */
179
-
180
- /**
181
- * @typedef CreateSubscriptionCharge
182
- * @property {string} name - The name of the extension plan
183
- * @property {number} [trial_days] - The number of days allocated for the trial period
184
- * @property {ChargeLineItem[]} line_items
185
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
186
- * a test mode.
187
- * @property {string} return_url - The URL to which the user will be redirected
188
- * after the subscription process is complete.
204
+ * @property {string} interval - The interval of the subscription.
189
205
  */
190
206
 
191
207
  /**
192
208
  * @typedef EntityChargeDetails
193
- * @property {string} [_id] - The unique identifier for the charge.
194
- * @property {string} [subscription_id] - The unique identifier of the subscription.
195
- * @property {string} [subscriber_id] - The unique identifier for the company in
196
- * the system.
197
- * @property {string} [entity_type] - Specifies the type of entity related to
198
- * the operation, such as 'extension' or 'subscription'
199
- * @property {string} [entity_id] - Unique identifier for the entity (eg. extension)
200
- * @property {string} [name] - The name of the extension plan
201
- * @property {string} [term] - Detailed description of the terms and conditions
202
- * associated with the charge.
209
+ * @property {string} [_id] - Unique identifier for the charge.
210
+ * @property {string} [subscription_id] - Unique identifier of the extension subscription.
211
+ * @property {string} [subscriber_id] - Unique identifier of the
212
+ * subscriber/company who installed extension subscription.
213
+ * @property {string} [entity_type] - The type of entity associated with the
214
+ * charge (e.g., 'extension', 'subscription').
215
+ * @property {string} [entity_id] - Unique identifier for the entity associated
216
+ * with the charge.
217
+ * @property {string} [name] - The name of the charge.
218
+ * @property {string} [term] - Description of the charge term.
203
219
  * @property {string} [charge_type] - The type of charge (e.g., 'standalone',
204
220
  * 'recurring').
205
221
  * @property {string} [pricing_type] - The pricing model for the charge (e.g.,
@@ -207,53 +223,20 @@ const Joi = require("joi");
207
223
  * @property {EntityChargePrice} [price]
208
224
  * @property {ChargeRecurring} [recurring]
209
225
  * @property {string} [status] - Current status of the charge.
210
- * @property {number} [capped_amount] - The maximum amount that can be charged
211
- * for a particular service or item
226
+ * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
212
227
  * @property {string} [activated_on] - Date and time when the charge was activated.
213
228
  * @property {string} [cancelled_on] - Date and time when the charge was cancelled.
214
- * @property {string} [billing_date] - The date when the billing occurred. This
215
- * field is optional and may be null if the billing date is not specified.
229
+ * @property {string} [billing_date] - Date and time when the charge was billed.
216
230
  * @property {SubscriptionTrialPeriod} [current_period]
217
231
  * @property {string} [modified_at] - Date and time when the charge details were
218
232
  * last modified.
219
233
  * @property {string} [created_at] - Date and time when the charge was created.
220
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
221
- * a test mode.
222
- * @property {string} [company_id] - The unique identifier of the company.
234
+ * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
235
+ * @property {string} [company_id] - Company id.
223
236
  * @property {Object} [meta] - Additional metadata associated with the charge.
224
237
  * @property {number} [__v] - Internal version key for the charge record.
225
238
  */
226
239
 
227
- /**
228
- * @typedef EntitySubscription
229
- * @property {string} [_id] - Unique identifier for the subscription charge
230
- * @property {string} [product_suit_id] - A unique identifier for a product
231
- * suite, which represents a specific collection or group of products within
232
- * the system.
233
- * @property {string} [entity_id] - Unique identifier for the entity (eg. extension)
234
- * @property {string} [entity_type] - Specifies the type of entity related to
235
- * the operation, such as 'extension' or 'subscription'
236
- * @property {string} [name] - The name of the extension plan
237
- * @property {string} [status] - Current status of the subscription charge
238
- * @property {number} [trial_days] - The number of days allocated for the trial period
239
- * @property {boolean} [is_test] - Indicates whether the operation or data is in
240
- * a test mode.
241
- * @property {string} [created_at] - Timestamp when the charge was created
242
- * @property {string} [modified_at] - Timestamp when the charge was last modified
243
- * @property {string} [subscriber_id] - The unique identifier for the company in
244
- * the system.
245
- * @property {EntityChargeDetails[]} [line_items]
246
- * @property {string} [return_url] - The URL passed in request which extension
247
- * expects in return.
248
- */
249
-
250
- /**
251
- * @typedef CreateSubscription
252
- * @property {EntitySubscription} [subscription]
253
- * @property {string} [confirm_url] - URL to which users are redirected to post
254
- * initiation of extension installation.
255
- */
256
-
257
240
  class BillingPlatformModel {
258
241
  /** @returns {SubscriptionChargeRes} */
259
242
  static SubscriptionChargeRes() {
@@ -275,10 +258,30 @@ class BillingPlatformModel {
275
258
  });
276
259
  }
277
260
 
278
- /** @returns {BadRequestSchema} */
279
- static BadRequestSchema() {
261
+ /** @returns {ChargeDetails} */
262
+ static ChargeDetails() {
280
263
  return Joi.object({
281
- message: Joi.string().allow(""),
264
+ _id: Joi.string().allow(""),
265
+ entity_type: Joi.string().allow(""),
266
+ entity_id: Joi.string().allow(""),
267
+ name: Joi.string().allow(""),
268
+ term: Joi.string().allow(""),
269
+ charge_type: Joi.string().allow(""),
270
+ pricing_type: Joi.string().allow(""),
271
+ price: BillingPlatformModel.EntityChargePrice(),
272
+ recurring: BillingPlatformModel.ChargeRecurring(),
273
+ status: Joi.string().allow(""),
274
+ capped_amount: Joi.number(),
275
+ activated_on: Joi.string().allow(""),
276
+ cancelled_on: Joi.string().allow(""),
277
+ billing_date: Joi.string().allow(""),
278
+ current_period: BillingPlatformModel.SubscriptionTrialPeriod(),
279
+ modified_at: Joi.string().allow(""),
280
+ created_at: Joi.string().allow(""),
281
+ is_test: Joi.boolean(),
282
+ company_id: Joi.string().allow(""),
283
+ meta: Joi.any(),
284
+ __v: Joi.number(),
282
285
  });
283
286
  }
284
287
 
@@ -286,16 +289,54 @@ class BillingPlatformModel {
286
289
  static ResourceNotFound() {
287
290
  return Joi.object({
288
291
  message: Joi.string().allow(""),
289
- code: Joi.number(),
290
- success: Joi.boolean(),
292
+ code: Joi.any(),
293
+ success: Joi.any(),
291
294
  });
292
295
  }
293
296
 
294
- /** @returns {SubscriptionTrialPeriod} */
295
- static SubscriptionTrialPeriod() {
297
+ /** @returns {CreateOneTimeCharge} */
298
+ static CreateOneTimeCharge() {
296
299
  return Joi.object({
297
- start_date: Joi.string().allow(""),
298
- end_date: Joi.string().allow(""),
300
+ name: Joi.string().allow(""),
301
+ charge: BillingPlatformModel.OneTimeChargeItem(),
302
+ is_test: Joi.boolean(),
303
+ return_url: Joi.string().allow(""),
304
+ });
305
+ }
306
+
307
+ /** @returns {CreateOneTimeChargeResponse} */
308
+ static CreateOneTimeChargeResponse() {
309
+ return Joi.object({
310
+ charge: BillingPlatformModel.Charge(),
311
+ confirm_url: Joi.string().allow(""),
312
+ });
313
+ }
314
+
315
+ /** @returns {BadRequest} */
316
+ static BadRequest() {
317
+ return Joi.object({
318
+ message: Joi.string().allow(""),
319
+ });
320
+ }
321
+
322
+ /** @returns {CreateSubscriptionCharge} */
323
+ static CreateSubscriptionCharge() {
324
+ return Joi.object({
325
+ name: Joi.string().allow("").required(),
326
+ trial_days: Joi.number(),
327
+ line_items: Joi.array()
328
+ .items(BillingPlatformModel.ChargeLineItem())
329
+ .required(),
330
+ is_test: Joi.boolean(),
331
+ return_url: Joi.string().allow("").required(),
332
+ });
333
+ }
334
+
335
+ /** @returns {CreateSubscriptionResponse} */
336
+ static CreateSubscriptionResponse() {
337
+ return Joi.object({
338
+ subscription: BillingPlatformModel.EntitySubscription(),
339
+ confirm_url: Joi.string().allow(""),
299
340
  });
300
341
  }
301
342
 
@@ -307,6 +348,29 @@ class BillingPlatformModel {
307
348
  });
308
349
  }
309
350
 
351
+ /** @returns {ChargeRecurring} */
352
+ static ChargeRecurring() {
353
+ return Joi.object({
354
+ interval: Joi.string().allow(""),
355
+ interval_time: Joi.number(),
356
+ });
357
+ }
358
+
359
+ /** @returns {SubscriptionTrialPeriod} */
360
+ static SubscriptionTrialPeriod() {
361
+ return Joi.object({
362
+ start_date: Joi.string().allow(""),
363
+ end_date: Joi.string().allow(""),
364
+ });
365
+ }
366
+
367
+ /** @returns {Charge} */
368
+ static Charge() {
369
+ return Joi.object({
370
+ final_charge: BillingPlatformModel.OneTimeChargeEntity(),
371
+ });
372
+ }
373
+
310
374
  /** @returns {OneTimeChargeItem} */
311
375
  static OneTimeChargeItem() {
312
376
  return Joi.object({
@@ -316,52 +380,41 @@ class BillingPlatformModel {
316
380
  price: BillingPlatformModel.EntityChargePrice(),
317
381
  capped_amount: Joi.number(),
318
382
  is_test: Joi.boolean(),
319
- metadata: Joi.object().pattern(/\S/, Joi.any()),
383
+ metadata: Joi.any(),
320
384
  });
321
385
  }
322
386
 
323
- /** @returns {CreateOneTimeCharge} */
324
- static CreateOneTimeCharge() {
387
+ /** @returns {ChargeLineItem} */
388
+ static ChargeLineItem() {
325
389
  return Joi.object({
326
- name: Joi.string().allow(""),
327
- charge: BillingPlatformModel.OneTimeChargeItem(),
390
+ name: Joi.string().allow("").required(),
391
+ term: Joi.string().allow("").required(),
392
+ pricing_type: Joi.string().allow("").required(),
393
+ price: BillingPlatformModel.EntityChargePrice().required(),
394
+ recurring: BillingPlatformModel.EntityChargeRecurring(),
395
+ capped_amount: Joi.number(),
396
+ trial_days: Joi.number(),
328
397
  is_test: Joi.boolean(),
329
- return_url: Joi.string().allow(""),
398
+ metadata: Joi.any(),
330
399
  });
331
400
  }
332
401
 
333
- /** @returns {ChargeRecurring} */
334
- static ChargeRecurring() {
335
- return Joi.object({
336
- interval: Joi.string().allow(""),
337
- interval_time: Joi.number(),
338
- });
339
- }
340
-
341
- /** @returns {ChargeDetails} */
342
- static ChargeDetails() {
402
+ /** @returns {EntitySubscription} */
403
+ static EntitySubscription() {
343
404
  return Joi.object({
344
405
  _id: Joi.string().allow(""),
345
- entity_type: Joi.string().allow(""),
406
+ product_suit_id: Joi.string().allow(""),
346
407
  entity_id: Joi.string().allow(""),
408
+ entity_type: Joi.string().allow(""),
347
409
  name: Joi.string().allow(""),
348
- term: Joi.string().allow(""),
349
- charge_type: Joi.string().allow(""),
350
- pricing_type: Joi.string().allow(""),
351
- price: BillingPlatformModel.EntityChargePrice(),
352
- recurring: BillingPlatformModel.ChargeRecurring(),
353
410
  status: Joi.string().allow(""),
354
- capped_amount: Joi.number(),
355
- activated_on: Joi.string().allow(""),
356
- cancelled_on: Joi.string().allow(""),
357
- billing_date: Joi.string().allow(""),
358
- current_period: BillingPlatformModel.SubscriptionTrialPeriod(),
359
- modified_at: Joi.string().allow(""),
360
- created_at: Joi.string().allow(""),
411
+ trial_days: Joi.number(),
361
412
  is_test: Joi.boolean(),
362
- company_id: Joi.string().allow(""),
363
- meta: Joi.object().pattern(/\S/, Joi.any()),
364
- __v: Joi.number(),
413
+ created_at: Joi.string().allow(""),
414
+ modified_at: Joi.string().allow(""),
415
+ subscriber_id: Joi.string().allow(""),
416
+ line_items: Joi.array().items(BillingPlatformModel.EntityChargeDetails()),
417
+ return_url: Joi.string().allow(""),
365
418
  });
366
419
  }
367
420
 
@@ -380,33 +433,18 @@ class BillingPlatformModel {
380
433
  status: Joi.string().allow(""),
381
434
  activated_on: Joi.string().allow("").allow(null),
382
435
  cancelled_on: Joi.string().allow("").allow(null),
383
- metadata: Joi.object().pattern(/\S/, Joi.any()),
436
+ metadata: Joi.any(),
384
437
  return_url: Joi.string().allow(""),
385
438
  is_test: Joi.boolean(),
386
439
  pricing_type: Joi.string().allow(""),
387
440
  subscriber_id: Joi.string().allow(""),
388
441
  entity_type: Joi.string().allow(""),
389
442
  entity_id: Joi.string().allow(""),
390
- meta: Joi.object().pattern(/\S/, Joi.any()),
443
+ meta: Joi.any(),
391
444
  price: BillingPlatformModel.EntityChargePrice(),
392
445
  });
393
446
  }
394
447
 
395
- /** @returns {CreateOneTimeChargeResponseSchemas} */
396
- static CreateOneTimeChargeResponseSchemas() {
397
- return Joi.object({
398
- charge: BillingPlatformModel.Charge(),
399
- confirm_url: Joi.string().allow(""),
400
- });
401
- }
402
-
403
- /** @returns {Charge} */
404
- static Charge() {
405
- return Joi.object({
406
- final_charge: BillingPlatformModel.OneTimeChargeEntity(),
407
- });
408
- }
409
-
410
448
  /** @returns {EntityChargeRecurring} */
411
449
  static EntityChargeRecurring() {
412
450
  return Joi.object({
@@ -414,34 +452,6 @@ class BillingPlatformModel {
414
452
  });
415
453
  }
416
454
 
417
- /** @returns {ChargeLineItem} */
418
- static ChargeLineItem() {
419
- return Joi.object({
420
- name: Joi.string().allow("").required(),
421
- term: Joi.string().allow("").required(),
422
- pricing_type: Joi.string().allow("").required(),
423
- price: BillingPlatformModel.EntityChargePrice().required(),
424
- recurring: BillingPlatformModel.EntityChargeRecurring(),
425
- capped_amount: Joi.number(),
426
- trial_days: Joi.number(),
427
- is_test: Joi.boolean(),
428
- metadata: Joi.object().pattern(/\S/, Joi.any()),
429
- });
430
- }
431
-
432
- /** @returns {CreateSubscriptionCharge} */
433
- static CreateSubscriptionCharge() {
434
- return Joi.object({
435
- name: Joi.string().allow("").required(),
436
- trial_days: Joi.number(),
437
- line_items: Joi.array()
438
- .items(BillingPlatformModel.ChargeLineItem())
439
- .required(),
440
- is_test: Joi.boolean(),
441
- return_url: Joi.string().allow("").required(),
442
- });
443
- }
444
-
445
455
  /** @returns {EntityChargeDetails} */
446
456
  static EntityChargeDetails() {
447
457
  return Joi.object({
@@ -466,36 +476,9 @@ class BillingPlatformModel {
466
476
  created_at: Joi.string().allow(""),
467
477
  is_test: Joi.boolean(),
468
478
  company_id: Joi.string().allow(""),
469
- meta: Joi.object().pattern(/\S/, Joi.any()),
479
+ meta: Joi.any(),
470
480
  __v: Joi.number(),
471
481
  });
472
482
  }
473
-
474
- /** @returns {EntitySubscription} */
475
- static EntitySubscription() {
476
- return Joi.object({
477
- _id: Joi.string().allow(""),
478
- product_suit_id: Joi.string().allow(""),
479
- entity_id: Joi.string().allow(""),
480
- entity_type: Joi.string().allow(""),
481
- name: Joi.string().allow(""),
482
- status: Joi.string().allow(""),
483
- trial_days: Joi.number(),
484
- is_test: Joi.boolean(),
485
- created_at: Joi.string().allow(""),
486
- modified_at: Joi.string().allow(""),
487
- subscriber_id: Joi.string().allow(""),
488
- line_items: Joi.array().items(BillingPlatformModel.EntityChargeDetails()),
489
- return_url: Joi.string().allow(""),
490
- });
491
- }
492
-
493
- /** @returns {CreateSubscription} */
494
- static CreateSubscription() {
495
- return Joi.object({
496
- subscription: BillingPlatformModel.EntitySubscription(),
497
- confirm_url: Joi.string().allow(""),
498
- });
499
- }
500
483
  }
501
484
  module.exports = BillingPlatformModel;