164 lines
4.1 KiB
TypeScript
164 lines
4.1 KiB
TypeScript
// Generated by @pikku/cli — do not edit by hand.
|
|
// Run `pikku db migrate` to refresh.
|
|
|
|
import { z } from 'zod'
|
|
|
|
export const AccountZ = z.object({
|
|
id: z.string(),
|
|
accountId: z.string(),
|
|
providerId: z.string(),
|
|
userId: z.string(),
|
|
accessToken: z.string().nullable(),
|
|
refreshToken: z.string().nullable(),
|
|
idToken: z.string().nullable(),
|
|
accessTokenExpiresAt: z.string().nullable(),
|
|
refreshTokenExpiresAt: z.string().nullable(),
|
|
scope: z.string().nullable(),
|
|
password: z.string().nullable(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
})
|
|
|
|
export const AccountInsertZ = z.object({
|
|
id: z.string(),
|
|
accountId: z.string(),
|
|
providerId: z.string(),
|
|
userId: z.string(),
|
|
accessToken: z.string().nullable(),
|
|
refreshToken: z.string().nullable(),
|
|
idToken: z.string().nullable(),
|
|
accessTokenExpiresAt: z.string().nullable(),
|
|
refreshTokenExpiresAt: z.string().nullable(),
|
|
scope: z.string().nullable(),
|
|
password: z.string().nullable(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
})
|
|
|
|
export const AccountPatchZ = AccountZ.partial()
|
|
|
|
export const AuditZ = z.object({
|
|
auditId: z.string(),
|
|
occurredAt: z.string(),
|
|
type: z.string(),
|
|
source: z.string(),
|
|
outcome: z.string().nullable(),
|
|
functionId: z.string().nullable(),
|
|
wireType: z.string().nullable(),
|
|
traceId: z.string().nullable(),
|
|
transactionId: z.string().nullable(),
|
|
queryId: z.string().nullable(),
|
|
actorUserId: z.string().nullable(),
|
|
actorOrgId: z.string().nullable(),
|
|
tables: z.string().nullable(),
|
|
changedCols: z.string().nullable(),
|
|
event: z.string().nullable(),
|
|
old: z.string().nullable(),
|
|
data: z.string().nullable(),
|
|
})
|
|
|
|
export const AuditInsertZ = z.object({
|
|
auditId: z.string().optional(),
|
|
occurredAt: z.string().optional(),
|
|
type: z.string(),
|
|
source: z.string().optional(),
|
|
outcome: z.string().nullable(),
|
|
functionId: z.string().nullable(),
|
|
wireType: z.string().nullable(),
|
|
traceId: z.string().nullable(),
|
|
transactionId: z.string().nullable(),
|
|
queryId: z.string().nullable(),
|
|
actorUserId: z.string().nullable(),
|
|
actorOrgId: z.string().nullable(),
|
|
tables: z.string().nullable(),
|
|
changedCols: z.string().nullable(),
|
|
event: z.string().nullable(),
|
|
old: z.string().nullable(),
|
|
data: z.string().nullable(),
|
|
})
|
|
|
|
export const AuditPatchZ = AuditZ.partial()
|
|
|
|
export const MessageStateZ = z.object({
|
|
id: z.number(),
|
|
message: z.string(),
|
|
updatedAt: z.string(),
|
|
updatedByUserId: z.string().nullable(),
|
|
})
|
|
|
|
export const MessageStateInsertZ = z.object({
|
|
id: z.number().optional(),
|
|
message: z.string(),
|
|
updatedAt: z.string().optional(),
|
|
updatedByUserId: z.string().nullable(),
|
|
})
|
|
|
|
export const MessageStatePatchZ = MessageStateZ.partial()
|
|
|
|
export const SessionZ = z.object({
|
|
id: z.string(),
|
|
expiresAt: z.string(),
|
|
token: z.string(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
ipAddress: z.string().nullable(),
|
|
userAgent: z.string().nullable(),
|
|
userId: z.string(),
|
|
})
|
|
|
|
export const SessionInsertZ = z.object({
|
|
id: z.string(),
|
|
expiresAt: z.string(),
|
|
token: z.string(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
ipAddress: z.string().nullable(),
|
|
userAgent: z.string().nullable(),
|
|
userId: z.string(),
|
|
})
|
|
|
|
export const SessionPatchZ = SessionZ.partial()
|
|
|
|
export const UserZ = z.object({
|
|
id: z.string(),
|
|
name: z.string(),
|
|
email: z.string(),
|
|
emailVerified: z.number(),
|
|
image: z.string().nullable(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
})
|
|
|
|
export const UserInsertZ = z.object({
|
|
id: z.string(),
|
|
name: z.string(),
|
|
email: z.string(),
|
|
emailVerified: z.number(),
|
|
image: z.string().nullable(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
})
|
|
|
|
export const UserPatchZ = UserZ.partial()
|
|
|
|
export const VerificationZ = z.object({
|
|
id: z.string(),
|
|
identifier: z.string(),
|
|
value: z.string(),
|
|
expiresAt: z.string(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
})
|
|
|
|
export const VerificationInsertZ = z.object({
|
|
id: z.string(),
|
|
identifier: z.string(),
|
|
value: z.string(),
|
|
expiresAt: z.string(),
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
})
|
|
|
|
export const VerificationPatchZ = VerificationZ.partial()
|
|
|