Circle V2 API Docs
    Preparing search index...
    templatesRouter: BuiltRouter<
        {
            ctx: TRPCContext;
            errorShape: DefaultErrorShape;
            meta: object;
            transformer: false;
        },
        DecorateCreateRouterOptions<
            {
                create: MutationProcedure<
                    {
                        input: {
                            additionalAiInstructions?: string;
                            checkCpt?: boolean;
                            checkDsm5?: boolean;
                            checkIcd10?: boolean;
                            hiddenInstructions?: string;
                            isAllowBulletPoints?: boolean;
                            isUnstructuredNarrative?: boolean;
                            linkedAuditTemplateIds?: string[];
                            sections?: {
                                body: string;
                                bulletFormat?: boolean;
                                name: string;
                                optional: boolean;
                                order: number;
                            }[];
                            title: string;
                        };
                        meta: object;
                        output: {
                            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: MutationProcedure<
                    {
                        input: { id: string };
                        meta: object;
                        output: {
                            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: MutationProcedure<
                    {
                        input: { id: string };
                        meta: object;
                        output: {
                            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: QueryProcedure<
                    {
                        input: { id: string };
                        meta: object;
                        output: {
                            linkedAuditTemplateIds: (string & { __brand: "AuditTemplateId" })[];
                            sections: {
                                body: string;
                                bullet_format: boolean | null;
                                created_by: string & { __brand: ... } | null;
                                id: SectionId;
                                last_updated: DbDate | null;
                                name: string;
                                optional: boolean;
                                order: string | null;
                                template_id: string & { __brand: ... } | null;
                            }[];
                            template: {
                                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;
                            };
                        };
                    },
                >;
                list: QueryProcedure<
                    {
                        input: {
                            cursor?: number;
                            limit?: number;
                            offset?: number;
                            search?: string;
                            sortBy?: "title"
                            | "last_updated";
                            sortOrder?: "asc" | "desc";
                        };
                        meta: object;
                        output: PaginatedResponse<
                            {
                                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;
                            },
                        >;
                    },
                >;
                toggleSharing: MutationProcedure<
                    {
                        input: { id: string; shared: boolean };
                        meta: object;
                        output: {
                            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;
                        };
                    },
                >;
                update: MutationProcedure<
                    {
                        input: {
                            additionalAiInstructions?: string
                            | null;
                            checkCpt?: boolean;
                            checkDsm5?: boolean;
                            checkIcd10?: boolean;
                            hiddenInstructions?: string | null;
                            id: string;
                            isAllowBulletPoints?: boolean;
                            isUnstructuredNarrative?: boolean;
                            linkedAuditTemplateIds?: string[];
                            sections?: {
                                body: string;
                                bulletFormat?: boolean;
                                id?: string;
                                name: string;
                                optional: boolean;
                                order: number;
                            }[];
                            title?: string;
                        };
                        meta: object;
                        output: {
                            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;
                        };
                    },
                >;
            },
        >,
    > = ...