@gofynd/fdk-client-javascript 1.1.6 → 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 (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,127 +1,579 @@
1
1
  const Joi = require("joi");
2
2
 
3
- class UserModel {
3
+ /**
4
+ * @typedef Accountkit
5
+ * @property {string} [app_id]
6
+ */
7
+
8
+ /**
9
+ * @typedef AuthenticationApiErrorSchema
10
+ * @property {string} [message]
11
+ */
12
+
13
+ /**
14
+ * @typedef AuthenticationInternalServerErrorSchema
15
+ * @property {string} [message]
16
+ */
17
+
18
+ /**
19
+ * @typedef AuthSuccess
20
+ * @property {string} [register_token]
21
+ * @property {UserSchema} [user]
22
+ * @property {boolean} [user_exists]
23
+ */
24
+
25
+ /**
26
+ * @typedef CodeRequestBodySchema
27
+ * @property {string} [code]
28
+ */
29
+
30
+ /**
31
+ * @typedef DeleteAccountConsent
32
+ * @property {string} [consent_text]
33
+ */
34
+
35
+ /**
36
+ * @typedef DeleteAccountReasons
37
+ * @property {string} [reason_id]
38
+ * @property {string} [reason_text]
39
+ * @property {boolean} [show_text_area]
40
+ */
41
+
42
+ /**
43
+ * @typedef DeleteApplicationUserRequestSchema
44
+ * @property {string} [otp]
45
+ * @property {string} [reason]
46
+ * @property {string} [reason_id]
47
+ * @property {string} [request_id]
48
+ * @property {string} [user_id]
49
+ */
50
+
51
+ /**
52
+ * @typedef DeleteUserSuccess
53
+ * @property {boolean} [success]
54
+ */
55
+
56
+ /**
57
+ * @typedef EditEmailRequestSchema
58
+ * @property {string} [email]
59
+ */
60
+
61
+ /**
62
+ * @typedef EditMobileRequestSchema
63
+ * @property {string} [country_code]
64
+ * @property {string} [phone]
65
+ */
66
+
67
+ /**
68
+ * @typedef EditProfileMobileSchema
69
+ * @property {string} [country_code]
70
+ * @property {string} [phone]
71
+ */
72
+
73
+ /**
74
+ * @typedef EditProfileRequestSchema
75
+ * @property {string} [android_hash]
76
+ * @property {string} [country_code]
77
+ * @property {string} [dob]
78
+ * @property {string} [email]
79
+ * @property {string} [first_name]
80
+ * @property {string} [gender]
81
+ * @property {string} [last_name]
82
+ * @property {EditProfileMobileSchema} [mobile]
83
+ * @property {string} [profile_pic_url]
84
+ * @property {string} [register_token]
85
+ * @property {string} [sender]
86
+ */
87
+
88
+ /**
89
+ * @typedef Email
90
+ * @property {boolean} [active]
91
+ * @property {string} [email]
92
+ * @property {boolean} [primary]
93
+ * @property {boolean} [verified]
94
+ */
95
+
96
+ /**
97
+ * @typedef EmailOtpSuccess
98
+ * @property {boolean} [success]
99
+ */
100
+
101
+ /**
102
+ * @typedef Facebook
103
+ * @property {string} [app_id]
104
+ */
105
+
106
+ /**
107
+ * @typedef FlashCard
108
+ * @property {string} [background_color]
109
+ * @property {string} [text]
110
+ * @property {string} [text_color]
111
+ */
112
+
113
+ /**
114
+ * @typedef ForgotPasswordRequestSchema
115
+ * @property {string} [code]
116
+ * @property {string} [password]
117
+ */
118
+
119
+ /**
120
+ * @typedef FormRegisterRequestSchema
121
+ * @property {string} [email]
122
+ * @property {string} [first_name]
123
+ * @property {string} [gender]
124
+ * @property {string} [last_name]
125
+ * @property {string} [password]
126
+ * @property {FormRegisterRequestSchemaPhone} [phone]
127
+ * @property {string} [register_token]
128
+ */
129
+
130
+ /**
131
+ * @typedef FormRegisterRequestSchemaPhone
132
+ * @property {string} [country_code]
133
+ * @property {string} [mobile]
134
+ */
135
+
136
+ /**
137
+ * @typedef Google
138
+ * @property {string} [app_id]
139
+ */
140
+
141
+ /**
142
+ * @typedef HasPasswordSuccess
143
+ * @property {boolean} [result]
144
+ */
145
+
146
+ /**
147
+ * @typedef Login
148
+ * @property {boolean} [otp]
149
+ * @property {boolean} [password]
150
+ */
151
+
152
+ /**
153
+ * @typedef LoginSuccess
154
+ * @property {string} [register_token]
155
+ * @property {string} [request_id]
156
+ * @property {UserSchema} [user]
157
+ */
158
+
159
+ /**
160
+ * @typedef LogoutSuccess
161
+ * @property {boolean} [logout]
162
+ */
163
+
164
+ /**
165
+ * @typedef LookAndFeel
166
+ * @property {string} [background_color]
167
+ * @property {string} [card_position]
168
+ */
169
+
170
+ /**
171
+ * @typedef MetaSchema
172
+ * @property {boolean} [fynd_default]
173
+ */
174
+
175
+ /**
176
+ * @typedef OAuthRequestAppleSchema
177
+ * @property {OAuthRequestAppleSchemaOauth} [oauth]
178
+ * @property {OAuthRequestAppleSchemaProfile} [profile]
179
+ * @property {string} [user_identifier]
180
+ */
181
+
182
+ /**
183
+ * @typedef OAuthRequestAppleSchemaOauth
184
+ * @property {string} [identity_token]
185
+ */
186
+
187
+ /**
188
+ * @typedef OAuthRequestAppleSchemaProfile
189
+ * @property {string} [first_name]
190
+ * @property {string} [full_name]
191
+ * @property {string} [last_name]
192
+ */
193
+
194
+ /**
195
+ * @typedef OAuthRequestSchema
196
+ * @property {boolean} [is_signed_in]
197
+ * @property {OAuthRequestSchemaOauth2} [oauth2]
198
+ * @property {OAuthRequestSchemaProfile} [profile]
199
+ */
200
+
201
+ /**
202
+ * @typedef OAuthRequestSchemaOauth2
203
+ * @property {string} [access_token]
204
+ * @property {number} [expiry]
205
+ * @property {string} [refresh_token]
206
+ */
207
+
208
+ /**
209
+ * @typedef OAuthRequestSchemaProfile
210
+ * @property {string} [email]
211
+ * @property {string} [first_name]
212
+ * @property {string} [full_name]
213
+ * @property {string} [id]
214
+ * @property {string} [image]
215
+ * @property {string} [last_name]
216
+ */
217
+
218
+ /**
219
+ * @typedef OtpSuccess
220
+ * @property {string} [country_code]
221
+ * @property {string} [message]
222
+ * @property {string} [mobile]
223
+ * @property {string} [register_token]
224
+ * @property {string} [request_id]
225
+ * @property {number} [resend_timer]
226
+ * @property {string} [resend_token]
227
+ * @property {boolean} [success]
228
+ */
229
+
230
+ /**
231
+ * @typedef PasswordLoginRequestSchema
232
+ * @property {string} [captcha_code]
233
+ * @property {string} [password]
234
+ * @property {string} [username]
235
+ */
236
+
237
+ /**
238
+ * @typedef PhoneNumber
239
+ * @property {boolean} [active]
240
+ * @property {number} [country_code]
241
+ * @property {string} [phone]
242
+ * @property {boolean} [primary]
243
+ * @property {boolean} [verified]
244
+ */
245
+
246
+ /**
247
+ * @typedef PlatformEmail
248
+ * @property {boolean} [is_required]
249
+ * @property {string} [level]
250
+ */
251
+
252
+ /**
253
+ * @typedef PlatformMobile
254
+ * @property {boolean} [is_required]
255
+ * @property {string} [level]
256
+ */
257
+
258
+ /**
259
+ * @typedef PlatformSchema
260
+ * @property {string} [_id]
261
+ * @property {boolean} [active]
262
+ * @property {string} [created_at]
263
+ * @property {Object} [delete_account_consent]
264
+ * @property {number} [delete_account_day]
265
+ * @property {DeleteAccountReasons[]} [delete_account_reasons]
266
+ * @property {string} [desktop_image]
267
+ * @property {string} [display]
268
+ * @property {FlashCard} [flash_card]
269
+ * @property {boolean} [forgot_password]
270
+ * @property {Login} [login]
271
+ * @property {LookAndFeel} [look_and_feel]
272
+ * @property {MetaSchema} [meta]
273
+ * @property {string} [mobile_image]
274
+ * @property {string} [name]
275
+ * @property {boolean} [register]
276
+ * @property {RegisterRequiredFields} [register_required_fields]
277
+ * @property {RequiredFields} [required_fields]
278
+ * @property {Object} [session_config]
279
+ * @property {boolean} [skip_captcha]
280
+ * @property {boolean} [skip_login]
281
+ * @property {Social} [social]
282
+ * @property {SocialTokens} [social_tokens]
283
+ * @property {string} [subtext]
284
+ * @property {string} [updated_at]
285
+ */
286
+
287
+ /**
288
+ * @typedef ProfileEditSuccess
289
+ * @property {string} [country_code]
290
+ * @property {string} [email]
291
+ * @property {string} [message]
292
+ * @property {string} [mobile]
293
+ * @property {string} [register_token]
294
+ * @property {string} [request_id]
295
+ * @property {string} [resend_email_token]
296
+ * @property {number} [resend_timer]
297
+ * @property {string} [resend_token]
298
+ * @property {boolean} [success]
299
+ * @property {UserSchema} [user]
300
+ * @property {boolean} [user_exists]
301
+ * @property {boolean} [verify_email_link]
302
+ * @property {boolean} [verify_email_otp]
303
+ * @property {boolean} [verify_mobile_otp]
304
+ */
305
+
306
+ /**
307
+ * @typedef RegisterFormSuccess
308
+ * @property {string} [country_code]
309
+ * @property {string} [email]
310
+ * @property {string} [message]
311
+ * @property {string} [mobile]
312
+ * @property {string} [register_token]
313
+ * @property {string} [request_id]
314
+ * @property {string} [resend_email_token]
315
+ * @property {number} [resend_timer]
316
+ * @property {string} [resend_token]
317
+ * @property {boolean} [success]
318
+ * @property {boolean} [user_exists]
319
+ * @property {boolean} [verify_email_otp]
320
+ * @property {boolean} [verify_mobile_otp]
321
+ */
322
+
323
+ /**
324
+ * @typedef RegisterRequiredFields
325
+ * @property {RegisterRequiredFieldsEmail} [email]
326
+ * @property {RegisterRequiredFieldsMobile} [mobile]
327
+ */
328
+
329
+ /**
330
+ * @typedef RegisterRequiredFieldsEmail
331
+ * @property {boolean} [is_required]
332
+ * @property {string} [level]
333
+ */
334
+
335
+ /**
336
+ * @typedef RegisterRequiredFieldsMobile
337
+ * @property {boolean} [is_required]
338
+ * @property {string} [level]
339
+ */
340
+
341
+ /**
342
+ * @typedef RequiredFields
343
+ * @property {PlatformEmail} [email]
344
+ * @property {PlatformMobile} [mobile]
345
+ */
346
+
347
+ /**
348
+ * @typedef ResetPasswordSuccess
349
+ * @property {string} [status]
350
+ */
351
+
352
+ /**
353
+ * @typedef SendEmailOtpRequestSchema
354
+ * @property {string} [action]
355
+ * @property {string} [captcha_code]
356
+ * @property {string} [email]
357
+ * @property {string} [register_token]
358
+ * @property {string} [token]
359
+ */
360
+
361
+ /**
362
+ * @typedef SendEmailVerifyLinkSuccess
363
+ * @property {boolean} [verify_email_link]
364
+ */
365
+
366
+ /**
367
+ * @typedef SendMobileOtpRequestSchema
368
+ * @property {string} [action]
369
+ * @property {string} [android_hash]
370
+ * @property {string} [captcha_code]
371
+ * @property {string} [country_code]
372
+ * @property {string} [force]
373
+ * @property {string} [mobile]
374
+ * @property {string} [token]
375
+ */
376
+
377
+ /**
378
+ * @typedef SendMobileVerifyLinkSuccess
379
+ * @property {boolean} [verify_mobile_link]
380
+ */
381
+
382
+ /**
383
+ * @typedef SendOtpRequestSchema
384
+ * @property {string} [android_hash]
385
+ * @property {string} [captcha_code]
386
+ * @property {string} [country_code]
387
+ * @property {string} [mobile]
388
+ */
389
+
390
+ /**
391
+ * @typedef SendOtpResponse
392
+ * @property {string} [country_code]
393
+ * @property {string} [email]
394
+ * @property {string} [message]
395
+ * @property {string} [mobile]
396
+ * @property {string} [register_token]
397
+ * @property {string} [request_id]
398
+ * @property {string} [resend_email_token]
399
+ * @property {number} [resend_timer]
400
+ * @property {string} [resend_token]
401
+ * @property {boolean} [success]
402
+ * @property {boolean} [user_exists]
403
+ * @property {boolean} [verify_email_otp]
404
+ * @property {boolean} [verify_mobile_otp]
405
+ */
406
+
407
+ /**
408
+ * @typedef SendResetPasswordEmailRequestSchema
409
+ * @property {string} [captcha_code]
410
+ * @property {string} [email]
411
+ */
412
+
413
+ /**
414
+ * @typedef SendResetPasswordMobileRequestSchema
415
+ * @property {string} [captcha_code]
416
+ * @property {string} [country_code]
417
+ * @property {string} [mobile]
418
+ */
419
+
420
+ /**
421
+ * @typedef SendVerificationLinkMobileRequestSchema
422
+ * @property {boolean} [active]
423
+ * @property {string} [country_code]
424
+ * @property {string} [phone]
425
+ * @property {boolean} [primary]
426
+ * @property {boolean} [verified]
427
+ */
428
+
429
+ /**
430
+ * @typedef SessionExpiry
431
+ * @property {number} [duration]
432
+ * @property {boolean} [is_rolling]
433
+ * @property {string} [type]
434
+ */
435
+
436
+ /**
437
+ * @typedef SessionListSuccess
438
+ * @property {string[]} [sessions]
439
+ */
440
+
441
+ /**
442
+ * @typedef Social
443
+ * @property {boolean} [account_kit]
444
+ * @property {boolean} [apple]
445
+ * @property {boolean} [facebook]
446
+ * @property {boolean} [google]
447
+ */
448
+
449
+ /**
450
+ * @typedef SocialTokens
451
+ * @property {Accountkit} [account_kit]
452
+ * @property {Facebook} [facebook]
453
+ * @property {Google} [google]
454
+ */
455
+
456
+ /**
457
+ * @typedef TokenRequestBodySchema
458
+ * @property {string} [token]
459
+ */
460
+
461
+ /**
462
+ * @typedef UpdatePasswordRequestSchema
463
+ * @property {string} [new_password]
464
+ * @property {string} [old_password]
465
+ */
466
+
467
+ /**
468
+ * @typedef UserObjectSchema
469
+ * @property {UserSchema} [user]
470
+ */
471
+
472
+ /**
473
+ * @typedef UserSchema
474
+ * @property {string} [_id]
475
+ * @property {string} [account_type]
476
+ * @property {boolean} [active]
477
+ * @property {string} [application_id]
478
+ * @property {string} [created_at]
479
+ * @property {string} [dob]
480
+ * @property {Email[]} [emails]
481
+ * @property {string} [first_name]
482
+ * @property {string} [gender]
483
+ * @property {string} [last_name]
484
+ * @property {Object} [meta]
485
+ * @property {PhoneNumber[]} [phone_numbers]
486
+ * @property {string} [profile_pic_url]
487
+ * @property {string} [updated_at]
488
+ * @property {string} [user_id]
489
+ * @property {string} [username]
490
+ */
491
+
492
+ /**
493
+ * @typedef VerifyEmailOtpRequestSchema
494
+ * @property {string} [action]
495
+ * @property {string} [email]
496
+ * @property {string} [otp]
497
+ * @property {string} [register_token]
498
+ */
499
+
500
+ /**
501
+ * @typedef VerifyEmailOTPSuccess
502
+ * @property {UserSchema} [user]
503
+ * @property {boolean} [verify_email_link]
504
+ */
505
+
506
+ /**
507
+ * @typedef VerifyEmailSuccess
508
+ * @property {string} [message]
509
+ */
510
+
511
+ /**
512
+ * @typedef VerifyMobileOTPSuccess
513
+ * @property {UserSchema} [user]
514
+ * @property {boolean} [verify_mobile_link]
515
+ */
516
+
517
+ /**
518
+ * @typedef VerifyOtpRequestSchema
519
+ * @property {string} [otp]
520
+ * @property {string} [register_token]
521
+ * @property {string} [request_id]
522
+ */
523
+
524
+ /**
525
+ * @typedef VerifyOtpSuccess
526
+ * @property {string} [register_token]
527
+ * @property {UserSchema} [user]
528
+ * @property {boolean} [user_exists]
529
+ */
530
+
531
+ class UserApplicationModel {
532
+ /** @returns {Accountkit} */
4
533
  static Accountkit() {
5
534
  return Joi.object({
6
535
  app_id: Joi.string().allow(""),
7
536
  });
8
537
  }
9
- static ArchiveUserRequestSchema() {
10
- return Joi.object({
11
- user_id: Joi.string().allow(""),
12
- });
13
- }
14
- static ArchiveUserSuccess() {
15
- return Joi.object({
16
- success: Joi.boolean(),
17
- });
18
- }
538
+
539
+ /** @returns {AuthenticationApiErrorSchema} */
19
540
  static AuthenticationApiErrorSchema() {
20
541
  return Joi.object({
21
542
  message: Joi.string().allow(""),
22
543
  });
23
544
  }
545
+
546
+ /** @returns {AuthenticationInternalServerErrorSchema} */
24
547
  static AuthenticationInternalServerErrorSchema() {
25
548
  return Joi.object({
26
549
  message: Joi.string().allow(""),
27
550
  });
28
551
  }
552
+
553
+ /** @returns {AuthSuccess} */
29
554
  static AuthSuccess() {
30
555
  return Joi.object({
31
556
  register_token: Joi.string().allow(""),
32
- user: UserModel.UserSchema(),
557
+ user: UserApplicationModel.UserSchema(),
33
558
  user_exists: Joi.boolean(),
34
559
  });
35
560
  }
36
- static AuthSuccessUser() {
37
- return Joi.object({
38
- active: Joi.boolean(),
39
- debug: UserModel.AuthSuccessUserDebug(),
40
- emails: UserModel.AuthSuccessUserEmails(),
41
- first_name: Joi.string().allow(""),
42
- last_name: Joi.string().allow(""),
43
- });
44
- }
45
- static AuthSuccessUserDebug() {
46
- return Joi.object({
47
- platform: Joi.string().allow(""),
48
- });
49
- }
50
- static AuthSuccessUserEmails() {
51
- return Joi.object({
52
- active: Joi.boolean(),
53
- email: Joi.string().allow(""),
54
- primary: Joi.boolean(),
55
- verified: Joi.boolean(),
56
- });
57
- }
58
- static BlockUserRequestSchema() {
59
- return Joi.object({
60
- reason: Joi.string().allow(""),
61
- status: Joi.boolean(),
62
- user_id: Joi.array().items(Joi.string().allow("")),
63
- });
64
- }
65
- static BlockUserSuccess() {
66
- return Joi.object({
67
- success: Joi.boolean(),
68
- });
69
- }
561
+
562
+ /** @returns {CodeRequestBodySchema} */
70
563
  static CodeRequestBodySchema() {
71
564
  return Joi.object({
72
565
  code: Joi.string().allow(""),
73
566
  });
74
567
  }
75
- static CreateUserGroupSchema() {
76
- return Joi.object({
77
- description: Joi.string().allow("").required(),
78
- file_url: Joi.string().allow("").required(),
79
- name: Joi.string().allow("").required(),
80
- });
81
- }
82
- static CreateUserRequestSchema() {
83
- return Joi.object({
84
- email: Joi.string().allow(""),
85
- first_name: Joi.string().allow(""),
86
- gender: Joi.string().allow(""),
87
- last_name: Joi.string().allow(""),
88
- meta: Joi.any(),
89
- phone_number: Joi.string().allow("").required(),
90
- username: Joi.string().allow("").required(),
91
- });
92
- }
93
- static CreateUserResponseSchema() {
94
- return Joi.object({
95
- user: UserModel.UserSchema(),
96
- });
97
- }
98
- static CreateUserSessionRequestSchema() {
99
- return Joi.object({
100
- domain: Joi.string().allow(""),
101
- max_age: Joi.number(),
102
- user_id: Joi.string().allow(""),
103
- });
104
- }
105
- static CreateUserSessionResponseSchema() {
106
- return Joi.object({
107
- cookie: Joi.any(),
108
- domain: Joi.string().allow(""),
109
- http_only: Joi.boolean(),
110
- max_age: Joi.number(),
111
- secure: Joi.boolean(),
112
- });
113
- }
114
- static CustomerListResponseSchema() {
115
- return Joi.object({
116
- items: Joi.array().items(UserModel.UserSchema()),
117
- page: UserModel.PaginationSchema(),
118
- });
119
- }
568
+
569
+ /** @returns {DeleteAccountConsent} */
120
570
  static DeleteAccountConsent() {
121
571
  return Joi.object({
122
572
  consent_text: Joi.string().allow(""),
123
573
  });
124
574
  }
575
+
576
+ /** @returns {DeleteAccountReasons} */
125
577
  static DeleteAccountReasons() {
126
578
  return Joi.object({
127
579
  reason_id: Joi.string().allow(""),
@@ -129,6 +581,8 @@ class UserModel {
129
581
  show_text_area: Joi.boolean(),
130
582
  });
131
583
  }
584
+
585
+ /** @returns {DeleteApplicationUserRequestSchema} */
132
586
  static DeleteApplicationUserRequestSchema() {
133
587
  return Joi.object({
134
588
  otp: Joi.string().allow(""),
@@ -138,28 +592,38 @@ class UserModel {
138
592
  user_id: Joi.string().allow(""),
139
593
  });
140
594
  }
595
+
596
+ /** @returns {DeleteUserSuccess} */
141
597
  static DeleteUserSuccess() {
142
598
  return Joi.object({
143
599
  success: Joi.boolean(),
144
600
  });
145
601
  }
602
+
603
+ /** @returns {EditEmailRequestSchema} */
146
604
  static EditEmailRequestSchema() {
147
605
  return Joi.object({
148
606
  email: Joi.string().allow(""),
149
607
  });
150
608
  }
609
+
610
+ /** @returns {EditMobileRequestSchema} */
151
611
  static EditMobileRequestSchema() {
152
612
  return Joi.object({
153
613
  country_code: Joi.string().allow(""),
154
614
  phone: Joi.string().allow(""),
155
615
  });
156
616
  }
617
+
618
+ /** @returns {EditProfileMobileSchema} */
157
619
  static EditProfileMobileSchema() {
158
620
  return Joi.object({
159
621
  country_code: Joi.string().allow(""),
160
622
  phone: Joi.string().allow(""),
161
623
  });
162
624
  }
625
+
626
+ /** @returns {EditProfileRequestSchema} */
163
627
  static EditProfileRequestSchema() {
164
628
  return Joi.object({
165
629
  android_hash: Joi.string().allow(""),
@@ -169,12 +633,14 @@ class UserModel {
169
633
  first_name: Joi.string().allow(""),
170
634
  gender: Joi.string().allow(""),
171
635
  last_name: Joi.string().allow(""),
172
- mobile: UserModel.EditProfileMobileSchema(),
636
+ mobile: UserApplicationModel.EditProfileMobileSchema(),
173
637
  profile_pic_url: Joi.string().allow(""),
174
638
  register_token: Joi.string().allow(""),
175
639
  sender: Joi.string().allow(""),
176
640
  });
177
641
  }
642
+
643
+ /** @returns {Email} */
178
644
  static Email() {
179
645
  return Joi.object({
180
646
  active: Joi.boolean(),
@@ -183,16 +649,22 @@ class UserModel {
183
649
  verified: Joi.boolean(),
184
650
  });
185
651
  }
652
+
653
+ /** @returns {EmailOtpSuccess} */
186
654
  static EmailOtpSuccess() {
187
655
  return Joi.object({
188
656
  success: Joi.boolean(),
189
657
  });
190
658
  }
659
+
660
+ /** @returns {Facebook} */
191
661
  static Facebook() {
192
662
  return Joi.object({
193
663
  app_id: Joi.string().allow(""),
194
664
  });
195
665
  }
666
+
667
+ /** @returns {FlashCard} */
196
668
  static FlashCard() {
197
669
  return Joi.object({
198
670
  background_color: Joi.string().allow(""),
@@ -200,12 +672,16 @@ class UserModel {
200
672
  text_color: Joi.string().allow(""),
201
673
  });
202
674
  }
675
+
676
+ /** @returns {ForgotPasswordRequestSchema} */
203
677
  static ForgotPasswordRequestSchema() {
204
678
  return Joi.object({
205
679
  code: Joi.string().allow(""),
206
680
  password: Joi.string().allow(""),
207
681
  });
208
682
  }
683
+
684
+ /** @returns {FormRegisterRequestSchema} */
209
685
  static FormRegisterRequestSchema() {
210
686
  return Joi.object({
211
687
  email: Joi.string().allow(""),
@@ -213,72 +689,89 @@ class UserModel {
213
689
  gender: Joi.string().allow(""),
214
690
  last_name: Joi.string().allow(""),
215
691
  password: Joi.string().allow(""),
216
- phone: UserModel.FormRegisterRequestSchemaPhone(),
692
+ phone: UserApplicationModel.FormRegisterRequestSchemaPhone(),
217
693
  register_token: Joi.string().allow(""),
218
694
  });
219
695
  }
696
+
697
+ /** @returns {FormRegisterRequestSchemaPhone} */
220
698
  static FormRegisterRequestSchemaPhone() {
221
699
  return Joi.object({
222
700
  country_code: Joi.string().allow(""),
223
701
  mobile: Joi.string().allow(""),
224
702
  });
225
703
  }
704
+
705
+ /** @returns {Google} */
226
706
  static Google() {
227
707
  return Joi.object({
228
708
  app_id: Joi.string().allow(""),
229
709
  });
230
710
  }
711
+
712
+ /** @returns {HasPasswordSuccess} */
231
713
  static HasPasswordSuccess() {
232
714
  return Joi.object({
233
715
  result: Joi.boolean(),
234
716
  });
235
717
  }
718
+
719
+ /** @returns {Login} */
236
720
  static Login() {
237
721
  return Joi.object({
238
722
  otp: Joi.boolean(),
239
723
  password: Joi.boolean(),
240
724
  });
241
725
  }
726
+
727
+ /** @returns {LoginSuccess} */
242
728
  static LoginSuccess() {
243
729
  return Joi.object({
244
730
  register_token: Joi.string().allow(""),
245
731
  request_id: Joi.string().allow(""),
246
- user: UserModel.UserSchema(),
732
+ user: UserApplicationModel.UserSchema(),
247
733
  });
248
734
  }
735
+
736
+ /** @returns {LogoutSuccess} */
249
737
  static LogoutSuccess() {
250
738
  return Joi.object({
251
739
  logout: Joi.boolean(),
252
740
  });
253
741
  }
742
+
743
+ /** @returns {LookAndFeel} */
254
744
  static LookAndFeel() {
255
745
  return Joi.object({
256
746
  background_color: Joi.string().allow(""),
257
747
  card_position: Joi.string().allow(""),
258
748
  });
259
749
  }
750
+
751
+ /** @returns {MetaSchema} */
260
752
  static MetaSchema() {
261
753
  return Joi.object({
262
754
  fynd_default: Joi.boolean(),
263
755
  });
264
756
  }
265
- static NotFoundSchema() {
266
- return Joi.object({
267
- message: Joi.string().allow(""),
268
- });
269
- }
757
+
758
+ /** @returns {OAuthRequestAppleSchema} */
270
759
  static OAuthRequestAppleSchema() {
271
760
  return Joi.object({
272
- oauth: UserModel.OAuthRequestAppleSchemaOauth(),
273
- profile: UserModel.OAuthRequestAppleSchemaProfile(),
761
+ oauth: UserApplicationModel.OAuthRequestAppleSchemaOauth(),
762
+ profile: UserApplicationModel.OAuthRequestAppleSchemaProfile(),
274
763
  user_identifier: Joi.string().allow(""),
275
764
  });
276
765
  }
766
+
767
+ /** @returns {OAuthRequestAppleSchemaOauth} */
277
768
  static OAuthRequestAppleSchemaOauth() {
278
769
  return Joi.object({
279
770
  identity_token: Joi.string().allow(""),
280
771
  });
281
772
  }
773
+
774
+ /** @returns {OAuthRequestAppleSchemaProfile} */
282
775
  static OAuthRequestAppleSchemaProfile() {
283
776
  return Joi.object({
284
777
  first_name: Joi.string().allow(""),
@@ -286,13 +779,17 @@ class UserModel {
286
779
  last_name: Joi.string().allow(""),
287
780
  });
288
781
  }
782
+
783
+ /** @returns {OAuthRequestSchema} */
289
784
  static OAuthRequestSchema() {
290
785
  return Joi.object({
291
786
  is_signed_in: Joi.boolean(),
292
- oauth2: UserModel.OAuthRequestSchemaOauth2(),
293
- profile: UserModel.OAuthRequestSchemaProfile(),
787
+ oauth2: UserApplicationModel.OAuthRequestSchemaOauth2(),
788
+ profile: UserApplicationModel.OAuthRequestSchemaProfile(),
294
789
  });
295
790
  }
791
+
792
+ /** @returns {OAuthRequestSchemaOauth2} */
296
793
  static OAuthRequestSchemaOauth2() {
297
794
  return Joi.object({
298
795
  access_token: Joi.string().allow(""),
@@ -300,6 +797,8 @@ class UserModel {
300
797
  refresh_token: Joi.string().allow(""),
301
798
  });
302
799
  }
800
+
801
+ /** @returns {OAuthRequestSchemaProfile} */
303
802
  static OAuthRequestSchemaProfile() {
304
803
  return Joi.object({
305
804
  email: Joi.string().allow(""),
@@ -310,6 +809,8 @@ class UserModel {
310
809
  last_name: Joi.string().allow(""),
311
810
  });
312
811
  }
812
+
813
+ /** @returns {OtpSuccess} */
313
814
  static OtpSuccess() {
314
815
  return Joi.object({
315
816
  country_code: Joi.string().allow(""),
@@ -322,15 +823,8 @@ class UserModel {
322
823
  success: Joi.boolean(),
323
824
  });
324
825
  }
325
- static PaginationSchema() {
326
- return Joi.object({
327
- current: Joi.number(),
328
- has_next: Joi.boolean(),
329
- item_total: Joi.number(),
330
- size: Joi.number(),
331
- type: Joi.string().allow(""),
332
- });
333
- }
826
+
827
+ /** @returns {PasswordLoginRequestSchema} */
334
828
  static PasswordLoginRequestSchema() {
335
829
  return Joi.object({
336
830
  captcha_code: Joi.string().allow(""),
@@ -338,6 +832,8 @@ class UserModel {
338
832
  username: Joi.string().allow(""),
339
833
  });
340
834
  }
835
+
836
+ /** @returns {PhoneNumber} */
341
837
  static PhoneNumber() {
342
838
  return Joi.object({
343
839
  active: Joi.boolean(),
@@ -347,18 +843,24 @@ class UserModel {
347
843
  verified: Joi.boolean(),
348
844
  });
349
845
  }
846
+
847
+ /** @returns {PlatformEmail} */
350
848
  static PlatformEmail() {
351
849
  return Joi.object({
352
850
  is_required: Joi.boolean(),
353
851
  level: Joi.string().allow(""),
354
852
  });
355
853
  }
854
+
855
+ /** @returns {PlatformMobile} */
356
856
  static PlatformMobile() {
357
857
  return Joi.object({
358
858
  is_required: Joi.boolean(),
359
859
  level: Joi.string().allow(""),
360
860
  });
361
861
  }
862
+
863
+ /** @returns {PlatformSchema} */
362
864
  static PlatformSchema() {
363
865
  return Joi.object({
364
866
  _id: Joi.string().allow(""),
@@ -367,29 +869,31 @@ class UserModel {
367
869
  delete_account_consent: Joi.any(),
368
870
  delete_account_day: Joi.number(),
369
871
  delete_account_reasons: Joi.array().items(
370
- UserModel.DeleteAccountReasons()
872
+ UserApplicationModel.DeleteAccountReasons()
371
873
  ),
372
874
  desktop_image: Joi.string().allow(""),
373
875
  display: Joi.string().allow(""),
374
- flash_card: UserModel.FlashCard(),
876
+ flash_card: UserApplicationModel.FlashCard(),
375
877
  forgot_password: Joi.boolean(),
376
- login: UserModel.Login(),
377
- look_and_feel: UserModel.LookAndFeel(),
378
- meta: UserModel.MetaSchema(),
878
+ login: UserApplicationModel.Login(),
879
+ look_and_feel: UserApplicationModel.LookAndFeel(),
880
+ meta: UserApplicationModel.MetaSchema(),
379
881
  mobile_image: Joi.string().allow(""),
380
882
  name: Joi.string().allow(""),
381
883
  register: Joi.boolean(),
382
- register_required_fields: UserModel.RegisterRequiredFields(),
383
- required_fields: UserModel.RequiredFields(),
884
+ register_required_fields: UserApplicationModel.RegisterRequiredFields(),
885
+ required_fields: UserApplicationModel.RequiredFields(),
384
886
  session_config: Joi.any(),
385
887
  skip_captcha: Joi.boolean(),
386
888
  skip_login: Joi.boolean(),
387
- social: UserModel.Social(),
388
- social_tokens: UserModel.SocialTokens(),
889
+ social: UserApplicationModel.Social(),
890
+ social_tokens: UserApplicationModel.SocialTokens(),
389
891
  subtext: Joi.string().allow(""),
390
892
  updated_at: Joi.string().allow(""),
391
893
  });
392
894
  }
895
+
896
+ /** @returns {ProfileEditSuccess} */
393
897
  static ProfileEditSuccess() {
394
898
  return Joi.object({
395
899
  country_code: Joi.string().allow(""),
@@ -402,24 +906,15 @@ class UserModel {
402
906
  resend_timer: Joi.number(),
403
907
  resend_token: Joi.string().allow(""),
404
908
  success: Joi.boolean(),
405
- user: UserModel.UserSchema(),
406
- user_exists: Joi.boolean(),
407
- verify_email_link: Joi.boolean(),
408
- verify_email_otp: Joi.boolean(),
409
- verify_mobile_otp: Joi.boolean(),
410
- });
411
- }
412
- static ProfileEditSuccessSchema() {
413
- return Joi.object({
414
- email: Joi.string().allow(""),
415
- register_token: Joi.string().allow(""),
416
- user: Joi.string().allow(""),
909
+ user: UserApplicationModel.UserSchema(),
417
910
  user_exists: Joi.boolean(),
418
911
  verify_email_link: Joi.boolean(),
419
912
  verify_email_otp: Joi.boolean(),
420
913
  verify_mobile_otp: Joi.boolean(),
421
914
  });
422
915
  }
916
+
917
+ /** @returns {RegisterFormSuccess} */
423
918
  static RegisterFormSuccess() {
424
919
  return Joi.object({
425
920
  country_code: Joi.string().allow(""),
@@ -437,48 +932,65 @@ class UserModel {
437
932
  verify_mobile_otp: Joi.boolean(),
438
933
  });
439
934
  }
935
+
936
+ /** @returns {RegisterRequiredFields} */
440
937
  static RegisterRequiredFields() {
441
938
  return Joi.object({
442
- email: UserModel.RegisterRequiredFieldsEmail(),
443
- mobile: UserModel.RegisterRequiredFieldsMobile(),
939
+ email: UserApplicationModel.RegisterRequiredFieldsEmail(),
940
+ mobile: UserApplicationModel.RegisterRequiredFieldsMobile(),
444
941
  });
445
942
  }
943
+
944
+ /** @returns {RegisterRequiredFieldsEmail} */
446
945
  static RegisterRequiredFieldsEmail() {
447
946
  return Joi.object({
448
947
  is_required: Joi.boolean(),
449
948
  level: Joi.string().allow(""),
450
949
  });
451
950
  }
951
+
952
+ /** @returns {RegisterRequiredFieldsMobile} */
452
953
  static RegisterRequiredFieldsMobile() {
453
954
  return Joi.object({
454
955
  is_required: Joi.boolean(),
455
956
  level: Joi.string().allow(""),
456
957
  });
457
958
  }
959
+
960
+ /** @returns {RequiredFields} */
458
961
  static RequiredFields() {
459
962
  return Joi.object({
460
- email: UserModel.PlatformEmail(),
461
- mobile: UserModel.PlatformMobile(),
963
+ email: UserApplicationModel.PlatformEmail(),
964
+ mobile: UserApplicationModel.PlatformMobile(),
462
965
  });
463
966
  }
967
+
968
+ /** @returns {ResetPasswordSuccess} */
464
969
  static ResetPasswordSuccess() {
465
970
  return Joi.object({
466
971
  status: Joi.string().allow(""),
467
972
  });
468
973
  }
974
+
975
+ /** @returns {SendEmailOtpRequestSchema} */
469
976
  static SendEmailOtpRequestSchema() {
470
977
  return Joi.object({
471
978
  action: Joi.string().allow(""),
979
+ captcha_code: Joi.string().allow(""),
472
980
  email: Joi.string().allow(""),
473
981
  register_token: Joi.string().allow(""),
474
982
  token: Joi.string().allow(""),
475
983
  });
476
984
  }
985
+
986
+ /** @returns {SendEmailVerifyLinkSuccess} */
477
987
  static SendEmailVerifyLinkSuccess() {
478
988
  return Joi.object({
479
989
  verify_email_link: Joi.boolean(),
480
990
  });
481
991
  }
992
+
993
+ /** @returns {SendMobileOtpRequestSchema} */
482
994
  static SendMobileOtpRequestSchema() {
483
995
  return Joi.object({
484
996
  action: Joi.string().allow(""),
@@ -490,11 +1002,15 @@ class UserModel {
490
1002
  token: Joi.string().allow(""),
491
1003
  });
492
1004
  }
1005
+
1006
+ /** @returns {SendMobileVerifyLinkSuccess} */
493
1007
  static SendMobileVerifyLinkSuccess() {
494
1008
  return Joi.object({
495
1009
  verify_mobile_link: Joi.boolean(),
496
1010
  });
497
1011
  }
1012
+
1013
+ /** @returns {SendOtpRequestSchema} */
498
1014
  static SendOtpRequestSchema() {
499
1015
  return Joi.object({
500
1016
  android_hash: Joi.string().allow(""),
@@ -503,6 +1019,8 @@ class UserModel {
503
1019
  mobile: Joi.string().allow(""),
504
1020
  });
505
1021
  }
1022
+
1023
+ /** @returns {SendOtpResponse} */
506
1024
  static SendOtpResponse() {
507
1025
  return Joi.object({
508
1026
  country_code: Joi.string().allow(""),
@@ -520,12 +1038,16 @@ class UserModel {
520
1038
  verify_mobile_otp: Joi.boolean(),
521
1039
  });
522
1040
  }
1041
+
1042
+ /** @returns {SendResetPasswordEmailRequestSchema} */
523
1043
  static SendResetPasswordEmailRequestSchema() {
524
1044
  return Joi.object({
525
1045
  captcha_code: Joi.string().allow(""),
526
1046
  email: Joi.string().allow(""),
527
1047
  });
528
1048
  }
1049
+
1050
+ /** @returns {SendResetPasswordMobileRequestSchema} */
529
1051
  static SendResetPasswordMobileRequestSchema() {
530
1052
  return Joi.object({
531
1053
  captcha_code: Joi.string().allow(""),
@@ -533,6 +1055,8 @@ class UserModel {
533
1055
  mobile: Joi.string().allow(""),
534
1056
  });
535
1057
  }
1058
+
1059
+ /** @returns {SendVerificationLinkMobileRequestSchema} */
536
1060
  static SendVerificationLinkMobileRequestSchema() {
537
1061
  return Joi.object({
538
1062
  active: Joi.boolean(),
@@ -542,11 +1066,8 @@ class UserModel {
542
1066
  verified: Joi.boolean(),
543
1067
  });
544
1068
  }
545
- static SessionDeleteResponseSchema() {
546
- return Joi.object({
547
- items: Joi.array().items(Joi.string().allow("")),
548
- });
549
- }
1069
+
1070
+ /** @returns {SessionExpiry} */
550
1071
  static SessionExpiry() {
551
1072
  return Joi.object({
552
1073
  duration: Joi.number(),
@@ -554,25 +1075,15 @@ class UserModel {
554
1075
  type: Joi.string().allow(""),
555
1076
  });
556
1077
  }
557
- static SessionListResponseInfo() {
558
- return Joi.object({
559
- domain: Joi.string().allow(""),
560
- expire_in: Joi.string().allow(""),
561
- ip: Joi.string().allow(""),
562
- session_id: Joi.string().allow(""),
563
- user_agent: Joi.string().allow(""),
564
- });
565
- }
566
- static SessionListResponseSchema() {
567
- return Joi.object({
568
- items: Joi.array().items(UserModel.SessionListResponseInfo()),
569
- });
570
- }
1078
+
1079
+ /** @returns {SessionListSuccess} */
571
1080
  static SessionListSuccess() {
572
1081
  return Joi.object({
573
1082
  sessions: Joi.array().items(Joi.string().allow("")),
574
1083
  });
575
1084
  }
1085
+
1086
+ /** @returns {Social} */
576
1087
  static Social() {
577
1088
  return Joi.object({
578
1089
  account_kit: Joi.boolean(),
@@ -581,106 +1092,39 @@ class UserModel {
581
1092
  google: Joi.boolean(),
582
1093
  });
583
1094
  }
1095
+
1096
+ /** @returns {SocialTokens} */
584
1097
  static SocialTokens() {
585
1098
  return Joi.object({
586
- account_kit: UserModel.Accountkit(),
587
- facebook: UserModel.Facebook(),
588
- google: UserModel.Google(),
1099
+ account_kit: UserApplicationModel.Accountkit(),
1100
+ facebook: UserApplicationModel.Facebook(),
1101
+ google: UserApplicationModel.Google(),
589
1102
  });
590
1103
  }
1104
+
1105
+ /** @returns {TokenRequestBodySchema} */
591
1106
  static TokenRequestBodySchema() {
592
1107
  return Joi.object({
593
1108
  token: Joi.string().allow(""),
594
1109
  });
595
1110
  }
596
- static UnauthenticatedSchema() {
597
- return Joi.object({
598
- authenticated: Joi.boolean(),
599
- });
600
- }
601
- static UnauthorizedSchema() {
602
- return Joi.object({
603
- message: Joi.string().allow(""),
604
- });
605
- }
606
- static UnDeleteUserRequestSchema() {
607
- return Joi.object({
608
- reason: Joi.string().allow(""),
609
- reason_id: Joi.string().allow(""),
610
- user_id: Joi.string().allow(""),
611
- });
612
- }
613
- static UnDeleteUserSuccess() {
614
- return Joi.object({
615
- success: Joi.boolean(),
616
- });
617
- }
1111
+
1112
+ /** @returns {UpdatePasswordRequestSchema} */
618
1113
  static UpdatePasswordRequestSchema() {
619
1114
  return Joi.object({
620
1115
  new_password: Joi.string().allow(""),
621
1116
  old_password: Joi.string().allow(""),
622
1117
  });
623
1118
  }
624
- static UpdateUserGroupSchema() {
625
- return Joi.object({
626
- description: Joi.string().allow(""),
627
- file_url: Joi.string().allow(""),
628
- name: Joi.string().allow(""),
629
- });
630
- }
631
- static UpdateUserRequestSchema() {
632
- return Joi.object({
633
- emails: Joi.array().items(UserModel.UserEmails()),
634
- external_id: Joi.string().allow(""),
635
- first_name: Joi.string().allow(""),
636
- gender: Joi.string().allow(""),
637
- last_name: Joi.string().allow(""),
638
- meta: Joi.any(),
639
- phone_numbers: Joi.array().items(UserModel.UserPhoneNumbers()),
640
- });
641
- }
642
- static UserEmails() {
643
- return Joi.object({
644
- active: Joi.boolean(),
645
- email: Joi.string().allow(""),
646
- primary: Joi.boolean(),
647
- verified: Joi.boolean(),
648
- });
649
- }
650
- static UserGroupListResponseSchema() {
651
- return Joi.object({
652
- items: Joi.array().items(UserModel.UserGroupResponseSchema()),
653
- page: UserModel.PaginationSchema(),
654
- });
655
- }
656
- static UserGroupResponseSchema() {
657
- return Joi.object({
658
- __v: Joi.number(),
659
- _id: Joi.string().allow(""),
660
- application_id: Joi.string().allow(""),
661
- created_at: Joi.string().allow(""),
662
- description: Joi.string().allow(""),
663
- file_url: Joi.string().allow(""),
664
- modified_at: Joi.string().allow(""),
665
- name: Joi.string().allow(""),
666
- status: Joi.string().allow(""),
667
- uid: Joi.number(),
668
- });
669
- }
1119
+
1120
+ /** @returns {UserObjectSchema} */
670
1121
  static UserObjectSchema() {
671
1122
  return Joi.object({
672
- user: UserModel.UserSchema(),
673
- });
674
- }
675
- static UserPhoneNumbers() {
676
- return Joi.object({
677
- active: Joi.boolean(),
678
- country_code: Joi.string().allow(""),
679
- phone: Joi.string().allow(""),
680
- primary: Joi.boolean(),
681
- verified: Joi.boolean(),
1123
+ user: UserApplicationModel.UserSchema(),
682
1124
  });
683
1125
  }
1126
+
1127
+ /** @returns {UserSchema} */
684
1128
  static UserSchema() {
685
1129
  return Joi.object({
686
1130
  _id: Joi.string().allow(""),
@@ -689,23 +1133,20 @@ class UserModel {
689
1133
  application_id: Joi.string().allow(""),
690
1134
  created_at: Joi.string().allow(""),
691
1135
  dob: Joi.string().allow(""),
692
- emails: Joi.array().items(UserModel.Email()),
1136
+ emails: Joi.array().items(UserApplicationModel.Email()),
693
1137
  first_name: Joi.string().allow(""),
694
1138
  gender: Joi.string().allow(""),
695
1139
  last_name: Joi.string().allow(""),
696
1140
  meta: Joi.any(),
697
- phone_numbers: Joi.array().items(UserModel.PhoneNumber()),
1141
+ phone_numbers: Joi.array().items(UserApplicationModel.PhoneNumber()),
698
1142
  profile_pic_url: Joi.string().allow(""),
699
1143
  updated_at: Joi.string().allow(""),
700
1144
  user_id: Joi.string().allow(""),
701
1145
  username: Joi.string().allow(""),
702
1146
  });
703
1147
  }
704
- static UserSearchResponseSchema() {
705
- return Joi.object({
706
- users: Joi.array().items(UserModel.UserSchema()),
707
- });
708
- }
1148
+
1149
+ /** @returns {VerifyEmailOtpRequestSchema} */
709
1150
  static VerifyEmailOtpRequestSchema() {
710
1151
  return Joi.object({
711
1152
  action: Joi.string().allow(""),
@@ -714,23 +1155,31 @@ class UserModel {
714
1155
  register_token: Joi.string().allow(""),
715
1156
  });
716
1157
  }
1158
+
1159
+ /** @returns {VerifyEmailOTPSuccess} */
717
1160
  static VerifyEmailOTPSuccess() {
718
1161
  return Joi.object({
719
- user: UserModel.UserSchema(),
1162
+ user: UserApplicationModel.UserSchema(),
720
1163
  verify_email_link: Joi.boolean(),
721
1164
  });
722
1165
  }
1166
+
1167
+ /** @returns {VerifyEmailSuccess} */
723
1168
  static VerifyEmailSuccess() {
724
1169
  return Joi.object({
725
1170
  message: Joi.string().allow(""),
726
1171
  });
727
1172
  }
1173
+
1174
+ /** @returns {VerifyMobileOTPSuccess} */
728
1175
  static VerifyMobileOTPSuccess() {
729
1176
  return Joi.object({
730
- user: UserModel.UserSchema(),
1177
+ user: UserApplicationModel.UserSchema(),
731
1178
  verify_mobile_link: Joi.boolean(),
732
1179
  });
733
1180
  }
1181
+
1182
+ /** @returns {VerifyOtpRequestSchema} */
734
1183
  static VerifyOtpRequestSchema() {
735
1184
  return Joi.object({
736
1185
  otp: Joi.string().allow(""),
@@ -738,12 +1187,14 @@ class UserModel {
738
1187
  request_id: Joi.string().allow(""),
739
1188
  });
740
1189
  }
1190
+
1191
+ /** @returns {VerifyOtpSuccess} */
741
1192
  static VerifyOtpSuccess() {
742
1193
  return Joi.object({
743
1194
  register_token: Joi.string().allow(""),
744
- user: UserModel.UserSchema(),
1195
+ user: UserApplicationModel.UserSchema(),
745
1196
  user_exists: Joi.boolean(),
746
1197
  });
747
1198
  }
748
1199
  }
749
- module.exports = UserModel;
1200
+ module.exports = UserApplicationModel;