declare module "pkgs/api/_prasi" { export const _: { url: string; api(): Promise; }; export const getApiEntry: () => any; } declare module "pkgs/api/_web" { export const _: { url: string; api(id: string, _: string): Promise; }; } declare module "pkgs/utils/dir" { export const dir: (path: string) => string; } declare module "app/db/db" { } declare module "pkgs/utils/global" { import { Logger } from "pino"; import { RadixRouter } from "radix3"; import { Database } from "bun:sqlite"; type SingleRoute = { url: string; args: string[]; fn: (...arg: any[]) => Promise; path: string; }; export const g: { dburl: string; datadir: string; mode: "dev" | "prod"; log: Logger; firebaseInit: boolean; firebase: admin.app.App; notif: { db: Database; }; api: Record; domains: null | Record; web: Record; cacheKey: number; cache: null | { site: { id: string; name: string; favicon: string; domain: string; id_user: string; created_at: Date | null; id_org: string | null; updated_at: Date | null; responsive: string; } | null; pages: { id: string; name: string; url: string; content_tree: any; id_site: string; created_at: Date | null; js_compiled: string | null; js: string | null; updated_at: Date | null; id_folder: string | null; is_deleted: boolean; }[]; npm: { site: Record; pages: Record>; }; comps: { id: string; name: string; content_tree: any; created_at: Date | null; updated_at: Date | null; type: string; id_component_group: string | null; props: any; }[]; }; }>; router: RadixRouter; port: number; frm: { js: string; etag: string; }; }; } declare module "pkgs/server/load-web" { export const loadWeb: () => Promise; export const loadWebCache: (site_id: string, ts: number | string) => Promise; } declare module "pkgs/api/_deploy" { export const _: { url: string; api(action: ({ type: "check"; } | { type: "db-update"; url: string; } | { type: "db-pull"; } | { type: "restart"; } | { type: "domain-add"; domain: string; } | { type: "domain-del"; domain: string; } | { type: "deploy-del"; ts: string; } | { type: "deploy"; dlurl: string; } | { type: "deploy-status"; } | { type: "redeploy"; ts: string; }) & { id_site: string; }): Promise<"ok" | { now: number; current: any; deploys: any; domains: any; db: { url: any; }; } | { now: number; current: any; deploys: any; domains?: undefined; db?: undefined; }>; }; export const downloadFile: (url: string, filePath: string, progress?: (rec: number, total: number) => void) => Promise; } declare module "pkgs/api/_upload" { export const _: { url: string; api(body: any): Promise; }; } declare module "pkgs/server/serve-web" { export const serveWeb: (url: URL, req: Request) => Promise; export const generateIndexHtml: (base_url: string, site_id: string) => string; } declare module "pkgs/api/_file" { export const _: { url: string; api(): Promise; }; } declare module "pkgs/api/_notif" { export const _: { url: string; api(action: string, data: { type: "register"; token: string; id: string; } | { type: "send"; id: string; body: string; title: string; data?: any; }): Promise<{ result: string; error?: undefined; totalDevice?: undefined; } | { error: string; result?: undefined; totalDevice?: undefined; } | { result: string; totalDevice: any; error?: undefined; }>; }; } declare module "pkgs/api/_api_frm" { export const _: { url: string; api(): Promise; }; } declare module "pkgs/api/_proxy" { export const _: { url: string; api(arg: { url: string; method: "POST" | "GET"; headers: any; body: any; }): Promise; }; } declare module "pkgs/api/_dbs" { export const _: { url: string; api(dbName: any, action?: string): Promise; }; } declare module "app/srv/exports" { export const _web: { name: string; url: string; path: string; args: string[]; handler: Promise; }; export const _deploy: { name: string; url: string; path: string; args: string[]; handler: Promise; }; export const _upload: { name: string; url: string; path: string; args: string[]; handler: Promise; }; export const _prasi: { name: string; url: string; path: string; args: any[]; handler: Promise; }; export const _file: { name: string; url: string; path: string; args: any[]; handler: Promise; }; export const _notif: { name: string; url: string; path: string; args: string[]; handler: Promise; }; export const _api_frm: { name: string; url: string; path: string; args: any[]; handler: Promise; }; export const _proxy: { name: string; url: string; path: string; args: string[]; handler: Promise; }; export const _dbs: { name: string; url: string; path: string; args: string[]; handler: Promise; }; }