Update API package and filter AA configs by platform (#11244)
This commit is contained in:
@@ -4,13 +4,30 @@ import {
|
||||
} from '@atproto/api'
|
||||
|
||||
import {AgeAssuranceAccess} from '#/ageAssurance/types'
|
||||
import {ANDROID_API_LEVEL, IOS_MAJOR_VERSION, IS_ANDROID, IS_IOS} from '#/env'
|
||||
import {
|
||||
ANDROID_API_LEVEL,
|
||||
IOS_MAJOR_VERSION,
|
||||
IS_ANDROID,
|
||||
IS_IOS,
|
||||
IS_WEB,
|
||||
} from '#/env'
|
||||
|
||||
/**
|
||||
* Minimum age required to access the app at all.
|
||||
*/
|
||||
export const MIN_ACCESS_AGE = 13
|
||||
|
||||
/**
|
||||
* The identifier for the current platform, matching the `knownValues` of the
|
||||
* `platforms` property on `app.bsky.ageassurance.defs#configRegion`. Used to
|
||||
* filter out region configs that don't apply to this platform.
|
||||
*/
|
||||
export const AGE_ASSURANCE_PLATFORM: 'web' | 'ios' | 'android' = IS_WEB
|
||||
? 'web'
|
||||
: IS_IOS
|
||||
? 'ios'
|
||||
: 'android'
|
||||
|
||||
/**
|
||||
* Whether the current device can provide the native on-device age signals we
|
||||
* use for age assurance (via `expo-age-range`). We gate on OS version because
|
||||
|
||||
Reference in New Issue
Block a user