···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { type ValidationResult, BlobRef } from '@atproto/lexicon'
55+import { CID } from 'multiformats/cid'
66+import { validate as _validate } from '../../../../lexicons'
77+import {
88+ type $Typed,
99+ is$typed as _is$typed,
1010+ type OmitKey,
1111+} from '../../../../util'
1212+1313+const is$typed = _is$typed,
1414+ validate = _validate
1515+const id = 'pub.leaflet.interactions.recommend'
1616+1717+export interface Record {
1818+ $type: 'pub.leaflet.interactions.recommend'
1919+ subject: string
2020+ createdAt: string
2121+ [k: string]: unknown
2222+}
2323+2424+const hashRecord = 'main'
2525+2626+export function isRecord<V>(v: V) {
2727+ return is$typed(v, id, hashRecord)
2828+}
2929+3030+export function validateRecord<V>(v: V) {
3131+ return validate<Record & V>(v, id, hashRecord, true)
3232+}
+2
lexicons/build.ts
···33import { PubLeafletDocument } from "./src/document";
44import * as PublicationLexicons from "./src/publication";
55import * as PollLexicons from "./src/polls";
66+import * as InteractionsLexicons from "./src/interactions";
67import { ThemeLexicons } from "./src/theme";
7889import * as fs from "fs";
···3132 ...BlockLexicons,
3233 ...Object.values(PublicationLexicons),
3334 ...Object.values(PollLexicons),
3535+ ...Object.values(InteractionsLexicons),
3436];
35373638// Write each lexicon to a file
···11+create table "public"."recommends_on_documents" (
22+ "uri" text not null,
33+ "record" jsonb not null,
44+ "document" text not null,
55+ "recommender_did" text not null,
66+ "indexed_at" timestamp with time zone not null default now()
77+);
88+99+alter table "public"."recommends_on_documents" enable row level security;
1010+1111+CREATE UNIQUE INDEX recommends_on_documents_pkey ON public.recommends_on_documents USING btree (uri);
1212+1313+alter table "public"."recommends_on_documents" add constraint "recommends_on_documents_pkey" PRIMARY KEY using index "recommends_on_documents_pkey";
1414+1515+CREATE INDEX recommends_on_documents_document_idx ON public.recommends_on_documents USING btree (document);
1616+1717+CREATE INDEX recommends_on_documents_recommender_did_idx ON public.recommends_on_documents USING btree (recommender_did);
1818+1919+CREATE UNIQUE INDEX recommends_on_documents_recommender_document_idx ON public.recommends_on_documents USING btree (recommender_did, document);
2020+2121+alter table "public"."recommends_on_documents" add constraint "recommends_on_documents_document_fkey" FOREIGN KEY (document) REFERENCES documents(uri) ON UPDATE CASCADE ON DELETE CASCADE;
2222+2323+alter table "public"."recommends_on_documents" add constraint "recommends_on_documents_recommender_did_fkey" FOREIGN KEY (recommender_did) REFERENCES identities(atp_did) ON UPDATE CASCADE ON DELETE CASCADE;
2424+2525+grant delete on table "public"."recommends_on_documents" to "anon";
2626+2727+grant insert on table "public"."recommends_on_documents" to "anon";
2828+2929+grant references on table "public"."recommends_on_documents" to "anon";
3030+3131+grant select on table "public"."recommends_on_documents" to "anon";
3232+3333+grant trigger on table "public"."recommends_on_documents" to "anon";
3434+3535+grant truncate on table "public"."recommends_on_documents" to "anon";
3636+3737+grant update on table "public"."recommends_on_documents" to "anon";
3838+3939+grant delete on table "public"."recommends_on_documents" to "authenticated";
4040+4141+grant insert on table "public"."recommends_on_documents" to "authenticated";
4242+4343+grant references on table "public"."recommends_on_documents" to "authenticated";
4444+4545+grant select on table "public"."recommends_on_documents" to "authenticated";
4646+4747+grant trigger on table "public"."recommends_on_documents" to "authenticated";
4848+4949+grant truncate on table "public"."recommends_on_documents" to "authenticated";
5050+5151+grant update on table "public"."recommends_on_documents" to "authenticated";
5252+5353+grant delete on table "public"."recommends_on_documents" to "service_role";
5454+5555+grant insert on table "public"."recommends_on_documents" to "service_role";
5656+5757+grant references on table "public"."recommends_on_documents" to "service_role";
5858+5959+grant select on table "public"."recommends_on_documents" to "service_role";
6060+6161+grant trigger on table "public"."recommends_on_documents" to "service_role";
6262+6363+grant truncate on table "public"."recommends_on_documents" to "service_role";
6464+6565+grant update on table "public"."recommends_on_documents" to "service_role";