@openinc/parse-server-opendash 2.3.2 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/dist/config.d.ts +2 -2
  2. package/dist/config.js +438 -438
  3. package/dist/featuremap.json +73 -73
  4. package/dist/functions/_init.d.ts +1 -1
  5. package/dist/functions/_init.js +20 -20
  6. package/dist/functions/getAdminConfig.d.ts +1 -1
  7. package/dist/functions/getAdminConfig.js +63 -63
  8. package/dist/functions/getSchemaForAdmin.d.ts +1 -1
  9. package/dist/functions/getSchemaForAdmin.js +14 -14
  10. package/dist/functions/opendash-geo-features.d.ts +1 -1
  11. package/dist/functions/opendash-geo-features.js +19 -19
  12. package/dist/functions/openinc-auth-change-password.d.ts +1 -1
  13. package/dist/functions/openinc-auth-change-password.js +30 -30
  14. package/dist/functions/openinc-auth-confirm-email.d.ts +1 -1
  15. package/dist/functions/openinc-auth-confirm-email.js +18 -18
  16. package/dist/functions/openinc-auth-email-confirmation-request.d.ts +1 -1
  17. package/dist/functions/openinc-auth-email-confirmation-request.js +42 -34
  18. package/dist/functions/openinc-auth-email-confirmation.d.ts +1 -1
  19. package/dist/functions/openinc-auth-email-confirmation.js +23 -23
  20. package/dist/functions/openinc-auth-login-admin.d.ts +1 -1
  21. package/dist/functions/openinc-auth-login-admin.js +69 -69
  22. package/dist/functions/openinc-auth-login-passwordless.d.ts +1 -1
  23. package/dist/functions/openinc-auth-login-passwordless.js +50 -42
  24. package/dist/functions/openinc-auth-login.d.ts +1 -1
  25. package/dist/functions/openinc-auth-login.js +45 -45
  26. package/dist/functions/openinc-auth-password-reset-request.d.ts +1 -1
  27. package/dist/functions/openinc-auth-password-reset-request.js +42 -34
  28. package/dist/functions/openinc-auth-password-reset.d.ts +1 -1
  29. package/dist/functions/openinc-auth-password-reset.js +28 -28
  30. package/dist/functions/openinc-auth-signup.d.ts +1 -1
  31. package/dist/functions/openinc-auth-signup.js +88 -88
  32. package/dist/functions/openinc-auth-validate-token.d.ts +1 -1
  33. package/dist/functions/openinc-auth-validate-token.js +34 -34
  34. package/dist/functions/openinc-auth.common.d.ts +15 -15
  35. package/dist/functions/openinc-auth.common.js +47 -47
  36. package/dist/functions/openinc-config.d.ts +1 -1
  37. package/dist/functions/openinc-config.js +92 -92
  38. package/dist/functions/openinc-geo-google-autocomplete.d.ts +1 -1
  39. package/dist/functions/openinc-geo-google-autocomplete.js +58 -58
  40. package/dist/functions/openinc-geo-google.common.d.ts +2 -2
  41. package/dist/functions/openinc-geo-google.common.js +34 -34
  42. package/dist/functions/openinc-geo-graphhopper-geocode-reverse-raw.d.ts +1 -1
  43. package/dist/functions/openinc-geo-graphhopper-geocode-reverse-raw.js +24 -24
  44. package/dist/functions/openinc-geo-graphhopper-geocode-reverse.d.ts +1 -1
  45. package/dist/functions/openinc-geo-graphhopper-geocode-reverse.js +24 -24
  46. package/dist/functions/openinc-geo-graphhopper-geocode.d.ts +1 -1
  47. package/dist/functions/openinc-geo-graphhopper-geocode.js +24 -24
  48. package/dist/functions/openinc-geo-graphhopper-route-simple.d.ts +1 -1
  49. package/dist/functions/openinc-geo-graphhopper-route-simple.js +33 -33
  50. package/dist/functions/openinc-geo-graphhopper.common.d.ts +2 -2
  51. package/dist/functions/openinc-geo-graphhopper.common.js +60 -60
  52. package/dist/helper/Config.d.ts +33 -33
  53. package/dist/helper/Config.js +156 -156
  54. package/dist/helper/pdf2img.d.ts +12 -12
  55. package/dist/helper/pdf2img.js +111 -111
  56. package/dist/hooks/Alarm.d.ts +1 -1
  57. package/dist/hooks/Alarm.js +40 -40
  58. package/dist/hooks/AlarmAction.d.ts +1 -1
  59. package/dist/hooks/AlarmAction.js +15 -15
  60. package/dist/hooks/AlarmWebhook.d.ts +1 -1
  61. package/dist/hooks/AlarmWebhook.js +16 -16
  62. package/dist/hooks/Attachment.d.ts +1 -1
  63. package/dist/hooks/Attachment.js +18 -18
  64. package/dist/hooks/BDE_Form.d.ts +1 -1
  65. package/dist/hooks/BDE_Form.js +53 -53
  66. package/dist/hooks/BDE_List.d.ts +1 -1
  67. package/dist/hooks/BDE_List.js +17 -17
  68. package/dist/hooks/BDE_ListEntry.d.ts +1 -1
  69. package/dist/hooks/BDE_ListEntry.js +17 -17
  70. package/dist/hooks/BDE_Page.d.ts +1 -1
  71. package/dist/hooks/BDE_Page.js +44 -44
  72. package/dist/hooks/BDE_Result.d.ts +1 -1
  73. package/dist/hooks/BDE_Result.js +128 -128
  74. package/dist/hooks/BDE_Unit.d.ts +1 -1
  75. package/dist/hooks/BDE_Unit.js +17 -17
  76. package/dist/hooks/Config.d.ts +1 -1
  77. package/dist/hooks/Config.js +16 -16
  78. package/dist/hooks/Dashboard.d.ts +1 -1
  79. package/dist/hooks/Dashboard.js +33 -33
  80. package/dist/hooks/GTFS_Agency.d.ts +1 -1
  81. package/dist/hooks/GTFS_Agency.js +18 -18
  82. package/dist/hooks/GTFS_Bikes_Allowed.d.ts +1 -1
  83. package/dist/hooks/GTFS_Bikes_Allowed.js +18 -18
  84. package/dist/hooks/GTFS_Calendar.d.ts +1 -1
  85. package/dist/hooks/GTFS_Calendar.js +18 -18
  86. package/dist/hooks/GTFS_Direction.d.ts +1 -1
  87. package/dist/hooks/GTFS_Direction.js +18 -18
  88. package/dist/hooks/GTFS_Level.d.ts +1 -1
  89. package/dist/hooks/GTFS_Level.js +18 -18
  90. package/dist/hooks/GTFS_Location_Type.d.ts +1 -1
  91. package/dist/hooks/GTFS_Location_Type.js +18 -18
  92. package/dist/hooks/GTFS_Route.d.ts +1 -1
  93. package/dist/hooks/GTFS_Route.js +18 -18
  94. package/dist/hooks/GTFS_Route_Type.d.ts +1 -1
  95. package/dist/hooks/GTFS_Route_Type.js +18 -18
  96. package/dist/hooks/GTFS_Stop.d.ts +1 -1
  97. package/dist/hooks/GTFS_Stop.js +18 -18
  98. package/dist/hooks/GTFS_Stop_Times.d.ts +1 -1
  99. package/dist/hooks/GTFS_Stop_Times.js +18 -18
  100. package/dist/hooks/GTFS_Trip.d.ts +1 -1
  101. package/dist/hooks/GTFS_Trip.js +18 -18
  102. package/dist/hooks/GTFS_Wheelchair_Accessible.d.ts +1 -1
  103. package/dist/hooks/GTFS_Wheelchair_Accessible.js +18 -18
  104. package/dist/hooks/GTFS_Wheelchair_Boarding.d.ts +1 -1
  105. package/dist/hooks/GTFS_Wheelchair_Boarding.js +18 -18
  106. package/dist/hooks/Group.d.ts +1 -1
  107. package/dist/hooks/Group.js +56 -56
  108. package/dist/hooks/Knowledge_Article.d.ts +1 -1
  109. package/dist/hooks/Knowledge_Article.js +18 -18
  110. package/dist/hooks/Knowledge_Category.d.ts +1 -1
  111. package/dist/hooks/Knowledge_Category.js +18 -18
  112. package/dist/hooks/Knowledge_Document.d.ts +1 -1
  113. package/dist/hooks/Knowledge_Document.js +60 -60
  114. package/dist/hooks/Knowledge_DocumentPage.d.ts +1 -1
  115. package/dist/hooks/Knowledge_DocumentPage.js +22 -22
  116. package/dist/hooks/Knowledge_Video.d.ts +1 -1
  117. package/dist/hooks/Knowledge_Video.js +18 -18
  118. package/dist/hooks/Language.d.ts +1 -1
  119. package/dist/hooks/Language.js +18 -18
  120. package/dist/hooks/Log.d.ts +1 -1
  121. package/dist/hooks/Log.js +18 -18
  122. package/dist/hooks/MIAAS_MDSEndpoint.d.ts +1 -1
  123. package/dist/hooks/MIAAS_MDSEndpoint.js +18 -18
  124. package/dist/hooks/Maintenance_Article.d.ts +1 -1
  125. package/dist/hooks/Maintenance_Article.js +18 -18
  126. package/dist/hooks/Maintenance_Downtime.d.ts +1 -1
  127. package/dist/hooks/Maintenance_Downtime.js +18 -18
  128. package/dist/hooks/Maintenance_Duedate.d.ts +1 -1
  129. package/dist/hooks/Maintenance_Duedate.js +18 -18
  130. package/dist/hooks/Maintenance_Frequency.d.ts +1 -1
  131. package/dist/hooks/Maintenance_Frequency.js +18 -18
  132. package/dist/hooks/Maintenance_Issuecategory.d.ts +1 -1
  133. package/dist/hooks/Maintenance_Issuecategory.js +21 -21
  134. package/dist/hooks/Maintenance_Item.d.ts +1 -1
  135. package/dist/hooks/Maintenance_Item.js +18 -18
  136. package/dist/hooks/Maintenance_Kanban_State.d.ts +1 -1
  137. package/dist/hooks/Maintenance_Kanban_State.js +18 -18
  138. package/dist/hooks/Maintenance_Media.d.ts +1 -1
  139. package/dist/hooks/Maintenance_Media.js +18 -18
  140. package/dist/hooks/Maintenance_Message.d.ts +1 -1
  141. package/dist/hooks/Maintenance_Message.js +18 -18
  142. package/dist/hooks/Maintenance_Message_Body.d.ts +1 -1
  143. package/dist/hooks/Maintenance_Message_Body.js +18 -18
  144. package/dist/hooks/Maintenance_Order.d.ts +1 -1
  145. package/dist/hooks/Maintenance_Order.js +18 -18
  146. package/dist/hooks/Maintenance_Priority.d.ts +1 -1
  147. package/dist/hooks/Maintenance_Priority.js +18 -18
  148. package/dist/hooks/Maintenance_Restriction.d.ts +1 -1
  149. package/dist/hooks/Maintenance_Restriction.js +18 -18
  150. package/dist/hooks/Maintenance_Schedule.d.ts +1 -1
  151. package/dist/hooks/Maintenance_Schedule.js +18 -18
  152. package/dist/hooks/Maintenance_Schedule_Execution.d.ts +1 -1
  153. package/dist/hooks/Maintenance_Schedule_Execution.js +18 -18
  154. package/dist/hooks/Maintenance_Schedule_Execution_Step.d.ts +1 -1
  155. package/dist/hooks/Maintenance_Schedule_Execution_Step.js +18 -18
  156. package/dist/hooks/Maintenance_Schedule_Step.d.ts +1 -1
  157. package/dist/hooks/Maintenance_Schedule_Step.js +18 -18
  158. package/dist/hooks/Maintenance_SourceMeta.d.ts +1 -1
  159. package/dist/hooks/Maintenance_SourceMeta.js +18 -18
  160. package/dist/hooks/Maintenance_Ticket.d.ts +1 -1
  161. package/dist/hooks/Maintenance_Ticket.js +18 -18
  162. package/dist/hooks/Maintenance_Ticket_Issuecategory.d.ts +1 -1
  163. package/dist/hooks/Maintenance_Ticket_Issuecategory.js +18 -18
  164. package/dist/hooks/Maintenance_Ticket_Kanban_State.d.ts +1 -1
  165. package/dist/hooks/Maintenance_Ticket_Kanban_State.js +23 -23
  166. package/dist/hooks/Maintenance_Ticket_Source.d.ts +1 -1
  167. package/dist/hooks/Maintenance_Ticket_Source.js +18 -18
  168. package/dist/hooks/Monitoring_Slideshow.d.ts +1 -1
  169. package/dist/hooks/Monitoring_Slideshow.js +18 -18
  170. package/dist/hooks/NavigationGroup.d.ts +1 -1
  171. package/dist/hooks/NavigationGroup.js +15 -15
  172. package/dist/hooks/NavigationItem.d.ts +1 -1
  173. package/dist/hooks/NavigationItem.js +16 -16
  174. package/dist/hooks/Notification.d.ts +1 -1
  175. package/dist/hooks/Notification.js +73 -73
  176. package/dist/hooks/Permission.d.ts +1 -1
  177. package/dist/hooks/Permission.js +19 -19
  178. package/dist/hooks/Push.d.ts +1 -1
  179. package/dist/hooks/Push.js +30 -30
  180. package/dist/hooks/Report.d.ts +1 -1
  181. package/dist/hooks/Report.js +16 -16
  182. package/dist/hooks/Share.d.ts +1 -1
  183. package/dist/hooks/Share.js +16 -16
  184. package/dist/hooks/Source.d.ts +1 -1
  185. package/dist/hooks/Source.js +91 -91
  186. package/dist/hooks/Tenant.d.ts +1 -1
  187. package/dist/hooks/Tenant.js +75 -75
  188. package/dist/hooks/TenantTrustedDomain.d.ts +1 -1
  189. package/dist/hooks/TenantTrustedDomain.js +12 -12
  190. package/dist/hooks/UserData.d.ts +1 -1
  191. package/dist/hooks/UserData.js +16 -16
  192. package/dist/hooks/VirtualKPI.d.ts +1 -1
  193. package/dist/hooks/VirtualKPI.js +18 -18
  194. package/dist/hooks/Widget.d.ts +1 -1
  195. package/dist/hooks/Widget.js +16 -16
  196. package/dist/hooks/WidgetPreset.d.ts +1 -1
  197. package/dist/hooks/WidgetPreset.js +18 -18
  198. package/dist/hooks/_User.d.ts +1 -1
  199. package/dist/hooks/_User.js +108 -99
  200. package/dist/hooks/_beforeLogin.d.ts +1 -1
  201. package/dist/hooks/_beforeLogin.js +22 -22
  202. package/dist/hooks/_init.d.ts +1 -1
  203. package/dist/hooks/_init.js +23 -23
  204. package/dist/index.d.ts +72 -65
  205. package/dist/index.js +463 -432
  206. package/dist/ow.d.ts +20 -20
  207. package/dist/ow.js +91 -91
  208. package/dist/types/Alarm.d.ts +36 -36
  209. package/dist/types/Alarm.js +59 -59
  210. package/dist/types/AlarmAction.d.ts +42 -42
  211. package/dist/types/AlarmAction.js +71 -71
  212. package/dist/types/AlarmWebhook.d.ts +40 -40
  213. package/dist/types/AlarmWebhook.js +65 -65
  214. package/dist/types/Attachment.d.ts +21 -21
  215. package/dist/types/Attachment.js +29 -29
  216. package/dist/types/BDE_Form.d.ts +26 -26
  217. package/dist/types/BDE_Form.js +41 -41
  218. package/dist/types/BDE_List.d.ts +14 -14
  219. package/dist/types/BDE_List.js +17 -17
  220. package/dist/types/BDE_ListEntry.d.ts +21 -21
  221. package/dist/types/BDE_ListEntry.js +29 -29
  222. package/dist/types/BDE_Page.d.ts +17 -17
  223. package/dist/types/BDE_Page.js +23 -23
  224. package/dist/types/BDE_Result.d.ts +20 -20
  225. package/dist/types/BDE_Result.js +29 -29
  226. package/dist/types/BDE_Unit.d.ts +23 -23
  227. package/dist/types/BDE_Unit.js +32 -32
  228. package/dist/types/Config.d.ts +24 -24
  229. package/dist/types/Config.js +35 -35
  230. package/dist/types/Dashboard.d.ts +34 -34
  231. package/dist/types/Dashboard.js +53 -53
  232. package/dist/types/GTFS_Agency.d.ts +35 -35
  233. package/dist/types/GTFS_Agency.js +59 -59
  234. package/dist/types/GTFS_Bikes_Allowed.d.ts +17 -17
  235. package/dist/types/GTFS_Bikes_Allowed.js +23 -23
  236. package/dist/types/GTFS_Calendar.d.ts +38 -38
  237. package/dist/types/GTFS_Calendar.js +65 -65
  238. package/dist/types/GTFS_Direction.d.ts +17 -17
  239. package/dist/types/GTFS_Direction.js +23 -23
  240. package/dist/types/GTFS_Level.d.ts +17 -17
  241. package/dist/types/GTFS_Level.js +23 -23
  242. package/dist/types/GTFS_Location_Type.d.ts +20 -20
  243. package/dist/types/GTFS_Location_Type.js +29 -29
  244. package/dist/types/GTFS_Route.d.ts +42 -42
  245. package/dist/types/GTFS_Route.js +71 -71
  246. package/dist/types/GTFS_Route_Type.d.ts +20 -20
  247. package/dist/types/GTFS_Route_Type.js +29 -29
  248. package/dist/types/GTFS_Stop.d.ts +56 -56
  249. package/dist/types/GTFS_Stop.js +95 -95
  250. package/dist/types/GTFS_Stop_Times.d.ts +28 -28
  251. package/dist/types/GTFS_Stop_Times.js +41 -41
  252. package/dist/types/GTFS_Trip.d.ts +37 -37
  253. package/dist/types/GTFS_Trip.js +53 -53
  254. package/dist/types/GTFS_Wheelchair_Accessible.d.ts +17 -17
  255. package/dist/types/GTFS_Wheelchair_Accessible.js +23 -23
  256. package/dist/types/GTFS_Wheelchair_Boarding.d.ts +20 -20
  257. package/dist/types/GTFS_Wheelchair_Boarding.js +29 -29
  258. package/dist/types/Group.d.ts +32 -32
  259. package/dist/types/Group.js +47 -47
  260. package/dist/types/Knowledge_Article.d.ts +29 -29
  261. package/dist/types/Knowledge_Article.js +41 -41
  262. package/dist/types/Knowledge_Category.d.ts +25 -25
  263. package/dist/types/Knowledge_Category.js +35 -35
  264. package/dist/types/Knowledge_Document.d.ts +29 -29
  265. package/dist/types/Knowledge_Document.js +41 -41
  266. package/dist/types/Knowledge_DocumentPage.d.ts +31 -31
  267. package/dist/types/Knowledge_DocumentPage.js +47 -47
  268. package/dist/types/Knowledge_Video.d.ts +35 -35
  269. package/dist/types/Knowledge_Video.js +53 -53
  270. package/dist/types/Language.d.ts +14 -14
  271. package/dist/types/Language.js +17 -17
  272. package/dist/types/Log.d.ts +17 -17
  273. package/dist/types/Log.js +23 -23
  274. package/dist/types/MIAAS_MDSEndpoint.d.ts +26 -26
  275. package/dist/types/MIAAS_MDSEndpoint.js +41 -41
  276. package/dist/types/Maintenance_Article.d.ts +32 -32
  277. package/dist/types/Maintenance_Article.js +44 -44
  278. package/dist/types/Maintenance_Downtime.d.ts +26 -26
  279. package/dist/types/Maintenance_Downtime.js +35 -35
  280. package/dist/types/Maintenance_Duedate.d.ts +35 -35
  281. package/dist/types/Maintenance_Duedate.js +53 -53
  282. package/dist/types/Maintenance_Frequency.d.ts +26 -26
  283. package/dist/types/Maintenance_Frequency.js +35 -35
  284. package/dist/types/Maintenance_Issuecategory.d.ts +33 -33
  285. package/dist/types/Maintenance_Issuecategory.js +50 -50
  286. package/dist/types/Maintenance_Item.d.ts +21 -21
  287. package/dist/types/Maintenance_Item.js +29 -29
  288. package/dist/types/Maintenance_Kanban_State.d.ts +33 -33
  289. package/dist/types/Maintenance_Kanban_State.js +53 -53
  290. package/dist/types/Maintenance_Media.d.ts +21 -21
  291. package/dist/types/Maintenance_Media.js +29 -29
  292. package/dist/types/Maintenance_Message.d.ts +27 -27
  293. package/dist/types/Maintenance_Message.js +41 -41
  294. package/dist/types/Maintenance_Message_Body.d.ts +22 -22
  295. package/dist/types/Maintenance_Message_Body.js +29 -29
  296. package/dist/types/Maintenance_Order.d.ts +24 -24
  297. package/dist/types/Maintenance_Order.js +32 -32
  298. package/dist/types/Maintenance_Priority.d.ts +26 -26
  299. package/dist/types/Maintenance_Priority.js +35 -35
  300. package/dist/types/Maintenance_Restriction.d.ts +26 -26
  301. package/dist/types/Maintenance_Restriction.js +35 -35
  302. package/dist/types/Maintenance_Schedule.d.ts +37 -37
  303. package/dist/types/Maintenance_Schedule.js +56 -56
  304. package/dist/types/Maintenance_Schedule_Execution.d.ts +39 -39
  305. package/dist/types/Maintenance_Schedule_Execution.js +56 -56
  306. package/dist/types/Maintenance_Schedule_Execution_Step.d.ts +44 -44
  307. package/dist/types/Maintenance_Schedule_Execution_Step.js +71 -71
  308. package/dist/types/Maintenance_Schedule_Step.d.ts +38 -38
  309. package/dist/types/Maintenance_Schedule_Step.js +59 -59
  310. package/dist/types/Maintenance_SourceMeta.d.ts +23 -23
  311. package/dist/types/Maintenance_SourceMeta.js +29 -29
  312. package/dist/types/Maintenance_Ticket.d.ts +30 -30
  313. package/dist/types/Maintenance_Ticket.js +41 -41
  314. package/dist/types/Maintenance_Ticket_Issuecategory.d.ts +27 -27
  315. package/dist/types/Maintenance_Ticket_Issuecategory.js +35 -35
  316. package/dist/types/Maintenance_Ticket_Kanban_State.d.ts +27 -27
  317. package/dist/types/Maintenance_Ticket_Kanban_State.js +35 -35
  318. package/dist/types/Maintenance_Ticket_Source.d.ts +27 -27
  319. package/dist/types/Maintenance_Ticket_Source.js +35 -35
  320. package/dist/types/Monitoring_Slideshow.d.ts +20 -20
  321. package/dist/types/Monitoring_Slideshow.js +26 -26
  322. package/dist/types/NavigationGroup.d.ts +24 -24
  323. package/dist/types/NavigationGroup.js +35 -35
  324. package/dist/types/NavigationItem.d.ts +48 -48
  325. package/dist/types/NavigationItem.js +83 -83
  326. package/dist/types/Notification.d.ts +30 -30
  327. package/dist/types/Notification.js +47 -47
  328. package/dist/types/Permission.d.ts +18 -18
  329. package/dist/types/Permission.js +23 -23
  330. package/dist/types/Push.d.ts +27 -27
  331. package/dist/types/Push.js +41 -41
  332. package/dist/types/Report.d.ts +39 -39
  333. package/dist/types/Report.js +65 -65
  334. package/dist/types/Share.d.ts +34 -34
  335. package/dist/types/Share.js +53 -53
  336. package/dist/types/Source.d.ts +26 -26
  337. package/dist/types/Source.js +38 -38
  338. package/dist/types/Tenant.d.ts +45 -45
  339. package/dist/types/Tenant.js +77 -77
  340. package/dist/types/TenantTrustedDomain.d.ts +18 -18
  341. package/dist/types/TenantTrustedDomain.js +23 -23
  342. package/dist/types/UserData.d.ts +21 -21
  343. package/dist/types/UserData.js +29 -29
  344. package/dist/types/VirtualKPI.d.ts +21 -21
  345. package/dist/types/VirtualKPI.js +29 -29
  346. package/dist/types/Widget.d.ts +24 -24
  347. package/dist/types/Widget.js +35 -35
  348. package/dist/types/WidgetPreset.d.ts +40 -40
  349. package/dist/types/WidgetPreset.js +65 -65
  350. package/dist/types/_Role.d.ts +13 -13
  351. package/dist/types/_Role.js +2 -2
  352. package/dist/types/_Session.d.ts +15 -15
  353. package/dist/types/_Session.js +2 -2
  354. package/dist/types/_User.d.ts +28 -28
  355. package/dist/types/_User.js +2 -2
  356. package/dist/types/index.d.ts +148 -148
  357. package/dist/types/index.js +146 -146
  358. package/package.json +3 -1
@@ -1,69 +1,69 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
4
- const openinc_auth_common_1 = require("./openinc-auth.common");
5
- async function init(name) {
6
- Parse.Cloud.define(name, async function (request) {
7
- const params = request.params;
8
- if (!params.userId && !params.email && !params.username) {
9
- throw new Parse.Error(Parse.Error.VALIDATION_ERROR, "Missing either userId, email or username.");
10
- }
11
- async function getUser() {
12
- try {
13
- if (params.userId) {
14
- return await new Parse.Query(Parse.User).get(params.userId, {
15
- useMasterKey: true,
16
- });
17
- }
18
- if (params.email) {
19
- return await new Parse.Query(Parse.User)
20
- .equalTo("email", params.email)
21
- .first({
22
- useMasterKey: true,
23
- });
24
- }
25
- if (params.username) {
26
- return await new Parse.Query(Parse.User)
27
- .equalTo("username", params.username)
28
- .first({
29
- useMasterKey: true,
30
- });
31
- }
32
- return undefined;
33
- }
34
- catch (error) {
35
- return undefined;
36
- }
37
- }
38
- const user = await getUser();
39
- if (!user) {
40
- throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "User not found.");
41
- }
42
- const sessionToken = await (0, openinc_auth_common_1.createSessionToken)(user, request.installationId, {
43
- action: "login",
44
- provider: "openinc-auth-login-admin",
45
- by: request.user?.id,
46
- });
47
- return {
48
- sessionToken,
49
- };
50
- }, {
51
- requireUser: true,
52
- requireAnyUserRoles: ["od-admin"],
53
- fields: {
54
- userId: {
55
- required: false,
56
- type: String,
57
- },
58
- email: {
59
- required: false,
60
- type: String,
61
- },
62
- username: {
63
- required: false,
64
- type: String,
65
- },
66
- },
67
- });
68
- }
69
- exports.init = init;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ const openinc_auth_common_1 = require("./openinc-auth.common");
5
+ async function init(name) {
6
+ Parse.Cloud.define(name, async function (request) {
7
+ const params = request.params;
8
+ if (!params.userId && !params.email && !params.username) {
9
+ throw new Parse.Error(Parse.Error.VALIDATION_ERROR, "Missing either userId, email or username.");
10
+ }
11
+ async function getUser() {
12
+ try {
13
+ if (params.userId) {
14
+ return await new Parse.Query(Parse.User).get(params.userId, {
15
+ useMasterKey: true,
16
+ });
17
+ }
18
+ if (params.email) {
19
+ return await new Parse.Query(Parse.User)
20
+ .equalTo("email", params.email)
21
+ .first({
22
+ useMasterKey: true,
23
+ });
24
+ }
25
+ if (params.username) {
26
+ return await new Parse.Query(Parse.User)
27
+ .equalTo("username", params.username)
28
+ .first({
29
+ useMasterKey: true,
30
+ });
31
+ }
32
+ return undefined;
33
+ }
34
+ catch (error) {
35
+ return undefined;
36
+ }
37
+ }
38
+ const user = await getUser();
39
+ if (!user) {
40
+ throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "User not found.");
41
+ }
42
+ const sessionToken = await (0, openinc_auth_common_1.createSessionToken)(user, request.installationId, {
43
+ action: "login",
44
+ provider: "openinc-auth-login-admin",
45
+ by: request.user?.id,
46
+ });
47
+ return {
48
+ sessionToken,
49
+ };
50
+ }, {
51
+ requireUser: true,
52
+ requireAnyUserRoles: ["od-admin"],
53
+ fields: {
54
+ userId: {
55
+ required: false,
56
+ type: String,
57
+ },
58
+ email: {
59
+ required: false,
60
+ type: String,
61
+ },
62
+ username: {
63
+ required: false,
64
+ type: String,
65
+ },
66
+ },
67
+ });
68
+ }
69
+ exports.init = init;
@@ -1 +1 @@
1
- export declare function init(name: string): Promise<void>;
1
+ export declare function init(name: string): Promise<void>;
@@ -1,42 +1,50 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
4
- const __1 = require("..");
5
- const openinc_auth_common_1 = require("./openinc-auth.common");
6
- async function init(name) {
7
- Parse.Cloud.define(name, async function (request) {
8
- const email = request.params.email.toLowerCase();
9
- const urlTemplate = request.params.url;
10
- const user = await new Parse.Query(Parse.User)
11
- .equalTo("email", email)
12
- .first({
13
- useMasterKey: true,
14
- });
15
- if (!user) {
16
- throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "User not found.");
17
- }
18
- const sessionToken = await (0, openinc_auth_common_1.createSessionToken)(user, request.installationId, {
19
- action: "login",
20
- provider: "openinc-auth-login-passwordless",
21
- });
22
- const url = urlTemplate.replace("{{token}}", sessionToken);
23
- console.log(url);
24
- await (0, __1.sendSimpleEmail)(email, "Passwordless Login", url);
25
- return {
26
- success: true,
27
- };
28
- }, {
29
- requireUser: false,
30
- fields: {
31
- url: {
32
- required: true,
33
- type: String,
34
- },
35
- email: {
36
- required: true,
37
- type: String,
38
- },
39
- },
40
- });
41
- }
42
- exports.init = init;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ const __1 = require("..");
5
+ const openinc_auth_common_1 = require("./openinc-auth.common");
6
+ async function init(name) {
7
+ Parse.Cloud.define(name, async function (request) {
8
+ const email = request.params.email.toLowerCase();
9
+ const urlTemplate = request.params.url;
10
+ const user = await new Parse.Query(Parse.User)
11
+ .equalTo("email", email)
12
+ .first({
13
+ useMasterKey: true,
14
+ });
15
+ if (!user) {
16
+ throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "User not found.");
17
+ }
18
+ const sessionToken = await (0, openinc_auth_common_1.createSessionToken)(user, request.installationId, {
19
+ action: "login",
20
+ provider: "openinc-auth-login-passwordless",
21
+ });
22
+ const url = urlTemplate.replace("{{token}}", sessionToken);
23
+ console.log(url);
24
+ await (0, __1.sendTemplateEmail)({
25
+ template: "openinc-auth-login-passwordless",
26
+ subject: "Passwordless Login",
27
+ to: email,
28
+ fallback: url,
29
+ data: {
30
+ link: url,
31
+ },
32
+ });
33
+ return {
34
+ success: true,
35
+ };
36
+ }, {
37
+ requireUser: false,
38
+ fields: {
39
+ url: {
40
+ required: true,
41
+ type: String,
42
+ },
43
+ email: {
44
+ required: true,
45
+ type: String,
46
+ },
47
+ },
48
+ });
49
+ }
50
+ exports.init = init;
@@ -1 +1 @@
1
- export declare function init(name: string): Promise<void>;
1
+ export declare function init(name: string): Promise<void>;
@@ -1,45 +1,45 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
4
- async function init(name) {
5
- Parse.Cloud.define(name, async function (request) {
6
- const username = request.params.login.toLowerCase();
7
- const password = request.params.password;
8
- try {
9
- const user = await Parse.User.logIn(username, password);
10
- return {
11
- sessionToken: user.getSessionToken(),
12
- };
13
- }
14
- catch (error) {
15
- try {
16
- const user = await Parse.Cloud.run("ldap_login", {
17
- username,
18
- password,
19
- });
20
- if (!user?.session) {
21
- throw new Error();
22
- }
23
- return {
24
- sessionToken: user.session,
25
- };
26
- }
27
- catch (error) {
28
- throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "t:AUTH_INVALID");
29
- }
30
- }
31
- }, {
32
- requireUser: false,
33
- fields: {
34
- login: {
35
- required: true,
36
- type: String,
37
- },
38
- password: {
39
- required: true,
40
- type: String,
41
- },
42
- },
43
- });
44
- }
45
- exports.init = init;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ async function init(name) {
5
+ Parse.Cloud.define(name, async function (request) {
6
+ const username = request.params.login.toLowerCase();
7
+ const password = request.params.password;
8
+ try {
9
+ const user = await Parse.User.logIn(username, password);
10
+ return {
11
+ sessionToken: user.getSessionToken(),
12
+ };
13
+ }
14
+ catch (error) {
15
+ try {
16
+ const user = await Parse.Cloud.run("ldap_login", {
17
+ username,
18
+ password,
19
+ });
20
+ if (!user?.session) {
21
+ throw new Error();
22
+ }
23
+ return {
24
+ sessionToken: user.session,
25
+ };
26
+ }
27
+ catch (error) {
28
+ throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "t:AUTH_INVALID");
29
+ }
30
+ }
31
+ }, {
32
+ requireUser: false,
33
+ fields: {
34
+ login: {
35
+ required: true,
36
+ type: String,
37
+ },
38
+ password: {
39
+ required: true,
40
+ type: String,
41
+ },
42
+ },
43
+ });
44
+ }
45
+ exports.init = init;
@@ -1 +1 @@
1
- export declare function init(name: string): Promise<void>;
1
+ export declare function init(name: string): Promise<void>;
@@ -1,34 +1,42 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
4
- const __1 = require("..");
5
- const openinc_auth_common_1 = require("./openinc-auth.common");
6
- async function init(name) {
7
- Parse.Cloud.define(name, async function (request) {
8
- const email = request.params.email.toLowerCase();
9
- const user = await new Parse.Query(Parse.User)
10
- .equalTo("email", request.params.email)
11
- .first({ useMasterKey: true });
12
- if (!user) {
13
- throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "No user was found with the given email.");
14
- }
15
- const { url } = await (0, openinc_auth_common_1.createToken)("password-reset", user.id, request.params.url);
16
- await (0, __1.sendSimpleEmail)(email, "Password Reset", url);
17
- return {
18
- success: true,
19
- };
20
- }, {
21
- requireUser: false,
22
- fields: {
23
- url: {
24
- required: true,
25
- type: String,
26
- },
27
- email: {
28
- required: true,
29
- type: String,
30
- },
31
- },
32
- });
33
- }
34
- exports.init = init;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ const __1 = require("..");
5
+ const openinc_auth_common_1 = require("./openinc-auth.common");
6
+ async function init(name) {
7
+ Parse.Cloud.define(name, async function (request) {
8
+ const email = request.params.email.toLowerCase();
9
+ const user = await new Parse.Query(Parse.User)
10
+ .equalTo("email", request.params.email)
11
+ .first({ useMasterKey: true });
12
+ if (!user) {
13
+ throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, "No user was found with the given email.");
14
+ }
15
+ const { url } = await (0, openinc_auth_common_1.createToken)("password-reset", user.id, request.params.url);
16
+ await (0, __1.sendTemplateEmail)({
17
+ template: "openinc-auth-password-reset",
18
+ subject: "Passwort zurücksetzen / Password reset",
19
+ to: email,
20
+ fallback: url,
21
+ data: {
22
+ link: url,
23
+ },
24
+ });
25
+ return {
26
+ success: true,
27
+ };
28
+ }, {
29
+ requireUser: false,
30
+ fields: {
31
+ url: {
32
+ required: true,
33
+ type: String,
34
+ },
35
+ email: {
36
+ required: true,
37
+ type: String,
38
+ },
39
+ },
40
+ });
41
+ }
42
+ exports.init = init;
@@ -1 +1 @@
1
- export declare function init(name: string): Promise<void>;
1
+ export declare function init(name: string): Promise<void>;
@@ -1,28 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
4
- const openinc_auth_common_1 = require("./openinc-auth.common");
5
- async function init(name) {
6
- Parse.Cloud.define(name, async function (request) {
7
- const token = await (0, openinc_auth_common_1.consumeToken)("password-reset", request.params.token);
8
- const user = await new Parse.Query(Parse.User).get(token.userId, {
9
- useMasterKey: true,
10
- });
11
- user.setPassword(request.params.password);
12
- user.save(null, { useMasterKey: true });
13
- return { success: true };
14
- }, {
15
- requireUser: false,
16
- fields: {
17
- token: {
18
- required: true,
19
- type: String,
20
- },
21
- password: {
22
- required: true,
23
- type: String,
24
- },
25
- },
26
- });
27
- }
28
- exports.init = init;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ const openinc_auth_common_1 = require("./openinc-auth.common");
5
+ async function init(name) {
6
+ Parse.Cloud.define(name, async function (request) {
7
+ const token = await (0, openinc_auth_common_1.consumeToken)("password-reset", request.params.token);
8
+ const user = await new Parse.Query(Parse.User).get(token.userId, {
9
+ useMasterKey: true,
10
+ });
11
+ user.setPassword(request.params.password);
12
+ user.save(null, { useMasterKey: true });
13
+ return { success: true };
14
+ }, {
15
+ requireUser: false,
16
+ fields: {
17
+ token: {
18
+ required: true,
19
+ type: String,
20
+ },
21
+ password: {
22
+ required: true,
23
+ type: String,
24
+ },
25
+ },
26
+ });
27
+ }
28
+ exports.init = init;
@@ -1 +1 @@
1
- export declare function init(name: string): Promise<void>;
1
+ export declare function init(name: string): Promise<void>;
@@ -1,88 +1,88 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
4
- const config_1 = require("../config");
5
- const types_1 = require("../types");
6
- async function init(name) {
7
- Parse.Cloud.define(name, async function (request) {
8
- const params = request.params;
9
- const username = params.username?.toLowerCase();
10
- const name = params.name;
11
- const tenant = params.tenant;
12
- const email = params.email.toLowerCase();
13
- const password = params.password;
14
- const setupToken = params.setupToken;
15
- let tenantRef = undefined;
16
- if (tenant) {
17
- if (setupToken) {
18
- tenantRef = new types_1.Tenant({ label: tenant });
19
- tenantRef.save(null, { useMasterKey: true });
20
- }
21
- else {
22
- tenantRef = await new Parse.Query(types_1.Tenant).get(tenant, {
23
- useMasterKey: true,
24
- });
25
- }
26
- }
27
- const user = new Parse.User();
28
- user.setEmail(email.toLowerCase());
29
- user.setPassword(password);
30
- user.set("name", name);
31
- user.set("tenant", tenantRef);
32
- if (username && config_1.config.getBoolean("AUTH_ALLOW_USERNAME")) {
33
- user.setUsername(username);
34
- }
35
- else {
36
- user.setUsername(email);
37
- }
38
- if (setupToken) {
39
- user.set("emailVerified", true);
40
- if (tenantRef) {
41
- user.set("tenantVerified", true);
42
- user.set("tenantAdmin", true);
43
- }
44
- }
45
- await user.save(null, { useMasterKey: true });
46
- return {
47
- success: true,
48
- };
49
- }, {
50
- requireUser: false,
51
- fields: {
52
- username: {
53
- required: false,
54
- type: String,
55
- },
56
- tenant: {
57
- required: config_1.config.getBoolean("AUTH_SIGNUP_REQUIRE_TENANT"),
58
- type: String,
59
- },
60
- email: {
61
- required: true,
62
- type: String,
63
- },
64
- password: {
65
- required: true,
66
- type: String,
67
- options: (value) => {
68
- const minLength = config_1.config.getNumber("AUTH_PASSWORD_MIN_LENGTH");
69
- return value.length > minLength;
70
- },
71
- },
72
- name: {
73
- required: true,
74
- type: String,
75
- },
76
- setupToken: {
77
- required: false,
78
- type: String,
79
- },
80
- tosAccepted: {
81
- required: true,
82
- type: Boolean,
83
- options: (value) => value === true,
84
- },
85
- },
86
- });
87
- }
88
- exports.init = init;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ const config_1 = require("../config");
5
+ const types_1 = require("../types");
6
+ async function init(name) {
7
+ Parse.Cloud.define(name, async function (request) {
8
+ const params = request.params;
9
+ const username = params.username?.toLowerCase();
10
+ const name = params.name;
11
+ const tenant = params.tenant;
12
+ const email = params.email.toLowerCase();
13
+ const password = params.password;
14
+ const setupToken = params.setupToken;
15
+ let tenantRef = undefined;
16
+ if (tenant) {
17
+ if (setupToken) {
18
+ tenantRef = new types_1.Tenant({ label: tenant });
19
+ tenantRef.save(null, { useMasterKey: true });
20
+ }
21
+ else {
22
+ tenantRef = await new Parse.Query(types_1.Tenant).get(tenant, {
23
+ useMasterKey: true,
24
+ });
25
+ }
26
+ }
27
+ const user = new Parse.User();
28
+ user.setEmail(email.toLowerCase());
29
+ user.setPassword(password);
30
+ user.set("name", name);
31
+ user.set("tenant", tenantRef);
32
+ if (username && config_1.config.getBoolean("AUTH_ALLOW_USERNAME")) {
33
+ user.setUsername(username);
34
+ }
35
+ else {
36
+ user.setUsername(email);
37
+ }
38
+ if (setupToken) {
39
+ user.set("emailVerified", true);
40
+ if (tenantRef) {
41
+ user.set("tenantVerified", true);
42
+ user.set("tenantAdmin", true);
43
+ }
44
+ }
45
+ await user.save(null, { useMasterKey: true });
46
+ return {
47
+ success: true,
48
+ };
49
+ }, {
50
+ requireUser: false,
51
+ fields: {
52
+ username: {
53
+ required: false,
54
+ type: String,
55
+ },
56
+ tenant: {
57
+ required: config_1.config.getBoolean("AUTH_SIGNUP_REQUIRE_TENANT"),
58
+ type: String,
59
+ },
60
+ email: {
61
+ required: true,
62
+ type: String,
63
+ },
64
+ password: {
65
+ required: true,
66
+ type: String,
67
+ options: (value) => {
68
+ const minLength = config_1.config.getNumber("AUTH_PASSWORD_MIN_LENGTH");
69
+ return value.length > minLength;
70
+ },
71
+ },
72
+ name: {
73
+ required: true,
74
+ type: String,
75
+ },
76
+ setupToken: {
77
+ required: false,
78
+ type: String,
79
+ },
80
+ tosAccepted: {
81
+ required: true,
82
+ type: Boolean,
83
+ options: (value) => value === true,
84
+ },
85
+ },
86
+ });
87
+ }
88
+ exports.init = init;
@@ -1 +1 @@
1
- export declare function init(name: string): Promise<void>;
1
+ export declare function init(name: string): Promise<void>;