webserver-framework/@types/Other.ts
Navy.gif d59e6e11d5 Bugfix for broadcastToWebhook
Properly close connections on timeout
2024-02-06 22:45:07 +02:00

59 lines
1.5 KiB
TypeScript

import { LoggerClientOptions } from '@navy.gif/logger';
import { BrokerOptions } from '@navy.gif/wrappers';
import { Payload } from '@navy.gif/discord-webhook';
export type FileExtensions = 'mp4' | 'png' | 'mkv' | 'mov' | 'wmv' | 'm4v' | 'webm' | 'gif' | 'jpg' | 'exe' | 'avi' | 'webp' | 'jpeg' | 'htm' | 'zip' | 'txt';
export type FileType = 'video' | 'image' | 'audio' | 'text' | 'application' | 'message' | 'multipart';
export type DiscordOptions = {
//
}
type MariaDBOptions = {
load: boolean,
client: {
waitForConnections: boolean,
connectionLimit: number,
supportBigNumbers: boolean,
bigNumberStrings: boolean,
multipleStatements: boolean,
collation: string
},
cluster: {
canRetry: boolean,
removeNodeErrorCount: number,
restoreNodeTimeout: number,
defaultSelector: string
},
loggerOptions: LoggerClientOptions
}
type MongoDBOptions = {
load: boolean,
client: object,
loggerOptions: LoggerClientOptions
}
export type DatabaseOptions = {
mariadb: MariaDBOptions,
mongodb: MongoDBOptions,
broker: BrokerOptions
}
export type SignupCode = {
[key:string]: unknown,
code: string,
created: number,
validFor: number,
}
export type IPCMessage = {
_id?: string,
[key: string]: string | number | object | boolean | undefined
}
export type WebhookIPC = { payload: Payload, options?: WebhookBroadcastOptions }
export type WebhookBroadcastOptions = {
debounce?: { id: string | number, duration: number}
}