Circle V2 API Docs
    Preparing search index...

    Variable templatesRepoConst

    templatesRepo: DbRepo<
        {
            countInScope: (params: TemplatesListInScopeParams) => Promise<number>;
            create: (
                params: { title: string } & {
                    additional_ai_instructions?: string | null;
                    check_cpt?: boolean | null;
                    check_demo?: boolean | null;
                    check_dsm_5?: boolean | null;
                    check_icd_10?: boolean | null;
                    created_by?: string & { __brand: "UserId" } | null;
                    created_by_circle?: boolean | null;
                    hidden_instructions?: string | null;
                    id?: TemplateId;
                    is_allow_bullet_points?: boolean | null;
                    is_unstructured_narrative?: boolean | null;
                    last_updated?: DbDate | null;
                    last_used?: string & { __brand: "DbDate" } | null;
                    original_template_id?: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id?: number & { __brand: "EntityId" } | null;
                },
            ) => Promise<
                {
                    additional_ai_instructions: string
                    | null;
                    check_cpt: boolean | null;
                    check_demo: boolean | null;
                    check_dsm_5: boolean | null;
                    check_icd_10: boolean | null;
                    created_by: string & { __brand: "UserId" } | null;
                    created_by_circle: boolean | null;
                    hidden_instructions: string | null;
                    id: TemplateId;
                    is_allow_bullet_points: boolean | null;
                    is_unstructured_narrative: boolean | null;
                    last_updated: DbDate | null;
                    last_used: string & { __brand: "DbDate" } | null;
                    original_template_id: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id: number & { __brand: "EntityId" } | null;
                    title: string;
                },
            >;
            delete: (
                id: TemplateId,
            ) => Promise<
                {
                    additional_ai_instructions: string
                    | null;
                    check_cpt: boolean | null;
                    check_demo: boolean | null;
                    check_dsm_5: boolean | null;
                    check_icd_10: boolean | null;
                    created_by: string & { __brand: "UserId" } | null;
                    created_by_circle: boolean | null;
                    hidden_instructions: string | null;
                    id: TemplateId;
                    is_allow_bullet_points: boolean | null;
                    is_unstructured_narrative: boolean | null;
                    last_updated: DbDate | null;
                    last_used: string & { __brand: "DbDate" } | null;
                    original_template_id: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id: number & { __brand: "EntityId" } | null;
                    title: string;
                },
            >;
            duplicate: (
                id: TemplateId,
                userId: UserId,
            ) => Promise<
                {
                    additional_ai_instructions: string
                    | null;
                    check_cpt: boolean | null;
                    check_demo: boolean | null;
                    check_dsm_5: boolean | null;
                    check_icd_10: boolean | null;
                    created_by: string & { __brand: "UserId" } | null;
                    created_by_circle: boolean | null;
                    hidden_instructions: string | null;
                    id: TemplateId;
                    is_allow_bullet_points: boolean | null;
                    is_unstructured_narrative: boolean | null;
                    last_updated: DbDate | null;
                    last_used: string & { __brand: "DbDate" } | null;
                    original_template_id: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id: number & { __brand: "EntityId" } | null;
                    title: string;
                },
            >;
            getById: (
                id: TemplateId,
            ) => Promise<
                {
                    additional_ai_instructions: string
                    | null;
                    check_cpt: boolean | null;
                    check_demo: boolean | null;
                    check_dsm_5: boolean | null;
                    check_icd_10: boolean | null;
                    created_by: string & { __brand: "UserId" } | null;
                    created_by_circle: boolean | null;
                    hidden_instructions: string | null;
                    id: TemplateId;
                    is_allow_bullet_points: boolean | null;
                    is_unstructured_narrative: boolean | null;
                    last_updated: DbDate | null;
                    last_used: string & { __brand: "DbDate" } | null;
                    original_template_id: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id: number & { __brand: "EntityId" } | null;
                    title: string;
                },
            >;
            listInScope: (
                params: TemplatesListInScopeParams,
            ) => Promise<
                {
                    check_cpt: boolean
                    | null;
                    check_dsm_5: boolean | null;
                    check_icd_10: boolean | null;
                    created_by: string & { __brand: "UserId" } | null;
                    created_by_circle: boolean | null;
                    id: TemplateId;
                    is_allow_bullet_points: boolean | null;
                    is_unstructured_narrative: boolean | null;
                    last_updated: DbDate | null;
                    last_used: string & { __brand: "DbDate" } | null;
                    original_template_id: string & { __brand: "TemplateId" } | null;
                    section_count: number | null;
                    shared_with_org_id: number & { __brand: "EntityId" } | null;
                    title: string;
                }[],
            >;
            setLinkedAuditTemplates: (
                templateId: TemplateId,
                auditTemplateIds: AuditTemplateId[],
            ) => Promise<
                {
                    audit_template_id: string & { __brand: "AuditTemplateId" };
                    template_id: string & { __brand: "TemplateId" };
                }[],
            >;
            setSections: (
                templateId: TemplateId,
                sections: BulkSectionInput[],
                userId?: UserId,
            ) => Promise<
                {
                    body: string;
                    bullet_format: boolean
                    | null;
                    created_by: string & { __brand: "UserId" } | null;
                    id: SectionId;
                    last_updated: DbDate | null;
                    name: string;
                    optional: boolean;
                    order: string | null;
                    template_id: string & { __brand: "TemplateId" } | null;
                }[],
            >;
            update: (
                id: TemplateId,
                params: {
                    additional_ai_instructions?: string | null;
                    check_cpt?: boolean | null;
                    check_demo?: boolean | null;
                    check_dsm_5?: boolean | null;
                    check_icd_10?: boolean | null;
                    created_by?: string & { __brand: "UserId" } | null;
                    created_by_circle?: boolean | null;
                    hidden_instructions?: string | null;
                    id?: TemplateId;
                    is_allow_bullet_points?: boolean | null;
                    is_unstructured_narrative?: boolean | null;
                    last_updated?: DbDate | null;
                    last_used?: string & { __brand: "DbDate" } | null;
                    original_template_id?: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id?: number & { __brand: "EntityId" } | null;
                    title?: string;
                },
            ) => Promise<
                {
                    additional_ai_instructions: string
                    | null;
                    check_cpt: boolean | null;
                    check_demo: boolean | null;
                    check_dsm_5: boolean | null;
                    check_icd_10: boolean | null;
                    created_by: string & { __brand: "UserId" } | null;
                    created_by_circle: boolean | null;
                    hidden_instructions: string | null;
                    id: TemplateId;
                    is_allow_bullet_points: boolean | null;
                    is_unstructured_narrative: boolean | null;
                    last_updated: DbDate | null;
                    last_used: string & { __brand: "DbDate" } | null;
                    original_template_id: string & { __brand: "TemplateId" } | null;
                    shared_with_org_id: number & { __brand: "EntityId" } | null;
                    title: string;
                },
            >;
        },
    > = ...