diff --git a/lexicons/api/types/site/standard/graph/recommend.ts b/lexicons/api/types/site/standard/graph/recommend.ts new file mode 100644 index 00000000..1c844755 --- /dev/null +++ b/lexicons/api/types/site/standard/graph/recommend.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type ValidationResult, BlobRef } from '@atproto/lexicon' +import { CID } from 'multiformats/cid' +import { validate as _validate } from '../../../../lexicons' +import { + type $Typed, + is$typed as _is$typed, + type OmitKey, +} from '../../../../util' + +const is$typed = _is$typed, + validate = _validate +const id = 'site.standard.graph.recommend' + +export interface Record { + $type: 'site.standard.graph.recommend' + /** AT-URI reference to the document record being recommended (ex: at://did:plc:abc123/site.standard.document/xyz789). */ + document: string + createdAt: string + [k: string]: unknown +} + +const hashRecord = 'main' + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord) +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true) +} diff --git a/lexicons/site/standard/graph/recommend.json b/lexicons/site/standard/graph/recommend.json new file mode 100644 index 00000000..bee6dd24 --- /dev/null +++ b/lexicons/site/standard/graph/recommend.json @@ -0,0 +1,26 @@ +{ + "id": "site.standard.graph.recommend", + "defs": { + "main": { + "key": "tid", + "type": "record", + "record": { + "type": "object", + "required": ["document", "createdAt"], + "properties": { + "document": { + "type": "string", + "format": "at-uri", + "description": "AT-URI reference to the document record being recommended (ex: at://did:plc:abc123/site.standard.document/xyz789)." + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + }, + "description": "Record declaring a recommendation of a document." + } + }, + "lexicon": 1 +}