@a0dev/types
Version:
Shared TypeScript types for A0 projects
64 lines • 2.08 kB
TypeScript
import { z } from "zod-v4";
/**
* Array of supported config files
*/
export declare const CONFIG_FILES: readonly ["build.yaml"];
/**
* Array of config files that automatically promote to both dev and prod environments
* When these files are updated, they are saved to both dev and prod simultaneously
*/
export declare const AUTO_PROMOTE_FILES: readonly ["build.yaml"];
/**
* Supported config file names
*/
export type ConfigFileName = (typeof CONFIG_FILES)[number];
/**
* Represents a single configuration file
*/
export interface ConfigFile {
fileName: string;
content: string;
}
/**
* Environment types for config files
*/
export type ConfigEnvironment = "dev" | "prod";
/**
* Record mapping config file names to their YAML string contents
*/
export type ConfigFilesRecord = Record<ConfigFileName, string>;
/**
* Zod schema for build.yaml configuration
*/
export declare const BuildYamlSchema: z.ZodObject<{
general: z.ZodObject<{
disableTracking: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
ios: z.ZodObject<{
versionName: z.ZodDefault<z.ZodString>;
supportsTablet: z.ZodDefault<z.ZodBoolean>;
infoPlist: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
android: z.ZodObject<{
versionName: z.ZodDefault<z.ZodString>;
packageName: z.ZodOptional<z.ZodString>;
versionCode: z.ZodDefault<z.ZodNumber>;
addedPermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
removedPermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
}, z.core.$strip>;
/**
* TypeScript type inferred from BuildYamlSchema
*/
export type BuildYamlConfig = z.infer<typeof BuildYamlSchema>;
/**
* Type for parsed config data that maps file names to their typed configurations
*/
export interface ParsedConfigData {
"build.yaml": BuildYamlConfig | Record<string, never>;
}
/**
* Alias for ParsedConfigData - represents fully parsed project configuration
*/
export type ProjectConfigData = ParsedConfigData;
//# sourceMappingURL=config.d.ts.map