@atproto/pds 0.4.175 → 0.4.177
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 +40 -0
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts +4 -0
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts.map +1 -0
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.js +17 -0
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.js.map +1 -0
- package/dist/account-manager/db/migrations/index.d.ts +2 -0
- package/dist/account-manager/db/migrations/index.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/index.js +2 -0
- package/dist/account-manager/db/migrations/index.js.map +1 -1
- package/dist/account-manager/helpers/lexicon.d.ts.map +1 -1
- package/dist/account-manager/helpers/lexicon.js +7 -0
- package/dist/account-manager/helpers/lexicon.js.map +1 -1
- package/dist/account-manager/helpers/token.d.ts +32 -32
- package/dist/account-manager/scope-reference-getter.d.ts +14 -0
- package/dist/account-manager/scope-reference-getter.d.ts.map +1 -0
- package/dist/account-manager/scope-reference-getter.js +69 -0
- package/dist/account-manager/scope-reference-getter.js.map +1 -0
- package/dist/actor-store/actor-store.d.ts.map +1 -1
- package/dist/actor-store/actor-store.js +4 -1
- package/dist/actor-store/actor-store.js.map +1 -1
- package/dist/actor-store/blob/transactor.d.ts +2 -2
- package/dist/actor-store/blob/transactor.d.ts.map +1 -1
- package/dist/actor-store/blob/transactor.js +73 -24
- package/dist/actor-store/blob/transactor.js.map +1 -1
- package/dist/actor-store/record/reader.d.ts.map +1 -1
- package/dist/actor-store/record/reader.js +12 -9
- package/dist/actor-store/record/reader.js.map +1 -1
- package/dist/actor-store/repo/sql-repo-reader.d.ts.map +1 -1
- package/dist/actor-store/repo/sql-repo-reader.js +2 -2
- package/dist/actor-store/repo/sql-repo-reader.js.map +1 -1
- package/dist/actor-store/repo/sql-repo-transactor.d.ts.map +1 -1
- package/dist/actor-store/repo/sql-repo-transactor.js +16 -19
- package/dist/actor-store/repo/sql-repo-transactor.js.map +1 -1
- package/dist/actor-store/repo/transactor.d.ts.map +1 -1
- package/dist/actor-store/repo/transactor.js +11 -15
- package/dist/actor-store/repo/transactor.js.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.js +6 -2
- package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.js +43 -51
- package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +2 -12
- package/dist/auth-verifier.js.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +20 -4
- package/dist/context.js.map +1 -1
- package/dist/disk-blobstore.d.ts.map +1 -1
- package/dist/disk-blobstore.js +10 -2
- package/dist/disk-blobstore.js.map +1 -1
- package/dist/lexicon/index.d.ts +60 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +83 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +758 -16
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +485 -7
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/bookmark/createBookmark.d.ts +16 -0
- package/dist/lexicon/types/app/bsky/bookmark/createBookmark.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/createBookmark.js +7 -0
- package/dist/lexicon/types/app/bsky/bookmark/createBookmark.js.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/defs.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/bookmark/defs.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/defs.js +25 -0
- package/dist/lexicon/types/app/bsky/bookmark/defs.js.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.d.ts +15 -0
- package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.js +7 -0
- package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.js.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.d.ts +24 -0
- package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.js +7 -0
- package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.js.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +8 -8
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.js +7 -7
- package/dist/lexicon/types/com/atproto/moderation/defs.js.map +1 -1
- package/dist/lexicon/types/com/atproto/temp/dereferenceScope.d.ts +24 -0
- package/dist/lexicon/types/com/atproto/temp/dereferenceScope.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/temp/dereferenceScope.js +7 -0
- package/dist/lexicon/types/com/atproto/temp/dereferenceScope.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/defs.d.ts +92 -0
- package/dist/lexicon/types/tools/ozone/report/defs.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/defs.js +98 -0
- package/dist/lexicon/types/tools/ozone/report/defs.js.map +1 -0
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +2 -1
- package/dist/logger.js.map +1 -1
- package/dist/scripts/rebuild-repo.d.ts.map +1 -1
- package/dist/scripts/rebuild-repo.js +3 -5
- package/dist/scripts/rebuild-repo.js.map +1 -1
- package/dist/scripts/sequencer-recovery/recoverer.js +8 -10
- package/dist/scripts/sequencer-recovery/recoverer.js.map +1 -1
- package/dist/sequencer/sequencer.js +2 -2
- package/dist/sequencer/sequencer.js.map +1 -1
- package/package.json +20 -17
- package/src/account-manager/db/migrations/007-lexicon-failures-index.ts +14 -0
- package/src/account-manager/db/migrations/index.ts +2 -0
- package/src/account-manager/helpers/lexicon.ts +14 -1
- package/src/account-manager/scope-reference-getter.ts +92 -0
- package/src/actor-store/actor-store.ts +5 -9
- package/src/actor-store/blob/transactor.ts +115 -42
- package/src/actor-store/record/reader.ts +14 -12
- package/src/actor-store/repo/sql-repo-reader.ts +12 -14
- package/src/actor-store/repo/sql-repo-transactor.ts +17 -23
- package/src/actor-store/repo/transactor.ts +29 -32
- package/src/api/com/atproto/admin/updateSubjectStatus.ts +7 -7
- package/src/api/com/atproto/repo/importRepo.ts +41 -55
- package/src/auth-verifier.ts +4 -20
- package/src/context.ts +26 -5
- package/src/disk-blobstore.ts +20 -3
- package/src/lexicon/index.ts +131 -0
- package/src/lexicon/lexicons.ts +503 -7
- package/src/lexicon/types/app/bsky/bookmark/createBookmark.ts +35 -0
- package/src/lexicon/types/app/bsky/bookmark/defs.ts +54 -0
- package/src/lexicon/types/app/bsky/bookmark/deleteBookmark.ts +34 -0
- package/src/lexicon/types/app/bsky/bookmark/getBookmarks.ts +42 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
- package/src/lexicon/types/com/atproto/moderation/defs.ts +52 -7
- package/src/lexicon/types/com/atproto/temp/dereferenceScope.ts +42 -0
- package/src/lexicon/types/tools/ozone/report/defs.ts +154 -0
- package/src/logger.ts +1 -0
- package/src/scripts/rebuild-repo.ts +4 -5
- package/src/scripts/sequencer-recovery/recoverer.ts +8 -12
- package/src/sequencer/sequencer.ts +3 -3
- package/tests/proxied/__snapshots__/feedgen.test.ts.snap +4 -0
- package/tests/proxied/__snapshots__/views.test.ts.snap +80 -0
- package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
5
|
+
import { CID } from 'multiformats/cid'
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
7
|
+
import {
|
8
|
+
type $Typed,
|
9
|
+
is$typed as _is$typed,
|
10
|
+
type OmitKey,
|
11
|
+
} from '../../../../util'
|
12
|
+
|
13
|
+
const is$typed = _is$typed,
|
14
|
+
validate = _validate
|
15
|
+
const id = 'app.bsky.bookmark.deleteBookmark'
|
16
|
+
|
17
|
+
export type QueryParams = {}
|
18
|
+
|
19
|
+
export interface InputSchema {
|
20
|
+
uri: string
|
21
|
+
}
|
22
|
+
|
23
|
+
export interface HandlerInput {
|
24
|
+
encoding: 'application/json'
|
25
|
+
body: InputSchema
|
26
|
+
}
|
27
|
+
|
28
|
+
export interface HandlerError {
|
29
|
+
status: number
|
30
|
+
message?: string
|
31
|
+
error?: 'UnsupportedCollection'
|
32
|
+
}
|
33
|
+
|
34
|
+
export type HandlerOutput = HandlerError | void
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
5
|
+
import { CID } from 'multiformats/cid'
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
7
|
+
import {
|
8
|
+
type $Typed,
|
9
|
+
is$typed as _is$typed,
|
10
|
+
type OmitKey,
|
11
|
+
} from '../../../../util'
|
12
|
+
import type * as AppBskyBookmarkDefs from './defs.js'
|
13
|
+
|
14
|
+
const is$typed = _is$typed,
|
15
|
+
validate = _validate
|
16
|
+
const id = 'app.bsky.bookmark.getBookmarks'
|
17
|
+
|
18
|
+
export type QueryParams = {
|
19
|
+
limit: number
|
20
|
+
cursor?: string
|
21
|
+
}
|
22
|
+
export type InputSchema = undefined
|
23
|
+
|
24
|
+
export interface OutputSchema {
|
25
|
+
cursor?: string
|
26
|
+
bookmarks: AppBskyBookmarkDefs.BookmarkView[]
|
27
|
+
}
|
28
|
+
|
29
|
+
export type HandlerInput = void
|
30
|
+
|
31
|
+
export interface HandlerSuccess {
|
32
|
+
encoding: 'application/json'
|
33
|
+
body: OutputSchema
|
34
|
+
headers?: { [key: string]: string }
|
35
|
+
}
|
36
|
+
|
37
|
+
export interface HandlerError {
|
38
|
+
status: number
|
39
|
+
message?: string
|
40
|
+
}
|
41
|
+
|
42
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
@@ -36,6 +36,7 @@ export interface PostView {
|
|
36
36
|
| $Typed<AppBskyEmbedRecord.View>
|
37
37
|
| $Typed<AppBskyEmbedRecordWithMedia.View>
|
38
38
|
| { $type: string }
|
39
|
+
bookmarkCount?: number
|
39
40
|
replyCount?: number
|
40
41
|
repostCount?: number
|
41
42
|
likeCount?: number
|
@@ -61,6 +62,7 @@ export interface ViewerState {
|
|
61
62
|
$type?: 'app.bsky.feed.defs#viewerState'
|
62
63
|
repost?: string
|
63
64
|
like?: string
|
65
|
+
bookmarked?: boolean
|
64
66
|
threadMuted?: boolean
|
65
67
|
replyDisabled?: boolean
|
66
68
|
embeddingDisabled?: boolean
|
@@ -22,21 +22,66 @@ export type ReasonType =
|
|
22
22
|
| 'com.atproto.moderation.defs#reasonRude'
|
23
23
|
| 'com.atproto.moderation.defs#reasonOther'
|
24
24
|
| 'com.atproto.moderation.defs#reasonAppeal'
|
25
|
+
| 'tools.ozone.report.defs#reasonAppeal'
|
26
|
+
| 'tools.ozone.report.defs#reasonViolenceAnimalWelfare'
|
27
|
+
| 'tools.ozone.report.defs#reasonViolenceThreats'
|
28
|
+
| 'tools.ozone.report.defs#reasonViolenceGraphicContent'
|
29
|
+
| 'tools.ozone.report.defs#reasonViolenceSelfHarm'
|
30
|
+
| 'tools.ozone.report.defs#reasonViolenceGlorification'
|
31
|
+
| 'tools.ozone.report.defs#reasonViolenceExtremistContent'
|
32
|
+
| 'tools.ozone.report.defs#reasonViolenceTrafficking'
|
33
|
+
| 'tools.ozone.report.defs#reasonViolenceOther'
|
34
|
+
| 'tools.ozone.report.defs#reasonSexualAbuseContent'
|
35
|
+
| 'tools.ozone.report.defs#reasonSexualNCII'
|
36
|
+
| 'tools.ozone.report.defs#reasonSexualSextortion'
|
37
|
+
| 'tools.ozone.report.defs#reasonSexualDeepfake'
|
38
|
+
| 'tools.ozone.report.defs#reasonSexualAnimal'
|
39
|
+
| 'tools.ozone.report.defs#reasonSexualUnlabeled'
|
40
|
+
| 'tools.ozone.report.defs#reasonSexualOther'
|
41
|
+
| 'tools.ozone.report.defs#reasonChildSafetyCSAM'
|
42
|
+
| 'tools.ozone.report.defs#reasonChildSafetyGroom'
|
43
|
+
| 'tools.ozone.report.defs#reasonChildSafetyMinorPrivacy'
|
44
|
+
| 'tools.ozone.report.defs#reasonChildSafetyEndangerment'
|
45
|
+
| 'tools.ozone.report.defs#reasonChildSafetyHarassment'
|
46
|
+
| 'tools.ozone.report.defs#reasonChildSafetyPromotion'
|
47
|
+
| 'tools.ozone.report.defs#reasonChildSafetyOther'
|
48
|
+
| 'tools.ozone.report.defs#reasonHarassmentTroll'
|
49
|
+
| 'tools.ozone.report.defs#reasonHarassmentTargeted'
|
50
|
+
| 'tools.ozone.report.defs#reasonHarassmentHateSpeech'
|
51
|
+
| 'tools.ozone.report.defs#reasonHarassmentDoxxing'
|
52
|
+
| 'tools.ozone.report.defs#reasonHarassmentOther'
|
53
|
+
| 'tools.ozone.report.defs#reasonMisleadingBot'
|
54
|
+
| 'tools.ozone.report.defs#reasonMisleadingImpersonation'
|
55
|
+
| 'tools.ozone.report.defs#reasonMisleadingSpam'
|
56
|
+
| 'tools.ozone.report.defs#reasonMisleadingScam'
|
57
|
+
| 'tools.ozone.report.defs#reasonMisleadingSyntheticContent'
|
58
|
+
| 'tools.ozone.report.defs#reasonMisleadingMisinformation'
|
59
|
+
| 'tools.ozone.report.defs#reasonMisleadingOther'
|
60
|
+
| 'tools.ozone.report.defs#reasonRuleSiteSecurity'
|
61
|
+
| 'tools.ozone.report.defs#reasonRuleStolenContent'
|
62
|
+
| 'tools.ozone.report.defs#reasonRuleProhibitedSales'
|
63
|
+
| 'tools.ozone.report.defs#reasonRuleBanEvasion'
|
64
|
+
| 'tools.ozone.report.defs#reasonRuleOther'
|
65
|
+
| 'tools.ozone.report.defs#reasonCivicElectoralProcess'
|
66
|
+
| 'tools.ozone.report.defs#reasonCivicDisclosure'
|
67
|
+
| 'tools.ozone.report.defs#reasonCivicInterference'
|
68
|
+
| 'tools.ozone.report.defs#reasonCivicMisinformation'
|
69
|
+
| 'tools.ozone.report.defs#reasonCivicImpersonation'
|
25
70
|
| (string & {})
|
26
71
|
|
27
|
-
/** Spam: frequent unwanted promotion, replies, mentions */
|
72
|
+
/** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. */
|
28
73
|
export const REASONSPAM = `${id}#reasonSpam`
|
29
|
-
/** Direct violation of server rules, laws, terms of service */
|
74
|
+
/** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */
|
30
75
|
export const REASONVIOLATION = `${id}#reasonViolation`
|
31
|
-
/** Misleading identity, affiliation, or content */
|
76
|
+
/** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. */
|
32
77
|
export const REASONMISLEADING = `${id}#reasonMisleading`
|
33
|
-
/** Unwanted or mislabeled sexual content */
|
78
|
+
/** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. */
|
34
79
|
export const REASONSEXUAL = `${id}#reasonSexual`
|
35
|
-
/** Rude, harassing, explicit, or otherwise unwelcoming behavior */
|
80
|
+
/** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. */
|
36
81
|
export const REASONRUDE = `${id}#reasonRude`
|
37
|
-
/**
|
82
|
+
/** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */
|
38
83
|
export const REASONOTHER = `${id}#reasonOther`
|
39
|
-
/** Appeal
|
84
|
+
/** Appeal a previously taken moderation action */
|
40
85
|
export const REASONAPPEAL = `${id}#reasonAppeal`
|
41
86
|
|
42
87
|
/** Tag describing a type of subject that might be reported. */
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
5
|
+
import { CID } from 'multiformats/cid'
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
7
|
+
import {
|
8
|
+
type $Typed,
|
9
|
+
is$typed as _is$typed,
|
10
|
+
type OmitKey,
|
11
|
+
} from '../../../../util'
|
12
|
+
|
13
|
+
const is$typed = _is$typed,
|
14
|
+
validate = _validate
|
15
|
+
const id = 'com.atproto.temp.dereferenceScope'
|
16
|
+
|
17
|
+
export type QueryParams = {
|
18
|
+
/** The scope reference (starts with 'ref:') */
|
19
|
+
scope: string
|
20
|
+
}
|
21
|
+
export type InputSchema = undefined
|
22
|
+
|
23
|
+
export interface OutputSchema {
|
24
|
+
/** The full oauth permission scope */
|
25
|
+
scope: string
|
26
|
+
}
|
27
|
+
|
28
|
+
export type HandlerInput = void
|
29
|
+
|
30
|
+
export interface HandlerSuccess {
|
31
|
+
encoding: 'application/json'
|
32
|
+
body: OutputSchema
|
33
|
+
headers?: { [key: string]: string }
|
34
|
+
}
|
35
|
+
|
36
|
+
export interface HandlerError {
|
37
|
+
status: number
|
38
|
+
message?: string
|
39
|
+
error?: 'InvalidScopeReference'
|
40
|
+
}
|
41
|
+
|
42
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
@@ -0,0 +1,154 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
5
|
+
import { CID } from 'multiformats/cid'
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
7
|
+
import {
|
8
|
+
type $Typed,
|
9
|
+
is$typed as _is$typed,
|
10
|
+
type OmitKey,
|
11
|
+
} from '../../../../util'
|
12
|
+
|
13
|
+
const is$typed = _is$typed,
|
14
|
+
validate = _validate
|
15
|
+
const id = 'tools.ozone.report.defs'
|
16
|
+
|
17
|
+
export type ReasonType =
|
18
|
+
| 'tools.ozone.report.defs#reasonAppeal'
|
19
|
+
| 'tools.ozone.report.defs#reasonViolenceAnimalWelfare'
|
20
|
+
| 'tools.ozone.report.defs#reasonViolenceThreats'
|
21
|
+
| 'tools.ozone.report.defs#reasonViolenceGraphicContent'
|
22
|
+
| 'tools.ozone.report.defs#reasonViolenceSelfHarm'
|
23
|
+
| 'tools.ozone.report.defs#reasonViolenceGlorification'
|
24
|
+
| 'tools.ozone.report.defs#reasonViolenceExtremistContent'
|
25
|
+
| 'tools.ozone.report.defs#reasonViolenceTrafficking'
|
26
|
+
| 'tools.ozone.report.defs#reasonViolenceOther'
|
27
|
+
| 'tools.ozone.report.defs#reasonSexualAbuseContent'
|
28
|
+
| 'tools.ozone.report.defs#reasonSexualNCII'
|
29
|
+
| 'tools.ozone.report.defs#reasonSexualSextortion'
|
30
|
+
| 'tools.ozone.report.defs#reasonSexualDeepfake'
|
31
|
+
| 'tools.ozone.report.defs#reasonSexualAnimal'
|
32
|
+
| 'tools.ozone.report.defs#reasonSexualUnlabeled'
|
33
|
+
| 'tools.ozone.report.defs#reasonSexualOther'
|
34
|
+
| 'tools.ozone.report.defs#reasonChildSafetyCSAM'
|
35
|
+
| 'tools.ozone.report.defs#reasonChildSafetyGroom'
|
36
|
+
| 'tools.ozone.report.defs#reasonChildSafetyMinorPrivacy'
|
37
|
+
| 'tools.ozone.report.defs#reasonChildSafetyEndangerment'
|
38
|
+
| 'tools.ozone.report.defs#reasonChildSafetyHarassment'
|
39
|
+
| 'tools.ozone.report.defs#reasonChildSafetyPromotion'
|
40
|
+
| 'tools.ozone.report.defs#reasonChildSafetyOther'
|
41
|
+
| 'tools.ozone.report.defs#reasonHarassmentTroll'
|
42
|
+
| 'tools.ozone.report.defs#reasonHarassmentTargeted'
|
43
|
+
| 'tools.ozone.report.defs#reasonHarassmentHateSpeech'
|
44
|
+
| 'tools.ozone.report.defs#reasonHarassmentDoxxing'
|
45
|
+
| 'tools.ozone.report.defs#reasonHarassmentOther'
|
46
|
+
| 'tools.ozone.report.defs#reasonMisleadingBot'
|
47
|
+
| 'tools.ozone.report.defs#reasonMisleadingImpersonation'
|
48
|
+
| 'tools.ozone.report.defs#reasonMisleadingSpam'
|
49
|
+
| 'tools.ozone.report.defs#reasonMisleadingScam'
|
50
|
+
| 'tools.ozone.report.defs#reasonMisleadingSyntheticContent'
|
51
|
+
| 'tools.ozone.report.defs#reasonMisleadingMisinformation'
|
52
|
+
| 'tools.ozone.report.defs#reasonMisleadingOther'
|
53
|
+
| 'tools.ozone.report.defs#reasonRuleSiteSecurity'
|
54
|
+
| 'tools.ozone.report.defs#reasonRuleStolenContent'
|
55
|
+
| 'tools.ozone.report.defs#reasonRuleProhibitedSales'
|
56
|
+
| 'tools.ozone.report.defs#reasonRuleBanEvasion'
|
57
|
+
| 'tools.ozone.report.defs#reasonRuleOther'
|
58
|
+
| 'tools.ozone.report.defs#reasonCivicElectoralProcess'
|
59
|
+
| 'tools.ozone.report.defs#reasonCivicDisclosure'
|
60
|
+
| 'tools.ozone.report.defs#reasonCivicInterference'
|
61
|
+
| 'tools.ozone.report.defs#reasonCivicMisinformation'
|
62
|
+
| 'tools.ozone.report.defs#reasonCivicImpersonation'
|
63
|
+
| (string & {})
|
64
|
+
|
65
|
+
/** Appeal a previously taken moderation action */
|
66
|
+
export const REASONAPPEAL = `${id}#reasonAppeal`
|
67
|
+
/** Animal welfare violations */
|
68
|
+
export const REASONVIOLENCEANIMALWELFARE = `${id}#reasonViolenceAnimalWelfare`
|
69
|
+
/** Threats or incitement */
|
70
|
+
export const REASONVIOLENCETHREATS = `${id}#reasonViolenceThreats`
|
71
|
+
/** Graphic violent content */
|
72
|
+
export const REASONVIOLENCEGRAPHICCONTENT = `${id}#reasonViolenceGraphicContent`
|
73
|
+
/** Self harm */
|
74
|
+
export const REASONVIOLENCESELFHARM = `${id}#reasonViolenceSelfHarm`
|
75
|
+
/** Glorification of violence */
|
76
|
+
export const REASONVIOLENCEGLORIFICATION = `${id}#reasonViolenceGlorification`
|
77
|
+
/** Extremist content. These reports will be sent only be sent to the application's Moderation Authority. */
|
78
|
+
export const REASONVIOLENCEEXTREMISTCONTENT = `${id}#reasonViolenceExtremistContent`
|
79
|
+
/** Human trafficking */
|
80
|
+
export const REASONVIOLENCETRAFFICKING = `${id}#reasonViolenceTrafficking`
|
81
|
+
/** Other violent content */
|
82
|
+
export const REASONVIOLENCEOTHER = `${id}#reasonViolenceOther`
|
83
|
+
/** Adult sexual abuse content */
|
84
|
+
export const REASONSEXUALABUSECONTENT = `${id}#reasonSexualAbuseContent`
|
85
|
+
/** Non-consensual intimate imagery */
|
86
|
+
export const REASONSEXUALNCII = `${id}#reasonSexualNCII`
|
87
|
+
/** Sextortion */
|
88
|
+
export const REASONSEXUALSEXTORTION = `${id}#reasonSexualSextortion`
|
89
|
+
/** Deepfake adult content */
|
90
|
+
export const REASONSEXUALDEEPFAKE = `${id}#reasonSexualDeepfake`
|
91
|
+
/** Animal sexual abuse */
|
92
|
+
export const REASONSEXUALANIMAL = `${id}#reasonSexualAnimal`
|
93
|
+
/** Unlabelled adult content */
|
94
|
+
export const REASONSEXUALUNLABELED = `${id}#reasonSexualUnlabeled`
|
95
|
+
/** Other sexual violence content */
|
96
|
+
export const REASONSEXUALOTHER = `${id}#reasonSexualOther`
|
97
|
+
/** Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority. */
|
98
|
+
export const REASONCHILDSAFETYCSAM = `${id}#reasonChildSafetyCSAM`
|
99
|
+
/** Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority. */
|
100
|
+
export const REASONCHILDSAFETYGROOM = `${id}#reasonChildSafetyGroom`
|
101
|
+
/** Privacy violation involving a minor */
|
102
|
+
export const REASONCHILDSAFETYMINORPRIVACY = `${id}#reasonChildSafetyMinorPrivacy`
|
103
|
+
/** Child endangerment. These reports will be sent only be sent to the application's Moderation Authority. */
|
104
|
+
export const REASONCHILDSAFETYENDANGERMENT = `${id}#reasonChildSafetyEndangerment`
|
105
|
+
/** Harassment or bullying of minors */
|
106
|
+
export const REASONCHILDSAFETYHARASSMENT = `${id}#reasonChildSafetyHarassment`
|
107
|
+
/** Promotion of child exploitation. These reports will be sent only be sent to the application's Moderation Authority. */
|
108
|
+
export const REASONCHILDSAFETYPROMOTION = `${id}#reasonChildSafetyPromotion`
|
109
|
+
/** Other child safety. These reports will be sent only be sent to the application's Moderation Authority. */
|
110
|
+
export const REASONCHILDSAFETYOTHER = `${id}#reasonChildSafetyOther`
|
111
|
+
/** Trolling */
|
112
|
+
export const REASONHARASSMENTTROLL = `${id}#reasonHarassmentTroll`
|
113
|
+
/** Targeted harassment */
|
114
|
+
export const REASONHARASSMENTTARGETED = `${id}#reasonHarassmentTargeted`
|
115
|
+
/** Hate speech */
|
116
|
+
export const REASONHARASSMENTHATESPEECH = `${id}#reasonHarassmentHateSpeech`
|
117
|
+
/** Doxxing */
|
118
|
+
export const REASONHARASSMENTDOXXING = `${id}#reasonHarassmentDoxxing`
|
119
|
+
/** Other harassing or hateful content */
|
120
|
+
export const REASONHARASSMENTOTHER = `${id}#reasonHarassmentOther`
|
121
|
+
/** Fake account or bot */
|
122
|
+
export const REASONMISLEADINGBOT = `${id}#reasonMisleadingBot`
|
123
|
+
/** Impersonation */
|
124
|
+
export const REASONMISLEADINGIMPERSONATION = `${id}#reasonMisleadingImpersonation`
|
125
|
+
/** Spam */
|
126
|
+
export const REASONMISLEADINGSPAM = `${id}#reasonMisleadingSpam`
|
127
|
+
/** Scam */
|
128
|
+
export const REASONMISLEADINGSCAM = `${id}#reasonMisleadingScam`
|
129
|
+
/** Unlabelled gen-AI or synthetic content */
|
130
|
+
export const REASONMISLEADINGSYNTHETICCONTENT = `${id}#reasonMisleadingSyntheticContent`
|
131
|
+
/** Harmful false claims */
|
132
|
+
export const REASONMISLEADINGMISINFORMATION = `${id}#reasonMisleadingMisinformation`
|
133
|
+
/** Other misleading content */
|
134
|
+
export const REASONMISLEADINGOTHER = `${id}#reasonMisleadingOther`
|
135
|
+
/** Hacking or system attacks */
|
136
|
+
export const REASONRULESITESECURITY = `${id}#reasonRuleSiteSecurity`
|
137
|
+
/** Stolen content */
|
138
|
+
export const REASONRULESTOLENCONTENT = `${id}#reasonRuleStolenContent`
|
139
|
+
/** Promoting or selling prohibited items or services */
|
140
|
+
export const REASONRULEPROHIBITEDSALES = `${id}#reasonRuleProhibitedSales`
|
141
|
+
/** Banned user returning */
|
142
|
+
export const REASONRULEBANEVASION = `${id}#reasonRuleBanEvasion`
|
143
|
+
/** Other */
|
144
|
+
export const REASONRULEOTHER = `${id}#reasonRuleOther`
|
145
|
+
/** Electoral process violations */
|
146
|
+
export const REASONCIVICELECTORALPROCESS = `${id}#reasonCivicElectoralProcess`
|
147
|
+
/** Disclosure & transparency violations */
|
148
|
+
export const REASONCIVICDISCLOSURE = `${id}#reasonCivicDisclosure`
|
149
|
+
/** Voter intimidation or interference */
|
150
|
+
export const REASONCIVICINTERFERENCE = `${id}#reasonCivicInterference`
|
151
|
+
/** Election misinformation */
|
152
|
+
export const REASONCIVICMISINFORMATION = `${id}#reasonCivicMisinformation`
|
153
|
+
/** Impersonation of electoral officials/entities */
|
154
|
+
export const REASONCIVICIMPERSONATION = `${id}#reasonCivicImpersonation`
|
package/src/logger.ts
CHANGED
@@ -3,6 +3,7 @@ import { stdSerializers } from 'pino'
|
|
3
3
|
import { pinoHttp } from 'pino-http'
|
4
4
|
import { obfuscateHeaders, subsystemLogger } from '@atproto/common'
|
5
5
|
|
6
|
+
export const blobStoreLogger = subsystemLogger('pds:blob-store')
|
6
7
|
export const dbLogger = subsystemLogger('pds:db')
|
7
8
|
export const didCacheLogger = subsystemLogger('pds:did-cache')
|
8
9
|
export const readStickyLogger = subsystemLogger('pds:read-sticky')
|
@@ -35,11 +35,10 @@ export const rebuildRepo = async (
|
|
35
35
|
) => {
|
36
36
|
const memoryStore = new MemoryBlockstore()
|
37
37
|
const commit = await ctx.actorStore.transact(did, async (store) => {
|
38
|
-
const
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
])
|
38
|
+
const rootDetails = await store.repo.storage.getRootDetailed()
|
39
|
+
const records = await store.record.listAll()
|
40
|
+
const existingCids = await store.record.listExistingBlocks()
|
41
|
+
|
43
42
|
// increment existing rev by 1 ms
|
44
43
|
const revTid = TID.fromStr(rootDetails.rev)
|
45
44
|
const rev = TID.fromTime(
|
@@ -139,11 +139,9 @@ const processCommit = async (ctx: RecovererContext, evt: CommitEvt) => {
|
|
139
139
|
commit.newBlocks = blocks
|
140
140
|
commit.cid = evt.commit
|
141
141
|
commit.rev = evt.rev
|
142
|
-
await
|
143
|
-
|
144
|
-
|
145
|
-
trackBlobs(actorTxn, writes),
|
146
|
-
])
|
142
|
+
await actorTxn.repo.storage.applyCommit(commit)
|
143
|
+
await actorTxn.repo.indexWrites(writes, commit.rev)
|
144
|
+
await trackBlobs(actorTxn, writes)
|
147
145
|
})
|
148
146
|
}
|
149
147
|
|
@@ -165,13 +163,11 @@ const processRepoCreation = async (
|
|
165
163
|
relevantBlocks: new BlockMap(),
|
166
164
|
removedCids: new CidSet(),
|
167
165
|
}
|
168
|
-
await ctx.actorStore.transact(did, (actorTxn) =>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
]),
|
174
|
-
)
|
166
|
+
await ctx.actorStore.transact(did, async (actorTxn) => {
|
167
|
+
await actorTxn.repo.storage.applyCommit(commit, true)
|
168
|
+
await actorTxn.repo.indexWrites(writes, commit.rev)
|
169
|
+
await actorTxn.repo.blob.processWriteBlobs(commit.rev, writes)
|
170
|
+
})
|
175
171
|
await trackNewAccount(ctx.recoveryDb, did)
|
176
172
|
}
|
177
173
|
|
@@ -160,11 +160,11 @@ export class Sequencer extends (EventEmitter as new () => SequencerEmitter) {
|
|
160
160
|
}
|
161
161
|
|
162
162
|
async sequenceEvt(evt: RepoSeqInsert): Promise<number> {
|
163
|
-
const
|
164
|
-
this.db.db.insertInto('repo_seq').values(evt).
|
163
|
+
const [{ seq }] = await this.db.executeWithRetry(
|
164
|
+
this.db.db.insertInto('repo_seq').values(evt).returning('seq'),
|
165
165
|
)
|
166
166
|
this.crawlers.notifyOfUpdate()
|
167
|
-
return
|
167
|
+
return seq
|
168
168
|
}
|
169
169
|
|
170
170
|
async sequenceCommit(
|
@@ -37,6 +37,7 @@ Object {
|
|
37
37
|
"muted": false,
|
38
38
|
},
|
39
39
|
},
|
40
|
+
"bookmarkCount": 0,
|
40
41
|
"cid": "cids(0)",
|
41
42
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
42
43
|
"labels": Array [
|
@@ -67,6 +68,7 @@ Object {
|
|
67
68
|
"repostCount": 0,
|
68
69
|
"uri": "record(0)",
|
69
70
|
"viewer": Object {
|
71
|
+
"bookmarked": false,
|
70
72
|
"embeddingDisabled": false,
|
71
73
|
"threadMuted": false,
|
72
74
|
},
|
@@ -90,6 +92,7 @@ Object {
|
|
90
92
|
"muted": false,
|
91
93
|
},
|
92
94
|
},
|
95
|
+
"bookmarkCount": 0,
|
93
96
|
"cid": "cids(3)",
|
94
97
|
"embed": Object {
|
95
98
|
"$type": "app.bsky.embed.recordWithMedia#view",
|
@@ -200,6 +203,7 @@ Object {
|
|
200
203
|
"repostCount": 0,
|
201
204
|
"uri": "record(2)",
|
202
205
|
"viewer": Object {
|
206
|
+
"bookmarked": false,
|
203
207
|
"embeddingDisabled": false,
|
204
208
|
"like": "record(8)",
|
205
209
|
"threadMuted": false,
|