-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18645 from davelopez/improve_user_types
Improve types around User in schema and client
- Loading branch information
Showing
28 changed files
with
168 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
import { getFakeRegisteredUser } from "@tests/test-data"; | ||
|
||
import { | ||
type AnonymousUser, | ||
type AnyHistory, | ||
type HistorySummary, | ||
type HistorySummaryExtended, | ||
isRegisteredUser, | ||
type User, | ||
userOwnsHistory, | ||
} from "."; | ||
|
||
const REGISTERED_USER_ID = "fake-user-id"; | ||
const ANOTHER_USER_ID = "another-fake-user-id"; | ||
const ANONYMOUS_USER_ID = null; | ||
|
||
const REGISTERED_USER: User = { | ||
id: REGISTERED_USER_ID, | ||
email: "[email protected]", | ||
tags_used: [], | ||
isAnonymous: false, | ||
total_disk_usage: 0, | ||
}; | ||
const REGISTERED_USER = getFakeRegisteredUser({ id: REGISTERED_USER_ID }); | ||
|
||
const ANONYMOUS_USER: AnonymousUser = { | ||
isAnonymous: true, | ||
total_disk_usage: 0, | ||
nice_total_disk_usage: "0.0 bytes", | ||
}; | ||
|
||
const SESSIONLESS_USER = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.