|
| 1 | +import { z } from '../../../_internal/z.ts'; |
| 2 | + |
| 3 | +const timestampSchema = z.string().datetime(); |
| 4 | + |
| 5 | +const movieActivitiesSchema = z.object({ |
| 6 | + watched_at: timestampSchema, |
| 7 | + collected_at: timestampSchema, |
| 8 | + rated_at: timestampSchema, |
| 9 | + watchlisted_at: timestampSchema, |
| 10 | + favorited_at: timestampSchema, |
| 11 | + commented_at: timestampSchema, |
| 12 | + paused_at: timestampSchema, |
| 13 | + hidden_at: timestampSchema, |
| 14 | +}); |
| 15 | + |
| 16 | +const episodeActivitiesSchema = z.object({ |
| 17 | + watched_at: timestampSchema, |
| 18 | + collected_at: timestampSchema, |
| 19 | + rated_at: timestampSchema, |
| 20 | + watchlisted_at: timestampSchema, |
| 21 | + commented_at: timestampSchema, |
| 22 | + paused_at: timestampSchema, |
| 23 | +}); |
| 24 | + |
| 25 | +const showActivitiesSchema = z.object({ |
| 26 | + rated_at: timestampSchema, |
| 27 | + watchlisted_at: timestampSchema, |
| 28 | + favorited_at: timestampSchema, |
| 29 | + commented_at: timestampSchema, |
| 30 | + hidden_at: timestampSchema, |
| 31 | + dropped_at: timestampSchema, |
| 32 | +}); |
| 33 | + |
| 34 | +const seasonActivitiesSchema = z.object({ |
| 35 | + rated_at: timestampSchema, |
| 36 | + watchlisted_at: timestampSchema, |
| 37 | + commented_at: timestampSchema, |
| 38 | + hidden_at: timestampSchema, |
| 39 | +}); |
| 40 | + |
| 41 | +const commentActivitiesSchema = z.object({ |
| 42 | + liked_at: timestampSchema, |
| 43 | + reacted_at: timestampSchema, |
| 44 | + blocked_at: timestampSchema, |
| 45 | +}); |
| 46 | + |
| 47 | +const listActivitiesSchema = z.object({ |
| 48 | + liked_at: timestampSchema, |
| 49 | + reacted_at: timestampSchema, |
| 50 | + updated_at: timestampSchema, |
| 51 | + commented_at: timestampSchema, |
| 52 | +}); |
| 53 | + |
| 54 | +const updatedActivitiesSchema = z.object({ |
| 55 | + updated_at: timestampSchema, |
| 56 | +}); |
| 57 | + |
| 58 | +const accountActivitiesSchema = z.object({ |
| 59 | + settings_at: timestampSchema, |
| 60 | + followed_at: timestampSchema, |
| 61 | + following_at: timestampSchema, |
| 62 | + pending_at: timestampSchema, |
| 63 | + requested_at: timestampSchema, |
| 64 | +}); |
| 65 | + |
| 66 | +export const lastActivitiesResponseSchema = z.object({ |
| 67 | + all: timestampSchema, |
| 68 | + movies: movieActivitiesSchema, |
| 69 | + episodes: episodeActivitiesSchema, |
| 70 | + shows: showActivitiesSchema, |
| 71 | + seasons: seasonActivitiesSchema, |
| 72 | + comments: commentActivitiesSchema, |
| 73 | + lists: listActivitiesSchema, |
| 74 | + watchlist: updatedActivitiesSchema, |
| 75 | + favorites: updatedActivitiesSchema, |
| 76 | + collaborations: updatedActivitiesSchema, |
| 77 | + account: accountActivitiesSchema, |
| 78 | + saved_filters: updatedActivitiesSchema, |
| 79 | + notes: updatedActivitiesSchema, |
| 80 | +}); |
0 commit comments