@atproto/pds 0.4.133 → 0.4.135
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 +34 -0
- package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/resolveHandle.js +13 -11
- package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.js +1 -0
- package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
- package/dist/background.js +1 -1
- package/dist/background.js.map +1 -1
- package/dist/basic-routes.js +1 -1
- package/dist/basic-routes.js.map +1 -1
- package/dist/error.js +1 -1
- package/dist/error.js.map +1 -1
- package/dist/lexicon/index.d.ts +15 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +36 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +918 -98
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +434 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +21 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +9 -0
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/status.d.ts +23 -0
- package/dist/lexicon/types/app/bsky/actor/status.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/actor/status.js +19 -0
- package/dist/lexicon/types/app/bsky/actor/status.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/server/getConfig.d.ts +3 -1
- package/dist/lexicon/types/tools/ozone/server/getConfig.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/server/getConfig.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/setting/defs.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/setting/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/setting/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/setting/upsertOption.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/setting/upsertOption.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/team/addMember.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/team/addMember.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/team/defs.d.ts +3 -1
- package/dist/lexicon/types/tools/ozone/team/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/team/defs.js +3 -1
- package/dist/lexicon/types/tools/ozone/team/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/team/updateMember.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/team/updateMember.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/verification/defs.d.ts +43 -0
- package/dist/lexicon/types/tools/ozone/verification/defs.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/defs.js +16 -0
- package/dist/lexicon/types/tools/ozone/verification/defs.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/grantVerifications.d.ts +66 -0
- package/dist/lexicon/types/tools/ozone/verification/grantVerifications.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/grantVerifications.js +25 -0
- package/dist/lexicon/types/tools/ozone/verification/grantVerifications.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/listVerifications.d.ts +52 -0
- package/dist/lexicon/types/tools/ozone/verification/listVerifications.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/listVerifications.js +7 -0
- package/dist/lexicon/types/tools/ozone/verification/listVerifications.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.d.ts +56 -0
- package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.js +16 -0
- package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.js.map +1 -0
- package/dist/pipethrough.js +3 -0
- package/dist/pipethrough.js.map +1 -1
- package/dist/read-after-write/viewer.d.ts +3 -3
- package/dist/sequencer/events.d.ts +16 -16
- package/package.json +16 -16
- package/src/api/com/atproto/identity/resolveHandle.ts +17 -15
- package/src/api/com/atproto/repo/importRepo.ts +1 -0
- package/src/background.ts +1 -1
- package/src/basic-routes.ts +1 -1
- package/src/error.ts +1 -1
- package/src/lexicon/index.ts +50 -0
- package/src/lexicon/lexicons.ts +457 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +26 -0
- package/src/lexicon/types/app/bsky/actor/status.ts +40 -0
- package/src/lexicon/types/tools/ozone/server/getConfig.ts +3 -0
- package/src/lexicon/types/tools/ozone/setting/defs.ts +1 -0
- package/src/lexicon/types/tools/ozone/setting/upsertOption.ts +1 -0
- package/src/lexicon/types/tools/ozone/team/addMember.ts +1 -0
- package/src/lexicon/types/tools/ozone/team/defs.ts +3 -0
- package/src/lexicon/types/tools/ozone/team/updateMember.ts +1 -0
- package/src/lexicon/types/tools/ozone/verification/defs.ts +59 -0
- package/src/lexicon/types/tools/ozone/verification/grantVerifications.ts +100 -0
- package/src/lexicon/types/tools/ozone/verification/listVerifications.ts +70 -0
- package/src/lexicon/types/tools/ozone/verification/revokeVerifications.ts +81 -0
- package/src/pipethrough.ts +3 -0
- package/tests/proxied/views.test.ts +53 -53
- package/tsconfig.build.tsbuildinfo +1 -1
@@ -27,6 +27,7 @@ export interface Member {
|
|
27
27
|
| 'lex:tools.ozone.team.defs#roleAdmin'
|
28
28
|
| 'lex:tools.ozone.team.defs#roleModerator'
|
29
29
|
| 'lex:tools.ozone.team.defs#roleTriage'
|
30
|
+
| 'lex:tools.ozone.team.defs#roleVerifier'
|
30
31
|
| (string & {})
|
31
32
|
}
|
32
33
|
|
@@ -46,3 +47,5 @@ export const ROLEADMIN = `${id}#roleAdmin`
|
|
46
47
|
export const ROLEMODERATOR = `${id}#roleModerator`
|
47
48
|
/** Triage role. Mostly intended for monitoring and escalating issues. */
|
48
49
|
export const ROLETRIAGE = `${id}#roleTriage`
|
50
|
+
/** Verifier role. Only allowed to issue verifications. */
|
51
|
+
export const ROLEVERIFIER = `${id}#roleVerifier`
|
@@ -0,0 +1,59 @@
|
|
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 ToolsOzoneModerationDefs from '../moderation/defs.js'
|
13
|
+
|
14
|
+
const is$typed = _is$typed,
|
15
|
+
validate = _validate
|
16
|
+
const id = 'tools.ozone.verification.defs'
|
17
|
+
|
18
|
+
/** Verification data for the associated subject. */
|
19
|
+
export interface VerificationView {
|
20
|
+
$type?: 'tools.ozone.verification.defs#verificationView'
|
21
|
+
/** The user who issued this verification. */
|
22
|
+
issuer: string
|
23
|
+
/** The AT-URI of the verification record. */
|
24
|
+
uri: string
|
25
|
+
/** The subject of the verification. */
|
26
|
+
subject: string
|
27
|
+
/** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. */
|
28
|
+
handle: string
|
29
|
+
/** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. */
|
30
|
+
displayName: string
|
31
|
+
/** Timestamp when the verification was created. */
|
32
|
+
createdAt: string
|
33
|
+
/** Describes the reason for revocation, also indicating that the verification is no longer valid. */
|
34
|
+
revokeReason?: string
|
35
|
+
/** Timestamp when the verification was revoked. */
|
36
|
+
revokedAt?: string
|
37
|
+
/** The user who revoked this verification. */
|
38
|
+
revokedBy?: string
|
39
|
+
subjectProfile?: { $type: string }
|
40
|
+
issuerProfile?: { $type: string }
|
41
|
+
subjectRepo?:
|
42
|
+
| $Typed<ToolsOzoneModerationDefs.RepoViewDetail>
|
43
|
+
| $Typed<ToolsOzoneModerationDefs.RepoViewNotFound>
|
44
|
+
| { $type: string }
|
45
|
+
issuerRepo?:
|
46
|
+
| $Typed<ToolsOzoneModerationDefs.RepoViewDetail>
|
47
|
+
| $Typed<ToolsOzoneModerationDefs.RepoViewNotFound>
|
48
|
+
| { $type: string }
|
49
|
+
}
|
50
|
+
|
51
|
+
const hashVerificationView = 'verificationView'
|
52
|
+
|
53
|
+
export function isVerificationView<V>(v: V) {
|
54
|
+
return is$typed(v, id, hashVerificationView)
|
55
|
+
}
|
56
|
+
|
57
|
+
export function validateVerificationView<V>(v: V) {
|
58
|
+
return validate<VerificationView & V>(v, id, hashVerificationView)
|
59
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express'
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
6
|
+
import { CID } from 'multiformats/cid'
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
8
|
+
import {
|
9
|
+
type $Typed,
|
10
|
+
is$typed as _is$typed,
|
11
|
+
type OmitKey,
|
12
|
+
} from '../../../../util'
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
14
|
+
import type * as ToolsOzoneVerificationDefs from './defs.js'
|
15
|
+
|
16
|
+
const is$typed = _is$typed,
|
17
|
+
validate = _validate
|
18
|
+
const id = 'tools.ozone.verification.grantVerifications'
|
19
|
+
|
20
|
+
export interface QueryParams {}
|
21
|
+
|
22
|
+
export interface InputSchema {
|
23
|
+
/** Array of verification requests to process */
|
24
|
+
verifications: VerificationInput[]
|
25
|
+
}
|
26
|
+
|
27
|
+
export interface OutputSchema {
|
28
|
+
verifications: ToolsOzoneVerificationDefs.VerificationView[]
|
29
|
+
failedVerifications: GrantError[]
|
30
|
+
}
|
31
|
+
|
32
|
+
export interface HandlerInput {
|
33
|
+
encoding: 'application/json'
|
34
|
+
body: InputSchema
|
35
|
+
}
|
36
|
+
|
37
|
+
export interface HandlerSuccess {
|
38
|
+
encoding: 'application/json'
|
39
|
+
body: OutputSchema
|
40
|
+
headers?: { [key: string]: string }
|
41
|
+
}
|
42
|
+
|
43
|
+
export interface HandlerError {
|
44
|
+
status: number
|
45
|
+
message?: string
|
46
|
+
}
|
47
|
+
|
48
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
49
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
50
|
+
auth: HA
|
51
|
+
params: QueryParams
|
52
|
+
input: HandlerInput
|
53
|
+
req: express.Request
|
54
|
+
res: express.Response
|
55
|
+
resetRouteRateLimits: () => Promise<void>
|
56
|
+
}
|
57
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
58
|
+
ctx: HandlerReqCtx<HA>,
|
59
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
60
|
+
|
61
|
+
export interface VerificationInput {
|
62
|
+
$type?: 'tools.ozone.verification.grantVerifications#verificationInput'
|
63
|
+
/** The did of the subject being verified */
|
64
|
+
subject: string
|
65
|
+
/** Handle of the subject the verification applies to at the moment of verifying. */
|
66
|
+
handle: string
|
67
|
+
/** Display name of the subject the verification applies to at the moment of verifying. */
|
68
|
+
displayName: string
|
69
|
+
/** Timestamp for verification record. Defaults to current time when not specified. */
|
70
|
+
createdAt?: string
|
71
|
+
}
|
72
|
+
|
73
|
+
const hashVerificationInput = 'verificationInput'
|
74
|
+
|
75
|
+
export function isVerificationInput<V>(v: V) {
|
76
|
+
return is$typed(v, id, hashVerificationInput)
|
77
|
+
}
|
78
|
+
|
79
|
+
export function validateVerificationInput<V>(v: V) {
|
80
|
+
return validate<VerificationInput & V>(v, id, hashVerificationInput)
|
81
|
+
}
|
82
|
+
|
83
|
+
/** Error object for failed verifications. */
|
84
|
+
export interface GrantError {
|
85
|
+
$type?: 'tools.ozone.verification.grantVerifications#grantError'
|
86
|
+
/** Error message describing the reason for failure. */
|
87
|
+
error: string
|
88
|
+
/** The did of the subject being verified */
|
89
|
+
subject: string
|
90
|
+
}
|
91
|
+
|
92
|
+
const hashGrantError = 'grantError'
|
93
|
+
|
94
|
+
export function isGrantError<V>(v: V) {
|
95
|
+
return is$typed(v, id, hashGrantError)
|
96
|
+
}
|
97
|
+
|
98
|
+
export function validateGrantError<V>(v: V) {
|
99
|
+
return validate<GrantError & V>(v, id, hashGrantError)
|
100
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express'
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
6
|
+
import { CID } from 'multiformats/cid'
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
8
|
+
import {
|
9
|
+
type $Typed,
|
10
|
+
is$typed as _is$typed,
|
11
|
+
type OmitKey,
|
12
|
+
} from '../../../../util'
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
14
|
+
import type * as ToolsOzoneVerificationDefs from './defs.js'
|
15
|
+
|
16
|
+
const is$typed = _is$typed,
|
17
|
+
validate = _validate
|
18
|
+
const id = 'tools.ozone.verification.listVerifications'
|
19
|
+
|
20
|
+
export interface QueryParams {
|
21
|
+
/** Pagination cursor */
|
22
|
+
cursor?: string
|
23
|
+
/** Maximum number of results to return */
|
24
|
+
limit: number
|
25
|
+
/** Filter to verifications created after this timestamp */
|
26
|
+
createdAfter?: string
|
27
|
+
/** Filter to verifications created before this timestamp */
|
28
|
+
createdBefore?: string
|
29
|
+
/** Filter to verifications from specific issuers */
|
30
|
+
issuers?: string[]
|
31
|
+
/** Filter to specific verified DIDs */
|
32
|
+
subjects?: string[]
|
33
|
+
/** Sort direction for creation date */
|
34
|
+
sortDirection: 'asc' | 'desc'
|
35
|
+
/** Filter to verifications that are revoked or not. By default, includes both. */
|
36
|
+
isRevoked?: boolean
|
37
|
+
}
|
38
|
+
|
39
|
+
export type InputSchema = undefined
|
40
|
+
|
41
|
+
export interface OutputSchema {
|
42
|
+
cursor?: string
|
43
|
+
verifications: ToolsOzoneVerificationDefs.VerificationView[]
|
44
|
+
}
|
45
|
+
|
46
|
+
export type HandlerInput = undefined
|
47
|
+
|
48
|
+
export interface HandlerSuccess {
|
49
|
+
encoding: 'application/json'
|
50
|
+
body: OutputSchema
|
51
|
+
headers?: { [key: string]: string }
|
52
|
+
}
|
53
|
+
|
54
|
+
export interface HandlerError {
|
55
|
+
status: number
|
56
|
+
message?: string
|
57
|
+
}
|
58
|
+
|
59
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
60
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
61
|
+
auth: HA
|
62
|
+
params: QueryParams
|
63
|
+
input: HandlerInput
|
64
|
+
req: express.Request
|
65
|
+
res: express.Response
|
66
|
+
resetRouteRateLimits: () => Promise<void>
|
67
|
+
}
|
68
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
69
|
+
ctx: HandlerReqCtx<HA>,
|
70
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express'
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
6
|
+
import { CID } from 'multiformats/cid'
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
8
|
+
import {
|
9
|
+
type $Typed,
|
10
|
+
is$typed as _is$typed,
|
11
|
+
type OmitKey,
|
12
|
+
} from '../../../../util'
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
14
|
+
|
15
|
+
const is$typed = _is$typed,
|
16
|
+
validate = _validate
|
17
|
+
const id = 'tools.ozone.verification.revokeVerifications'
|
18
|
+
|
19
|
+
export interface QueryParams {}
|
20
|
+
|
21
|
+
export interface InputSchema {
|
22
|
+
/** Array of verification record uris to revoke */
|
23
|
+
uris: string[]
|
24
|
+
/** Reason for revoking the verification. This is optional and can be omitted if not needed. */
|
25
|
+
revokeReason?: string
|
26
|
+
}
|
27
|
+
|
28
|
+
export interface OutputSchema {
|
29
|
+
/** List of verification uris successfully revoked */
|
30
|
+
revokedVerifications: string[]
|
31
|
+
/** List of verification uris that couldn't be revoked, including failure reasons */
|
32
|
+
failedRevocations: RevokeError[]
|
33
|
+
}
|
34
|
+
|
35
|
+
export interface HandlerInput {
|
36
|
+
encoding: 'application/json'
|
37
|
+
body: InputSchema
|
38
|
+
}
|
39
|
+
|
40
|
+
export interface HandlerSuccess {
|
41
|
+
encoding: 'application/json'
|
42
|
+
body: OutputSchema
|
43
|
+
headers?: { [key: string]: string }
|
44
|
+
}
|
45
|
+
|
46
|
+
export interface HandlerError {
|
47
|
+
status: number
|
48
|
+
message?: string
|
49
|
+
}
|
50
|
+
|
51
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
52
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
53
|
+
auth: HA
|
54
|
+
params: QueryParams
|
55
|
+
input: HandlerInput
|
56
|
+
req: express.Request
|
57
|
+
res: express.Response
|
58
|
+
resetRouteRateLimits: () => Promise<void>
|
59
|
+
}
|
60
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
61
|
+
ctx: HandlerReqCtx<HA>,
|
62
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
63
|
+
|
64
|
+
/** Error object for failed revocations */
|
65
|
+
export interface RevokeError {
|
66
|
+
$type?: 'tools.ozone.verification.revokeVerifications#revokeError'
|
67
|
+
/** The AT-URI of the verification record that failed to revoke. */
|
68
|
+
uri: string
|
69
|
+
/** Description of the error that occurred during revocation. */
|
70
|
+
error: string
|
71
|
+
}
|
72
|
+
|
73
|
+
const hashRevokeError = 'revokeError'
|
74
|
+
|
75
|
+
export function isRevokeError<V>(v: V) {
|
76
|
+
return is$typed(v, id, hashRevokeError)
|
77
|
+
}
|
78
|
+
|
79
|
+
export function validateRevokeError<V>(v: V) {
|
80
|
+
return validate<RevokeError & V>(v, id, hashRevokeError)
|
81
|
+
}
|
package/src/pipethrough.ts
CHANGED
@@ -531,6 +531,9 @@ const defaultService = (
|
|
531
531
|
case ids.ToolsOzoneModerationQueryEvents:
|
532
532
|
case ids.ToolsOzoneModerationQueryStatuses:
|
533
533
|
case ids.ToolsOzoneModerationSearchRepos:
|
534
|
+
case ids.ToolsOzoneVerificationListVerifications:
|
535
|
+
case ids.ToolsOzoneVerificationGrantVerifications:
|
536
|
+
case ids.ToolsOzoneVerificationRevokeVerifications:
|
534
537
|
return ctx.cfg.modService
|
535
538
|
case ids.ComAtprotoModerationCreateReport:
|
536
539
|
return ctx.cfg.reportService
|