Variable messageSchemaConst
messageSchema: ZodObject<
{
acl: ZodOptional<
ZodNullable<
ZodObject<
{
add: ZodOptional<
ZodArray<
ZodObject<
{
actions: ZodArray<(...), (...)>;
principal: ZodOptional<(...)>;
principal_type: ZodString;
},
"strip",
ZodTypeAny,
{
actions: (...)[];
principal?: (...) | (...);
principal_type: string;
},
{
actions: (...)[];
principal?: (...) | (...);
principal_type: string;
},
>,
"many",
>,
>;
grants: ZodOptional<
ZodArray<
ZodObject<
{
actions: ZodArray<(...), (...)>;
principal: ZodOptional<(...)>;
principal_type: ZodString;
},
"strip",
ZodTypeAny,
{
actions: (...)[];
principal?: (...) | (...);
principal_type: string;
},
{
actions: (...)[];
principal?: (...) | (...);
principal_type: string;
},
>,
"many",
>,
>;
remove: ZodOptional<
ZodArray<
ZodObject<
{ principal: ZodOptional<(...)>; principal_type: ZodString },
"strip",
ZodTypeAny,
{ principal?: (...) | (...); principal_type: string },
{ principal?: (...) | (...); principal_type: string },
>,
"many",
>,
>;
},
"strip",
ZodTypeAny,
{
add?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
grants?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
remove?: { principal?: string; principal_type: string }[];
},
{
add?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
grants?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
remove?: { principal?: string; principal_type: string }[];
},
>,
>,
>;
actors: ZodOptional<
ZodArray<
ZodObject<
{
alias: ZodOptional<ZodNullable<ZodString>>;
id: ZodOptional<ZodNullable<ZodString>>;
name: ZodOptional<ZodNullable<ZodString>>;
profile_picture: ZodOptional<
ZodNullable<
ZodObject<
{
file: ZodOptional<(...)>;
height: ZodOptional<(...)>;
media: ZodOptional<(...)>;
mime_type: ZodOptional<(...)>;
refresh_url: ZodOptional<(...)>;
url: ZodOptional<(...)>;
width: ZodOptional<(...)>;
},
"strip",
ZodTypeAny,
{
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
},
{
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
},
>,
>,
>;
},
"strip",
ZodTypeAny,
{
alias?: string
| null;
id?: string | null;
name?: string | null;
profile_picture?:
| {
file?: string
| null;
height?: number | null;
media?: string | null;
mime_type?: string | null;
refresh_url?: string | null;
url?: string | null;
width?: number | null;
}
| null;
},
{
alias?: string
| null;
id?: string | null;
name?: string | null;
profile_picture?:
| {
file?: string
| null;
height?: number | null;
media?: string | null;
mime_type?: string | null;
refresh_url?: string | null;
url?: string | null;
width?: number | null;
}
| null;
},
>,
"many",
>,
>;
agent: ZodOptional<ZodNullable<ZodString>>;
agent_mode: ZodOptional<ZodNullable<ZodEnum<["cli", "embedded"]>>>;
attachments: ZodOptional<
ZodArray<
ZodObject<
{
content_type: ZodOptional<ZodNullable<ZodString>>;
description: ZodOptional<ZodNullable<ZodString>>;
filename: ZodOptional<ZodNullable<ZodString>>;
height: ZodOptional<ZodNullable<ZodNumber>>;
id: ZodString;
image_height: ZodOptional<ZodNullable<ZodNumber>>;
image_source: ZodOptional<
ZodNullable<
ZodObject<
{
file: ZodOptional<(...)>;
height: ZodOptional<(...)>;
media: ZodOptional<(...)>;
mime_type: ZodOptional<(...)>;
refresh_url: ZodOptional<(...)>;
url: ZodOptional<(...)>;
width: ZodOptional<(...)>;
},
"strip",
ZodTypeAny,
{
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
},
{
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
},
>,
>,
>;
image_url: ZodOptional<ZodNullable<ZodString>>;
image_width: ZodOptional<ZodNullable<ZodNumber>>;
media_type: ZodOptional<ZodString>;
name: ZodOptional<ZodNullable<ZodString>>;
object: ZodOptional<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
>;
title: ZodOptional<ZodNullable<ZodString>>;
type: ZodString;
url: ZodOptional<ZodNullable<ZodString>>;
variants: ZodOptional<
ZodArray<
ZodObject<
{
content_type: ZodOptional<(...)>;
created_at: ZodOptional<(...)>;
file: ZodOptional<(...)>;
filename: ZodOptional<(...)>;
height: ZodOptional<(...)>;
id: ZodString;
image_source: ZodOptional<(...)>;
updated_at: ZodOptional<(...)>;
url: ZodOptional<(...)>;
variant_key: ZodOptional<(...)>;
width: ZodOptional<(...)>;
},
"strip",
ZodTypeAny,
{
content_type?: (...)
| (...)
| (...);
created_at?: (...) | (...);
file?: (...) | (...);
filename?: (...) | (...) | (...);
height?: (...) | (...) | (...);
id: string;
image_source?: (...) | (...) | (...);
updated_at?: (...) | (...);
url?: (...) | (...) | (...);
variant_key?: (...) | (...);
width?: (...) | (...) | (...);
},
{
content_type?: (...)
| (...)
| (...);
created_at?: (...) | (...);
file?: (...) | (...);
filename?: (...) | (...) | (...);
height?: (...) | (...) | (...);
id: string;
image_source?: (...) | (...) | (...);
updated_at?: (...) | (...);
url?: (...) | (...) | (...);
variant_key?: (...) | (...);
width?: (...) | (...) | (...);
},
>,
"many",
>,
>;
version: ZodOptional<ZodNullable<ZodNumber>>;
width: ZodOptional<ZodNullable<ZodNumber>>;
},
"strip",
ZodTypeAny,
{
content_type?: string
| null;
description?: string | null;
filename?: string | null;
height?: number | null;
id: string;
image_height?: number | null;
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;
}
| null;
image_url?: string
| null;
image_width?: number | null;
media_type?: string;
name?: string | null;
object?: Record<string, {} | null>;
title?: string | null;
type: string;
url?: string | null;
variants?: {
content_type?: string | null;
created_at?: string;
file?: string;
filename?: string | null;
height?: number | null;
id: string;
image_source?:
| {
file?: ...;
height?: ...;
media?: ...;
mime_type?: ...;
refresh_url?: ...;
url?: ...;
width?: ...;
}
| null;
updated_at?: string;
url?: string
| null;
variant_key?: string;
width?: number | null;
}[];
version?: number
| null;
width?: number | null;
},
{
content_type?: string
| null;
description?: string | null;
filename?: string | null;
height?: number | null;
id: string;
image_height?: number | null;
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;
}
| null;
image_url?: string
| null;
image_width?: number | null;
media_type?: string;
name?: string | null;
object?: Record<string, {} | null>;
title?: string | null;
type: string;
url?: string | null;
variants?: {
content_type?: string | null;
created_at?: string;
file?: string;
filename?: string | null;
height?: number | null;
id: string;
image_source?:
| {
file?: ...;
height?: ...;
media?: ...;
mime_type?: ...;
refresh_url?: ...;
url?: ...;
width?: ...;
}
| null;
updated_at?: string;
url?: string
| null;
variant_key?: string;
width?: number | null;
}[];
version?: number
| null;
width?: number | null;
},
>,
"many",
>,
>;
branched_thread: ZodOptional<ZodNullable<ZodString>>;
content: ZodOptional<ZodNullable<ZodString>>;
context: ZodOptional<
ZodArray<
ZodObject<
{
attributes: ZodOptional<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
>;
content: ZodOptional<ZodNullable<ZodString>>;
title: ZodOptional<ZodNullable<ZodString>>;
type: ZodString;
},
"strip",
ZodTypeAny,
{
attributes?: Record<string, {} | null>;
content?: string | null;
title?: string | null;
type: string;
},
{
attributes?: Record<string, {} | null>;
content?: string | null;
title?: string | null;
type: string;
},
>,
"many",
>,
>;
created_at: ZodOptional<ZodString>;
has_replies: ZodOptional<ZodBoolean>;
id: ZodString;
idempotency_key: ZodOptional<ZodNullable<ZodString>>;
is_deleted: ZodOptional<ZodBoolean>;
legacy_agent: ZodOptional<ZodNullable<ZodString>>;
metadata: ZodOptional<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
>;
org: ZodOptional<ZodNullable<ZodString>>;
reactions: ZodOptional<
ZodArray<
ZodObject<
{
payload: ZodOptional<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
>;
type: ZodString;
user: ZodOptional<ZodString>;
},
"strip",
ZodTypeAny,
{ payload?: Record<string, {} | null>; type: string; user?: string },
{ payload?: Record<string, {} | null>; type: string; user?: string },
>,
"many",
>,
>;
rendering_mode: ZodOptional<ZodNullable<ZodString>>;
replies: ZodOptional<
ZodArray<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
"many",
>,
>;
replies_after_cursor: ZodOptional<ZodNullable<ZodString>>;
replies_before_cursor: ZodOptional<ZodNullable<ZodString>>;
reply_count: ZodOptional<ZodNumber>;
reply_to: ZodOptional<
ZodNullable<
ZodRecord<ZodString, ZodType<{} | null, ZodTypeDef, {} | null>>,
>,
>;
root_message_id: ZodOptional<ZodNullable<ZodString>>;
sandbox: ZodOptional<ZodNullable<ZodString>>;
team: ZodOptional<ZodNullable<ZodString>>;
thread: ZodOptional<ZodString>;
type: ZodOptional<ZodNullable<ZodString>>;
user: ZodOptional<
ZodNullable<
ZodUnion<
[
ZodString,
ZodObject<
{
alias: ZodOptional<ZodNullable<ZodString>>;
app: ZodOptional<ZodNullable<ZodString>>;
app_name: ZodOptional<ZodNullable<ZodString>>;
created_by_agent_user: ZodOptional<ZodNullable<ZodString>>;
created_by_developer: ZodOptional<ZodNullable<ZodString>>;
created_by_org: ZodOptional<ZodNullable<ZodString>>;
created_by_team: ZodOptional<ZodNullable<ZodString>>;
created_by_user: ZodOptional<ZodNullable<ZodString>>;
email: ZodOptional<ZodNullable<ZodString>>;
id: ZodString;
is_system_user: ZodOptional<ZodBoolean>;
metadata: ZodOptional<
ZodRecord<ZodString, ZodType<(...), (...), (...)>>,
>;
name: ZodOptional<ZodNullable<ZodString>>;
org: ZodOptional<ZodNullable<ZodString>>;
org_name: ZodOptional<ZodNullable<ZodString>>;
org_role: ZodOptional<ZodNullable<ZodString>>;
org_slug: ZodOptional<ZodNullable<ZodString>>;
sandbox: ZodOptional<ZodNullable<ZodString>>;
sandbox_name: ZodOptional<ZodNullable<ZodString>>;
},
"strip",
ZodTypeAny,
{
alias?: string
| null;
app?: string | null;
app_name?: string | null;
created_by_agent_user?: string | null;
created_by_developer?: string | null;
created_by_org?: string | null;
created_by_team?: string | null;
created_by_user?: string | null;
email?: string | null;
id: string;
is_system_user?: boolean;
metadata?: Record<string, (...) | (...)>;
name?: string | null;
org?: string | null;
org_name?: string | null;
org_role?: string | null;
org_slug?: string | null;
sandbox?: string | null;
sandbox_name?: string | null;
},
{
alias?: string
| null;
app?: string | null;
app_name?: string | null;
created_by_agent_user?: string | null;
created_by_developer?: string | null;
created_by_org?: string | null;
created_by_team?: string | null;
created_by_user?: string | null;
email?: string | null;
id: string;
is_system_user?: boolean;
metadata?: Record<string, (...) | (...)>;
name?: string | null;
org?: string | null;
org_name?: string | null;
org_role?: string | null;
org_slug?: string | null;
sandbox?: string | null;
sandbox_name?: string | null;
},
>,
],
>,
>,
>;
visibility: ZodOptional<ZodEnum<["default", "private"]>>;
},
"strip",
ZodTypeAny,
{
acl?: | {
add?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
grants?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
remove?: { principal?: string; principal_type: string }[];
}
| null;
actors?: {
alias?: string
| null;
id?: string | null;
name?: string | null;
profile_picture?:
| {
file?: string
| null;
height?: number | null;
media?: string | null;
mime_type?: string | null;
refresh_url?: string | null;
url?: string | null;
width?: number | null;
}
| null;
}[];
agent?: string
| null;
agent_mode?: "cli" | "embedded" | null;
attachments?: {
content_type?: string | null;
description?: string | null;
filename?: string | null;
height?: number | null;
id: string;
image_height?: number | null;
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;
}
| null;
image_url?: string
| null;
image_width?: number | null;
media_type?: string;
name?: string | null;
object?: Record<string, {} | null>;
title?: string | null;
type: string;
url?: string | null;
variants?: {
content_type?: string | null;
created_at?: string;
file?: string;
filename?: string | null;
height?: number | null;
id: string;
image_source?:
| {
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
}
| null;
updated_at?: string;
url?: string
| null;
variant_key?: string;
width?: number | null;
}[];
version?: number
| null;
width?: number | null;
}[];
branched_thread?: string
| null;
content?: string | null;
context?: {
attributes?: Record<string, {} | null>;
content?: string | null;
title?: string | null;
type: string;
}[];
created_at?: string;
has_replies?: boolean;
id: string;
idempotency_key?: string
| null;
is_deleted?: boolean;
legacy_agent?: string | null;
metadata?: Record<string, {} | null>;
org?: string | null;
reactions?: {
payload?: Record<string, {} | null>;
type: string;
user?: string;
}[];
rendering_mode?: string
| null;
replies?: Record<string, {} | null>[];
replies_after_cursor?: string | null;
replies_before_cursor?: string | null;
reply_count?: number;
reply_to?: Record<string, {} | null> | null;
root_message_id?: string | null;
sandbox?: string | null;
team?: string | null;
thread?: string;
type?: string | null;
user?:
| string
| {
alias?: string
| null;
app?: string | null;
app_name?: string | null;
created_by_agent_user?: string | null;
created_by_developer?: string | null;
created_by_org?: string | null;
created_by_team?: string | null;
created_by_user?: string | null;
email?: string | null;
id: string;
is_system_user?: boolean;
metadata?: Record<string, {} | null>;
name?: string | null;
org?: string | null;
org_name?: string | null;
org_role?: string | null;
org_slug?: string | null;
sandbox?: string | null;
sandbox_name?: string | null;
}
| null;
visibility?: "default"
| "private";
},
{
acl?: | {
add?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
grants?: {
actions: string[];
principal?: string;
principal_type: string;
}[];
remove?: { principal?: string; principal_type: string }[];
}
| null;
actors?: {
alias?: string
| null;
id?: string | null;
name?: string | null;
profile_picture?:
| {
file?: string
| null;
height?: number | null;
media?: string | null;
mime_type?: string | null;
refresh_url?: string | null;
url?: string | null;
width?: number | null;
}
| null;
}[];
agent?: string
| null;
agent_mode?: "cli" | "embedded" | null;
attachments?: {
content_type?: string | null;
description?: string | null;
filename?: string | null;
height?: number | null;
id: string;
image_height?: number | null;
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;
}
| null;
image_url?: string
| null;
image_width?: number | null;
media_type?: string;
name?: string | null;
object?: Record<string, {} | null>;
title?: string | null;
type: string;
url?: string | null;
variants?: {
content_type?: string | null;
created_at?: string;
file?: string;
filename?: string | null;
height?: number | null;
id: string;
image_source?:
| {
file?: (...)
| (...)
| (...);
height?: (...) | (...) | (...);
media?: (...) | (...) | (...);
mime_type?: (...) | (...) | (...);
refresh_url?: (...) | (...) | (...);
url?: (...) | (...) | (...);
width?: (...) | (...) | (...);
}
| null;
updated_at?: string;
url?: string
| null;
variant_key?: string;
width?: number | null;
}[];
version?: number
| null;
width?: number | null;
}[];
branched_thread?: string
| null;
content?: string | null;
context?: {
attributes?: Record<string, {} | null>;
content?: string | null;
title?: string | null;
type: string;
}[];
created_at?: string;
has_replies?: boolean;
id: string;
idempotency_key?: string
| null;
is_deleted?: boolean;
legacy_agent?: string | null;
metadata?: Record<string, {} | null>;
org?: string | null;
reactions?: {
payload?: Record<string, {} | null>;
type: string;
user?: string;
}[];
rendering_mode?: string
| null;
replies?: Record<string, {} | null>[];
replies_after_cursor?: string | null;
replies_before_cursor?: string | null;
reply_count?: number;
reply_to?: Record<string, {} | null> | null;
root_message_id?: string | null;
sandbox?: string | null;
team?: string | null;
thread?: string;
type?: string | null;
user?:
| string
| {
alias?: string
| null;
app?: string | null;
app_name?: string | null;
created_by_agent_user?: string | null;
created_by_developer?: string | null;
created_by_org?: string | null;
created_by_team?: string | null;
created_by_user?: string | null;
email?: string | null;
id: string;
is_system_user?: boolean;
metadata?: Record<string, {} | null>;
name?: string | null;
org?: string | null;
org_name?: string | null;
org_role?: string | null;
org_slug?: string | null;
sandbox?: string | null;
sandbox_name?: string | null;
}
| null;
visibility?: "default"
| "private";
},
> = ...
Runtime validator for Message.