Hierarchy (view full)

Constructors

Accessors

Methods

  • Filters encrypted field values before sending to the API client.

    For each encrypted field in the entity:

    • If AllowDecryptInAPI is true: value passes through unchanged (already decrypted by data provider)
    • If AllowDecryptInAPI is false and SendEncryptedValue is true: re-encrypt and send ciphertext
    • If AllowDecryptInAPI is false and SendEncryptedValue is false: replace with sentinel value

    Parameters

    • entityName: string

      Name of the entity

    • dataObject: Record<string, unknown>

      The data object containing field values

    • contextUser: UserInfo

      User context for encryption operations

    Returns Promise<Record<string, unknown>>

    The filtered data object

  • Maps field names to their GraphQL-safe CodeNames and handles encryption for API responses.

    For encrypted fields coming from raw SQL queries (not entity objects):

    • AllowDecryptInAPI=true: Decrypt the value before sending to client
    • AllowDecryptInAPI=false + SendEncryptedValue=true: Keep encrypted ciphertext
    • AllowDecryptInAPI=false + SendEncryptedValue=false: Replace with sentinel

    Parameters

    • entityName: string

      The entity name

    • dataObject: any

      The data object with field values

    • Optional contextUser: UserInfo

      Optional user context for decryption (required for encrypted fields)

    Returns Promise<any>

    The processed data object

  • Public mutation for regular users to run AI agents with authentication.

    Parameters

    • agentId: string
    • __namedParameters: AppContext
    • messagesJson: string
    • sessionId: string
    • pubSub: PubSubEngine
    • Optional data: string
    • Optional payload: string
    • Optional templateData: string
    • Optional lastRunId: string
    • Optional autoPopulateLastRunPayload: boolean
    • Optional configurationId: string
    • Optional conversationDetailId: string
    • Optional createArtifacts: boolean
    • Optional createNotification: boolean
    • Optional sourceArtifactId: string
    • Optional sourceArtifactVersionId: string

    Returns Promise<AIAgentRunResult>

  • Optimized mutation that loads conversation history server-side. This avoids sending large attachment data from client to server.

    Parameters

    • conversationDetailId: string

      The conversation detail ID (user's message already saved)

    • agentId: string

      The agent to execute

    • __namedParameters: AppContext
    • sessionId: string
    • pubSub: PubSubEngine
    • Optional maxHistoryMessages: number

      Maximum number of history messages to include (default: 20)

    • Optional data: string
    • Optional payload: string
    • Optional lastRunId: string
    • Optional autoPopulateLastRunPayload: boolean
    • Optional configurationId: string
    • Optional createArtifacts: boolean
    • Optional createNotification: boolean
    • Optional sourceArtifactId: string
    • Optional sourceArtifactVersionId: string

    Returns Promise<AIAgentRunResult>

  • System user query for running AI agents with elevated privileges. Requires the

    Parameters

    • agentId: string
    • __namedParameters: AppContext
    • messagesJson: string
    • sessionId: string
    • pubSub: PubSubEngine
    • Optional data: string
    • Optional payload: string
    • Optional templateData: string
    • Optional lastRunId: string
    • Optional autoPopulateLastRunPayload: boolean
    • Optional configurationId: string
    • Optional conversationDetailId: string
    • Optional createArtifacts: boolean
    • Optional createNotification: boolean
    • Optional sourceArtifactId: string
    • Optional sourceArtifactVersionId: string

    Returns Promise<AIAgentRunResult>

    Require System User

    decorator to ensure only system users can access.

  • Optimized RunViewGenericInternal implementation with:

    • Field filtering at source (Fix #7)
    • Improved error handling (Fix #9)

    Parameters

    • provider: DatabaseProviderBase
    • viewInfo: UserViewEntityExtended
    • extraFilter: string
    • orderBy: string
    • userSearchString: string
    • excludeUserViewRunID: string
    • overrideExcludeFilter: string
    • saveViewResults: boolean
    • fields: string[]
    • ignoreMaxRows: boolean
    • excludeDataFromAllPriorViewRuns: boolean
    • forceAuditLog: boolean
    • auditLogDescription: string
    • resultType: string
    • userPayload: UserPayload
    • maxRows: number
    • startRow: number

    Returns Promise<RunViewResult<any>>

  • This 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.

    Parameters

    Returns Promise<void>

  • Create a user notification for agent completion with artifact Notification includes navigation link back to the conversation

    Parameters

    • agentRun: AIAgentRunEntityExtended
    • artifactInfo: {
          artifactId: string;
          versionId: string;
          versionNumber: number;
      }
      • artifactId: string
      • versionId: string
      • versionNumber: number
    • conversationDetailId: string
    • contextUser: UserInfo
    • pubSub: PubSubEngine
    • userPayload: UserPayload

    Returns Promise<void>

  • Private

    Internal method that handles the core AI agent execution logic. This method is called by both the regular and system user resolvers.

    Parameters

    • p: DatabaseProviderBase
    • dataSource: any
    • agentId: string
    • userPayload: UserPayload
    • messagesJson: string
    • sessionId: string
    • pubSub: PubSubEngine
    • Optional data: string
    • Optional payload: string
    • Optional templateData: string
    • Optional lastRunId: string
    • Optional autoPopulateLastRunPayload: boolean
    • Optional configurationId: string
    • Optional conversationDetailId: string
    • createArtifacts: boolean = false
    • createNotification: boolean = false
    • Optional sourceArtifactId: string
    • Optional sourceArtifactVersionId: string

    Returns Promise<AIAgentRunResult>