@openinc/parse-server-opendash 4.3.2 → 4.4.1

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 (161) hide show
  1. package/dist/features/openservice/alarms/AlarmEvent.d.ts +40 -0
  2. package/dist/features/openservice/alarms/alarmIdentity.d.ts +39 -0
  3. package/dist/features/openservice/{serviceTickets/alarmActions/functions/alarmTicketFields.js → alarms/alarmIdentity.js} +55 -57
  4. package/dist/features/openservice/alarms/index.d.ts +30 -0
  5. package/dist/features/openservice/alarms/index.js +52 -0
  6. package/dist/features/openservice/alarms/resolveEquipment.d.ts +17 -0
  7. package/dist/features/openservice/alarms/resolveEquipment.js +42 -0
  8. package/dist/features/openservice/alarms/schedule/AlarmScheduleTypes.d.ts +88 -0
  9. package/dist/features/openservice/alarms/schedule/AlarmScheduleTypes.js +29 -0
  10. package/dist/features/openservice/alarms/schedule/alarmScheduleFields.d.ts +27 -0
  11. package/dist/features/openservice/alarms/schedule/alarmScheduleFields.js +56 -0
  12. package/dist/features/openservice/alarms/schedule/createAlarmSchedule.d.ts +37 -0
  13. package/dist/features/openservice/alarms/schedule/createAlarmSchedule.js +181 -0
  14. package/dist/features/openservice/alarms/schedule/ensureAlarmScheduleAction.d.ts +22 -0
  15. package/dist/features/openservice/alarms/schedule/ensureAlarmScheduleAction.js +127 -0
  16. package/dist/features/openservice/alarms/schedule/listAlarmTriggers.d.ts +41 -0
  17. package/dist/features/openservice/alarms/schedule/listAlarmTriggers.js +137 -0
  18. package/dist/features/openservice/alarms/tenantForSecret.d.ts +13 -0
  19. package/dist/features/openservice/alarms/tenantForSecret.js +45 -0
  20. package/dist/features/openservice/{serviceTickets/alarmActions/types → alarms/ticket}/AlarmTicketTypes.d.ts +0 -26
  21. package/dist/features/openservice/alarms/ticket/alarmTicketFields.d.ts +18 -0
  22. package/dist/features/openservice/alarms/ticket/alarmTicketFields.js +37 -0
  23. package/dist/features/openservice/{serviceTickets/alarmActions/service → alarms/ticket}/createAlarmTicket.d.ts +7 -7
  24. package/dist/features/openservice/{serviceTickets/alarmActions/service → alarms/ticket}/createAlarmTicket.js +15 -69
  25. package/dist/features/openservice/{serviceTickets/alarmActions/service → alarms/ticket}/ensureAlarmTicketAction.js +2 -2
  26. package/dist/features/openservice/functions/assignUsersAndRoles.d.ts +5 -0
  27. package/dist/features/openservice/functions/assignUsersAndRoles.js +5 -0
  28. package/dist/features/openservice/functions/getSourceMetaMap.d.ts +4 -0
  29. package/dist/features/openservice/functions/getSourceMetaMap.js +4 -0
  30. package/dist/features/openservice/functions/getTicketObject.d.ts +5 -0
  31. package/dist/features/openservice/functions/getTicketObject.js +5 -0
  32. package/dist/features/openservice/functions/saveDescription.d.ts +5 -0
  33. package/dist/features/openservice/functions/saveDescription.js +5 -0
  34. package/dist/features/openservice/functions/saveDowntime.d.ts +5 -0
  35. package/dist/features/openservice/functions/saveDowntime.js +5 -0
  36. package/dist/features/openservice/functions/saveDuedate.d.ts +5 -0
  37. package/dist/features/openservice/functions/saveDuedate.js +5 -0
  38. package/dist/features/openservice/functions/saveFrequency.d.ts +5 -0
  39. package/dist/features/openservice/functions/saveFrequency.js +5 -0
  40. package/dist/features/openservice/functions/saveIssuecategory.d.ts +10 -0
  41. package/dist/features/openservice/functions/saveIssuecategory.js +10 -0
  42. package/dist/features/openservice/functions/saveMaterial.d.ts +5 -0
  43. package/dist/features/openservice/functions/saveMaterial.js +5 -0
  44. package/dist/features/openservice/functions/saveMessage.d.ts +5 -0
  45. package/dist/features/openservice/functions/saveMessage.js +5 -0
  46. package/dist/features/openservice/functions/savePriority.d.ts +5 -0
  47. package/dist/features/openservice/functions/savePriority.js +5 -0
  48. package/dist/features/openservice/functions/saveProject.d.ts +5 -0
  49. package/dist/features/openservice/functions/saveProject.js +5 -0
  50. package/dist/features/openservice/functions/saveRestriction.d.ts +5 -0
  51. package/dist/features/openservice/functions/saveRestriction.js +5 -0
  52. package/dist/features/openservice/functions/saveSource.d.ts +5 -0
  53. package/dist/features/openservice/functions/saveSource.js +5 -0
  54. package/dist/features/openservice/functions/saveState.d.ts +10 -0
  55. package/dist/features/openservice/functions/saveState.js +10 -0
  56. package/dist/features/openservice/functions/saveTicketMeta.d.ts +5 -0
  57. package/dist/features/openservice/functions/saveTicketMeta.js +5 -0
  58. package/dist/features/openservice/functions/saveTicketTitle.d.ts +5 -0
  59. package/dist/features/openservice/functions/saveTicketTitle.js +5 -0
  60. package/dist/features/openservice/index.d.ts +15 -0
  61. package/dist/features/openservice/index.js +15 -0
  62. package/dist/features/openservice/init.d.ts +9 -0
  63. package/dist/features/openservice/init.js +15 -3
  64. package/dist/features/openservice/issuecategory/initIssuecategory.d.ts +4 -0
  65. package/dist/features/openservice/issuecategory/initIssuecategory.js +4 -0
  66. package/dist/features/openservice/kanbanState/initKanbanStates.d.ts +10 -0
  67. package/dist/features/openservice/kanbanState/initKanbanStates.js +10 -0
  68. package/dist/features/openservice/messages/initMessages.d.ts +3 -0
  69. package/dist/features/openservice/messages/initMessages.js +3 -0
  70. package/dist/features/openservice/messages/removeLatestMessage.d.ts +2 -0
  71. package/dist/features/openservice/messages/removeLatestMessage.js +2 -0
  72. package/dist/features/openservice/schedules/calendarSync/Access.d.ts +12 -0
  73. package/dist/features/openservice/schedules/calendarSync/{service/CalendarManager.d.ts → CalendarManager.d.ts} +7 -2
  74. package/dist/features/openservice/schedules/calendarSync/{service/CalendarManager.js → CalendarManager.js} +6 -1
  75. package/dist/features/openservice/schedules/calendarSync/{service/CalendarSyncPoller.d.ts → CalendarSyncPoller.d.ts} +6 -1
  76. package/dist/features/openservice/schedules/calendarSync/{service/CalendarSyncPoller.js → CalendarSyncPoller.js} +7 -2
  77. package/dist/features/openservice/schedules/calendarSync/ConfigValues.d.ts +13 -0
  78. package/dist/features/openservice/schedules/calendarSync/{types/Event.d.ts → Event.d.ts} +7 -0
  79. package/dist/features/openservice/schedules/calendarSync/Event.js +9 -0
  80. package/dist/features/openservice/schedules/calendarSync/calendarMetaHelper.d.ts +76 -0
  81. package/dist/features/openservice/schedules/calendarSync/{service/calendarMetaHelper.js → calendarMetaHelper.js} +31 -1
  82. package/dist/features/openservice/schedules/calendarSync/eventToSchedule.d.ts +37 -0
  83. package/dist/features/openservice/schedules/calendarSync/{functions/eventToSchedule.js → eventToSchedule.js} +5 -0
  84. package/dist/features/openservice/schedules/calendarSync/scheduleToEvent.d.ts +9 -0
  85. package/dist/features/openservice/schedules/calendarSync/{functions/scheduleToEvent.js → scheduleToEvent.js} +5 -0
  86. package/dist/features/openservice/schedules/{mappings/checkStatus.d.ts → checkStatus.d.ts} +3 -0
  87. package/dist/features/openservice/schedules/{mappings/checkStatus.js → checkStatus.js} +4 -1
  88. package/dist/features/openservice/schedules/getScheduleLink.d.ts +3 -0
  89. package/dist/features/openservice/schedules/getScheduleLink.js +3 -0
  90. package/dist/features/openservice/schedules/initSchedulesFeature.d.ts +4 -0
  91. package/dist/features/openservice/schedules/initSchedulesFeature.js +5 -1
  92. package/dist/features/openservice/schedules/reassignScheduleExecutions.d.ts +5 -0
  93. package/dist/features/openservice/schedules/{mappings/reassignScheduleExecutions.js → reassignScheduleExecutions.js} +5 -1
  94. package/dist/features/openservice/serviceSchedules/calendarSync/{service/ServiceCalendarSyncPoller.d.ts → ServiceCalendarSyncPoller.d.ts} +26 -1
  95. package/dist/features/openservice/serviceSchedules/calendarSync/{service/ServiceCalendarSyncPoller.js → ServiceCalendarSyncPoller.js} +94 -20
  96. package/dist/features/openservice/serviceSchedules/calendarSync/{functions/eventToPlan.d.ts → eventToPlan.d.ts} +2 -2
  97. package/dist/features/openservice/serviceSchedules/calendarSync/index.d.ts +8 -8
  98. package/dist/features/openservice/serviceSchedules/calendarSync/index.js +7 -7
  99. package/dist/features/openservice/serviceSchedules/calendarSync/{functions/outlookRecurrence.d.ts → outlookRecurrence.d.ts} +2 -2
  100. package/dist/features/openservice/serviceSchedules/calendarSync/{functions/planToEvent.d.ts → planToEvent.d.ts} +3 -3
  101. package/dist/features/openservice/serviceSchedules/calendarSync/{service/serviceCalendarMeta.d.ts → serviceCalendarMeta.d.ts} +3 -3
  102. package/dist/features/openservice/serviceSchedules/calendarSync/{service/serviceCalendarMeta.js → serviceCalendarMeta.js} +1 -1
  103. package/dist/features/openservice/serviceSchedules/calendarSync/{service/syncPlanToCalendar.d.ts → syncPlanToCalendar.d.ts} +3 -3
  104. package/dist/features/openservice/serviceSchedules/calendarSync/{service/syncPlanToCalendar.js → syncPlanToCalendar.js} +5 -5
  105. package/dist/features/openservice/serviceSchedules/initServiceSchedulesFeature.js +4 -5
  106. package/dist/features/openservice/ticket/getTicketLink.d.ts +2 -0
  107. package/dist/features/openservice/ticket/getTicketLink.js +2 -0
  108. package/dist/features/openservice/ticket/initTicket.d.ts +2 -0
  109. package/dist/features/openservice/ticket/initTicket.js +2 -0
  110. package/dist/features/openservice/types/Material.d.ts +4 -0
  111. package/dist/features/openservice/types/MessageData.d.ts +8 -0
  112. package/dist/features/openservice/types/OpenserviceTranslationKeys.d.ts +4 -0
  113. package/dist/features/openservice/types/OpenserviceTranslationKeys.js +4 -0
  114. package/dist/features/openservice/types/SaveValues.d.ts +4 -0
  115. package/dist/features/openservice/types/ScheduleTypes.d.ts +24 -0
  116. package/dist/features/openservice/types/TicketData.d.ts +4 -0
  117. package/dist/features/openservice/types/TicketMeta.d.ts +28 -0
  118. package/dist/features/openservice/types/TicketMeta.js +4 -0
  119. package/dist/functions/openinc-openservice-alarm-create-schedule.d.ts +25 -0
  120. package/dist/functions/openinc-openservice-alarm-create-schedule.js +63 -0
  121. package/dist/functions/openinc-openservice-alarm-create-ticket.js +2 -2
  122. package/dist/functions/openinc-openservice-alarm-triggers.d.ts +13 -0
  123. package/dist/functions/openinc-openservice-alarm-triggers.js +29 -0
  124. package/dist/functions/openinc-openservice-get-sourcemeta-map.js +8 -0
  125. package/dist/functions/openinc-openservice-provider-access.d.ts +1 -0
  126. package/dist/functions/openinc-openservice-provider-access.js +79 -0
  127. package/dist/functions/openinc-openservice-save-ticket-data.js +11 -0
  128. package/dist/functions/openinc-openservice-ticket-data.js +9 -0
  129. package/dist/hooks/Maintenance_Schedule.js +3 -3
  130. package/dist/hooks/Service_Schedule.js +11 -11
  131. package/dist/hooks/Service_Schedule_Template.js +6 -6
  132. package/dist/types/Contact.d.ts +3 -0
  133. package/dist/types/Contact.js +6 -0
  134. package/dist/types/Service_Schedule.d.ts +3 -0
  135. package/dist/types/Service_Schedule.js +6 -0
  136. package/package.json +1 -1
  137. package/schema/Contact.json +5 -0
  138. package/schema/Service_Schedule.json +4 -0
  139. package/dist/features/openservice/schedules/calendarSync/functions/eventToSchedule.d.ts +0 -17
  140. package/dist/features/openservice/schedules/calendarSync/functions/scheduleToEvent.d.ts +0 -4
  141. package/dist/features/openservice/schedules/calendarSync/service/calendarMetaHelper.d.ts +0 -36
  142. package/dist/features/openservice/schedules/calendarSync/types/Access.d.ts +0 -9
  143. package/dist/features/openservice/schedules/calendarSync/types/ConfigValues.d.ts +0 -8
  144. package/dist/features/openservice/schedules/mappings/reassignScheduleExecutions.d.ts +0 -1
  145. package/dist/features/openservice/serviceSchedules/acl/index.d.ts +0 -1
  146. package/dist/features/openservice/serviceSchedules/acl/index.js +0 -6
  147. package/dist/features/openservice/serviceTickets/alarmActions/functions/alarmTicketFields.d.ts +0 -35
  148. package/dist/features/openservice/serviceTickets/alarmActions/index.d.ts +0 -7
  149. package/dist/features/openservice/serviceTickets/alarmActions/index.js +0 -16
  150. /package/dist/features/openservice/{schedules/calendarSync/types/Access.js → alarms/AlarmEvent.js} +0 -0
  151. /package/dist/features/openservice/{serviceTickets/alarmActions/types → alarms/ticket}/AlarmTicketTypes.js +0 -0
  152. /package/dist/features/openservice/{serviceTickets/alarmActions/service → alarms/ticket}/ensureAlarmTicketAction.d.ts +0 -0
  153. /package/dist/features/openservice/schedules/calendarSync/{types/ConfigValues.js → Access.js} +0 -0
  154. /package/dist/features/openservice/schedules/calendarSync/{types/Event.js → ConfigValues.js} +0 -0
  155. /package/dist/features/openservice/serviceSchedules/{acl/assignmentAcl.d.ts → assignmentAcl.d.ts} +0 -0
  156. /package/dist/features/openservice/serviceSchedules/{acl/assignmentAcl.js → assignmentAcl.js} +0 -0
  157. /package/dist/features/openservice/serviceSchedules/calendarSync/{types/ServiceSyncTypes.d.ts → ServiceSyncTypes.d.ts} +0 -0
  158. /package/dist/features/openservice/serviceSchedules/calendarSync/{types/ServiceSyncTypes.js → ServiceSyncTypes.js} +0 -0
  159. /package/dist/features/openservice/serviceSchedules/calendarSync/{functions/eventToPlan.js → eventToPlan.js} +0 -0
  160. /package/dist/features/openservice/serviceSchedules/calendarSync/{functions/outlookRecurrence.js → outlookRecurrence.js} +0 -0
  161. /package/dist/features/openservice/serviceSchedules/calendarSync/{functions/planToEvent.js → planToEvent.js} +0 -0
@@ -1,4 +1,19 @@
1
1
  "use strict";
2
+ /**
3
+ * Public surface of the open.SERVICE feature.
4
+ *
5
+ * Everything re-exported here except `init` belongs to **v1** — the
6
+ * `Maintenance_*` classes — and each symbol carries its own `@deprecated` note
7
+ * naming the v2 replacement. It stays exported because the `Maintenance_*`
8
+ * hooks and the generated `src/types/Maintenance_*.ts` classes still import it.
9
+ *
10
+ * **v2 does not go through this barrel.** Its parts are imported from the
11
+ * folder that owns them, so a v1 import is visible as one at the call site:
12
+ *
13
+ * - `alarms/` — alarm actions (ticket and maintenance plan)
14
+ * - `serviceSchedules/` — `OD3_Service_Schedule`: ACL, Outlook sync
15
+ * - `serviceProviders/` — external service provider access
16
+ */
2
17
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
18
  if (k2 === undefined) k2 = k;
4
19
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -1 +1,10 @@
1
+ /**
2
+ * Bring the open.SERVICE feature up.
3
+ *
4
+ * Both generations are started: the v1 bootstraps seed and migrate the
5
+ * `Maintenance_*` classes, v2 the `Service_*` ones. The v1 half is deprecated
6
+ * (each function says what replaces it) but must keep running as long as
7
+ * installations hold v1 data — dropping it would strand their tickets and
8
+ * plans, not just their code.
9
+ */
1
10
  export declare function init(): Promise<void>;
@@ -6,12 +6,22 @@ const initKanbanStates_js_1 = require("./kanbanState/initKanbanStates.js");
6
6
  const initMessages_js_1 = require("./messages/initMessages.js");
7
7
  const initSchedulesFeature_js_1 = require("./schedules/initSchedulesFeature.js");
8
8
  const initServiceSchedulesFeature_js_1 = require("./serviceSchedules/initServiceSchedulesFeature.js");
9
- const index_js_1 = require("./serviceTickets/alarmActions/index.js");
10
- const checkStatus_js_1 = require("./schedules/mappings/checkStatus.js");
11
- const reassignScheduleExecutions_js_1 = require("./schedules/mappings/reassignScheduleExecutions.js");
9
+ const index_js_1 = require("./alarms/index.js");
10
+ const checkStatus_js_1 = require("./schedules/checkStatus.js");
11
+ const reassignScheduleExecutions_js_1 = require("./schedules/reassignScheduleExecutions.js");
12
12
  const initTicket_js_1 = require("./ticket/initTicket.js");
13
+ /**
14
+ * Bring the open.SERVICE feature up.
15
+ *
16
+ * Both generations are started: the v1 bootstraps seed and migrate the
17
+ * `Maintenance_*` classes, v2 the `Service_*` ones. The v1 half is deprecated
18
+ * (each function says what replaces it) but must keep running as long as
19
+ * installations hold v1 data — dropping it would strand their tickets and
20
+ * plans, not just their code.
21
+ */
13
22
  async function init() {
14
23
  console.log("Initializing open.SERVICE feature...");
24
+ // --- v1 (`Maintenance_*`), deprecated ------------------------------------
15
25
  await (0, initKanbanStates_js_1.initKanbanStates)();
16
26
  await (0, initIssuecategory_js_1.initIssuecategory)();
17
27
  await (0, initMessages_js_1.initializeMessages)();
@@ -22,7 +32,9 @@ async function init() {
22
32
  await (0, reassignScheduleExecutions_js_1.reassignScheduleExecutions)();
23
33
  await (0, checkStatus_js_1.checkStatus)();
24
34
  await (0, initSchedulesFeature_js_1.initSchedulesFeature)();
35
+ // --- v2 (`Service_*`) ----------------------------------------------------
25
36
  await (0, initServiceSchedulesFeature_js_1.initServiceSchedulesFeature)();
26
37
  await (0, index_js_1.ensureAlarmTicketAction)();
38
+ await (0, index_js_1.ensureAlarmScheduleAction)();
27
39
  console.log("open.SERVICE feature initialized.");
28
40
  }
@@ -1 +1,5 @@
1
+ /**
2
+ * @deprecated open.SERVICE v1 (`Maintenance_Issuecategory`). Replaced by
3
+ * `OD3_Service_Tag`.
4
+ */
1
5
  export declare function initIssuecategory(): Promise<void>;
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.initIssuecategory = initIssuecategory;
7
7
  const node_1 = __importDefault(require("parse/node"));
8
8
  const index_js_1 = require("../../../types/index.js");
9
+ /**
10
+ * @deprecated open.SERVICE v1 (`Maintenance_Issuecategory`). Replaced by
11
+ * `OD3_Service_Tag`.
12
+ */
9
13
  async function initIssuecategory() {
10
14
  const tenant = await new node_1.default.Query(index_js_1.Tenant)
11
15
  .ascending("createdAt")
@@ -1,11 +1,21 @@
1
1
  /**
2
2
  * Initialize the kanban states table.
3
3
  * Creates a inbox and finished state if they do not exist.
4
+ *
5
+ * @deprecated open.SERVICE v1 (`Maintenance_Kanban_State`). Replaced by
6
+ * `OD3_Service_Status`.
4
7
  */
5
8
  export declare function initKanbanStates(): Promise<void>;
6
9
  /**
7
10
  * Initialize the current ticket states table. if a ticket has no entry in the current ticket states table, create one.
8
11
  * If the ticket has no state, initialize it with the inbox state.
12
+ *
13
+ * @deprecated open.SERVICE v1 (`Maintenance_Kanban_State`). Replaced by
14
+ * `OD3_Service_Status`.
9
15
  */
10
16
  export declare function initCurrentTicketStates(): Promise<void>;
17
+ /**
18
+ * @deprecated open.SERVICE v1 (`Maintenance_Kanban_State`). Replaced by
19
+ * `OD3_Service_Status`.
20
+ */
11
21
  export declare function initEnabledFlag(): Promise<void>;
@@ -11,6 +11,9 @@ const index_js_1 = require("../../../types/index.js");
11
11
  /**
12
12
  * Initialize the kanban states table.
13
13
  * Creates a inbox and finished state if they do not exist.
14
+ *
15
+ * @deprecated open.SERVICE v1 (`Maintenance_Kanban_State`). Replaced by
16
+ * `OD3_Service_Status`.
14
17
  */
15
18
  async function initKanbanStates() {
16
19
  const tenant = await new node_1.default.Query(index_js_1.Tenant)
@@ -70,6 +73,9 @@ async function initKanbanStates() {
70
73
  /**
71
74
  * Initialize the current ticket states table. if a ticket has no entry in the current ticket states table, create one.
72
75
  * If the ticket has no state, initialize it with the inbox state.
76
+ *
77
+ * @deprecated open.SERVICE v1 (`Maintenance_Kanban_State`). Replaced by
78
+ * `OD3_Service_Status`.
73
79
  */
74
80
  async function initCurrentTicketStates() {
75
81
  console.log("Initializing current ticket states table");
@@ -166,6 +172,10 @@ async function initCurrentTicketStates() {
166
172
  }
167
173
  console.log("Current ticket states table initialized");
168
174
  }
175
+ /**
176
+ * @deprecated open.SERVICE v1 (`Maintenance_Kanban_State`). Replaced by
177
+ * `OD3_Service_Status`.
178
+ */
169
179
  async function initEnabledFlag() {
170
180
  const objects = await new node_1.default.Query(index_js_1.Maintenance_Kanban_State)
171
181
  .limit(1000000000)
@@ -1,5 +1,8 @@
1
+ /** @deprecated open.SERVICE v1: the ticket history of the `Maintenance_*` classes. */
1
2
  export declare function sanatizeMessagesDisplayAt(): Promise<void>;
2
3
  /**
3
4
  * Initializes the messages if there are no messages in the database
5
+ *
6
+ * @deprecated open.SERVICE v1: the ticket history of the `Maintenance_*` classes.
4
7
  */
5
8
  export declare function initializeMessages(): Promise<void>;
@@ -10,6 +10,7 @@ const openinc_openservice_save_ticket_data_js_1 = require("../../../functions/op
10
10
  const Maintenance_Ticket_Material_js_1 = require("../../../hooks/Maintenance_Ticket_Material.js");
11
11
  const index_js_1 = require("../../../types/index.js");
12
12
  const OpenserviceTranslationKeys_js_1 = require("../types/OpenserviceTranslationKeys.js");
13
+ /** @deprecated open.SERVICE v1: the ticket history of the `Maintenance_*` classes. */
13
14
  async function sanatizeMessagesDisplayAt() {
14
15
  await new node_1.default.Query(index_js_1.Maintenance_Message).each(async (message) => {
15
16
  if (!message.get("displayAt")) {
@@ -20,6 +21,8 @@ async function sanatizeMessagesDisplayAt() {
20
21
  }
21
22
  /**
22
23
  * Initializes the messages if there are no messages in the database
24
+ *
25
+ * @deprecated open.SERVICE v1: the ticket history of the `Maintenance_*` classes.
23
26
  */
24
27
  async function initializeMessages() {
25
28
  const count = await new node_1.default.Query(index_js_1.Maintenance_Message)
@@ -3,5 +3,7 @@
3
3
  * @param entry the entry to remove the message for
4
4
  * @param title translation string for the title
5
5
  * @param content translation string for the content
6
+ *
7
+ * @deprecated open.SERVICE v1: the ticket history of the `Maintenance_*` classes.
6
8
  */
7
9
  export declare function removeLatestMessage(entry: Parse.Object, title: string, content: string): Promise<boolean>;
@@ -11,6 +11,8 @@ const index_js_1 = require("../../../types/index.js");
11
11
  * @param entry the entry to remove the message for
12
12
  * @param title translation string for the title
13
13
  * @param content translation string for the content
14
+ *
15
+ * @deprecated open.SERVICE v1: the ticket history of the `Maintenance_*` classes.
14
16
  */
15
17
  async function removeLatestMessage(entry, title, content) {
16
18
  const message = await new node_1.default.Query(index_js_1.Maintenance_Message)
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The Return-Type of Microsoft.
3
+ *
4
+ * Graph-shaped, not v1-shaped — **not** deprecated with the rest of this
5
+ * folder; `CalendarManager` uses it for both generations.
6
+ */
7
+ export type Access = {
8
+ token_type: "Bearer";
9
+ expires_in: number;
10
+ ext_expires_in: number;
11
+ access_token: string;
12
+ };
@@ -1,6 +1,11 @@
1
- import { GraphEvent, GraphEventResponse } from "../types/Event.js";
1
+ import { GraphEvent, GraphEventResponse } from "./Event.js";
2
2
  /**
3
- * Manager for calendar operations via Microsoft Graph API
3
+ * Manager for calendar operations via Microsoft Graph API.
4
+ *
5
+ * Model-free and therefore **not** deprecated with the rest of this folder:
6
+ * `serviceSchedules/calendarSync` shares it, because a second Graph client
7
+ * would only mean two places to break when the API or the credential flow
8
+ * changes. If v1 goes, this moves rather than dies.
4
9
  */
5
10
  export declare class CalendarManager {
6
11
  tenantID?: string;
@@ -2,7 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CalendarManager = void 0;
4
4
  /**
5
- * Manager for calendar operations via Microsoft Graph API
5
+ * Manager for calendar operations via Microsoft Graph API.
6
+ *
7
+ * Model-free and therefore **not** deprecated with the rest of this folder:
8
+ * `serviceSchedules/calendarSync` shares it, because a second Graph client
9
+ * would only mean two places to break when the API or the credential flow
10
+ * changes. If v1 goes, this moves rather than dies.
6
11
  */
7
12
  class CalendarManager {
8
13
  tenantID;
@@ -1,4 +1,9 @@
1
- import { Config } from "../../../../../types/index.js";
1
+ import { Config } from "../../../../types/index.js";
2
+ /**
3
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
4
+ * `serviceSchedules/calendarSync/`. The Graph client itself
5
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
6
+ */
2
7
  export declare class CalendarSyncPoller {
3
8
  private timer;
4
9
  private config;
@@ -5,10 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CalendarSyncPoller = void 0;
7
7
  const node_1 = __importDefault(require("parse/node"));
8
- const eventToSchedule_js_1 = require("../functions/eventToSchedule.js");
8
+ const eventToSchedule_js_1 = require("./eventToSchedule.js");
9
9
  const calendarMetaHelper_js_1 = require("./calendarMetaHelper.js");
10
10
  const CalendarManager_js_1 = require("./CalendarManager.js");
11
- const index_js_1 = require("../../../../../types/index.js");
11
+ const index_js_1 = require("../../../../types/index.js");
12
+ /**
13
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
14
+ * `serviceSchedules/calendarSync/`. The Graph client itself
15
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
16
+ */
12
17
  class CalendarSyncPoller {
13
18
  timer = null;
14
19
  config;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
3
+ * `serviceSchedules/calendarSync/`. The Graph client itself
4
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
5
+ */
6
+ export type ConfigValues = {
7
+ tenant_id: string;
8
+ client_id: string;
9
+ client_secret: string;
10
+ user_email: string;
11
+ default_source_id?: string;
12
+ delta_link?: string;
13
+ };
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Microsoft Graph calendar types — the wire shapes, not ours.
3
+ *
4
+ * In the v1 folder for history only, and **not** deprecated with the rest of
5
+ * it: `serviceSchedules/calendarSync` reads these same types, because the
6
+ * Graph payload is the same whichever class we map it onto.
7
+ */
1
8
  export type DateTimeTimeZone = {
2
9
  dateTime: string;
3
10
  timeZone: string;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * Microsoft Graph calendar types — the wire shapes, not ours.
4
+ *
5
+ * In the v1 folder for history only, and **not** deprecated with the rest of
6
+ * it: `serviceSchedules/calendarSync` reads these same types, because the
7
+ * Graph payload is the same whichever class we map it onto.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,76 @@
1
+ import { Meta_Entry, Tenant } from "../../../../types/index.js";
2
+ import { MetaConfig } from "../../../../types/custom/MetaField.js";
3
+ import { GraphEventResponse } from "./Event.js";
4
+ /**
5
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
6
+ * `serviceSchedules/calendarSync/`. The Graph client itself
7
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
8
+ */
9
+ export declare const CALENDAR_SYNC_CONTEXT: string;
10
+ /**
11
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
12
+ * `serviceSchedules/calendarSync/`. The Graph client itself
13
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
14
+ */
15
+ export interface CalendarEventSnapshot {
16
+ id: string;
17
+ subject?: string;
18
+ start: {
19
+ dateTime: string;
20
+ timeZone: string;
21
+ };
22
+ end: {
23
+ dateTime: string;
24
+ timeZone: string;
25
+ };
26
+ isAllDay?: boolean;
27
+ isCancelled?: boolean;
28
+ body?: {
29
+ contentType?: string;
30
+ content?: string;
31
+ };
32
+ recurrence?: GraphEventResponse["recurrence"];
33
+ location?: {
34
+ displayName?: string;
35
+ };
36
+ }
37
+ /**
38
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
39
+ * `serviceSchedules/calendarSync/`. The Graph client itself
40
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
41
+ */
42
+ export interface CalendarMetaValues {
43
+ microsoftCalendarEventId: string;
44
+ microsoftCalendarChangeKey?: string;
45
+ microsoftCalendarEvent?: CalendarEventSnapshot;
46
+ }
47
+ /**
48
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
49
+ * `serviceSchedules/calendarSync/`. The Graph client itself
50
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
51
+ */
52
+ export declare const CalendarMetaConfig: MetaConfig;
53
+ /**
54
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
55
+ * `serviceSchedules/calendarSync/`. The Graph client itself
56
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
57
+ */
58
+ export declare function findCalendarMetaForSchedule(scheduleId: string): Promise<Meta_Entry | null>;
59
+ /**
60
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
61
+ * `serviceSchedules/calendarSync/`. The Graph client itself
62
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
63
+ */
64
+ export declare function findCalendarMetaByEventId(eventId: string): Promise<Meta_Entry | null>;
65
+ /**
66
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
67
+ * `serviceSchedules/calendarSync/`. The Graph client itself
68
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
69
+ */
70
+ export declare function saveCalendarMeta(scheduleId: string, eventId: string, changeKey?: string, tenant?: Tenant, event?: GraphEventResponse): Promise<Meta_Entry>;
71
+ /**
72
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
73
+ * `serviceSchedules/calendarSync/`. The Graph client itself
74
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
75
+ */
76
+ export declare function updateCalendarChangeKey(entry: Meta_Entry, changeKey: string, event?: GraphEventResponse): Promise<void>;
@@ -9,7 +9,12 @@ exports.findCalendarMetaByEventId = findCalendarMetaByEventId;
9
9
  exports.saveCalendarMeta = saveCalendarMeta;
10
10
  exports.updateCalendarChangeKey = updateCalendarChangeKey;
11
11
  const node_1 = __importDefault(require("parse/node"));
12
- const index_js_1 = require("../../../../../types/index.js");
12
+ const index_js_1 = require("../../../../types/index.js");
13
+ /**
14
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
15
+ * `serviceSchedules/calendarSync/`. The Graph client itself
16
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
17
+ */
13
18
  exports.CALENDAR_SYNC_CONTEXT = JSON.stringify([
14
19
  "schedule",
15
20
  "sync",
@@ -32,6 +37,11 @@ function toEventSnapshot(event) {
32
37
  : undefined,
33
38
  };
34
39
  }
40
+ /**
41
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
42
+ * `serviceSchedules/calendarSync/`. The Graph client itself
43
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
44
+ */
35
45
  exports.CalendarMetaConfig = {
36
46
  fields: [
37
47
  {
@@ -46,6 +56,11 @@ exports.CalendarMetaConfig = {
46
56
  },
47
57
  ],
48
58
  };
59
+ /**
60
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
61
+ * `serviceSchedules/calendarSync/`. The Graph client itself
62
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
63
+ */
49
64
  async function findCalendarMetaForSchedule(scheduleId) {
50
65
  return ((await new node_1.default.Query(index_js_1.Meta_Entry)
51
66
  .equalTo("context", exports.CALENDAR_SYNC_CONTEXT)
@@ -53,6 +68,11 @@ async function findCalendarMetaForSchedule(scheduleId) {
53
68
  .equalTo("entryObjectId", scheduleId)
54
69
  .first({ useMasterKey: true })) ?? null);
55
70
  }
71
+ /**
72
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
73
+ * `serviceSchedules/calendarSync/`. The Graph client itself
74
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
75
+ */
56
76
  async function findCalendarMetaByEventId(eventId) {
57
77
  return ((await new node_1.default.Query(index_js_1.Meta_Entry)
58
78
  .equalTo("context", exports.CALENDAR_SYNC_CONTEXT)
@@ -61,6 +81,11 @@ async function findCalendarMetaByEventId(eventId) {
61
81
  .equalTo("values.microsoftCalendarEventId", eventId)
62
82
  .first({ useMasterKey: true })) ?? null);
63
83
  }
84
+ /**
85
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
86
+ * `serviceSchedules/calendarSync/`. The Graph client itself
87
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
88
+ */
64
89
  async function saveCalendarMeta(scheduleId, eventId, changeKey, tenant, event) {
65
90
  let entry = await findCalendarMetaForSchedule(scheduleId);
66
91
  if (!entry) {
@@ -79,6 +104,11 @@ async function saveCalendarMeta(scheduleId, eventId, changeKey, tenant, event) {
79
104
  entry.set("values", values);
80
105
  return entry.save(null, { useMasterKey: true });
81
106
  }
107
+ /**
108
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
109
+ * `serviceSchedules/calendarSync/`. The Graph client itself
110
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
111
+ */
82
112
  async function updateCalendarChangeKey(entry, changeKey, event) {
83
113
  entry.set("values", {
84
114
  ...entry.get("values"),
@@ -0,0 +1,37 @@
1
+ import { GraphEventResponse } from "./Event.js";
2
+ /**
3
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
4
+ * `serviceSchedules/calendarSync/`. The Graph client itself
5
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
6
+ */
7
+ export type ScheduleCronTimestamp = {
8
+ startDate: Date;
9
+ endDate?: Date;
10
+ number: number;
11
+ unit: "days" | "weeks" | "months";
12
+ };
13
+ /**
14
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
15
+ * `serviceSchedules/calendarSync/`. The Graph client itself
16
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
17
+ */
18
+ export type NotifyBeforeDue = {
19
+ value: number;
20
+ unit: "minutes" | "hours" | "days" | "weeks";
21
+ };
22
+ /**
23
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
24
+ * `serviceSchedules/calendarSync/`. The Graph client itself
25
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
26
+ */
27
+ export type EventToScheduleResult = {
28
+ schedule_type: "timestamp";
29
+ timestamp: ScheduleCronTimestamp;
30
+ notifyBeforeDue?: NotifyBeforeDue;
31
+ };
32
+ /**
33
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
34
+ * `serviceSchedules/calendarSync/`. The Graph client itself
35
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
36
+ */
37
+ export declare function eventToSchedule(event: GraphEventResponse): EventToScheduleResult | undefined;
@@ -20,6 +20,11 @@ function minutesToNotifyBeforeDue(minutes) {
20
20
  return { value: minutes / 60, unit: "hours" };
21
21
  return { value: minutes, unit: "minutes" };
22
22
  }
23
+ /**
24
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
25
+ * `serviceSchedules/calendarSync/`. The Graph client itself
26
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
27
+ */
23
28
  function eventToSchedule(event) {
24
29
  const notifyBeforeDue = event.isReminderOn && typeof event.reminderMinutesBeforeStart === "number"
25
30
  ? minutesToNotifyBeforeDue(event.reminderMinutesBeforeStart)
@@ -0,0 +1,9 @@
1
+ import { Maintenance_Schedule } from "../../../../types/index.js";
2
+ import { CalendarEventSnapshot } from "./calendarMetaHelper.js";
3
+ import { GraphEvent } from "./Event.js";
4
+ /**
5
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
6
+ * `serviceSchedules/calendarSync/`. The Graph client itself
7
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
8
+ */
9
+ export declare function scheduleToEvent(schedule: Maintenance_Schedule, originalEvent?: CalendarEventSnapshot): Promise<GraphEvent | undefined>;
@@ -23,6 +23,11 @@ function notifyBeforeDueToMinutes(notify) {
23
23
  return notify.value;
24
24
  }
25
25
  }
26
+ /**
27
+ * @deprecated the v1 Outlook sync (`Maintenance_Schedule`). Replaced by
28
+ * `serviceSchedules/calendarSync/`. The Graph client itself
29
+ * (`CalendarManager`, `Event`, `Access`) is **not** deprecated — v2 shares it.
30
+ */
26
31
  async function scheduleToEvent(schedule, originalEvent) {
27
32
  try {
28
33
  await schedule.fetchWithInclude(["template"], {
@@ -2,5 +2,8 @@
2
2
  * Checks the status field of each Maintenance_Schedule_Execution and updates it accordingly.
3
3
  * Ensures that if the status is not set, it defaults to "default", and if finishedAt is set, the status is "completed".
4
4
  * @returns
5
+ *
6
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
7
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
5
8
  */
6
9
  export declare function checkStatus(): Promise<void>;
@@ -5,11 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.checkStatus = checkStatus;
7
7
  const node_1 = __importDefault(require("parse/node"));
8
- const index_js_1 = require("../../../../types/index.js");
8
+ const index_js_1 = require("../../../types/index.js");
9
9
  /**
10
10
  * Checks the status field of each Maintenance_Schedule_Execution and updates it accordingly.
11
11
  * Ensures that if the status is not set, it defaults to "default", and if finishedAt is set, the status is "completed".
12
12
  * @returns
13
+ *
14
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
15
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
13
16
  */
14
17
  async function checkStatus() {
15
18
  // Maintenance_Schedule_Execution: For every entry: check the field "status" and set it to "default" if not set/undefined or set to "completed" if field "finishedAt" is set
@@ -3,5 +3,8 @@ import { Maintenance_Schedule, Tenant } from "../../../types/index.js";
3
3
  * Returns the link to a schedule.
4
4
  * @param schedule
5
5
  * @returns
6
+ *
7
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
8
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
6
9
  */
7
10
  export declare function getScheduleLink(schedule: Maintenance_Schedule, tenant?: Tenant): Promise<string>;
@@ -6,6 +6,9 @@ const index_js_1 = require("../../config/index.js");
6
6
  * Returns the link to a schedule.
7
7
  * @param schedule
8
8
  * @returns
9
+ *
10
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
11
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
9
12
  */
10
13
  async function getScheduleLink(schedule, tenant) {
11
14
  //Get hostname from tenant or environment variable or default to localhost
@@ -1 +1,5 @@
1
+ /**
2
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
3
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
4
+ */
1
5
  export declare function initSchedulesFeature(): Promise<void>;
@@ -6,7 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.initSchedulesFeature = initSchedulesFeature;
7
7
  const node_1 = __importDefault(require("parse/node"));
8
8
  const index_js_1 = require("../../../types/index.js");
9
- const CalendarSyncPoller_js_1 = require("./calendarSync/service/CalendarSyncPoller.js");
9
+ const CalendarSyncPoller_js_1 = require("./calendarSync/CalendarSyncPoller.js");
10
+ /**
11
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
12
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
13
+ */
10
14
  async function initSchedulesFeature() {
11
15
  updateFiinishedSchedules();
12
16
  const configs = await new node_1.default.Query(index_js_1.Config)
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
3
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
4
+ */
5
+ export declare function reassignScheduleExecutions(): Promise<void>;
@@ -5,7 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.reassignScheduleExecutions = reassignScheduleExecutions;
7
7
  const node_1 = __importDefault(require("parse/node"));
8
- const index_js_1 = require("../../../../types/index.js");
8
+ const index_js_1 = require("../../../types/index.js");
9
+ /**
10
+ * @deprecated open.SERVICE v1 (`Maintenance_Schedule`). Replaced by
11
+ * `OD3_Service_Schedule`, see `serviceSchedules/`.
12
+ */
9
13
  async function reassignScheduleExecutions() {
10
14
  const executions = await new node_1.default.Query(index_js_1.Maintenance_Schedule_Execution)
11
15
  .includeAll()