@atproto/bsky 0.0.14 → 0.0.16
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 +22 -0
- package/dist/api/app/bsky/feed/searchPosts.d.ts +3 -0
- package/dist/api/com/atproto/moderation/util.d.ts +4 -3
- package/dist/config.d.ts +2 -2
- package/dist/context.d.ts +16 -1
- package/dist/db/index.js +26 -1
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20231003T202833377Z-create-moderation-subject-status.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/pagination.d.ts +2 -1
- package/dist/db/{periodic-moderation-action-reversal.d.ts → periodic-moderation-event-reversal.d.ts} +3 -5
- package/dist/db/tables/moderation.d.ts +24 -34
- package/dist/feed-gen/types.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3332 -2430
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +18 -18
- package/dist/lexicon/lexicons.d.ts +460 -385
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -7
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +116 -48
- package/dist/lexicon/types/com/atproto/admin/{takeModerationAction.d.ts → emitModerationEvent.d.ts} +5 -6
- package/dist/lexicon/types/com/atproto/admin/{getModerationAction.d.ts → getModerationEvent.d.ts} +1 -1
- package/dist/lexicon/types/com/atproto/admin/{getModerationActions.d.ts → queryModerationEvents.d.ts} +5 -1
- package/dist/lexicon/types/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +12 -6
- package/dist/lexicon/types/com/atproto/admin/sendEmail.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/{admin/getModerationReport.d.ts → temp/fetchLabels.d.ts} +7 -3
- package/dist/migrate-moderation-data.d.ts +1 -0
- package/dist/services/actor/views.d.ts +2 -5
- package/dist/services/feed/index.d.ts +1 -0
- package/dist/services/feed/util.d.ts +9 -1
- package/dist/services/feed/views.d.ts +6 -17
- package/dist/services/graph/index.d.ts +5 -29
- package/dist/services/graph/types.d.ts +1 -0
- package/dist/services/moderation/index.d.ts +135 -72
- package/dist/services/moderation/pagination.d.ts +36 -0
- package/dist/services/moderation/status.d.ts +13 -0
- package/dist/services/moderation/types.d.ts +35 -0
- package/dist/services/moderation/views.d.ts +18 -14
- package/dist/util/debug.d.ts +1 -1
- package/package.json +14 -15
- package/src/api/app/bsky/actor/getSuggestions.ts +45 -21
- package/src/api/app/bsky/feed/getActorFeeds.ts +2 -1
- package/src/api/app/bsky/feed/getActorLikes.ts +1 -3
- package/src/api/app/bsky/feed/getAuthorFeed.ts +1 -3
- package/src/api/app/bsky/feed/getFeed.ts +9 -9
- package/src/api/app/bsky/feed/getFeedGenerator.ts +3 -0
- package/src/api/app/bsky/feed/getFeedGenerators.ts +2 -1
- package/src/api/app/bsky/feed/getListFeed.ts +1 -3
- package/src/api/app/bsky/feed/getPostThread.ts +31 -58
- package/src/api/app/bsky/feed/getPosts.ts +21 -18
- package/src/api/app/bsky/feed/getSuggestedFeeds.ts +2 -1
- package/src/api/app/bsky/feed/getTimeline.ts +1 -3
- package/src/api/app/bsky/feed/searchPosts.ts +130 -0
- package/src/api/app/bsky/graph/getList.ts +6 -3
- package/src/api/app/bsky/graph/getListBlocks.ts +3 -2
- package/src/api/app/bsky/graph/getListMutes.ts +2 -1
- package/src/api/app/bsky/graph/getLists.ts +2 -1
- package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +3 -1
- package/src/api/blob-resolver.ts +6 -11
- package/src/api/com/atproto/admin/emitModerationEvent.ts +220 -0
- package/src/api/com/atproto/admin/{getModerationActions.ts → getModerationEvent.ts} +5 -11
- package/src/api/com/atproto/admin/getRecord.ts +1 -0
- package/src/api/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts} +13 -16
- package/src/api/com/atproto/admin/queryModerationStatuses.ts +55 -0
- package/src/api/com/atproto/admin/util.ts +3 -1
- package/src/api/com/atproto/moderation/createReport.ts +9 -7
- package/src/api/com/atproto/moderation/util.ts +38 -20
- package/src/api/com/atproto/temp/fetchLabels.ts +30 -0
- package/src/api/index.ts +12 -14
- package/src/auth.ts +29 -21
- package/src/auto-moderator/index.ts +26 -19
- package/src/config.ts +6 -6
- package/src/context.ts +15 -9
- package/src/db/migrations/20231003T202833377Z-create-moderation-subject-status.ts +123 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/pagination.ts +26 -3
- package/src/db/{periodic-moderation-action-reversal.ts → periodic-moderation-event-reversal.ts} +51 -55
- package/src/db/tables/moderation.ts +35 -52
- package/src/feed-gen/best-of-follows.ts +6 -3
- package/src/feed-gen/bsky-team.ts +1 -1
- package/src/feed-gen/hot-classic.ts +1 -1
- package/src/feed-gen/mutuals.ts +6 -2
- package/src/feed-gen/types.ts +1 -1
- package/src/feed-gen/whats-hot.ts +1 -1
- package/src/feed-gen/with-friends.ts +7 -3
- package/src/index.ts +2 -1
- package/src/lexicon/index.ts +52 -67
- package/src/lexicon/lexicons.ts +674 -579
- package/src/lexicon/types/app/bsky/actor/defs.ts +2 -2
- package/src/lexicon/types/app/bsky/actor/searchActors.ts +2 -2
- package/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +2 -2
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -18
- package/src/lexicon/types/app/bsky/feed/searchPosts.ts +3 -3
- package/src/lexicon/types/app/bsky/graph/defs.ts +3 -2
- package/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +4 -4
- package/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +3 -3
- package/src/lexicon/types/com/atproto/admin/defs.ts +278 -84
- package/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +1 -1
- package/src/lexicon/types/com/atproto/admin/{takeModerationAction.ts → emitModerationEvent.ts} +13 -11
- package/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +1 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationReport.ts → getModerationEvent.ts} +1 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts} +8 -15
- package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +70 -0
- package/src/lexicon/types/com/atproto/admin/sendEmail.ts +1 -0
- package/src/lexicon/types/com/atproto/label/defs.ts +9 -9
- package/src/lexicon/types/com/atproto/label/queryLabels.ts +2 -2
- package/src/lexicon/types/com/atproto/repo/applyWrites.ts +1 -1
- package/src/lexicon/types/com/atproto/repo/createRecord.ts +2 -2
- package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +2 -2
- package/src/lexicon/types/com/atproto/repo/listRecords.ts +1 -1
- package/src/lexicon/types/com/atproto/repo/putRecord.ts +3 -3
- package/src/lexicon/types/com/atproto/sync/listBlobs.ts +1 -1
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +4 -4
- package/src/lexicon/types/com/atproto/{admin/getModerationActions.ts → temp/fetchLabels.ts} +3 -5
- package/src/migrate-moderation-data.ts +414 -0
- package/src/services/actor/views.ts +5 -14
- package/src/services/feed/index.ts +26 -7
- package/src/services/feed/util.ts +47 -19
- package/src/services/feed/views.ts +68 -4
- package/src/services/graph/index.ts +21 -3
- package/src/services/graph/types.ts +1 -0
- package/src/services/indexing/plugins/block.ts +2 -3
- package/src/services/indexing/plugins/feed-generator.ts +2 -3
- package/src/services/indexing/plugins/follow.ts +2 -3
- package/src/services/indexing/plugins/like.ts +2 -3
- package/src/services/indexing/plugins/list-block.ts +2 -3
- package/src/services/indexing/plugins/list-item.ts +2 -3
- package/src/services/indexing/plugins/list.ts +2 -3
- package/src/services/indexing/plugins/post.ts +3 -4
- package/src/services/indexing/plugins/repost.ts +2 -3
- package/src/services/indexing/plugins/thread-gate.ts +2 -3
- package/src/services/label/index.ts +2 -3
- package/src/services/moderation/index.ts +380 -395
- package/src/services/moderation/pagination.ts +96 -0
- package/src/services/moderation/status.ts +244 -0
- package/src/services/moderation/types.ts +49 -0
- package/src/services/moderation/views.ts +278 -329
- package/src/util/debug.ts +2 -2
- package/tests/__snapshots__/feed-generation.test.ts.snap +322 -6
- package/tests/__snapshots__/indexing.test.ts.snap +0 -6
- package/tests/admin/__snapshots__/get-record.test.ts.snap +30 -132
- package/tests/admin/__snapshots__/get-repo.test.ts.snap +14 -60
- package/tests/admin/__snapshots__/moderation-events.test.ts.snap +146 -0
- package/tests/admin/__snapshots__/moderation-statuses.test.ts.snap +64 -0
- package/tests/admin/__snapshots__/moderation.test.ts.snap +0 -125
- package/tests/admin/get-record.test.ts +5 -9
- package/tests/admin/get-repo.test.ts +38 -9
- package/tests/admin/moderation-events.test.ts +221 -0
- package/tests/admin/moderation-statuses.test.ts +145 -0
- package/tests/admin/moderation.test.ts +512 -860
- package/tests/admin/repo-search.test.ts +2 -3
- package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -1
- package/tests/auto-moderator/takedowns.test.ts +45 -18
- package/tests/feed-generation.test.ts +57 -9
- package/tests/views/__snapshots__/block-lists.test.ts.snap +3 -9
- package/tests/views/__snapshots__/blocks.test.ts.snap +0 -9
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +5 -5
- package/tests/views/__snapshots__/mutes.test.ts.snap +0 -3
- package/tests/views/__snapshots__/thread.test.ts.snap +0 -30
- package/tests/views/actor-search.test.ts +2 -3
- package/tests/views/author-feed.test.ts +42 -36
- package/tests/views/follows.test.ts +40 -35
- package/tests/views/list-feed.test.ts +17 -9
- package/tests/views/notifications.test.ts +13 -9
- package/tests/views/profile.test.ts +20 -18
- package/tests/views/suggestions.test.ts +15 -7
- package/tests/views/thread.test.ts +54 -26
- package/tests/views/threadgating.test.ts +51 -19
- package/tests/views/timeline.test.ts +21 -13
- package/dist/api/com/atproto/admin/reverseModerationAction.d.ts +0 -3
- package/dist/api/com/atproto/admin/takeModerationAction.d.ts +0 -3
- package/dist/lexicon/types/com/atproto/admin/resolveModerationReports.d.ts +0 -36
- package/dist/lexicon/types/com/atproto/admin/reverseModerationAction.d.ts +0 -36
- package/src/api/com/atproto/admin/getModerationAction.ts +0 -44
- package/src/api/com/atproto/admin/getModerationReport.ts +0 -43
- package/src/api/com/atproto/admin/resolveModerationReports.ts +0 -24
- package/src/api/com/atproto/admin/reverseModerationAction.ts +0 -115
- package/src/api/com/atproto/admin/takeModerationAction.ts +0 -156
- package/src/lexicon/types/com/atproto/admin/getModerationAction.ts +0 -41
- package/src/lexicon/types/com/atproto/admin/resolveModerationReports.ts +0 -49
- package/src/lexicon/types/com/atproto/admin/reverseModerationAction.ts +0 -49
- package/tests/admin/__snapshots__/get-moderation-action.test.ts.snap +0 -172
- package/tests/admin/__snapshots__/get-moderation-actions.test.ts.snap +0 -178
- package/tests/admin/__snapshots__/get-moderation-report.test.ts.snap +0 -177
- package/tests/admin/__snapshots__/get-moderation-reports.test.ts.snap +0 -307
- package/tests/admin/get-moderation-action.test.ts +0 -100
- package/tests/admin/get-moderation-actions.test.ts +0 -164
- package/tests/admin/get-moderation-report.test.ts +0 -100
- package/tests/admin/get-moderation-reports.test.ts +0 -332
- /package/dist/api/com/atproto/admin/{getModerationAction.d.ts → emitModerationEvent.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationActions.d.ts → getModerationEvent.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationReport.d.ts → queryModerationEvents.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +0 -0
- /package/dist/api/com/atproto/{admin/resolveModerationReports.d.ts → temp/fetchLabels.d.ts} +0 -0
package/src/lexicon/types/com/atproto/admin/{takeModerationAction.ts → emitModerationEvent.ts}
RENAMED
|
@@ -13,26 +13,28 @@ import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
|
|
|
13
13
|
export interface QueryParams {}
|
|
14
14
|
|
|
15
15
|
export interface InputSchema {
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
16
|
+
event:
|
|
17
|
+
| ComAtprotoAdminDefs.ModEventTakedown
|
|
18
|
+
| ComAtprotoAdminDefs.ModEventAcknowledge
|
|
19
|
+
| ComAtprotoAdminDefs.ModEventEscalate
|
|
20
|
+
| ComAtprotoAdminDefs.ModEventComment
|
|
21
|
+
| ComAtprotoAdminDefs.ModEventLabel
|
|
22
|
+
| ComAtprotoAdminDefs.ModEventReport
|
|
23
|
+
| ComAtprotoAdminDefs.ModEventMute
|
|
24
|
+
| ComAtprotoAdminDefs.ModEventReverseTakedown
|
|
25
|
+
| ComAtprotoAdminDefs.ModEventUnmute
|
|
26
|
+
| ComAtprotoAdminDefs.ModEventEmail
|
|
27
|
+
| { $type: string; [k: string]: unknown }
|
|
21
28
|
subject:
|
|
22
29
|
| ComAtprotoAdminDefs.RepoRef
|
|
23
30
|
| ComAtprotoRepoStrongRef.Main
|
|
24
31
|
| { $type: string; [k: string]: unknown }
|
|
25
32
|
subjectBlobCids?: string[]
|
|
26
|
-
createLabelVals?: string[]
|
|
27
|
-
negateLabelVals?: string[]
|
|
28
|
-
reason: string
|
|
29
|
-
/** Indicates how long this action was meant to be in effect before automatically expiring. */
|
|
30
|
-
durationInHours?: number
|
|
31
33
|
createdBy: string
|
|
32
34
|
[k: string]: unknown
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
export type OutputSchema = ComAtprotoAdminDefs.
|
|
37
|
+
export type OutputSchema = ComAtprotoAdminDefs.ModEventView
|
|
36
38
|
|
|
37
39
|
export interface HandlerInput {
|
|
38
40
|
encoding: 'application/json'
|
package/src/lexicon/types/com/atproto/admin/{getModerationReport.ts → getModerationEvent.ts}
RENAMED
|
@@ -14,7 +14,7 @@ export interface QueryParams {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export type InputSchema = undefined
|
|
17
|
-
export type OutputSchema = ComAtprotoAdminDefs.
|
|
17
|
+
export type OutputSchema = ComAtprotoAdminDefs.ModEventViewDetail
|
|
18
18
|
export type HandlerInput = undefined
|
|
19
19
|
|
|
20
20
|
export interface HandlerSuccess {
|
package/src/lexicon/types/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts}
RENAMED
|
@@ -10,30 +10,23 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
|
|
10
10
|
import * as ComAtprotoAdminDefs from './defs'
|
|
11
11
|
|
|
12
12
|
export interface QueryParams {
|
|
13
|
+
/** The types of events (fully qualified string in the format of com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned. */
|
|
14
|
+
types?: string[]
|
|
15
|
+
createdBy?: string
|
|
16
|
+
/** Sort direction for the events. Defaults to descending order of created at timestamp. */
|
|
17
|
+
sortDirection: 'asc' | 'desc'
|
|
13
18
|
subject?: string
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
actionedBy?: string
|
|
17
|
-
/** Filter reports made by one or more DIDs */
|
|
18
|
-
reporters?: string[]
|
|
19
|
-
resolved?: boolean
|
|
20
|
-
actionType?:
|
|
21
|
-
| 'com.atproto.admin.defs#takedown'
|
|
22
|
-
| 'com.atproto.admin.defs#flag'
|
|
23
|
-
| 'com.atproto.admin.defs#acknowledge'
|
|
24
|
-
| 'com.atproto.admin.defs#escalate'
|
|
25
|
-
| (string & {})
|
|
19
|
+
/** If true, events on all record types (posts, lists, profile etc.) owned by the did are returned */
|
|
20
|
+
includeAllUserRecords: boolean
|
|
26
21
|
limit: number
|
|
27
22
|
cursor?: string
|
|
28
|
-
/** Reverse the order of the returned records? when true, returns reports in chronological order */
|
|
29
|
-
reverse?: boolean
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
export type InputSchema = undefined
|
|
33
26
|
|
|
34
27
|
export interface OutputSchema {
|
|
35
28
|
cursor?: string
|
|
36
|
-
|
|
29
|
+
events: ComAtprotoAdminDefs.ModEventView[]
|
|
37
30
|
[k: string]: unknown
|
|
38
31
|
}
|
|
39
32
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth } from '@atproto/xrpc-server'
|
|
10
|
+
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
subject?: string
|
|
14
|
+
/** Search subjects by keyword from comments */
|
|
15
|
+
comment?: string
|
|
16
|
+
/** Search subjects reported after a given timestamp */
|
|
17
|
+
reportedAfter?: string
|
|
18
|
+
/** Search subjects reported before a given timestamp */
|
|
19
|
+
reportedBefore?: string
|
|
20
|
+
/** Search subjects reviewed after a given timestamp */
|
|
21
|
+
reviewedAfter?: string
|
|
22
|
+
/** Search subjects reviewed before a given timestamp */
|
|
23
|
+
reviewedBefore?: string
|
|
24
|
+
/** By default, we don't include muted subjects in the results. Set this to true to include them. */
|
|
25
|
+
includeMuted?: boolean
|
|
26
|
+
/** Specify when fetching subjects in a certain state */
|
|
27
|
+
reviewState?: string
|
|
28
|
+
ignoreSubjects?: string[]
|
|
29
|
+
/** Get all subject statuses that were reviewed by a specific moderator */
|
|
30
|
+
lastReviewedBy?: string
|
|
31
|
+
sortField: 'lastReviewedAt' | 'lastReportedAt'
|
|
32
|
+
sortDirection: 'asc' | 'desc'
|
|
33
|
+
/** Get subjects that were taken down */
|
|
34
|
+
takendown?: boolean
|
|
35
|
+
limit: number
|
|
36
|
+
cursor?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type InputSchema = undefined
|
|
40
|
+
|
|
41
|
+
export interface OutputSchema {
|
|
42
|
+
cursor?: string
|
|
43
|
+
subjectStatuses: ComAtprotoAdminDefs.SubjectStatusView[]
|
|
44
|
+
[k: string]: unknown
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type HandlerInput = undefined
|
|
48
|
+
|
|
49
|
+
export interface HandlerSuccess {
|
|
50
|
+
encoding: 'application/json'
|
|
51
|
+
body: OutputSchema
|
|
52
|
+
headers?: { [key: string]: string }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface HandlerError {
|
|
56
|
+
status: number
|
|
57
|
+
message?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
61
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
62
|
+
auth: HA
|
|
63
|
+
params: QueryParams
|
|
64
|
+
input: HandlerInput
|
|
65
|
+
req: express.Request
|
|
66
|
+
res: express.Response
|
|
67
|
+
}
|
|
68
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
69
|
+
ctx: HandlerReqCtx<HA>,
|
|
70
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -6,19 +6,19 @@ import { lexicons } from '../../../../lexicons'
|
|
|
6
6
|
import { isObj, hasProp } from '../../../../util'
|
|
7
7
|
import { CID } from 'multiformats/cid'
|
|
8
8
|
|
|
9
|
-
/** Metadata tag on an atproto resource (eg, repo or record) */
|
|
9
|
+
/** Metadata tag on an atproto resource (eg, repo or record). */
|
|
10
10
|
export interface Label {
|
|
11
|
-
/** DID of the actor who created this label */
|
|
11
|
+
/** DID of the actor who created this label. */
|
|
12
12
|
src: string
|
|
13
|
-
/** AT URI of the record, repository (account), or other resource
|
|
13
|
+
/** AT URI of the record, repository (account), or other resource that this label applies to. */
|
|
14
14
|
uri: string
|
|
15
|
-
/**
|
|
15
|
+
/** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */
|
|
16
16
|
cid?: string
|
|
17
|
-
/**
|
|
17
|
+
/** The short string name of the value or type of this label. */
|
|
18
18
|
val: string
|
|
19
|
-
/**
|
|
19
|
+
/** If true, this is a negation label, overwriting a previous label. */
|
|
20
20
|
neg?: boolean
|
|
21
|
-
/**
|
|
21
|
+
/** Timestamp when this label was created. */
|
|
22
22
|
cts: string
|
|
23
23
|
[k: string]: unknown
|
|
24
24
|
}
|
|
@@ -53,9 +53,9 @@ export function validateSelfLabels(v: unknown): ValidationResult {
|
|
|
53
53
|
return lexicons.validate('com.atproto.label.defs#selfLabels', v)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
/** Metadata tag on an atproto record, published by the author within the record. Note
|
|
56
|
+
/** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */
|
|
57
57
|
export interface SelfLabel {
|
|
58
|
-
/**
|
|
58
|
+
/** The short string name of the value or type of this label. */
|
|
59
59
|
val: string
|
|
60
60
|
[k: string]: unknown
|
|
61
61
|
}
|
|
@@ -10,9 +10,9 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
|
|
10
10
|
import * as ComAtprotoLabelDefs from './defs'
|
|
11
11
|
|
|
12
12
|
export interface QueryParams {
|
|
13
|
-
/** List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI */
|
|
13
|
+
/** List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI. */
|
|
14
14
|
uriPatterns: string[]
|
|
15
|
-
/** Optional list of label sources (DIDs) to filter on */
|
|
15
|
+
/** Optional list of label sources (DIDs) to filter on. */
|
|
16
16
|
sources?: string[]
|
|
17
17
|
limit: number
|
|
18
18
|
cursor?: string
|
|
@@ -13,7 +13,7 @@ export interface QueryParams {}
|
|
|
13
13
|
export interface InputSchema {
|
|
14
14
|
/** The handle or DID of the repo. */
|
|
15
15
|
repo: string
|
|
16
|
-
/**
|
|
16
|
+
/** Flag for validating the records. */
|
|
17
17
|
validate: boolean
|
|
18
18
|
writes: (Create | Update | Delete)[]
|
|
19
19
|
swapCommit?: string
|
|
@@ -17,11 +17,11 @@ export interface InputSchema {
|
|
|
17
17
|
collection: string
|
|
18
18
|
/** The key of the record. */
|
|
19
19
|
rkey?: string
|
|
20
|
-
/**
|
|
20
|
+
/** Flag for validating the record. */
|
|
21
21
|
validate: boolean
|
|
22
22
|
/** The record to create. */
|
|
23
23
|
record: {}
|
|
24
|
-
/** Compare and swap with the previous commit by
|
|
24
|
+
/** Compare and swap with the previous commit by CID. */
|
|
25
25
|
swapCommit?: string
|
|
26
26
|
[k: string]: unknown
|
|
27
27
|
}
|
|
@@ -17,9 +17,9 @@ export interface InputSchema {
|
|
|
17
17
|
collection: string
|
|
18
18
|
/** The key of the record. */
|
|
19
19
|
rkey: string
|
|
20
|
-
/** Compare and swap with the previous record by
|
|
20
|
+
/** Compare and swap with the previous record by CID. */
|
|
21
21
|
swapRecord?: string
|
|
22
|
-
/** Compare and swap with the previous commit by
|
|
22
|
+
/** Compare and swap with the previous commit by CID. */
|
|
23
23
|
swapCommit?: string
|
|
24
24
|
[k: string]: unknown
|
|
25
25
|
}
|
|
@@ -20,7 +20,7 @@ export interface QueryParams {
|
|
|
20
20
|
rkeyStart?: string
|
|
21
21
|
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
|
|
22
22
|
rkeyEnd?: string
|
|
23
|
-
/**
|
|
23
|
+
/** Flag to reverse the order of the returned records. */
|
|
24
24
|
reverse?: boolean
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -17,13 +17,13 @@ export interface InputSchema {
|
|
|
17
17
|
collection: string
|
|
18
18
|
/** The key of the record. */
|
|
19
19
|
rkey: string
|
|
20
|
-
/**
|
|
20
|
+
/** Flag for validating the record. */
|
|
21
21
|
validate: boolean
|
|
22
22
|
/** The record to write. */
|
|
23
23
|
record: {}
|
|
24
|
-
/** Compare and swap with the previous record by
|
|
24
|
+
/** Compare and swap with the previous record by CID. */
|
|
25
25
|
swapRecord?: string | null
|
|
26
|
-
/** Compare and swap with the previous commit by
|
|
26
|
+
/** Compare and swap with the previous commit by CID. */
|
|
27
27
|
swapCommit?: string
|
|
28
28
|
[k: string]: unknown
|
|
29
29
|
}
|
|
@@ -11,7 +11,7 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
|
|
11
11
|
export interface QueryParams {
|
|
12
12
|
/** The DID of the repo. */
|
|
13
13
|
did: string
|
|
14
|
-
/** Optional revision of the repo to list blobs since */
|
|
14
|
+
/** Optional revision of the repo to list blobs since. */
|
|
15
15
|
since?: string
|
|
16
16
|
limit: number
|
|
17
17
|
cursor?: string
|
|
@@ -39,11 +39,11 @@ export interface Commit {
|
|
|
39
39
|
repo: string
|
|
40
40
|
commit: CID
|
|
41
41
|
prev?: CID | null
|
|
42
|
-
/** The rev of the emitted commit */
|
|
42
|
+
/** The rev of the emitted commit. */
|
|
43
43
|
rev: string
|
|
44
|
-
/** The rev of the last emitted commit from this repo */
|
|
44
|
+
/** The rev of the last emitted commit from this repo. */
|
|
45
45
|
since: string | null
|
|
46
|
-
/** CAR file containing relevant blocks */
|
|
46
|
+
/** CAR file containing relevant blocks. */
|
|
47
47
|
blocks: Uint8Array
|
|
48
48
|
ops: RepoOp[]
|
|
49
49
|
blobs: CID[]
|
|
@@ -140,7 +140,7 @@ export function validateInfo(v: unknown): ValidationResult {
|
|
|
140
140
|
return lexicons.validate('com.atproto.sync.subscribeRepos#info', v)
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
/** A repo operation, ie a write of a single record. For creates and updates,
|
|
143
|
+
/** A repo operation, ie a write of a single record. For creates and updates, CID is the record's CID as of this operation. For deletes, it's null. */
|
|
144
144
|
export interface RepoOp {
|
|
145
145
|
action: 'create' | 'update' | 'delete' | (string & {})
|
|
146
146
|
path: string
|
|
@@ -7,19 +7,17 @@ import { lexicons } from '../../../../lexicons'
|
|
|
7
7
|
import { isObj, hasProp } from '../../../../util'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
9
|
import { HandlerAuth } from '@atproto/xrpc-server'
|
|
10
|
-
import * as
|
|
10
|
+
import * as ComAtprotoLabelDefs from '../label/defs'
|
|
11
11
|
|
|
12
12
|
export interface QueryParams {
|
|
13
|
-
|
|
13
|
+
since?: number
|
|
14
14
|
limit: number
|
|
15
|
-
cursor?: string
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export type InputSchema = undefined
|
|
19
18
|
|
|
20
19
|
export interface OutputSchema {
|
|
21
|
-
|
|
22
|
-
actions: ComAtprotoAdminDefs.ActionView[]
|
|
20
|
+
labels: ComAtprotoLabelDefs.Label[]
|
|
23
21
|
[k: string]: unknown
|
|
24
22
|
}
|
|
25
23
|
|