UNPKG

appwrite-utils

Version:
62 lines (61 loc) 5.52 kB
import { z } from "zod"; /** * THIS IS SERVER-SIDE SCHEMA, DO NOT EXPECT THIS TO BE COMPATIBLE WITH CLIENT-SIDE SCHEMA * * dirPath?: string, -- The directory path to the function, if not provided, the function will be created in the appwriteConfig/functions directory * functionId: string, * name: string, * runtime?: Runtime, * execute?: string[], * events?: string[], * schedule?: string, * timeout?: number, * enabled?: boolean, * logging?: boolean, * entrypoint?: string, * predeployCommands?: string[], -- These are custom and ours, and they will be evaluated on the host machine before the function is deployed * deployDir?: string, -- The directory to deploy the function from, if not provided, the function will be deployed from the function's directory * commands?: string, * prebuilt?: boolean, -- When true, `commands` runs locally before tarring, node_modules/build artifacts ship inside the tarball, and Appwrite is told to skip its build step (empty commands sent to createDeployment). Avoids server-side build entirely (no GitHub token needed on Appwrite for private deps). * scopes?: string[], * installationId?: string, * providerRepositoryId?: string, * providerBranch?: string, * providerSilentMode?: boolean, * providerRootDirectory?: string, * buildSpecification?: string, * runtimeSpecification?: string */ export declare const AppwriteFunctionSchema: z.ZodObject<{ dirPath: z.ZodOptional<z.ZodString>; $id: z.ZodString; name: z.ZodString; runtime: any; execute: z.ZodArray<z.ZodString>; events: z.ZodOptional<z.ZodArray<z.ZodString>>; 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>>; keep: z.ZodOptional<z.ZodArray<z.ZodString>>; entrypoint: z.ZodOptional<z.ZodString>; predeployCommands: z.ZodOptional<z.ZodArray<z.ZodString>>; deployDir: z.ZodOptional<z.ZodString>; commands: z.ZodOptional<z.ZodString>; prebuilt: z.ZodOptional<z.ZodBoolean>; scopes: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<"users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "tables.read" | "tables.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "rows.read" | "rows.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" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.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", string, z.core.$ZodTypeInternals<"users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "tables.read" | "tables.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "rows.read" | "rows.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" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.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", string>>>>; 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>; buildSpecification: z.ZodOptional<z.ZodString & z.ZodType<"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", string, z.core.$ZodTypeInternals<"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", string>>>; runtimeSpecification: z.ZodOptional<z.ZodString & z.ZodType<"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", string, z.core.$ZodTypeInternals<"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", string>>>; domains: z.ZodOptional<z.ZodArray<z.ZodString>>; }, z.core.$strip>; export type AppwriteFunction = z.infer<typeof AppwriteFunctionSchema>;