Private EventProtected AfterProtected AfterProtected AfterProtected ArrayProtected ArrayOptional contextUser: UserInfoProtected BeforeProtected BeforeProtected BeforeProtected CheckProtected CreateProtected DeleteProtected EmitProtected FilterFilters encrypted field values before sending to the API client.
For each encrypted field in the entity:
Name of the entity
The data object containing field values
User context for encryption operations
The filtered data object
Protected GetProtected GetProtected ListenProtected MapMaps field names to their GraphQL-safe CodeNames and handles encryption for API responses.
For encrypted fields coming from raw SQL queries (not entity objects):
The entity name
The data object with field values
Optional contextUser: UserInfoOptional user context for decryption (required for encrypted fields)
The processed data object
Private PublishPrivate PublishPublic mutation for regular users to run AI agents with authentication.
Optional data: stringOptional payload: stringOptional templateData: stringOptional lastRunId: stringOptional autoPopulateLastRunPayload: booleanOptional configurationId: stringOptional conversationDetailId: stringOptional createArtifacts: booleanOptional createNotification: booleanOptional sourceArtifactId: stringOptional sourceArtifactVersionId: stringOptimized mutation that loads conversation history server-side. This avoids sending large attachment data from client to server.
The conversation detail ID (user's message already saved)
The agent to execute
Optional maxHistoryMessages: numberMaximum number of history messages to include (default: 20)
Optional data: stringOptional payload: stringOptional lastRunId: stringOptional autoPopulateLastRunPayload: booleanOptional configurationId: stringOptional createArtifacts: booleanOptional createNotification: booleanOptional sourceArtifactId: stringOptional sourceArtifactVersionId: stringSystem user query for running AI agents with elevated privileges. Requires the
Optional data: stringOptional payload: stringOptional templateData: stringOptional lastRunId: stringOptional autoPopulateLastRunPayload: booleanOptional configurationId: stringOptional conversationDetailId: stringOptional createArtifacts: booleanOptional createNotification: booleanOptional sourceArtifactId: stringOptional sourceArtifactVersionId: stringdecorator to ensure only system users can access.
Protected RunOptimized RunViewGenericInternal implementation with:
Protected RunOptimized implementation that:
Protected TestThis routine compares the OldValues property in the input object to the values in the DB that we just loaded. If there are differences, we need to check to see if the client is trying to update any of those fields (e.g. overlap). If there is overlap, we throw an error. If there is no overlap, we can proceed with the update even if the DB Values and the ClientOldValues are not 100% the same, so long as there is no overlap in the specific FIELDS that are different.
ASSUMES: input object has an OldValues___ property that is an array of Key/Value pairs that represent the old values of the record that the client is trying to update.
Protected UpdateProtected createPrivate createCreate a user notification for agent completion with artifact Notification includes navigation link back to the conversation
Private createCreate streaming progress callback
Protected createPrivate createCreate streaming content callback
Private executeAIAgentPrivate Internal method that handles the core AI agent execution logic. This method is called by both the regular and system user resolvers.
Optional data: stringOptional payload: stringOptional templateData: stringOptional lastRunId: stringOptional autoPopulateLastRunPayload: booleanOptional configurationId: stringOptional conversationDetailId: stringOptional sourceArtifactId: stringOptional sourceArtifactVersionId: stringPrivate extractProtected findProtected getPrivate loadLoad conversation history with attachments from database. Builds ChatMessage[] with multimodal content blocks for attachments.
Private mapProtected packageSPParamPrivate parsePrivate publishPublish final streaming events (partial result and completion)
Protected safePrivate sanitizePrivate validate
Filters encrypted fields for an array of data objects