forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {type ID as PolicyUpdate202508} from '#/components/PolicyUpdateOverlay/updates/202508/config'
2import {type Geolocation} from '#/geolocation/types'
3
4/**
5 * Data that's specific to the device and does not vary based account
6 */
7export type Device = {
8 /**
9 * Formerly managed by StatSig, this is the migrated stable ID for the
10 * device, used with our logging and metrics tracking.
11 */
12 deviceId?: string
13 /**
14 * Session ID storage for _native only_. On web, use we `sessionStorage`
15 */
16 nativeSessionId?: string
17 nativeSessionIdLastEventAt?: number
18
19 fontScale: '-2' | '-1' | '0' | '1' | '2'
20 fontFamily: 'system' | 'theme'
21 lastNuxDialog: string | undefined
22
23 /**
24 * Geolocation config, fetched from the IP service. This previously did
25 * double duty as the "status" for geolocation state, but that has since
26 * moved here to the client.
27 *
28 * @deprecated use `mergedGeolocation` instead
29 */
30 geolocation?: {
31 countryCode: string | undefined
32 regionCode: string | undefined
33 ageRestrictedGeos: {
34 countryCode: string
35 regionCode: string | undefined
36 }[]
37 ageBlockedGeos: {
38 countryCode: string
39 regionCode: string | undefined
40 }[]
41 }
42
43 /**
44 * The raw response from the geolocation service, if available. We
45 * cache this here and update it lazily on session start.
46 */
47 geolocationServiceResponse?: Geolocation
48 /**
49 * The GPS-based geolocation, if the user has granted permission.
50 */
51 deviceGeolocation?: Geolocation
52 /**
53 * The merged geolocation, combining `geolocationServiceResponse` and
54 * `deviceGeolocation`, with preference to `deviceGeolocation`.
55 */
56 mergedGeolocation?: Geolocation
57
58 trendingBetaEnabled: boolean
59 devMode: boolean
60 demoMode: boolean
61
62 // deer
63 deerGateCache: string
64 activitySubscriptionsNudged?: boolean
65 threadgateNudged?: boolean
66
67 /**
68 * Policy update overlays. New IDs are required for each new announcement.
69 */
70 policyUpdateDebugOverride?: boolean
71 [PolicyUpdate202508]?: boolean
72
73 videoVolume: number
74}
75
76export type Account = {
77 searchTermHistory?: string[]
78 searchAccountHistory?: string[]
79
80 /**
81 * The ISO date string of when this account's birthdate was last updated on
82 * this device.
83 */
84 birthdateLastUpdatedAt?: string
85
86 lastSelectedHomeFeed?: string
87}