feat(*): send images from website
This commit is contained in:
@@ -40,6 +40,63 @@ export default defineSchema({
|
||||
userId: v.id('users'),
|
||||
chatId: v.id('chats'),
|
||||
userMessage: v.string(),
|
||||
imagesBase64: v.optional(v.array(v.string())),
|
||||
imagesMediaTypes: v.optional(v.array(v.string())),
|
||||
createdAt: v.number()
|
||||
})
|
||||
}),
|
||||
|
||||
pendingGenerationImages: defineTable({
|
||||
pendingGenerationId: v.id('pendingGenerations'),
|
||||
base64: v.string(),
|
||||
mediaType: v.string(),
|
||||
order: v.number()
|
||||
}).index('by_pending_generation_id', ['pendingGenerationId']),
|
||||
|
||||
messageImages: defineTable({
|
||||
messageId: v.id('messages'),
|
||||
base64: v.string(),
|
||||
mediaType: v.string(),
|
||||
order: v.number()
|
||||
}).index('by_message_id', ['messageId']),
|
||||
|
||||
devicePairings: defineTable({
|
||||
chatId: v.id('chats'),
|
||||
deviceId: v.string(),
|
||||
hasCamera: v.boolean(),
|
||||
pairedWithDeviceId: v.optional(v.string()),
|
||||
lastSeen: v.number()
|
||||
}).index('by_chat_id', ['chatId']),
|
||||
|
||||
pairingRequests: defineTable({
|
||||
chatId: v.id('chats'),
|
||||
fromDeviceId: v.string(),
|
||||
status: v.union(v.literal('pending'), v.literal('accepted'), v.literal('rejected')),
|
||||
createdAt: v.number()
|
||||
}).index('by_chat_id', ['chatId']),
|
||||
|
||||
photoRequests: defineTable({
|
||||
chatId: v.id('chats'),
|
||||
requesterId: v.string(),
|
||||
captureDeviceId: v.optional(v.string()),
|
||||
status: v.union(
|
||||
v.literal('pending'),
|
||||
v.literal('countdown'),
|
||||
v.literal('capture_now'),
|
||||
v.literal('captured'),
|
||||
v.literal('accepted'),
|
||||
v.literal('rejected')
|
||||
),
|
||||
photoBase64: v.optional(v.string()),
|
||||
photoMediaType: v.optional(v.string()),
|
||||
thumbnailBase64: v.optional(v.string()),
|
||||
createdAt: v.number()
|
||||
}).index('by_chat_id', ['chatId']),
|
||||
|
||||
photoDrafts: defineTable({
|
||||
chatId: v.id('chats'),
|
||||
deviceId: v.string(),
|
||||
base64: v.string(),
|
||||
mediaType: v.string(),
|
||||
createdAt: v.number()
|
||||
}).index('by_chat_id_and_device_id', ['chatId', 'deviceId'])
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user