@openinc/parse-server-opendash 2.4.104 → 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 +5 -4
- 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 +7 -7
- 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/OWPlcItem.json +2 -2
- 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
package/dist/types/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Maintenance_Duedate = exports.Maintenance_Downtime = exports.Maintenance_DailySchedule = exports.MailTemplate = exports.ML_DataSelection = exports.MIAAS_MDSEndpoint = exports.MES_OrderPlan = exports.MES_Order = exports.MES_Article = exports.Log = exports.Language = exports.Knowledge_Video = exports.Knowledge_DocumentPage = exports.Knowledge_Document = exports.Knowledge_ChatMessage = exports.Knowledge_Chat = exports.Knowledge_Category = exports.Knowledge_Article = exports.GTFS_Wheelchair_Boarding = exports.GTFS_Wheelchair_Accessible = exports.GTFS_Trip = exports.GTFS_Stop_Times = exports.GTFS_Stop = exports.GTFS_Route_Type = exports.GTFS_Route = exports.GTFS_Location_Type = exports.GTFS_Level = exports.GTFS_Direction = exports.GTFS_Calendar = exports.GTFS_Bikes_Allowed = exports.GTFS_Agency = exports.Documentation_Document = exports.Documentation_Category = exports.Dashboard = exports.Core_Token = exports.Core_Email = exports.Contact = exports.Config = exports.Company = exports.BDE_Unit = exports.BDE_Result = exports.BDE_Page = exports.BDE_ListEntry = exports.BDE_List = exports.BDE_Form = exports.Attachment = exports.Assets = exports.AlarmWebhook = exports.AlarmAction = exports.Alarm = void 0;
|
|
4
|
-
exports.
|
|
4
|
+
exports.VirtualKPI = exports.User_Setting = exports.UserData = exports.TenantTrustedDomain = exports.TenantMeta = exports.Tenant = exports.SourceMeta = exports.Source = exports.Share = exports.Report = exports.Push = exports.Permission = exports.OWPlcItem = exports.OWPlcDevice = exports.Notification_Setting = exports.Notification = exports.NavigationItem = exports.NavigationGroup = exports.Monitoring_Slideshow = exports.Monitoring_ReportImage = exports.Monitoring_ParseTableSensor = exports.Monitoring_Jobs = exports.Monitoring_DataHierachies = exports.Maintenance_Ticket_Title = exports.Maintenance_Ticket_Source = exports.Maintenance_Ticket_Project = exports.Maintenance_Ticket_Material = exports.Maintenance_Ticket_Kanban_State_Current = exports.Maintenance_Ticket_Kanban_State = exports.Maintenance_Ticket_Issuecategory = exports.Maintenance_Ticket_FormConfig = exports.Maintenance_Ticket_Assignment = exports.Maintenance_Ticket = exports.Maintenance_Source_File = exports.Maintenance_SourceMeta = exports.Maintenance_Schedule_Template = exports.Maintenance_Schedule_Step = exports.Maintenance_Schedule_Execution_Step = exports.Maintenance_Schedule_Execution = exports.Maintenance_Restriction = exports.Maintenance_Project = exports.Maintenance_Priority = exports.Maintenance_Order = exports.Maintenance_Message_Body = exports.Maintenance_Message = exports.Maintenance_Media = exports.Maintenance_Kanban_State = exports.Maintenance_Item = exports.Maintenance_Issuecategory = exports.Maintenance_Frequency = void 0;
|
|
5
|
+
exports.WidgetPreset = exports.Widget = exports.WebPush = void 0;
|
|
5
6
|
var Alarm_1 = require("./Alarm");
|
|
6
7
|
Object.defineProperty(exports, "Alarm", { enumerable: true, get: function () { return Alarm_1.Alarm; } });
|
|
7
8
|
var AlarmAction_1 = require("./AlarmAction");
|
|
@@ -140,6 +141,8 @@ var Maintenance_Ticket_1 = require("./Maintenance_Ticket");
|
|
|
140
141
|
Object.defineProperty(exports, "Maintenance_Ticket", { enumerable: true, get: function () { return Maintenance_Ticket_1.Maintenance_Ticket; } });
|
|
141
142
|
var Maintenance_Ticket_Assignment_1 = require("./Maintenance_Ticket_Assignment");
|
|
142
143
|
Object.defineProperty(exports, "Maintenance_Ticket_Assignment", { enumerable: true, get: function () { return Maintenance_Ticket_Assignment_1.Maintenance_Ticket_Assignment; } });
|
|
144
|
+
var Maintenance_Ticket_FormConfig_1 = require("./Maintenance_Ticket_FormConfig");
|
|
145
|
+
Object.defineProperty(exports, "Maintenance_Ticket_FormConfig", { enumerable: true, get: function () { return Maintenance_Ticket_FormConfig_1.Maintenance_Ticket_FormConfig; } });
|
|
143
146
|
var Maintenance_Ticket_Issuecategory_1 = require("./Maintenance_Ticket_Issuecategory");
|
|
144
147
|
Object.defineProperty(exports, "Maintenance_Ticket_Issuecategory", { enumerable: true, get: function () { return Maintenance_Ticket_Issuecategory_1.Maintenance_Ticket_Issuecategory; } });
|
|
145
148
|
var Maintenance_Ticket_Kanban_State_1 = require("./Maintenance_Ticket_Kanban_State");
|
|
@@ -172,6 +175,10 @@ var Notification_1 = require("./Notification");
|
|
|
172
175
|
Object.defineProperty(exports, "Notification", { enumerable: true, get: function () { return Notification_1.Notification; } });
|
|
173
176
|
var Notification_Setting_1 = require("./Notification_Setting");
|
|
174
177
|
Object.defineProperty(exports, "Notification_Setting", { enumerable: true, get: function () { return Notification_Setting_1.Notification_Setting; } });
|
|
178
|
+
var OWPlcDevice_1 = require("./OWPlcDevice");
|
|
179
|
+
Object.defineProperty(exports, "OWPlcDevice", { enumerable: true, get: function () { return OWPlcDevice_1.OWPlcDevice; } });
|
|
180
|
+
var OWPlcItem_1 = require("./OWPlcItem");
|
|
181
|
+
Object.defineProperty(exports, "OWPlcItem", { enumerable: true, get: function () { return OWPlcItem_1.OWPlcItem; } });
|
|
175
182
|
var Permission_1 = require("./Permission");
|
|
176
183
|
Object.defineProperty(exports, "Permission", { enumerable: true, get: function () { return Permission_1.Permission; } });
|
|
177
184
|
var Push_1 = require("./Push");
|
package/package.json
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openinc/parse-server-opendash",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Parse Server Cloud Code for open.DASH",
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
5
|
+
"packageManager": "pnpm@10.8.1",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"parse",
|
|
8
8
|
"opendash"
|
|
9
9
|
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/open-inc/node-parse-server-opendash.git"
|
|
13
|
+
},
|
|
10
14
|
"license": "MIT",
|
|
11
15
|
"main": "dist/index.js",
|
|
12
16
|
"files": [
|
|
13
17
|
"dist",
|
|
14
18
|
"schema"
|
|
15
19
|
],
|
|
20
|
+
"release": {
|
|
21
|
+
"branches": [
|
|
22
|
+
"master"
|
|
23
|
+
],
|
|
24
|
+
"repositoryUrl": "https://github.com/open-inc/node-parse-server-opendash.git",
|
|
25
|
+
"plugins": [
|
|
26
|
+
"@semantic-release/commit-analyzer",
|
|
27
|
+
"@semantic-release/release-notes-generator",
|
|
28
|
+
"@semantic-release/npm",
|
|
29
|
+
"@semantic-release/github"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
16
32
|
"scripts": {
|
|
17
33
|
"start": "tsc -w",
|
|
18
34
|
"build": "tsc",
|
|
@@ -21,7 +37,7 @@
|
|
|
21
37
|
"schema-up": "parse-server-schema up --prefix OD3_ ./schema",
|
|
22
38
|
"schema-ts": "parse-server-schema typescript --prefix OD3_ --global-sdk ./src/types",
|
|
23
39
|
"typedoc": "typedoc --plugin typedoc-plugin-markdown --hideBreadcrumbs --out docs src/index.ts",
|
|
24
|
-
"predevstart": "
|
|
40
|
+
"predevstart": "./setup_scripts/installDeps.sh",
|
|
25
41
|
"devstart": "parse-server ./config.js",
|
|
26
42
|
"featuremap": "node ./scripts/create-featuremap.js",
|
|
27
43
|
"hooks": "node ./scripts/create-hooks.js"
|
|
@@ -32,27 +48,33 @@
|
|
|
32
48
|
"@openinc/parse-server-schema": "^1.7.12",
|
|
33
49
|
"bree": "^9.2.4",
|
|
34
50
|
"cabin": "^14.0.0",
|
|
35
|
-
"cron": "^3.
|
|
51
|
+
"cron": "^4.3.0",
|
|
36
52
|
"fast-equals": "^5.2.2",
|
|
37
53
|
"jsonwebtoken": "^9.0.2",
|
|
38
|
-
"node-fetch": "^
|
|
39
|
-
"nodemailer": "^6.10.
|
|
54
|
+
"node-fetch": "^3.3.2",
|
|
55
|
+
"nodemailer": "^6.10.1",
|
|
40
56
|
"nunjucks": "^3.2.4",
|
|
41
|
-
"parse-server": "^
|
|
57
|
+
"parse-server": "^8.1.0",
|
|
42
58
|
"pdf-img-convert": "2.0.0",
|
|
59
|
+
"semantic-release": "^24.2.3",
|
|
60
|
+
"table": "^6.9.0",
|
|
43
61
|
"web-push": "^3.6.7"
|
|
44
62
|
},
|
|
45
63
|
"devDependencies": {
|
|
64
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
65
|
+
"@semantic-release/github": "^11.0.1",
|
|
66
|
+
"@semantic-release/npm": "^12.0.1",
|
|
67
|
+
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
46
68
|
"@types/jsonwebtoken": "^9.0.9",
|
|
47
|
-
"@types/node": "^
|
|
69
|
+
"@types/node": "^22.14.1",
|
|
48
70
|
"@types/node-fetch": "^2.6.12",
|
|
49
71
|
"@types/nodemailer": "^6.4.17",
|
|
50
72
|
"@types/nunjucks": "^3.2.6",
|
|
51
73
|
"@types/parse": "^3.0.9",
|
|
52
74
|
"@types/safe-timers": "^1.1.2",
|
|
53
75
|
"@types/web-push": "^3.6.4",
|
|
54
|
-
"typedoc": "^0.
|
|
55
|
-
"typedoc-plugin-markdown": "^4.
|
|
56
|
-
"typescript": "^5.
|
|
76
|
+
"typedoc": "^0.28.2",
|
|
77
|
+
"typedoc-plugin-markdown": "^4.6.2",
|
|
78
|
+
"typescript": "^5.8.3"
|
|
57
79
|
}
|
|
58
80
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fields": {
|
|
3
|
+
"config": {
|
|
4
|
+
"type": "Object",
|
|
5
|
+
"required": true
|
|
6
|
+
},
|
|
7
|
+
"roles": {
|
|
8
|
+
"type": "Relation",
|
|
9
|
+
"targetClass": "_Role",
|
|
10
|
+
"required": false
|
|
11
|
+
},
|
|
12
|
+
"view": {
|
|
13
|
+
"type": "String",
|
|
14
|
+
"required": true,
|
|
15
|
+
"defaultValue": "formular"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"classLevelPermissions": {
|
|
19
|
+
"find": {
|
|
20
|
+
"*": true
|
|
21
|
+
},
|
|
22
|
+
"count": {
|
|
23
|
+
"*": true
|
|
24
|
+
},
|
|
25
|
+
"get": {
|
|
26
|
+
"*": true
|
|
27
|
+
},
|
|
28
|
+
"create": {
|
|
29
|
+
"*": true
|
|
30
|
+
},
|
|
31
|
+
"update": {
|
|
32
|
+
"*": true
|
|
33
|
+
},
|
|
34
|
+
"delete": {
|
|
35
|
+
"*": true
|
|
36
|
+
},
|
|
37
|
+
"addField": {
|
|
38
|
+
"*": true
|
|
39
|
+
},
|
|
40
|
+
"protectedFields": {
|
|
41
|
+
"*": []
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/schema/OWPlcItem.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { ConfigKeys } from "./ConfigKeys";
|
|
2
|
-
export { ScheduleCronObjectType, ScheduleType } from "./CRON_Types";
|
|
3
|
-
export { Notifications } from "./Notifications";
|
|
4
|
-
export { OpenWareTicketObject } from "./OpenWareTicketObject";
|
|
5
|
-
export { Permissions } from "./Permissions";
|
package/dist/app_types/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Permissions = exports.Notifications = exports.ConfigKeys = void 0;
|
|
4
|
-
var ConfigKeys_1 = require("./ConfigKeys");
|
|
5
|
-
Object.defineProperty(exports, "ConfigKeys", { enumerable: true, get: function () { return ConfigKeys_1.ConfigKeys; } });
|
|
6
|
-
var Notifications_1 = require("./Notifications");
|
|
7
|
-
Object.defineProperty(exports, "Notifications", { enumerable: true, get: function () { return Notifications_1.Notifications; } });
|
|
8
|
-
var Permissions_1 = require("./Permissions");
|
|
9
|
-
Object.defineProperty(exports, "Permissions", { enumerable: true, get: function () { return Permissions_1.Permissions; } });
|
package/dist/config.d.ts
DELETED
package/dist/helper/Config.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
interface CommonConfigValue {
|
|
2
|
-
env: string;
|
|
3
|
-
type: "string" | "int" | "float" | "boolean";
|
|
4
|
-
secret: boolean;
|
|
5
|
-
public: boolean;
|
|
6
|
-
required: boolean;
|
|
7
|
-
default?: string;
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
10
|
-
interface ConfigValue extends CommonConfigValue {
|
|
11
|
-
type: "string" | "int" | "float";
|
|
12
|
-
}
|
|
13
|
-
interface ConfigBooleanValue extends CommonConfigValue {
|
|
14
|
-
type: "boolean";
|
|
15
|
-
dependencies?: string[];
|
|
16
|
-
}
|
|
17
|
-
export interface ConfigMap {
|
|
18
|
-
[key: string]: ConfigValue | ConfigBooleanValue;
|
|
19
|
-
}
|
|
20
|
-
export declare class Config<T extends string> {
|
|
21
|
-
private configs;
|
|
22
|
-
private values;
|
|
23
|
-
constructor(configs: ConfigMap);
|
|
24
|
-
init(log: boolean): Promise<void>;
|
|
25
|
-
get(key: T): string;
|
|
26
|
-
getBoolean(key: T): boolean;
|
|
27
|
-
getNumber(key: T): number;
|
|
28
|
-
export(): Record<string, any>;
|
|
29
|
-
private validateKey;
|
|
30
|
-
private validateKeyType;
|
|
31
|
-
log(): void;
|
|
32
|
-
}
|
|
33
|
-
export {};
|
package/dist/helper/pdf2img.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
/** Number in px */
|
|
3
|
-
width?: number;
|
|
4
|
-
/** Number in px */
|
|
5
|
-
height?: number;
|
|
6
|
-
/** A list of pages to render instead of all of them */
|
|
7
|
-
page_numbers?: number[];
|
|
8
|
-
/** Output as base64 */
|
|
9
|
-
base64?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated This should be deleted as pdf-img-converter can be used directly
|
|
13
|
-
*/
|
|
14
|
-
export declare function convert(pdf: string, conversion_config?: Options): Promise<string[] | Uint8Array<ArrayBufferLike>[]>;
|
|
15
|
-
export {};
|
package/dist/helper/pdf2img.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Fork of: https://www.npmjs.com/package/pdf-img-convert
|
|
3
|
-
// node_modules/pdf-img-convert/pdf-img-convert.js
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
-
var ownKeys = function(o) {
|
|
22
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
-
var ar = [];
|
|
24
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
-
return ar;
|
|
26
|
-
};
|
|
27
|
-
return ownKeys(o);
|
|
28
|
-
};
|
|
29
|
-
return function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.convert = convert;
|
|
39
|
-
// class NodeCanvasFactory {
|
|
40
|
-
// constructor() {}
|
|
41
|
-
// create(width: number, height: number) {
|
|
42
|
-
// assert(width > 0 && height > 0, "Invalid canvas size");
|
|
43
|
-
// var canvas = Canvas.createCanvas(width, height);
|
|
44
|
-
// var context = canvas.getContext("2d");
|
|
45
|
-
// return {
|
|
46
|
-
// canvas: canvas,
|
|
47
|
-
// context: context,
|
|
48
|
-
// };
|
|
49
|
-
// }
|
|
50
|
-
// reset(canvasAndContext: any, width: number, height: number) {
|
|
51
|
-
// assert(canvasAndContext.canvas, "Canvas is not specified");
|
|
52
|
-
// assert(width > 0 && height > 0, "Invalid canvas size");
|
|
53
|
-
// canvasAndContext.canvas.width = width;
|
|
54
|
-
// canvasAndContext.canvas.height = height;
|
|
55
|
-
// }
|
|
56
|
-
// destroy(canvasAndContext: any) {
|
|
57
|
-
// assert(canvasAndContext.canvas, "Canvas is not specified");
|
|
58
|
-
// // Zeroing the width and height cause Firefox to release graphics
|
|
59
|
-
// // resources immediately, which can greatly reduce memory consumption.
|
|
60
|
-
// canvasAndContext.canvas.width = 0;
|
|
61
|
-
// canvasAndContext.canvas.height = 0;
|
|
62
|
-
// canvasAndContext.canvas = null;
|
|
63
|
-
// canvasAndContext.context = null;
|
|
64
|
-
// }
|
|
65
|
-
// }
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated This should be deleted as pdf-img-converter can be used directly
|
|
68
|
-
*/
|
|
69
|
-
async function convert(pdf, conversion_config = {}) {
|
|
70
|
-
const pdf2img = await Promise.resolve().then(() => __importStar(require("pdf-img-convert")));
|
|
71
|
-
const output = await pdf2img.convert(pdf, {
|
|
72
|
-
base64: conversion_config.base64,
|
|
73
|
-
width: conversion_config.width,
|
|
74
|
-
height: conversion_config.height,
|
|
75
|
-
page_numbers: conversion_config.page_numbers,
|
|
76
|
-
});
|
|
77
|
-
return output;
|
|
78
|
-
// const resp = await fetch(pdf);
|
|
79
|
-
// const pdfData = new Uint8Array(await resp.arrayBuffer());
|
|
80
|
-
// var outputPages = [];
|
|
81
|
-
// var loadingTask = pdfjs.getDocument({ data: pdfData, verbosity: 0 });
|
|
82
|
-
// var pdfDocument = await loadingTask.promise;
|
|
83
|
-
// var canvasFactory = new NodeCanvasFactory();
|
|
84
|
-
// if (conversion_config.height <= 0 || conversion_config.width <= 0)
|
|
85
|
-
// console.error(
|
|
86
|
-
// "Negative viewport dimension given. Defaulting to 100% scale."
|
|
87
|
-
// );
|
|
88
|
-
// // If there are page numbers supplied in the conversion config
|
|
89
|
-
// if (conversion_config.page_numbers)
|
|
90
|
-
// for (let i = 0; i < conversion_config.page_numbers.length; i++) {
|
|
91
|
-
// // This just pushes a render of the page to the array
|
|
92
|
-
// let currentPage = await doc_render(
|
|
93
|
-
// pdfDocument,
|
|
94
|
-
// conversion_config.page_numbers[i],
|
|
95
|
-
// canvasFactory,
|
|
96
|
-
// conversion_config
|
|
97
|
-
// );
|
|
98
|
-
// if (currentPage != null) {
|
|
99
|
-
// // This allows for base64 conversion of output images
|
|
100
|
-
// if (conversion_config.base64)
|
|
101
|
-
// outputPages.push(currentPage.toString("base64"));
|
|
102
|
-
// else outputPages.push(new Uint8Array(currentPage));
|
|
103
|
-
// }
|
|
104
|
-
// }
|
|
105
|
-
// // Otherwise just loop the whole doc
|
|
106
|
-
// else
|
|
107
|
-
// for (let i = 1; i <= pdfDocument.numPages; i++) {
|
|
108
|
-
// let currentPage = await doc_render(
|
|
109
|
-
// pdfDocument,
|
|
110
|
-
// i,
|
|
111
|
-
// canvasFactory,
|
|
112
|
-
// conversion_config
|
|
113
|
-
// );
|
|
114
|
-
// if (currentPage != null) {
|
|
115
|
-
// // This allows for base64 conversion of output images
|
|
116
|
-
// if (conversion_config.base64)
|
|
117
|
-
// outputPages.push(currentPage.toString("base64"));
|
|
118
|
-
// else outputPages.push(new Uint8Array(currentPage));
|
|
119
|
-
// }
|
|
120
|
-
// }
|
|
121
|
-
// return outputPages;
|
|
122
|
-
} // convert method
|
|
123
|
-
// async function doc_render(
|
|
124
|
-
// pdfDocument: PDFDocumentProxy,
|
|
125
|
-
// pageNo: number,
|
|
126
|
-
// canvasFactory: { create: (arg0: any, arg1: any) => any },
|
|
127
|
-
// conversion_config: Options
|
|
128
|
-
// ) {
|
|
129
|
-
// // Page number sanity check
|
|
130
|
-
// if (pageNo < 1 || pageNo > pdfDocument.numPages) {
|
|
131
|
-
// console.error("Invalid page number " + pageNo);
|
|
132
|
-
// return;
|
|
133
|
-
// }
|
|
134
|
-
// // Get the page
|
|
135
|
-
// let page = await pdfDocument.getPage(pageNo);
|
|
136
|
-
// // Create a viewport at 100% scale
|
|
137
|
-
// let outputScale = 1.0;
|
|
138
|
-
// let viewport = page.getViewport({ scale: outputScale });
|
|
139
|
-
// // Scale it up / down dependent on the sizes given in the config (if there
|
|
140
|
-
// // are any)
|
|
141
|
-
// if (conversion_config.width)
|
|
142
|
-
// outputScale = conversion_config.width / viewport.width;
|
|
143
|
-
// else if (conversion_config.height)
|
|
144
|
-
// outputScale = conversion_config.height / viewport.height;
|
|
145
|
-
// if (outputScale != 1 && outputScale > 0)
|
|
146
|
-
// viewport = page.getViewport({ scale: outputScale });
|
|
147
|
-
// let canvasAndContext = canvasFactory.create(viewport.width, viewport.height);
|
|
148
|
-
// let renderContext = {
|
|
149
|
-
// canvasContext: canvasAndContext.context,
|
|
150
|
-
// viewport: viewport,
|
|
151
|
-
// canvasFactory: canvasFactory,
|
|
152
|
-
// };
|
|
153
|
-
// let renderTask = await page.render(renderContext).promise;
|
|
154
|
-
// // Convert the canvas to an image buffer.
|
|
155
|
-
// let image = canvasAndContext.canvas.toBuffer();
|
|
156
|
-
// return image;
|
|
157
|
-
// } // doc_render
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets all registered notifications.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Returns all notifications from the OpenService plugin defined in types/config.ts as an array of Notification objects.
|
|
6
|
-
* @returns all notifications from the OpenService plugin
|
|
7
|
-
*/
|
|
8
|
-
export declare function getAllNotifications(): RegisteredNotification[];
|
|
9
|
-
interface NotificationInterface {
|
|
10
|
-
label: string;
|
|
11
|
-
description: string;
|
|
12
|
-
key: string;
|
|
13
|
-
}
|
|
14
|
-
type FunctionKeys<T> = {
|
|
15
|
-
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
|
|
16
|
-
}[keyof T];
|
|
17
|
-
export declare class RegisteredNotification implements NotificationInterface {
|
|
18
|
-
key: string;
|
|
19
|
-
label: string;
|
|
20
|
-
description: string;
|
|
21
|
-
constructor(key: string, label: string, description: string);
|
|
22
|
-
get<T extends Exclude<keyof RegisteredNotification, FunctionKeys<RegisteredNotification>>>(attribute: T): (typeof this)[T];
|
|
23
|
-
set<T extends Exclude<keyof RegisteredNotification, FunctionKeys<RegisteredNotification>>>(attribute: T, value: (typeof this)[T]): this;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Gets all registered notifications.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RegisteredNotification = void 0;
|
|
7
|
-
exports.getAllNotifications = getAllNotifications;
|
|
8
|
-
const index_js_1 = require("../app_types/index.js");
|
|
9
|
-
/**
|
|
10
|
-
* Returns all notifications from the OpenService plugin defined in types/config.ts as an array of Notification objects.
|
|
11
|
-
* @returns all notifications from the OpenService plugin
|
|
12
|
-
*/
|
|
13
|
-
function getAllNotifications() {
|
|
14
|
-
const notifications = []; // stores all notifications
|
|
15
|
-
for (const key in index_js_1.Notifications) {
|
|
16
|
-
// iterate over the objects / enums of the Notifications namespace
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(index_js_1.Notifications, key)) {
|
|
18
|
-
const element = index_js_1.Notifications[key]; // get the object / enum
|
|
19
|
-
const createdNotification = createNotification(element); // create Notification objects recursively
|
|
20
|
-
notifications.push(...createdNotification);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return notifications;
|
|
24
|
-
}
|
|
25
|
-
class RegisteredNotification {
|
|
26
|
-
constructor(key, label, description) {
|
|
27
|
-
this.key = key;
|
|
28
|
-
this.label = label;
|
|
29
|
-
this.description = description;
|
|
30
|
-
}
|
|
31
|
-
get(attribute) {
|
|
32
|
-
return this[attribute];
|
|
33
|
-
}
|
|
34
|
-
set(attribute, value) {
|
|
35
|
-
this[attribute] = value;
|
|
36
|
-
return this;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.RegisteredNotification = RegisteredNotification;
|
|
40
|
-
/**
|
|
41
|
-
* Recursively creates Notification objects from the input object.
|
|
42
|
-
* @param input a string from an enum or an enum itself
|
|
43
|
-
* @returns an array of Notification objects
|
|
44
|
-
*/
|
|
45
|
-
function createNotification(input) {
|
|
46
|
-
const notifications = []; // all notification objects created from the input
|
|
47
|
-
if (typeof input === "string") {
|
|
48
|
-
// if the input is a string, create a Notification object from it
|
|
49
|
-
notifications.push(new RegisteredNotification(input, input + ".label", input + ".description"));
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
// if the input is an object, iterate over its keys and create Notification objects from the values
|
|
53
|
-
for (const key in input) {
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(input, key)) {
|
|
55
|
-
const element = input[key];
|
|
56
|
-
notifications.push(...createNotification(element));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return notifications;
|
|
61
|
-
}
|
|
@@ -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
|