3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-06-07 16:05:01 +00:00
zeppelin/backend/src/types.ts

53 lines
1.3 KiB
TypeScript

import { GlobalPluginBlueprint, GuildPluginBlueprint, Knub } from "knub";
import z from "zod/v4";
import { zSnowflake } from "./utils.js";
export const zZeppelinGuildConfig = z.strictObject({
// From BaseConfig
prefix: z.string().optional(),
levels: z.record(zSnowflake, z.number()).optional(),
plugins: z.record(z.string(), z.unknown()).optional(),
});
export type TZeppelinKnub = Knub;
/**
* Wrapper for the string type that indicates the text will be parsed as Markdown later
*/
export type TMarkdown = string;
export interface ZeppelinGuildPluginInfo {
plugin: GuildPluginBlueprint<any, any>;
docs: ZeppelinPluginDocs;
autoload?: boolean;
}
export interface ZeppelinGlobalPluginInfo {
plugin: GlobalPluginBlueprint<any, any>;
docs: ZeppelinPluginDocs;
}
export type DocsPluginType = "stable" | "legacy" | "internal";
export interface ZeppelinPluginDocs {
type: DocsPluginType;
configSchema: z.ZodType;
prettyName?: string;
description?: TMarkdown;
usageGuide?: TMarkdown;
configurationGuide?: TMarkdown;
}
export interface CommandInfo {
description?: TMarkdown;
basicUsage?: TMarkdown;
examples?: TMarkdown;
usageGuide?: TMarkdown;
parameterDescriptions?: {
[key: string]: TMarkdown;
};
optionDescriptions?: {
[key: string]: TMarkdown;
};
}