@openinc/parse-server-opendash 2.4.103 → 3.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.
- package/dist/featuremap.json +4 -1
- package/dist/features/config/helper/baseOptions.d.ts +2 -0
- package/dist/features/config/helper/baseOptions.js +50 -0
- package/dist/features/config/helper/customOptions.d.ts +2 -0
- package/dist/{config.js → features/config/helper/customOptions.js} +2 -4
- package/dist/features/config/index.d.ts +6 -0
- package/dist/features/config/index.js +16 -0
- package/dist/features/config/services/ConfigInstance.d.ts +5 -0
- package/dist/features/config/services/ConfigInstance.js +13 -0
- package/dist/features/config/states/Config.d.ts +20 -0
- package/dist/{helper → features/config/states}/Config.js +86 -52
- package/dist/features/config/types/configTypes.d.ts +35 -0
- package/dist/features/cron/index.d.ts +1 -0
- package/dist/features/notifications/index.d.ts +4 -0
- package/dist/features/notifications/index.js +13 -0
- package/dist/features/notifications/services/registerNotification.d.ts +7 -0
- package/dist/features/notifications/services/registerNotification.js +80 -0
- package/dist/features/notifications/states/NotificationClass.d.ts +12 -0
- package/dist/features/notifications/states/NotificationClass.js +21 -0
- package/dist/features/notifications/types/NotificationTypes.d.ts +11 -0
- package/dist/features/notifications/types/NotificationTypes.js +2 -0
- package/dist/features/openservice/index.d.ts +2 -0
- package/dist/features/openservice/index.js +5 -0
- package/dist/{helper/TranslationKeys.d.ts → features/openservice/types/OpenserviceTranslationKeys.d.ts} +1 -1
- package/dist/{helper/TranslationKeys.js → features/openservice/types/OpenserviceTranslationKeys.js} +5 -5
- package/dist/{helper → features/openservice/types}/TicketData.d.ts +1 -1
- package/dist/features/openservice/types/TicketData.js +2 -0
- package/dist/features/openware/helper/getToken.d.ts +1 -0
- package/dist/features/openware/helper/getToken.js +25 -0
- package/dist/features/openware/index.d.ts +7 -0
- package/dist/features/openware/index.js +7 -0
- package/dist/features/openware/services/publishDataItem.d.ts +2 -0
- package/dist/{ow.js → features/openware/services/publishDataItem.js} +5 -23
- package/dist/features/openware/types/DataItemInterface.d.ts +10 -0
- package/dist/features/openware/types/DataItemInterface.js +2 -0
- package/dist/features/openware/types/DataItemValueInterface.d.ts +4 -0
- package/dist/features/openware/types/DataItemValueInterface.js +2 -0
- package/dist/features/openware/types/DataItemValueTypeInterface.d.ts +6 -0
- package/dist/features/openware/types/DataItemValueTypeInterface.js +2 -0
- package/dist/features/openware/types/DataItemValueTypeTypeField.d.ts +1 -0
- package/dist/features/openware/types/DataItemValueTypeTypeField.js +2 -0
- package/dist/{app_types → features/openware/types}/OpenWareTicketObject.d.ts +1 -1
- package/dist/features/openware/types/OpenWareTicketObject.js +2 -0
- package/dist/features/permissions/index.d.ts +4 -0
- package/dist/features/permissions/index.js +13 -0
- package/dist/features/permissions/services/registerPermissions.d.ts +7 -0
- package/dist/features/permissions/services/registerPermissions.js +80 -0
- package/dist/{helper/registerPermissions.d.ts → features/permissions/states/PermissionClass.d.ts} +2 -12
- package/dist/features/permissions/states/PermissionClass.js +21 -0
- package/dist/features/permissions/types/PermissionTypes.d.ts +11 -0
- package/dist/features/permissions/types/PermissionTypes.js +2 -0
- package/dist/functions/opendash-geo-features.js +5 -5
- package/dist/functions/openinc-auth-signup.js +6 -5
- package/dist/functions/openinc-auth.common.js +3 -3
- package/dist/functions/openinc-config.js +2 -2
- package/dist/functions/openinc-geo-google.common.d.ts +1 -1
- package/dist/functions/openinc-geo-google.common.js +3 -4
- package/dist/functions/openinc-geo-graphhopper.common.d.ts +1 -1
- package/dist/functions/openinc-geo-graphhopper.common.js +4 -4
- package/dist/functions/openinc-openservice-save-ticket-data.js +45 -7
- package/dist/hooks/Alarm.js +3 -3
- package/dist/hooks/BDE_Result.js +2 -2
- package/dist/hooks/Core_Email.js +10 -10
- package/dist/hooks/MES_Order.js +8 -12
- package/dist/hooks/ML_DataSelection.d.ts +1 -0
- package/dist/hooks/ML_DataSelection.js +17 -0
- package/dist/hooks/Maintenance_Downtime.js +5 -5
- package/dist/hooks/Maintenance_Duedate.js +5 -5
- package/dist/hooks/Maintenance_Frequency.js +5 -5
- package/dist/hooks/Maintenance_Message.js +29 -29
- package/dist/hooks/Maintenance_Priority.js +5 -5
- package/dist/hooks/Maintenance_Restriction.js +5 -5
- package/dist/hooks/Maintenance_Schedule_Execution.js +3 -3
- package/dist/hooks/Maintenance_Ticket.js +1 -1
- package/dist/hooks/Maintenance_Ticket_FormConfig.d.ts +1 -0
- package/dist/hooks/Maintenance_Ticket_FormConfig.js +34 -0
- package/dist/hooks/Maintenance_Ticket_Issuecategory.js +5 -5
- package/dist/hooks/Maintenance_Ticket_Kanban_State.js +5 -5
- package/dist/hooks/Maintenance_Ticket_Material.js +5 -5
- package/dist/hooks/Maintenance_Ticket_Project.js +5 -5
- package/dist/hooks/Maintenance_Ticket_Source.js +5 -5
- package/dist/hooks/Maintenance_Ticket_Title.js +5 -5
- package/dist/hooks/Notification.js +4 -4
- package/dist/hooks/Notification_Setting.js +0 -38
- package/dist/hooks/OWPlcDevice.d.ts +1 -0
- package/dist/hooks/OWPlcDevice.js +17 -0
- package/dist/hooks/OWPlcItem.d.ts +1 -0
- package/dist/hooks/OWPlcItem.js +17 -0
- package/dist/hooks/_User.js +2 -2
- package/dist/hooks/_beforeLogin.js +3 -3
- package/dist/index.js +23 -56
- package/dist/jobs/open_service_notifyOnSchedule.js +4 -4
- package/dist/types/Maintenance_Project.d.ts +3 -0
- package/dist/types/Maintenance_Project.js +6 -0
- package/dist/types/Maintenance_Schedule_Step.d.ts +3 -17
- package/dist/types/Maintenance_Ticket_FormConfig.d.ts +19 -0
- package/dist/types/Maintenance_Ticket_FormConfig.js +26 -0
- package/dist/types/OWPlcDevice.d.ts +28 -0
- package/dist/types/OWPlcDevice.js +47 -0
- package/dist/types/OWPlcItem.d.ts +42 -0
- package/dist/types/OWPlcItem.js +71 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +8 -1
- package/package.json +33 -11
- package/schema/Maintenance_Project.json +5 -0
- package/schema/Maintenance_Ticket_FormConfig.json +44 -0
- package/schema/OWPlcDevice.json +56 -0
- package/schema/OWPlcItem.json +75 -0
- package/dist/app_types/index.d.ts +0 -5
- package/dist/app_types/index.js +0 -9
- package/dist/config.d.ts +0 -2
- package/dist/helper/Config.d.ts +0 -33
- package/dist/helper/pdf2img.d.ts +0 -15
- package/dist/helper/pdf2img.js +0 -157
- package/dist/helper/registerNotification.d.ts +0 -25
- package/dist/helper/registerNotification.js +0 -61
- package/dist/helper/registerPermissions.js +0 -58
- package/dist/ow.d.ts +0 -21
- package/dist/{app_types → features/config/types}/ConfigKeys.d.ts +0 -0
- package/dist/{app_types → features/config/types}/ConfigKeys.js +0 -0
- package/dist/{app_types/CRON_Types.js → features/config/types/configTypes.js} +0 -0
- package/dist/{app_types/OpenWareTicketObject.js → features/cron/index.js} +0 -0
- package/dist/{app_types → features/cron/types}/CRON_Types.d.ts +0 -0
- package/dist/{helper/TicketData.js → features/cron/types/CRON_Types.js} +0 -0
- package/dist/{app_types → features/notifications/types}/Notifications.d.ts +0 -0
- package/dist/{app_types → features/notifications/types}/Notifications.js +2 -2
- /package/dist/{app_types → features/permissions/types}/Permissions.d.ts +0 -0
- /package/dist/{app_types → features/permissions/types}/Permissions.js +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RegisteredPermission = void 0;
|
|
4
|
-
exports.getAllPermissions = getAllPermissions;
|
|
5
|
-
const app_types_1 = require("../app_types");
|
|
6
|
-
/**
|
|
7
|
-
* Returns all permissions from the OpenService plugin defined in types/config.ts as an array of Permission objects.
|
|
8
|
-
* @returns all permissions from the OpenService plugin
|
|
9
|
-
*/
|
|
10
|
-
function getAllPermissions() {
|
|
11
|
-
const permissions = []; // stores all permissions
|
|
12
|
-
for (const key in app_types_1.Permissions) {
|
|
13
|
-
// iterate over the objects / enums of the Permissions namespace
|
|
14
|
-
if (Object.prototype.hasOwnProperty.call(app_types_1.Permissions, key)) {
|
|
15
|
-
const element = app_types_1.Permissions[key]; // get the object / enum
|
|
16
|
-
const createdPermissions = createPermission(element); // create Permission objects recursively
|
|
17
|
-
permissions.push(...createdPermissions);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return permissions;
|
|
21
|
-
}
|
|
22
|
-
class RegisteredPermission {
|
|
23
|
-
constructor(key, label, description) {
|
|
24
|
-
this.key = key;
|
|
25
|
-
this.label = label;
|
|
26
|
-
this.description = description;
|
|
27
|
-
}
|
|
28
|
-
get(attribute) {
|
|
29
|
-
return this[attribute];
|
|
30
|
-
}
|
|
31
|
-
set(attribute, value) {
|
|
32
|
-
this[attribute] = value;
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.RegisteredPermission = RegisteredPermission;
|
|
37
|
-
/**
|
|
38
|
-
* Recursively creates Permission objects from the input object.
|
|
39
|
-
* @param input a string from an enum or an enum itself
|
|
40
|
-
* @returns an array of Permission objects
|
|
41
|
-
*/
|
|
42
|
-
function createPermission(input) {
|
|
43
|
-
const permissions = []; // all permission objects created from the input
|
|
44
|
-
if (typeof input === "string") {
|
|
45
|
-
// if the input is a string, create a Permission object from it
|
|
46
|
-
permissions.push(new RegisteredPermission(input, input + ".label", input + ".description"));
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
// if the input is an object, iterate over its keys and create Permission objects from the values
|
|
50
|
-
for (const key in input) {
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(input, key)) {
|
|
52
|
-
const element = input[key];
|
|
53
|
-
permissions.push(...createPermission(element));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return permissions;
|
|
58
|
-
}
|
package/dist/ow.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface DataItemInterface {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
source: string;
|
|
5
|
-
reference?: string;
|
|
6
|
-
meta: Record<string, any>;
|
|
7
|
-
valueTypes: DataItemValueTypeInterface[];
|
|
8
|
-
values: DataItemValueInterface[];
|
|
9
|
-
}
|
|
10
|
-
export type DataItemValueTypeTypeField = "Number" | "String" | "Boolean" | "Geo" | "Object";
|
|
11
|
-
export interface DataItemValueTypeInterface {
|
|
12
|
-
unit: string;
|
|
13
|
-
name: string;
|
|
14
|
-
type: DataItemValueTypeTypeField;
|
|
15
|
-
}
|
|
16
|
-
export interface DataItemValueInterface {
|
|
17
|
-
date: number;
|
|
18
|
-
value: any[];
|
|
19
|
-
}
|
|
20
|
-
export declare function getToken(usermail?: string): Promise<string | null>;
|
|
21
|
-
export declare function publishDataItem(dataItem: DataItemInterface, usermail?: string, update?: boolean): Promise<void>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Notifications = void 0;
|
|
2
4
|
/**
|
|
3
5
|
* Notifications that should be registered in the database by default when the server starts.
|
|
4
6
|
* The ACLs are set to od-admin only.
|
|
5
7
|
* Adding new Notification here requires the server to restart for registering those.
|
|
6
8
|
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Notifications = void 0;
|
|
9
9
|
var Notifications;
|
|
10
10
|
(function (Notifications) {
|
|
11
11
|
// needs to be exported for getAllNotifications() to work
|
|
File without changes
|
|
File without changes
|