Skip to content

Commit

Permalink
refactor(types): use combined table schema per #890
Browse files Browse the repository at this point in the history
  • Loading branch information
ap0nia committed Feb 14, 2024
1 parent 2d84f88 commit 70c6efd
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/types/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ import { type } from 'arktype';
export const UserSchema = type({
id: 'string',
userData: ScheduleSaveStateSchema,
});

export const AuthUserSchema = type({
id: 'string',
'userData?': ScheduleSaveStateSchema,
name: 'string',
email: 'string',
picture: 'string',
'googleId?': 'string',
'name?': 'string',
'email?': 'string',
'picture?': 'string',
});
export type User = typeof UserSchema.infer;

export type AuthUser = typeof AuthUserSchema.infer;
export type User = typeof UserSchema.infer;

0 comments on commit 70c6efd

Please sign in to comment.