@@ -10,6 +10,9 @@ export const Location = z.union([
10
10
} ) ,
11
11
z . object ( { type : z . literal ( "create-account" ) } ) ,
12
12
z . object ( { type : z . literal ( "local-project" ) } ) ,
13
+ z . object ( { type : z . literal ( "create-project" ) } ) ,
14
+ z . object ( { type : z . literal ( "setting" ) } ) ,
15
+ z . object ( { type : z . literal ( "dev" ) } ) ,
13
16
] ) ;
14
17
15
18
export type Location = Readonly < z . TypeOf < typeof Location > > ;
@@ -20,21 +23,21 @@ export type Language = z.TypeOf<typeof Language>;
20
23
21
24
export const defaultLanguage : Language = "english" ;
22
25
23
- export const PreAccountToken = z
24
- . string ( )
25
- . length ( 64 ) as unknown as z . Schema < PreAccountToken > ;
26
+ export const PreAccountToken = z . string ( ) . length ( 64 ) . brand < "PreAccountToken" > ( ) ;
26
27
27
- export type PreAccountToken = string & { _preAccountToken : never } ;
28
+ export type PreAccountToken = z . TypeOf < typeof PreAccountToken > ;
28
29
29
- export const AccountToken = z
30
- . string ( )
31
- . length ( 64 ) as unknown as z . Schema < AccountToken > ;
30
+ export const AccountToken = z . string ( ) . length ( 64 ) . brand < "AccountToken" > ( ) ;
32
31
33
- export type AccountToken = string & { _accountToken : never } ;
32
+ export type AccountToken = z . TypeOf < typeof AccountToken > ;
34
33
35
- export const AccountId = z . bigint ( ) as unknown as z . Schema < AccountId > ;
34
+ export const AccountId = z . string ( ) . min ( 1 ) . brand < " AccountId" > ( ) ;
36
35
37
- export type AccountId = bigint & { _accountId : never } ;
36
+ export type AccountId = z . TypeOf < typeof AccountId > ;
37
+
38
+ export const ProjectId = z . string ( ) . min ( 1 ) . brand < "ProjectId" > ( ) ;
39
+
40
+ export type ProjectId = z . TypeOf < typeof ProjectId > ;
38
41
39
42
export const LogInByCodeAndStatePayload = z . union ( [
40
43
z . object ( { type : z . literal ( "notGeneratedState" ) } ) ,
0 commit comments