""" Fields with @internal may only be queried from internal systems and are not exposed to 3rd-party api clients. """ directive @internal on FIELD_DEFINITION """ Fields with @self may only be queried when queried directly by the actor represented by the object. """ directive @self on FIELD_DEFINITION enum SecondFactorType { TOTP # WEBAUTHN } type SecondFactor { enabled: Boolean! name: String! type: SecondFactorType! } type User implements Node { id: ID! username: String! email: String! secondFactors: [SecondFactor!]! @self } union Actor = User enum SessionState { EMPTY UNAUTHENTICATED AWAITING_FACTOR AUTHENTICATED_PENDING AUTHENTICATED_FULLY AUTHENTICATED_PASSWORD_CHANGE AUTHENTICATED_2FA_ENROLL AUTHENTICATED_REVIEW_TOS AUTHENTICATED_REVIEW_RECOVERY } type FeSession implements Node { id: ID! state: SessionState! } type Query { self: Actor! user(id: ID!): User! authFeSession(id: ID!): FeSession! @internal node(id: ID!): Node! } type Mutation { authFeSessionCreate: FeSession! @internal authFeSessionIdentify(identification: String!): FeSession! @internal authFeSessionPassword(password: String!): FeSession! @internal authFeSessionTOTP(totp: String!): FeSession! @internal authFeSessionLock: FeSession! @internal authFeSessionLogout: FeSession! @internal } interface Node { id: ID! }