UNPKG

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

61 lines (60 loc) 2.33 kB
import { z } from "zod"; export declare const relationshipAttributeSchema: z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"relationship">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; relatedCollection: z.ZodString; relationType: z.ZodEnum<["oneToMany", "manyToOne", "oneToOne", "manyToMany"]>; twoWay: z.ZodBoolean; twoWayKey: z.ZodString; onDelete: z.ZodDefault<z.ZodEnum<["setNull", "cascade", "restrict"]>>; side: z.ZodEnum<["parent", "child"]>; importMapping: z.ZodOptional<z.ZodObject<{ originalIdField: z.ZodString; targetField: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { originalIdField: string; targetField?: string | undefined; }, { originalIdField: string; targetField?: string | undefined; }>>; description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>; }, "strip", z.ZodTypeAny, { type: "relationship"; key: string; relatedCollection: string; relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany"; twoWay: boolean; twoWayKey: string; onDelete: "setNull" | "cascade" | "restrict"; side: "parent" | "child"; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; importMapping?: { originalIdField: string; targetField?: string | undefined; } | undefined; }, { key: string; relatedCollection: string; relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany"; twoWay: boolean; twoWayKey: string; side: "parent" | "child"; type?: "relationship" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; onDelete?: "setNull" | "cascade" | "restrict" | undefined; importMapping?: { originalIdField: string; targetField?: string | undefined; } | undefined; }>; export type RelationshipAttribute = z.infer<typeof relationshipAttributeSchema>;