@openinc/parse-server-opendash 2.4.21 → 2.4.23

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 (252) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +31 -31
  3. package/dist/config.js +8 -0
  4. package/dist/featuremap.json +2 -0
  5. package/dist/functions/_init.js +1 -2
  6. package/dist/functions/getAdminConfig.js +1 -2
  7. package/dist/functions/getSchemaForAdmin.js +1 -2
  8. package/dist/functions/opendash-geo-features.js +1 -2
  9. package/dist/functions/opendash-geo-google-autocomplete.d.ts +1 -0
  10. package/dist/functions/opendash-geo-google-autocomplete.js +66 -0
  11. package/dist/functions/opendash-geo-graphhopper-geocode-reverse.d.ts +1 -0
  12. package/dist/functions/opendash-geo-graphhopper-geocode-reverse.js +37 -0
  13. package/dist/functions/opendash-geo-graphhopper-geocode.d.ts +2 -0
  14. package/dist/functions/opendash-geo-graphhopper-geocode.js +65 -0
  15. package/dist/functions/openinc-auth-change-password.js +1 -2
  16. package/dist/functions/openinc-auth-confirm-email.js +1 -2
  17. package/dist/functions/openinc-auth-email-confirmation-request.js +1 -2
  18. package/dist/functions/openinc-auth-email-confirmation.js +1 -2
  19. package/dist/functions/openinc-auth-login-admin.js +1 -2
  20. package/dist/functions/openinc-auth-login-passwordless.js +1 -2
  21. package/dist/functions/openinc-auth-login.js +1 -2
  22. package/dist/functions/openinc-auth-password-reset-request.js +1 -2
  23. package/dist/functions/openinc-auth-password-reset.js +1 -2
  24. package/dist/functions/openinc-auth-signup.js +1 -2
  25. package/dist/functions/openinc-auth-validate-token.js +1 -2
  26. package/dist/functions/openinc-auth.common.d.ts +0 -1
  27. package/dist/functions/openinc-auth.common.js +5 -6
  28. package/dist/functions/openinc-config.js +1 -2
  29. package/dist/functions/openinc-geo-google-autocomplete.js +1 -2
  30. package/dist/functions/openinc-geo-google.common.js +2 -3
  31. package/dist/functions/openinc-geo-graphhopper-geocode-reverse-raw.js +1 -2
  32. package/dist/functions/openinc-geo-graphhopper-geocode-reverse.js +1 -2
  33. package/dist/functions/openinc-geo-graphhopper-geocode.js +1 -2
  34. package/dist/functions/openinc-geo-graphhopper-route-simple.js +1 -2
  35. package/dist/functions/openinc-geo-graphhopper.common.js +2 -3
  36. package/dist/functions/openinc-user-roles.d.ts +1 -0
  37. package/dist/functions/openinc-user-roles.js +19 -0
  38. package/dist/functions/openservice-tickets-sorter.d.ts +1 -0
  39. package/dist/functions/openservice-tickets-sorter.js +7 -0
  40. package/dist/helper/pdf2img.js +1 -2
  41. package/dist/helper/transformLogin.js +1 -2
  42. package/dist/hooks/Alarm.js +1 -2
  43. package/dist/hooks/AlarmAction.js +1 -2
  44. package/dist/hooks/AlarmWebhook.js +1 -2
  45. package/dist/hooks/Attachment.js +1 -2
  46. package/dist/hooks/BDE_Form.js +1 -2
  47. package/dist/hooks/BDE_List.js +1 -2
  48. package/dist/hooks/BDE_ListEntry.js +1 -2
  49. package/dist/hooks/BDE_Page.js +1 -2
  50. package/dist/hooks/BDE_Result.js +1 -2
  51. package/dist/hooks/BDE_Unit.js +1 -2
  52. package/dist/hooks/Company.d.ts +1 -0
  53. package/dist/hooks/Company.js +15 -0
  54. package/dist/hooks/Config.js +1 -2
  55. package/dist/hooks/Contact.d.ts +1 -0
  56. package/dist/hooks/Contact.js +15 -0
  57. package/dist/hooks/Core_Email.js +4 -5
  58. package/dist/hooks/Core_Token.js +1 -2
  59. package/dist/hooks/Dashboard.js +1 -2
  60. package/dist/hooks/GTFS_Agency.js +1 -2
  61. package/dist/hooks/GTFS_Bikes_Allowed.js +1 -2
  62. package/dist/hooks/GTFS_Calendar.js +1 -2
  63. package/dist/hooks/GTFS_Direction.js +1 -2
  64. package/dist/hooks/GTFS_Level.js +1 -2
  65. package/dist/hooks/GTFS_Location_Type.js +1 -2
  66. package/dist/hooks/GTFS_Route.js +1 -2
  67. package/dist/hooks/GTFS_Route_Type.js +1 -2
  68. package/dist/hooks/GTFS_Stop.js +1 -2
  69. package/dist/hooks/GTFS_Stop_Times.js +1 -2
  70. package/dist/hooks/GTFS_Trip.js +1 -2
  71. package/dist/hooks/GTFS_Wheelchair_Accessible.js +1 -2
  72. package/dist/hooks/GTFS_Wheelchair_Boarding.js +1 -2
  73. package/dist/hooks/Group.js +1 -2
  74. package/dist/hooks/Knowledge_Article.js +1 -2
  75. package/dist/hooks/Knowledge_Category.js +1 -2
  76. package/dist/hooks/Knowledge_Document.js +1 -2
  77. package/dist/hooks/Knowledge_DocumentPage.js +1 -2
  78. package/dist/hooks/Knowledge_Video.js +1 -2
  79. package/dist/hooks/Language.js +1 -2
  80. package/dist/hooks/Log.js +1 -2
  81. package/dist/hooks/MIAAS_MDSEndpoint.js +1 -2
  82. package/dist/hooks/MailTemplate.js +1 -2
  83. package/dist/hooks/Maintenance_Article.js +1 -2
  84. package/dist/hooks/Maintenance_DailySchedule.js +1 -2
  85. package/dist/hooks/Maintenance_Downtime.js +1 -2
  86. package/dist/hooks/Maintenance_Duedate.js +1 -2
  87. package/dist/hooks/Maintenance_Frequency.js +1 -2
  88. package/dist/hooks/Maintenance_Issuecategory.js +1 -2
  89. package/dist/hooks/Maintenance_Item.js +1 -2
  90. package/dist/hooks/Maintenance_Kanban_State.js +1 -2
  91. package/dist/hooks/Maintenance_Media.js +1 -2
  92. package/dist/hooks/Maintenance_Message.js +1 -2
  93. package/dist/hooks/Maintenance_Message_Body.js +1 -2
  94. package/dist/hooks/Maintenance_Order.js +1 -2
  95. package/dist/hooks/Maintenance_Priority.js +1 -2
  96. package/dist/hooks/Maintenance_Restriction.js +1 -2
  97. package/dist/hooks/Maintenance_Schedule.js +1 -2
  98. package/dist/hooks/Maintenance_Schedule_Execution.js +1 -2
  99. package/dist/hooks/Maintenance_Schedule_Execution_Step.js +1 -2
  100. package/dist/hooks/Maintenance_Schedule_Step.js +1 -2
  101. package/dist/hooks/Maintenance_SourceMeta.js +1 -2
  102. package/dist/hooks/Maintenance_Ticket.js +1 -2
  103. package/dist/hooks/Maintenance_Ticket_Issuecategory.js +1 -2
  104. package/dist/hooks/Maintenance_Ticket_Kanban_State.js +1 -2
  105. package/dist/hooks/Maintenance_Ticket_Source.js +1 -2
  106. package/dist/hooks/Monitoring_DataHierachies.js +1 -2
  107. package/dist/hooks/Monitoring_Jobs.js +1 -2
  108. package/dist/hooks/Monitoring_ReportImage.js +1 -2
  109. package/dist/hooks/Monitoring_Slideshow.js +1 -2
  110. package/dist/hooks/NavigationGroup.js +1 -2
  111. package/dist/hooks/NavigationItem.js +1 -2
  112. package/dist/hooks/Notification.js +1 -2
  113. package/dist/hooks/Permission.js +1 -2
  114. package/dist/hooks/Push.js +1 -2
  115. package/dist/hooks/Report.js +1 -2
  116. package/dist/hooks/Share.js +1 -2
  117. package/dist/hooks/Source.js +1 -2
  118. package/dist/hooks/SourceMeta.js +14 -4
  119. package/dist/hooks/Tenant.js +1 -2
  120. package/dist/hooks/TenantMeta.js +1 -2
  121. package/dist/hooks/TenantTrustedDomain.js +1 -2
  122. package/dist/hooks/UserData.js +1 -2
  123. package/dist/hooks/VirtualKPI.js +1 -2
  124. package/dist/hooks/WebPush.js +1 -2
  125. package/dist/hooks/Widget.js +1 -2
  126. package/dist/hooks/WidgetPreset.js +1 -2
  127. package/dist/hooks/_User.js +1 -2
  128. package/dist/hooks/_beforeLogin.js +1 -2
  129. package/dist/hooks/_init.js +1 -2
  130. package/dist/index.js +17 -17
  131. package/dist/ow.js +2 -3
  132. package/dist/types/Alarm.d.ts +3 -1
  133. package/dist/types/Alarm.js +6 -0
  134. package/dist/types/AlarmAction.d.ts +0 -1
  135. package/dist/types/AlarmWebhook.d.ts +0 -1
  136. package/dist/types/Attachment.d.ts +0 -1
  137. package/dist/types/BDE_Form.d.ts +0 -1
  138. package/dist/types/BDE_List.d.ts +0 -1
  139. package/dist/types/BDE_ListEntry.d.ts +0 -1
  140. package/dist/types/BDE_Page.d.ts +0 -1
  141. package/dist/types/BDE_Result.d.ts +0 -1
  142. package/dist/types/BDE_Unit.d.ts +0 -1
  143. package/dist/types/Company.d.ts +23 -0
  144. package/dist/types/Company.js +29 -0
  145. package/dist/types/Config.d.ts +0 -1
  146. package/dist/types/Contact.d.ts +54 -0
  147. package/dist/types/Contact.js +95 -0
  148. package/dist/types/Core_Email.d.ts +0 -1
  149. package/dist/types/Core_Token.d.ts +0 -1
  150. package/dist/types/Dashboard.d.ts +0 -1
  151. package/dist/types/GTFS_Agency.d.ts +0 -1
  152. package/dist/types/GTFS_Bikes_Allowed.d.ts +0 -1
  153. package/dist/types/GTFS_Calendar.d.ts +0 -1
  154. package/dist/types/GTFS_Direction.d.ts +0 -1
  155. package/dist/types/GTFS_Level.d.ts +0 -1
  156. package/dist/types/GTFS_Location_Type.d.ts +0 -1
  157. package/dist/types/GTFS_Route.d.ts +0 -1
  158. package/dist/types/GTFS_Route_Type.d.ts +0 -1
  159. package/dist/types/GTFS_Stop.d.ts +0 -1
  160. package/dist/types/GTFS_Stop_Times.d.ts +0 -1
  161. package/dist/types/GTFS_Trip.d.ts +0 -1
  162. package/dist/types/GTFS_Wheelchair_Accessible.d.ts +0 -1
  163. package/dist/types/GTFS_Wheelchair_Boarding.d.ts +0 -1
  164. package/dist/types/Group.d.ts +0 -1
  165. package/dist/types/Knowledge_Article.d.ts +0 -1
  166. package/dist/types/Knowledge_Category.d.ts +0 -1
  167. package/dist/types/Knowledge_Document.d.ts +0 -1
  168. package/dist/types/Knowledge_DocumentPage.d.ts +0 -1
  169. package/dist/types/Knowledge_Video.d.ts +0 -1
  170. package/dist/types/Language.d.ts +0 -1
  171. package/dist/types/Log.d.ts +0 -1
  172. package/dist/types/MIAAS_MDSEndpoint.d.ts +0 -1
  173. package/dist/types/MailTemplate.d.ts +0 -1
  174. package/dist/types/Maintenance_Article.d.ts +0 -1
  175. package/dist/types/Maintenance_DailySchedule.d.ts +10 -1
  176. package/dist/types/Maintenance_DailySchedule.js +15 -0
  177. package/dist/types/Maintenance_Downtime.d.ts +0 -1
  178. package/dist/types/Maintenance_Duedate.d.ts +0 -1
  179. package/dist/types/Maintenance_File.d.ts +24 -0
  180. package/dist/types/Maintenance_File.js +35 -0
  181. package/dist/types/Maintenance_Frequency.d.ts +0 -1
  182. package/dist/types/Maintenance_Issuecategory.d.ts +0 -1
  183. package/dist/types/Maintenance_Item.d.ts +30 -1
  184. package/dist/types/Maintenance_Item.js +57 -0
  185. package/dist/types/Maintenance_Kanban_State.d.ts +0 -1
  186. package/dist/types/Maintenance_Media.d.ts +0 -1
  187. package/dist/types/Maintenance_Message.d.ts +0 -1
  188. package/dist/types/Maintenance_Message_Body.d.ts +0 -1
  189. package/dist/types/Maintenance_Order.d.ts +0 -1
  190. package/dist/types/Maintenance_Priority.d.ts +0 -1
  191. package/dist/types/Maintenance_Restriction.d.ts +0 -1
  192. package/dist/types/Maintenance_Schedule.d.ts +0 -1
  193. package/dist/types/Maintenance_Schedule_Execution.d.ts +0 -1
  194. package/dist/types/Maintenance_Schedule_Execution_Step.d.ts +4 -5
  195. package/dist/types/Maintenance_Schedule_Execution_Step.js +6 -6
  196. package/dist/types/Maintenance_Schedule_Step.d.ts +4 -5
  197. package/dist/types/Maintenance_Schedule_Step.js +6 -6
  198. package/dist/types/Maintenance_SourceMeta.d.ts +0 -1
  199. package/dist/types/Maintenance_Source_File.d.ts +25 -0
  200. package/dist/types/Maintenance_Source_File.js +32 -0
  201. package/dist/types/Maintenance_Ticket.d.ts +6 -1
  202. package/dist/types/Maintenance_Ticket.js +9 -0
  203. package/dist/types/Maintenance_Ticket_Issuecategory.d.ts +0 -1
  204. package/dist/types/Maintenance_Ticket_Kanban_State.d.ts +0 -1
  205. package/dist/types/Maintenance_Ticket_Source.d.ts +0 -1
  206. package/dist/types/Monitoring_DataHierachies.d.ts +0 -1
  207. package/dist/types/Monitoring_Jobs.d.ts +0 -1
  208. package/dist/types/Monitoring_ReportImage.d.ts +0 -1
  209. package/dist/types/Monitoring_Slideshow.d.ts +0 -1
  210. package/dist/types/NavigationGroup.d.ts +0 -1
  211. package/dist/types/NavigationItem.d.ts +0 -1
  212. package/dist/types/Notification.d.ts +0 -1
  213. package/dist/types/Permission.d.ts +6 -1
  214. package/dist/types/Permission.js +12 -0
  215. package/dist/types/Push.d.ts +0 -1
  216. package/dist/types/Report.d.ts +0 -1
  217. package/dist/types/Share.d.ts +0 -1
  218. package/dist/types/Source.d.ts +0 -1
  219. package/dist/types/SourceMeta.d.ts +13 -1
  220. package/dist/types/SourceMeta.js +24 -0
  221. package/dist/types/Tenant.d.ts +0 -1
  222. package/dist/types/TenantMeta.d.ts +0 -1
  223. package/dist/types/TenantTrustedDomain.d.ts +0 -1
  224. package/dist/types/UserData.d.ts +0 -1
  225. package/dist/types/VirtualKPI.d.ts +0 -1
  226. package/dist/types/WebPush.d.ts +0 -1
  227. package/dist/types/Widget.d.ts +0 -1
  228. package/dist/types/WidgetPreset.d.ts +0 -1
  229. package/dist/types/_Role.d.ts +0 -1
  230. package/dist/types/_Session.d.ts +0 -1
  231. package/dist/types/_User.d.ts +0 -1
  232. package/dist/types/index.d.ts +8 -0
  233. package/dist/types/index.js +10 -2
  234. package/package.json +8 -8
  235. package/schema/BDE_Form.json +52 -52
  236. package/schema/GTFS_Route.json +78 -78
  237. package/schema/GTFS_Trip.json +70 -70
  238. package/schema/MailTemplate.json +52 -52
  239. package/schema/Maintenance_DailySchedule.json +49 -49
  240. package/schema/Maintenance_Message.json +54 -54
  241. package/schema/Maintenance_Message_Body.json +51 -51
  242. package/schema/Maintenance_Ticket.json +62 -62
  243. package/schema/Monitoring_DataHierachies.json +49 -49
  244. package/schema/Monitoring_Jobs.json +54 -54
  245. package/schema/Monitoring_ReportImage.json +52 -52
  246. package/schema/Report.json +73 -73
  247. package/schema/Source.json +52 -52
  248. package/schema/SourceMeta.json +34 -34
  249. package/schema/Tenant.json +81 -81
  250. package/schema/TenantMeta.json +30 -30
  251. package/schema/VirtualKPI.json +50 -50
  252. package/schema/WebPush.json +42 -42
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const openinc_geo_graphhopper_common_1 = require("./openinc-geo-graphhopper.common");
5
5
  async function init(name) {
6
6
  Parse.Cloud.define(name, async function (request) {
@@ -21,4 +21,3 @@ async function init(name) {
21
21
  fields: ["query", "latitude", "longitude"],
22
22
  });
23
23
  }
24
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const openinc_geo_graphhopper_common_1 = require("./openinc-geo-graphhopper.common");
5
5
  async function init(name) {
6
6
  Parse.Cloud.define(name, async function (request) {
@@ -30,4 +30,3 @@ async function init(name) {
30
30
  ],
31
31
  });
32
32
  }
33
- exports.init = init;
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getGeoCodingResult = exports.get = void 0;
6
+ exports.get = get;
7
+ exports.getGeoCodingResult = getGeoCodingResult;
7
8
  const node_fetch_1 = __importDefault(require("node-fetch"));
8
9
  const config_1 = require("../config");
9
10
  async function get(path, params, qs2 = "") {
@@ -29,7 +30,6 @@ async function get(path, params, qs2 = "") {
29
30
  }
30
31
  return await response.json();
31
32
  }
32
- exports.get = get;
33
33
  function getGeoCodingResult(hits) {
34
34
  return hits.map((hit) => ({
35
35
  title: getGeoCodingTitle(hit),
@@ -38,7 +38,6 @@ function getGeoCodingResult(hits) {
38
38
  longitude: hit.point.lng,
39
39
  }));
40
40
  }
41
- exports.getGeoCodingResult = getGeoCodingResult;
42
41
  function getGeoCodingTitle(hit) {
43
42
  if (hit.name && hit.housenumber) {
44
43
  return hit.name + " " + hit.housenumber;
@@ -0,0 +1 @@
1
+ export declare function init(name: string): Promise<void>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = init;
4
+ async function init(name) {
5
+ Parse.Cloud.define(name, async function (request) {
6
+ if (typeof request.user === "undefined") {
7
+ return { success: false, error: "User not found" };
8
+ }
9
+ const user = await new Parse.Query(Parse.User).get(request.user?.id, {
10
+ useMasterKey: true,
11
+ });
12
+ const roles = (await new Parse.Query(Parse.Role)
13
+ .equalTo("users", user)
14
+ .find({ useMasterKey: true })).map((role) => role.get("name"));
15
+ return { success: true, roles: roles };
16
+ }, {
17
+ requireUser: true,
18
+ });
19
+ }
@@ -0,0 +1 @@
1
+ export declare function init(name: string): Promise<void>;
@@ -0,0 +1,7 @@
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 (request) => { });
6
+ }
7
+ exports.init = init;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.convert = void 0;
7
+ exports.convert = convert;
8
8
  // Fork of: https://www.npmjs.com/package/pdf-img-convert
9
9
  // node_modules/pdf-img-convert/pdf-img-convert.js
10
10
  const node_fetch_1 = __importDefault(require("node-fetch"));
@@ -78,7 +78,6 @@ async function convert(pdf, conversion_config = {}) {
78
78
  }
79
79
  return outputPages;
80
80
  } // convert method
81
- exports.convert = convert;
82
81
  async function doc_render(pdfDocument, pageNo, canvasFactory, conversion_config) {
83
82
  // Page number sanity check
84
83
  if (pageNo < 1 || pageNo > pdfDocument.numPages) {
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformLogin = void 0;
3
+ exports.transformLogin = transformLogin;
4
4
  function transformLogin(username) {
5
5
  username = username || "";
6
6
  return username.toLowerCase().trim();
7
7
  }
8
- exports.transformLogin = transformLogin;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.init = void 0;
6
+ exports.init = init;
7
7
  const node_fetch_1 = __importDefault(require("node-fetch"));
8
8
  const __1 = require("..");
9
9
  const config_1 = require("../config");
@@ -37,4 +37,3 @@ async function init() {
37
37
  }
38
38
  });
39
39
  }
40
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -12,4 +12,3 @@ async function init() {
12
12
  // TODO
13
13
  });
14
14
  }
15
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -13,4 +13,3 @@ async function init() {
13
13
  // TODO
14
14
  });
15
15
  }
16
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -50,4 +50,3 @@ async function init() {
50
50
  }
51
51
  });
52
52
  }
53
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -14,4 +14,3 @@ async function init() {
14
14
  // TODO
15
15
  });
16
16
  }
17
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -14,4 +14,3 @@ async function init() {
14
14
  // TODO
15
15
  });
16
16
  }
17
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -44,4 +44,3 @@ async function init() {
44
44
  await Parse.Object.saveAll(affectedForms, { useMasterKey: true });
45
45
  });
46
46
  }
47
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const ow_1 = require("../ow");
6
6
  const types_1 = require("../types");
@@ -125,4 +125,3 @@ async function init() {
125
125
  }, data.user.email);
126
126
  });
127
127
  }
128
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -14,4 +14,3 @@ async function init() {
14
14
  // TODO
15
15
  });
16
16
  }
17
- exports.init = init;
@@ -0,0 +1 @@
1
+ export declare function init(): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = init;
4
+ const __1 = require("..");
5
+ const types_1 = require("../types");
6
+ async function init() {
7
+ (0, __1.beforeSaveHook)(types_1.Company, async (request) => {
8
+ const { object, original, user } = request;
9
+ await (0, __1.defaultHandler)(request);
10
+ // TODO
11
+ });
12
+ (0, __1.afterSaveHook)(types_1.Company, async ({ object, original, user }) => {
13
+ // TODO
14
+ });
15
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -13,4 +13,3 @@ async function init() {
13
13
  // TODO
14
14
  });
15
15
  }
16
- exports.init = init;
@@ -0,0 +1 @@
1
+ export declare function init(): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = init;
4
+ const __1 = require("..");
5
+ const types_1 = require("../types");
6
+ async function init() {
7
+ (0, __1.beforeSaveHook)(types_1.Contact, async (request) => {
8
+ const { object, original, user } = request;
9
+ await (0, __1.defaultHandler)(request);
10
+ // TODO
11
+ });
12
+ (0, __1.afterSaveHook)(types_1.Contact, async ({ object, original, user }) => {
13
+ // TODO
14
+ });
15
+ }
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.init = exports.sendTemplateEmail = exports.sendSimpleEmail = exports.initEmailTransport = void 0;
6
+ exports.initEmailTransport = initEmailTransport;
7
+ exports.sendSimpleEmail = sendSimpleEmail;
8
+ exports.sendTemplateEmail = sendTemplateEmail;
9
+ exports.init = init;
7
10
  const fs_1 = __importDefault(require("fs"));
8
11
  const nodemailer_1 = __importDefault(require("nodemailer"));
9
12
  const nunjucks_1 = __importDefault(require("nunjucks"));
@@ -37,7 +40,6 @@ async function initEmailTransport() {
37
40
  process.exit(1);
38
41
  }
39
42
  }
40
- exports.initEmailTransport = initEmailTransport;
41
43
  async function sendSimpleEmail(to, subject, text) {
42
44
  const email = new types_1.Core_Email({
43
45
  payload: {
@@ -49,7 +51,6 @@ async function sendSimpleEmail(to, subject, text) {
49
51
  await email.save(null, { useMasterKey: true });
50
52
  return email;
51
53
  }
52
- exports.sendSimpleEmail = sendSimpleEmail;
53
54
  async function sendTemplateEmail({ to, subject, fallback, template, data, }) {
54
55
  const email = new types_1.Core_Email({
55
56
  payload: {
@@ -62,7 +63,6 @@ async function sendTemplateEmail({ to, subject, fallback, template, data, }) {
62
63
  await email.save(null, { useMasterKey: true });
63
64
  return email;
64
65
  }
65
- exports.sendTemplateEmail = sendTemplateEmail;
66
66
  function validateEmailTemplate(templateDir, template) {
67
67
  const templatePath = (0, path_1.join)(templateDir, template);
68
68
  if (!fs_1.default.existsSync(templateDir)) {
@@ -112,4 +112,3 @@ async function init() {
112
112
  }
113
113
  });
114
114
  }
115
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -8,4 +8,3 @@ async function init() {
8
8
  request.object.setACL(new Parse.ACL());
9
9
  });
10
10
  }
11
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -30,4 +30,3 @@ async function init() {
30
30
  }
31
31
  });
32
32
  }
33
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -53,4 +53,3 @@ async function init() {
53
53
  }
54
54
  });
55
55
  }
56
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const pdf2img_1 = require("../helper/pdf2img");
5
5
  const __1 = require("..");
6
6
  const types_1 = require("../types");
@@ -57,4 +57,3 @@ async function init() {
57
57
  }
58
58
  });
59
59
  }
60
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -19,4 +19,3 @@ async function init() {
19
19
  await object.image.destroy();
20
20
  });
21
21
  }
22
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = void 0;
3
+ exports.init = init;
4
4
  const __1 = require("..");
5
5
  const types_1 = require("../types");
6
6
  async function init() {
@@ -15,4 +15,3 @@ async function init() {
15
15
  // TODO
16
16
  });
17
17
  }
18
- exports.init = init;