directive @requireAuth(roles: [RoleEnum], permissions: [PermissionEnum]) on FIELD_DEFINITION

directive @requireAuthNullify(roles: [RoleEnum], permissions: [PermissionEnum]) on FIELD_DEFINITION

directive @skipAuth on FIELD_DEFINITION

scalar BigInt

scalar Date

scalar Time

scalar DateTime

scalar JSON

scalar JSONObject

scalar Byte

type Redwood {
  version: String
  currentUser: JSON
  prismaVersion: String
}

type Query {
  redwood: Redwood
  assistant: Assistant
  searchKnowledgeBase(input: SearchKnowledgeBaseInput): [KnowledgeBaseResult]
  bookmarks: [Bookmark!]!
  cellOutput(id: String!): CellOutput
  totalCellOutputs(filters: CellOutputFilter): Int!
  cells(filters: CellOutputFilter): [Cell!]!
  cell(id: String!, filters: CellOutputFilter): Cell
  conversations(referenceId: String, referenceTable: String): [Conversation!]!
  conversation(id: String!): Conversation
  environments: [Environment!]!
  userEnvironments: [Environment!]!
  environment(id: String!): Environment
  githubInstallation: GithubInstallation
  groups: [Group!]!
  group(id: String!): Group
  invitation(id: String!): Invitation!
  logTypes: [LogType!]!
  logs(page: Int!, take: Int, filters: JSON): PaginatedLogs!
  log(id: String!): Log
  notebookMetadata(id: String!): NotebookMetadata
  notebookMetadataOutput(id: String!): NotebookMetadataOutput
  notebooks(filters: NotebookFilter): [Notebook]
  notebook(filters: NotebookFilter, id: String!): Notebook
  totalNotebooks(filters: NotebookFilter): Int!
  notifications(page: Int!, take: Int, filters: JSON): PaginatedNotifications!
  organizations: [Organization!]!
  organization(id: String!): Organization
  roles: [Role!]!
  slackInstallation: SlackInstallation
  getSlackChannels: [SlackChannel]
  cellSuccessRateStats(filters: AnalyticFilterInput!): AxisStat!
  activityLogStats(filters: AnalyticFilterInput!): AxisStat!
  notebookActivityStats(filters: AnalyticFilterInput!): AxisStat!
  sharedActivityStats(filters: AnalyticFilterInput!): AxisStat!
  conversationActivityStats(filters: AnalyticFilterInput!): AxisStat!
  markdownsStats(filters: AnalyticFilterInput!): AxisStat!
  tags: [Tag!]!
  me: User
  workflows(page: Int!, take: Int, fileName: String, all: Boolean): PaginatedWorkflows!
  workflow(id: String!): Workflow!
}

type Subscription {
  chat: ChatMessage
}

type Access {
  id: String!
  userId: String
  user: User
  groupId: String
  group: Group
  sharedById: String!
  sharedBy: User!
  organizationId: String!
  organization: Organization!
  createTime: DateTime!
  updateTime: DateTime!
}

type AccessCellOutput {
  id: String!
  cellOutputId: String!
  cellOutput: CellOutput
  accessId: String!
  access: Access
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
}

type AccessEnvironment {
  id: String!
  environmentId: String!
  environment: Environment
  accessId: String!
  access: Access
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
}

type AccessNotebookMetadataOutput {
  id: String!
  accessId: String!
  access: Access
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
}

type AccessRequest {
  id: String!
  status: AccessRequestStatus!
  referenceId: String!
  referenceTable: String!
  requestedById: String
  requestedBy: User
  organizationId: String!
  organization: Organization
  cellOutput: CellOutput
  notebookMetadataOutput: NotebookMetadataOutput
  createTime: DateTime!
  updateTime: DateTime!
}

enum AccessRequestStatus {
  PENDING
  ACCEPTED
  REJECTED
}

input CreateAccessRequestInput {
  referenceId: String!
  referenceTable: String!
}

input UpdateAccessRequestInput {
  referenceId: String
  referenceTable: String
  requestedById: String
  organizationId: String
  createTime: DateTime
  updateTime: DateTime
}

type Mutation {
  createAccessRequest(input: CreateAccessRequestInput!): AccessRequest!
  acceptAccessRequest(id: String!): AccessRequest!
  rejectAccessRequest(id: String!): AccessRequest!
  createConversationBookmark(input: CreateBookmarkInput!): Bookmark!
  createCellOutputBookmark(input: CreateBookmarkInput!): Bookmark!
  createNotebookOutputBookmark(input: CreateBookmarkInput!): Bookmark!
  createMarkdownBookmark(input: CreateBookmarkInput!): Bookmark!
  deleteBookmark(id: String!): Bookmark!
  createCellExecution(input: CreateCellExecutionInput!): CellExecution!
  updateCellExecution(id: String!, input: UpdateCellExecutionInput!, notifySlack: Boolean = true): CellExecution!
  archiveCellExecution(all: Boolean = false, id: String!): CellExecution
  unArchiveCellExecution(all: Boolean = false, id: String!): CellExecution
  createCellOutput(input: CreateCellOutputInput!): CellOutput!
  createExtensionCellOutput(input: ReporterInput!): CellOutput!
  deleteCellOutput(id: String!): CellOutput!
  updateCellOutput(id: String!, input: UpdateCellOutputInput!): CellOutput!
  archiveCellOutput(all: Boolean = false, id: String!): CellOutput!
  unArchiveCellOutput(all: Boolean = false, id: String!): CellOutput!
  shareCellOutputToSlack(input: ShareCellOutputToSlackInput!): CellOutput!
  updateConversation(id: String!, input: UpdateConversationInput!): Conversation!
  createEnvironment(input: CreateEnvironmentInput!): Environment!
  updateEnvironment(id: String!, input: UpdateEnvironmentInput!): Environment!
  deleteEnvironment(id: String!): Environment!
  handleGithubInstallation(input: HandleGithubInstallationInput!): GithubInstallation!
  syncGithubInstallation: GithubInstallation!
  createGroup(input: CreateGroupInput!): Group!
  updateGroup(id: String!, input: UpdateGroupInput!): Group!
  deleteGroup(id: String!): Group!
  revokeInvitation(input: RevokeInvitationInput!): Invitation!
  declineInvitation(id: String!): Invitation!
  acceptInvitation(id: String!): Invitation!
  createMessage(input: CreateMessageInput!): Message!
  deleteMessage(id: String!): Message!
  updateNotebookMetadataOutput(id: String!, input: UpdateNotebookMetadataOutputInput): Notebook
  shareNotebookMetadataOutputToSlack(input: ShareNotebookMetadataOutputToSlackInput!): Notebook!
  readNotifications: [Notification]!
  updateOrganizationUser(input: UpdateOrganizationUserInput!): Organization!
  deleteOrganizationUser(input: DeleteOrganizationUserInput!): OrganizationUser!
  updateOrganization(id: String!, input: UpdateOrganizationInput!): Organization!
  activeOrganization(id: String!): Organization!
  rateMarkdown(input: RateMarkdownInput!): Rating!
  updateSlackInstallation(input: UpdateSlackInstallationInput!): SlackInstallation!
  deleteSlackInstallation(id: String!): SlackInstallation!
  updateConversationTags(input: UpdateEntityTagsInput!): [Tag]
  updateCellOutputTags(input: UpdateEntityTagsInput!): [Tag]
  updateNotebookOutputTags(input: UpdateEntityTagsInput!): [Tag]
  updateMarkdownTags(input: UpdateEntityTagsInput!): [Tag]
  inviteUserToOrganization(input: InviteUserToOrganizationInput!): User!
  updateUserRole(input: UpdateOrgUserRoleInput!): User!
  updateWorkflow(id: String!, input: UpdateWorkflowInput!): Workflow
}

type Assistant {
  chat(input: ChatInput!): Chat
  search(input: SearchInput!): Search
}

type Chat {
  commands: String
  hits: [Hit!]!
  question: String!
  response: String!
  session: ChatSession
}

input ChatInput {
  executableOnly: Boolean
  question: String!
  session: ChatSessionInput
  internal: Boolean
}

type ChatMessage {
  done: Boolean!
  message: String!
  token: String!
}

type ChatSession {
  collectionName: String!
  expiryMs: Int
  expirySecs: Int
  id: ID!
}

input ChatSessionInput {
  id: ID!
}

type Hit {
  distance: Float
  document: String!
  metadata: [DocMetadata!]!
}

type DocMetadata {
  key: String!
  value: String!
}

type Search {
  hits: [Hit!]!
  query: String!
  stdev: Float
}

input SearchInput {
  exclusion: Boolean
  executableOnly: Boolean
  expect: Int
  metadataKeys: [String]
  query: String!
  internal: Boolean
}

input DataRageFilter {
  from: Date!
  to: Date!
}

input SearchKnowledgeBaseInput {
  entityTypes: [String]
  tags: [String]
  query: String!
  dateRanges: DataRageFilter
}

type KnowledgeBaseResult {
  conversation: Conversation
  cellOutput: CellOutput
  notebook: NotebookMetadataOutput
  workflow: Workflow
  entityType: String!
}

enum PermissionEnum {
  user_read_cell_output
  create_cell_output
  update_cell_output
  delete_cell_output
  user_read_assistant
  org_read_analytics
  user_read_analytics
  user_read_conversation
  create_conversation
  delete_conversation
  update_conversation
  user_read_message
  create_message
  delete_message
  user_read_cell
  user_read_github_installation
  create_github_installation
  update_github_installation
  user_read_invitation
  org_read_invitation
  update_invitation
  delete_invitation
  create_user_invitation
  org_read_log
  user_read_notification
  update_notification
  user_read_organization
  update_organization
  active_organization
  user_read_slack_installation
  create_slack_installation
  update_slack_installation
  delete_slack_installation
  org_read_group
  user_read_group
  create_group
  update_group
  delete_group
  user_read_workflow
  update_workflow
  user_read_access_request
  update_access_request
  create_cell_output_access_request
  user_read_chat
  user_read_user
  user_read_notebook
  user_read_group_user
  org_read_organization_user
  user_read_organization_user
  user_read_user_role
  set_user_role
  org_read_role
  user_read_role
  user_read_cell_notebook_metadata
  user_read_notebook_metadata
  user_read_cell_input
  user_read_notebook_input
  user_read_notebook_identity
  user_read_notebook_session
  org_read_tags
  user_read_tags
  update_markdown_tags
  update_tags
  user_read_access
  user_read_notebook_metadata_output
  update_notebook_metadata_output
  user_read_bookmark
  create_bookmark
  delete_bookmark
  user_read_rating
  update_rating
  create_rating
  user_read_device
  user_read_environment
  org_read_environment
  create_environment
  update_environment
  delete_environment
}

enum RoleEnum {
  admin
  user
  guest
}

type Bookmark {
  id: String!
  userId: String!
  user: User!
  organizationId: String
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  conversation: Conversation
  cellOutput: CellOutput
  notebook: NotebookMetadataOutput
  workflow: Workflow
}

input CreateBookmarkInput {
  resourceId: String!
}

type CellAttachment {
  id: String!
  cellId: String!
  cell: Cell
  name: String!
  type: String!
  size: Int!
  createTime: DateTime!
  updateTime: DateTime!
  organizationId: String
  organization: Organization
}

input CreateCellAttachmentInput {
  cellId: String!
  name: String!
  type: String!
  size: Int!
  organizationId: String
}

input UpdateCellAttachmentInput {
  cellId: String
  name: String
  type: String
  size: Int
  organizationId: String
}

enum ShareType {
  RESTRICTED
  ORGANIZATION
  PUBLIC
}

type Owner {
  bio: String
  company: String
  displayName: String
  githubUsername: String
  linkedin: String
  photoUrl: String
  siteUrl: String
  twitter: String
}

type CellExecution {
  id: String!
  notebookId: String
  lifecycleIdentityId: String
  input: String
  maskedInput: String
  stdout: Bytes
  maskedStdout: Bytes
  stderr: Bytes
  maskedStderr: Bytes
  metadata: Metadata
  exitCode: Int!
  htmlUrl: String
  pid: Int
  userId: String!
  user: User
  languageId: String
  autoSave: Boolean!
  createTime: DateTime!
  updateTime: DateTime
  archivedTime: DateTime
  isOwner: Boolean
  owner: Owner
  inputData: Bytes
  stdoutData: Bytes
  stderrData: Bytes
  history(archived: Boolean = false, autoSave: Boolean): [CellExecution]
  notebook: Notebook
  shareType: ShareType
  unmaskable: Boolean!
  organizationId: String
  isSlackReady: Boolean!
}

type Metadata {
  category: String
  endTime: Float
  exitType: String
  mimeType: String
  name: String
  startTime: Float
}

input MetadataInput {
  category: String
  endTime: Float
  exitType: String
  mimeType: String
  name: String
  startTime: Float
}

input CreateNotebookInput {
  id: String
  runmeVersion: String
  fileName: String
}

input _DeviceInput {
  macAddress: String
  hostname: String
  platform: String
  release: String
  arch: String
  vendor: String
  shell: String
  vsAppHost: String
  vsAppName: String
  vsAppSessionId: String
  vsMachineId: String
  metadata: JSON
}

input CreateCellExecutionInput {
  id: String
  input: Bytes!
  stdout: Bytes!
  stderr: Bytes!
  metadata: MetadataInput!
  notebook: CreateNotebookInput
  exitCode: Int
  pid: Int!
  languageId: String
  shareType: ShareType
  autoSave: Boolean
  createTime: DateTime
  updateTime: DateTime
  archivedTime: DateTime
  repository: String
  branch: String
  commit: String
  fileContent: Bytes
  filePath: String
  sessionId: String
  plainSessionOutput: Bytes
  maskedSessionOutput: Bytes
  device: _DeviceInput
}

input UpdateCellExecutionInput {
  isPrivate: Boolean
}

type CellInput {
  id: String!
  data: Bytes!
  hash: String!
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  cellNotebookMetadataList: [CellNotebookMetadata]
  input: String
  maskedInput: String
}

type CellNotebookMetadata {
  id: String!
  cellId: String!
  cell: Cell
  notebookMetadataId: String!
  notebookMetadata: NotebookMetadata
  cellInputId: String!
  cellInput: CellInput
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  name: String
  category: String
}

type CellOutput {
  id: String!
  description: String
  inputData: Bytes!
  stdoutData: Bytes!
  stderrData: Bytes!
  exitCode: Int!
  pid: Int!
  languageId: String
  shareType: ShareType!
  accessCellOutputs: [AccessCellOutput]
  createTime: DateTime!
  updateTime: DateTime!
  archivedTime: DateTime
  organizationId: String
  organization: Organization
  cellId: String!
  cell(filters: CellOutputFilter): Cell
  userId: String!
  autoSave: Boolean
  lifecycleIdentityId: String
  unmaskable: Boolean!
  user: User
  htmlUrl: String
  isOwner: Boolean
  owner: User
  input: String
  maskedInput: String
  stdout: Bytes
  stderr: Bytes
  maskedStderr: Bytes
  maskedStdout: Bytes
  hasMaskedData: Boolean
  cellNotebookMetadataId: String
  cellNotebookMetadata: CellNotebookMetadata
  conversation: Conversation
  mimeType: String
  endTime: DateTime
  startTime: DateTime
  exitType: String
  tags: [Tag]
  bookmark: Bookmark
  isSlackReady: Boolean
}

input CreateCellOutputInput {
  lifecycleIdentityId: String!
  notebookLifecycleIdentityId: String!
  inputData: Bytes!
  stdoutData: Bytes!
  stderrData: Bytes!
  fileContent: Bytes!
  exitCode: Int!
  pid: Int!
  languageId: String
  metadata: MetadataInput!
  autoSave: Boolean
  fileName: String
  extensionVersion: String
  shareType: ShareType
  branch: String
  repository: String
  commit: String
  filePath: String
  sessionId: String
  plainSessionOutput: Bytes
  maskedSessionOutput: Bytes
  device: _DeviceInput
}

input UpdateCellOutputInput {
  userIds: [String]
  groupIds: [String]
  shareType: ShareType
  unmaskable: Boolean
  notify: Boolean
  description: String
}

input ShareCellOutputToSlackInput {
  cellOutputId: String!
  message: String
  channelId: String!
}

type Cell {
  id: String!
  notebookId: String!
  notebook: Notebook
  userId: String!
  user: User
  organizationId: String
  organization: Organization
  cellOutputs: [CellOutput]
  mainCellOutput: CellOutput
  totalOutputs: Int
}

input CellOutputFilter {
  ownedActive: Boolean
  ownedArchived: Boolean = false
  sharedWithMe: Boolean
  sharedWithOrg: Boolean
}

type Conversation {
  id: String!
  name: String
  description: String
  organizationId: String
  referenceId: String!
  referenceTable: String!
  createTime: DateTime!
  updateTime: DateTime!
  messages: [Message]
  organization: Organization
  cellOutput: CellOutput
  notebookMetadataOutput: NotebookMetadataOutput
  users: [User]
  totalUsers: Int
  totalMessages: Int
  tags: [Tag]
  resourceAccess: ResourceAccess
  isResourceOwner: Boolean
  bookmark: Bookmark
}

input UpdateConversationInput {
  name: String
  description: String
}

type Device {
  id: String!
  macAddress: String
  hostname: String
  platform: String
  distro: String
  release: String
  arch: String
  vendor: String
  brand: String
  shell: String
  vsAppHost: String
  vsAppName: String
  vsSessionId: String
  vsMachineId: String
  metadata: JSON
  organizationId: String
  organization: Organization
  notebookMetadataList: [NotebookMetadata]
}

type Environment {
  id: String!
  name: String!
  description: String
  createTime: DateTime!
  updateTime: DateTime!
  organizationId: String!
  organization: Organization
  accessEnvironments: [AccessEnvironment]
}

input CreateEnvironmentInput {
  name: String!
  description: String
}

input UpdateEnvironmentInput {
  name: String
  description: String
  userIds: [String]
  groupIds: [String]
}

type GithubInstallation {
  id: String!
  appId: Int!
  appSlug: String!
  installationId: Int!
  targetId: Int!
  targetType: GithubTargetType!
  repositorySelection: String!
  permissions: GithubInstallationPermissions!
  accountId: Int!
  accountName: String!
  accountAvatarUrl: String!
  suspendedBy: String
  suspendedAt: DateTime
  createTime: DateTime!
  updateTime: DateTime!
  organization: Organization
  organizationId: String!
  syncingState: SyncingStateEnum
  workflows: [Workflow]
  user: User
  userId: String!
}

enum SyncingStateEnum {
  SYNCING
  SYNCED
  ERROR
}

type GithubInstallationPermissions {
  contents: String
  metadata: String
}

type GithubMarkdown {
  git_url: String!
  html_url: String!
  name: String!
  path: String!
  repository: GithubRepository!
  sha: String!
  url: String!
}

type GithubRepository {
  description: String
  full_name: String
  html_url: String
  id: String
  name: String
  owner: GithubRepositoryOwner
  url: String
}

type GithubRepositoryOwner {
  avatar_url: String
  gravatar_id: String
  html_url: String
  id: String
  login: String
  type: String
  url: String
}

enum GithubTargetType {
  GITHUB_ORGANIZATION
  GITHUB_USER
}

input CreateGithubInstallationInput {
  appId: Int!
  appSlug: String!
  installationId: Int!
  targetId: Int!
  targetType: GithubTargetType!
  repositorySelection: String!
  permissions: JSON!
  accountId: Int!
  accountName: String!
  accountAvatarUrl: String!
  suspendedBy: String
  suspendedAt: DateTime
  userId: String!
}

input HandleGithubInstallationInput {
  installationId: Int!
  setupAction: String!
}

input UpdateGithubInstallationInput {
  appId: Int
  appSlug: String
  installationId: Int
  targetId: Int
  targetType: GithubTargetType
  repositorySelection: String
  permissions: JSON
  accountId: Int
  accountName: String
  accountAvatarUrl: String
  suspendedBy: String
  suspendedAt: DateTime
  userId: String
}

type GroupUser {
  id: String!
  groupId: String!
  group: Group
  userId: String!
  user: User
  organizationId: String!
  organization: Organization
}

input UpdateGroupUserInput {
  groupId: String
  userId: String
  organizationId: String
}

type Group {
  id: String!
  name: String!
  createTime: DateTime!
  updateTime: DateTime!
  groupUsers: [GroupUser]
  organizationId: String!
  organization: Organization
}

input CreateGroupInput {
  name: String!
  userIds: [String]!
}

input UpdateGroupInput {
  name: String
  userIds: [String]
}

type Invitation {
  id: String!
  status: InvitationStatus!
  userId: String!
  user: User
  createdById: String!
  createdBy: User
  referenceId: String!
  referenceTable: String!
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  metadata: InvitationMetadata
}

enum InvitationStatus {
  PENDING
  ACCEPTED
  DECLINED
  REVOKED
}

type InvitationMetadata {
  roleId: String
}

input InvitationMetadataInput {
  roleId: String
}

input CreateInvitationInput {
  userId: String!
  referenceId: String!
  referenceTable: String!
  metadata: InvitationMetadataInput
}

input RevokeInvitationInput {
  userId: String!
  referenceTable: String!
}

input UpdateInvitationInput {
  status: InvitationStatus
  userId: String
  referenceId: String
  referenceTable: String
  organizationId: String
  createTime: DateTime
  updateTime: DateTime
}

type LogType {
  id: String!
  name: String!
  description: String!
  logs: [Log]
}

input CreateLogTypeInput {
  name: String!
  description: String!
}

input UpdateLogTypeInput {
  name: String
  description: String
}

type PaginationMeta {
  totalPages: Int!
  totalUnread: Int
}

type PaginatedLogs {
  data: [Log!]!
  meta: PaginationMeta!
}

type Log {
  id: String!
  logType: LogType!
  userId: String!
  user: User
  data: JSON!
  resourceAccess: ResourceAccess
  createTime: DateTime!
}

enum LogTypeEnum {
  crs
  crf
  cre
  crse
  crae
}

input CreateLogInput {
  type: LogTypeEnum!
  data: JSON!
}

input UpdateLogInput {
  type: LogTypeEnum
  data: JSON
}

type Message {
  id: String!
  message: String!
  isRead: Boolean!
  userId: String!
  user: User
  parentMessageId: String
  parentMessage: Message
  createTime: DateTime!
  updateTime: DateTime!
  messages: [Message]
  conversationId: String!
  conversation: Conversation
}

input CreateMessageInput {
  referenceId: String!
  referenceTable: String!
  message: String!
  parentMessageId: String
}

type NotebookIdentity {
  id: String!
  notebookId: String!
  notebook: Notebook
  value: String!
  type: NotebookIdentityType!
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
}

enum NotebookIdentityType {
  GIT
  LIFECYCLE
}

type NotebookInput {
  id: String!
  data: Bytes!
  hash: String!
  notebookId: String!
  notebook: Notebook
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  notebookMetadataList: [NotebookMetadata]
}

type NotebookMetadata {
  id: String!
  branch: String
  repository: String
  commit: String
  filePath: String
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  notebookId: String!
  notebook: Notebook
  cellNotebookMetadataList: [CellNotebookMetadata]
  notebookInput: NotebookInput
  notebookInputId: String
  extensionVersion: String
  notebookIdentity: NotebookIdentity
  notebookIdentityId: String
  notebookSession: NotebookSession
  notebookSessionId: String
  totalCellOutputs: Int
  deviceId: String
  device: Device
}

type NotebookMetadataHistory {
  id: String!
  notebookMetadataId: String!
  notebookMetadata: NotebookMetadata
  notebookId: String!
  notebook: Notebook
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
}

type NotebookMetadataOutput {
  id: String!
  notebookMetadata: NotebookMetadata
  notebookMetadataId: String!
  organization: Organization
  data: Bytes
  maskedData: Bytes
  createTime: DateTime!
  updateTime: DateTime!
  organizationId: String!
  shareType: ShareType!
  description: String
  unmaskable: Boolean!
  user: User
  userId: String!
  accessNotebookMetadataOutputs: [AccessNotebookMetadataOutput]
  hasMaskedData: Boolean
  isOwner: Boolean
  conversation: Conversation
  tags: [Tag]
  bookmark: Bookmark
}

input ShareNotebookMetadataOutputToSlackInput {
  notebookMetadataOutputId: String!
  message: String
  channelId: String!
}

input UpdateNotebookMetadataOutputInput {
  userIds: [String]
  groupIds: [String]
  shareType: ShareType
  unmaskable: Boolean
  description: String
}

type NotebookSession {
  id: String!
  organizationId: String!
  organization: Organization
  createTime: DateTime!
  updateTime: DateTime!
  sessionId: String!
  cellOutputs: [CellOutput]
}

input CreateNotebookSessionInput {
  organizationId: String!
  environmentId: String
  notebookId: String!
}

input UpdateNotebookSessionInput {
  organizationId: String
  environmentId: String
  notebookId: String
}

type Notebook {
  id: String!
  userId: String!
  user: User
  createTime: DateTime
  updateTime: DateTime
  cells: [Cell]
  notebookIdentity: NotebookIdentity
  currentNotebookMetadata: NotebookMetadata
  organizationId: String!
  Organization: Organization
  shareType: ShareType
  unmaskable: Boolean
  notebookMetadataOutputs: [NotebookMetadataOutput]
  conversation: Conversation
}

input NotebookFilter {
  owned: Boolean
  sharedWithMe: Boolean
  sharedWithOrg: Boolean
}

input _CreateNotebookInput {
  lifecycleIdentityId: String!
}

input UpdateNotebookInput {
  description: String
}

type Notification {
  id: String!
  type: NotificationType!
  userId: String!
  user: User
  organizationId: String!
  organization: Organization
  referenceId: String!
  referenceTable: String!
  isRead: Boolean!
  createTime: DateTime!
  updateTime: DateTime!
  accessRequest: AccessRequest
  invitation: Invitation
  entityMessage: Message
}

type ResourceAccess {
  id: String
  hasAccess: Boolean
  accessRequested: Boolean
}

enum NotificationType {
  CELL_OUTPUT_ACCESS_REQUEST
  CELL_OUTPUT_ACCESS_REQUEST_ACCEPTED
  CELL_OUTPUT_ACCESS_REQUEST_REJECTED
  NOTEBOOK_METADATA_OUTPUT_ACCESS_REQUEST
  NOTEBOOK_METADATA_OUTPUT_ACCESS_REQUEST_ACCEPTED
  NOTEBOOK_METADATA_OUTPUT_ACCESS_REQUEST_REJECTED
  CELL_OUTPUT_MESSAGE_REPLY
  NOTEBOOK_METADATA_OUTPUT_MESSAGE_REPLY
  ORGANIZATION_USER_INVITATION
  ORGANIZATION_USER_INVITATION_ACCEPTED
  ORGANIZATION_USER_INVITATION_DECLINED
}

type PaginatedNotifications {
  data: [Notification!]!
  meta: PaginationMeta!
}

input CreateNotificationInput {
  type: NotificationType!
  userId: String!
  referenceId: String!
  referenceTable: String!
  organizationId: String
}

input UpdateNotificationInput {
  type: NotificationType
  userId: String
  organizationId: String
  referenceId: String
  referenceTable: String
  createTime: DateTime
  updateTime: DateTime
}

type OrganizationUser {
  id: String!
  organizationId: String!
  organization: Organization
  userId: String!
  user: User
  isActive: Boolean
  defaultShareType: ShareType
}

input DeleteOrganizationUserInput {
  userId: String!
}

input CreateOrganizationUserInput {
  organizationId: String!
  userId: String!
  roleId: String!
  isActive: Boolean
}

input UpdateOrganizationUserInput {
  defaultShareType: ShareType
}

type OrgMetadata {
  isIndexingEnabled: Boolean
  isRenamed: Boolean
  hasSavedCells: Boolean
}

type Organization {
  id: String!
  name: String
  isDefault: Boolean!
  defaultShareType: ShareType
  createTime: DateTime!
  updateTime: DateTime!
  metadata: OrgMetadata!
  organizationUsers: [OrganizationUser]
  groups: [Group]
  invitations: [Invitation]
  domain: String
}

input CreateOrganizationInput {
  name: String!
}

input OrgMetadataInput {
  isIndexingEnabled: Boolean
  isRenamed: Boolean
  hasSavedCells: Boolean
}

input UpdateOrganizationInput {
  name: String
  defaultShareType: ShareType
  metadata: OrgMetadataInput
}

input AddUserToOrganizationInput {
  id: String!
  userId: String!
}

input RemoveUserFromOrganization {
  id: String!
  userId: String!
}

type Rating {
  id: String!
  rating: Int!
  createTime: DateTime!
  updateTime: DateTime!
  user: User
  userId: String
  organizationId: String
  organization: Organization
}

input RateMarkdownInput {
  rating: Int
  markdownId: String
}

input ReporterInput {
  notebook: ReporterNotebookInput!
  extension: ReporterExtensionInput!
}

input ReporterExtensionInput {
  autoSave: Boolean
  git: ReporterGitInput
  file: ReporterFileInput
  session: ReporterSessionInput!
  device: ReporterDeviceInput
}

input ReporterGitInput {
  repository: String
  branch: String
  commit: String
}

input ReporterSessionInput {
  plainOutput: Bytes!
  maskedOutput: Bytes!
}

input ReporterFileInput {
  path: String
  content: Bytes
}

input ReporterDeviceInput {
  macAddress: String
  hostname: String
  platform: String
  release: String
  arch: String
  vendor: String
  shell: String
  vsAppHost: String
  vsAppName: String
  vsAppSessionId: String
  vsMachineId: String
  vsMetadata: JSON
}

input ReporterNotebookInput {
  cells: [ReporterCellInput!]!
  metadata: JSON
  frontmatter: ReporterFrontmatterInput!
}

input ReporterExecutionSummaryTimingInput {
  startTime: Int64Input
  endTime: Int64Input
}

input ReporterCellOutputItemInput {
  data: Bytes!
  type: String
  mime: String
}

input ReporterProcessInfoExitReasonInput {
  type: String
  code: UInt32
}

input ReporterCellOutputProcessInfoInput {
  exitReason: ReporterProcessInfoExitReasonInput
  pid: Int64Input
}

input ReporterCellOutputInput {
  items: [ReporterCellOutputItemInput!]!
  metadata: JSON
  processInfo: ReporterCellOutputProcessInfoInput
}

input ReporterCellMetadataInput {
  id: String
  name: String
  category: String
  mimeType: String
}

input ReporterCellExecutionSummaryInput {
  executionOrder: UInt32
  success: BooleanInput
  timing: ReporterExecutionSummaryTimingInput
}

input ReporterTextRangeInput {
  start: Int
  end: Int
}

input ReporterCellInput {
  kind: Int
  value: String!
  languageId: String
  metadata: ReporterCellMetadataInput
  textRange: ReporterTextRangeInput
  outputs: [ReporterCellOutputInput!]!
  executionSummary: ReporterCellExecutionSummaryInput
}

enum ReporterRunmeIdentity {
  RUNME_IDENTITY_UNSPECIFIED
  RUNME_IDENTITY_ALL
  RUNME_IDENTITY_DOCUMENT
  RUNME_IDENTITY_CELL
}

input ReporterRunmeSessionDocumentInput {
  relativePath: String
}

input ReporterRunmeSessionInput {
  id: String!
  document: ReporterRunmeSessionDocumentInput
}

input ReporterFrontmatterRunmeInput {
  id: String!
  version: String
  session: ReporterRunmeSessionInput!
}

input ReporterFrontmatterInput {
  shell: String
  cwd: String
  skipPrompts: Boolean
  runme: ReporterFrontmatterRunmeInput!
  category: String
  terminalRows: String
}

input BooleanInput {
  value: Boolean
}

input Int64Input {
  value: String
}

input UInt32 {
  value: Int
}

type Role {
  id: String!
  name: String!
  createTime: DateTime!
  updateTime: DateTime!
}

input CreateRoleInput {
  name: String!
}

input UpdateRoleInput {
  name: String
  createTime: DateTime
  updateTime: DateTime
}

scalar Bytes

scalar IntOrString

type SlackInstallation {
  id: String!
  appId: String!
  teamId: String!
  teamName: String!
  token: Bytes!
  tokenType: SlackTokenType
  scopes: String!
  data: JSON!
  defaultChannelId: String
  defaultChannelName: String
  createTime: DateTime!
  updateTime: DateTime!
  organization: Organization
}

enum SlackTokenType {
  SLACK_BOT
  SLACK_USER
}

type SlackChannel {
  id: String!
  name: String!
}

input CreateSlackInstallationInput {
  appId: String!
  teamId: String!
  teamName: String!
  token: Bytes!
  tokenType: SlackTokenType
  scopes: String!
  data: JSON!
  defaultChannelId: String
  defaultChannelName: String
}

input UpdateSlackInstallationInput {
  defaultChannelId: String
  defaultChannelName: String
}

enum AnalyticRanges {
  Weekly
  Monthly
  Bimonthly
  Quarterly
}

type AxisData {
  xAxis: IntOrString
  yAxis: Int
  date: DateTime
}

type AxisStat {
  legends: [JSON]
  data: [AxisData]!
}

input AnalyticFilterInput {
  range: AnalyticRanges!
  xAxis: [IntOrString]
  teamId: String
}

type Tag {
  id: String!
  name: String!
  organizationId: String!
  organization: Organization
}

input CreateTagInput {
  name: String!
}

input UpdateTagInput {
  name: String
  organizationId: String
}

input UpdateEntityTagsInput {
  tagNames: [String!]
  id: String!
}

type UserRole {
  id: String!
  userId: String!
  user: User
  roleId: String!
  role: Role
  createTime: DateTime!
  updateTime: DateTime!
  organizationId: String!
  organization: Organization
}

input CreateUserRoleInput {
  userId: String!
  roleId: String!
  organizationId: String!
}

input UpdateUserRoleInput {
  userId: String
  roleId: String
  createTime: DateTime
  updateTime: DateTime
  organizationId: String
}

type User {
  id: String!
  username: String
  displayName: String
  email: String!
  photoUrl: String
  auth0Id: String
  signupOrigin: SignupOrigin
  createTime: DateTime
  updateTime: DateTime
  cells: [Cell]
  SlackInstallations: [SlackInstallation]
  Notebook: [Notebook]
  groupUsers: [GroupUser]
  organizationUsers: [OrganizationUser]
  userRoles: [UserRole]
}

enum SignupOrigin {
  UNKNOWN
  RUNME_CLI
  RUNME_VSCODE
  RUNME_APP
  RUNME_FIREBASE
}

input CreateUserInput {
  displayName: String
  email: String!
}

input UpdateUserInput {
  displayName: String
}

input InviteUserToOrganizationInput {
  displayName: String
  email: String!
  roleId: String!
}

input UpdateOrgUserRoleInput {
  id: String!
  roleId: String
}

type Workflow {
  id: String!
  description: String
  fileName: String!
  path: String!
  repository: String!
  githubInstallation: GithubInstallation
  githubInstallationId: String
  data: Bytes
  createTime: DateTime
  updateTime: DateTime
  rating: Rating
  totalRatings: Int
  bookmark: Bookmark
  organizationId: String
  organization: Organization
  tags: [Tag]
}

type PaginatedWorkflowsMeta {
  totalPages: Int!
  total: Int!
}

type PaginatedWorkflows {
  data: [Workflow!]!
  meta: PaginatedWorkflowsMeta!
}

input CreateWorkflowInput {
  fileName: String!
  path: String!
  repository: String!
  githubInstallationId: String
}

input UpdateWorkflowInput {
  description: String
}
