import { EntityDef, DataAttrDef, InstantSchemaDef, type EntitiesDef, type AttrsDefs, type EntitiesWithLinks, type LinksDef, type RoomsDef, type UnknownRooms } from './schemaTypes.ts'; /** * @deprecated * `i.graph` is deprecated. Use `i.schema` instead. * * @example * // Before * i.graph(entities, links).withRoomSchema(); * * // After * i.schema({ entities, links, rooms }) * * @see * https://instantdb.com/docs/modeling-data */ declare function graph>(entities: EntitiesWithoutLinks, links: Links): InstantSchemaDef, LinksDef, UnknownRooms>; /** * Creates an entity definition, to be used in conjunction with `i.graph`. * * @see https://instantdb.com/docs/modeling-data * @example * { * posts: i.entity({ * title: i.string(), * body: i.string(), * }), * comments: i.entity({ * body: i.string(), * }) * } */ declare function entity(attrs: Attrs): EntityDef; declare function string(): DataAttrDef; declare function number(): DataAttrDef; declare function boolean(): DataAttrDef; declare function date(): DataAttrDef; declare function json(): DataAttrDef; declare function any(): DataAttrDef; /** * Lets you define a schema for your database. * * You can define entities, links between entities, and if you use * presence, you can define rooms. * * You can push this schema to your database with the CLI, * or use it inside `init`, to get typesafety and autocompletion. * * @see https://instantdb.com/docs/modeling-data * @example * i.schema({ * entities: { }, * links: { }, * rooms: { } * }); */ declare function schema, Rooms extends RoomsDef = {}>({ entities, links, rooms, }: { entities: EntitiesWithoutLinks; links?: Links; rooms?: Rooms; }): InstantSchemaDef, LinksDef, Rooms>; export declare const i: { graph: typeof graph; schema: typeof schema; entity: typeof entity; string: typeof string; number: typeof number; boolean: typeof boolean; date: typeof date; json: typeof json; any: typeof any; }; export {}; //# sourceMappingURL=schema.d.ts.map