@opengis/fastify-table 2.0.67 → 2.0.69
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/functions.d.ts +39 -0
- package/dist/functions.d.ts.map +1 -0
- package/dist/functions.js +412 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -418
- package/dist/log/migration/dist-geoname-cls.json +1 -0
- package/dist/log/migration/dist-geoname-cls.sql +0 -0
- package/dist/server/migrations/crm.sql +14 -4
- package/dist/server/plugins/notifications/addNotification.d.ts +12 -0
- package/dist/server/plugins/notifications/addNotification.d.ts.map +1 -0
- package/dist/server/plugins/notifications/addNotification.js +18 -0
- package/dist/server/routes/access/index.d.ts +1 -1
- package/dist/server/routes/access/index.d.ts.map +1 -1
- package/dist/server/routes/access/index.js +1 -1
- package/dist/server/routes/auth/index.d.ts +1 -1
- package/dist/server/routes/auth/index.d.ts.map +1 -1
- package/dist/server/routes/auth/index.js +1 -1
- package/dist/server/routes/cron/index.d.ts +1 -1
- package/dist/server/routes/cron/index.d.ts.map +1 -1
- package/dist/server/routes/cron/index.js +1 -1
- package/dist/server/routes/crud/index.d.ts +1 -1
- package/dist/server/routes/crud/index.d.ts.map +1 -1
- package/dist/server/routes/crud/index.js +1 -1
- package/dist/server/routes/dblist/index.d.ts +1 -1
- package/dist/server/routes/dblist/index.d.ts.map +1 -1
- package/dist/server/routes/dblist/index.js +1 -1
- package/dist/server/routes/file/index.d.ts +1 -1
- package/dist/server/routes/file/index.d.ts.map +1 -1
- package/dist/server/routes/file/index.js +1 -1
- package/dist/server/routes/grpc/index.d.ts +1 -1
- package/dist/server/routes/grpc/index.d.ts.map +1 -1
- package/dist/server/routes/grpc/index.js +1 -1
- package/dist/server/routes/logger/index.d.ts +1 -1
- package/dist/server/routes/logger/index.d.ts.map +1 -1
- package/dist/server/routes/logger/index.js +1 -1
- package/dist/server/routes/menu/index.d.ts +1 -1
- package/dist/server/routes/menu/index.d.ts.map +1 -1
- package/dist/server/routes/menu/index.js +1 -1
- package/dist/server/routes/notifications/controllers/addUserNotification.d.ts +4 -0
- package/dist/server/routes/notifications/controllers/addUserNotification.d.ts.map +1 -0
- package/dist/server/routes/notifications/controllers/addUserNotification.js +22 -0
- package/dist/server/routes/notifications/controllers/deleteUserNotification.d.ts +4 -0
- package/dist/server/routes/notifications/controllers/deleteUserNotification.d.ts.map +1 -0
- package/dist/server/routes/notifications/controllers/deleteUserNotification.js +25 -0
- package/dist/server/routes/notifications/controllers/editUserNotification.d.ts +4 -0
- package/dist/server/routes/notifications/controllers/editUserNotification.d.ts.map +1 -0
- package/dist/server/routes/notifications/controllers/editUserNotification.js +31 -0
- package/dist/server/routes/notifications/controllers/readNotifications.d.ts +4 -0
- package/dist/server/routes/notifications/controllers/readNotifications.d.ts.map +1 -0
- package/dist/server/routes/notifications/controllers/readNotifications.js +17 -0
- package/dist/server/routes/notifications/controllers/userNotifications.d.ts +4 -0
- package/dist/server/routes/notifications/controllers/userNotifications.d.ts.map +1 -0
- package/dist/server/routes/notifications/controllers/userNotifications.js +33 -0
- package/dist/server/routes/notifications/index.d.ts +3 -0
- package/dist/server/routes/notifications/index.d.ts.map +1 -0
- package/dist/server/routes/notifications/index.js +23 -0
- package/dist/server/routes/properties/index.d.ts +1 -1
- package/dist/server/routes/properties/index.d.ts.map +1 -1
- package/dist/server/routes/properties/index.js +1 -1
- package/dist/server/routes/table/controllers/search.d.ts +2 -1
- package/dist/server/routes/table/controllers/search.d.ts.map +1 -1
- package/dist/server/routes/table/controllers/search.js +31 -12
- package/dist/server/routes/table/index.d.ts +1 -1
- package/dist/server/routes/table/index.d.ts.map +1 -1
- package/dist/server/routes/table/index.js +1 -1
- package/dist/server/routes/templates/index.d.ts +1 -1
- package/dist/server/routes/templates/index.d.ts.map +1 -1
- package/dist/server/routes/templates/index.js +1 -1
- package/dist/server/routes/util/index.d.ts +1 -1
- package/dist/server/routes/util/index.d.ts.map +1 -1
- package/dist/server/routes/util/index.js +1 -1
- package/dist/server/routes/widget/index.d.ts +1 -1
- package/dist/server/routes/widget/index.d.ts.map +1 -1
- package/dist/server/routes/widget/index.js +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -1
- package/package.json +88 -88
- package/dist/server/plugins/grpc/utils/server/plugins/grpc/utils/convertp.proto +0 -137
- package/dist/server/plugins/grpc/utils/server/plugins/grpc/utils/office2pdf.proto +0 -14
- package/dist/server/plugins/hook/funcs/addHook.js +0 -7
- package/dist/server/plugins/hook/funcs/applyHook.js +0 -25
- package/dist/server/plugins/hook/funcs/applyHookSync.js +0 -7
- package/dist/server/plugins/hook/index.js +0 -7
- package/dist/server/routes/logger/controllers/utils/checkUserAccess.js +0 -22
- package/dist/server/routes/logger/controllers/utils/getRootDir.js +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/crud/index.ts"],"names":[],"mappings":"AAiBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/crud/index.ts"],"names":[],"mappings":"AAiBA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAqBtC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -12,7 +12,7 @@ const tableSchema = {
|
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
const policy = "L0";
|
|
15
|
-
|
|
15
|
+
function plugin(app, opt = {}) {
|
|
16
16
|
app.put("/table/:table/:id?", { config: { policy }, schema: tableSchema }, update);
|
|
17
17
|
app.delete("/table/:table/:id?", { config: { policy }, schema: tableSchema }, deleteCrud);
|
|
18
18
|
app.post("/table/:table/:id?", { config: { policy }, schema: tableSchema }, insert);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function plugin(app: any):
|
|
1
|
+
export default function plugin(app: any): void;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/dblist/index.ts"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/dblist/index.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,GAAG,QAiBtC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import readItemList from "./controllers/readItems.js";
|
|
2
2
|
import setItem from "./controllers/setItem.js";
|
|
3
3
|
const policy = ["site"];
|
|
4
|
-
export default
|
|
4
|
+
export default function plugin(app) {
|
|
5
5
|
if (!app.hasRoute({ method: "GET", url: "/db-list" })) {
|
|
6
6
|
app.route({
|
|
7
7
|
method: "GET",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/file/index.ts"],"names":[],"mappings":"AAWA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/file/index.ts"],"names":[],"mappings":"AAWA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAqBtC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -7,7 +7,7 @@ import exportTable from "./controllers/export.js";
|
|
|
7
7
|
import uploadImage from "./controllers/uploadImage.js";
|
|
8
8
|
import deleteFileAPI from "./controllers/delete.js";
|
|
9
9
|
import { resizeSchema } from "./schema.js";
|
|
10
|
-
|
|
10
|
+
function plugin(app, opt = {}) {
|
|
11
11
|
app.get("/files/*", { config: { policy: ["public"] } }, files);
|
|
12
12
|
app.get("/file/resize", { config: { policy: ["public"] }, schema: resizeSchema }, resize);
|
|
13
13
|
app.get("/api/resize-all", { config: { policy: ["admin", "site"] }, schema: resizeSchema }, resizeAll);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/grpc/index.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/grpc/index.ts"],"names":[],"mappings":"AAGA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,QAGnC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import file2geojson from "./controllers/file2geojson.js";
|
|
2
2
|
import filePreview from "./controllers/filePreview.js";
|
|
3
|
-
|
|
3
|
+
function plugin(app, opts) {
|
|
4
4
|
app.post("/file2geojson", { config: { policy: ["public"] } }, file2geojson);
|
|
5
5
|
app.get("/file-preview", { config: { policy: ["public"] } }, filePreview);
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/logger/index.ts"],"names":[],"mappings":"AAiBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/logger/index.ts"],"names":[],"mappings":"AAiBA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAMtC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -12,7 +12,7 @@ const loggerSchema = {
|
|
|
12
12
|
additionalProperties: false,
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
function plugin(app, opt = {}) {
|
|
16
16
|
app.get("/logger-file/*", { config: { policy: "L0", rateLimit: false }, schema: loggerSchema }, loggerFile);
|
|
17
17
|
}
|
|
18
18
|
export default plugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function route(app: any, opt?: any):
|
|
1
|
+
export default function route(app: any, opt?: any): void;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/menu/index.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/menu/index.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAGpD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import getMenu from "./controllers/getMenu.js";
|
|
2
2
|
import interfaces from "./controllers/interfaces.js";
|
|
3
|
-
export default
|
|
3
|
+
export default function route(app, opt = {}) {
|
|
4
4
|
app.get("/user-menu", getMenu);
|
|
5
5
|
app.get("/interfaces", { config: { role: "admin" } }, interfaces);
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addUserNotification.d.ts","sourceRoot":"","sources":["../../../../../server/routes/notifications/controllers/addUserNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAEL,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAKhC,wBAA8B,mBAAmB,CAC/C,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBAgCpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import pgClients from "../../../plugins/pg/pgClients.js";
|
|
2
|
+
import dataInsert from "../../../plugins/crud/funcs/dataInsert.js";
|
|
3
|
+
export default async function addUserNotification(req, reply) {
|
|
4
|
+
const { pg = pgClients.client, body, user, } = req;
|
|
5
|
+
if (!user?.uid) {
|
|
6
|
+
return reply.status(401).send({ error: "unauthorized", code: 401 });
|
|
7
|
+
}
|
|
8
|
+
// who (user id) and what of (message) to notify
|
|
9
|
+
const missingKey = ["addressee_id", "body"].find((key) => !body[key]);
|
|
10
|
+
if (missingKey) {
|
|
11
|
+
return reply
|
|
12
|
+
.status(400)
|
|
13
|
+
.send({ error: `not enough body params: ${missingKey}`, code: 400 });
|
|
14
|
+
}
|
|
15
|
+
const result = await dataInsert({
|
|
16
|
+
pg,
|
|
17
|
+
table: "crm.notifications",
|
|
18
|
+
data: { ...body, author_id: user.uid },
|
|
19
|
+
uid: user.uid,
|
|
20
|
+
}).then((el) => el.rows?.[0] || {});
|
|
21
|
+
return reply.status(200).send(result);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteUserNotification.d.ts","sourceRoot":"","sources":["../../../../../server/routes/notifications/controllers/deleteUserNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAEL,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAKhC,wBAA8B,oBAAoB,CAChD,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBAuCpB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import pgClients from "../../../plugins/pg/pgClients.js";
|
|
2
|
+
import dataDelete from "../../../plugins/crud/funcs/dataDelete.js";
|
|
3
|
+
export default async function editUserNotification(req, reply) {
|
|
4
|
+
const { pg = pgClients.client, params, user, } = req;
|
|
5
|
+
if (!user?.uid) {
|
|
6
|
+
return reply.status(401).send({ error: "unauthorized", code: 401 });
|
|
7
|
+
}
|
|
8
|
+
const author = pg && pg.pk?.["crm.notifications"]
|
|
9
|
+
? await pg
|
|
10
|
+
.query("select read, author_id as author from crm.notifications where notification_id=$1", [params.id])
|
|
11
|
+
.then((el) => el.rows?.[0]?.author)
|
|
12
|
+
: null;
|
|
13
|
+
if (author && author !== user.uid && user?.user_type !== "admin") {
|
|
14
|
+
return reply
|
|
15
|
+
.status(403)
|
|
16
|
+
.send({ error: "not an author of notification", code: 403 });
|
|
17
|
+
}
|
|
18
|
+
const result = await dataDelete({
|
|
19
|
+
pg,
|
|
20
|
+
id: params.id,
|
|
21
|
+
table: "crm.notifications",
|
|
22
|
+
uid: user.uid,
|
|
23
|
+
});
|
|
24
|
+
return reply.status(200).send(result);
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editUserNotification.d.ts","sourceRoot":"","sources":["../../../../../server/routes/notifications/controllers/editUserNotification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAEL,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAKhC,wBAA8B,oBAAoB,CAChD,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBAgDpB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import pgClients from "../../../plugins/pg/pgClients.js";
|
|
2
|
+
import dataUpdate from "../../../plugins/crud/funcs/dataUpdate.js";
|
|
3
|
+
export default async function editUserNotification(req, reply) {
|
|
4
|
+
const { pg = pgClients.client, body, params, user, } = req;
|
|
5
|
+
if (!user?.uid) {
|
|
6
|
+
return reply.status(401).send({ error: "unauthorized", code: 401 });
|
|
7
|
+
}
|
|
8
|
+
const { read, author } = pg && pg.pk?.["crm.notifications"]
|
|
9
|
+
? await pg
|
|
10
|
+
.query("select read, author_id as author from crm.notifications where notification_id=$1", [params.id])
|
|
11
|
+
.then((el) => el.rows?.[0] || {})
|
|
12
|
+
: {};
|
|
13
|
+
if (author !== user.uid && user?.user_type !== "admin") {
|
|
14
|
+
return reply
|
|
15
|
+
.status(403)
|
|
16
|
+
.send({ error: "not an author of notification", code: 403 });
|
|
17
|
+
}
|
|
18
|
+
if (read) {
|
|
19
|
+
return reply
|
|
20
|
+
.status(400)
|
|
21
|
+
.send({ error: "notification already read", code: 400 });
|
|
22
|
+
}
|
|
23
|
+
const result = await dataUpdate({
|
|
24
|
+
pg,
|
|
25
|
+
id: params.id,
|
|
26
|
+
table: "crm.notifications",
|
|
27
|
+
data: body,
|
|
28
|
+
uid: user.uid,
|
|
29
|
+
});
|
|
30
|
+
return reply.status(200).send(result);
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readNotifications.d.ts","sourceRoot":"","sources":["../../../../../server/routes/notifications/controllers/readNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAc,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIrE,wBAA8B,iBAAiB,CAC7C,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBAmCpB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import pgClients from "../../../plugins/pg/pgClients.js";
|
|
2
|
+
export default async function readNotifications(req, reply) {
|
|
3
|
+
const { pg = pgClients.client, params, user, } = req;
|
|
4
|
+
if (!user?.uid) {
|
|
5
|
+
return reply.status(401).send({ error: "unauthorized", code: 401 });
|
|
6
|
+
}
|
|
7
|
+
const ids = pg && pg.pk?.["crm.notifications"]
|
|
8
|
+
? await pg
|
|
9
|
+
.query(`update crm.notifications
|
|
10
|
+
set read=true
|
|
11
|
+
where read is not true
|
|
12
|
+
and addressee_id=$1
|
|
13
|
+
and ${params.id ? "notification_id=$2" : "1=1"} returning notification_id`, [user.uid, params?.id].filter(Boolean))
|
|
14
|
+
.then((el) => el.rows?.map((row) => row.notification_id) || [])
|
|
15
|
+
: [];
|
|
16
|
+
return reply.status(200).send({ ids, read: ids.length });
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userNotifications.d.ts","sourceRoot":"","sources":["../../../../../server/routes/notifications/controllers/userNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAc,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAYrE,wBAA8B,iBAAiB,CAC7C,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,YAAY,kBA2CpB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pgClients from "../../../plugins/pg/pgClients.js";
|
|
2
|
+
import getSelectVal from "../../../plugins/table/funcs/metaFormat/getSelectVal.js";
|
|
3
|
+
const maxLimit = 100;
|
|
4
|
+
const q = `select notification_id as id, subject, body, created_at,
|
|
5
|
+
author_id, read, link, entity_id, (select avatar from admin.users where uid=a.author_id limit 1) as avatar
|
|
6
|
+
from crm.notifications a
|
|
7
|
+
where addressee_id=$1 order by created_at desc limit $2 offset $3`;
|
|
8
|
+
export default async function userNotifications(req, reply) {
|
|
9
|
+
const { pg = pgClients.client, query, user, } = req;
|
|
10
|
+
const t1 = Date.now();
|
|
11
|
+
if (!user?.uid) {
|
|
12
|
+
return reply.status(401).send({ error: "unauthorized", code: 401 });
|
|
13
|
+
}
|
|
14
|
+
const limit = Math.min(maxLimit, +(query.limit || 5));
|
|
15
|
+
const offset = query.page && query.page > 0 ? (query.page - 1) * limit : 0;
|
|
16
|
+
const rows = pg && pg.pk?.["crm.notifications"]
|
|
17
|
+
? await pg
|
|
18
|
+
.query(q, [user.uid, limit, offset])
|
|
19
|
+
.then((el) => el.rows || [])
|
|
20
|
+
: [];
|
|
21
|
+
const values = rows
|
|
22
|
+
.map((row) => row.author_id)
|
|
23
|
+
.filter((el, idx, arr) => el && arr.indexOf(el) === idx);
|
|
24
|
+
if (values.length) {
|
|
25
|
+
const vals = await getSelectVal({ name: "core.user_mentioned", values });
|
|
26
|
+
rows.forEach((row) => {
|
|
27
|
+
Object.assign(row, { author: vals?.[row.author_id] });
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return reply
|
|
31
|
+
.status(200)
|
|
32
|
+
.send({ time: Date.now() - t1, total: rows.length, rows });
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAU1C,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,GAAG,EAAE,eAAe,QAgBjD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import readNotifications from "./controllers/readNotifications.js"; // mark as read
|
|
2
|
+
import userNotifications from "./controllers/userNotifications.js"; // check all, backend pagination
|
|
3
|
+
import addUserNotification from "./controllers/addUserNotification.js"; // add user notification
|
|
4
|
+
import editUserNotification from "./controllers/editUserNotification.js"; // edit unread user notification
|
|
5
|
+
import deleteUserNotification from "./controllers/deleteUserNotification.js"; // delete user notification
|
|
6
|
+
const params = { config: { policy: "L1" } };
|
|
7
|
+
export default function route(app) {
|
|
8
|
+
if (!app.hasRoute({ method: "GET", url: "/notification" })) {
|
|
9
|
+
app.get("/notification", params, userNotifications);
|
|
10
|
+
}
|
|
11
|
+
if (!app.hasRoute({ method: "POST", url: "/notification" })) {
|
|
12
|
+
app.post("/notification", params, addUserNotification);
|
|
13
|
+
}
|
|
14
|
+
if (!app.hasRoute({ method: "PUT", url: "/notification/:id" })) {
|
|
15
|
+
app.put("/notification/:id", params, editUserNotification);
|
|
16
|
+
}
|
|
17
|
+
if (!app.hasRoute({ method: "DELETE", url: "/notification/:id" })) {
|
|
18
|
+
app.delete("/notification/:id", params, deleteUserNotification);
|
|
19
|
+
}
|
|
20
|
+
if (!app.hasRoute({ method: "GET", url: "/notification-read/:id?" })) {
|
|
21
|
+
app.get("/notification-read/:id?", params, readNotifications);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/properties/index.ts"],"names":[],"mappings":"AAgBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/properties/index.ts"],"names":[],"mappings":"AAgBA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAWtC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -12,7 +12,7 @@ const propertiesSchema = {
|
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
function plugin(app, opt = {}) {
|
|
16
16
|
app.get("/settings-app/:entity?", { config: { policy: "L0" }, schema: propertiesSchema }, getAppSettings);
|
|
17
17
|
app.post("/settings-app/:entity?", { config: { role: "admin" } }, postAppSettings);
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/search.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/search.ts"],"names":[],"mappings":"AAmHA,wBAA8B,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAU,EAAE,EAAE,GAAG;;;;;;GAoClE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getMeta, metaFormat, getTemplates, getTemplate,
|
|
1
|
+
import { getMeta, metaFormat, getTemplates, getTemplate, handlebarsSync, } from "../../../../utils.js";
|
|
2
2
|
function sequence(tables, data, fn) {
|
|
3
3
|
return tables.reduce((promise, table) => promise.then(() => fn({
|
|
4
4
|
...data,
|
|
@@ -11,7 +11,10 @@ async function getData({ pg, tableName, query = {}, maxLimit, res }) {
|
|
|
11
11
|
return { message: "not found", status: 404 };
|
|
12
12
|
}
|
|
13
13
|
const { table, columns, meta } = loadTable;
|
|
14
|
-
const { pk } = await getMeta(table);
|
|
14
|
+
const { pk, view } = await getMeta({ pg, table });
|
|
15
|
+
if (!pk && !view) {
|
|
16
|
+
return { message: "table not found", status: 404 };
|
|
17
|
+
}
|
|
15
18
|
const cols = columns.map((el) => el.name || el).join(",");
|
|
16
19
|
const [orderColumn, orderDir] = (query.order || loadTable.order || "").split("-");
|
|
17
20
|
const order = cols.includes(orderColumn) && orderColumn?.length
|
|
@@ -27,7 +30,7 @@ async function getData({ pg, tableName, query = {}, maxLimit, res }) {
|
|
|
27
30
|
.map((el) => `${el} ilike '%${query.key}%'`)
|
|
28
31
|
.join(" or ")})`
|
|
29
32
|
: "false";
|
|
30
|
-
const where = [!pk ? "false" : "true", loadTable.query, search1].filter(
|
|
33
|
+
const where = [!pk ? "false" : "true", loadTable.query, search1].filter(Boolean);
|
|
31
34
|
const q = `select ${[
|
|
32
35
|
`"${pk}" as id`,
|
|
33
36
|
meta?.title ? `${meta.title} as title` : "",
|
|
@@ -38,15 +41,23 @@ async function getData({ pg, tableName, query = {}, maxLimit, res }) {
|
|
|
38
41
|
res.sql.push(q);
|
|
39
42
|
return null;
|
|
40
43
|
}
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
const rows = await pg.query(q).then((el) => el.rows || []);
|
|
45
|
+
const filtered = pg.queryCache
|
|
46
|
+
? await pg
|
|
47
|
+
.queryCache(`select count(*) from ${table} t where ${where.join(" and ") || "true"}`)
|
|
48
|
+
.then((el) => +(el?.rows[0]?.count || 0))
|
|
49
|
+
: 0;
|
|
50
|
+
const total = pg.queryCache
|
|
51
|
+
? await pg
|
|
52
|
+
.queryCache(`select count(*) from ${table}`)
|
|
53
|
+
.then((el) => +(el?.rows[0]?.count || 0))
|
|
54
|
+
: 0;
|
|
45
55
|
await metaFormat({ rows, table: tableName });
|
|
46
56
|
res.total += +total;
|
|
57
|
+
res.filtered += +filtered;
|
|
47
58
|
rows.forEach((row) => {
|
|
48
59
|
const href = meta?.href
|
|
49
|
-
?
|
|
60
|
+
? handlebarsSync.compile(meta.href)({ ...row, [pk]: row.id })
|
|
50
61
|
: undefined;
|
|
51
62
|
res.rows.push({
|
|
52
63
|
...row,
|
|
@@ -58,9 +69,16 @@ async function getData({ pg, tableName, query = {}, maxLimit, res }) {
|
|
|
58
69
|
return null;
|
|
59
70
|
}
|
|
60
71
|
export default async function search({ pg, funcs, query = {} }) {
|
|
61
|
-
const
|
|
62
|
-
const tables = query.table
|
|
63
|
-
|
|
72
|
+
const t1 = Date.now();
|
|
73
|
+
const tables = query.table
|
|
74
|
+
? [query.table]
|
|
75
|
+
: getTemplates("table")?.map?.((el) => el[0]);
|
|
76
|
+
const res = {
|
|
77
|
+
rows: [],
|
|
78
|
+
sql: [],
|
|
79
|
+
total: 0,
|
|
80
|
+
filtered: 0,
|
|
81
|
+
};
|
|
64
82
|
const maxLimit = Math.min(100, query.limit || "16");
|
|
65
83
|
await sequence(tables, {
|
|
66
84
|
pg,
|
|
@@ -72,8 +90,9 @@ export default async function search({ pg, funcs, query = {} }) {
|
|
|
72
90
|
if (query.sql)
|
|
73
91
|
return res.sql.join(";\n");
|
|
74
92
|
return {
|
|
75
|
-
time: Date.now() -
|
|
93
|
+
time: Date.now() - t1,
|
|
76
94
|
total: res.total,
|
|
95
|
+
filtered: res.filtered,
|
|
77
96
|
count: res.rows.length,
|
|
78
97
|
rows: res.rows,
|
|
79
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/table/index.ts"],"names":[],"mappings":"AA+BA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/table/index.ts"],"names":[],"mappings":"AA+BA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QA4EtC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -14,7 +14,7 @@ import form from "./controllers/getFormByTable.js";
|
|
|
14
14
|
import loadTemplatePath from "../../plugins/table/funcs/loadTemplatePath.js";
|
|
15
15
|
import { tableDataSchema, tableSchema, searchSchema, suggestSchema, formSchema, filterSchema, cardTabDataSchema, tableDataIdSchema, } from "./schema.js";
|
|
16
16
|
const policy = "L0";
|
|
17
|
-
|
|
17
|
+
function plugin(app, opt = {}) {
|
|
18
18
|
app.get("/token-info/:token", { config: { role: "admin" } }, tokenInfo);
|
|
19
19
|
app.get("/table-filter/:table", { config: { policy }, schema: filterSchema }, filter);
|
|
20
20
|
app.get("/table-info/:table/:id?", { config: { policy }, schema: tableDataSchema }, tableInfo);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function route(app: any, opt?: any):
|
|
1
|
+
export default function route(app: any, opt?: any): void;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/templates/index.ts"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/templates/index.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAMpD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import getTemplateApi from "./controllers/getTemplate.js";
|
|
2
2
|
import { getTemplateSchema } from "./schema.js";
|
|
3
3
|
const policy = "L0";
|
|
4
|
-
export default
|
|
4
|
+
export default function route(app, opt = {}) {
|
|
5
5
|
app.get("/template/:type/:name", { config: { policy }, schema: getTemplateSchema }, getTemplateApi);
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/util/index.ts"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/util/index.ts"],"names":[],"mappings":"AAQA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QAsBtC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -3,7 +3,7 @@ import nextId from "./controllers/next.id.js";
|
|
|
3
3
|
import statusMonitor from "./controllers/status.monitor.js";
|
|
4
4
|
import userTokens from "./controllers/user.tokens.js";
|
|
5
5
|
import codeGenerator from "./controllers/code.generator.js";
|
|
6
|
-
|
|
6
|
+
function plugin(app, opt = {}) {
|
|
7
7
|
app.get("/next-id", { config: { policy: "L0" } }, nextId);
|
|
8
8
|
app.get("/status-monitor", { config: { role: "admin" } }, statusMonitor);
|
|
9
9
|
app.get("/user-tokens/:token", { config: { role: "admin|regular" } }, userTokens);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function route(app: any, opt?: any):
|
|
1
|
+
export default function route(app: any, opt?: any): void;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/widget/index.ts"],"names":[],"mappings":"AAyCA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/widget/index.ts"],"names":[],"mappings":"AAyCA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAE,GAAQ,QASpD"}
|
|
@@ -33,7 +33,7 @@ const tableSchema = {
|
|
|
33
33
|
addHook("onWidgetSet", onWidgetSet);
|
|
34
34
|
const policy = "L0";
|
|
35
35
|
const params = { config: { policy }, schema: tableSchema };
|
|
36
|
-
export default
|
|
36
|
+
export default function route(app, opt = {}) {
|
|
37
37
|
app.delete("/widget/:type/:objectid/:id", params, widgetDel);
|
|
38
38
|
app.post("/widget/:type/:objectid/:id?", params, widgetSet);
|
|
39
39
|
app.put("/file-edit/:id", params, fileEdit);
|
package/dist/utils.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export { default as jsonToCsv } from "./server/routes/file/controllers/utils/jso
|
|
|
76
76
|
export { default as jsonToXls } from "./server/routes/file/controllers/utils/jsonToXls.js";
|
|
77
77
|
export { default as getAdminAccess } from "./server/plugins/access/funcs/getAdminAccess.js";
|
|
78
78
|
export { default as sendNotification } from "./server/plugins/auth/funcs/sendNotification.js";
|
|
79
|
+
export { default as addUserNotification } from "./server/plugins/notifications/addNotification.js";
|
|
79
80
|
export { addUserCls, editUserCls, deleteUserCls, getUserCls, } from "./server/plugins/usercls/index.js";
|
|
80
81
|
declare const _default: null;
|
|
81
82
|
export default _default;
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAGhF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAGvF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,O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EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAE3F,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAE5F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAE9F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAEnG,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,mCAAmC,CAAC;;AAE3C,wBAAoB"}
|
package/dist/utils.js
CHANGED
|
@@ -91,6 +91,7 @@ export { default as getExport } from "./server/plugins/file/getExport.js";
|
|
|
91
91
|
export { default as jsonToCsv } from "./server/routes/file/controllers/utils/jsonToCsv.js";
|
|
92
92
|
export { default as jsonToXls } from "./server/routes/file/controllers/utils/jsonToXls.js";
|
|
93
93
|
export { default as getAdminAccess } from "./server/plugins/access/funcs/getAdminAccess.js";
|
|
94
|
-
export { default as sendNotification } from "./server/plugins/auth/funcs/sendNotification.js";
|
|
94
|
+
export { default as sendNotification } from "./server/plugins/auth/funcs/sendNotification.js"; // email
|
|
95
|
+
export { default as addUserNotification } from "./server/plugins/notifications/addNotification.js"; // popup, widget, interface etc.
|
|
95
96
|
export { addUserCls, editUserCls, deleteUserCls, getUserCls, } from "./server/plugins/usercls/index.js";
|
|
96
97
|
export default null;
|