/ src / jet / dependencies / user.ts
user.ts
 1  /**
 2   * Create an "unauthenticated" {@linkcode User} representation
 3   *
 4   * The property values below match the way that `AppStoreKit` will define the `user`
 5   * when the session is not authenticated.
 6   */
 7  export function makeUnauthenticatedUser(): User {
 8      return {
 9          accountIdentifier: undefined,
10          dsid: undefined,
11          firstName: undefined,
12          // Note: this property is `true` for the native apps but `false` makes
13          // more sense in the context of the "web" client
14          isFitnessAppInstallationAllowed: false,
15          isManagedAppleID: false,
16          isOnDevicePersonalizationEnabled: false,
17          isUnderThirteen: false,
18          katanaId: undefined,
19          lastName: undefined,
20          treatmentGroupIdOverride: undefined,
21          userAgeIfAvailable: undefined,
22  
23          onDevicePersonalizationDataContainerForAppIds(appIds) {
24              return {
25                  personalizationData: {},
26                  metricsData: {},
27              };
28          },
29      };
30  }