appwrite-utils
Version:
164 lines (163 loc) • 6.81 kB
TypeScript
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 site, if not provided, the site will be created in the appwriteConfig/sites directory
* $id: string,
* name: string,
* framework: Framework,
* buildRuntime: BuildRuntime,
* enabled?: boolean,
* logging?: boolean,
* timeout?: number,
* installCommand?: string,
* buildCommand?: string,
* outputDirectory?: string,
* adapter?: Adapter,
* fallbackFile?: string,
* installationId?: string,
* providerRepositoryId?: string,
* providerBranch?: string,
* providerSilentMode?: boolean,
* providerRootDirectory?: string,
* buildSpecification?: string,
* runtimeSpecification?: string,
* predeployCommands?: string[], -- These are custom and ours, and they will be evaluated on the host machine before the site is deployed
* deployDir?: string, -- The directory to deploy the site from, if not provided, the site will be deployed from the site's directory
* ignore?: string[], -- Files/directories to ignore when deploying
* prebuilt?: boolean, -- When true, installCommand+buildCommand run locally before tarring, the build output (e.g. dist/, node_modules) ships inside the tarball, and Appwrite is told to skip its build step (empty install+build commands sent to createDeployment). Avoids server-side build entirely (no GitHub token needed on Appwrite for private deps).
*/
export declare const AppwriteSiteSchema: z.ZodObject<{
dirPath: z.ZodOptional<z.ZodString>;
$id: z.ZodString;
name: z.ZodString;
framework: z.ZodEnum<{
analog: "analog";
angular: "angular";
nextjs: "nextjs";
react: "react";
nuxt: "nuxt";
vue: "vue";
sveltekit: "sveltekit";
astro: "astro";
"tanstack-start": "tanstack-start";
remix: "remix";
lynx: "lynx";
flutter: "flutter";
"react-native": "react-native";
vite: "vite";
other: "other";
}>;
buildRuntime: z.ZodEnum<{
"node-14.5": "node-14.5";
"node-16.0": "node-16.0";
"node-18.0": "node-18.0";
"node-19.0": "node-19.0";
"node-20.0": "node-20.0";
"node-21.0": "node-21.0";
"node-22": "node-22";
"bun-1.0": "bun-1.0";
"bun-1.1": "bun-1.1";
"bun-1.3": "bun-1.3";
"deno-1.40": "deno-1.40";
"deno-1.46": "deno-1.46";
"deno-2.0": "deno-2.0";
"go-1.23": "go-1.23";
"python-3.8": "python-3.8";
"python-3.9": "python-3.9";
"python-3.10": "python-3.10";
"python-3.11": "python-3.11";
"python-3.12": "python-3.12";
"python-ml-3.11": "python-ml-3.11";
"dart-2.15": "dart-2.15";
"dart-2.16": "dart-2.16";
"dart-2.17": "dart-2.17";
"dart-2.18": "dart-2.18";
"dart-3.0": "dart-3.0";
"dart-3.1": "dart-3.1";
"dart-3.3": "dart-3.3";
"dart-3.5": "dart-3.5";
"php-8.0": "php-8.0";
"php-8.1": "php-8.1";
"php-8.2": "php-8.2";
"php-8.3": "php-8.3";
"ruby-3.0": "ruby-3.0";
"ruby-3.1": "ruby-3.1";
"ruby-3.2": "ruby-3.2";
"ruby-3.3": "ruby-3.3";
"dotnet-6.0": "dotnet-6.0";
"dotnet-7.0": "dotnet-7.0";
"dotnet-8.0": "dotnet-8.0";
"java-8.0": "java-8.0";
"java-11.0": "java-11.0";
"java-17.0": "java-17.0";
"java-18.0": "java-18.0";
"java-21.0": "java-21.0";
"java-22": "java-22";
"swift-5.5": "swift-5.5";
"swift-5.8": "swift-5.8";
"swift-5.9": "swift-5.9";
"swift-5.10": "swift-5.10";
"kotlin-1.6": "kotlin-1.6";
"kotlin-1.8": "kotlin-1.8";
"kotlin-1.9": "kotlin-1.9";
"kotlin-2.0": "kotlin-2.0";
"cpp-17": "cpp-17";
"cpp-20": "cpp-20";
"node-23": "node-23";
"node-24": "node-24";
"node-25": "node-25";
"php-8.4": "php-8.4";
"ruby-3.4": "ruby-3.4";
"ruby-4.0": "ruby-4.0";
"python-3.13": "python-3.13";
"python-3.14": "python-3.14";
"python-ml-3.12": "python-ml-3.12";
"python-ml-3.13": "python-ml-3.13";
"deno-2.5": "deno-2.5";
"deno-2.6": "deno-2.6";
"dart-2.19": "dart-2.19";
"dart-3.8": "dart-3.8";
"dart-3.9": "dart-3.9";
"dart-3.10": "dart-3.10";
"dotnet-10": "dotnet-10";
"java-25": "java-25";
"swift-6.2": "swift-6.2";
"kotlin-2.3": "kotlin-2.3";
"bun-1.2": "bun-1.2";
"go-1.24": "go-1.24";
"go-1.25": "go-1.25";
"go-1.26": "go-1.26";
"static-1": "static-1";
"flutter-3.24": "flutter-3.24";
"flutter-3.27": "flutter-3.27";
"flutter-3.29": "flutter-3.29";
"flutter-3.32": "flutter-3.32";
"flutter-3.35": "flutter-3.35";
"flutter-3.38": "flutter-3.38";
}>;
enabled: z.ZodOptional<z.ZodBoolean>;
logging: z.ZodOptional<z.ZodBoolean>;
timeout: z.ZodOptional<z.ZodNumber>;
installCommand: z.ZodOptional<z.ZodString>;
buildCommand: z.ZodOptional<z.ZodString>;
outputDirectory: z.ZodOptional<z.ZodString>;
adapter: z.ZodOptional<z.ZodEnum<{
static: "static";
ssr: "ssr";
}>>;
fallbackFile: z.ZodOptional<z.ZodString>;
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>;
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>>>;
predeployCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
deployDir: z.ZodOptional<z.ZodString>;
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
prebuilt: z.ZodOptional<z.ZodBoolean>;
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type AppwriteSite = z.infer<typeof AppwriteSiteSchema>;