appwrite-utils
Version:
`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. It provides a suite of utilities and helper functions that facilitate data manipulation, schema management, and seamless integrati
31 lines (30 loc) • 1.22 kB
TypeScript
import { z } from "zod";
export declare const enumAttributeSchema: z.ZodObject<{
key: z.ZodString;
type: z.ZodDefault<z.ZodLiteral<"enum">>;
error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
elements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
}, "strip", z.ZodTypeAny, {
type: "enum";
key: string;
elements: string[];
description?: string | Record<string, string> | null | undefined;
required?: boolean | undefined;
array?: boolean | undefined;
error?: string | undefined;
xdefault?: string | null | undefined;
}, {
key: string;
type?: "enum" | undefined;
description?: string | Record<string, string> | null | undefined;
required?: boolean | undefined;
array?: boolean | undefined;
error?: string | undefined;
xdefault?: string | null | undefined;
elements?: string[] | undefined;
}>;
export type EnumAttribute = z.infer<typeof enumAttributeSchema>;