///
import { z } from 'zod';
/**
* Type representing a file in Node environment
*/
declare const NodeFileSchema: z.ZodObject<{
buffer: z.ZodType;
name: z.ZodOptional;
type: z.ZodOptional;
}, "strip", z.ZodTypeAny, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}>;
export type NodeFile = z.infer;
declare const BrowserFileSchema: z.ZodType;
export type BrowserFile = z.infer;
declare const NativeFileSchema: z.ZodObject<{
uri: z.ZodString;
name: z.ZodNullable;
type: z.ZodNullable;
copyError: z.ZodOptional;
fileCopyUri: z.ZodNullable>;
size: z.ZodNullable>;
}, "strip", z.ZodTypeAny, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}>;
export type NativeFile = z.infer;
/**
* Type representing a file in Node and browser environments
*/
export declare const CrossPlatformFileSchema: z.ZodUnion<[z.ZodObject<{
buffer: z.ZodType;
name: z.ZodOptional;
type: z.ZodOptional;
}, "strip", z.ZodTypeAny, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}>, z.ZodType, z.ZodObject<{
uri: z.ZodString;
name: z.ZodNullable;
type: z.ZodNullable;
copyError: z.ZodOptional;
fileCopyUri: z.ZodNullable>;
size: z.ZodNullable>;
}, "strip", z.ZodTypeAny, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}>]>;
export type CrossPlatformFile = z.infer;
export declare const isNodeFile: (file: CrossPlatformFile) => file is {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
};
export declare const isNativeFile: (file: CrossPlatformFile) => file is {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
};
export declare const ALLOWED_IMAGE_MIME_TYPES: string[];
export declare const ALLOWED_AUDIO_MIME_TYPES_REGEX: RegExp;
export declare const ImageFile: z.ZodEffects;
name: z.ZodOptional;
type: z.ZodOptional;
}, "strip", z.ZodTypeAny, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}>, z.ZodType, z.ZodObject<{
uri: z.ZodString;
name: z.ZodNullable;
type: z.ZodNullable;
copyError: z.ZodOptional;
fileCopyUri: z.ZodNullable>;
size: z.ZodNullable>;
}, "strip", z.ZodTypeAny, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}>]>, File | {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
} | {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}, File | {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
} | {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}>;
export declare const AudioFile: z.ZodEffects;
name: z.ZodOptional;
type: z.ZodOptional;
}, "strip", z.ZodTypeAny, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}, {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
}>, z.ZodType, z.ZodObject<{
uri: z.ZodString;
name: z.ZodNullable;
type: z.ZodNullable;
copyError: z.ZodOptional;
fileCopyUri: z.ZodNullable>;
size: z.ZodNullable>;
}, "strip", z.ZodTypeAny, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}, {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}>]>, File | {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
} | {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}, File | {
buffer: Buffer;
name?: string | undefined;
type?: string | undefined;
} | {
name: string | null;
type: string | null;
uri: string;
copyError?: string | undefined;
fileCopyUri?: string | null | undefined;
size?: number | null | undefined;
}>;
export {};