diff options
author | Eric Bailey <git@esb.lol> | 2024-06-04 20:02:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 02:02:22 +0100 |
commit | 3ece21cb45e8b74795f4eac33a1551b303196946 (patch) | |
tree | 8259d8cbae98ef7493197af8d810ca9a0fdfae97 /src/state/persisted | |
parent | e64b7cf69869ad5d984037ced7f81fc400e1daa0 (diff) | |
download | voidsky-3ece21cb45e8b74795f4eac33a1551b303196946.tar.zst |
[🙅] Integrate deactivate (#4308)
* Update types (cherry picked from commit 27deac1f367825771ba76fa098ec1b0a62dcf64a) * Integrate into deactivate dialog (cherry picked from commit 84f299a447259cc1fbfc7be607e28197779e4ec1) * Integrate into Deactivated screen (cherry picked from commit 29193f34822ecdf11e2a407197fa230285dfe846) * Bump api sdk (cherry picked from commit 738c622d3e5a23bfbb0d3bdce3a6bdf01e54ca60) * Update permalink (cherry picked from commit c10bf5c071d76c3054bc4ce9d313c10b1820f038) * Bump sdk pkg * Update types to match backend * Loosen types for forwards compat * Hydrate status from persisted data * Refresh session when re-activating, clear query cache * Show app password error * Refactor dialog to clear state when closed * Add app password error to Deactivated screen
Diffstat (limited to 'src/state/persisted')
-rw-r--r-- | src/state/persisted/schema.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/state/persisted/schema.ts b/src/state/persisted/schema.ts index 7d579d55d..b81cf5962 100644 --- a/src/state/persisted/schema.ts +++ b/src/state/persisted/schema.ts @@ -18,9 +18,12 @@ const accountSchema = z.object({ refreshJwt: z.string().optional(), // optional because it can expire accessJwt: z.string().optional(), // optional because it can expire signupQueued: z.boolean().optional(), - status: z - .enum(['active', 'takendown', 'suspended', 'deactivated']) - .optional(), + active: z.boolean().optional(), // optional for backwards compat + /** + * Known values: takendown, suspended, deactivated + * @see https://github.com/bluesky-social/atproto/blob/5441fbde9ed3b22463e91481ec80cb095643e141/lexicons/com/atproto/server/getSession.json + */ + status: z.string().optional(), pdsUrl: z.string().optional(), }) export type PersistedAccount = z.infer<typeof accountSchema> |