this repo has no description
at main 96 lines 2.4 kB view raw
1import type { Locale } from './locale'; 2 3export class WebClient implements Client { 4 private readonly locale: Locale; 5 6 deviceType: DeviceType = 'web'; 7 8 // Tell the App Store Client that we're *really* the "web", even if the `DeviceType` 9 // says otherwise 10 __isReallyWebClient = true as const; 11 12 // TODO: how do we define this for the "client" web, when it can change over time? 13 screenSize: { width: number; height: number } = { width: 0, height: 0 }; 14 15 // TODO: how is this used? We can't have a consistent value across multiple sessions 16 guid: string = 'xxx-xx-xxx'; 17 18 screenCornerRadius: number = 0; 19 20 newPaymentMethodEnabled = false; 21 22 isActivityAvailable = false; 23 24 isElectrocardiogramInstallationAllowed = false; 25 26 isScandiumInstallationAllowed = false; 27 28 isSidepackingEnabled = false; 29 30 isTinkerWatch = false; 31 32 supportsHEIF: boolean = false; 33 34 isMandrakeSupported: boolean = false; 35 36 isCharonSupported: boolean = false; 37 38 buildType: BuildType; 39 40 maxAppContentRating: number = 1000; 41 42 isIconArtworkCapable: boolean = true; 43 44 constructor(buildType: BuildType, locale: Locale) { 45 this.buildType = buildType; 46 this.locale = locale; 47 } 48 49 get storefrontIdentifier(): string { 50 return this.locale.activeStorefront; 51 } 52 53 deviceHasCapabilities(_capabilities: string[]): boolean { 54 return false; 55 } 56 57 deviceHasCapabilitiesIncludingCompatibilityCheckIsVisionOSCompatibleIOSApp( 58 _capabilities: string[], 59 _supportsVisionOSCompatibleIOSBinary: boolean, 60 ): boolean { 61 return false; 62 } 63 64 isActivePairedWatchSystemVersionAtLeastMajorVersionMinorVersionPatchVersion( 65 _majorVersion: number, 66 _minorVersion: number, 67 _patchVersion: number, 68 ): boolean { 69 return false; 70 } 71 72 canDevicePerformAppActionWithAppCapabilities( 73 _appAction: string, 74 _appCapabilities: string[] | undefined | null, 75 ): boolean { 76 return false; 77 } 78 79 isAutomaticDownloadingEnabled(): boolean { 80 return false; 81 } 82 83 isAuthorizedForUserNotifications(): boolean { 84 return false; 85 } 86 87 deletableSystemAppCanBeInstalledOnWatchWithBundleID( 88 _bundleId: string, 89 ): boolean { 90 return false; 91 } 92 93 isDeviceEligibleForDomain(_domain: string): boolean { 94 return false; 95 } 96}