···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { type ValidationResult, BlobRef } from "npm:@atproto/lexicon"
55+import { CID } from "npm:multiformats/cid"
66+import { validate as _validate } from '../../../lexicons.ts'
77+import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util.ts'
88+99+const is$typed = _is$typed,
1010+ validate = _validate
1111+const id = 'social.grain.defs'
1212+1313+/** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. */
1414+export interface AspectRatio {
1515+ $type?: 'social.grain.defs#aspectRatio'
1616+ width: number
1717+ height: number
1818+}
1919+2020+const hashAspectRatio = 'aspectRatio'
2121+2222+export function isAspectRatio<V>(v: V) {
2323+ return is$typed(v, id, hashAspectRatio)
2424+}
2525+2626+export function validateAspectRatio<V>(v: V) {
2727+ return validate<AspectRatio & V>(v, id, hashAspectRatio)
2828+}
+29
__generated__/types/social/grain/gallery.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { type ValidationResult, BlobRef } from "npm:@atproto/lexicon"
55+import { CID } from "npm:multiformats/cid"
66+import { validate as _validate } from '../../../lexicons.ts'
77+import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util.ts'
88+99+const is$typed = _is$typed,
1010+ validate = _validate
1111+const id = 'social.grain.gallery'
1212+1313+export interface Record {
1414+ $type: 'social.grain.gallery'
1515+ title: string
1616+ description?: string
1717+ createdAt: string
1818+ [k: string]: unknown
1919+}
2020+2121+const hashRecord = 'main'
2222+2323+export function isRecord<V>(v: V) {
2424+ return is$typed(v, id, hashRecord)
2525+}
2626+2727+export function validateRecord<V>(v: V) {
2828+ return validate<Record & V>(v, id, hashRecord, true)
2929+}
+37
__generated__/types/social/grain/gallery/defs.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { type ValidationResult, BlobRef } from "npm:@atproto/lexicon"
55+import { CID } from "npm:multiformats/cid"
66+import { validate as _validate } from '../../../../lexicons.ts'
77+import {
88+ type $Typed,
99+ is$typed as _is$typed,
1010+ type OmitKey,
1111+} from '../../../../util.ts'
1212+import type * as SocialGrainActorDefs from '../actor/defs.ts'
1313+import type * as SocialGrainPhotoDefs from '../photo/defs.ts'
1414+1515+const is$typed = _is$typed,
1616+ validate = _validate
1717+const id = 'social.grain.gallery.defs'
1818+1919+export interface GalleryView {
2020+ $type?: 'social.grain.gallery.defs#galleryView'
2121+ uri: string
2222+ cid: string
2323+ creator: SocialGrainActorDefs.ProfileView
2424+ record: { [_ in string]: unknown }
2525+ items?: ($Typed<SocialGrainPhotoDefs.PhotoView> | { $type: string })[]
2626+ indexedAt: string
2727+}
2828+2929+const hashGalleryView = 'galleryView'
3030+3131+export function isGalleryView<V>(v: V) {
3232+ return is$typed(v, id, hashGalleryView)
3333+}
3434+3535+export function validateGalleryView<V>(v: V) {
3636+ return validate<GalleryView & V>(v, id, hashGalleryView)
3737+}
+32
__generated__/types/social/grain/photo.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { type ValidationResult, BlobRef } from "npm:@atproto/lexicon"
55+import { CID } from "npm:multiformats/cid"
66+import { validate as _validate } from '../../../lexicons.ts'
77+import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util.ts'
88+import type * as SocialGrainDefs from './defs.ts'
99+1010+const is$typed = _is$typed,
1111+ validate = _validate
1212+const id = 'social.grain.photo'
1313+1414+export interface Record {
1515+ $type: 'social.grain.photo'
1616+ photo: BlobRef
1717+ /** Alt text description of the image, for accessibility. */
1818+ alt: string
1919+ aspectRatio?: SocialGrainDefs.AspectRatio
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+}
+39
__generated__/types/social/grain/photo/defs.ts
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { type ValidationResult, BlobRef } from "npm:@atproto/lexicon"
55+import { CID } from "npm:multiformats/cid"
66+import { validate as _validate } from '../../../../lexicons.ts'
77+import {
88+ type $Typed,
99+ is$typed as _is$typed,
1010+ type OmitKey,
1111+} from '../../../../util.ts'
1212+import type * as SocialGrainDefs from '../defs.ts'
1313+1414+const is$typed = _is$typed,
1515+ validate = _validate
1616+const id = 'social.grain.photo.defs'
1717+1818+export interface PhotoView {
1919+ $type?: 'social.grain.photo.defs#photoView'
2020+ uri: string
2121+ cid: string
2222+ /** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */
2323+ thumb: string
2424+ /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */
2525+ fullsize: string
2626+ /** Alt text description of the image, for accessibility. */
2727+ alt: string
2828+ aspectRatio?: SocialGrainDefs.AspectRatio
2929+}
3030+3131+const hashPhotoView = 'photoView'
3232+3333+export function isPhotoView<V>(v: V) {
3434+ return is$typed(v, id, hashPhotoView)
3535+}
3636+3737+export function validatePhotoView<V>(v: V) {
3838+ return validate<PhotoView & V>(v, id, hashPhotoView)
3939+}
···11-/**
22- * GENERATED CODE - DO NOT MODIFY
33- */
44-import { type ValidationResult, BlobRef } from "npm:@atproto/lexicon"
55-import { CID } from "npm:multiformats/cid"
66-import { validate as _validate } from '../../../../../lexicons.ts'
77-import {
88- type $Typed,
99- is$typed as _is$typed,
1010- type OmitKey,
1111-} from '../../../../../util.ts'
1212-import type * as SocialGrainV0ActorDefs from '../actor/defs.ts'
1313-1414-const is$typed = _is$typed,
1515- validate = _validate
1616-const id = 'social.grain.v0.gallery.defs'
1717-1818-/** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. */
1919-export interface AspectRatio {
2020- $type?: 'social.grain.v0.gallery.defs#aspectRatio'
2121- width: number
2222- height: number
2323-}
2424-2525-const hashAspectRatio = 'aspectRatio'
2626-2727-export function isAspectRatio<V>(v: V) {
2828- return is$typed(v, id, hashAspectRatio)
2929-}
3030-3131-export function validateAspectRatio<V>(v: V) {
3232- return validate<AspectRatio & V>(v, id, hashAspectRatio)
3333-}
3434-3535-export interface GalleryView {
3636- $type?: 'social.grain.v0.gallery.defs#galleryView'
3737- uri: string
3838- cid: string
3939- creator: SocialGrainV0ActorDefs.ProfileView
4040- record: { [_ in string]: unknown }
4141- images?: ViewImage[]
4242- indexedAt: string
4343-}
4444-4545-const hashGalleryView = 'galleryView'
4646-4747-export function isGalleryView<V>(v: V) {
4848- return is$typed(v, id, hashGalleryView)
4949-}
5050-5151-export function validateGalleryView<V>(v: V) {
5252- return validate<GalleryView & V>(v, id, hashGalleryView)
5353-}
5454-5555-export interface Image {
5656- $type?: 'social.grain.v0.gallery.defs#image'
5757- image: BlobRef
5858- /** Alt text description of the image, for accessibility. */
5959- alt: string
6060- aspectRatio?: AspectRatio
6161-}
6262-6363-const hashImage = 'image'
6464-6565-export function isImage<V>(v: V) {
6666- return is$typed(v, id, hashImage)
6767-}
6868-6969-export function validateImage<V>(v: V) {
7070- return validate<Image & V>(v, id, hashImage)
7171-}
7272-7373-export interface ViewImage {
7474- $type?: 'social.grain.v0.gallery.defs#viewImage'
7575- cid: string
7676- /** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */
7777- thumb: string
7878- /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */
7979- fullsize: string
8080- /** Alt text description of the image, for accessibility. */
8181- alt: string
8282- aspectRatio?: AspectRatio
8383-}
8484-8585-const hashViewImage = 'viewImage'
8686-8787-export function isViewImage<V>(v: V) {
8888- return is$typed(v, id, hashViewImage)
8989-}
9090-9191-export function validateViewImage<V>(v: V) {
9292- return validate<ViewImage & V>(v, id, hashViewImage)
9393-}
···11+{
22+ "lexicon": 1,
33+ "id": "social.grain.photo.defs",
44+ "defs": {
55+ "photoView": {
66+ "type": "object",
77+ "required": ["uri", "cid", "thumb", "fullsize", "alt"],
88+ "properties": {
99+ "uri": { "type": "string", "format": "at-uri" },
1010+ "cid": { "type": "string", "format": "cid" },
1111+ "thumb": {
1212+ "type": "string",
1313+ "format": "uri",
1414+ "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."
1515+ },
1616+ "fullsize": {
1717+ "type": "string",
1818+ "format": "uri",
1919+ "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."
2020+ },
2121+ "alt": {
2222+ "type": "string",
2323+ "description": "Alt text description of the image, for accessibility."
2424+ },
2525+ "aspectRatio": {
2626+ "type": "ref",
2727+ "ref": "social.grain.defs#aspectRatio"
2828+ }
2929+ }
3030+ }
3131+ }
3232+}