mt-flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
336 lines (335 loc) • 9.84 kB
TypeScript
import * as z from "zod";
export declare const ResFormFieldSchema: z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
placeHolder: z.ZodOptional<z.ZodString>;
defaultValue: z.ZodOptional<z.ZodString>;
icon: z.ZodOptional<z.ZodString>;
cn: z.ZodOptional<z.ZodString>;
sortNum: z.ZodOptional<z.ZodNumber>;
editable: z.ZodOptional<z.ZodBoolean>;
bindTo: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodAny>;
editMode: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
min: z.ZodOptional<z.ZodNumber>;
max: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
id: string;
name: string;
type?: string | undefined;
label?: string | undefined;
placeHolder?: string | undefined;
defaultValue?: string | undefined;
icon?: string | undefined;
cn?: string | undefined;
sortNum?: number | undefined;
editable?: boolean | undefined;
bindTo?: string | undefined;
meta?: any;
editMode?: string | undefined;
required?: boolean | undefined;
min?: number | undefined;
max?: number | undefined;
}, {
id: string;
name: string;
type?: string | undefined;
label?: string | undefined;
placeHolder?: string | undefined;
defaultValue?: string | undefined;
icon?: string | undefined;
cn?: string | undefined;
sortNum?: number | undefined;
editable?: boolean | undefined;
bindTo?: string | undefined;
meta?: any;
editMode?: string | undefined;
required?: boolean | undefined;
min?: number | undefined;
max?: number | undefined;
}>;
export type ResFormField = z.infer<typeof ResFormFieldSchema>;
export declare const ResFormSchema: z.ZodObject<{
id: z.ZodNumber;
resViewID: z.ZodOptional<z.ZodNumber>;
title: z.ZodString;
res: z.ZodString;
formType: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
action: z.ZodString;
cn: z.ZodOptional<z.ZodString>;
icon: z.ZodOptional<z.ZodString>;
attrs: z.ZodAny;
fields: z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
placeHolder: z.ZodOptional<z.ZodString>;
defaultValue: z.ZodOptional<z.ZodString>;
icon: z.ZodOptional<z.ZodString>;
cn: z.ZodOptional<z.ZodString>;
sortNum: z.ZodOptional<z.ZodNumber>;
editable: z.ZodOptional<z.ZodBoolean>;
bindTo: z.ZodOptional<z.ZodString>;
meta: z.ZodOptional<z.ZodAny>;
editMode: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
min: z.ZodOptional<z.ZodNumber>;
max: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
id: string;
name: string;
type?: string | undefined;
label?: string | undefined;
placeHolder?: string | undefined;
defaultValue?: string | undefined;
icon?: string | undefined;
cn?: string | undefined;
sortNum?: number | undefined;
editable?: boolean | undefined;
bindTo?: string | undefined;
meta?: any;
editMode?: string | undefined;
required?: boolean | undefined;
min?: number | undefined;
max?: number | undefined;
}, {
id: string;
name: string;
type?: string | undefined;
label?: string | undefined;
placeHolder?: string | undefined;
defaultValue?: string | undefined;
icon?: string | undefined;
cn?: string | undefined;
sortNum?: number | undefined;
editable?: boolean | undefined;
bindTo?: string | undefined;
meta?: any;
editMode?: string | undefined;
required?: boolean | undefined;
min?: number | undefined;
max?: number | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
title: string;
id: number;
action: string;
res: string;
fields: {
id: string;
name: string;
type?: string | undefined;
label?: string | undefined;
placeHolder?: string | undefined;
defaultValue?: string | undefined;
icon?: string | undefined;
cn?: string | undefined;
sortNum?: number | undefined;
editable?: boolean | undefined;
bindTo?: string | undefined;
meta?: any;
editMode?: string | undefined;
required?: boolean | undefined;
min?: number | undefined;
max?: number | undefined;
}[];
resViewID?: number | undefined;
formType?: string | undefined;
description?: string | undefined;
cn?: string | undefined;
icon?: string | undefined;
attrs?: any;
}, {
title: string;
id: number;
action: string;
res: string;
fields: {
id: string;
name: string;
type?: string | undefined;
label?: string | undefined;
placeHolder?: string | undefined;
defaultValue?: string | undefined;
icon?: string | undefined;
cn?: string | undefined;
sortNum?: number | undefined;
editable?: boolean | undefined;
bindTo?: string | undefined;
meta?: any;
editMode?: string | undefined;
required?: boolean | undefined;
min?: number | undefined;
max?: number | undefined;
}[];
resViewID?: number | undefined;
formType?: string | undefined;
description?: string | undefined;
cn?: string | undefined;
icon?: string | undefined;
attrs?: any;
}>;
export type ResForm = z.infer<typeof ResFormSchema>;
export declare const ResActionSchema: z.ZodObject<{
id: z.ZodNumber;
name: z.ZodString;
actionKind: z.ZodString;
title: z.ZodOptional<z.ZodString>;
viewType: z.ZodString;
cn: z.ZodOptional<z.ZodString>;
enabled: z.ZodBoolean;
attrs: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
id: number;
name: string;
enabled: boolean;
actionKind: string;
viewType: string;
title?: string | undefined;
cn?: string | undefined;
attrs?: any;
}, {
id: number;
name: string;
enabled: boolean;
actionKind: string;
viewType: string;
title?: string | undefined;
cn?: string | undefined;
attrs?: any;
}>;
export type ResAction = z.infer<typeof ResActionSchema>;
export interface ResView {
id: number;
pid: number;
name: string;
subViews: ResView[];
res?: string;
parentIdField?: string;
viewType?: string;
title?: string;
sortNum?: number;
description?: string;
forms?: ResForm[];
formId?: number;
actions?: ResAction[];
}
export declare const resViewSchema: z.ZodType<ResView>;
export declare const resListSchema: z.ZodObject<{
cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
keyword: z.ZodOptional<z.ZodString>;
limit: z.ZodOptional<z.ZodNumber>;
res: z.ZodString;
params: z.ZodAny;
}, "strip", z.ZodTypeAny, {
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
params?: any;
}, {
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
params?: any;
}>;
export declare const resByIdSchema: z.ZodObject<{
cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
keyword: z.ZodOptional<z.ZodString>;
limit: z.ZodOptional<z.ZodNumber>;
res: z.ZodString;
params: z.ZodObject<{
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
}, "strip", z.ZodTypeAny, {
id: string | number;
}, {
id: string | number;
}>;
}, "strip", z.ZodTypeAny, {
params: {
id: string | number;
};
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
}, {
params: {
id: string | number;
};
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
}>;
export declare const resUpdateSchema: z.ZodObject<{
cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
keyword: z.ZodOptional<z.ZodString>;
limit: z.ZodOptional<z.ZodNumber>;
res: z.ZodString;
params: z.ZodAny;
}, "strip", z.ZodTypeAny, {
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
params?: any;
}, {
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
params?: any;
}>;
export declare const resCreateSchema: z.ZodObject<{
cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
keyword: z.ZodOptional<z.ZodString>;
limit: z.ZodOptional<z.ZodNumber>;
res: z.ZodString;
params: z.ZodAny;
}, "strip", z.ZodTypeAny, {
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
params?: any;
}, {
res: string;
cursor?: string | null | undefined;
keyword?: string | undefined;
limit?: number | undefined;
params?: any;
}>;
export declare const resDeleteSchema: z.ZodObject<{
res: z.ZodString;
params: z.ZodObject<{
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
}, "strip", z.ZodTypeAny, {
id: string | number;
}, {
id: string | number;
}>;
}, "strip", z.ZodTypeAny, {
params: {
id: string | number;
};
res: string;
}, {
params: {
id: string | number;
};
res: string;
}>;
export declare const resGetFormSchema: z.ZodObject<{
res: z.ZodString;
}, "strip", z.ZodTypeAny, {
res: string;
}, {
res: string;
}>;