Skip to main content
This page describes the core objects for managing users, authentication, and permissions in Wisdom AI. These objects provide comprehensive capabilities for handling authentication, setting preferences, and implementing permission systems to control access to resources. The Core Objects are: The Enums are: The Scalar Types are:

Core Objects

User

id
ID!
required
A unique identifier for the user.
email
String!
required
The user’s email address.
firstName
String
The user’s first name.
lastName
String
The user’s last name.
displayName
String!
required
The user’s display name (typically first name + last name or email).
avatar
String
URL to the user’s avatar image.
role
UserRole!
required
The user’s role in the system.
status
UserStatus!
required
The current status of the user account.
createdAt
DateTime!
required
The date and time when the user account was created.
updatedAt
DateTime!
required
The date and time when the user account was last updated.
lastLoginAt
DateTime
The date and time when the user last logged in.
preferences
UserPreferences
The user’s personal preferences and settings.
permissions
[Permission!]
The permissions granted to this user.

UserPreferences

theme
Theme
The user’s preferred UI theme.
language
String
The user’s preferred language code.
timezone
String
The user’s timezone.
notifications
NotificationPreferences
The user’s notification preferences.
defaultDomain
ID
The ID of the user’s default domain.

NotificationPreferences

email
Boolean!
required
Whether to receive email notifications.
inApp
Boolean!
required
Whether to receive in-app notifications.
digest
Boolean!
required
Whether to receive digest notifications.
frequency
NotificationFrequency!
required
How frequently to receive notifications.

Permission

id
ID!
required
A unique identifier for the permission.
name
String!
required
The name of the permission.
description
String
A description of what the permission allows.
resource
String
The resource this permission applies to.
action
String!
required
The action this permission allows.
scope
PermissionScope
The scope of the permission.

Enums

UserRole

The role of a user in the system defines their level of access and capabilities. Here are the values and their description:
ValueDescription
ADMINSystem administrator with full access
EDITORCan create and edit content
VIEWERCan view content but not edit
ANALYSTCan perform data analysis
GUESTLimited access guest user

UserStatus

The status of a user account indicates its current operational state. Here are the values and their description:
ValueDescription
ACTIVEUser account is active
INACTIVEUser account is inactive
SUSPENDEDUser account is suspended
PENDINGUser account is pending activation
DELETEDUser account has been deleted

Theme

UI theme options allow users to customize the appearance of the interface. Here are the values and their description:
ValueDescription
LIGHTLight theme
DARKDark theme
AUTOAutomatically switch based on system preference

NotificationFrequency

Frequency options for notifications determine how often users receive alerts. Here are the values and their description:
ValueDescription
IMMEDIATESend notifications immediately
HOURLYSend notifications hourly
DAILYSend notifications daily
WEEKLYSend notifications weekly
NEVERNever send notifications

PermissionScope

The scope of a permission defines the level at which it applies within the system. Here are the values and their description:
ValueDescription
GLOBALPermission applies globally
DOMAINPermission applies to specific domains
CONNECTIONPermission applies to specific connections
USERPermission applies to specific users

Scalar Types

DateTime

A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.

JSON

The JSON scalar type represents JSON values as specified by ECMA-404.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Boolean

The Boolean scalar type represents true or false.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Additional Resources

I