-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtypes.d.ts
More file actions
30 lines (27 loc) · 3.23 KB
/
types.d.ts
File metadata and controls
30 lines (27 loc) · 3.23 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
30
/**
* 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 {
'stars': MotiaStream<{ id: string; stars: number; name: string; fullName: string; owner: string; description: string | unknown; language: string | unknown; lastUpdated: string; history?: Array<{ date: string; stars: number }> }>
'repoUpdates': MotiaStream<{ id: string; owner: string; repo: string; type: 'commit' | 'push' | 'branch' | 'refresh'; message: string; author?: string; sha?: string; timestamp: string; nodeCount?: number; linkCount?: number }>
}
interface Handlers {
'WatchRepo': ApiRouteHandler<{ owner: string; repo: string; token?: string }, ApiResponse<200, { success: boolean; message: string; watchId: string }> | ApiResponse<500, { error: string }>, never>
'TrackStars': ApiRouteHandler<{ owner: string; repo: string; token?: string }, ApiResponse<200, { success: boolean; stars: number; name: string; fullName: string }> | ApiResponse<500, { error: string }>, { topic: 'fetch-star-history'; data: { owner: string; repo: string; token?: string } }>
'GetStarHistory': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { owner: string; repo: string; totalStars: number; history: Array<{ date: string; stars: number }> }> | ApiResponse<403, { error: string }> | ApiResponse<500, { error: string }>, never>
'GetStarAnalytics': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { owner: string; repo: string; totalStars: number; createdAt: string; ageInDays: number; avgStarsPerDay: number; dailyHistory: Array<{ date: string; daily: number; cumulative: number }>; hourlyActivity: Array<{ hour: string; stars: number }>; trends: { avg7d: number; avg30d: number; peakDay: { date: string; stars: number }; velocity: number; trend: 'up' | 'down' | 'stable'; growthRate: number }; recentActivity: Array<{ date: string; daily: number; cumulative: number }>; dataCompleteness: number }> | ApiResponse<403, { error: string }> | ApiResponse<500, { error: string }>, never>
'GetRepoTree': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, { nodes: Array<{ id: string; name: string; type: 'blob' | 'tree'; path: string; size?: number; extension?: string; parentId?: string | unknown; fx?: number; fy?: number }>; links: Array<{ source: string; target: string }> }> | ApiResponse<403, { error: string }> | ApiResponse<500, { error: string }>, never>
'Get Repository Details': ApiRouteHandler<Record<string, unknown>, unknown, never>
'Get Contributions': ApiRouteHandler<Record<string, unknown>, unknown, never>
'Get Commits': ApiRouteHandler<Record<string, unknown>, unknown, never>
'FetchStarHistoryEvent': EventHandler<{ owner: string; repo: string; token?: string }, never>
'ExportStarData': ApiRouteHandler<Record<string, unknown>, ApiResponse<200, unknown> | ApiResponse<403, { error: string }> | ApiResponse<500, { error: string }>, never>
'EmbedStarHistory': ApiRouteHandler<Record<string, unknown>, unknown, never>
'EmbedStarBadge': ApiRouteHandler<Record<string, unknown>, unknown, never>
}
}