seam_event: ZodDiscriminatedUnion<
"event_type",
[
ZodObject<
{
created_at: ZodString;
event_id: ZodString;
occurred_at: ZodString;
workspace_id: ZodString;
} & {
access_code_id: ZodString;
connected_account_custom_metadata: ZodOptional<
ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean]>>,
>;
connected_account_id: ZodString;
device_custom_metadata: ZodOptional<
ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean]>>,
>;
device_id: ZodString;
} & { event_type: ZodLiteral<"access_code.created"> },
"strip",
ZodTypeAny,
{
access_code_id: string;
connected_account_custom_metadata?: Record<string, string | boolean>;
connected_account_id: string;
created_at: string;
device_custom_metadata?: Record<string, string | boolean>;
device_id: string;
event_id: string;
event_type: "access_code.created";
occurred_at: string;
workspace_id: string;
},
{
access_code_id: string;
connected_account_custom_metadata?: Record<string, string | boolean>;
connected_account_id: string;
created_at: string;
device_custom_metadata?: Record<string, string | boolean>;
device_id: string;
event_id: string;
event_type: "access_code.created";
occurred_at: string;
workspace_id: string;
},
>,
ZodObject<
{
created_at: ZodString;
event_id: ZodString;
occurred_at: ZodString;
workspace_id: ZodString;
} & {
access_code_id: ZodString;
connected_account_custom_metadata: ZodOptional<
ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean]>>,
>;
connected_account_id: ZodString;
device_custom_metadata: ZodOptional<
ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean]>>,
>;
device_id: ZodString;
} & {
change_reason: ZodOptional<ZodString>;
changed_properties: ZodOptional<
ZodArray<
ZodObject<
{
from: ZodNullable<ZodString>;
property: ZodString;
to: ZodNullable<ZodString>;
},
"strip",
ZodTypeAny,
{ from: string
| null; property: string; to: string | null },
{ from: string | null; property: string; to: string | null },
>,
"many",
>,
>;
event_type: ZodLiteral<"access_code.changed">;
},
"strip",
ZodTypeAny,
{
access_code_id: string;
change_reason?: string;
changed_properties?: {
from: string
| null;
property: string;
to: string | null;
}[];
connected_account_custom_metadata?: Record<string, string | boolean>;
connected_account_id: string;
created_at: string;
device_custom_metadata?: Record<string, string | boolean>;
device_id: string;
event_id: string;
event_type: "access_code.changed";
occurred_at: string;
workspace_id: string;
},
{
access_code_id: string;
change_reason?: string;
changed_properties?: {
from: string
| null;
property: string;
to: string | null;
}[];
connected_account_custom_metadata?: Record<string, string | boolean>;
connected_account_id: string;
created_at: string;
device_custom_metadata?: Record<string, string | boolean>;
device_id: string;
event_id: string;
event_type: "access_code.changed";
occurred_at: string;
workspace_id: string;
},
>,
ZodObject<
{
created_at: ZodString;
event_id: ZodString;
occurred_at: ZodString;
workspace_id: ZodString;
} & {
access_code_id: ZodString;
connected_account_custom_metadata: ZodOptional<
ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean]>>,
>;
connected_account_id: ZodString;
device_custom_metadata: ZodOptional<
ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean]>>,
>;
device_id: ZodString;
} & {
code: ZodString;
event_type: ZodLiteral<"access_code.scheduled_on_device">;
},
"strip",
ZodTypeAny,
{
access_code_id: string;
code: string;
connected_account_custom_metadata?: Record<string, string | boolean>;
connected_account_id: string;
created_at: string;
device_custom_metadata?: Record<string, string | boolean>;
device_id: string;
event_id: string;
event_type: "access_code.scheduled_on_device";
occurred_at: string;
workspace_id: string;
},
{
access_code_id: string;
code: string;
connected_account_custom_metadata?: Record<string, string | boolean>;
connected_account_id: string;
created_at: string;
device_custom_metadata?: Record<string, string | boolean>;
device_id: string;
event_id: string;
event_type: "access_code.scheduled_on_device";
occurred_at: string;
workspace_id: string;
},
>,
],
> = ...