Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
1.8 kB · 78 lines
TypeScript
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879import { ageAssuranceRuleIDs as ids, type AppBskyAgeassuranceDefs, type AppBskyAgeassuranceGetState,} from '@atproto/api'
import {type OtherRequiredData} from '#/ageAssurance/data'import {IS_DEV, IS_E2E} from '#/env'import {type Geolocation} from '#/geolocation'
export const enabled = (IS_DEV && false) || IS_E2E
export const geolocation: Geolocation | undefined = enabled ? { countryCode: 'AA', regionCode: undefined, } : undefined
const deviceGeolocationEnabled = false || IS_E2Eexport const deviceGeolocation: Geolocation | undefined = enabled && deviceGeolocationEnabled ? { countryCode: 'AA', regionCode: undefined, } : undefined
export const config: AppBskyAgeassuranceDefs.Config = { regions: [ { countryCode: 'AA', regionCode: undefined, minAccessAge: 13, rules: [ { $type: ids.Default, access: 'full', }, ], }, { countryCode: 'BB', regionCode: undefined, minAccessAge: 16, rules: [ { $type: ids.Default, access: 'full', }, ], }, ],}
export const otherRequiredData: OtherRequiredData = { birthdate: new Date(2000, 1, 1).toISOString(),}
const serverStateEnabled = falseexport const serverState: AppBskyAgeassuranceGetState.OutputSchema | undefined = serverStateEnabled ? { state: { lastInitiatedAt: new Date(2025, 1, 1).toISOString(), status: 'assured', access: 'full', }, metadata: { accountCreatedAt: new Date(2023, 1, 1).toISOString(), }, } : undefined
export async function resolve<T>(data: T) { await new Promise(y => setTimeout(y, 500)) // simulate network return data}