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

1,086 lines 71.2 kB
import { z } from "zod"; import { type Collections, type Collection } from "./collection.js"; export declare const AppwriteConfigSchema: z.ZodObject<{ appwriteEndpoint: z.ZodDefault<z.ZodString>; appwriteProject: z.ZodString; appwriteKey: z.ZodString; appwriteClient: z.ZodDefault<z.ZodUnion<[z.ZodAny, z.ZodNull]>>; enableBackups: z.ZodDefault<z.ZodBoolean>; backupInterval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; backupRetention: z.ZodDefault<z.ZodNumber>; enableBackupCleanup: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; enableMockData: z.ZodDefault<z.ZodBoolean>; documentBucketId: z.ZodDefault<z.ZodOptional<z.ZodString>>; usersCollectionName: z.ZodDefault<z.ZodOptional<z.ZodString>>; databases: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ $id: z.ZodString; name: z.ZodString; bucket: z.ZodOptional<z.ZodObject<{ $id: z.ZodString; name: z.ZodString; permissions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{ permission: z.ZodString; target: z.ZodString; }, "strip", z.ZodTypeAny, { permission: string; target: string; }, { permission: string; target: string; }>, z.ZodEffects<z.ZodString, { permission: string; target: string; }, string>]>, "many">>>; fileSecurity: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; maximumFileSize: z.ZodOptional<z.ZodNumber>; allowedFileExtensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; compression: z.ZodOptional<z.ZodEnum<["none", "gzip", "zstd"]>>; encryption: z.ZodOptional<z.ZodBoolean>; antivirus: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name: string; $id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }, { name: string; $id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }>>; }, "strip", z.ZodTypeAny, { name: string; $id: string; bucket?: { name: string; $id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; } | undefined; }, { name: string; $id: string; bucket?: { name: string; $id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; } | undefined; }>, "many">>>; buckets: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ $id: z.ZodString; name: z.ZodString; permissions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{ permission: z.ZodString; target: z.ZodString; }, "strip", z.ZodTypeAny, { permission: string; target: string; }, { permission: string; target: string; }>, z.ZodEffects<z.ZodString, { permission: string; target: string; }, string>]>, "many">>>; fileSecurity: z.ZodOptional<z.ZodBoolean>; enabled: z.ZodOptional<z.ZodBoolean>; maximumFileSize: z.ZodOptional<z.ZodNumber>; allowedFileExtensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; compression: z.ZodOptional<z.ZodEnum<["none", "gzip", "zstd"]>>; encryption: z.ZodOptional<z.ZodBoolean>; antivirus: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name: string; $id: string; enabled?: boolean | undefined; permissions?: ({ permission: string; target: string; } | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }, { name: string; $id: string; enabled?: boolean | undefined; permissions?: (string | { permission: string; target: string; })[] | undefined; fileSecurity?: boolean | undefined; maximumFileSize?: number | undefined; allowedFileExtensions?: string[] | undefined; compression?: "none" | "gzip" | "zstd" | undefined; encryption?: boolean | undefined; antivirus?: boolean | undefined; }>, "many">>>; collections: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<Omit<{ name: z.ZodString; $id: z.ZodOptional<z.ZodString>; enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; documentSecurity: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; description: z.ZodOptional<z.ZodString>; $createdAt: z.ZodString; $updatedAt: z.ZodString; $permissions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ permission: z.ZodString; target: z.ZodString; }, "strip", z.ZodTypeAny, { permission: string; target: string; }, { permission: string; target: string; }>, "many">>>; attributes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"string">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>; xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>; encrypted: z.ZodOptional<z.ZodBoolean>; format: z.ZodOptional<z.ZodNullable<z.ZodString>>; description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>; }, "strip", z.ZodTypeAny, { type: "string"; key: string; size: number; format?: string | null | undefined; description?: string | Record<string, string> | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; encrypted?: boolean | undefined; }, { key: string; type?: "string" | undefined; format?: string | null | undefined; description?: string | Record<string, string> | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; size?: number | undefined; xdefault?: string | null | undefined; encrypted?: boolean | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"integer">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; min: z.ZodOptional<z.ZodNumber>; max: z.ZodOptional<z.ZodNumber>; xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>; }, "strip", z.ZodTypeAny, { type: "integer"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; }, { key: string; type?: "integer" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"float">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; min: z.ZodOptional<z.ZodNumber>; max: z.ZodOptional<z.ZodNumber>; xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>; }, "strip", z.ZodTypeAny, { type: "float"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; }, { key: string; type?: "float" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"boolean">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; xdefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>; }, "strip", z.ZodTypeAny, { type: "boolean"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: boolean | null | undefined; }, { key: string; type?: "boolean" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: boolean | null | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"datetime">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; 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: "datetime"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }, { key: string; type?: "datetime" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"email">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; 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: "email"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }, { key: string; type?: "email" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodLiteral<"ip">; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; 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: "ip"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }, { type: "ip"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }>, z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodLiteral<"url">>; error: z.ZodOptional<z.ZodDefault<z.ZodString>>; required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; 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: "url"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }, { key: string; type?: "url" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; }>, 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; }>, 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; }>]>, "many">>; indexes: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ key: z.ZodString; type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["key", "unique", "fulltext"]>>>; status: z.ZodOptional<z.ZodString>; error: z.ZodOptional<z.ZodString>; attributes: z.ZodArray<z.ZodString, "many">; orders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { type: "key" | "unique" | "fulltext"; key: string; attributes: string[]; status?: string | undefined; error?: string | undefined; orders?: string[] | undefined; }, { key: string; attributes: string[]; type?: "key" | "unique" | "fulltext" | undefined; status?: string | undefined; error?: string | undefined; orders?: string[] | undefined; }>, "many">>>, { type: "key" | "unique" | "fulltext"; key: string; attributes: string[]; status?: string | undefined; error?: string | undefined; orders?: string[] | undefined; }[], { key: string; attributes: string[]; type?: "key" | "unique" | "fulltext" | undefined; status?: string | undefined; error?: string | undefined; orders?: string[] | undefined; }[] | undefined>; importDefs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{ type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["create", "update"]>>>; filePath: z.ZodString; basePath: z.ZodOptional<z.ZodString>; primaryKeyField: z.ZodDefault<z.ZodString>; idMappings: z.ZodOptional<z.ZodArray<z.ZodObject<{ sourceField: z.ZodString; fieldToSet: z.ZodOptional<z.ZodString>; targetFieldToMatch: z.ZodOptional<z.ZodString>; targetField: z.ZodString; targetCollection: z.ZodString; }, "strip", z.ZodTypeAny, { sourceField: string; targetField: string; targetCollection: string; fieldToSet?: string | undefined; targetFieldToMatch?: string | undefined; }, { sourceField: string; targetField: string; targetCollection: string; fieldToSet?: string | undefined; targetFieldToMatch?: string | undefined; }>, "many">>; createUsers: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>; updateMapping: z.ZodOptional<z.ZodObject<{ originalIdField: z.ZodString; targetField: z.ZodString; }, "strip", z.ZodTypeAny, { targetField: string; originalIdField: string; }, { targetField: string; originalIdField: string; }>>; attributeMappings: 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">; }, "strip", z.ZodTypeAny, { filePath: string; primaryKeyField: string; attributeMappings: { 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; }[]; type?: "create" | "update" | undefined; basePath?: string | undefined; idMappings?: { sourceField: string; targetField: string; targetCollection: string; fieldToSet?: string | undefined; targetFieldToMatch?: string | undefined; }[] | undefined; createUsers?: boolean | null | undefined; updateMapping?: { targetField: string; originalIdField: string; } | undefined; }, { filePath: string; attributeMappings: { 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; }[]; type?: "create" | "update" | undefined; basePath?: string | undefined; primaryKeyField?: string | undefined; idMappings?: { sourceField: string; targetField: string; targetCollection: string; fieldToSet?: string | undefined; targetFieldToMatch?: string | undefined; }[] | undefined; createUsers?: boolean | null | undefined; updateMapping?: { targetField: string; originalIdField: string; } | undefined; }>, "many">>>; databaseId: z.ZodOptional<z.ZodString>; }, "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, { name: string; attributes: ({ type: "string"; key: string; size: number; format?: string | null | undefined; description?: string | Record<string, string> | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; encrypted?: boolean | undefined; } | { type: "integer"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; } | { type: "float"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; } | { type: "boolean"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: boolean | null | undefined; } | { type: "datetime"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { type: "email"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { type: "ip"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { type: "url"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { 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; } | { 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; })[]; $permissions: { permission: string; target: string; }[]; indexes: { type: "key" | "unique" | "fulltext"; key: string; attributes: string[]; status?: string | undefined; error?: string | undefined; orders?: string[] | undefined; }[]; importDefs: { filePath: string; primaryKeyField: string; attributeMappings: { 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; }[]; type?: "create" | "update" | undefined; basePath?: string | undefined; idMappings?: { sourceField: string; targetField: string; targetCollection: string; fieldToSet?: string | undefined; targetFieldToMatch?: string | undefined; }[] | undefined; createUsers?: boolean | null | undefined; updateMapping?: { targetField: string; originalIdField: string; } | undefined; }[]; description?: string | undefined; $id?: string | undefined; enabled?: boolean | undefined; documentSecurity?: boolean | undefined; databaseId?: string | undefined; }, { name: string; description?: string | undefined; attributes?: ({ key: string; type?: "string" | undefined; format?: string | null | undefined; description?: string | Record<string, string> | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; size?: number | undefined; xdefault?: string | null | undefined; encrypted?: boolean | undefined; } | { key: string; type?: "integer" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; } | { key: string; type?: "float" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: number | null | undefined; min?: number | undefined; max?: number | undefined; } | { key: string; type?: "boolean" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: boolean | null | undefined; } | { key: string; type?: "datetime" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { key: string; type?: "email" | undefined; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { type: "ip"; key: string; description?: string | Record<string, string> | null | undefined; required?: boolean | undefined; array?: boolean | undefined; error?: string | undefined; xdefault?: string | null | undefined; } | { key: string; type?: "url" | undefined; 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; } | { 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; })[] | undefined; $id?: string | undefined; enabled?: boolean | undefined; documentSecurity?: boolean | undefined; $permissions?: { permission: string; target: string; }[] | undefined; indexes?: { key: string; attributes: string[]; type?: "key" | "unique" | "fulltext" | undefined; status?: string | undefined; error?: string | undefined; orders?: string[] | undefined; }[] | undefined; importDefs?: { filePath: string; attributeMappings: { 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; }[]; type?: "create" | "update" | undefined; basePath?: string | undefined; primaryKeyField?: string | undefined; idMappings?: { sourceField: string; targetField: string; targetCollection: string; fieldToSet?: string | undefined; targetFieldToMatch?: string | undefined; }[] | undefined; createUsers?: boolean | null | undefined; updateMapping?: { targetField: string; originalIdField: string; } | undefined; }[] | undefined; databaseId?: string | undefined; }>, "many">>>; functions: z.ZodOptional<z.ZodArray<z.ZodObject<{ dirPath: z.ZodOptional<z.ZodString>; $id: z.ZodString; name: z.ZodString; runtime: z.ZodEnum<["node-14.5", "node-16.0", "node-18.0", "node-19.0", "node-20.0", "node-21.0", "php-8.0", "php-8.1", "php-8.2", "php-8.3", "ruby-3.0", "ruby-3.1", "ruby-3.2", "ruby-3.3", "python-3.8", "python-3.9", "python-3.10", "python-3.11", "python-3.12", "python-ml-3.11", "deno-1.40", "dart-2.15", "dart-2.16", "dart-2.17", "dart-2.18", "dart-3.0", "dart-3.1", "dart-3.3", "dotnet-3.1", "dotnet-6.0", "dotnet-7.0", "java-8.0", "java-11.0", "java-17.0", "java-18.0", "java-21.0", "swift-5.5", "swift-5.8", "swift-5.9", "kotlin-1.6", "kotlin-1.8", "kotlin-1.9", "cpp-17", "cpp-20", "bun-1.0", "go-1.23"]>; execute: z.ZodArray<z.ZodString, "many">; events: z.ZodArray<z.ZodString, "many">; schedule: z.ZodOptional<z.ZodString>; timeout: z.ZodOptional<z.ZodNumber>; enabled: z.ZodOptional<z.ZodBoolean>; logging: z.ZodOptional<z.ZodBoolean>; ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; entrypoint: z.ZodOptional<z.ZodString>; predeployCommands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; deployDir: z.ZodOptional<z.ZodString>; commands: z.ZodOptional<z.ZodString>; scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["users.read", "users.write", "teams.read", "teams.write", "databases.read", "databases.write", "collections.read", "collections.write", "attributes.read", "attributes.write", "indexes.read", "indexes.write", "documents.read", "documents.write", "files.read", "files.write", "buckets.read", "buckets.write", "functions.read", "functions.write", "execution.read", "execution.write", "locale.read", "avatars.read", "health.read", "rules.read", "rules.write", "migrations.read", "migrations.write", "vcs.read", "vcs.write", "assistant.read", "messages.read", "messages.write", "targets.read", "targets.write", "providers.read", "providers.write", "topics.read", "topics.write", "subscribers.read", "subscribers.write"]>, "many">>; installationId: z.ZodOptional<z.ZodString>; providerRepositoryId: z.ZodOptional<z.ZodString>; providerBranch: z.ZodOptional<z.ZodString>; providerSilentMode: z.ZodOptional<z.ZodBoolean>; providerRootDirectory: z.ZodOptional<z.ZodString>; templateRepository: z.ZodOptional<z.ZodString>; templateOwner: z.ZodOptional<z.ZodString>; templateRootDirectory: z.ZodOptional<z.ZodString>; templateVersion: z.ZodOptional<z.ZodString>; specification: z.ZodOptional<z.ZodEnum<["s-0.5vcpu-512mb", "s-1vcpu-512mb", "s-1vcpu-1gb", "s-2vcpu-2gb", "s-2vcpu-4gb", "s-4vcpu-4gb", "s-4vcpu-8gb", "s-8vcpu-4gb", "s-8vcpu-8gb"]>>; }, "strip", z.ZodTypeAny, { name: string; $id: string; runtime: "node-14.5" | "node-16.0" | "node-18.0" | "node-19.0" | "node-20.0" | "node-21.0" | "php-8.0" | "php-8.1" | "php-8.2" | "php-8.3" | "ruby-3.0" | "ruby-3.1" | "ruby-3.2" | "ruby-3.3" | "python-3.8" | "python-3.9" | "python-3.10" | "python-3.11" | "python-3.12" | "python-ml-3.11" | "deno-1.40" | "dart-2.15" | "dart-2.16" | "dart-2.17" | "dart-2.18" | "dart-3.0" | "dart-3.1" | "dart-3.3" | "dotnet-3.1" | "dotnet-6.0" | "dotnet-7.0" | "java-8.0" | "java-11.0" | "java-17.0" | "java-18.0" | "java-21.0" | "swift-5.5" | "swift-5.8" | "swift-5.9" | "kotlin-1.6" | "kotlin-1.8" | "kotlin-1.9" | "cpp-17" | "cpp-20" | "bun-1.0" | "go-1.23"; execute: string[]; events: string[]; enabled?: boolean | undefined; dirPath?: string | undefined; schedule?: string | undefined; timeout?: number | undefined; logging?: boolean | undefined; ignore?: string[] | undefined; entrypoint?: string | undefined; predeployCommands?: string[] | undefined; deployDir?: string | undefined; commands?: string | undefined; scopes?: ("users.read" | "users.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined; installationId?: string | undefined; providerRepositoryId?: string | undefined; providerBranch?: string | undefined; providerSilentMode?: boolean | undefined; providerRootDirectory?: string | undefined; templateRepository?: string | undefined; templateOwner?: string | undefined; templateRootDirectory?: string | undefined; templateVersion?: string | undefined; specification?: "s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb" | undefined; }, { name: string; $id: string; runtime: "node-14.5" | "node-16.0" | "node-18.0" | "node-19.0" | "node-20.0" | "node-21.0" | "php-8.0" | "php-8.1" | "php-8.2" | "php-8.3" | "ruby-3.0" | "ruby-3.1" | "ruby-3.2" | "ruby-3.3" | "python-3.8" | "python-3.9" | "python-3.10" | "python-3.11" | "python-3.12" | "python-ml-3.11" | "deno-1.40" | "dart-2.15" | "dart-2.16" | "dart-2.17" | "dart-2.18" | "dart-3.0" | "dart-3.1" | "dart-3.3" | "dotnet-3.1" | "dotnet-6.0" | "dotnet-7.0" | "java-8.0" | "java-11.0" | "java-17.0" | "java-18.0" | "java-21.0" | "swift-5.5" | "swift-5.8" | "swift-5.9" | "kotlin-1.6" | "kotlin-1.8" | "kotlin-1.9" | "cpp-17" | "cpp-20" | "bun-1.0" | "go-1.23"; execute: string[]; events: string[]; enabled?: boolean | undefined; dirPath?: string | undefined; schedule?: string | undefined; timeout?: number | undefined; logging?: boolean | undefined; ignore?: string[] | undefined; entrypoint?: string | undefined; predeployCommands?: string[] | undefined; deployDir?: string | undefined; commands?: string | undefined; scopes?: ("users.read" | "users.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined; installationId?: string | undefined; providerRepositoryId?: string | undefined; providerBranch?: string | undefined; providerSilentMode?: boolean | undefined; providerRootDirectory?: string | un