@atproto/api 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/client/lexicons.d.ts +96 -5
- package/dist/client/types/app/bsky/actor/defs.d.ts +1 -0
- package/dist/index.js +268 -180
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
- package/src/client/lexicons.ts +339 -123
- package/src/client/types/app/bsky/actor/defs.ts +2 -0
- package/src/client/types/app/bsky/actor/getProfile.ts +1 -0
- package/src/client/types/app/bsky/actor/profile.ts +3 -0
- package/src/client/types/app/bsky/embed/external.ts +1 -0
- package/src/client/types/app/bsky/embed/images.ts +4 -0
- package/src/client/types/app/bsky/embed/record.ts +1 -0
- package/src/client/types/app/bsky/feed/defs.ts +1 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +1 -0
- package/src/client/types/app/bsky/feed/getFeedGenerator.ts +3 -0
- package/src/client/types/app/bsky/feed/getFeedSkeleton.ts +1 -0
- package/src/client/types/app/bsky/feed/getLikes.ts +2 -0
- package/src/client/types/app/bsky/feed/getListFeed.ts +1 -0
- package/src/client/types/app/bsky/feed/getPostThread.ts +3 -0
- package/src/client/types/app/bsky/feed/getPosts.ts +1 -0
- package/src/client/types/app/bsky/feed/getRepostedBy.ts +2 -0
- package/src/client/types/app/bsky/feed/getTimeline.ts +1 -0
- package/src/client/types/app/bsky/feed/post.ts +5 -1
- package/src/client/types/app/bsky/feed/threadgate.ts +1 -0
- package/src/client/types/app/bsky/graph/block.ts +1 -0
- package/src/client/types/app/bsky/graph/getList.ts +1 -0
- package/src/client/types/app/bsky/graph/getLists.ts +1 -0
- package/src/client/types/app/bsky/graph/getRelationships.ts +2 -0
- package/src/client/types/app/bsky/graph/list.ts +1 -0
- package/src/client/types/app/bsky/graph/listblock.ts +1 -0
- package/src/client/types/app/bsky/graph/listitem.ts +2 -0
- package/src/client/types/app/bsky/richtext/facet.ts +5 -4
- package/src/client/types/com/atproto/identity/updateHandle.ts +1 -0
- package/src/client/types/com/atproto/moderation/createReport.ts +1 -0
- package/src/client/types/com/atproto/repo/applyWrites.ts +6 -5
- package/src/client/types/com/atproto/repo/createRecord.ts +4 -4
- package/src/client/types/com/atproto/repo/deleteRecord.ts +2 -2
- package/src/client/types/com/atproto/repo/describeRepo.ts +3 -0
- package/src/client/types/com/atproto/repo/getRecord.ts +1 -1
- package/src/client/types/com/atproto/repo/putRecord.ts +4 -4
- package/src/client/types/com/atproto/server/createAccount.ts +8 -0
- package/src/client/types/com/atproto/server/createAppPassword.ts +1 -0
- package/src/client/types/com/atproto/server/describeServer.ts +3 -0
- package/src/client/types/com/atproto/server/getAccountInviteCodes.ts +1 -0
- package/src/client/types/com/atproto/server/reserveSigningKey.ts +2 -2
- package/src/client/types/com/atproto/sync/getBlob.ts +1 -1
- package/src/client/types/com/atproto/sync/getRecord.ts +1 -0
- package/src/client/types/com/atproto/sync/getRepo.ts +1 -1
- package/src/client/types/com/atproto/sync/listRepos.ts +1 -0
- package/src/client/types/com/atproto/sync/notifyOfUpdate.ts +1 -1
- package/src/client/types/com/atproto/sync/requestCrawl.ts +1 -1
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +16 -4
|
@@ -7,21 +7,29 @@ import { isObj, hasProp } from '../../../../util'
|
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
9
|
|
|
10
|
+
/** Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. */
|
|
10
11
|
export interface Commit {
|
|
12
|
+
/** The stream sequence number of this message. */
|
|
11
13
|
seq: number
|
|
14
|
+
/** DEPRECATED -- unused */
|
|
12
15
|
rebase: boolean
|
|
16
|
+
/** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
13
17
|
tooBig: boolean
|
|
18
|
+
/** The repo this event comes from. */
|
|
14
19
|
repo: string
|
|
20
|
+
/** Repo commit object CID. */
|
|
15
21
|
commit: CID
|
|
22
|
+
/** DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. */
|
|
16
23
|
prev?: CID | null
|
|
17
|
-
/** The rev of the emitted commit. */
|
|
24
|
+
/** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */
|
|
18
25
|
rev: string
|
|
19
|
-
/** The rev of the last emitted commit from this repo. */
|
|
26
|
+
/** The rev of the last emitted commit from this repo (if any). */
|
|
20
27
|
since: string | null
|
|
21
|
-
/** CAR file containing relevant blocks. */
|
|
28
|
+
/** CAR file containing relevant blocks, as a diff since the previous repo state. */
|
|
22
29
|
blocks: Uint8Array
|
|
23
30
|
ops: RepoOp[]
|
|
24
31
|
blobs: CID[]
|
|
32
|
+
/** Timestamp of when this message was originally broadcast. */
|
|
25
33
|
time: string
|
|
26
34
|
[k: string]: unknown
|
|
27
35
|
}
|
|
@@ -38,6 +46,7 @@ export function validateCommit(v: unknown): ValidationResult {
|
|
|
38
46
|
return lexicons.validate('com.atproto.sync.subscribeRepos#commit', v)
|
|
39
47
|
}
|
|
40
48
|
|
|
49
|
+
/** Represents an update of the account's handle, or transition to/from invalid state. */
|
|
41
50
|
export interface Handle {
|
|
42
51
|
seq: number
|
|
43
52
|
did: string
|
|
@@ -58,6 +67,7 @@ export function validateHandle(v: unknown): ValidationResult {
|
|
|
58
67
|
return lexicons.validate('com.atproto.sync.subscribeRepos#handle', v)
|
|
59
68
|
}
|
|
60
69
|
|
|
70
|
+
/** Represents an account moving from one PDS instance to another. NOTE: not implemented; full account migration may introduce a new message instead. */
|
|
61
71
|
export interface Migrate {
|
|
62
72
|
seq: number
|
|
63
73
|
did: string
|
|
@@ -78,6 +88,7 @@ export function validateMigrate(v: unknown): ValidationResult {
|
|
|
78
88
|
return lexicons.validate('com.atproto.sync.subscribeRepos#migrate', v)
|
|
79
89
|
}
|
|
80
90
|
|
|
91
|
+
/** Indicates that an account has been deleted. */
|
|
81
92
|
export interface Tombstone {
|
|
82
93
|
seq: number
|
|
83
94
|
did: string
|
|
@@ -115,10 +126,11 @@ export function validateInfo(v: unknown): ValidationResult {
|
|
|
115
126
|
return lexicons.validate('com.atproto.sync.subscribeRepos#info', v)
|
|
116
127
|
}
|
|
117
128
|
|
|
118
|
-
/** A repo operation, ie a
|
|
129
|
+
/** A repo operation, ie a mutation of a single record. */
|
|
119
130
|
export interface RepoOp {
|
|
120
131
|
action: 'create' | 'update' | 'delete' | (string & {})
|
|
121
132
|
path: string
|
|
133
|
+
/** For creates and updates, the new record CID. For deletions, null. */
|
|
122
134
|
cid: CID | null
|
|
123
135
|
[k: string]: unknown
|
|
124
136
|
}
|