@openinc/parse-server-opendash 2.4.89 → 2.4.91
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/app_types/ConfigKeys.d.ts +9 -0
- package/dist/app_types/ConfigKeys.js +14 -0
- package/dist/app_types/Notifications.d.ts +10 -0
- package/dist/app_types/Notifications.js +16 -0
- package/dist/app_types/Permissions.d.ts +42 -0
- package/dist/app_types/Permissions.js +61 -0
- package/dist/app_types/index.d.ts +3 -0
- package/dist/app_types/index.js +9 -0
- package/dist/featuremap.json +7 -5
- package/dist/functions/openinc-deregister-permission.js +2 -2
- package/dist/functions/openinc-openservice-save-ticket-data.d.ts +40 -0
- package/dist/functions/openinc-openservice-save-ticket-data.js +328 -0
- package/dist/functions/openinc-openservice-ticket-data.js +17 -74
- package/dist/functions/openinc-register-permission.js +1 -1
- package/dist/functions/openinc-user-roles.js +1 -1
- package/dist/helper/TicketData.d.ts +15 -0
- package/dist/helper/TicketData.js +2 -0
- package/dist/helper/pdf2img.d.ts +4 -1
- package/dist/helper/pdf2img.js +151 -104
- package/dist/helper/registerNotification.d.ts +25 -0
- package/dist/helper/registerNotification.js +61 -0
- package/dist/helper/registerPermissions.d.ts +0 -41
- package/dist/helper/registerPermissions.js +5 -61
- package/dist/hooks/Assets.js +17 -0
- package/dist/hooks/Documentation_Category.d.ts +1 -0
- package/dist/hooks/Documentation_Category.js +17 -0
- package/dist/hooks/Documentation_Document.d.ts +1 -0
- package/dist/hooks/Documentation_Document.js +17 -0
- package/dist/hooks/Knowledge_Document.js +35 -2
- package/dist/hooks/Maintenance_Message.js +12 -6
- package/dist/hooks/Maintenance_Message_Body.js +11 -2
- package/dist/hooks/Maintenance_Schedule_Execution.js +4 -4
- package/dist/hooks/Maintenance_Schedule_Template.js +19 -8
- package/dist/hooks/Maintenance_Ticket.js +1 -4
- package/dist/hooks/Maintenance_Ticket_Kanban_State_Current.js +1 -1
- package/dist/hooks/Notification_Setting.d.ts +1 -0
- package/dist/hooks/Notification_Setting.js +55 -0
- package/dist/hooks/User_Setting.d.ts +1 -0
- package/dist/hooks/User_Setting.js +17 -0
- package/dist/hooks/_User.js +0 -12
- package/dist/index.js +12 -0
- package/dist/jobs/open_service_notifyOnSchedule.js +125 -19
- package/dist/types/Assets.d.ts +27 -0
- package/dist/types/Assets.js +41 -0
- package/dist/types/Documentation_Category.d.ts +3 -0
- package/dist/types/Documentation_Category.js +6 -0
- package/dist/types/Documentation_Document.d.ts +3 -6
- package/dist/types/Documentation_Document.js +4 -10
- package/dist/types/Knowledge_Document.d.ts +3 -0
- package/dist/types/Knowledge_Document.js +6 -0
- package/dist/types/Maintenance_Message.d.ts +9 -0
- package/dist/types/Maintenance_Message.js +15 -0
- package/dist/types/Maintenance_Message_Body.d.ts +3 -0
- package/dist/types/Maintenance_Message_Body.js +6 -0
- package/dist/types/Maintenance_Schedule_Execution.d.ts +3 -0
- package/dist/types/Maintenance_Schedule_Execution.js +6 -0
- package/dist/types/Notification_Setting.d.ts +29 -0
- package/dist/types/Notification_Setting.js +41 -0
- package/dist/types/User_Setting.d.ts +13 -0
- package/dist/types/User_Setting.js +17 -0
- package/dist/types/_User.d.ts +2 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.js +8 -4
- package/package.json +4 -4
- package/schema/Assets.json +52 -0
- package/schema/Documentation_Category.json +4 -0
- package/schema/Documentation_Document.json +3 -9
- package/schema/Knowledge_Document.json +5 -0
- package/schema/Maintenance_Message.json +13 -0
- package/schema/Maintenance_Message_Body.json +4 -0
- package/schema/Maintenance_Schedule_Execution.json +4 -0
- package/schema/Notification_Setting.json +57 -0
- package/schema/User_Setting.json +35 -0
- package/dist/hooks/Group.js +0 -55
- package/dist/types/Group.d.ts +0 -31
- package/dist/types/Group.js +0 -47
- package/schema/Group.json +0 -62
- /package/dist/hooks/{Group.d.ts → Assets.d.ts} +0 -0
|
@@ -3,30 +3,136 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// import {
|
|
7
|
+
// changeLanguage,
|
|
8
|
+
// getCurrentLanguageSync,
|
|
9
|
+
// useTranslation,
|
|
10
|
+
// } from "@opendash/i18n";
|
|
6
11
|
const node_process_1 = __importDefault(require("node:process"));
|
|
7
12
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const node_js_1 = __importDefault(require("parse/node.js"));
|
|
14
|
+
const ConfigKeys_js_1 = require("../app_types/ConfigKeys.js");
|
|
15
|
+
const Notifications_js_1 = require("../app_types/Notifications.js");
|
|
16
|
+
const openinc_openservice_save_ticket_data_js_1 = require("../functions/openinc-openservice-save-ticket-data.js");
|
|
17
|
+
const catchError_js_1 = require("../helper/catchError.js");
|
|
18
|
+
const Config_js_1 = require("../types/Config.js");
|
|
19
|
+
const Maintenance_Schedule_Template_js_1 = require("../types/Maintenance_Schedule_Template.js");
|
|
20
|
+
const Notification_js_1 = require("../types/Notification.js");
|
|
21
|
+
const Notification_Setting_js_1 = require("../types/Notification_Setting.js");
|
|
22
|
+
function l(message) {
|
|
23
|
+
if (node_worker_threads_1.parentPort) {
|
|
24
|
+
node_worker_threads_1.parentPort.postMessage(message);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
14
27
|
(async () => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
l("Initializing Parse with worker data: " + JSON.stringify(node_worker_threads_1.workerData));
|
|
29
|
+
node_js_1.default.initialize(node_worker_threads_1.workerData.ParseAppId, node_worker_threads_1.workerData.ParseJSKey !== "unused" ? node_worker_threads_1.workerData.ParseJSKey : undefined, node_worker_threads_1.workerData.ParseMasterKey);
|
|
30
|
+
node_js_1.default.serverURL = node_worker_threads_1.workerData.ParseServerURL;
|
|
31
|
+
l("Schedule is due.");
|
|
32
|
+
// Check OD3_Config class for key ConfigKeys.OpenService.createTicketOnSchedule. If value is true, proceed with ticket creation
|
|
33
|
+
const [configError, config] = await (0, catchError_js_1.catchError)(new node_js_1.default.Query(Config_js_1.Config.className)
|
|
34
|
+
.equalTo("key", ConfigKeys_js_1.ConfigKeys.OpenService.createTicketOnSchedule)
|
|
35
|
+
.first({ useMasterKey: true }));
|
|
36
|
+
//Get schedule object from worker data
|
|
37
|
+
const [scheduleError, schedule] = await (0, catchError_js_1.catchError)(new node_js_1.default.Query(Maintenance_Schedule_Template_js_1.Maintenance_Schedule_Template.className).get(node_worker_threads_1.workerData.scheduleId, { useMasterKey: true }));
|
|
38
|
+
if (configError) {
|
|
39
|
+
l("Error while querying OD3_Config for 'createTicketOnSchedule' key: " +
|
|
40
|
+
configError);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (scheduleError || schedule === undefined) {
|
|
44
|
+
l("Error while querying Maintenance_Schedule_Template object: " +
|
|
45
|
+
scheduleError);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (config === undefined || !/true/.test(config.get("value"))) {
|
|
49
|
+
l("Config 'createTicketOnSchedule' not set or false, skipping ticket creation for schedule.");
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
//Get all sources from schedule object
|
|
53
|
+
const [sourcesError, sources] = await (0, catchError_js_1.catchError)(schedule
|
|
54
|
+
.relation("sources")
|
|
55
|
+
.query()
|
|
56
|
+
.find({ useMasterKey: true }));
|
|
57
|
+
if (sourcesError) {
|
|
58
|
+
l("Error while querying sources from Maintenance_Schedule_Template object: " +
|
|
59
|
+
sourcesError);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
for await (const source of sources) {
|
|
63
|
+
//Create a new ticket
|
|
64
|
+
await (0, openinc_openservice_save_ticket_data_js_1.saveTicketData)({
|
|
65
|
+
title: "",
|
|
66
|
+
source: source.id,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
l("Config 'createTicketOnSchedule' is true, creating new ticket object");
|
|
71
|
+
const [notificationSettingsError, notificationSettings] = await (0, catchError_js_1.catchError)(new node_js_1.default.Query(Notification_Setting_js_1.Notification_Setting)
|
|
72
|
+
.equalTo("key", Notifications_js_1.Notifications.OpenService.schedule_due)
|
|
73
|
+
.find({ useMasterKey: true }));
|
|
74
|
+
if (notificationSettingsError) {
|
|
75
|
+
l("Error while querying Notification_Setting for 'Notifications.OpenService.schedule_due' key: " +
|
|
76
|
+
notificationSettingsError);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const recipients = [];
|
|
80
|
+
const users = notificationSettings.map((setting) => setting
|
|
81
|
+
.relation("users")
|
|
82
|
+
.query()
|
|
83
|
+
.include("settings")
|
|
84
|
+
.find({ useMasterKey: true }));
|
|
85
|
+
for await (const user of users) {
|
|
86
|
+
recipients.push(...user);
|
|
87
|
+
}
|
|
88
|
+
const rolesPromises = notificationSettings.map((setting) => setting.relation("roles").query().find({ useMasterKey: true }));
|
|
89
|
+
for await (const roles of rolesPromises) {
|
|
90
|
+
const usersFromRoles = roles.map((role) => role
|
|
91
|
+
.relation("users")
|
|
92
|
+
.query()
|
|
93
|
+
.include("settings")
|
|
94
|
+
.find({ useMasterKey: true }));
|
|
95
|
+
for await (const usersFromRole of usersFromRoles) {
|
|
96
|
+
recipients.push(...usersFromRole);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//Filter out duplicates
|
|
100
|
+
recipients.filter((user, index, self) => {
|
|
101
|
+
return (index ===
|
|
102
|
+
self.findIndex((t) => t.id === user.id && t.className === user.className));
|
|
103
|
+
});
|
|
104
|
+
l("Recipients for notification: " + JSON.stringify(recipients));
|
|
105
|
+
//TODO: When available as ESM, use i18n module to get the correct language for the user
|
|
106
|
+
for await (const recipient of recipients) {
|
|
107
|
+
l("Creating new notification object for user: " + recipient.id);
|
|
108
|
+
//Get preferred_language from user object
|
|
109
|
+
const language = recipient.get("settings")
|
|
110
|
+
? recipient.get("settings").get("preferred_language")
|
|
111
|
+
: "deu";
|
|
112
|
+
// if (getCurrentLanguageSync() !== language) {
|
|
113
|
+
// changeLanguage(language);
|
|
114
|
+
// }
|
|
115
|
+
//Get the correct notification title and description based on the user's preferred language
|
|
116
|
+
// const t = useTranslation();
|
|
117
|
+
const findtitle = require(`../i18n/${language}.json`)["maintenance.schedule.notification.title"];
|
|
118
|
+
const finddescription = require(`../i18n/${language}.json`)["maintenance.schedule.notification.description"];
|
|
119
|
+
//Create a new notification object in the database, class name: OD3_Notification
|
|
120
|
+
const notificationObject = new node_js_1.default.Object(Notification_js_1.Notification.className);
|
|
121
|
+
notificationObject.set("title",
|
|
122
|
+
// t("server:maintenance.schedule.notification.title")
|
|
123
|
+
findtitle);
|
|
124
|
+
notificationObject.set("description",
|
|
125
|
+
// t("server:maintenance.schedule.notification.description", {
|
|
126
|
+
// schedule:
|
|
127
|
+
// schedule.get("title") !== undefined ? schedule.get("title")! : "",
|
|
128
|
+
// })
|
|
129
|
+
finddescription);
|
|
130
|
+
notificationObject.set("user", recipient);
|
|
131
|
+
await notificationObject.save(null, { useMasterKey: true });
|
|
132
|
+
}
|
|
27
133
|
// signal to parent that the job is done
|
|
28
134
|
if (node_worker_threads_1.parentPort) {
|
|
29
|
-
|
|
135
|
+
l("done");
|
|
30
136
|
}
|
|
31
137
|
else {
|
|
32
138
|
node_process_1.default.exit(0);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Tenant } from "./Tenant";
|
|
2
|
+
import type { _User } from "./_User";
|
|
3
|
+
export interface AssetsAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
objectId: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
description: string;
|
|
9
|
+
file: Parse.File;
|
|
10
|
+
meta?: any;
|
|
11
|
+
tenant?: Tenant;
|
|
12
|
+
user: _User;
|
|
13
|
+
}
|
|
14
|
+
export declare class Assets extends Parse.Object<AssetsAttributes> {
|
|
15
|
+
static className: string;
|
|
16
|
+
constructor(data?: Partial<AssetsAttributes>);
|
|
17
|
+
get description(): string;
|
|
18
|
+
set description(value: string);
|
|
19
|
+
get file(): Parse.File;
|
|
20
|
+
set file(value: Parse.File);
|
|
21
|
+
get meta(): any | undefined;
|
|
22
|
+
set meta(value: any | undefined);
|
|
23
|
+
get tenant(): Tenant | undefined;
|
|
24
|
+
set tenant(value: Tenant | undefined);
|
|
25
|
+
get user(): _User;
|
|
26
|
+
set user(value: _User);
|
|
27
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Assets = void 0;
|
|
4
|
+
class Assets extends Parse.Object {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
super("OD3_Assets", data);
|
|
7
|
+
}
|
|
8
|
+
get description() {
|
|
9
|
+
return super.get("description");
|
|
10
|
+
}
|
|
11
|
+
set description(value) {
|
|
12
|
+
super.set("description", value);
|
|
13
|
+
}
|
|
14
|
+
get file() {
|
|
15
|
+
return super.get("file");
|
|
16
|
+
}
|
|
17
|
+
set file(value) {
|
|
18
|
+
super.set("file", value);
|
|
19
|
+
}
|
|
20
|
+
get meta() {
|
|
21
|
+
return super.get("meta");
|
|
22
|
+
}
|
|
23
|
+
set meta(value) {
|
|
24
|
+
super.set("meta", value);
|
|
25
|
+
}
|
|
26
|
+
get tenant() {
|
|
27
|
+
return super.get("tenant");
|
|
28
|
+
}
|
|
29
|
+
set tenant(value) {
|
|
30
|
+
super.set("tenant", value);
|
|
31
|
+
}
|
|
32
|
+
get user() {
|
|
33
|
+
return super.get("user");
|
|
34
|
+
}
|
|
35
|
+
set user(value) {
|
|
36
|
+
super.set("user", value);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Assets = Assets;
|
|
40
|
+
Assets.className = "OD3_Assets";
|
|
41
|
+
Parse.Object.registerSubclass("OD3_Assets", Assets);
|
|
@@ -5,6 +5,7 @@ export interface Documentation_CategoryAttributes {
|
|
|
5
5
|
objectId: string;
|
|
6
6
|
createdAt: Date;
|
|
7
7
|
updatedAt: Date;
|
|
8
|
+
icon?: string;
|
|
8
9
|
name: string;
|
|
9
10
|
order: number;
|
|
10
11
|
parent?: Documentation_Category;
|
|
@@ -14,6 +15,8 @@ export interface Documentation_CategoryAttributes {
|
|
|
14
15
|
export declare class Documentation_Category extends Parse.Object<Documentation_CategoryAttributes> {
|
|
15
16
|
static className: string;
|
|
16
17
|
constructor(data?: Partial<Documentation_CategoryAttributes>);
|
|
18
|
+
get icon(): string | undefined;
|
|
19
|
+
set icon(value: string | undefined);
|
|
17
20
|
get name(): string;
|
|
18
21
|
set name(value: string);
|
|
19
22
|
get order(): number;
|
|
@@ -5,6 +5,12 @@ class Documentation_Category extends Parse.Object {
|
|
|
5
5
|
constructor(data) {
|
|
6
6
|
super("OD3_Documentation_Category", data);
|
|
7
7
|
}
|
|
8
|
+
get icon() {
|
|
9
|
+
return super.get("icon");
|
|
10
|
+
}
|
|
11
|
+
set icon(value) {
|
|
12
|
+
super.set("icon", value);
|
|
13
|
+
}
|
|
8
14
|
get name() {
|
|
9
15
|
return super.get("name");
|
|
10
16
|
}
|
|
@@ -8,11 +8,10 @@ export interface Documentation_DocumentAttributes {
|
|
|
8
8
|
updatedAt: Date;
|
|
9
9
|
category: Documentation_Category;
|
|
10
10
|
content: string;
|
|
11
|
-
|
|
11
|
+
icon?: string;
|
|
12
12
|
order: number;
|
|
13
13
|
tenant?: Tenant;
|
|
14
14
|
title: string;
|
|
15
|
-
updatedBy: _User;
|
|
16
15
|
user?: _User;
|
|
17
16
|
}
|
|
18
17
|
export declare class Documentation_Document extends Parse.Object<Documentation_DocumentAttributes> {
|
|
@@ -22,16 +21,14 @@ export declare class Documentation_Document extends Parse.Object<Documentation_D
|
|
|
22
21
|
set category(value: Documentation_Category);
|
|
23
22
|
get content(): string;
|
|
24
23
|
set content(value: string);
|
|
25
|
-
get
|
|
26
|
-
set
|
|
24
|
+
get icon(): string | undefined;
|
|
25
|
+
set icon(value: string | undefined);
|
|
27
26
|
get order(): number;
|
|
28
27
|
set order(value: number);
|
|
29
28
|
get tenant(): Tenant | undefined;
|
|
30
29
|
set tenant(value: Tenant | undefined);
|
|
31
30
|
get title(): string;
|
|
32
31
|
set title(value: string);
|
|
33
|
-
get updatedBy(): _User;
|
|
34
|
-
set updatedBy(value: _User);
|
|
35
32
|
get user(): _User | undefined;
|
|
36
33
|
set user(value: _User | undefined);
|
|
37
34
|
}
|
|
@@ -17,11 +17,11 @@ class Documentation_Document extends Parse.Object {
|
|
|
17
17
|
set content(value) {
|
|
18
18
|
super.set("content", value);
|
|
19
19
|
}
|
|
20
|
-
get
|
|
21
|
-
return super.get("
|
|
20
|
+
get icon() {
|
|
21
|
+
return super.get("icon");
|
|
22
22
|
}
|
|
23
|
-
set
|
|
24
|
-
super.set("
|
|
23
|
+
set icon(value) {
|
|
24
|
+
super.set("icon", value);
|
|
25
25
|
}
|
|
26
26
|
get order() {
|
|
27
27
|
return super.get("order");
|
|
@@ -41,12 +41,6 @@ class Documentation_Document extends Parse.Object {
|
|
|
41
41
|
set title(value) {
|
|
42
42
|
super.set("title", value);
|
|
43
43
|
}
|
|
44
|
-
get updatedBy() {
|
|
45
|
-
return super.get("updatedBy");
|
|
46
|
-
}
|
|
47
|
-
set updatedBy(value) {
|
|
48
|
-
super.set("updatedBy", value);
|
|
49
|
-
}
|
|
50
44
|
get user() {
|
|
51
45
|
return super.get("user");
|
|
52
46
|
}
|
|
@@ -6,6 +6,7 @@ export interface Knowledge_DocumentAttributes {
|
|
|
6
6
|
objectId: string;
|
|
7
7
|
createdAt: Date;
|
|
8
8
|
updatedAt: Date;
|
|
9
|
+
annotations: any[];
|
|
9
10
|
category: Knowledge_Category;
|
|
10
11
|
document: Parse.File;
|
|
11
12
|
label: string;
|
|
@@ -15,6 +16,8 @@ export interface Knowledge_DocumentAttributes {
|
|
|
15
16
|
export declare class Knowledge_Document extends Parse.Object<Knowledge_DocumentAttributes> {
|
|
16
17
|
static className: string;
|
|
17
18
|
constructor(data?: Partial<Knowledge_DocumentAttributes>);
|
|
19
|
+
get annotations(): any[];
|
|
20
|
+
set annotations(value: any[]);
|
|
18
21
|
get category(): Knowledge_Category;
|
|
19
22
|
set category(value: Knowledge_Category);
|
|
20
23
|
get document(): Parse.File;
|
|
@@ -5,6 +5,12 @@ class Knowledge_Document extends Parse.Object {
|
|
|
5
5
|
constructor(data) {
|
|
6
6
|
super("OD3_Knowledge_Document", data);
|
|
7
7
|
}
|
|
8
|
+
get annotations() {
|
|
9
|
+
return super.get("annotations");
|
|
10
|
+
}
|
|
11
|
+
set annotations(value) {
|
|
12
|
+
super.set("annotations", value);
|
|
13
|
+
}
|
|
8
14
|
get category() {
|
|
9
15
|
return super.get("category");
|
|
10
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Maintenance_Media } from "./Maintenance_Media";
|
|
1
2
|
import type { Tenant } from "./Tenant";
|
|
2
3
|
import type { _User } from "./_User";
|
|
3
4
|
export interface Maintenance_MessageAttributes {
|
|
@@ -6,7 +7,10 @@ export interface Maintenance_MessageAttributes {
|
|
|
6
7
|
createdAt: Date;
|
|
7
8
|
updatedAt: Date;
|
|
8
9
|
classname: string;
|
|
10
|
+
content?: string;
|
|
9
11
|
data?: any;
|
|
12
|
+
displayAt?: Date;
|
|
13
|
+
media: Parse.Relation<Maintenance_Message, Maintenance_Media>;
|
|
10
14
|
referencedObjectId: string;
|
|
11
15
|
tenant?: Tenant;
|
|
12
16
|
title?: string;
|
|
@@ -17,8 +21,13 @@ export declare class Maintenance_Message extends Parse.Object<Maintenance_Messag
|
|
|
17
21
|
constructor(data?: Partial<Maintenance_MessageAttributes>);
|
|
18
22
|
get classname(): string;
|
|
19
23
|
set classname(value: string);
|
|
24
|
+
get content(): string | undefined;
|
|
25
|
+
set content(value: string | undefined);
|
|
20
26
|
get data(): any | undefined;
|
|
21
27
|
set data(value: any | undefined);
|
|
28
|
+
get displayAt(): Date | undefined;
|
|
29
|
+
set displayAt(value: Date | undefined);
|
|
30
|
+
get media(): Parse.Relation<Maintenance_Message, Maintenance_Media>;
|
|
22
31
|
get referencedObjectId(): string;
|
|
23
32
|
set referencedObjectId(value: string);
|
|
24
33
|
get tenant(): Tenant | undefined;
|
|
@@ -11,12 +11,27 @@ class Maintenance_Message extends Parse.Object {
|
|
|
11
11
|
set classname(value) {
|
|
12
12
|
super.set("classname", value);
|
|
13
13
|
}
|
|
14
|
+
get content() {
|
|
15
|
+
return super.get("content");
|
|
16
|
+
}
|
|
17
|
+
set content(value) {
|
|
18
|
+
super.set("content", value);
|
|
19
|
+
}
|
|
14
20
|
get data() {
|
|
15
21
|
return super.get("data");
|
|
16
22
|
}
|
|
17
23
|
set data(value) {
|
|
18
24
|
super.set("data", value);
|
|
19
25
|
}
|
|
26
|
+
get displayAt() {
|
|
27
|
+
return super.get("displayAt");
|
|
28
|
+
}
|
|
29
|
+
set displayAt(value) {
|
|
30
|
+
super.set("displayAt", value);
|
|
31
|
+
}
|
|
32
|
+
get media() {
|
|
33
|
+
return super.relation("media");
|
|
34
|
+
}
|
|
20
35
|
get referencedObjectId() {
|
|
21
36
|
return super.get("referencedObjectId");
|
|
22
37
|
}
|
|
@@ -8,6 +8,7 @@ export interface Maintenance_Message_BodyAttributes {
|
|
|
8
8
|
updatedAt: Date;
|
|
9
9
|
content?: string;
|
|
10
10
|
data?: any;
|
|
11
|
+
displayAt?: Date;
|
|
11
12
|
message?: Maintenance_Message;
|
|
12
13
|
tenant?: Tenant;
|
|
13
14
|
user?: _User;
|
|
@@ -19,6 +20,8 @@ export declare class Maintenance_Message_Body extends Parse.Object<Maintenance_M
|
|
|
19
20
|
set content(value: string | undefined);
|
|
20
21
|
get data(): any | undefined;
|
|
21
22
|
set data(value: any | undefined);
|
|
23
|
+
get displayAt(): Date | undefined;
|
|
24
|
+
set displayAt(value: Date | undefined);
|
|
22
25
|
get message(): Maintenance_Message | undefined;
|
|
23
26
|
set message(value: Maintenance_Message | undefined);
|
|
24
27
|
get tenant(): Tenant | undefined;
|
|
@@ -17,6 +17,12 @@ class Maintenance_Message_Body extends Parse.Object {
|
|
|
17
17
|
set data(value) {
|
|
18
18
|
super.set("data", value);
|
|
19
19
|
}
|
|
20
|
+
get displayAt() {
|
|
21
|
+
return super.get("displayAt");
|
|
22
|
+
}
|
|
23
|
+
set displayAt(value) {
|
|
24
|
+
super.set("displayAt", value);
|
|
25
|
+
}
|
|
20
26
|
get message() {
|
|
21
27
|
return super.get("message");
|
|
22
28
|
}
|
|
@@ -13,6 +13,7 @@ export interface Maintenance_Schedule_ExecutionAttributes {
|
|
|
13
13
|
material?: any[];
|
|
14
14
|
media: Parse.Relation<Maintenance_Schedule_Execution, Maintenance_Media>;
|
|
15
15
|
origin?: Maintenance_Schedule_Template;
|
|
16
|
+
origin_cron?: any;
|
|
16
17
|
source?: Source;
|
|
17
18
|
tenant?: Tenant;
|
|
18
19
|
title?: string;
|
|
@@ -30,6 +31,8 @@ export declare class Maintenance_Schedule_Execution extends Parse.Object<Mainten
|
|
|
30
31
|
get media(): Parse.Relation<Maintenance_Schedule_Execution, Maintenance_Media>;
|
|
31
32
|
get origin(): Maintenance_Schedule_Template | undefined;
|
|
32
33
|
set origin(value: Maintenance_Schedule_Template | undefined);
|
|
34
|
+
get origin_cron(): any | undefined;
|
|
35
|
+
set origin_cron(value: any | undefined);
|
|
33
36
|
get source(): Source | undefined;
|
|
34
37
|
set source(value: Source | undefined);
|
|
35
38
|
get tenant(): Tenant | undefined;
|
|
@@ -32,6 +32,12 @@ class Maintenance_Schedule_Execution extends Parse.Object {
|
|
|
32
32
|
set origin(value) {
|
|
33
33
|
super.set("origin", value);
|
|
34
34
|
}
|
|
35
|
+
get origin_cron() {
|
|
36
|
+
return super.get("origin_cron");
|
|
37
|
+
}
|
|
38
|
+
set origin_cron(value) {
|
|
39
|
+
super.set("origin_cron", value);
|
|
40
|
+
}
|
|
35
41
|
get source() {
|
|
36
42
|
return super.get("source");
|
|
37
43
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Tenant } from "./Tenant";
|
|
2
|
+
import type { _Role } from "./_Role";
|
|
3
|
+
import type { _User } from "./_User";
|
|
4
|
+
export interface Notification_SettingAttributes {
|
|
5
|
+
id: string;
|
|
6
|
+
objectId: string;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
description?: string;
|
|
10
|
+
key: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
roles: Parse.Relation<Notification_Setting, _Role>;
|
|
13
|
+
tenant?: Tenant;
|
|
14
|
+
users: Parse.Relation<Notification_Setting, _User>;
|
|
15
|
+
}
|
|
16
|
+
export declare class Notification_Setting extends Parse.Object<Notification_SettingAttributes> {
|
|
17
|
+
static className: string;
|
|
18
|
+
constructor(data?: Partial<Notification_SettingAttributes>);
|
|
19
|
+
get description(): string | undefined;
|
|
20
|
+
set description(value: string | undefined);
|
|
21
|
+
get key(): string;
|
|
22
|
+
set key(value: string);
|
|
23
|
+
get label(): string | undefined;
|
|
24
|
+
set label(value: string | undefined);
|
|
25
|
+
get roles(): Parse.Relation<Notification_Setting, _Role>;
|
|
26
|
+
get tenant(): Tenant | undefined;
|
|
27
|
+
set tenant(value: Tenant | undefined);
|
|
28
|
+
get users(): Parse.Relation<Notification_Setting, _User>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Notification_Setting = void 0;
|
|
4
|
+
class Notification_Setting extends Parse.Object {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
super("OD3_Notification_Setting", data);
|
|
7
|
+
}
|
|
8
|
+
get description() {
|
|
9
|
+
return super.get("description");
|
|
10
|
+
}
|
|
11
|
+
set description(value) {
|
|
12
|
+
super.set("description", value);
|
|
13
|
+
}
|
|
14
|
+
get key() {
|
|
15
|
+
return super.get("key");
|
|
16
|
+
}
|
|
17
|
+
set key(value) {
|
|
18
|
+
super.set("key", value);
|
|
19
|
+
}
|
|
20
|
+
get label() {
|
|
21
|
+
return super.get("label");
|
|
22
|
+
}
|
|
23
|
+
set label(value) {
|
|
24
|
+
super.set("label", value);
|
|
25
|
+
}
|
|
26
|
+
get roles() {
|
|
27
|
+
return super.relation("roles");
|
|
28
|
+
}
|
|
29
|
+
get tenant() {
|
|
30
|
+
return super.get("tenant");
|
|
31
|
+
}
|
|
32
|
+
set tenant(value) {
|
|
33
|
+
super.set("tenant", value);
|
|
34
|
+
}
|
|
35
|
+
get users() {
|
|
36
|
+
return super.relation("users");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Notification_Setting = Notification_Setting;
|
|
40
|
+
Notification_Setting.className = "OD3_Notification_Setting";
|
|
41
|
+
Parse.Object.registerSubclass("OD3_Notification_Setting", Notification_Setting);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface User_SettingAttributes {
|
|
2
|
+
id: string;
|
|
3
|
+
objectId: string;
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
updatedAt: Date;
|
|
6
|
+
preferred_language: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class User_Setting extends Parse.Object<User_SettingAttributes> {
|
|
9
|
+
static className: string;
|
|
10
|
+
constructor(data?: Partial<User_SettingAttributes>);
|
|
11
|
+
get preferred_language(): string;
|
|
12
|
+
set preferred_language(value: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.User_Setting = void 0;
|
|
4
|
+
class User_Setting extends Parse.Object {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
super("OD3_User_Setting", data);
|
|
7
|
+
}
|
|
8
|
+
get preferred_language() {
|
|
9
|
+
return super.get("preferred_language");
|
|
10
|
+
}
|
|
11
|
+
set preferred_language(value) {
|
|
12
|
+
super.set("preferred_language", value);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.User_Setting = User_Setting;
|
|
16
|
+
User_Setting.className = "OD3_User_Setting";
|
|
17
|
+
Parse.Object.registerSubclass("OD3_User_Setting", User_Setting);
|
package/dist/types/_User.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Tenant } from "./Tenant";
|
|
2
|
+
import type { User_Setting } from "./User_Setting";
|
|
2
3
|
export interface _UserAttributes {
|
|
3
4
|
id: string;
|
|
4
5
|
objectId: string;
|
|
@@ -16,6 +17,7 @@ export interface _UserAttributes {
|
|
|
16
17
|
miaasUserScope?: string;
|
|
17
18
|
name?: string;
|
|
18
19
|
password?: string;
|
|
20
|
+
settings?: User_Setting;
|
|
19
21
|
tenant?: Tenant;
|
|
20
22
|
tenantAdmin: boolean;
|
|
21
23
|
tenantBanned?: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { AlarmAction } from "./AlarmAction";
|
|
|
4
4
|
export type { AlarmActionAttributes } from "./AlarmAction";
|
|
5
5
|
export { AlarmWebhook } from "./AlarmWebhook";
|
|
6
6
|
export type { AlarmWebhookAttributes } from "./AlarmWebhook";
|
|
7
|
+
export { Assets } from "./Assets";
|
|
8
|
+
export type { AssetsAttributes } from "./Assets";
|
|
7
9
|
export { Attachment } from "./Attachment";
|
|
8
10
|
export type { AttachmentAttributes } from "./Attachment";
|
|
9
11
|
export { BDE_Form } from "./BDE_Form";
|
|
@@ -60,8 +62,6 @@ export { GTFS_Wheelchair_Accessible } from "./GTFS_Wheelchair_Accessible";
|
|
|
60
62
|
export type { GTFS_Wheelchair_AccessibleAttributes } from "./GTFS_Wheelchair_Accessible";
|
|
61
63
|
export { GTFS_Wheelchair_Boarding } from "./GTFS_Wheelchair_Boarding";
|
|
62
64
|
export type { GTFS_Wheelchair_BoardingAttributes } from "./GTFS_Wheelchair_Boarding";
|
|
63
|
-
export { Group } from "./Group";
|
|
64
|
-
export type { GroupAttributes } from "./Group";
|
|
65
65
|
export { Knowledge_Article } from "./Knowledge_Article";
|
|
66
66
|
export type { Knowledge_ArticleAttributes } from "./Knowledge_Article";
|
|
67
67
|
export { Knowledge_Category } from "./Knowledge_Category";
|
|
@@ -158,6 +158,8 @@ export { NavigationItem } from "./NavigationItem";
|
|
|
158
158
|
export type { NavigationItemAttributes } from "./NavigationItem";
|
|
159
159
|
export { Notification } from "./Notification";
|
|
160
160
|
export type { NotificationAttributes } from "./Notification";
|
|
161
|
+
export { Notification_Setting } from "./Notification_Setting";
|
|
162
|
+
export type { Notification_SettingAttributes } from "./Notification_Setting";
|
|
161
163
|
export { Permission } from "./Permission";
|
|
162
164
|
export type { PermissionAttributes } from "./Permission";
|
|
163
165
|
export { Push } from "./Push";
|
|
@@ -178,6 +180,8 @@ export { TenantTrustedDomain } from "./TenantTrustedDomain";
|
|
|
178
180
|
export type { TenantTrustedDomainAttributes } from "./TenantTrustedDomain";
|
|
179
181
|
export { UserData } from "./UserData";
|
|
180
182
|
export type { UserDataAttributes } from "./UserData";
|
|
183
|
+
export { User_Setting } from "./User_Setting";
|
|
184
|
+
export type { User_SettingAttributes } from "./User_Setting";
|
|
181
185
|
export { VirtualKPI } from "./VirtualKPI";
|
|
182
186
|
export type { VirtualKPIAttributes } from "./VirtualKPI";
|
|
183
187
|
export { WebPush } from "./WebPush";
|