This commit is contained in:
Rizky 2024-05-11 07:01:10 +07:00
parent 22c4df5634
commit 04d2dfa4fc
4 changed files with 27 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import { codeInternal } from "./parts/internal";
import { ensureFiles } from "./utlis/ensure-files";
import { ensureLib } from "./utlis/ensure-lib";
import { initTypings } from "./parts/init/typings";
import { $ } from "bun";
export const code = {
internal: codeInternal,
@ -17,6 +18,7 @@ export const code = {
await initFrontEnd(root, id_site);
await initServer(root, id_site);
await initTypings(root, id_site);
await $`chmod -R 777 ${root}/typings`;
},
path(
id_site: string,

View File

@ -11,6 +11,30 @@ declare global {
_raw: any;
};
const db: prisma.PrismaClient & PrismaExtend;
interface PushNotificationSchema {
title?: string;
subtitle?: string;
body?: string;
id: string;
tag?: string;
badge?: number;
notification?: any;
data: any;
click_action?: string;
link?: string;
group?: string;
groupSummary?: boolean;
}
interface ActionPerformed {
actionId: string;
inputValue?: string;
notification: PushNotificationSchema;
}
const notif: {
loaded: (send: (data: any) => void) => void;
onReceive: (notif: PushNotificationSchema) => void | Promise<void>;
onTap: (notif: null | ActionPerformed) => void | Promise<void>;
};
type PrasiServer = {
ws?: WebSocketHandler<{ url: string }>;

Binary file not shown.

File diff suppressed because one or more lines are too long