""""""
directive @tag(name: String!) on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION

""""""
input ArrayLengthFilter {
  """"""
  eq: Int

  """"""
  gt: Int

  """"""
  gte: Int

  """"""
  lt: Int

  """"""
  lte: Int

  """"""
  ne: Int
}

"""Available permission scopes"""
type AvailablePermissionsOutput {
  """Available permission scopes"""
  scopes: [AvailablePermissionsOutputScopes!]!
}

"""Available permission scopes"""
type AvailablePermissionsOutputScopes {
  """Whether this scope is auto-assigned to all roles"""
  autoAssigned: Boolean!

  """Scope key (module:scope)"""
  scope: String!
}

"""Created role"""
type CreateRoleOutput {
  """Role description"""
  description: String!

  """Role ID"""
  id: ID!

  """Role name"""
  name: String!
}

"""Created user"""
type CreateUserOutput {
  """User email"""
  email: String!

  """User ID"""
  id: ID!

  """Auto-generated initial password"""
  initialPassword: String!

  """User name"""
  name: String!

  """User status"""
  status: String!
}

"""The `Date` scalar type represents a date in format `YYYY-MM-DD`."""
scalar Date

""""""
input DateBetweenFilter {
  """"""
  max: Date

  """"""
  min: Date
}

""""""
input DateFilter {
  """"""
  between: DateBetweenFilter

  """"""
  eq: Date

  """"""
  gt: Date

  """"""
  gte: Date

  """"""
  in: [Date]

  """"""
  lt: Date

  """"""
  lte: Date

  """"""
  ne: Date

  """"""
  nin: [Date]
}

"""
The `DateTime` scalar type represents a DateTime. The DateTime is serialized as an RFC 3339 quoted string
"""
scalar DateTime

""""""
input DatetimeBetweenFilter {
  """"""
  max: DateTime

  """"""
  min: DateTime
}

""""""
input DatetimeFilter {
  """"""
  between: DatetimeBetweenFilter

  """"""
  eq: DateTime

  """"""
  gt: DateTime

  """"""
  gte: DateTime

  """"""
  in: [DateTime!]

  """"""
  lt: DateTime

  """"""
  lte: DateTime

  """"""
  ne: DateTime

  """"""
  nin: [DateTime!]
}

"""Deactivated role"""
type DeactivateRoleOutput {
  """Role ID"""
  id: ID!

  """Updated status"""
  status: String!
}

"""Deactivated user"""
type DeactivateUserOutput {
  """User ID"""
  id: ID!

  """Updated status"""
  status: String!
}

""""""
scalar Decimal

"""
A new scalar called FieldSet is a custom scalar type that is used to represent a set of fields.
"""
scalar FieldSet

""""""
type Mutation {
  """Placeholder field (IdP mutation operations are disabled)"""
  _placeholder: Boolean

  """
  createRole resolver
    
    Returns:
    Created role
  """
  createRole(
    """Role description"""
    description: String

    """Role name"""
    name: String!

    """Permission keys to assign"""
    permissions: [String!]!
  ): CreateRoleOutput!

  """
  createUser resolver
    
    Returns:
    Created user
  """
  createUser(
    """User email"""
    email: String!

    """User name"""
    name: String!

    """Role IDs to assign"""
    roleIds: [ID]
  ): CreateUserOutput!

  """
  deactivateRole resolver
    
    Returns:
    Deactivated role
  """
  deactivateRole(
    """ID of the role to deactivate"""
    roleId: ID!
  ): DeactivateRoleOutput!

  """
  deactivateUser resolver
    
    Returns:
    Deactivated user
  """
  deactivateUser(
    """ID of the user to deactivate"""
    userId: ID!
  ): DeactivateUserOutput!

  """
  reactivateRole resolver
    
    Returns:
    Reactivated role
  """
  reactivateRole(
    """ID of the role to reactivate"""
    roleId: ID!
  ): ReactivateRoleOutput!

  """
  reactivateUser resolver
    
    Returns:
    Reactivated user
  """
  reactivateUser(
    """ID of the user to reactivate"""
    userId: ID!
  ): ReactivateUserOutput!

  """
  updateOwnProfile resolver
    
    Returns:
    Updated profile
  """
  updateOwnProfile(
    """New email address"""
    email: String

    """New display name"""
    name: String
  ): UpdateOwnProfileOutput!

  """
  updateRole resolver
    
    Returns:
    Role update result
  """
  updateRole(
    """New role description"""
    description: String

    """New role name"""
    name: String

    """Desired permission keys"""
    permissions: [String!]!

    """Role ID"""
    roleId: ID!
  ): UpdateRoleOutput!

  """
  updateUserProfile resolver
    
    Returns:
    Updated user profile
  """
  updateUserProfile(
    """New email address"""
    email: String

    """New display name"""
    name: String

    """ID of the user to update"""
    userId: ID!
  ): UpdateUserProfileOutput!

  """
  updateUserRoles resolver
    
    Returns:
    User roles update result
  """
  updateUserRoles(
    """Desired role IDs"""
    roleIds: [ID!]!

    """User ID"""
    userId: ID!
  ): UpdateUserRolesOutput!
}

""""""
enum OrderDirectionEnum {
  """"""
  Asc

  """"""
  Desc
}

"""Information about pagination in a connection"""
type PageInfo {
  """"""
  endCursor: String

  """"""
  hasNextPage: Boolean!

  """"""
  hasPreviousPage: Boolean!

  """"""
  startCursor: String
}

""""""
type Query {
  """"""
  _user(id: ID!): _User

  """"""
  _userBy(id: ID, name: String): _User

  """"""
  _users(after: String, first: Int, query: _UserQueryInput): _UserConnection

  """
  availablePermissions resolver
    
    Returns:
    Available permission scopes
  """
  availablePermissions: AvailablePermissionsOutput!

  """
  Get the current user `User`. This field is only available to authorized users.
  """
  me: User

  """role(GetOne)"""
  role(id: ID!): Role

  """roleBy(GetOneBy)"""
  roleBy(
    """"""
    id: ID

    """Role name (unique identifier)"""
    name: String
  ): Role

  """role(GetList)"""
  roles(after: String, before: String, first: Int, last: Int, order: [RoleOrderInput], query: RoleQueryInput): RoleConnection!

  """user(GetOne)"""
  user(id: ID!): User

  """userBy(GetOneBy)"""
  userBy(
    """User email address (unique identifier)"""
    email: String

    """"""
    id: ID
  ): User

  """userRole(GetOne)"""
  userRole(id: ID!): UserRole

  """userRoleBy(GetOneBy)"""
  userRoleBy(id: ID, userRoleUniqueIdx: UserRoleUniqueIdx): UserRole

  """userRole(GetList)"""
  userRoles(after: String, before: String, first: Int, last: Int, order: [UserRoleOrderInput], query: UserRoleQueryInput): UserRoleConnection!

  """user(GetList)"""
  users(after: String, before: String, first: Int, last: Int, order: [UserOrderInput], query: UserQueryInput): UserConnection!
}

"""Reactivated role"""
type ReactivateRoleOutput {
  """Role ID"""
  id: ID!

  """Updated status"""
  status: String!
}

"""Reactivated user"""
type ReactivateUserOutput {
  """User ID"""
  id: ID!

  """Updated status"""
  status: String!
}

""""""
type Role {
  """Create time"""
  created: DateTime @deprecated

  """Record creation timestamp"""
  createdAt: DateTime!

  """created by"""
  createdByID: ID @deprecated

  """Optional description of what this role represents"""
  description: String

  """Document id"""
  id: ID!

  """Role name (unique identifier)"""
  name: String!

  """Array of permission keys in module:scope:command format"""
  permissions: [String!]

  """Role status (ACTIVE or INACTIVE)"""
  status: RoleStatus!

  """Update time"""
  updated: DateTime @deprecated

  """Record last update timestamp"""
  updatedAt: DateTime

  """updated by"""
  updatedByID: ID @deprecated

  """"""
  userRoles(after: String, before: String, first: Int, last: Int, order: [UserRoleOrderInput], query: UserRoleQueryInput): UserRoleConnection!
}

"""role(Connection)"""
type RoleConnection {
  """"""
  edges: [RoleEdge!]!

  """"""
  pageInfo: PageInfo!

  """"""
  total: Int
}

"""role(Edge)"""
type RoleEdge {
  """"""
  cursor: String!

  """"""
  node: Role!
}

""""""
enum RoleOrderFieldEnum {
  """"""
  createdAt

  """"""
  description

  """"""
  name

  """"""
  status

  """"""
  updatedAt
}

""""""
input RoleOrderInput {
  """"""
  direction: OrderDirectionEnum

  """"""
  field: RoleOrderFieldEnum!
}

"""role(QueryInput)"""
input RoleQueryInput {
  """"""
  and: [RoleQueryInput!]

  """"""
  createdAt: DatetimeFilter

  """"""
  description: StringFilter

  """"""
  id: UUIDFilter

  """"""
  name: StringFilter

  """"""
  not: [RoleQueryInput!]

  """"""
  or: [RoleQueryInput!]

  """"""
  permissions: StringArrayFilter

  """"""
  status: RoleStatusEnumFilter

  """"""
  updatedAt: DatetimeFilter
}

""""""
enum RoleStatus {
  """"""
  ACTIVE

  """"""
  INACTIVE
}

""""""
input RoleStatusEnumFilter {
  """"""
  eq: RoleStatus

  """"""
  in: [RoleStatus!]

  """"""
  ne: RoleStatus

  """"""
  nin: [RoleStatus!]
}

""""""
input StringArrayFilter {
  """"""
  all: StringFilter

  """"""
  exists: Boolean

  """"""
  has: StringFilter

  """"""
  len: ArrayLengthFilter
}

""""""
input StringFilter {
  """"""
  contains: String

  """"""
  eq: String

  """"""
  hasPrefix: String

  """"""
  hasSuffix: String

  """"""
  in: [String!]

  """"""
  ne: String

  """"""
  nin: [String!]

  """"""
  notContains: String

  """"""
  notHasPrefix: String

  """"""
  notHasSuffix: String

  """"""
  regex: String
}

"""
The Time scalar type represents a Time. The Time is serialized as an `hh:mm` quoted string
"""
scalar Time

""""""
input TimeBetweenFilter {
  """"""
  max: Time

  """"""
  min: Time
}

""""""
input TimeFilter {
  """"""
  between: TimeBetweenFilter

  """"""
  eq: Time

  """"""
  gt: Time

  """"""
  gte: Time

  """"""
  in: [Time]

  """"""
  lt: Time

  """"""
  lte: Time

  """"""
  ne: Time

  """"""
  nin: [Time]
}

""""""
input UUIDFilter {
  """"""
  eq: ID

  """"""
  in: [ID!]

  """"""
  ne: ID

  """"""
  nin: [ID!]
}

"""Updated profile"""
type UpdateOwnProfileOutput {
  """Updated email"""
  email: String!

  """User ID"""
  id: ID!

  """Updated name"""
  name: String!
}

"""Role update result"""
type UpdateRoleOutput {
  """Role ID"""
  roleId: ID!
}

"""Updated user profile"""
type UpdateUserProfileOutput {
  """Updated email"""
  email: String!

  """User ID"""
  id: ID!

  """Updated name"""
  name: String!
}

"""User roles update result"""
type UpdateUserRolesOutput {
  """User ID"""
  userId: ID!
}

""""""
type User {
  """Create time"""
  created: DateTime @deprecated

  """Record creation timestamp"""
  createdAt: DateTime!

  """created by"""
  createdByID: ID @deprecated

  """User email address (unique identifier)"""
  email: String!

  """Document id"""
  id: ID!

  """User display name"""
  name: String!

  """Flattened permission keys from all assigned roles"""
  permissions: [String!]

  """User status"""
  status: UserStatus!

  """Update time"""
  updated: DateTime @deprecated

  """Record last update timestamp"""
  updatedAt: DateTime

  """updated by"""
  updatedByID: ID @deprecated

  """"""
  userRoles(after: String, before: String, first: Int, last: Int, order: [UserRoleOrderInput], query: UserRoleQueryInput): UserRoleConnection!
}

"""user(Connection)"""
type UserConnection {
  """"""
  edges: [UserEdge!]!

  """"""
  pageInfo: PageInfo!

  """"""
  total: Int
}

"""user(Edge)"""
type UserEdge {
  """"""
  cursor: String!

  """"""
  node: User!
}

""""""
enum UserOrderFieldEnum {
  """"""
  createdAt

  """"""
  email

  """"""
  name

  """"""
  status

  """"""
  updatedAt
}

""""""
input UserOrderInput {
  """"""
  direction: OrderDirectionEnum

  """"""
  field: UserOrderFieldEnum!
}

"""user(QueryInput)"""
input UserQueryInput {
  """"""
  and: [UserQueryInput!]

  """"""
  createdAt: DatetimeFilter

  """"""
  email: StringFilter

  """"""
  id: UUIDFilter

  """"""
  name: StringFilter

  """"""
  not: [UserQueryInput!]

  """"""
  or: [UserQueryInput!]

  """"""
  permissions: StringArrayFilter

  """"""
  status: UserStatusEnumFilter

  """"""
  updatedAt: DatetimeFilter
}

""""""
type UserRole {
  """Create time"""
  created: DateTime @deprecated

  """Record creation timestamp"""
  createdAt: DateTime!

  """created by"""
  createdByID: ID @deprecated

  """Document id"""
  id: ID!

  """"""
  role: Role

  """Foreign key to Role"""
  roleId: ID!

  """Update time"""
  updated: DateTime @deprecated

  """Record last update timestamp"""
  updatedAt: DateTime

  """updated by"""
  updatedByID: ID @deprecated

  """"""
  user: User

  """Foreign key to User"""
  userId: ID!
}

"""userRole(Connection)"""
type UserRoleConnection {
  """"""
  edges: [UserRoleEdge!]!

  """"""
  pageInfo: PageInfo!

  """"""
  total: Int
}

"""userRole(Edge)"""
type UserRoleEdge {
  """"""
  cursor: String!

  """"""
  node: UserRole!
}

""""""
enum UserRoleOrderFieldEnum {
  """"""
  createdAt

  """"""
  updatedAt
}

""""""
input UserRoleOrderInput {
  """"""
  direction: OrderDirectionEnum

  """"""
  field: UserRoleOrderFieldEnum!
}

"""userRole(QueryInput)"""
input UserRoleQueryInput {
  """"""
  and: [UserRoleQueryInput!]

  """"""
  createdAt: DatetimeFilter

  """"""
  id: UUIDFilter

  """"""
  not: [UserRoleQueryInput!]

  """"""
  or: [UserRoleQueryInput!]

  """"""
  roleId: UUIDFilter

  """"""
  updatedAt: DatetimeFilter

  """"""
  userId: UUIDFilter
}

""""""
input UserRoleUniqueIdx {
  """Foreign key to Role"""
  roleId: ID!

  """Foreign key to User"""
  userId: ID!
}

""""""
enum UserStatus {
  """"""
  ACTIVE

  """"""
  INACTIVE

  """"""
  PENDING
}

""""""
input UserStatusEnumFilter {
  """"""
  eq: UserStatus

  """"""
  in: [UserStatus!]

  """"""
  ne: UserStatus

  """"""
  nin: [UserStatus!]
}

""""""
type _PageInfo {
  """"""
  endCursor: String

  """"""
  hasNextPage: Boolean!

  """"""
  hasPreviousPage: Boolean!

  """"""
  startCursor: String
}

""""""
type _User {
  """"""
  createdAt: DateTime!

  """"""
  disabled: Boolean!

  """"""
  id: ID!

  """"""
  name: String!
}

""""""
type _UserConnection {
  """"""
  edges: [_UserEdge]

  """"""
  pageInfo: _PageInfo

  """"""
  totalCount: Int
}

""""""
type _UserEdge {
  """"""
  cursor: String

  """"""
  node: _User
}

""""""
input _UserQueryInput {
  """"""
  ids: [ID!]

  """"""
  names: [String!]
}
