@atproto/api 0.0.4 → 0.0.5
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/dist/client/lexicons.d.ts +0 -3
- package/dist/client/types/app/bsky/actor/getProfile.d.ts +3 -0
- package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +5 -0
- package/dist/client/types/app/bsky/actor/profile.d.ts +3 -0
- package/dist/client/types/app/bsky/actor/ref.d.ts +7 -0
- package/dist/client/types/app/bsky/actor/search.d.ts +3 -0
- package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +3 -0
- package/dist/client/types/app/bsky/embed/external.d.ts +9 -0
- package/dist/client/types/app/bsky/embed/images.d.ts +9 -0
- package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +9 -0
- package/dist/client/types/app/bsky/feed/getPostThread.d.ts +5 -0
- package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +3 -0
- package/dist/client/types/app/bsky/feed/getVotes.d.ts +3 -0
- package/dist/client/types/app/bsky/feed/post.d.ts +13 -1
- package/dist/client/types/app/bsky/feed/repost.d.ts +3 -0
- package/dist/client/types/app/bsky/feed/trend.d.ts +3 -0
- package/dist/client/types/app/bsky/feed/vote.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/assertion.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/confirmation.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/follow.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +5 -0
- package/dist/client/types/app/bsky/graph/getFollowers.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/getFollows.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/getMembers.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/getMemberships.d.ts +3 -0
- package/dist/client/types/app/bsky/graph/getMutes.d.ts +3 -0
- package/dist/client/types/app/bsky/notification/list.d.ts +3 -0
- package/dist/client/types/app/bsky/system/declRef.d.ts +3 -0
- package/dist/client/types/app/bsky/system/declaration.d.ts +3 -0
- package/dist/client/types/com/atproto/repo/batchWrite.d.ts +7 -0
- package/dist/client/types/com/atproto/repo/listRecords.d.ts +3 -0
- package/dist/client/types/com/atproto/repo/strongRef.d.ts +3 -0
- package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +3 -0
- package/dist/client/util.d.ts +2 -0
- package/dist/index.js +517 -21
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/client/lexicons.ts +0 -3
- package/src/client/types/app/bsky/actor/createScene.ts +3 -0
- package/src/client/types/app/bsky/actor/getProfile.ts +15 -0
- package/src/client/types/app/bsky/actor/getSuggestions.ts +27 -0
- package/src/client/types/app/bsky/actor/profile.ts +17 -0
- package/src/client/types/app/bsky/actor/ref.ts +37 -0
- package/src/client/types/app/bsky/actor/search.ts +13 -0
- package/src/client/types/app/bsky/actor/searchTypeahead.ts +15 -0
- package/src/client/types/app/bsky/actor/updateProfile.ts +3 -0
- package/src/client/types/app/bsky/embed/external.ts +53 -0
- package/src/client/types/app/bsky/embed/images.ts +51 -0
- package/src/client/types/app/bsky/feed/feedViewPost.ts +52 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +3 -0
- package/src/client/types/app/bsky/feed/getPostThread.ts +27 -0
- package/src/client/types/app/bsky/feed/getRepostedBy.ts +15 -0
- package/src/client/types/app/bsky/feed/getTimeline.ts +3 -0
- package/src/client/types/app/bsky/feed/getVotes.ts +13 -0
- package/src/client/types/app/bsky/feed/post.ts +69 -1
- package/src/client/types/app/bsky/feed/repost.ts +16 -0
- package/src/client/types/app/bsky/feed/setVote.ts +3 -0
- package/src/client/types/app/bsky/feed/trend.ts +16 -0
- package/src/client/types/app/bsky/feed/vote.ts +15 -0
- package/src/client/types/app/bsky/graph/assertCreator.ts +4 -0
- package/src/client/types/app/bsky/graph/assertMember.ts +4 -0
- package/src/client/types/app/bsky/graph/assertion.ts +16 -0
- package/src/client/types/app/bsky/graph/confirmation.ts +16 -0
- package/src/client/types/app/bsky/graph/follow.ts +16 -0
- package/src/client/types/app/bsky/graph/getAssertions.ts +27 -0
- package/src/client/types/app/bsky/graph/getFollowers.ts +15 -0
- package/src/client/types/app/bsky/graph/getFollows.ts +15 -0
- package/src/client/types/app/bsky/graph/getMembers.ts +15 -0
- package/src/client/types/app/bsky/graph/getMemberships.ts +15 -0
- package/src/client/types/app/bsky/graph/getMutes.ts +15 -0
- package/src/client/types/app/bsky/graph/mute.ts +3 -0
- package/src/client/types/app/bsky/graph/unmute.ts +3 -0
- package/src/client/types/app/bsky/notification/getCount.ts +3 -0
- package/src/client/types/app/bsky/notification/list.ts +15 -0
- package/src/client/types/app/bsky/notification/updateSeen.ts +3 -0
- package/src/client/types/app/bsky/system/actorScene.ts +4 -0
- package/src/client/types/app/bsky/system/actorUser.ts +4 -0
- package/src/client/types/app/bsky/system/declRef.ts +17 -0
- package/src/client/types/app/bsky/system/declaration.ts +17 -0
- package/src/client/types/com/atproto/account/create.ts +3 -0
- package/src/client/types/com/atproto/account/createInviteCode.ts +3 -0
- package/src/client/types/com/atproto/account/delete.ts +3 -0
- package/src/client/types/com/atproto/account/get.ts +3 -0
- package/src/client/types/com/atproto/account/requestPasswordReset.ts +3 -0
- package/src/client/types/com/atproto/account/resetPassword.ts +3 -0
- package/src/client/types/com/atproto/blob/upload.ts +3 -0
- package/src/client/types/com/atproto/handle/resolve.ts +3 -0
- package/src/client/types/com/atproto/repo/batchWrite.ts +39 -0
- package/src/client/types/com/atproto/repo/createRecord.ts +3 -0
- package/src/client/types/com/atproto/repo/deleteRecord.ts +3 -0
- package/src/client/types/com/atproto/repo/describe.ts +3 -0
- package/src/client/types/com/atproto/repo/getRecord.ts +3 -0
- package/src/client/types/com/atproto/repo/listRecords.ts +15 -0
- package/src/client/types/com/atproto/repo/putRecord.ts +3 -0
- package/src/client/types/com/atproto/repo/strongRef.ts +17 -0
- package/src/client/types/com/atproto/server/getAccountsConfig.ts +15 -0
- package/src/client/types/com/atproto/session/create.ts +3 -0
- package/src/client/types/com/atproto/session/delete.ts +3 -0
- package/src/client/types/com/atproto/session/get.ts +3 -0
- package/src/client/types/com/atproto/session/refresh.ts +3 -0
- package/src/client/types/com/atproto/sync/getRepo.ts +3 -0
- package/src/client/types/com/atproto/sync/getRoot.ts +3 -0
- package/src/client/types/com/atproto/sync/updateRepo.ts +3 -0
- package/src/client/util.ts +13 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as AppBskyEmbedImages from '../embed/images'
|
|
5
8
|
import * as AppBskyEmbedExternal from '../embed/external'
|
|
6
9
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
@@ -18,12 +21,34 @@ export interface Record {
|
|
|
18
21
|
[k: string]: unknown
|
|
19
22
|
}
|
|
20
23
|
|
|
24
|
+
export function isRecord(v: unknown): v is Record {
|
|
25
|
+
return (
|
|
26
|
+
isObj(v) &&
|
|
27
|
+
hasProp(v, '$type') &&
|
|
28
|
+
(v.$type === 'app.bsky.feed.post#main' || v.$type === 'app.bsky.feed.post')
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
33
|
+
return lexicons.validate('app.bsky.feed.post#main', v)
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
export interface ReplyRef {
|
|
22
37
|
root: ComAtprotoRepoStrongRef.Main
|
|
23
38
|
parent: ComAtprotoRepoStrongRef.Main
|
|
24
39
|
[k: string]: unknown
|
|
25
40
|
}
|
|
26
41
|
|
|
42
|
+
export function isReplyRef(v: unknown): v is ReplyRef {
|
|
43
|
+
return (
|
|
44
|
+
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.feed.post#replyRef'
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function validateReplyRef(v: unknown): ValidationResult {
|
|
49
|
+
return lexicons.validate('app.bsky.feed.post#replyRef', v)
|
|
50
|
+
}
|
|
51
|
+
|
|
27
52
|
export interface Entity {
|
|
28
53
|
index: TextSlice
|
|
29
54
|
/** Expected values are 'mention', 'hashtag', and 'link'. */
|
|
@@ -32,6 +57,16 @@ export interface Entity {
|
|
|
32
57
|
[k: string]: unknown
|
|
33
58
|
}
|
|
34
59
|
|
|
60
|
+
export function isEntity(v: unknown): v is Entity {
|
|
61
|
+
return (
|
|
62
|
+
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.feed.post#entity'
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function validateEntity(v: unknown): ValidationResult {
|
|
67
|
+
return lexicons.validate('app.bsky.feed.post#entity', v)
|
|
68
|
+
}
|
|
69
|
+
|
|
35
70
|
/** A text segment. Start is inclusive, end is exclusive. */
|
|
36
71
|
export interface TextSlice {
|
|
37
72
|
start: number
|
|
@@ -39,6 +74,18 @@ export interface TextSlice {
|
|
|
39
74
|
[k: string]: unknown
|
|
40
75
|
}
|
|
41
76
|
|
|
77
|
+
export function isTextSlice(v: unknown): v is TextSlice {
|
|
78
|
+
return (
|
|
79
|
+
isObj(v) &&
|
|
80
|
+
hasProp(v, '$type') &&
|
|
81
|
+
v.$type === 'app.bsky.feed.post#textSlice'
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function validateTextSlice(v: unknown): ValidationResult {
|
|
86
|
+
return lexicons.validate('app.bsky.feed.post#textSlice', v)
|
|
87
|
+
}
|
|
88
|
+
|
|
42
89
|
export interface View {
|
|
43
90
|
uri: string
|
|
44
91
|
cid: string
|
|
@@ -57,10 +104,31 @@ export interface View {
|
|
|
57
104
|
[k: string]: unknown
|
|
58
105
|
}
|
|
59
106
|
|
|
107
|
+
export function isView(v: unknown): v is View {
|
|
108
|
+
return (
|
|
109
|
+
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.feed.post#view'
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function validateView(v: unknown): ValidationResult {
|
|
114
|
+
return lexicons.validate('app.bsky.feed.post#view', v)
|
|
115
|
+
}
|
|
116
|
+
|
|
60
117
|
export interface ViewerState {
|
|
61
118
|
repost?: string
|
|
62
119
|
upvote?: string
|
|
63
120
|
downvote?: string
|
|
64
|
-
muted?: boolean
|
|
65
121
|
[k: string]: unknown
|
|
66
122
|
}
|
|
123
|
+
|
|
124
|
+
export function isViewerState(v: unknown): v is ViewerState {
|
|
125
|
+
return (
|
|
126
|
+
isObj(v) &&
|
|
127
|
+
hasProp(v, '$type') &&
|
|
128
|
+
v.$type === 'app.bsky.feed.post#viewerState'
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function validateViewerState(v: unknown): ValidationResult {
|
|
133
|
+
return lexicons.validate('app.bsky.feed.post#viewerState', v)
|
|
134
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
5
8
|
|
|
6
9
|
export interface Record {
|
|
@@ -8,3 +11,16 @@ export interface Record {
|
|
|
8
11
|
createdAt: string
|
|
9
12
|
[k: string]: unknown
|
|
10
13
|
}
|
|
14
|
+
|
|
15
|
+
export function isRecord(v: unknown): v is Record {
|
|
16
|
+
return (
|
|
17
|
+
isObj(v) &&
|
|
18
|
+
hasProp(v, '$type') &&
|
|
19
|
+
(v.$type === 'app.bsky.feed.repost#main' ||
|
|
20
|
+
v.$type === 'app.bsky.feed.repost')
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
25
|
+
return lexicons.validate('app.bsky.feed.repost#main', v)
|
|
26
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
6
9
|
|
|
7
10
|
export interface QueryParams {}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
5
8
|
|
|
6
9
|
export interface Record {
|
|
@@ -8,3 +11,16 @@ export interface Record {
|
|
|
8
11
|
createdAt: string
|
|
9
12
|
[k: string]: unknown
|
|
10
13
|
}
|
|
14
|
+
|
|
15
|
+
export function isRecord(v: unknown): v is Record {
|
|
16
|
+
return (
|
|
17
|
+
isObj(v) &&
|
|
18
|
+
hasProp(v, '$type') &&
|
|
19
|
+
(v.$type === 'app.bsky.feed.trend#main' ||
|
|
20
|
+
v.$type === 'app.bsky.feed.trend')
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
25
|
+
return lexicons.validate('app.bsky.feed.trend#main', v)
|
|
26
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
5
8
|
|
|
6
9
|
export interface Record {
|
|
@@ -9,3 +12,15 @@ export interface Record {
|
|
|
9
12
|
createdAt: string
|
|
10
13
|
[k: string]: unknown
|
|
11
14
|
}
|
|
15
|
+
|
|
16
|
+
export function isRecord(v: unknown): v is Record {
|
|
17
|
+
return (
|
|
18
|
+
isObj(v) &&
|
|
19
|
+
hasProp(v, '$type') &&
|
|
20
|
+
(v.$type === 'app.bsky.feed.vote#main' || v.$type === 'app.bsky.feed.vote')
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
25
|
+
return lexicons.validate('app.bsky.feed.vote#main', v)
|
|
26
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
|
|
4
8
|
/** Assertion type: Creator. Defined for app.bsky.graph.assertions's assertion. */
|
|
5
9
|
export const MAIN = 'app.bsky.graph.assertCreator#main'
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
|
|
4
8
|
/** Assertion type: Member. Defined for app.bsky.graph.assertions's assertion. */
|
|
5
9
|
export const MAIN = 'app.bsky.graph.assertMember#main'
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as AppBskyActorRef from '../actor/ref'
|
|
5
8
|
|
|
6
9
|
export interface Record {
|
|
@@ -9,3 +12,16 @@ export interface Record {
|
|
|
9
12
|
createdAt: string
|
|
10
13
|
[k: string]: unknown
|
|
11
14
|
}
|
|
15
|
+
|
|
16
|
+
export function isRecord(v: unknown): v is Record {
|
|
17
|
+
return (
|
|
18
|
+
isObj(v) &&
|
|
19
|
+
hasProp(v, '$type') &&
|
|
20
|
+
(v.$type === 'app.bsky.graph.assertion#main' ||
|
|
21
|
+
v.$type === 'app.bsky.graph.assertion')
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
26
|
+
return lexicons.validate('app.bsky.graph.assertion#main', v)
|
|
27
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as AppBskyActorRef from '../actor/ref'
|
|
5
8
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
6
9
|
|
|
@@ -10,3 +13,16 @@ export interface Record {
|
|
|
10
13
|
createdAt: string
|
|
11
14
|
[k: string]: unknown
|
|
12
15
|
}
|
|
16
|
+
|
|
17
|
+
export function isRecord(v: unknown): v is Record {
|
|
18
|
+
return (
|
|
19
|
+
isObj(v) &&
|
|
20
|
+
hasProp(v, '$type') &&
|
|
21
|
+
(v.$type === 'app.bsky.graph.confirmation#main' ||
|
|
22
|
+
v.$type === 'app.bsky.graph.confirmation')
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
27
|
+
return lexicons.validate('app.bsky.graph.confirmation#main', v)
|
|
28
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
4
7
|
import * as AppBskyActorRef from '../actor/ref'
|
|
5
8
|
|
|
6
9
|
export interface Record {
|
|
@@ -8,3 +11,16 @@ export interface Record {
|
|
|
8
11
|
createdAt: string
|
|
9
12
|
[k: string]: unknown
|
|
10
13
|
}
|
|
14
|
+
|
|
15
|
+
export function isRecord(v: unknown): v is Record {
|
|
16
|
+
return (
|
|
17
|
+
isObj(v) &&
|
|
18
|
+
hasProp(v, '$type') &&
|
|
19
|
+
(v.$type === 'app.bsky.graph.follow#main' ||
|
|
20
|
+
v.$type === 'app.bsky.graph.follow')
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
25
|
+
return lexicons.validate('app.bsky.graph.follow#main', v)
|
|
26
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskyActorRef from '../actor/ref'
|
|
6
9
|
|
|
7
10
|
export interface QueryParams {
|
|
@@ -49,6 +52,18 @@ export interface Assertion {
|
|
|
49
52
|
[k: string]: unknown
|
|
50
53
|
}
|
|
51
54
|
|
|
55
|
+
export function isAssertion(v: unknown): v is Assertion {
|
|
56
|
+
return (
|
|
57
|
+
isObj(v) &&
|
|
58
|
+
hasProp(v, '$type') &&
|
|
59
|
+
v.$type === 'app.bsky.graph.getAssertions#assertion'
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function validateAssertion(v: unknown): ValidationResult {
|
|
64
|
+
return lexicons.validate('app.bsky.graph.getAssertions#assertion', v)
|
|
65
|
+
}
|
|
66
|
+
|
|
52
67
|
export interface Confirmation {
|
|
53
68
|
uri: string
|
|
54
69
|
cid: string
|
|
@@ -56,3 +71,15 @@ export interface Confirmation {
|
|
|
56
71
|
createdAt: string
|
|
57
72
|
[k: string]: unknown
|
|
58
73
|
}
|
|
74
|
+
|
|
75
|
+
export function isConfirmation(v: unknown): v is Confirmation {
|
|
76
|
+
return (
|
|
77
|
+
isObj(v) &&
|
|
78
|
+
hasProp(v, '$type') &&
|
|
79
|
+
v.$type === 'app.bsky.graph.getAssertions#confirmation'
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function validateConfirmation(v: unknown): ValidationResult {
|
|
84
|
+
return lexicons.validate('app.bsky.graph.getAssertions#confirmation', v)
|
|
85
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskyActorRef from '../actor/ref'
|
|
6
9
|
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
10
|
|
|
@@ -46,3 +49,15 @@ export interface Follower {
|
|
|
46
49
|
indexedAt: string
|
|
47
50
|
[k: string]: unknown
|
|
48
51
|
}
|
|
52
|
+
|
|
53
|
+
export function isFollower(v: unknown): v is Follower {
|
|
54
|
+
return (
|
|
55
|
+
isObj(v) &&
|
|
56
|
+
hasProp(v, '$type') &&
|
|
57
|
+
v.$type === 'app.bsky.graph.getFollowers#follower'
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function validateFollower(v: unknown): ValidationResult {
|
|
62
|
+
return lexicons.validate('app.bsky.graph.getFollowers#follower', v)
|
|
63
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskyActorRef from '../actor/ref'
|
|
6
9
|
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
10
|
|
|
@@ -45,3 +48,15 @@ export interface Follow {
|
|
|
45
48
|
indexedAt: string
|
|
46
49
|
[k: string]: unknown
|
|
47
50
|
}
|
|
51
|
+
|
|
52
|
+
export function isFollow(v: unknown): v is Follow {
|
|
53
|
+
return (
|
|
54
|
+
isObj(v) &&
|
|
55
|
+
hasProp(v, '$type') &&
|
|
56
|
+
v.$type === 'app.bsky.graph.getFollows#follow'
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function validateFollow(v: unknown): ValidationResult {
|
|
61
|
+
return lexicons.validate('app.bsky.graph.getFollows#follow', v)
|
|
62
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskyActorRef from '../actor/ref'
|
|
6
9
|
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
10
|
|
|
@@ -45,3 +48,15 @@ export interface Member {
|
|
|
45
48
|
indexedAt: string
|
|
46
49
|
[k: string]: unknown
|
|
47
50
|
}
|
|
51
|
+
|
|
52
|
+
export function isMember(v: unknown): v is Member {
|
|
53
|
+
return (
|
|
54
|
+
isObj(v) &&
|
|
55
|
+
hasProp(v, '$type') &&
|
|
56
|
+
v.$type === 'app.bsky.graph.getMembers#member'
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function validateMember(v: unknown): ValidationResult {
|
|
61
|
+
return lexicons.validate('app.bsky.graph.getMembers#member', v)
|
|
62
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskyActorRef from '../actor/ref'
|
|
6
9
|
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
10
|
|
|
@@ -45,3 +48,15 @@ export interface Membership {
|
|
|
45
48
|
indexedAt: string
|
|
46
49
|
[k: string]: unknown
|
|
47
50
|
}
|
|
51
|
+
|
|
52
|
+
export function isMembership(v: unknown): v is Membership {
|
|
53
|
+
return (
|
|
54
|
+
isObj(v) &&
|
|
55
|
+
hasProp(v, '$type') &&
|
|
56
|
+
v.$type === 'app.bsky.graph.getMemberships#membership'
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function validateMembership(v: unknown): ValidationResult {
|
|
61
|
+
return lexicons.validate('app.bsky.graph.getMemberships#membership', v)
|
|
62
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
9
|
|
|
7
10
|
export interface QueryParams {
|
|
@@ -41,3 +44,15 @@ export interface Mute {
|
|
|
41
44
|
createdAt: string
|
|
42
45
|
[k: string]: unknown
|
|
43
46
|
}
|
|
47
|
+
|
|
48
|
+
export function isMute(v: unknown): v is Mute {
|
|
49
|
+
return (
|
|
50
|
+
isObj(v) &&
|
|
51
|
+
hasProp(v, '$type') &&
|
|
52
|
+
v.$type === 'app.bsky.graph.getMutes#mute'
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function validateMute(v: unknown): ValidationResult {
|
|
57
|
+
return lexicons.validate('app.bsky.graph.getMutes#mute', v)
|
|
58
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
import * as AppBskyActorRef from '../actor/ref'
|
|
6
9
|
|
|
7
10
|
export interface QueryParams {
|
|
@@ -53,3 +56,15 @@ export interface Notification {
|
|
|
53
56
|
indexedAt: string
|
|
54
57
|
[k: string]: unknown
|
|
55
58
|
}
|
|
59
|
+
|
|
60
|
+
export function isNotification(v: unknown): v is Notification {
|
|
61
|
+
return (
|
|
62
|
+
isObj(v) &&
|
|
63
|
+
hasProp(v, '$type') &&
|
|
64
|
+
v.$type === 'app.bsky.notification.list#notification'
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function validateNotification(v: unknown): ValidationResult {
|
|
69
|
+
return lexicons.validate('app.bsky.notification.list#notification', v)
|
|
70
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
|
|
4
8
|
/** Actor type: Scene. Defined for app.bsky.system.declaration's actorType. */
|
|
5
9
|
export const MAIN = 'app.bsky.system.actorScene#main'
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
|
|
4
8
|
/** Actor type: User. Defined for app.bsky.system.declaration's actorType. */
|
|
5
9
|
export const MAIN = 'app.bsky.system.actorUser#main'
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
|
|
4
8
|
/** A reference to a app.bsky.system.declaration record. */
|
|
5
9
|
export interface Main {
|
|
6
10
|
cid: string
|
|
@@ -10,3 +14,16 @@ export interface Main {
|
|
|
10
14
|
| (string & {})
|
|
11
15
|
[k: string]: unknown
|
|
12
16
|
}
|
|
17
|
+
|
|
18
|
+
export function isMain(v: unknown): v is Main {
|
|
19
|
+
return (
|
|
20
|
+
isObj(v) &&
|
|
21
|
+
hasProp(v, '$type') &&
|
|
22
|
+
(v.$type === 'app.bsky.system.declRef#main' ||
|
|
23
|
+
v.$type === 'app.bsky.system.declRef')
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function validateMain(v: unknown): ValidationResult {
|
|
28
|
+
return lexicons.validate('app.bsky.system.declRef#main', v)
|
|
29
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
|
|
4
8
|
export interface Record {
|
|
5
9
|
actorType:
|
|
6
10
|
| 'app.bsky.system.actorUser'
|
|
@@ -8,3 +12,16 @@ export interface Record {
|
|
|
8
12
|
| (string & {})
|
|
9
13
|
[k: string]: unknown
|
|
10
14
|
}
|
|
15
|
+
|
|
16
|
+
export function isRecord(v: unknown): v is Record {
|
|
17
|
+
return (
|
|
18
|
+
isObj(v) &&
|
|
19
|
+
hasProp(v, '$type') &&
|
|
20
|
+
(v.$type === 'app.bsky.system.declaration#main' ||
|
|
21
|
+
v.$type === 'app.bsky.system.declaration')
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
26
|
+
return lexicons.validate('app.bsky.system.declaration#main', v)
|
|
27
|
+
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
5
8
|
|
|
6
9
|
export interface QueryParams {}
|
|
7
10
|
|