-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtypes.d.ts
More file actions
29 lines (26 loc) · 4.46 KB
/
types.d.ts
File metadata and controls
29 lines (26 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Automatically generated types for motia
* Do NOT edit this file manually.
*
* Consider adding this file to .prettierignore and eslint ignore.
*/
import { EventHandler, ApiRouteHandler, ApiResponse, MotiaStream, CronHandler } from 'motia'
declare module 'motia' {
interface FlowContextStateStreams {
'teleportProgress': MotiaStream<{ id: string; destination: string; era: string; style: string; status: 'initiated' | 'generating-image' | 'rendering-image' | 'uploading-image' | 'image-generated' | 'generating-details' | 'synthesizing-speech' | 'completed' | 'error'; progress: number; imageData?: string; imageUrl?: string; description?: string; mapsUri?: string; referenceImageUrl?: string; usedStreetView?: boolean; error?: string; timestamp: number }>
}
interface Handlers {
'SynthesizeSpeech': EventHandler<{ teleportId: string; text: string }, never>
'GenerateLocationDetails': EventHandler<{ teleportId: string; destination: string; era: string }, { topic: 'location-details-generated'; data: { teleportId: string } } | { topic: 'synthesize-speech'; data: { teleportId: string; text: string } }>
'GenerateImage': EventHandler<{ teleportId: string; destination: string; era: string; style: string; coordinates?: { lat: number; lng: number }; referenceImages?: Array<{ id: string; data: string; type: 'person' | 'celebrity' | 'object'; label?: string }>; imageConfig?: { aspectRatio: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9'; imageSize: '1K' | '2K' | '4K' }; userGeminiKey?: string; userMapsKey?: string }, { topic: 'image-generated'; data: { teleportId: string } }>
'CompleteTeleport': EventHandler<{ teleportId: string }, never>
'ParseTravelCommand': ApiRouteHandler<{ message: string; history: Array<string> }, ApiResponse<200, { isJump: boolean; reply: string; params?: { destination: string; era: string; style: string } }> | ApiResponse<400, { error: string }>, never>
'InitiateTeleport': ApiRouteHandler<{ destination: string; era: string; style: string; referenceImage?: string; referenceImages?: Array<{ id: string; data: string; type: 'person' | 'celebrity' | 'object'; label?: string }>; coordinates?: { lat: number; lng: number }; imageConfig?: { aspectRatio: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9'; imageSize: '1K' | '2K' | '4K' }; userGeminiKey?: string; userMapsKey?: string }, ApiResponse<201, { teleportId: string; status: string; message: string }> | ApiResponse<400, { error: string }> | ApiResponse<401, { error: string }>, { topic: 'generate-image'; data: { teleportId: string; destination: string; era: string; style: string; coordinates?: { lat: number; lng: number }; referenceImages?: Array<{ id: string; data: string; type: 'person' | 'celebrity' | 'object'; label?: string }>; imageConfig?: { aspectRatio: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9'; imageSize: '1K' | '2K' | '4K' }; userGeminiKey?: string; userMapsKey?: string } } | { topic: 'generate-location-details'; data: { teleportId: string; destination: string; era: string } }>
'GetUser': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { user: { id: string; email: string; name: string; avatarUrl?: string } }> | ApiResponse<401, { error: string }> | ApiResponse<404, { error: string }> | ApiResponse<500, { error: string }>, never>
'GetTeleportProgress': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { id: string; destination: string; era: string; style: string; status: string; progress: number; imageData?: string; description?: string; mapsUri?: string; error?: string; timestamp: number }> | ApiResponse<404, { error: string }>, never>
'GetLocationInfo': ApiRouteHandler<Record<string, unknown>, unknown, never>
'GetHistory': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { history: Array<{ id: string; destination: string; era: string; style: string; imageUrl?: string; description: string; mapsUri?: string; referenceImageUrl?: string; usedStreetView?: boolean; timestamp: number }> }> | ApiResponse<401, { error: string }>, never>
'GetAudio': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { audioData?: string; audioUrl?: string }> | ApiResponse<404, { error: string }>, never>
'Auth': ApiRouteHandler<{ authToken: string }, ApiResponse<200, { accessToken: string; user: { id: string; email: string; name: string; avatarUrl?: string } }> | ApiResponse<401, { error: string }> | ApiResponse<500, { error: string }>, never>
}
}