about summary refs log tree commit diff
path: root/src/state/queries/nuxs/definitions.ts
blob: 7577d6b205e1aebe9ce59454671a2cae6bba5678 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import type zod from 'zod'

import {type BaseNux} from '#/state/queries/nuxs/types'

export enum Nux {
  NeueTypography = 'NeueTypography',
  ExploreInterestsCard = 'ExploreInterestsCard',
  InitialVerificationAnnouncement = 'InitialVerificationAnnouncement',
  ActivitySubscriptions = 'ActivitySubscriptions',
  AgeAssuranceDismissibleNotice = 'AgeAssuranceDismissibleNotice',
  AgeAssuranceDismissibleFeedBanner = 'AgeAssuranceDismissibleFeedBanner',

  /*
   * Blocking announcements. New IDs are required for each new announcement.
   */
  PolicyUpdate202508 = 'PolicyUpdate202508',
}

export const nuxNames = new Set(Object.values(Nux))

export type AppNux = BaseNux<
  | {
      id: Nux.NeueTypography
      data: undefined
    }
  | {
      id: Nux.ExploreInterestsCard
      data: undefined
    }
  | {
      id: Nux.InitialVerificationAnnouncement
      data: undefined
    }
  | {
      id: Nux.ActivitySubscriptions
      data: undefined
    }
  | {
      id: Nux.AgeAssuranceDismissibleNotice
      data: undefined
    }
  | {
      id: Nux.AgeAssuranceDismissibleFeedBanner
      data: undefined
    }
  | {
      id: Nux.PolicyUpdate202508
      data: undefined
    }
>

export const NuxSchemas: Record<Nux, zod.ZodObject<any> | undefined> = {
  [Nux.NeueTypography]: undefined,
  [Nux.ExploreInterestsCard]: undefined,
  [Nux.InitialVerificationAnnouncement]: undefined,
  [Nux.ActivitySubscriptions]: undefined,
  [Nux.AgeAssuranceDismissibleNotice]: undefined,
  [Nux.AgeAssuranceDismissibleFeedBanner]: undefined,
  [Nux.PolicyUpdate202508]: undefined,
}