about summary refs log tree commit diff
path: root/src/state/persisted/schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/persisted/schema.ts')
-rw-r--r--src/state/persisted/schema.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/state/persisted/schema.ts b/src/state/persisted/schema.ts
index 9c52661e4..a510262fb 100644
--- a/src/state/persisted/schema.ts
+++ b/src/state/persisted/schema.ts
@@ -2,15 +2,17 @@ import {z} from 'zod'
 import {deviceLocales} from '#/platform/detection'
 
 // only data needed for rendering account page
+// TODO agent.resumeSession requires the following fields
 const accountSchema = z.object({
   service: z.string(),
   did: z.string(),
-  refreshJwt: z.string().optional(),
-  accessJwt: z.string().optional(),
-  handle: z.string().optional(),
-  displayName: z.string().optional(),
-  aviUrl: z.string().optional(),
+  handle: z.string(),
+  refreshJwt: z.string().optional(), // optional because it can expire
+  accessJwt: z.string().optional(), // optional because it can expire
+  // displayName: z.string().optional(),
+  // aviUrl: z.string().optional(),
 })
+export type PersistedAccount = z.infer<typeof accountSchema>
 
 export const schema = z.object({
   colorMode: z.enum(['system', 'light', 'dark']),