Variable extractionSchemaConst
extractionSchema: ZodObject<
{
agent: ZodOptional<ZodString>;
byte_count: ZodOptional<ZodNumber>;
created_at: ZodOptional<ZodString>;
destination: ZodOptional<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
>;
failure_reason: ZodOptional<
ZodEnum<
[
"fetch_failed",
"unsupported_content",
"extraction_failed",
"timeout",
"internal_error",
],
>,
>;
file: ZodOptional<ZodString>;
id: ZodString;
kind: ZodOptional<ZodEnum<["document", "link", "site"]>>;
org: ZodOptional<ZodString>;
output_count: ZodOptional<ZodNumber>;
outputs: ZodOptional<
ZodArray<
ZodObject<
{
created_at: ZodOptional<ZodString>;
file: ZodOptional<
ZodObject<
{
app: ZodOptional<ZodString>;
content_type: ZodOptional<ZodString>;
created_at: ZodOptional<ZodString>;
filename: ZodOptional<ZodString>;
id: ZodString;
image_source: ZodOptional<
ZodObject<(...), (...), (...), (...), (...)>,
>;
org: ZodOptional<ZodString>;
sandbox: ZodOptional<ZodString>;
share_url: ZodOptional<ZodString>;
size: ZodOptional<ZodNumber>;
team: ZodOptional<ZodString>;
updated_at: ZodOptional<ZodString>;
url: ZodOptional<ZodString>;
user: ZodOptional<ZodString>;
},
"strip",
ZodTypeAny,
{
app?: string;
content_type?: string;
created_at?: string;
filename?: string;
id: string;
image_source?: {
file?: ...;
height?: ...;
media?: ...;
mime_type?: ...;
refresh_url?: ...;
url?: ...;
width?: ...;
};
org?: string;
sandbox?: string;
share_url?: string;
size?: number;
team?: string;
updated_at?: string;
url?: string;
user?: string;
},
{
app?: string;
content_type?: string;
created_at?: string;
filename?: string;
id: string;
image_source?: {
file?: ...;
height?: ...;
media?: ...;
mime_type?: ...;
refresh_url?: ...;
url?: ...;
width?: ...;
};
org?: string;
sandbox?: string;
share_url?: string;
size?: number;
team?: string;
updated_at?: string;
url?: string;
user?: string;
},
>,
>;
id: ZodString;
ordinal: ZodOptional<ZodNumber>;
source_url: ZodOptional<ZodString>;
state: ZodOptional<ZodEnum<["done", "failed"]>>;
},
"strip",
ZodTypeAny,
{
created_at?: string;
file?: {
app?: string;
content_type?: string;
created_at?: string;
filename?: string;
id: string;
image_source?: {
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
};
org?: string;
sandbox?: string;
share_url?: string;
size?: number;
team?: string;
updated_at?: string;
url?: string;
user?: string;
};
id: string;
ordinal?: number;
source_url?: string;
state?: "done"
| "failed";
},
{
created_at?: string;
file?: {
app?: string;
content_type?: string;
created_at?: string;
filename?: string;
id: string;
image_source?: {
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
};
org?: string;
sandbox?: string;
share_url?: string;
size?: number;
team?: string;
updated_at?: string;
url?: string;
user?: string;
};
id: string;
ordinal?: number;
source_url?: string;
state?: "done"
| "failed";
},
>,
"many",
>,
>;
state: ZodOptional<ZodEnum<["pending", "running", "done", "failed"]>>;
updated_at: ZodOptional<ZodString>;
url: ZodOptional<ZodString>;
},
"strip",
ZodTypeAny,
{
agent?: string;
byte_count?: number;
created_at?: string;
destination?: Record<string, {} | null>;
failure_reason?:
| "fetch_failed"
| "unsupported_content"
| "extraction_failed"
| "timeout"
| "internal_error";
file?: string;
id: string;
kind?: "document"
| "link"
| "site";
org?: string;
output_count?: number;
outputs?: {
created_at?: string;
file?: {
app?: string;
content_type?: string;
created_at?: string;
filename?: string;
id: string;
image_source?: {
file?: string | null;
height?: number | null;
media?: string | null;
mime_type?: string | null;
refresh_url?: string | null;
url?: string | null;
width?: number | null;
};
org?: string;
sandbox?: string;
share_url?: string;
size?: number;
team?: string;
updated_at?: string;
url?: string;
user?: string;
};
id: string;
ordinal?: number;
source_url?: string;
state?: "done"
| "failed";
}[];
state?: "done"
| "pending"
| "failed"
| "running";
updated_at?: string;
url?: string;
},
{
agent?: string;
byte_count?: number;
created_at?: string;
destination?: Record<string, {} | null>;
failure_reason?:
| "fetch_failed"
| "unsupported_content"
| "extraction_failed"
| "timeout"
| "internal_error";
file?: string;
id: string;
kind?: "document"
| "link"
| "site";
org?: string;
output_count?: number;
outputs?: {
created_at?: string;
file?: {
app?: string;
content_type?: string;
created_at?: string;
filename?: string;
id: string;
image_source?: {
file?: string | null;
height?: number | null;
media?: string | null;
mime_type?: string | null;
refresh_url?: string | null;
url?: string | null;
width?: number | null;
};
org?: string;
sandbox?: string;
share_url?: string;
size?: number;
team?: string;
updated_at?: string;
url?: string;
user?: string;
};
id: string;
ordinal?: number;
source_url?: string;
state?: "done"
| "failed";
}[];
state?: "done"
| "pending"
| "failed"
| "running";
updated_at?: string;
url?: string;
},
> = ...
Runtime validator for Extraction.