This repository has no description
1```ts
2 getRecord(
3 params?: ComAtprotoRepoGetRecord.QueryParams,
4 opts?: ComAtprotoRepoGetRecord.CallOptions,
5 ): Promise<ComAtprotoRepoGetRecord.Response> {
6 return this._client
7 .call('com.atproto.repo.getRecord', params, undefined, opts)
8 .catch((e) => {
9 throw ComAtprotoRepoGetRecord.toKnownErr(e)
10 })
11 }
12
13 export type QueryParams = {
14 /** The handle or DID of the repo. */
15 repo: string
16 /** The NSID of the record collection. */
17 collection: string
18 /** The Record Key. */
19 rkey: string
20 /** The CID of the version of the record. If not specified, then return the most recent version. */
21 cid?: string
22}
23
24export interface Response {
25 success: boolean
26 headers: HeadersMap
27 data: OutputSchema
28}
29
30export interface OutputSchema {
31 uri: string
32 cid?: string
33 value: { [_ in string]: unknown }
34}
35```
36
37```ts
38 listRecords(
39 params?: ComAtprotoRepoListRecords.QueryParams,
40 opts?: ComAtprotoRepoListRecords.CallOptions,
41 ): Promise<ComAtprotoRepoListRecords.Response> {
42 return this._client.call(
43 'com.atproto.repo.listRecords',
44 params,
45 undefined,
46 opts,
47 )
48 }
49
50 export type QueryParams = {
51 /** The handle or DID of the repo. */
52 repo: string
53 /** The NSID of the record type. */
54 collection: string
55 /** The number of records to return. */
56 limit?: number
57 cursor?: string
58 /** Flag to reverse the order of the returned records. */
59 reverse?: boolean
60}
61
62export interface Response {
63 success: boolean
64 headers: HeadersMap
65 data: OutputSchema
66}
67
68export interface OutputSchema {
69 cursor?: string
70 records: Record[]
71}
72
73export interface Record {
74 $type?: 'com.atproto.repo.listRecords#record'
75 uri: string
76 cid: string
77 value: { [_ in string]: unknown }
78}
79```
80
81```ts
82 applyWrites(
83 data?: ComAtprotoRepoApplyWrites.InputSchema,
84 opts?: ComAtprotoRepoApplyWrites.CallOptions,
85 ): Promise<ComAtprotoRepoApplyWrites.Response> {
86 return this._client
87 .call('com.atproto.repo.applyWrites', opts?.qp, data, opts)
88 .catch((e) => {
89 throw ComAtprotoRepoApplyWrites.toKnownErr(e)
90 })
91 }
92
93 export interface InputSchema {
94 /** The handle or DID of the repo (aka, current account). */
95 repo: string
96 /** Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. */
97 validate?: boolean
98 writes: ($Typed<Create> | $Typed<Update> | $Typed<Delete>)[]
99 /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */
100 swapCommit?: string
101}
102
103export interface Create {
104 $type?: 'com.atproto.repo.applyWrites#create'
105 collection: string
106 /** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
107 rkey?: string
108 value: { [_ in string]: unknown }
109}
110
111export interface Response {
112 success: boolean
113 headers: HeadersMap
114 data: OutputSchema
115}
116
117export interface OutputSchema {
118 commit?: ComAtprotoRepoDefs.CommitMeta
119 results?: (
120 | $Typed<CreateResult>
121 | $Typed<UpdateResult>
122 | $Typed<DeleteResult>
123 )[]
124}
125
126export interface CreateResult {
127 $type?: 'com.atproto.repo.applyWrites#createResult'
128 uri: string
129 cid: string
130 validationStatus?: 'valid' | 'unknown' | (string & {})
131}
132```