Circle V2 API Docs
    Preparing search index...

    Variable aiFeedbackRepoConst

    aiFeedbackRepo: DbRepo<
        {
            countForSuperadmin: (
                params: Omit<ListAiFeedbackForSuperadminParams, "limit" | "offset">,
            ) => Promise<number>;
            deleteOwnVote: (
                params: { createdBy: UserId; feedbackKey?: string; targetRef: string },
            ) => Promise<number>;
            getNotificationContext: (
                id: AiFeedbackId,
            ) => Promise<
                | {
                    entity_name: string
                    | null;
                    question: string | null;
                    submitted_by_email: string | null;
                    submitted_by_first_name: string | null;
                    submitted_by_last_name: string | null;
                }
                | null,
            >;
            getVoteContentById: (
                id: AiFeedbackId,
            ) => Promise<
                | Pick<
                    {
                        addressed_at: string & { __brand: "DbDate" }
                        | null;
                        addressed_by: string & { __brand: "UserId" } | null;
                        assigned_to: string & { __brand: "UserId" } | null;
                        audit_question_id: string & { __brand: "AuditQuestionId" } | null;
                        audit_response_id: string & { __brand: "AuditResponseId" } | null;
                        audit_run_id: string & { __brand: "AuditRunId" } | null;
                        comment: string | null;
                        conversation_id: string | null;
                        correction: string | null;
                        created_at: DbDate;
                        created_by: string & { __brand: "UserId" } | null;
                        entity_id: number & { __brand: "EntityId" } | null;
                        feedback_key: string;
                        flow:
                            | "case_chat"
                            | "chart_review"
                            | "note_generation"
                            | "note_validation";
                        id: AiFeedbackId;
                        langsmith_feedback_id: string
                        | null;
                        langsmith_run_id: string | null;
                        langsmith_thread_id: string | null;
                        linear_issue_url: string | null;
                        message_id: string | null;
                        model: string | null;
                        patient_id: string & { __brand: "PatientId" } | null;
                        patient_session_id: string & { __brand: "SessionId" } | null;
                        prompt_tag: string | null;
                        prompt_version: string | null;
                        rating: "thumbs_up" | "thumbs_down";
                        resolution_note: string | null;
                        resolution_ref: string | null;
                        severity: "low" | "medium" | "high" | "critical" | null;
                        status:
                            | "open"
                            | "acknowledged"
                            | "in_progress"
                            | "addressed"
                            | "reopened"
                            | "dismissed";
                        target_ref: string;
                        target_snapshot: string
                        | null;
                        thread_snapshot: AiFeedbackThreadTurn[] | null;
                    },
                    "rating"
                    | "comment"
                    | "correction",
                >
                | null,
            >;
            linkLinearIssueForSuperadmin: (
                params: {
                    actor: UserId;
                    ids: AiFeedbackId[];
                    linearIssueIdentifier: string;
                    linearIssueUrl: string;
                },
            ) => Promise<AiFeedbackId[]>;
            listForSuperadmin: (
                params: ListAiFeedbackForSuperadminParams,
            ) => Promise<SuperadminAiFeedbackRow[]>;
            listForTicketContext: (
                ids: AiFeedbackId[],
            ) => Promise<AiFeedbackTicketContextRow[]>;
            listOwnByTargets: (
                params: {
                    createdBy: UserId;
                    feedbackKey?: string;
                    targetRefs: string[];
                },
            ) => Promise<
                {
                    addressed_at: string & { __brand: "DbDate" }
                    | null;
                    addressed_by: string & { __brand: "UserId" } | null;
                    assigned_to: string & { __brand: "UserId" } | null;
                    audit_question_id: string & { __brand: "AuditQuestionId" } | null;
                    audit_response_id: string & { __brand: "AuditResponseId" } | null;
                    audit_run_id: string & { __brand: "AuditRunId" } | null;
                    comment: string | null;
                    conversation_id: string | null;
                    correction: string | null;
                    created_at: DbDate;
                    created_by: string & { __brand: "UserId" } | null;
                    entity_id: number & { __brand: "EntityId" } | null;
                    feedback_key: string;
                    flow:
                        | "case_chat"
                        | "chart_review"
                        | "note_generation"
                        | "note_validation";
                    id: AiFeedbackId;
                    langsmith_feedback_id: string
                    | null;
                    langsmith_run_id: string | null;
                    langsmith_thread_id: string | null;
                    linear_issue_url: string | null;
                    message_id: string | null;
                    model: string | null;
                    patient_id: string & { __brand: "PatientId" } | null;
                    patient_session_id: string & { __brand: "SessionId" } | null;
                    prompt_tag: string | null;
                    prompt_version: string | null;
                    rating: "thumbs_up" | "thumbs_down";
                    resolution_note: string | null;
                    resolution_ref: string | null;
                    severity: "low" | "medium" | "high" | "critical" | null;
                    status:
                        | "open"
                        | "acknowledged"
                        | "in_progress"
                        | "addressed"
                        | "reopened"
                        | "dismissed";
                    target_ref: string;
                    target_snapshot: string
                    | null;
                    thread_snapshot: AiFeedbackThreadTurn[] | null;
                }[],
            >;
            setLangsmithRefs: (
                params: {
                    id: AiFeedbackId;
                    langsmithFeedbackId: string;
                    langsmithRunId: string;
                },
            ) => Promise<void>;
            setSeverityForSuperadmin: (
                params: {
                    actor: UserId;
                    id: AiFeedbackId;
                    severity: "low" | "medium" | "high" | "critical";
                },
            ) => Promise<
                {
                    addressed_at: string & { __brand: "DbDate" }
                    | null;
                    addressed_by: string & { __brand: "UserId" } | null;
                    assigned_to: string & { __brand: "UserId" } | null;
                    audit_question_id: string & { __brand: "AuditQuestionId" } | null;
                    audit_response_id: string & { __brand: "AuditResponseId" } | null;
                    audit_run_id: string & { __brand: "AuditRunId" } | null;
                    comment: string | null;
                    conversation_id: string | null;
                    correction: string | null;
                    created_at: DbDate;
                    created_by: string & { __brand: "UserId" } | null;
                    entity_id: number & { __brand: "EntityId" } | null;
                    feedback_key: string;
                    flow:
                        | "case_chat"
                        | "chart_review"
                        | "note_generation"
                        | "note_validation";
                    id: AiFeedbackId;
                    langsmith_feedback_id: string
                    | null;
                    langsmith_run_id: string | null;
                    langsmith_thread_id: string | null;
                    linear_issue_url: string | null;
                    message_id: string | null;
                    model: string | null;
                    patient_id: string & { __brand: "PatientId" } | null;
                    patient_session_id: string & { __brand: "SessionId" } | null;
                    prompt_tag: string | null;
                    prompt_version: string | null;
                    rating: "thumbs_up" | "thumbs_down";
                    resolution_note: string | null;
                    resolution_ref: string | null;
                    severity: "low" | "medium" | "high" | "critical" | null;
                    status:
                        | "open"
                        | "acknowledged"
                        | "in_progress"
                        | "addressed"
                        | "reopened"
                        | "dismissed";
                    target_ref: string;
                    target_snapshot: string
                    | null;
                    thread_snapshot: AiFeedbackThreadTurn[] | null;
                },
            >;
            setStatusForSuperadmin: (
                params: {
                    actor: UserId;
                    id: AiFeedbackId;
                    resolutionNote?: string | null;
                    status:
                        | "open"
                        | "acknowledged"
                        | "in_progress"
                        | "addressed"
                        | "reopened"
                        | "dismissed";
                },
            ) => Promise<
                {
                    addressed_at: string & { __brand: "DbDate" }
                    | null;
                    addressed_by: string & { __brand: "UserId" } | null;
                    assigned_to: string & { __brand: "UserId" } | null;
                    audit_question_id: string & { __brand: "AuditQuestionId" } | null;
                    audit_response_id: string & { __brand: "AuditResponseId" } | null;
                    audit_run_id: string & { __brand: "AuditRunId" } | null;
                    comment: string | null;
                    conversation_id: string | null;
                    correction: string | null;
                    created_at: DbDate;
                    created_by: string & { __brand: "UserId" } | null;
                    entity_id: number & { __brand: "EntityId" } | null;
                    feedback_key: string;
                    flow:
                        | "case_chat"
                        | "chart_review"
                        | "note_generation"
                        | "note_validation";
                    id: AiFeedbackId;
                    langsmith_feedback_id: string
                    | null;
                    langsmith_run_id: string | null;
                    langsmith_thread_id: string | null;
                    linear_issue_url: string | null;
                    message_id: string | null;
                    model: string | null;
                    patient_id: string & { __brand: "PatientId" } | null;
                    patient_session_id: string & { __brand: "SessionId" } | null;
                    prompt_tag: string | null;
                    prompt_version: string | null;
                    rating: "thumbs_up" | "thumbs_down";
                    resolution_note: string | null;
                    resolution_ref: string | null;
                    severity: "low" | "medium" | "high" | "critical" | null;
                    status:
                        | "open"
                        | "acknowledged"
                        | "in_progress"
                        | "addressed"
                        | "reopened"
                        | "dismissed";
                    target_ref: string;
                    target_snapshot: string
                    | null;
                    thread_snapshot: AiFeedbackThreadTurn[] | null;
                },
            >;
            upsertVote: (
                params: UpsertAiFeedbackParams,
            ) => Promise<
                {
                    addressed_at: string & { __brand: "DbDate" }
                    | null;
                    addressed_by: string & { __brand: "UserId" } | null;
                    assigned_to: string & { __brand: "UserId" } | null;
                    audit_question_id: string & { __brand: "AuditQuestionId" } | null;
                    audit_response_id: string & { __brand: "AuditResponseId" } | null;
                    audit_run_id: string & { __brand: "AuditRunId" } | null;
                    comment: string | null;
                    conversation_id: string | null;
                    correction: string | null;
                    created_at: DbDate;
                    created_by: string & { __brand: "UserId" } | null;
                    entity_id: number & { __brand: "EntityId" } | null;
                    feedback_key: string;
                    flow:
                        | "case_chat"
                        | "chart_review"
                        | "note_generation"
                        | "note_validation";
                    id: AiFeedbackId;
                    langsmith_feedback_id: string
                    | null;
                    langsmith_run_id: string | null;
                    langsmith_thread_id: string | null;
                    linear_issue_url: string | null;
                    message_id: string | null;
                    model: string | null;
                    patient_id: string & { __brand: "PatientId" } | null;
                    patient_session_id: string & { __brand: "SessionId" } | null;
                    prompt_tag: string | null;
                    prompt_version: string | null;
                    rating: "thumbs_up" | "thumbs_down";
                    resolution_note: string | null;
                    resolution_ref: string | null;
                    severity: "low" | "medium" | "high" | "critical" | null;
                    status:
                        | "open"
                        | "acknowledged"
                        | "in_progress"
                        | "addressed"
                        | "reopened"
                        | "dismissed";
                    target_ref: string;
                    target_snapshot: string
                    | null;
                    thread_snapshot: AiFeedbackThreadTurn[] | null;
                },
            >;
        },
    > = ...