@atproto/api 0.1.3 → 0.2.1
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/README.md +179 -25
- package/build.js +2 -1
- package/dist/agent.d.ts +11 -6
- package/dist/bsky-agent.d.ts +43 -0
- package/dist/client/index.d.ts +117 -215
- package/dist/client/lexicons.d.ts +1447 -1401
- package/dist/client/types/app/bsky/actor/defs.d.ts +47 -0
- package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -2
- package/dist/client/types/app/bsky/actor/getProfiles.d.ts +2 -2
- package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -2
- package/dist/client/types/app/bsky/actor/profile.d.ts +4 -60
- package/dist/client/types/app/bsky/actor/searchActors.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchActorsTypeahead.d.ts +20 -0
- package/dist/client/types/app/bsky/embed/complexRecord.d.ts +24 -0
- package/dist/client/types/app/bsky/embed/external.d.ts +9 -13
- package/dist/client/types/app/bsky/embed/images.d.ts +9 -13
- package/dist/client/types/app/bsky/embed/post.d.ts +33 -0
- package/dist/client/types/app/bsky/embed/record.d.ts +21 -13
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
- package/dist/client/types/app/bsky/feed/defs.d.ts +77 -0
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +4 -4
- package/dist/client/types/app/bsky/{graph/getMembers.d.ts → feed/getLikes.d.ts} +12 -14
- package/dist/client/types/app/bsky/feed/getPostThread.d.ts +2 -24
- package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +3 -3
- package/dist/client/types/app/bsky/feed/getTimeline.d.ts +3 -3
- package/dist/client/types/app/bsky/feed/post.d.ts +4 -29
- package/dist/client/types/app/bsky/graph/follow.d.ts +1 -2
- package/dist/client/types/app/bsky/graph/getFollowers.d.ts +5 -5
- package/dist/client/types/app/bsky/graph/getFollows.d.ts +5 -5
- package/dist/client/types/app/bsky/graph/getMutes.d.ts +3 -3
- package/dist/client/types/app/bsky/{notification/updateSeen.d.ts → graph/muteActor.d.ts} +1 -1
- package/dist/client/types/app/bsky/graph/unmuteActor.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/getUnreadCount.d.ts +17 -0
- package/dist/client/types/app/bsky/{graph/getMemberships.d.ts → notification/listNotifications.d.ts} +13 -14
- package/dist/client/types/app/bsky/richtext/facet.d.ts +30 -0
- package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +21 -0
- package/dist/client/types/com/atproto/admin/defs.d.ts +181 -0
- package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +3 -3
- package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +3 -3
- package/dist/client/types/com/atproto/admin/getRecord.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/getRepo.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/searchRepos.d.ts +3 -3
- package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +5 -6
- package/dist/client/types/com/atproto/{sync/getHead.d.ts → identity/resolveHandle.d.ts} +2 -2
- package/dist/client/types/com/atproto/identity/updateHandle.d.ts +17 -0
- package/dist/client/types/com/atproto/moderation/createReport.d.ts +38 -0
- package/dist/client/types/com/atproto/moderation/defs.d.ts +3 -0
- package/dist/client/types/com/atproto/repo/applyWrites.d.ts +47 -0
- package/dist/client/types/com/atproto/repo/createRecord.d.ts +7 -2
- package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +7 -2
- package/dist/client/types/com/atproto/repo/describeRepo.d.ts +22 -0
- package/dist/client/types/com/atproto/repo/getRecord.d.ts +1 -1
- package/dist/client/types/com/atproto/repo/listRecords.d.ts +3 -3
- package/dist/client/types/com/atproto/repo/putRecord.d.ts +7 -2
- package/dist/client/types/com/atproto/repo/uploadBlob.d.ts +20 -0
- package/dist/client/types/{app/bsky/actor/createScene.d.ts → com/atproto/server/createAccount.d.ts} +14 -2
- package/dist/client/types/com/atproto/server/createInviteCode.d.ts +22 -0
- package/dist/client/types/com/atproto/server/createSession.d.ts +29 -0
- package/dist/client/types/com/atproto/server/deleteAccount.d.ts +25 -0
- package/dist/client/types/com/atproto/{sync/getRecord.d.ts → server/deleteSession.d.ts} +1 -5
- package/dist/client/types/com/atproto/server/describeServer.d.ts +27 -0
- package/dist/client/types/com/atproto/{sync/getRoot.d.ts → server/getSession.d.ts} +2 -2
- package/dist/client/types/com/atproto/server/refreshSession.d.ts +24 -0
- package/dist/client/types/com/atproto/{sync/updateRepo.d.ts → server/requestAccountDelete.d.ts} +1 -3
- package/dist/client/types/com/atproto/server/requestPasswordReset.d.ts +17 -0
- package/dist/client/types/com/atproto/server/resetPassword.d.ts +24 -0
- package/dist/client/types/com/atproto/sync/{getCheckout.d.ts → getBlob.d.ts} +1 -1
- package/dist/client/types/com/atproto/sync/{getCommitPath.d.ts → listBlobs.d.ts} +1 -1
- package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +1 -0
- package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +1 -1
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -1
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +58 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +8055 -3651
- package/dist/index.js.map +4 -4
- package/dist/rich-text/detection.d.ts +4 -0
- package/dist/rich-text/rich-text.d.ts +39 -0
- package/dist/rich-text/sanitization.d.ts +4 -0
- package/dist/rich-text/unicode.d.ts +11 -0
- package/dist/types.d.ts +2 -2
- package/docs/rn-fetch-handler.ts +88 -0
- package/package.json +4 -1
- package/src/agent.ts +51 -15
- package/src/bsky-agent.ts +228 -0
- package/src/client/index.ts +330 -581
- package/src/client/lexicons.ts +1833 -1779
- package/src/client/types/app/bsky/actor/defs.ts +97 -0
- package/src/client/types/app/bsky/actor/getProfile.ts +4 -3
- package/src/client/types/app/bsky/actor/getProfiles.ts +4 -3
- package/src/client/types/app/bsky/actor/getSuggestions.ts +4 -3
- package/src/client/types/app/bsky/actor/profile.ts +5 -95
- package/src/client/types/app/bsky/actor/{searchTypeahead.ts → searchActors.ts} +6 -3
- package/src/client/types/app/bsky/actor/{search.ts → searchActorsTypeahead.ts} +4 -5
- package/src/client/types/app/bsky/embed/external.ts +14 -13
- package/src/client/types/app/bsky/embed/images.ts +14 -15
- package/src/client/types/app/bsky/embed/record.ts +32 -25
- package/src/client/types/app/bsky/embed/recordWithMedia.ts +53 -0
- package/src/client/types/app/bsky/feed/defs.ts +156 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +6 -5
- package/src/client/types/app/bsky/feed/{getVotes.ts → getLikes.ts} +11 -12
- package/src/client/types/app/bsky/feed/getPostThread.ts +5 -48
- package/src/client/types/app/bsky/feed/getRepostedBy.ts +5 -4
- package/src/client/types/app/bsky/feed/getTimeline.ts +5 -4
- package/src/client/types/app/bsky/feed/{vote.ts → like.ts} +4 -4
- package/src/client/types/app/bsky/feed/post.ts +10 -52
- package/src/client/types/app/bsky/feed/repost.ts +2 -1
- package/src/client/types/app/bsky/graph/follow.ts +3 -3
- package/src/client/types/app/bsky/graph/getFollowers.ts +7 -6
- package/src/client/types/app/bsky/graph/getFollows.ts +7 -6
- package/src/client/types/app/bsky/graph/getMutes.ts +5 -4
- package/src/client/types/app/bsky/graph/{mute.ts → muteActor.ts} +3 -2
- package/src/client/types/app/bsky/graph/{unmute.ts → unmuteActor.ts} +3 -2
- package/src/client/types/app/bsky/notification/{getCount.ts → getUnreadCount.ts} +2 -1
- package/src/client/types/app/bsky/notification/{list.ts → listNotifications.ts} +13 -9
- package/src/client/types/app/bsky/notification/updateSeen.ts +2 -1
- package/src/client/types/app/bsky/richtext/facet.ts +81 -0
- package/src/client/types/app/bsky/unspecced/getPopular.ts +38 -0
- package/src/client/types/com/atproto/admin/defs.ts +366 -0
- package/src/client/types/com/atproto/admin/getModerationAction.ts +4 -3
- package/src/client/types/com/atproto/admin/getModerationActions.ts +5 -4
- package/src/client/types/com/atproto/admin/getModerationReport.ts +4 -3
- package/src/client/types/com/atproto/admin/getModerationReports.ts +5 -4
- package/src/client/types/com/atproto/admin/getRecord.ts +4 -3
- package/src/client/types/com/atproto/admin/getRepo.ts +4 -3
- package/src/client/types/com/atproto/admin/resolveModerationReports.ts +4 -3
- package/src/client/types/com/atproto/admin/reverseModerationAction.ts +4 -3
- package/src/client/types/com/atproto/admin/searchRepos.ts +5 -4
- package/src/client/types/com/atproto/admin/takeModerationAction.ts +10 -10
- package/src/client/types/com/atproto/{handle/resolve.ts → identity/resolveHandle.ts} +2 -1
- package/src/client/types/com/atproto/{handle/update.ts → identity/updateHandle.ts} +2 -1
- package/src/client/types/com/atproto/{report/create.ts → moderation/createReport.ts} +10 -10
- package/src/client/types/com/atproto/moderation/defs.ts +17 -0
- package/src/client/types/com/atproto/repo/{batchWrite.ts → applyWrites.ts} +21 -12
- package/src/client/types/com/atproto/repo/createRecord.ts +15 -3
- package/src/client/types/com/atproto/repo/deleteRecord.ts +15 -3
- package/src/client/types/com/atproto/repo/{describe.ts → describeRepo.ts} +3 -2
- package/src/client/types/com/atproto/repo/getRecord.ts +4 -3
- package/src/client/types/com/atproto/repo/listRecords.ts +7 -6
- package/src/client/types/com/atproto/repo/putRecord.ts +18 -6
- package/src/client/types/com/atproto/repo/strongRef.ts +2 -1
- package/src/client/types/com/atproto/{blob/upload.ts → repo/uploadBlob.ts} +3 -2
- package/src/client/types/com/atproto/{account/create.ts → server/createAccount.ts} +9 -1
- package/src/client/types/com/atproto/{account → server}/createInviteCode.ts +2 -1
- package/src/client/types/com/atproto/{session/create.ts → server/createSession.ts} +2 -1
- package/src/client/types/com/atproto/{account/delete.ts → server/deleteAccount.ts} +2 -1
- package/src/client/types/com/atproto/{account/requestDelete.ts → server/deleteSession.ts} +2 -1
- package/src/client/types/com/atproto/server/{getAccountsConfig.ts → describeServer.ts} +4 -3
- package/src/client/types/com/atproto/{session/get.ts → server/getSession.ts} +2 -1
- package/src/client/types/com/atproto/{session/refresh.ts → server/refreshSession.ts} +2 -1
- package/src/client/types/com/atproto/{session/delete.ts → server/requestAccountDelete.ts} +2 -1
- package/src/client/types/com/atproto/{account → server}/requestPasswordReset.ts +2 -1
- package/src/client/types/com/atproto/{account → server}/resetPassword.ts +2 -1
- package/src/client/types/com/atproto/sync/getBlob.ts +33 -0
- package/src/client/types/com/atproto/sync/getBlocks.ts +2 -1
- package/src/client/types/com/atproto/sync/getCheckout.ts +2 -1
- package/src/client/types/com/atproto/sync/getCommitPath.ts +2 -1
- package/src/client/types/com/atproto/sync/getHead.ts +2 -1
- package/src/client/types/com/atproto/sync/getRecord.ts +2 -1
- package/src/client/types/com/atproto/sync/getRepo.ts +2 -1
- package/src/client/types/com/atproto/sync/listBlobs.ts +40 -0
- package/src/client/types/com/atproto/sync/notifyOfUpdate.ts +6 -2
- package/src/client/types/com/atproto/sync/requestCrawl.ts +3 -2
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +131 -0
- package/src/index.ts +12 -0
- package/src/rich-text/detection.ts +83 -0
- package/src/rich-text/rich-text.ts +401 -0
- package/src/rich-text/sanitization.ts +40 -0
- package/src/rich-text/unicode.ts +47 -0
- package/src/types.ts +2 -2
- package/tests/agent.test.ts +10 -6
- package/tests/bsky-agent.test.ts +140 -0
- package/tests/errors.test.ts +4 -4
- package/tests/rich-text-detection.test.ts +229 -0
- package/tests/rich-text-sanitization.test.ts +211 -0
- package/tests/rich-text.test.ts +661 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
- package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
- package/dist/client/types/com/atproto/repo/strongRef.d.ts +0 -8
- package/dist/client/util.d.ts +0 -2
- package/src/client/types/app/bsky/actor/ref.ts +0 -64
- package/src/client/types/app/bsky/actor/updateProfile.ts +0 -71
- package/src/client/types/app/bsky/feed/feedViewPost.ts +0 -64
- package/src/client/types/app/bsky/feed/setVote.ts +0 -40
- package/src/client/types/app/bsky/graph/assertCreator.ts +0 -9
- package/src/client/types/app/bsky/graph/assertMember.ts +0 -9
- package/src/client/types/app/bsky/graph/assertion.ts +0 -27
- package/src/client/types/app/bsky/graph/confirmation.ts +0 -28
- package/src/client/types/app/bsky/system/actorUser.ts +0 -9
- package/src/client/types/app/bsky/system/declRef.ts +0 -26
- package/src/client/types/app/bsky/system/declaration.ts +0 -24
- package/src/client/types/com/atproto/account/get.ts +0 -26
- package/src/client/types/com/atproto/admin/blob.ts +0 -84
- package/src/client/types/com/atproto/admin/moderationAction.ts +0 -118
- package/src/client/types/com/atproto/admin/moderationReport.ts +0 -64
- package/src/client/types/com/atproto/admin/record.ts +0 -92
- package/src/client/types/com/atproto/admin/repo.ts +0 -103
- package/src/client/types/com/atproto/repo/recordRef.ts +0 -25
- package/src/client/types/com/atproto/repo/repoRef.ts +0 -24
- package/src/client/types/com/atproto/report/reasonType.ts +0 -16
- package/src/client/types/com/atproto/report/subject.ts +0 -66
- package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +0 -7
- /package/dist/client/types/app/bsky/feed/{repost.d.ts → like.d.ts} +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
-
import { isObj, hasProp } from '../../../../util'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import * as ComAtprotoAdminModerationAction from './moderationAction'
|
|
8
|
-
import * as ComAtprotoAdminModerationReport from './moderationReport'
|
|
9
|
-
|
|
10
|
-
export interface View {
|
|
11
|
-
did: string
|
|
12
|
-
handle: string
|
|
13
|
-
account?: Account
|
|
14
|
-
relatedRecords: {}[]
|
|
15
|
-
indexedAt: string
|
|
16
|
-
moderation: Moderation
|
|
17
|
-
[k: string]: unknown
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function isView(v: unknown): v is View {
|
|
21
|
-
return (
|
|
22
|
-
isObj(v) && hasProp(v, '$type') && v.$type === 'com.atproto.admin.repo#view'
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function validateView(v: unknown): ValidationResult {
|
|
27
|
-
return lexicons.validate('com.atproto.admin.repo#view', v)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface ViewDetail {
|
|
31
|
-
did: string
|
|
32
|
-
handle: string
|
|
33
|
-
account?: Account
|
|
34
|
-
relatedRecords: {}[]
|
|
35
|
-
indexedAt: string
|
|
36
|
-
moderation: ModerationDetail
|
|
37
|
-
[k: string]: unknown
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function isViewDetail(v: unknown): v is ViewDetail {
|
|
41
|
-
return (
|
|
42
|
-
isObj(v) &&
|
|
43
|
-
hasProp(v, '$type') &&
|
|
44
|
-
v.$type === 'com.atproto.admin.repo#viewDetail'
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function validateViewDetail(v: unknown): ValidationResult {
|
|
49
|
-
return lexicons.validate('com.atproto.admin.repo#viewDetail', v)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface Account {
|
|
53
|
-
email: string
|
|
54
|
-
[k: string]: unknown
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function isAccount(v: unknown): v is Account {
|
|
58
|
-
return (
|
|
59
|
-
isObj(v) &&
|
|
60
|
-
hasProp(v, '$type') &&
|
|
61
|
-
v.$type === 'com.atproto.admin.repo#account'
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function validateAccount(v: unknown): ValidationResult {
|
|
66
|
-
return lexicons.validate('com.atproto.admin.repo#account', v)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface Moderation {
|
|
70
|
-
currentAction?: ComAtprotoAdminModerationAction.ViewCurrent
|
|
71
|
-
[k: string]: unknown
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function isModeration(v: unknown): v is Moderation {
|
|
75
|
-
return (
|
|
76
|
-
isObj(v) &&
|
|
77
|
-
hasProp(v, '$type') &&
|
|
78
|
-
v.$type === 'com.atproto.admin.repo#moderation'
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function validateModeration(v: unknown): ValidationResult {
|
|
83
|
-
return lexicons.validate('com.atproto.admin.repo#moderation', v)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface ModerationDetail {
|
|
87
|
-
currentAction?: ComAtprotoAdminModerationAction.ViewCurrent
|
|
88
|
-
actions: ComAtprotoAdminModerationAction.View[]
|
|
89
|
-
reports: ComAtprotoAdminModerationReport.View[]
|
|
90
|
-
[k: string]: unknown
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export function isModerationDetail(v: unknown): v is ModerationDetail {
|
|
94
|
-
return (
|
|
95
|
-
isObj(v) &&
|
|
96
|
-
hasProp(v, '$type') &&
|
|
97
|
-
v.$type === 'com.atproto.admin.repo#moderationDetail'
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export function validateModerationDetail(v: unknown): ValidationResult {
|
|
102
|
-
return lexicons.validate('com.atproto.admin.repo#moderationDetail', v)
|
|
103
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
-
import { isObj, hasProp } from '../../../../util'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
|
|
8
|
-
export interface Main {
|
|
9
|
-
uri: string
|
|
10
|
-
cid?: string
|
|
11
|
-
[k: string]: unknown
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function isMain(v: unknown): v is Main {
|
|
15
|
-
return (
|
|
16
|
-
isObj(v) &&
|
|
17
|
-
hasProp(v, '$type') &&
|
|
18
|
-
(v.$type === 'com.atproto.repo.recordRef#main' ||
|
|
19
|
-
v.$type === 'com.atproto.repo.recordRef')
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function validateMain(v: unknown): ValidationResult {
|
|
24
|
-
return lexicons.validate('com.atproto.repo.recordRef#main', v)
|
|
25
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
-
import { isObj, hasProp } from '../../../../util'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
|
|
8
|
-
export interface Main {
|
|
9
|
-
did: string
|
|
10
|
-
[k: string]: unknown
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function isMain(v: unknown): v is Main {
|
|
14
|
-
return (
|
|
15
|
-
isObj(v) &&
|
|
16
|
-
hasProp(v, '$type') &&
|
|
17
|
-
(v.$type === 'com.atproto.repo.repoRef#main' ||
|
|
18
|
-
v.$type === 'com.atproto.repo.repoRef')
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function validateMain(v: unknown): ValidationResult {
|
|
23
|
-
return lexicons.validate('com.atproto.repo.repoRef#main', v)
|
|
24
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
-
import { isObj, hasProp } from '../../../../util'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
|
|
8
|
-
export type Main =
|
|
9
|
-
| 'com.atproto.report.reasonType#spam'
|
|
10
|
-
| 'com.atproto.report.reasonType#other'
|
|
11
|
-
| (string & {})
|
|
12
|
-
|
|
13
|
-
/** Moderation report reason: Spam. */
|
|
14
|
-
export const SPAM = 'com.atproto.report.reasonType#spam'
|
|
15
|
-
/** Moderation report reason: Other. */
|
|
16
|
-
export const OTHER = 'com.atproto.report.reasonType#other'
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
5
|
-
import { isObj, hasProp } from '../../../../util'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
|
|
8
|
-
export interface Repo {
|
|
9
|
-
/** The DID of the repo. */
|
|
10
|
-
did: string
|
|
11
|
-
[k: string]: unknown
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function isRepo(v: unknown): v is Repo {
|
|
15
|
-
return (
|
|
16
|
-
isObj(v) &&
|
|
17
|
-
hasProp(v, '$type') &&
|
|
18
|
-
v.$type === 'com.atproto.report.subject#repo'
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function validateRepo(v: unknown): ValidationResult {
|
|
23
|
-
return lexicons.validate('com.atproto.report.subject#repo', v)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface Record {
|
|
27
|
-
/** The DID of the repo. */
|
|
28
|
-
did: string
|
|
29
|
-
/** The NSID of the collection. */
|
|
30
|
-
collection: string
|
|
31
|
-
/** The key of the record. */
|
|
32
|
-
rkey: string
|
|
33
|
-
/** The CID of the version of the record. If not specified, defaults to the most recent version. */
|
|
34
|
-
cid?: string
|
|
35
|
-
[k: string]: unknown
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function isRecord(v: unknown): v is Record {
|
|
39
|
-
return (
|
|
40
|
-
isObj(v) &&
|
|
41
|
-
hasProp(v, '$type') &&
|
|
42
|
-
v.$type === 'com.atproto.report.subject#record'
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function validateRecord(v: unknown): ValidationResult {
|
|
47
|
-
return lexicons.validate('com.atproto.report.subject#record', v)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface RecordRef {
|
|
51
|
-
uri: string
|
|
52
|
-
cid: string
|
|
53
|
-
[k: string]: unknown
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function isRecordRef(v: unknown): v is RecordRef {
|
|
57
|
-
return (
|
|
58
|
-
isObj(v) &&
|
|
59
|
-
hasProp(v, '$type') &&
|
|
60
|
-
v.$type === 'com.atproto.report.subject#recordRef'
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function validateRecordRef(v: unknown): ValidationResult {
|
|
65
|
-
return lexicons.validate('com.atproto.report.subject#recordRef', v)
|
|
66
|
-
}
|
|
File without changes
|