@openinc/parse-server-opendash 4.41.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/features/config/helper/customOptions.js +1 -1
  2. package/dist/features/config/types/ConfigKeys.d.ts +0 -3
  3. package/dist/features/config/types/ConfigKeys.js +3 -23
  4. package/dist/features/openservice/index.d.ts +6 -27
  5. package/dist/features/openservice/index.js +7 -44
  6. package/dist/features/openservice/init.d.ts +5 -13
  7. package/dist/features/openservice/init.js +17 -46
  8. package/dist/features/openservice/serviceSchedules/calendarSync/Access.d.ts +9 -0
  9. package/dist/features/openservice/serviceSchedules/calendarSync/CalendarManager.d.ts +71 -0
  10. package/dist/features/openservice/serviceSchedules/calendarSync/CalendarManager.js +300 -0
  11. package/dist/features/openservice/{schedules → serviceSchedules}/calendarSync/Event.d.ts +0 -4
  12. package/dist/features/openservice/{types/Material.js → serviceSchedules/calendarSync/Event.js} +3 -0
  13. package/dist/features/openservice/serviceSchedules/calendarSync/ServiceCalendarSyncPoller.d.ts +37 -53
  14. package/dist/features/openservice/serviceSchedules/calendarSync/ServiceCalendarSyncPoller.js +284 -187
  15. package/dist/features/openservice/serviceSchedules/calendarSync/ServiceSyncTypes.d.ts +17 -15
  16. package/dist/features/openservice/serviceSchedules/calendarSync/ServiceSyncTypes.js +4 -5
  17. package/dist/features/openservice/serviceSchedules/calendarSync/eventToPlan.d.ts +1 -1
  18. package/dist/features/openservice/serviceSchedules/calendarSync/inboundChanges.d.ts +65 -0
  19. package/dist/features/openservice/serviceSchedules/calendarSync/inboundChanges.js +101 -0
  20. package/dist/features/openservice/serviceSchedules/calendarSync/index.d.ts +2 -2
  21. package/dist/features/openservice/serviceSchedules/calendarSync/index.js +3 -1
  22. package/dist/features/openservice/serviceSchedules/calendarSync/outlookRecurrence.d.ts +1 -1
  23. package/dist/features/openservice/serviceSchedules/calendarSync/planLock.d.ts +11 -0
  24. package/dist/features/openservice/serviceSchedules/calendarSync/planLock.js +48 -0
  25. package/dist/features/openservice/serviceSchedules/calendarSync/planToEvent.d.ts +1 -1
  26. package/dist/features/openservice/serviceSchedules/calendarSync/serviceCalendarMeta.d.ts +11 -32
  27. package/dist/features/openservice/serviceSchedules/calendarSync/serviceCalendarMeta.js +20 -22
  28. package/dist/features/openservice/serviceSchedules/calendarSync/syncPlanExceptions.d.ts +4 -5
  29. package/dist/features/openservice/serviceSchedules/calendarSync/syncPlanExceptions.js +2 -3
  30. package/dist/features/openservice/serviceSchedules/calendarSync/syncPlanToCalendar.d.ts +10 -1
  31. package/dist/features/openservice/serviceSchedules/calendarSync/syncPlanToCalendar.js +25 -2
  32. package/dist/features/openservice/serviceSchedules/initServiceSchedulesFeature.d.ts +6 -4
  33. package/dist/features/openservice/serviceSchedules/initServiceSchedulesFeature.js +24 -11
  34. package/dist/features/openware/index.d.ts +0 -1
  35. package/dist/features/permissions/types/Permissions.d.ts +0 -14
  36. package/dist/features/permissions/types/Permissions.js +0 -18
  37. package/dist/features/translations/services/initTranslation.js +1 -1
  38. package/dist/hooks/Config_open_service.js +0 -60
  39. package/dist/hooks/Meta_Entry.js +3 -6
  40. package/dist/hooks/Service_Schedule.js +14 -7
  41. package/dist/index.js +2 -7
  42. package/dist/scripts/migration/passes/18-calendar-links.js +6 -2
  43. package/package.json +3 -4
  44. package/pnpm-workspace.yaml +7 -0
  45. package/dist/features/openservice/functions/assignUsersAndRoles.d.ts +0 -13
  46. package/dist/features/openservice/functions/assignUsersAndRoles.js +0 -212
  47. package/dist/features/openservice/functions/getSourceMetaMap.d.ts +0 -13
  48. package/dist/features/openservice/functions/getSourceMetaMap.js +0 -52
  49. package/dist/features/openservice/functions/getTicketObject.d.ts +0 -9
  50. package/dist/features/openservice/functions/getTicketObject.js +0 -31
  51. package/dist/features/openservice/functions/saveDescription.d.ts +0 -9
  52. package/dist/features/openservice/functions/saveDescription.js +0 -12
  53. package/dist/features/openservice/functions/saveDowntime.d.ts +0 -8
  54. package/dist/features/openservice/functions/saveDowntime.js +0 -32
  55. package/dist/features/openservice/functions/saveDuedate.d.ts +0 -13
  56. package/dist/features/openservice/functions/saveDuedate.js +0 -39
  57. package/dist/features/openservice/functions/saveFrequency.d.ts +0 -8
  58. package/dist/features/openservice/functions/saveFrequency.js +0 -32
  59. package/dist/features/openservice/functions/saveIssuecategory.d.ts +0 -14
  60. package/dist/features/openservice/functions/saveIssuecategory.js +0 -53
  61. package/dist/features/openservice/functions/saveMaterial.d.ts +0 -9
  62. package/dist/features/openservice/functions/saveMaterial.js +0 -18
  63. package/dist/features/openservice/functions/saveMessage.d.ts +0 -10
  64. package/dist/features/openservice/functions/saveMessage.js +0 -54
  65. package/dist/features/openservice/functions/savePriority.d.ts +0 -8
  66. package/dist/features/openservice/functions/savePriority.js +0 -32
  67. package/dist/features/openservice/functions/saveProject.d.ts +0 -8
  68. package/dist/features/openservice/functions/saveProject.js +0 -98
  69. package/dist/features/openservice/functions/saveRestriction.d.ts +0 -8
  70. package/dist/features/openservice/functions/saveRestriction.js +0 -32
  71. package/dist/features/openservice/functions/saveSource.d.ts +0 -8
  72. package/dist/features/openservice/functions/saveSource.js +0 -32
  73. package/dist/features/openservice/functions/saveState.d.ts +0 -14
  74. package/dist/features/openservice/functions/saveState.js +0 -52
  75. package/dist/features/openservice/functions/saveTicketMeta.d.ts +0 -9
  76. package/dist/features/openservice/functions/saveTicketMeta.js +0 -32
  77. package/dist/features/openservice/functions/saveTicketTitle.d.ts +0 -8
  78. package/dist/features/openservice/functions/saveTicketTitle.js +0 -28
  79. package/dist/features/openservice/issuecategory/initIssuecategory.d.ts +0 -5
  80. package/dist/features/openservice/issuecategory/initIssuecategory.js +0 -42
  81. package/dist/features/openservice/kanbanState/initKanbanStates.d.ts +0 -21
  82. package/dist/features/openservice/kanbanState/initKanbanStates.js +0 -187
  83. package/dist/features/openservice/messages/initMessages.d.ts +0 -8
  84. package/dist/features/openservice/messages/initMessages.js +0 -466
  85. package/dist/features/openservice/messages/removeLatestMessage.d.ts +0 -9
  86. package/dist/features/openservice/messages/removeLatestMessage.js +0 -30
  87. package/dist/features/openservice/schedules/calendarSync/Access.d.ts +0 -12
  88. package/dist/features/openservice/schedules/calendarSync/CalendarManager.d.ts +0 -49
  89. package/dist/features/openservice/schedules/calendarSync/CalendarManager.js +0 -211
  90. package/dist/features/openservice/schedules/calendarSync/CalendarSyncPoller.d.ts +0 -25
  91. package/dist/features/openservice/schedules/calendarSync/CalendarSyncPoller.js +0 -202
  92. package/dist/features/openservice/schedules/calendarSync/ConfigValues.d.ts +0 -13
  93. package/dist/features/openservice/schedules/calendarSync/ConfigValues.js +0 -2
  94. package/dist/features/openservice/schedules/calendarSync/Event.js +0 -9
  95. package/dist/features/openservice/schedules/calendarSync/calendarMetaHelper.d.ts +0 -76
  96. package/dist/features/openservice/schedules/calendarSync/calendarMetaHelper.js +0 -119
  97. package/dist/features/openservice/schedules/calendarSync/eventToSchedule.d.ts +0 -37
  98. package/dist/features/openservice/schedules/calendarSync/eventToSchedule.js +0 -103
  99. package/dist/features/openservice/schedules/calendarSync/scheduleToEvent.d.ts +0 -9
  100. package/dist/features/openservice/schedules/calendarSync/scheduleToEvent.js +0 -122
  101. package/dist/features/openservice/schedules/checkStatus.d.ts +0 -9
  102. package/dist/features/openservice/schedules/checkStatus.js +0 -31
  103. package/dist/features/openservice/schedules/getScheduleLink.d.ts +0 -10
  104. package/dist/features/openservice/schedules/getScheduleLink.js +0 -32
  105. package/dist/features/openservice/schedules/initSchedulesFeature.d.ts +0 -5
  106. package/dist/features/openservice/schedules/initSchedulesFeature.js +0 -32
  107. package/dist/features/openservice/schedules/reassignScheduleExecutions.d.ts +0 -5
  108. package/dist/features/openservice/schedules/reassignScheduleExecutions.js +0 -39
  109. package/dist/features/openservice/ticket/getTicketLink.d.ts +0 -9
  110. package/dist/features/openservice/ticket/getTicketLink.js +0 -32
  111. package/dist/features/openservice/ticket/initTicket.d.ts +0 -4
  112. package/dist/features/openservice/ticket/initTicket.js +0 -56
  113. package/dist/features/openservice/types/FetchOptions.d.ts +0 -4
  114. package/dist/features/openservice/types/FetchOptions.js +0 -2
  115. package/dist/features/openservice/types/Material.d.ts +0 -10
  116. package/dist/features/openservice/types/OpenserviceTranslationKeys.d.ts +0 -102
  117. package/dist/features/openservice/types/OpenserviceTranslationKeys.js +0 -106
  118. package/dist/features/openservice/types/SaveValues.d.ts +0 -33
  119. package/dist/features/openservice/types/SaveValues.js +0 -2
  120. package/dist/features/openservice/types/TicketData.d.ts +0 -22
  121. package/dist/features/openservice/types/TicketData.js +0 -2
  122. package/dist/features/openware/types/OpenWareTicketObject.d.ts +0 -14
  123. package/dist/features/openware/types/OpenWareTicketObject.js +0 -2
  124. package/dist/functions/openinc-openservice-get-sourcemeta-map.d.ts +0 -1
  125. package/dist/functions/openinc-openservice-get-sourcemeta-map.js +0 -41
  126. package/dist/functions/openinc-openservice-save-ticket-data.d.ts +0 -6
  127. package/dist/functions/openinc-openservice-save-ticket-data.js +0 -517
  128. package/dist/functions/openinc-openservice-ticket-data.d.ts +0 -44
  129. package/dist/functions/openinc-openservice-ticket-data.js +0 -380
  130. package/dist/helper/removeShorltyPreviousEntry.d.ts +0 -2
  131. package/dist/helper/removeShorltyPreviousEntry.js +0 -31
  132. package/dist/hooks/Maintenance_Downtime.d.ts +0 -1
  133. package/dist/hooks/Maintenance_Downtime.js +0 -106
  134. package/dist/hooks/Maintenance_Duedate.d.ts +0 -1
  135. package/dist/hooks/Maintenance_Duedate.js +0 -128
  136. package/dist/hooks/Maintenance_Frequency.d.ts +0 -1
  137. package/dist/hooks/Maintenance_Frequency.js +0 -106
  138. package/dist/hooks/Maintenance_Issuecategory.d.ts +0 -1
  139. package/dist/hooks/Maintenance_Issuecategory.js +0 -19
  140. package/dist/hooks/Maintenance_Item.d.ts +0 -1
  141. package/dist/hooks/Maintenance_Item.js +0 -17
  142. package/dist/hooks/Maintenance_Kanban_State.d.ts +0 -1
  143. package/dist/hooks/Maintenance_Kanban_State.js +0 -17
  144. package/dist/hooks/Maintenance_Media.d.ts +0 -1
  145. package/dist/hooks/Maintenance_Media.js +0 -17
  146. package/dist/hooks/Maintenance_Message.d.ts +0 -1
  147. package/dist/hooks/Maintenance_Message.js +0 -20
  148. package/dist/hooks/Maintenance_Order.d.ts +0 -1
  149. package/dist/hooks/Maintenance_Order.js +0 -17
  150. package/dist/hooks/Maintenance_Priority.d.ts +0 -1
  151. package/dist/hooks/Maintenance_Priority.js +0 -110
  152. package/dist/hooks/Maintenance_Project.d.ts +0 -1
  153. package/dist/hooks/Maintenance_Project.js +0 -30
  154. package/dist/hooks/Maintenance_Restriction.d.ts +0 -1
  155. package/dist/hooks/Maintenance_Restriction.js +0 -113
  156. package/dist/hooks/Maintenance_Schedule.d.ts +0 -1
  157. package/dist/hooks/Maintenance_Schedule.js +0 -146
  158. package/dist/hooks/Maintenance_Schedule_Execution.d.ts +0 -1
  159. package/dist/hooks/Maintenance_Schedule_Execution.js +0 -118
  160. package/dist/hooks/Maintenance_Schedule_Execution_Step.d.ts +0 -1
  161. package/dist/hooks/Maintenance_Schedule_Execution_Step.js +0 -17
  162. package/dist/hooks/Maintenance_Schedule_Step.d.ts +0 -1
  163. package/dist/hooks/Maintenance_Schedule_Step.js +0 -26
  164. package/dist/hooks/Maintenance_Schedule_Template.d.ts +0 -1
  165. package/dist/hooks/Maintenance_Schedule_Template.js +0 -92
  166. package/dist/hooks/Maintenance_Source_File.d.ts +0 -1
  167. package/dist/hooks/Maintenance_Source_File.js +0 -17
  168. package/dist/hooks/Maintenance_Ticket.d.ts +0 -1
  169. package/dist/hooks/Maintenance_Ticket.js +0 -15
  170. package/dist/hooks/Maintenance_Ticket_Assignment.d.ts +0 -1
  171. package/dist/hooks/Maintenance_Ticket_Assignment.js +0 -17
  172. package/dist/hooks/Maintenance_Ticket_FormConfig.d.ts +0 -1
  173. package/dist/hooks/Maintenance_Ticket_FormConfig.js +0 -17
  174. package/dist/hooks/Maintenance_Ticket_Issuecategory.d.ts +0 -1
  175. package/dist/hooks/Maintenance_Ticket_Issuecategory.js +0 -109
  176. package/dist/hooks/Maintenance_Ticket_Kanban_State.d.ts +0 -1
  177. package/dist/hooks/Maintenance_Ticket_Kanban_State.js +0 -134
  178. package/dist/hooks/Maintenance_Ticket_Kanban_State_Current.d.ts +0 -1
  179. package/dist/hooks/Maintenance_Ticket_Kanban_State_Current.js +0 -15
  180. package/dist/hooks/Maintenance_Ticket_Material.d.ts +0 -4
  181. package/dist/hooks/Maintenance_Ticket_Material.js +0 -104
  182. package/dist/hooks/Maintenance_Ticket_Project.d.ts +0 -1
  183. package/dist/hooks/Maintenance_Ticket_Project.js +0 -88
  184. package/dist/hooks/Maintenance_Ticket_QR_Code.d.ts +0 -1
  185. package/dist/hooks/Maintenance_Ticket_QR_Code.js +0 -17
  186. package/dist/hooks/Maintenance_Ticket_Source.d.ts +0 -1
  187. package/dist/hooks/Maintenance_Ticket_Source.js +0 -124
  188. package/dist/hooks/Maintenance_Ticket_Title.d.ts +0 -1
  189. package/dist/hooks/Maintenance_Ticket_Title.js +0 -107
  190. package/dist/i18n/de-DE/maintenance.json +0 -16
  191. package/dist/i18n/en-US/maintenance.json +0 -16
  192. package/dist/scripts/seed-v1-testdata.d.ts +0 -43
  193. package/dist/scripts/seed-v1-testdata.js +0 -982
  194. /package/dist/features/openservice/{schedules → serviceSchedules}/calendarSync/Access.js +0 -0
@@ -222,7 +222,7 @@ exports.customoptions = {
222
222
  secret: false,
223
223
  public: true,
224
224
  default: "false",
225
- description: "Enable Parse Classes and Cloud Code for the open.SERVICE plugin.",
225
+ description: "Create the classes of open.SERVICE v1 (OD3_Maintenance_*). No runtime any more — only for installations that still have to run the v1 → v2 migration.",
226
226
  },
227
227
  FEATURE_MIAAS: {
228
228
  env: "OPENINC_PARSE_FEATURE_MIAAS",
@@ -79,9 +79,6 @@ export declare const ConfigKeys: {
79
79
  readonly alarmScheduleSecret: "OPENSERVICE_ALARM_SCHEDULE_SECRET";
80
80
  readonly alarmTicketSecret: "OPENSERVICE_ALARM_TICKET_SECRET";
81
81
  readonly assignmentNotifications: "OPENSERVICE_ASSIGNMENT_NOTIFICATIONS";
82
- readonly closedTicketsLifetime: "OPENSERVICE_CLOSED_TICKET_LIFETIME";
83
- readonly createTicketOnSchedule: "OPENSERVICE_CREATE_TICKET_ON_SCHEDULE";
84
- readonly scheduleMetaFields: "OPENSERVICE_SCHEDULE_META_FIELDS";
85
82
  readonly outlookIntegration: "OPENSERVICE_MICROSOFT_OUTLOOK_INTEGRATION";
86
83
  readonly ticketArchiveAfterDays: "OPENSERVICE_TICKET_ARCHIVE_AFTER_DAYS";
87
84
  readonly ticketDueNotifications: "OPENSERVICE_TICKET_DUE_NOTIFICATIONS";
@@ -33,20 +33,15 @@ exports.OPENSERVICE_CONFIG_KEYS = [
33
33
  scope: "tenant",
34
34
  defaultValue: "[]",
35
35
  },
36
- {
37
- key: "OPENSERVICE_CLOSED_TICKET_LIFETIME",
38
- description: 'v1: how long a finished ticket stays enabled, in milliseconds. "0" switches the cleanup off.',
39
- scope: "tenant",
40
- defaultValue: "604800000", // 7 days
41
- },
42
36
  {
43
37
  key: "OPENSERVICE_MICROSOFT_OUTLOOK_INTEGRATION",
44
38
  description: "Outlook calendar connection as JSON (tenant_id, client_id, client_secret, user_email). Needs credentials from the customer, so it cannot be seeded.",
45
39
  scope: "tenant",
46
40
  secret: true,
47
41
  // No default: without the customer's client secret there is nothing to
48
- // write. Not `required` either — the sync is optional, and its poller is
49
- // currently switched off (see initServiceSchedulesFeature).
42
+ // write. Not `required` either — the sync is optional. Optional fields
43
+ // (default_equipment_id, import_category, inbound_disabled): see
44
+ // serviceSchedules/calendarSync/README.md.
50
45
  },
51
46
  {
52
47
  // Read by the scheduler's `archiveIdleTickets` job.
@@ -55,18 +50,6 @@ exports.OPENSERVICE_CONFIG_KEYS = [
55
50
  scope: "tenant",
56
51
  defaultValue: "30",
57
52
  },
58
- {
59
- // Still read by the v1 plugin and by `Config_open_service`'s afterSave,
60
- // which syncs the configured fields into `Maintenance_Schedule_Step`.
61
- key: "OPENSERVICE_SCHEDULE_META_FIELDS",
62
- description: "v1: fields a maintenance step can capture, as a JSON array. Changing it removes step values whose field is gone.",
63
- scope: "tenant",
64
- },
65
- {
66
- key: "OPENSERVICE_CREATE_TICKET_ON_SCHEDULE",
67
- description: "v1: whether a due maintenance plan also opens a ticket. Read by the v1 notification job.",
68
- scope: "tenant",
69
- },
70
53
  {
71
54
  key: openservice_shared_1.TICKET_CONFIG_KEYS.v2NotificationWatermark,
72
55
  description: "How far the notification worker has got. Written by the scheduler; removing it re-sends or skips reminders.",
@@ -94,9 +77,6 @@ exports.ConfigKeys = {
94
77
  alarmScheduleSecret: "OPENSERVICE_ALARM_SCHEDULE_SECRET",
95
78
  alarmTicketSecret: "OPENSERVICE_ALARM_TICKET_SECRET",
96
79
  assignmentNotifications: openservice_shared_1.TICKET_CONFIG_KEYS.assignmentNotifications,
97
- closedTicketsLifetime: "OPENSERVICE_CLOSED_TICKET_LIFETIME",
98
- createTicketOnSchedule: "OPENSERVICE_CREATE_TICKET_ON_SCHEDULE",
99
- scheduleMetaFields: "OPENSERVICE_SCHEDULE_META_FIELDS",
100
80
  outlookIntegration: "OPENSERVICE_MICROSOFT_OUTLOOK_INTEGRATION",
101
81
  ticketArchiveAfterDays: openservice_shared_1.TICKET_CONFIG_KEYS.ticketArchiveAfterDays,
102
82
  // Written by the ticket admin page, read by the scheduler. Not catalogued:
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * Public surface of the open.SERVICE feature.
3
3
  *
4
- * Everything re-exported here except `init` belongs to **v1** — the
5
- * `Maintenance_*` classes — and each symbol carries its own `@deprecated` note
6
- * naming the v2 replacement. It stays exported because the `Maintenance_*`
7
- * hooks and the generated `src/types/Maintenance_*.ts` classes still import it.
4
+ * Besides `init`, only the v1 field shapes are re-exported: the generated
5
+ * `src/types/Maintenance_*.ts` classes import them from here (see
6
+ * `parse-server.custom-class-field.config.json`). The v1 runtime — hooks,
7
+ * cloud functions, Outlook poller — is gone; the classes, their schema and
8
+ * those types stay for the v1 → v2 migration (`src/scripts/migration`).
8
9
  *
9
10
  * **v2 does not go through this barrel.** Its parts are imported from the
10
- * folder that owns them, so a v1 import is visible as one at the call site:
11
+ * folder that owns them:
11
12
  *
12
13
  * - `automation/` — creating and changing tickets, plans and executions from
13
14
  * outside the frontend (Node-RED, scripts); the alarm actions build on it
@@ -15,29 +16,7 @@
15
16
  * - `serviceSchedules/` — `OD3_Service_Schedule`: ACL, Outlook sync
16
17
  * - `serviceProviders/` — external service provider access
17
18
  */
18
- export { assignUsersAndRoles } from "./functions/assignUsersAndRoles.js";
19
- export { getSourceMetaMap } from "./functions/getSourceMetaMap.js";
20
- export { getTicketObject } from "./functions/getTicketObject.js";
21
- export { saveDescription } from "./functions/saveDescription.js";
22
- export { saveDowntime } from "./functions/saveDowntime.js";
23
- export { saveDuedate } from "./functions/saveDuedate.js";
24
- export { saveFrequency } from "./functions/saveFrequency.js";
25
- export { saveDefaultIssueCategory, saveIssueCategory, } from "./functions/saveIssuecategory.js";
26
- export { saveMaterial } from "./functions/saveMaterial.js";
27
- export { saveMessage } from "./functions/saveMessage.js";
28
- export { savePriority } from "./functions/savePriority.js";
29
- export { saveProject } from "./functions/saveProject.js";
30
- export { saveRestriction } from "./functions/saveRestriction.js";
31
- export { saveSource } from "./functions/saveSource.js";
32
- export { saveDefaultState, saveState } from "./functions/saveState.js";
33
- export { saveTicketMeta } from "./functions/saveTicketMeta.js";
34
- export { saveTicketTitle } from "./functions/saveTicketTitle.js";
35
19
  export { init } from "./init.js";
36
- export { type FetchOptions } from "./types/FetchOptions.js";
37
- export type { Material } from "./types/Material.js";
38
20
  export type { MessageData } from "./types/MessageData.js";
39
- export { OpenserviceMessageTranslationKeys } from "./types/OpenserviceTranslationKeys.js";
40
- export type { SaveValues } from "./types/SaveValues.js";
41
21
  export * from "./types/ScheduleTypes.js";
42
- export type { TicketData } from "./types/TicketData.js";
43
22
  export * from "./types/TicketMeta.js";
@@ -2,13 +2,14 @@
2
2
  /**
3
3
  * Public surface of the open.SERVICE feature.
4
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.
5
+ * Besides `init`, only the v1 field shapes are re-exported: the generated
6
+ * `src/types/Maintenance_*.ts` classes import them from here (see
7
+ * `parse-server.custom-class-field.config.json`). The v1 runtime — hooks,
8
+ * cloud functions, Outlook poller — is gone; the classes, their schema and
9
+ * those types stay for the v1 → v2 migration (`src/scripts/migration`).
9
10
  *
10
11
  * **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
+ * folder that owns them:
12
13
  *
13
14
  * - `automation/` — creating and changing tickets, plans and executions from
14
15
  * outside the frontend (Node-RED, scripts); the alarm actions build on it
@@ -31,46 +32,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
31
32
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
32
33
  };
33
34
  Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.OpenserviceMessageTranslationKeys = exports.init = exports.saveTicketTitle = exports.saveTicketMeta = exports.saveState = exports.saveDefaultState = exports.saveSource = exports.saveRestriction = exports.saveProject = exports.savePriority = exports.saveMessage = exports.saveMaterial = exports.saveIssueCategory = exports.saveDefaultIssueCategory = exports.saveFrequency = exports.saveDuedate = exports.saveDowntime = exports.saveDescription = exports.getTicketObject = exports.getSourceMetaMap = exports.assignUsersAndRoles = void 0;
35
- var assignUsersAndRoles_js_1 = require("./functions/assignUsersAndRoles.js");
36
- Object.defineProperty(exports, "assignUsersAndRoles", { enumerable: true, get: function () { return assignUsersAndRoles_js_1.assignUsersAndRoles; } });
37
- var getSourceMetaMap_js_1 = require("./functions/getSourceMetaMap.js");
38
- Object.defineProperty(exports, "getSourceMetaMap", { enumerable: true, get: function () { return getSourceMetaMap_js_1.getSourceMetaMap; } });
39
- var getTicketObject_js_1 = require("./functions/getTicketObject.js");
40
- Object.defineProperty(exports, "getTicketObject", { enumerable: true, get: function () { return getTicketObject_js_1.getTicketObject; } });
41
- var saveDescription_js_1 = require("./functions/saveDescription.js");
42
- Object.defineProperty(exports, "saveDescription", { enumerable: true, get: function () { return saveDescription_js_1.saveDescription; } });
43
- var saveDowntime_js_1 = require("./functions/saveDowntime.js");
44
- Object.defineProperty(exports, "saveDowntime", { enumerable: true, get: function () { return saveDowntime_js_1.saveDowntime; } });
45
- var saveDuedate_js_1 = require("./functions/saveDuedate.js");
46
- Object.defineProperty(exports, "saveDuedate", { enumerable: true, get: function () { return saveDuedate_js_1.saveDuedate; } });
47
- var saveFrequency_js_1 = require("./functions/saveFrequency.js");
48
- Object.defineProperty(exports, "saveFrequency", { enumerable: true, get: function () { return saveFrequency_js_1.saveFrequency; } });
49
- var saveIssuecategory_js_1 = require("./functions/saveIssuecategory.js");
50
- Object.defineProperty(exports, "saveDefaultIssueCategory", { enumerable: true, get: function () { return saveIssuecategory_js_1.saveDefaultIssueCategory; } });
51
- Object.defineProperty(exports, "saveIssueCategory", { enumerable: true, get: function () { return saveIssuecategory_js_1.saveIssueCategory; } });
52
- var saveMaterial_js_1 = require("./functions/saveMaterial.js");
53
- Object.defineProperty(exports, "saveMaterial", { enumerable: true, get: function () { return saveMaterial_js_1.saveMaterial; } });
54
- var saveMessage_js_1 = require("./functions/saveMessage.js");
55
- Object.defineProperty(exports, "saveMessage", { enumerable: true, get: function () { return saveMessage_js_1.saveMessage; } });
56
- var savePriority_js_1 = require("./functions/savePriority.js");
57
- Object.defineProperty(exports, "savePriority", { enumerable: true, get: function () { return savePriority_js_1.savePriority; } });
58
- var saveProject_js_1 = require("./functions/saveProject.js");
59
- Object.defineProperty(exports, "saveProject", { enumerable: true, get: function () { return saveProject_js_1.saveProject; } });
60
- var saveRestriction_js_1 = require("./functions/saveRestriction.js");
61
- Object.defineProperty(exports, "saveRestriction", { enumerable: true, get: function () { return saveRestriction_js_1.saveRestriction; } });
62
- var saveSource_js_1 = require("./functions/saveSource.js");
63
- Object.defineProperty(exports, "saveSource", { enumerable: true, get: function () { return saveSource_js_1.saveSource; } });
64
- var saveState_js_1 = require("./functions/saveState.js");
65
- Object.defineProperty(exports, "saveDefaultState", { enumerable: true, get: function () { return saveState_js_1.saveDefaultState; } });
66
- Object.defineProperty(exports, "saveState", { enumerable: true, get: function () { return saveState_js_1.saveState; } });
67
- var saveTicketMeta_js_1 = require("./functions/saveTicketMeta.js");
68
- Object.defineProperty(exports, "saveTicketMeta", { enumerable: true, get: function () { return saveTicketMeta_js_1.saveTicketMeta; } });
69
- var saveTicketTitle_js_1 = require("./functions/saveTicketTitle.js");
70
- Object.defineProperty(exports, "saveTicketTitle", { enumerable: true, get: function () { return saveTicketTitle_js_1.saveTicketTitle; } });
35
+ exports.init = void 0;
71
36
  var init_js_1 = require("./init.js");
72
37
  Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_js_1.init; } });
73
- var OpenserviceTranslationKeys_js_1 = require("./types/OpenserviceTranslationKeys.js");
74
- Object.defineProperty(exports, "OpenserviceMessageTranslationKeys", { enumerable: true, get: function () { return OpenserviceTranslationKeys_js_1.OpenserviceMessageTranslationKeys; } });
75
38
  __exportStar(require("./types/ScheduleTypes.js"), exports);
76
39
  __exportStar(require("./types/TicketMeta.js"), exports);
@@ -1,16 +1,8 @@
1
1
  /**
2
- * Bring the open.SERVICE feature up.
2
+ * Bring open.SERVICE (`Service_*`) up.
3
3
  *
4
- * Each generation behind its own feature flag: the v1 bootstraps seed and
5
- * migrate the `Maintenance_*` classes (`MAINTENANCE`), v2 the `Service_*` ones
6
- * (`SERVICE`). Both used to hang on `MAINTENANCE` alone, so an installation
7
- * running only v2 got none of its own setup — no config rows (archive period,
8
- * alarm secrets), no alarm actions. The v1 half is deprecated (each function
9
- * says what replaces it) but must keep running as long as installations hold
10
- * v1 data — dropping it would strand their tickets and plans, not just their
11
- * code.
4
+ * v1 (`Maintenance_*`) has no runtime any more. Its classes are still created
5
+ * under the `MAINTENANCE` flag — only so installations that have not migrated
6
+ * yet keep their data and can run `pnpm migrate`.
12
7
  */
13
- export declare function init(generations: {
14
- v1: boolean;
15
- v2: boolean;
16
- }): Promise<void>;
8
+ export declare function init(): Promise<void>;
@@ -1,63 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.init = init;
4
- const initIssuecategory_js_1 = require("./issuecategory/initIssuecategory.js");
5
- const initKanbanStates_js_1 = require("./kanbanState/initKanbanStates.js");
6
- const initMessages_js_1 = require("./messages/initMessages.js");
7
- const initSchedulesFeature_js_1 = require("./schedules/initSchedulesFeature.js");
8
4
  const initServiceSchedulesFeature_js_1 = require("./serviceSchedules/initServiceSchedulesFeature.js");
9
5
  const initKpiFeature_js_1 = require("./kpis/initKpiFeature.js");
10
6
  const index_js_1 = require("../config/index.js");
11
7
  const index_js_2 = require("./alarms/index.js");
12
- const checkStatus_js_1 = require("./schedules/checkStatus.js");
13
- const reassignScheduleExecutions_js_1 = require("./schedules/reassignScheduleExecutions.js");
14
- const initTicket_js_1 = require("./ticket/initTicket.js");
15
8
  /**
16
- * Bring the open.SERVICE feature up.
9
+ * Bring open.SERVICE (`Service_*`) up.
17
10
  *
18
- * Each generation behind its own feature flag: the v1 bootstraps seed and
19
- * migrate the `Maintenance_*` classes (`MAINTENANCE`), v2 the `Service_*` ones
20
- * (`SERVICE`). Both used to hang on `MAINTENANCE` alone, so an installation
21
- * running only v2 got none of its own setup — no config rows (archive period,
22
- * alarm secrets), no alarm actions. The v1 half is deprecated (each function
23
- * says what replaces it) but must keep running as long as installations hold
24
- * v1 data — dropping it would strand their tickets and plans, not just their
25
- * code.
11
+ * v1 (`Maintenance_*`) has no runtime any more. Its classes are still created
12
+ * under the `MAINTENANCE` flag — only so installations that have not migrated
13
+ * yet keep their data and can run `pnpm migrate`.
26
14
  */
27
- async function init(generations) {
15
+ async function init() {
28
16
  console.log("Initializing open.SERVICE feature...");
29
- // --- v1 (`Maintenance_*`), deprecated ------------------------------------
30
- if (generations.v1) {
31
- await (0, initKanbanStates_js_1.initKanbanStates)();
32
- await (0, initIssuecategory_js_1.initIssuecategory)();
33
- await (0, initMessages_js_1.initializeMessages)();
34
- await (0, initKanbanStates_js_1.initCurrentTicketStates)();
35
- await (0, initTicket_js_1.updateTicketDescription)();
36
- await (0, initKanbanStates_js_1.initEnabledFlag)();
37
- await (0, initTicket_js_1.initTicketClass)();
38
- await (0, reassignScheduleExecutions_js_1.reassignScheduleExecutions)();
39
- await (0, checkStatus_js_1.checkStatus)();
40
- await (0, initSchedulesFeature_js_1.initSchedulesFeature)();
41
- }
42
- // --- v2 (`Service_*`) ----------------------------------------------------
43
- if (generations.v2) {
44
- await (0, initServiceSchedulesFeature_js_1.initServiceSchedulesFeature)();
45
- await (0, initKpiFeature_js_1.initKpiFeature)();
46
- // The alarm classes exist only with MONITORING (featuremap). A failure
47
- // here must not stop the rest of open.SERVICE from coming up.
48
- if ((0, index_js_1.isFeatureEnabled)("MONITORING")) {
49
- try {
50
- await (0, index_js_2.ensureAlarmTicketAction)();
51
- await (0, index_js_2.ensureAlarmScheduleAction)();
52
- }
53
- catch (error) {
54
- console.error("[open.SERVICE] Alarm actions not set up:", error);
55
- }
17
+ await (0, initServiceSchedulesFeature_js_1.initServiceSchedulesFeature)();
18
+ await (0, initKpiFeature_js_1.initKpiFeature)();
19
+ // The alarm classes exist only with MONITORING (featuremap). A failure here
20
+ // must not stop the rest of open.SERVICE from coming up.
21
+ if ((0, index_js_1.isFeatureEnabled)("MONITORING")) {
22
+ try {
23
+ await (0, index_js_2.ensureAlarmTicketAction)();
24
+ await (0, index_js_2.ensureAlarmScheduleAction)();
25
+ }
26
+ catch (error) {
27
+ console.error("[open.SERVICE] Alarm actions not set up:", error);
56
28
  }
57
29
  }
58
30
  // Last, so the rows it reports as missing are the ones a human still has to
59
- // supply rather than ones a later bootstrap would have created anyway. The
60
- // catalogue holds keys of both generations.
31
+ // supply rather than ones a later bootstrap would have created anyway.
61
32
  await (0, index_js_1.ensureConfigs)();
62
33
  console.log("open.SERVICE feature initialized.");
63
34
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The token response of the Microsoft identity platform (client credentials).
3
+ */
4
+ export type Access = {
5
+ token_type: "Bearer";
6
+ expires_in: number;
7
+ ext_expires_in: number;
8
+ access_token: string;
9
+ };
@@ -0,0 +1,71 @@
1
+ import { GraphEvent, GraphEventResponse } from "./Event.js";
2
+ /**
3
+ * The properties the sync reads from an event — everything the plan mapping
4
+ * and the change detection (`inboundChanges.ts`) need, and nothing else.
5
+ */
6
+ export declare const EVENT_SELECT: string;
7
+ /**
8
+ * Graph answered 429. Thrown rather than swallowed: a caller that carries on
9
+ * makes the next request just as throttled — the poller stops its pass and
10
+ * waits `retryAfterSeconds` (Microsoft's documented contract).
11
+ */
12
+ export declare class GraphThrottledError extends Error {
13
+ readonly retryAfterSeconds: number;
14
+ constructor(retryAfterSeconds: number);
15
+ }
16
+ /** One event of a batch read: the event, `null` when it no longer exists. */
17
+ export type BatchEventResult = GraphEventResponse | null;
18
+ /**
19
+ * Microsoft Graph client for one mailbox's calendar (client credentials).
20
+ *
21
+ * Model-free: it knows Graph events, not maintenance plans. Moved here from
22
+ * the v1 sync (`schedules/calendarSync`) when that was removed.
23
+ *
24
+ * Failures other than throttling are logged and come back as `undefined` /
25
+ * `null` / `false`, as before — the sync treats a failed write as "try again
26
+ * with the next save".
27
+ */
28
+ export declare class CalendarManager {
29
+ tenantID?: string;
30
+ clientID?: string;
31
+ clientSecret?: string;
32
+ userMail?: string;
33
+ constructor(config: {
34
+ tenantId: string;
35
+ clientID: string;
36
+ clientSecret: string;
37
+ userMail: string;
38
+ });
39
+ get isValid(): true | string;
40
+ private get mailbox();
41
+ private getToken;
42
+ /** A Graph request with the token; `null` when there is no token. */
43
+ private request;
44
+ createEvent(event: GraphEvent): Promise<GraphEventResponse | undefined>;
45
+ updateEvent(eventId: string, event: Partial<GraphEvent>): Promise<GraphEventResponse | undefined>;
46
+ /** `true` also when the event was already gone — the goal is reached. */
47
+ deleteEvent(eventId: string): Promise<boolean>;
48
+ fetchEvent(eventId: string): Promise<GraphEventResponse | null>;
49
+ /**
50
+ * Read many events by id, 20 per `$batch` request.
51
+ *
52
+ * The map holds an entry for every id Graph answered: the event, or `null`
53
+ * for one that no longer exists (404). An id missing from the map could not
54
+ * be read (another error) — the caller must not mistake that for a deletion.
55
+ * `null` overall when not even the batch request went through.
56
+ */
57
+ fetchEventsBatch(eventIds: string[]): Promise<Map<string, BatchEventResult> | null>;
58
+ /**
59
+ * Series masters and single events carrying an Outlook category — the
60
+ * opt-in for creating a plan from Outlook. `/events` never returns
61
+ * occurrences, so a series comes back once. At most `maxItems`, so a
62
+ * mailbox where thousands of appointments carry the category cannot turn a
63
+ * pass into an unbounded read. `null` when the request failed.
64
+ */
65
+ listEventsWithCategory(category: string, maxItems: number): Promise<GraphEventResponse[] | null>;
66
+ /**
67
+ * The occurrences of a series between two instants — moved ones (exceptions)
68
+ * included, deleted ones not. `null` when the request failed.
69
+ */
70
+ fetchInstances(seriesId: string, from: Date, to: Date): Promise<GraphEventResponse[] | null>;
71
+ }