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
+29 -8
View File
@@ -1,11 +1,13 @@
import type { RequestOptions } from "https";
import { DSQL_DATASQUIREL_PROCESS_QUEUE, DSQL_DATASQUIREL_USER_DATABASES } from "./dsql";
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[];
@@ -15,9 +17,11 @@ export interface DSQL_DatabaseSchemaType {
updateData?: boolean;
}
export interface DSQL_ChildrenDatabaseObject {
dbFullName: string;
dbId?: string | number;
dbFullName?: string;
}
export interface DSQL_TableSchemaType {
id?: number | string;
tableName: string;
tableFullName: string;
tableDescription?: string;
@@ -482,10 +486,10 @@ 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;
@@ -707,8 +711,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;
@@ -971,6 +976,7 @@ export type ServerQueryObject<T extends object = {
[key: string]: any;
}> = {
value?: string | string[];
nullValue?: boolean;
operator?: (typeof ServerQueryOperators)[number];
equality?: (typeof ServerQueryEqualities)[number];
tableName?: string;
@@ -1422,10 +1428,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> = {
success: boolean;
@@ -1535,4 +1551,9 @@ export type DsqlAppData = {
DSQL_FACEBOOK_APP_ID?: string;
DSQL_GITHUB_ID?: string;
};
export declare const MediaTypes: readonly ["image", "file"];
export type MediaUploadDataType = ImageObjectType & FileObjectType & {
private?: boolean;
};
export declare const ImageMimeTypes: (keyof sharp.FormatEnum)[];
export {};
+10 -1
View File
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DockerComposeServices = exports.DatasquirelWindowEvents = exports.WebSocketEvents = exports.QueueJobTypes = exports.SignUpParadigms = exports.UserTypes = exports.DsqlCrudActions = exports.DataCrudRequestMethods = exports.ServerQueryEqualities = exports.ServerQueryOperators = exports.TextFieldTypesArray = void 0;
exports.ImageMimeTypes = exports.MediaTypes = exports.DockerComposeServices = exports.DatasquirelWindowEvents = exports.WebSocketEvents = exports.QueueJobTypes = exports.SignUpParadigms = exports.UserTypes = exports.DsqlCrudActions = exports.DataCrudRequestMethods = exports.ServerQueryEqualities = exports.ServerQueryOperators = exports.TextFieldTypesArray = void 0;
exports.TextFieldTypesArray = [
{ title: "Plain Text", value: "plain" },
{ title: "Rich Text", value: "richText" },
@@ -70,3 +70,12 @@ exports.DockerComposeServices = [
"db-load-balancer",
"post-db-setup",
];
exports.MediaTypes = ["image", "file"];
exports.ImageMimeTypes = [
"webp",
"gif",
"svg",
"png",
"jpeg",
"jpg",
];