@inworld/web-core
Version:
173 lines (172 loc) • 6.02 kB
TypeScript
import * as z from "zod";
export declare const TypeEnumSchema: z.ZodEnum<["ADD", "REMOVE", "REPLACE", "UNSPECIFIED"]>;
export type TypeEnum = z.infer<typeof TypeEnumSchema>;
export declare const EntityItemSchema: z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
display_name: z.ZodOptional<z.ZodString>;
id: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}, {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}>;
export type EntityItem = z.infer<typeof EntityItemSchema>;
export declare const ItemsInEntitiesSchema: z.ZodObject<{
entity_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
item_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["ADD", "REMOVE", "REPLACE", "UNSPECIFIED"]>, z.ZodNumber]>>;
}, "strip", z.ZodTypeAny, {
type?: number | "UNSPECIFIED" | "ADD" | "REMOVE" | "REPLACE";
entity_names?: string[];
item_ids?: string[];
}, {
type?: number | "UNSPECIFIED" | "ADD" | "REMOVE" | "REPLACE";
entity_names?: string[];
item_ids?: string[];
}>;
export type ItemsInEntities = z.infer<typeof ItemsInEntitiesSchema>;
export declare const RemoveItemsSchema: z.ZodObject<{
item_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
item_ids?: string[];
}, {
item_ids?: string[];
}>;
export type RemoveItems = z.infer<typeof RemoveItemsSchema>;
export declare const CreateOrUpdateItemsSchema: z.ZodObject<{
add_to_entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
display_name: z.ZodOptional<z.ZodString>;
id: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}, {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
add_to_entities?: string[];
items?: {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}[];
}, {
add_to_entities?: string[];
items?: {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}[];
}>;
export type CreateOrUpdateItems = z.infer<typeof CreateOrUpdateItemsSchema>;
export declare const ItemsOperationEventSchema: z.ZodObject<{
create_or_update_items: z.ZodOptional<z.ZodObject<{
add_to_entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
display_name: z.ZodOptional<z.ZodString>;
id: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}, {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
add_to_entities?: string[];
items?: {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}[];
}, {
add_to_entities?: string[];
items?: {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}[];
}>>;
items_in_entities: z.ZodOptional<z.ZodObject<{
entity_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
item_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["ADD", "REMOVE", "REPLACE", "UNSPECIFIED"]>, z.ZodNumber]>>;
}, "strip", z.ZodTypeAny, {
type?: number | "UNSPECIFIED" | "ADD" | "REMOVE" | "REPLACE";
entity_names?: string[];
item_ids?: string[];
}, {
type?: number | "UNSPECIFIED" | "ADD" | "REMOVE" | "REPLACE";
entity_names?: string[];
item_ids?: string[];
}>>;
remove_items: z.ZodOptional<z.ZodObject<{
item_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
item_ids?: string[];
}, {
item_ids?: string[];
}>>;
}, "strip", z.ZodTypeAny, {
create_or_update_items?: {
add_to_entities?: string[];
items?: {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}[];
};
items_in_entities?: {
type?: number | "UNSPECIFIED" | "ADD" | "REMOVE" | "REPLACE";
entity_names?: string[];
item_ids?: string[];
};
remove_items?: {
item_ids?: string[];
};
}, {
create_or_update_items?: {
add_to_entities?: string[];
items?: {
id?: string;
description?: string;
properties?: Record<string, string>;
display_name?: string;
}[];
};
items_in_entities?: {
type?: number | "UNSPECIFIED" | "ADD" | "REMOVE" | "REPLACE";
entity_names?: string[];
item_ids?: string[];
};
remove_items?: {
item_ids?: string[];
};
}>;
export type ItemsOperationEvent = z.infer<typeof ItemsOperationEventSchema>;