Settings Objects

Settings Store

The core object for settings panel.

Properties

PropTypeDescription
account*AccountStoreUser account.
workspace*WorkspaceStoreCurrent workspace.

Account Store

Properties

PropTypeDescription
id*stringUnique identifier of the user.
name*stringUser's name.
email*stringUser's email.
avatarUrl*stringChosen avatar image.
preferredName*stringPreferred name of the user.
hasPasswordbooleanWhether user has set password.
currentSessionIdstringUnique identifier of the current login session.
language"en" | "de" | "es"Preferred language.

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  name: "Steve",
  email: "steve@example.com",
  avatarUrl: "https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg"
  preferredName: "Steeeee",
  language: "de"
}

Workspace Store

Properties

PropTypeDescription
id*stringUnique identifier of the workspace.
name*stringName of the workspace.
icon*IconDataIcon of the workspace.
domain*stringPublic domain.
inviteLink*stringInvite link for the workspace.
plan*PlanPlan of the workspace.
role*RoleRole of the user in this workspace.

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  name: "Workspace",
  icon: { type: "text", src: "W" },
  domain: "notion.so",
  inviteLink: "notion.so/e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  plan: "free",
  role: "owner"
}

Passkey

Properties

PropTypeDescription
id*stringUnique identifier of the passkey.
name*stringName of the passkey.
createdAt*numberCreation time of the passkey. Formatted as timestamp (ms).

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  name: "My Passkey",
  createdAt: 1738368000000
}

Session Row

The row data of the sessions table.

Properties

PropTypeDescription
id*stringUnique identifier of the session.
token*stringUnique token of the session.
device*stringThe logged in device.
type*"laptop" | "mobile" | "unknown"Type of the device.
lastActive*numberLast active time of the session. Formatted as timestamp (ms).
location*stringThe logged in location.

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  device: "MacBook Pro",
  type: "laptop",
  token: "abc123xyz456",
  lastActive: 1738368000000,
  location: "New York, USA"
}

Connection

The row data of the connections table.

Properties

PropTypeDescription
id*stringUnique identifier of the connection.
connection*{ type: string, account: string, accountId?: string }The connection type and account.
scopesstring[]Available scopes of the connection.

Example

{
  id: "be633bf1-dfa0-436d-b259-571129a590e5",
  connection: {
    type: "github",
    account: "steeeee0223",
    accountId: "abc123xyz456"
  },
  scopes: ["can view"]
}

Member Row

The row data of the members table.

Properties

PropTypeDescription
id*stringUnique identifier of the member.
user*UserInformation of the member.
role*RoleRole of the member.
teamspaces*MemberTeamspace[]Available teamspaces.
groups*CellOptions<GroupOption>Available groups.

See schema definitions for:

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  user: {
    id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
    name: "Steve",
    email: "steve@example.com",
    avatarUrl: "https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg"
  },
  role: "owner",
  teamspaces: {
    current: "t1",
    options: [
      { id: "t1", name: "Teamspace 1", memberCount: 25 },
      { id: "t2", name: "Teamspace 2", memberCount: 10 },
      { id: "t3", name: "Teamspace 3", memberCount: 32 },
    ]
  },
  groups: {
    current: "g1",
    options: [
      { id: "g1", name: "Group 1", memberCount: 2 },
      { id: "g2", name: "Group 2", memberCount: 1 },
      { id: "g3", name: "Group 3", memberCount: 3 },
    ]
  }
}

Guest Row

The row data of the guests table.

Properties

PropTypeDescription
id*stringUnique identifier of the guest.
user*UserInformation of the guest.
access*PageAccess[]Available pages for the guest.

See schema definitions for:

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  user: {
    id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
    name: "Steve",
    email: "steve@example.com",
    avatarUrl: "https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg"
  },
  role: "owner",
  teamspaces: {
    current: "t1",
    options: [
      { id: "t1", name: "Teamspace 1", memberCount: 25 },
      { id: "t2", name: "Teamspace 2", memberCount: 10 },
      { id: "t3", name: "Teamspace 3", memberCount: 32 },
    ]
  },
  groups: {
    current: "g1",
    options: [
      { id: "g1", name: "Group 1", memberCount: 2 },
      { id: "g2", name: "Group 2", memberCount: 1 },
      { id: "g3", name: "Group 3", memberCount: 3 },
    ]
  }
}

Invitation Row

The row data of the invitations table.

Properties

PropTypeDescription
id*stringThe unique identifier of the invitation.
email*stringEmail address of the invited user.
role*RoleRole of the invited user.
status*"pending" | "rejected" | "canceled"Current status of the invitation.
invitedBy*UserThe user who sent the invitation.

See schema definitions for:

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  email: "steve@example.com",
  role: "guest"
  status: "pending",
  invitedBy: {
    id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
    name: "Steve",
    email: "steve@example.com",
    avatarUrl: "https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg"
  },
}

Teamspace Row

The row data of the teamspaces table.

Properties

PropTypeDescription
id*stringThe unique identifier of the teamspace.
name*stringName of the teamspace.
icon*IconDataIcon of the teamspace.
permission*"default" | "open" | "closed" | "private"Permission level of the teamspace.
descriptionstringDescription of the teamspace.
memberCount*numberThe number of users in the teamspace.
ownedBy*Pick<User, "name" | "avatarUrl">User who owns the teamspace.
ownerCount*numberThe number of teamspace owners.
updatedAt*numberLast updated time of the teamspace. Formatted as timestamp (ms).
role"owner" | "member" | falseRole of the user in the teamspace; falsy if the user is not a member.

See schema definitions for:

Example

{
  id: "t1",
  name: "Acme Lab",
  icon: { type: "emoji", value: "🚀" },
  permission: "closed",
  memberCount: 25,
  ownedBy: {
    name: "Steve",
    avatarUrl: "https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg"
  },
  ownerCount: 3,
  updatedAt: 1738368000000,
}

Group Option

Properties

PropTypeDescription
id*stringThe unique identifier of the group.
name*stringName of the group.
memberCount*numberThe number of members in the group.

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  name: "Group name",
  memberCount: 3
}

Cell Options

A CellOptions is a generic type CellOptions<T>, where T extends { id: string }.

Properties

PropTypeDescription
current*string | nullThe unique identifier of current option, i.e. options[i].id
options*T[]Available options.

Example

An example for CellOptions<{ id: string, title: string }>

{
  current: "a",
  options: [
    { id: "a", title: "A" },
    { id: "b", title: "B" },
    { id: "c", title: "C" },
  ]
}

Page Access

Properties

PropTypeDescription
id*stringThe unique identifier of the page.
name*stringName of the page.
scope*stringThe user scope of the page.

Example

{
  id: "e79a0b74-3aba-4149-9f74-0bb5791a6ee6",
  name: "Page 1",
  scope: 'can edit'
}