type Group = {
id: Uuid
members: Group[]
keys: KeysetWithSecrets
graph:
}
Last active
May 2, 2024 00:45
-
-
Save HerbCaudill/59b941a60775b47eccc9f20a40b43c78 to your computer and use it in GitHub Desktop.
auth@next notes
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
export type EntityBase = { | |
id: EntityId | |
name: string | |
keys: Keyset | |
members?: Entity[] | |
} | |
export type Team = EntityBase & { | |
type: 'TEAM' | |
members: (Role | User | Server)[] | |
} | |
export type Role = EntityBase & { | |
type: 'ROLE' | |
members: (User | Server)[] | |
} | |
export type User = EntityBase & { | |
type: 'USER' | |
members: (Device | Agent)[] | |
} | |
export type Agent = EntityBase & { | |
type: 'AGENT' | |
members: never | |
} | |
export type Server = EntityBase & { | |
type: 'SERVER' | |
members: never | |
} | |
export type Device = EntityBase & { | |
type: 'DEVICE' | |
members: never | |
} | |
export type Entity = Team | Role | User | Agent | Device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment