This commit is contained in:
Benjamin Toby
2025-06-04 08:43:16 +01:00
parent 1364074c2c
commit 761348de08
37 changed files with 577 additions and 140 deletions
+39 -7
View File
@@ -1,16 +1,20 @@
import type { RequestOptions } from "https";
import {
DSQL_DATASQUIREL_PROCESS_QUEUE,
DSQL_DATASQUIREL_USER_DATABASE_TABLES,
DSQL_DATASQUIREL_USER_DATABASES,
DSQL_DATASQUIREL_USER_MEDIA,
} from "./dsql";
import { Editor } from "tinymce";
import sharp from "sharp";
export type DSQL_DatabaseFullName = string;
export interface DSQL_DatabaseSchemaType {
dbName: string;
dbSlug: string;
dbFullName: string;
id?: number | string;
dbName?: string;
dbSlug?: string;
dbFullName?: string;
dbDescription?: string;
dbImage?: string;
tables: DSQL_TableSchemaType[];
@@ -21,10 +25,12 @@ export interface DSQL_DatabaseSchemaType {
}
export interface DSQL_ChildrenDatabaseObject {
dbFullName: string;
dbId?: string | number;
dbFullName?: string;
}
export interface DSQL_TableSchemaType {
id?: number | string;
tableName: string;
tableFullName: string;
tableDescription?: string;
@@ -540,11 +546,11 @@ export interface LoginFormContextType {
export interface CreateAccountContextType {
user?: UserType | null;
query: CreateAccountQueryType;
query: InviteObjectType;
invitingUser: any;
}
export interface CreateAccountQueryType {
export interface InviteObjectType {
invite?: number;
database_access?: string;
priviledge?: string;
@@ -824,8 +830,9 @@ export interface DbConnectContextType {
export interface ImageObjectType {
imageName?: string;
mimeType?: string;
mimeType?: keyof sharp.FormatEnum | sharp.AvailableFormatInfo;
imageSize?: number;
thumbnailSize?: number;
private?: boolean;
imageBase64?: string;
imageBase64Full?: string;
@@ -1127,6 +1134,7 @@ export type ServerQueryParam<
export type ServerQueryObject<T extends object = { [key: string]: any }> = {
value?: string | string[];
nullValue?: boolean;
operator?: (typeof ServerQueryOperators)[number];
equality?: (typeof ServerQueryEqualities)[number];
tableName?: string;
@@ -1606,10 +1614,20 @@ export type PagePropsType = {
pageUrl?: string | null;
query?: any;
databases?: DSQL_DATASQUIREL_USER_DATABASES[] | null;
database?: DSQL_DATASQUIREL_USER_DATABASES | null;
databaseTables?: DSQL_DATASQUIREL_USER_DATABASE_TABLES[] | null;
databaseTable?: DSQL_DATASQUIREL_USER_DATABASE_TABLES | null;
dbCount?: number | null;
tableCount?: number | null;
mediaCount?: number | null;
apiKeysCount?: number | null;
databaseSchema?: DSQL_DatabaseSchemaType | null;
tableSchema?: DSQL_TableSchemaType | null;
userMedia?: DSQL_DATASQUIREL_USER_MEDIA[] | null;
mediaCurrentFolder?: string | null;
appData?: DsqlAppData | null;
staticHost?: string | null;
folders?: string[] | null;
};
export type APIResponseObject<T extends any = any> = {
@@ -1782,3 +1800,17 @@ export type DsqlAppData = {
DSQL_FACEBOOK_APP_ID?: string;
DSQL_GITHUB_ID?: string;
};
export const MediaTypes = ["image", "file"] as const;
export type MediaUploadDataType = ImageObjectType &
FileObjectType & { private?: boolean };
export const ImageMimeTypes: (keyof sharp.FormatEnum)[] = [
"webp",
"gif",
"svg",
"png",
"jpeg",
"jpg",
] as const;