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

150 lines (149 loc) 4.6 kB
import { z } from "zod"; export declare const AttributeMappingSchema: z.ZodObject<{ oldKey: z.ZodOptional<z.ZodString>; oldKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; targetKey: z.ZodString; valueToSet: z.ZodOptional<z.ZodAny>; fileData: z.ZodOptional<z.ZodObject<{ name: z.ZodString; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; name: string; }, { path: string; name: string; }>>; converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>; validationActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ action: z.ZodString; params: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { params: string[]; action: string; }, { params: string[]; action: string; }>, "many">>>; postImportActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ action: z.ZodString; params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">; }, "strip", z.ZodTypeAny, { params: (string | Record<string, any>)[]; action: string; }, { params: (string | Record<string, any>)[]; action: string; }>, "many">>>; }, "strip", z.ZodTypeAny, { targetKey: string; oldKey?: string | undefined; oldKeys?: string[] | undefined; valueToSet?: any; fileData?: { path: string; name: string; } | undefined; converters?: string[] | undefined; validationActions?: { params: string[]; action: string; }[] | undefined; postImportActions?: { params: (string | Record<string, any>)[]; action: string; }[] | undefined; }, { targetKey: string; oldKey?: string | undefined; oldKeys?: string[] | undefined; valueToSet?: any; fileData?: { path: string; name: string; } | undefined; converters?: string[] | undefined; validationActions?: { params: string[]; action: string; }[] | undefined; postImportActions?: { params: (string | Record<string, any>)[]; action: string; }[] | undefined; }>; export declare const AttributeMappingsSchema: z.ZodArray<z.ZodObject<{ oldKey: z.ZodOptional<z.ZodString>; oldKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; targetKey: z.ZodString; valueToSet: z.ZodOptional<z.ZodAny>; fileData: z.ZodOptional<z.ZodObject<{ name: z.ZodString; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; name: string; }, { path: string; name: string; }>>; converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>; validationActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ action: z.ZodString; params: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { params: string[]; action: string; }, { params: string[]; action: string; }>, "many">>>; postImportActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{ action: z.ZodString; params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">; }, "strip", z.ZodTypeAny, { params: (string | Record<string, any>)[]; action: string; }, { params: (string | Record<string, any>)[]; action: string; }>, "many">>>; }, "strip", z.ZodTypeAny, { targetKey: string; oldKey?: string | undefined; oldKeys?: string[] | undefined; valueToSet?: any; fileData?: { path: string; name: string; } | undefined; converters?: string[] | undefined; validationActions?: { params: string[]; action: string; }[] | undefined; postImportActions?: { params: (string | Record<string, any>)[]; action: string; }[] | undefined; }, { targetKey: string; oldKey?: string | undefined; oldKeys?: string[] | undefined; valueToSet?: any; fileData?: { path: string; name: string; } | undefined; converters?: string[] | undefined; validationActions?: { params: string[]; action: string; }[] | undefined; postImportActions?: { params: (string | Record<string, any>)[]; action: string; }[] | undefined; }>, "many">; export type AttributeMapping = z.infer<typeof AttributeMappingSchema>; export type AttributeMappings = z.infer<typeof AttributeMappingsSchema>;