db: export ALL the types
vi did:web:vt3e.cat
Tue, 23 Jun 2026 20:24:10 +0100
4 files changed,
20 insertions(+),
1 deletions(-)
M
pkgs/db/src/schemas/actors.ts
→
pkgs/db/src/schemas/actors.ts
@@ -29,3 +29,6 @@ deletedAt: s.integer("deleted_at", { mode: "timestamp" }),
}, (table) => [s.uniqueIndex("actors_guild_user_idx").on(table.guildId, table.userId)], ); + +export type Actor = typeof actors.$inferSelect; +export type NewActor = typeof actors.$inferInsert;
M
pkgs/db/src/schemas/guilds.ts
→
pkgs/db/src/schemas/guilds.ts
@@ -17,3 +17,6 @@
createdAt: s.integer("created_at", { mode: "timestamp" }).notNull(), updatedAt: s.integer("updated_at", { mode: "timestamp" }).notNull(), }); + +export type Guild = typeof guilds.$inferSelect; +export type NewGuild = typeof guilds.$inferInsert;
M
pkgs/db/src/schemas/tickets.ts
→
pkgs/db/src/schemas/tickets.ts
@@ -130,6 +130,13 @@ ],
); export type Ticket = typeof tickets.$inferSelect; +export type NewTicket = typeof tickets.$inferInsert; + export type TicketParticipant = typeof ticketParticipants.$inferSelect; +export type NewTicketParticipant = typeof ticketParticipants.$inferInsert; + +export type TicketMessage = typeof ticketMessages.$inferSelect; +export type NewTicketMessage = typeof ticketMessages.$inferInsert; + export type TicketAttachment = typeof ticketAttachments.$inferSelect; -export type TicketAttachmentInsert = typeof ticketAttachments.$inferInsert; +export type NewTicketAttachment = typeof ticketAttachments.$inferInsert;
M
pkgs/db/src/schemas/users.ts
→
pkgs/db/src/schemas/users.ts
@@ -27,3 +27,9 @@
expiresAt: s.integer("expires_at", { mode: "timestamp" }).notNull(), createdAt: s.integer("created_at", { mode: "timestamp" }).notNull(), }); + +export type User = typeof users.$inferSelect; +export type NewUser = typeof users.$inferInsert; + +export type Session = typeof sessions.$inferSelect; +export type NewSession = typeof sessions.$inferInsert;