Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955/** * GENERATED CODE - DO NOT MODIFY */import { XrpcClient, type FetchHandler, type FetchHandlerOptions,} from '@atproto/xrpc'import { schemas } from './lexicons'import { CID } from 'multiformats/cid'import { type OmitKey, type Un$Typed } from './util'import * as AppBskyActorProfile from './types/app/bsky/actor/profile'import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord'import * as ComAtprotoRepoDefs from './types/com/atproto/repo/defs'import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'import * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo'import * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs'import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'import * as PubLeafletBlocksBlockquote from './types/pub/leaflet/blocks/blockquote'import * as PubLeafletBlocksBskyPost from './types/pub/leaflet/blocks/bskyPost'import * as PubLeafletBlocksButton from './types/pub/leaflet/blocks/button'import * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code'import * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header'import * as PubLeafletBlocksHorizontalRule from './types/pub/leaflet/blocks/horizontalRule'import * as PubLeafletBlocksIframe from './types/pub/leaflet/blocks/iframe'import * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image'import * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math'import * as PubLeafletBlocksPage from './types/pub/leaflet/blocks/page'import * as PubLeafletBlocksPoll from './types/pub/leaflet/blocks/poll'import * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text'import * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList'import * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website'import * as PubLeafletComment from './types/pub/leaflet/comment'import * as PubLeafletDocument from './types/pub/leaflet/document'import * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription'import * as PubLeafletPagesCanvas from './types/pub/leaflet/pages/canvas'import * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument'import * as PubLeafletPollDefinition from './types/pub/leaflet/poll/definition'import * as PubLeafletPollVote from './types/pub/leaflet/poll/vote'import * as PubLeafletPublication from './types/pub/leaflet/publication'import * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet'import * as PubLeafletThemeBackgroundImage from './types/pub/leaflet/theme/backgroundImage'import * as PubLeafletThemeColor from './types/pub/leaflet/theme/color'
export * as AppBskyActorProfile from './types/app/bsky/actor/profile'export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'export * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord'export * as ComAtprotoRepoDefs from './types/com/atproto/repo/defs'export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'export * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'export * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo'export * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs'export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'export * as PubLeafletBlocksBlockquote from './types/pub/leaflet/blocks/blockquote'export * as PubLeafletBlocksBskyPost from './types/pub/leaflet/blocks/bskyPost'export * as PubLeafletBlocksButton from './types/pub/leaflet/blocks/button'export * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code'export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header'export * as PubLeafletBlocksHorizontalRule from './types/pub/leaflet/blocks/horizontalRule'export * as PubLeafletBlocksIframe from './types/pub/leaflet/blocks/iframe'export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image'export * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math'export * as PubLeafletBlocksPage from './types/pub/leaflet/blocks/page'export * as PubLeafletBlocksPoll from './types/pub/leaflet/blocks/poll'export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text'export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList'export * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website'export * as PubLeafletComment from './types/pub/leaflet/comment'export * as PubLeafletDocument from './types/pub/leaflet/document'export * as PubLeafletGraphSubscription from './types/pub/leaflet/graph/subscription'export * as PubLeafletPagesCanvas from './types/pub/leaflet/pages/canvas'export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument'export * as PubLeafletPollDefinition from './types/pub/leaflet/poll/definition'export * as PubLeafletPollVote from './types/pub/leaflet/poll/vote'export * as PubLeafletPublication from './types/pub/leaflet/publication'export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet'export * as PubLeafletThemeBackgroundImage from './types/pub/leaflet/theme/backgroundImage'export * as PubLeafletThemeColor from './types/pub/leaflet/theme/color'
export const PUB_LEAFLET_PAGES = { CanvasTextAlignLeft: 'pub.leaflet.pages.canvas#textAlignLeft', CanvasTextAlignCenter: 'pub.leaflet.pages.canvas#textAlignCenter', CanvasTextAlignRight: 'pub.leaflet.pages.canvas#textAlignRight', LinearDocumentTextAlignLeft: 'pub.leaflet.pages.linearDocument#textAlignLeft', LinearDocumentTextAlignCenter: 'pub.leaflet.pages.linearDocument#textAlignCenter', LinearDocumentTextAlignRight: 'pub.leaflet.pages.linearDocument#textAlignRight', LinearDocumentTextAlignJustify: 'pub.leaflet.pages.linearDocument#textAlignJustify',}
export class AtpBaseClient extends XrpcClient { app: AppNS com: ComNS pub: PubNS
constructor(options: FetchHandler | FetchHandlerOptions) { super(options, schemas) this.app = new AppNS(this) this.com = new ComNS(this) this.pub = new PubNS(this) }
/** @deprecated use `this` instead */ get xrpc(): XrpcClient { return this }}
export class AppNS { _client: XrpcClient bsky: AppBskyNS
constructor(client: XrpcClient) { this._client = client this.bsky = new AppBskyNS(client) }}
export class AppBskyNS { _client: XrpcClient actor: AppBskyActorNS
constructor(client: XrpcClient) { this._client = client this.actor = new AppBskyActorNS(client) }}
export class AppBskyActorNS { _client: XrpcClient profile: AppBskyActorProfileRecord
constructor(client: XrpcClient) { this._client = client this.profile = new AppBskyActorProfileRecord(client) }}
export class AppBskyActorProfileRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyActorProfile.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'app.bsky.actor.profile', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string; cid: string; value: AppBskyActorProfile.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.actor.profile', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<AppBskyActorProfile.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'app.bsky.actor.profile' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, rkey: 'self', ...params, record: { ...record, $type: collection }, }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<AppBskyActorProfile.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'app.bsky.actor.profile' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'app.bsky.actor.profile', ...params }, { headers }, ) }}
export class ComNS { _client: XrpcClient atproto: ComAtprotoNS
constructor(client: XrpcClient) { this._client = client this.atproto = new ComAtprotoNS(client) }}
export class ComAtprotoNS { _client: XrpcClient repo: ComAtprotoRepoNS
constructor(client: XrpcClient) { this._client = client this.repo = new ComAtprotoRepoNS(client) }}
export class ComAtprotoRepoNS { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
applyWrites( data?: ComAtprotoRepoApplyWrites.InputSchema, opts?: ComAtprotoRepoApplyWrites.CallOptions, ): Promise<ComAtprotoRepoApplyWrites.Response> { return this._client .call('com.atproto.repo.applyWrites', opts?.qp, data, opts) .catch((e) => { throw ComAtprotoRepoApplyWrites.toKnownErr(e) }) }
createRecord( data?: ComAtprotoRepoCreateRecord.InputSchema, opts?: ComAtprotoRepoCreateRecord.CallOptions, ): Promise<ComAtprotoRepoCreateRecord.Response> { return this._client .call('com.atproto.repo.createRecord', opts?.qp, data, opts) .catch((e) => { throw ComAtprotoRepoCreateRecord.toKnownErr(e) }) }
deleteRecord( data?: ComAtprotoRepoDeleteRecord.InputSchema, opts?: ComAtprotoRepoDeleteRecord.CallOptions, ): Promise<ComAtprotoRepoDeleteRecord.Response> { return this._client .call('com.atproto.repo.deleteRecord', opts?.qp, data, opts) .catch((e) => { throw ComAtprotoRepoDeleteRecord.toKnownErr(e) }) }
describeRepo( params?: ComAtprotoRepoDescribeRepo.QueryParams, opts?: ComAtprotoRepoDescribeRepo.CallOptions, ): Promise<ComAtprotoRepoDescribeRepo.Response> { return this._client.call( 'com.atproto.repo.describeRepo', params, undefined, opts, ) }
getRecord( params?: ComAtprotoRepoGetRecord.QueryParams, opts?: ComAtprotoRepoGetRecord.CallOptions, ): Promise<ComAtprotoRepoGetRecord.Response> { return this._client .call('com.atproto.repo.getRecord', params, undefined, opts) .catch((e) => { throw ComAtprotoRepoGetRecord.toKnownErr(e) }) }
importRepo( data?: ComAtprotoRepoImportRepo.InputSchema, opts?: ComAtprotoRepoImportRepo.CallOptions, ): Promise<ComAtprotoRepoImportRepo.Response> { return this._client.call( 'com.atproto.repo.importRepo', opts?.qp, data, opts, ) }
listMissingBlobs( params?: ComAtprotoRepoListMissingBlobs.QueryParams, opts?: ComAtprotoRepoListMissingBlobs.CallOptions, ): Promise<ComAtprotoRepoListMissingBlobs.Response> { return this._client.call( 'com.atproto.repo.listMissingBlobs', params, undefined, opts, ) }
listRecords( params?: ComAtprotoRepoListRecords.QueryParams, opts?: ComAtprotoRepoListRecords.CallOptions, ): Promise<ComAtprotoRepoListRecords.Response> { return this._client.call( 'com.atproto.repo.listRecords', params, undefined, opts, ) }
putRecord( data?: ComAtprotoRepoPutRecord.InputSchema, opts?: ComAtprotoRepoPutRecord.CallOptions, ): Promise<ComAtprotoRepoPutRecord.Response> { return this._client .call('com.atproto.repo.putRecord', opts?.qp, data, opts) .catch((e) => { throw ComAtprotoRepoPutRecord.toKnownErr(e) }) }
uploadBlob( data?: ComAtprotoRepoUploadBlob.InputSchema, opts?: ComAtprotoRepoUploadBlob.CallOptions, ): Promise<ComAtprotoRepoUploadBlob.Response> { return this._client.call( 'com.atproto.repo.uploadBlob', opts?.qp, data, opts, ) }}
export class PubNS { _client: XrpcClient leaflet: PubLeafletNS
constructor(client: XrpcClient) { this._client = client this.leaflet = new PubLeafletNS(client) }}
export class PubLeafletNS { _client: XrpcClient comment: PubLeafletCommentRecord document: PubLeafletDocumentRecord publication: PubLeafletPublicationRecord blocks: PubLeafletBlocksNS graph: PubLeafletGraphNS pages: PubLeafletPagesNS poll: PubLeafletPollNS richtext: PubLeafletRichtextNS theme: PubLeafletThemeNS
constructor(client: XrpcClient) { this._client = client this.blocks = new PubLeafletBlocksNS(client) this.graph = new PubLeafletGraphNS(client) this.pages = new PubLeafletPagesNS(client) this.poll = new PubLeafletPollNS(client) this.richtext = new PubLeafletRichtextNS(client) this.theme = new PubLeafletThemeNS(client) this.comment = new PubLeafletCommentRecord(client) this.document = new PubLeafletDocumentRecord(client) this.publication = new PubLeafletPublicationRecord(client) }}
export class PubLeafletBlocksNS { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }}
export class PubLeafletGraphNS { _client: XrpcClient subscription: PubLeafletGraphSubscriptionRecord
constructor(client: XrpcClient) { this._client = client this.subscription = new PubLeafletGraphSubscriptionRecord(client) }}
export class PubLeafletGraphSubscriptionRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: PubLeafletGraphSubscription.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'pub.leaflet.graph.subscription', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string cid: string value: PubLeafletGraphSubscription.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'pub.leaflet.graph.subscription', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletGraphSubscription.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.graph.subscription' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletGraphSubscription.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.graph.subscription' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'pub.leaflet.graph.subscription', ...params }, { headers }, ) }}
export class PubLeafletPagesNS { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }}
export class PubLeafletPollNS { _client: XrpcClient definition: PubLeafletPollDefinitionRecord vote: PubLeafletPollVoteRecord
constructor(client: XrpcClient) { this._client = client this.definition = new PubLeafletPollDefinitionRecord(client) this.vote = new PubLeafletPollVoteRecord(client) }}
export class PubLeafletPollDefinitionRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: PubLeafletPollDefinition.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'pub.leaflet.poll.definition', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string cid: string value: PubLeafletPollDefinition.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'pub.leaflet.poll.definition', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletPollDefinition.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.poll.definition' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletPollDefinition.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.poll.definition' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'pub.leaflet.poll.definition', ...params }, { headers }, ) }}
export class PubLeafletPollVoteRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: PubLeafletPollVote.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'pub.leaflet.poll.vote', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string; cid: string; value: PubLeafletPollVote.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'pub.leaflet.poll.vote', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletPollVote.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.poll.vote' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletPollVote.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.poll.vote' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'pub.leaflet.poll.vote', ...params }, { headers }, ) }}
export class PubLeafletRichtextNS { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }}
export class PubLeafletThemeNS { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }}
export class PubLeafletCommentRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: PubLeafletComment.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'pub.leaflet.comment', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string; cid: string; value: PubLeafletComment.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'pub.leaflet.comment', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletComment.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.comment' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletComment.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.comment' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'pub.leaflet.comment', ...params }, { headers }, ) }}
export class PubLeafletDocumentRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: PubLeafletDocument.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'pub.leaflet.document', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string; cid: string; value: PubLeafletDocument.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'pub.leaflet.document', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletDocument.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.document' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletDocument.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.document' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'pub.leaflet.document', ...params }, { headers }, ) }}
export class PubLeafletPublicationRecord { _client: XrpcClient
constructor(client: XrpcClient) { this._client = client }
async list( params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>, ): Promise<{ cursor?: string records: { uri: string; value: PubLeafletPublication.Record }[] }> { const res = await this._client.call('com.atproto.repo.listRecords', { collection: 'pub.leaflet.publication', ...params, }) return res.data }
async get( params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>, ): Promise<{ uri: string cid: string value: PubLeafletPublication.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'pub.leaflet.publication', ...params, }) return res.data }
async create( params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletPublication.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.publication' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async put( params: OmitKey< ComAtprotoRepoPutRecord.InputSchema, 'collection' | 'record' >, record: Un$Typed<PubLeafletPublication.Record>, headers?: Record<string, string>, ): Promise<{ uri: string; cid: string }> { const collection = 'pub.leaflet.publication' const res = await this._client.call( 'com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data }
async delete( params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>, ): Promise<void> { await this._client.call( 'com.atproto.repo.deleteRecord', undefined, { collection: 'pub.leaflet.publication', ...params }, { headers }, ) }}