Circle V2 API Docs
    Preparing search index...
    listForms: QueryProcedure<
        {
            input: void;
            meta: object;
            output: {
                items: {
                    annotationCount: number;
                    context: string
                    | null;
                    createdAt: DbDate;
                    createdBy: UserId | null;
                    defaultFontSize: string | null;
                    fileName: string | null;
                    fileUrl: string | null;
                    id: FormId;
                    orgId: number & { __brand: "EntityId" } | null;
                    requiredContactTypes: FormTemplateRequiredContactType[];
                    shareWithOrg: boolean;
                    updatedAt: DbDate | null;
                }[];
            };
        },
    > = ...

    The fillable-template picker for the fill drawer.

    Entity/ownership scoping lives entirely in the repo, which re-implements the forms_select_owner_or_org_shared RLS policy in SQL (repos run on the admin client): a form is visible when the caller created it, or it is shared with the caller's org. Both halves of that rule are fed from ctx.user, never from input — there is no caller-supplied id to gate here, which is why this procedure carries the org-setting and feature-flag gates but no resource middleware.

    Each row carries its required contact types so the drawer can say "needs a Facility and a Prescriber" before kickoff.