appwrite-utils
Version: 
`appwrite-utils` is a comprehensive TypeScript library designed to streamline the development process for Appwrite projects. This library provides a suite of utilities and helper functions that facilitate data manipulation, schema management, YAML configu
41 lines (38 loc) • 934 B
text/typescript
import { z } from "zod";
/**
 * Function Specifications
 * 
 * s-0.5vcpu-512mb -- 0.5 vCPU, 512 MB RAM
 * 
 * s-1vcpu-512mb -- 1 vCPU, 512 MB RAM
 * 
 * s-1vcpu-1gb -- 1 vCPU, 1 GB RAM
 * 
 * s-2vcpu-2gb -- 2 vCPU, 2 GB RAM
 * 
 * s-2vcpu-4gb -- 2 vCPU, 4 GB RAM
 * 
 * s-4vcpu-4gb -- 4 vCPU, 4 GB RAM
 * 
 * s-4vcpu-8gb -- 4 vCPU, 8 GB RAM
 * 
 * s-8vcpu-4gb -- 8 vCPU, 4 GB RAM
 * 
 * s-8vcpu-8gb -- 8 vCPU, 8 GB RAM
 */
const functionSpecificationValues = [
  "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",
] as const;
export const FunctionSpecifications = z.string().refine(
  (val): val is typeof functionSpecificationValues[number] => functionSpecificationValues.includes(val as any),
  { message: "Invalid function specification" }
);
export type FunctionSpecification = typeof functionSpecificationValues[number];