## currentUser **Type:** GraphQL queries **Description:** Resolve the profile of the currently authenticated user. ### Response **Type:** User **Description:** Team member account with permissions, preferences, and structure assignments. #### Fields - _id (String) - createdAt (Date) - username (String) - email (String) - userPreferences (JSON) - availability (UserChatStatus) - isActive (Boolean) - details (UserDetailsType) - links (JSON) - status (String) - emailSignatures (JSON) - groupIds (String) - workspaceIds (String) - isSubscribed (String) - customFieldsData (JSON) - workspaces (Workspace) - isOwner (Boolean) - permissionActions (JSON) - configs (JSON) - configsConstants (JSON) - onboardingHistory (OnboardingHistory) - departmentIds (String) - departments (Department) - branchIds (String) - branches (Branch) - positionIds (String) - positions (Position) - score (Float) - scoreCategories (ScoreCategories) - leaderBoardPosition (Int) - employeeId (String) - isOnline (Boolean) --- ## inboxFields **Type:** GraphQL queries **Description:** Retrieves available custom fields for inbox entities. Returns field definitions for customers, conversations, and devices. ### Response **Type:** InboxField **Description:** Available custom field definitions for inbox entities. #### Fields - customer (Field): Custom fields available on customer records. - conversation (Field): Custom fields available on conversations. - device (Field): Custom fields available on device/browser data. --- ## knowledgeBaseTopics **Type:** GraphQL queries ### Arguments - page (Int) - perPage (Int) - workspaceId (String) - codes (String) ### Response **Type:** KnowledgeBaseTopicsPaginated **Description:** Paginated list of knowledge base topics. #### Fields - data (KnowledgeBaseTopic): The list of topics for the current page. - pagination (PaginationInfo): Pagination metadata. --- ## knowledgeBaseTopicDetail **Type:** GraphQL queries ### Arguments - _id (String) ### Response **Type:** KnowledgeBaseTopic **Description:** A knowledge base topic — the top-level organizational unit. Topics are associated with a brand and contain categories of articles. They can be styled with custom colors and background images. #### Fields - _id (String) - code (String): Unique code identifier for programmatic access. - title (String): The topic title. - description (String): Description of the topic. - categories (KnowledgeBaseCategory): Categories within this topic. - workspace (Workspace) - color (String) - backgroundImage (String): URL of the background image for the topic page. - languageCode (String): ISO language code for the topic content (e.g. 'en', 'ar'). - createdBy (String): User ID of the topic creator. - createdDate (Date): When this topic was created. - modifiedBy (String): User ID of the last modifier. - modifiedDate (Date): When this topic was last modified. - parentCategories (KnowledgeBaseParentCategory): Top-level parent categories within this topic. --- ## knowledgeBaseTopicsTotalCount **Type:** GraphQL queries **Description:** Return the total number of knowledge base topics. ### Response **Type:** Int --- ## knowledgeBaseCategories **Type:** GraphQL queries **Description:** List knowledge base categories with pagination. Filter by topic, code, or icon. ### Arguments - page (Int) - perPage (Int) - ids (String) - topicIds (String) - codes (String) - icon (String) ### Response **Type:** KnowledgeBaseCategoriesPaginated **Description:** Paginated list of knowledge base categories. #### Fields - data (KnowledgeBaseCategory): The list of categories for the current page. - pagination (PaginationInfo): Pagination metadata. --- ## knowledgeBaseCategoryDetail **Type:** GraphQL queries **Description:** Retrieve a single knowledge base category by ID. ### Arguments - _id (String) ### Response **Type:** KnowledgeBaseCategory **Description:** A category that groups related knowledge base articles together. Categories can be nested under parent categories for hierarchical organization. #### Fields - _id (String) - code (String): Unique code identifier for programmatic access. - title (String): The category title. - description (String): Description of what this category covers. - articles (KnowledgeBaseArticle): Articles in this category, optionally filtered by status. - icon (String): Icon identifier for the category. - createdBy (String): User ID of the category creator. - createdDate (Date): When this category was created. - modifiedBy (String): User ID of the last modifier. - modifiedDate (Date): When this category was last modified. - parentCategoryId (String): Parent category ID for nested categorization. - firstTopic (KnowledgeBaseTopic): The first topic this category belongs to. - authors (User): Users who have authored articles in this category. - numOfArticles (Float): Count of articles in this category, optionally filtered by status. - countArticles (Int): Total article count in this category. --- ## knowledgeBaseCategoriesTotalCount **Type:** GraphQL queries **Description:** Return the total number of categories matching the given filters. ### Arguments - topicIds (String) - codes (String) ### Response **Type:** Int --- ## knowledgeBaseCategoriesGetLast **Type:** GraphQL queries **Description:** Return the most recently created knowledge base category. ### Response **Type:** KnowledgeBaseCategory **Description:** A category that groups related knowledge base articles together. Categories can be nested under parent categories for hierarchical organization. #### Fields - _id (String) - code (String): Unique code identifier for programmatic access. - title (String): The category title. - description (String): Description of what this category covers. - articles (KnowledgeBaseArticle): Articles in this category, optionally filtered by status. - icon (String): Icon identifier for the category. - createdBy (String): User ID of the category creator. - createdDate (Date): When this category was created. - modifiedBy (String): User ID of the last modifier. - modifiedDate (Date): When this category was last modified. - parentCategoryId (String): Parent category ID for nested categorization. - firstTopic (KnowledgeBaseTopic): The first topic this category belongs to. - authors (User): Users who have authored articles in this category. - numOfArticles (Float): Count of articles in this category, optionally filtered by status. - countArticles (Int): Total article count in this category. --- ## knowledgeBaseArticles **Type:** GraphQL queries **Description:** List knowledge base articles with pagination, search, sorting, and filtering. ### Arguments - searchValue (String) - page (Int) - perPage (Int) - categoryIds (String) - articleIds (String) - codes (String) - topicIds (String) - sortField (String) - sortDirection (SortDirection): undefined - status (String) ### Response **Type:** KnowledgeBaseArticlesPaginated **Description:** Paginated list of knowledge base articles. #### Fields - data (KnowledgeBaseArticle): The list of articles for the current page. - pagination (PaginationInfo): Pagination metadata. --- ## knowledgeBaseArticleDetail **Type:** GraphQL queries **Description:** Retrieve a single knowledge base article by ID. ### Arguments - _id (String) ### Response **Type:** KnowledgeBaseArticle **Description:** A knowledge base article containing help content, documentation, or guides. Articles belong to categories within topics and support rich content, attachments, and reactions. #### Fields - _id (String) - code (String): Unique code identifier for programmatic access. - title (String): The article title. - summary (String): Brief summary or excerpt of the article content. - content (String): Full article content (HTML). - status (String): Publication status: 'draft', 'publish', or 'scheduled'. - isPrivate (Boolean): Whether this article is only visible to team members. - reactionChoices (String): Available emoji reaction types for this article. - reactionCounts (JSON): Count of each reaction type received. - createdBy (String): User ID of the article creator. - createdUser (User): The resolved user who created this article. - createdDate (Date): When this article was created. - modifiedBy (String): User ID of the last modifier. - modifiedDate (Date): When this article was last modified. - topicId (String): The topic this article belongs to. - categoryId (String): The category this article belongs to. - viewCount (Int): Total number of times this article has been viewed. - attachments (Attachment): File attachments included with this article. - image (Attachment): Featured image for the article. - pdfAttachment (PdfAttachment): PDF attachment with extracted page images. - publishedUserId (String): User ID of who published this article. - publishedUser (User): The resolved user who published this article. - scheduledDate (Date): Scheduled publication date (for status 'scheduled'). - forms (FormCode): Forms embedded in this article. --- ## knowledgeBaseArticlesTotalCount **Type:** GraphQL queries **Description:** Return the total number of articles matching the given filters. ### Arguments - categoryIds (String) - codes (String) - articleIds (String) - topicIds (String) - status (String) ### Response **Type:** Int --- ## knowledgeBaseSearch **Type:** GraphQL queries **Description:** Perform a semantic search across knowledge base articles using vector similarity. ### Arguments - query (String) - kbTopicId (String) - topK (Int) - filters (JSON) - rerank (Boolean) - rerankMethod (String) - hybridAlpha (Float) ### Response **Type:** KnowledgeBaseSearchResult **Description:** Results from a knowledge base semantic search query. #### Fields - query (String): The original search query. - totalResults (Int): Total number of matching results. - results (KnowledgeBaseSearchHit): The search result hits, ordered by relevance. - citations (JSON): Source citations for the results.