@atproto/pds 0.4.133 → 0.4.134
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 +11 -0
- package/dist/lexicon/index.d.ts +12 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +33 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +672 -12
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +353 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- 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/package.json +7 -7
- package/src/lexicon/index.ts +47 -0
- package/src/lexicon/lexicons.ts +372 -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
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.134",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -48,8 +48,8 @@
|
|
48
48
|
"undici": "^6.19.8",
|
49
49
|
"zod": "^3.23.8",
|
50
50
|
"@atproto-labs/fetch-node": "0.1.8",
|
51
|
-
"@atproto-labs/xrpc-utils": "0.0.
|
52
|
-
"@atproto/api": "^0.15.
|
51
|
+
"@atproto-labs/xrpc-utils": "0.0.13",
|
52
|
+
"@atproto/api": "^0.15.5",
|
53
53
|
"@atproto/aws": "^0.2.20",
|
54
54
|
"@atproto/common": "^0.4.10",
|
55
55
|
"@atproto/crypto": "^0.4.4",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"@atproto/repo": "^0.8.0",
|
60
60
|
"@atproto/syntax": "^0.4.0",
|
61
61
|
"@atproto/xrpc": "^0.6.12",
|
62
|
-
"@atproto/xrpc-server": "^0.7.
|
62
|
+
"@atproto/xrpc-server": "^0.7.17"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
|
@@ -77,9 +77,9 @@
|
|
77
77
|
"ts-node": "^10.8.2",
|
78
78
|
"typescript": "^5.6.3",
|
79
79
|
"ws": "^8.12.0",
|
80
|
-
"@atproto/api": "^0.15.
|
81
|
-
"@atproto/bsky": "^0.0.
|
82
|
-
"@atproto/dev-env": "^0.3.
|
80
|
+
"@atproto/api": "^0.15.5",
|
81
|
+
"@atproto/bsky": "^0.0.147",
|
82
|
+
"@atproto/dev-env": "^0.3.128",
|
83
83
|
"@atproto/lex-cli": "^0.8.0",
|
84
84
|
"@atproto/oauth-client-browser-example": "0.0.2"
|
85
85
|
},
|
package/src/lexicon/index.ts
CHANGED
@@ -217,6 +217,9 @@ import * as ToolsOzoneTeamAddMember from './types/tools/ozone/team/addMember.js'
|
|
217
217
|
import * as ToolsOzoneTeamDeleteMember from './types/tools/ozone/team/deleteMember.js'
|
218
218
|
import * as ToolsOzoneTeamListMembers from './types/tools/ozone/team/listMembers.js'
|
219
219
|
import * as ToolsOzoneTeamUpdateMember from './types/tools/ozone/team/updateMember.js'
|
220
|
+
import * as ToolsOzoneVerificationGrantVerifications from './types/tools/ozone/verification/grantVerifications.js'
|
221
|
+
import * as ToolsOzoneVerificationListVerifications from './types/tools/ozone/verification/listVerifications.js'
|
222
|
+
import * as ToolsOzoneVerificationRevokeVerifications from './types/tools/ozone/verification/revokeVerifications.js'
|
220
223
|
|
221
224
|
export const COM_ATPROTO_MODERATION = {
|
222
225
|
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
|
@@ -258,6 +261,7 @@ export const TOOLS_OZONE_TEAM = {
|
|
258
261
|
DefsRoleAdmin: 'tools.ozone.team.defs#roleAdmin',
|
259
262
|
DefsRoleModerator: 'tools.ozone.team.defs#roleModerator',
|
260
263
|
DefsRoleTriage: 'tools.ozone.team.defs#roleTriage',
|
264
|
+
DefsRoleVerifier: 'tools.ozone.team.defs#roleVerifier',
|
261
265
|
}
|
262
266
|
|
263
267
|
export function createServer(options?: XrpcOptions): Server {
|
@@ -2495,6 +2499,7 @@ export class ToolsOzoneNS {
|
|
2495
2499
|
setting: ToolsOzoneSettingNS
|
2496
2500
|
signature: ToolsOzoneSignatureNS
|
2497
2501
|
team: ToolsOzoneTeamNS
|
2502
|
+
verification: ToolsOzoneVerificationNS
|
2498
2503
|
|
2499
2504
|
constructor(server: Server) {
|
2500
2505
|
this._server = server
|
@@ -2506,6 +2511,7 @@ export class ToolsOzoneNS {
|
|
2506
2511
|
this.setting = new ToolsOzoneSettingNS(server)
|
2507
2512
|
this.signature = new ToolsOzoneSignatureNS(server)
|
2508
2513
|
this.team = new ToolsOzoneTeamNS(server)
|
2514
|
+
this.verification = new ToolsOzoneVerificationNS(server)
|
2509
2515
|
}
|
2510
2516
|
}
|
2511
2517
|
|
@@ -2936,6 +2942,47 @@ export class ToolsOzoneTeamNS {
|
|
2936
2942
|
}
|
2937
2943
|
}
|
2938
2944
|
|
2945
|
+
export class ToolsOzoneVerificationNS {
|
2946
|
+
_server: Server
|
2947
|
+
|
2948
|
+
constructor(server: Server) {
|
2949
|
+
this._server = server
|
2950
|
+
}
|
2951
|
+
|
2952
|
+
grantVerifications<AV extends AuthVerifier>(
|
2953
|
+
cfg: ConfigOf<
|
2954
|
+
AV,
|
2955
|
+
ToolsOzoneVerificationGrantVerifications.Handler<ExtractAuth<AV>>,
|
2956
|
+
ToolsOzoneVerificationGrantVerifications.HandlerReqCtx<ExtractAuth<AV>>
|
2957
|
+
>,
|
2958
|
+
) {
|
2959
|
+
const nsid = 'tools.ozone.verification.grantVerifications' // @ts-ignore
|
2960
|
+
return this._server.xrpc.method(nsid, cfg)
|
2961
|
+
}
|
2962
|
+
|
2963
|
+
listVerifications<AV extends AuthVerifier>(
|
2964
|
+
cfg: ConfigOf<
|
2965
|
+
AV,
|
2966
|
+
ToolsOzoneVerificationListVerifications.Handler<ExtractAuth<AV>>,
|
2967
|
+
ToolsOzoneVerificationListVerifications.HandlerReqCtx<ExtractAuth<AV>>
|
2968
|
+
>,
|
2969
|
+
) {
|
2970
|
+
const nsid = 'tools.ozone.verification.listVerifications' // @ts-ignore
|
2971
|
+
return this._server.xrpc.method(nsid, cfg)
|
2972
|
+
}
|
2973
|
+
|
2974
|
+
revokeVerifications<AV extends AuthVerifier>(
|
2975
|
+
cfg: ConfigOf<
|
2976
|
+
AV,
|
2977
|
+
ToolsOzoneVerificationRevokeVerifications.Handler<ExtractAuth<AV>>,
|
2978
|
+
ToolsOzoneVerificationRevokeVerifications.HandlerReqCtx<ExtractAuth<AV>>
|
2979
|
+
>,
|
2980
|
+
) {
|
2981
|
+
const nsid = 'tools.ozone.verification.revokeVerifications' // @ts-ignore
|
2982
|
+
return this._server.xrpc.method(nsid, cfg)
|
2983
|
+
}
|
2984
|
+
}
|
2985
|
+
|
2939
2986
|
type SharedRateLimitOpts<T> = {
|
2940
2987
|
name: string
|
2941
2988
|
calcKey?: (ctx: T) => string | null
|
package/src/lexicon/lexicons.ts
CHANGED
@@ -14652,6 +14652,11 @@ export const schemaDict = {
|
|
14652
14652
|
type: 'ref',
|
14653
14653
|
ref: 'lex:tools.ozone.server.getConfig#viewerConfig',
|
14654
14654
|
},
|
14655
|
+
verifierDid: {
|
14656
|
+
type: 'string',
|
14657
|
+
format: 'did',
|
14658
|
+
description: 'The did of the verifier used for verification.',
|
14659
|
+
},
|
14655
14660
|
},
|
14656
14661
|
},
|
14657
14662
|
},
|
@@ -14674,6 +14679,7 @@ export const schemaDict = {
|
|
14674
14679
|
'tools.ozone.team.defs#roleAdmin',
|
14675
14680
|
'tools.ozone.team.defs#roleModerator',
|
14676
14681
|
'tools.ozone.team.defs#roleTriage',
|
14682
|
+
'tools.ozone.team.defs#roleVerifier',
|
14677
14683
|
],
|
14678
14684
|
},
|
14679
14685
|
},
|
@@ -15019,6 +15025,7 @@ export const schemaDict = {
|
|
15019
15025
|
'tools.ozone.team.defs#roleModerator',
|
15020
15026
|
'tools.ozone.team.defs#roleTriage',
|
15021
15027
|
'tools.ozone.team.defs#roleAdmin',
|
15028
|
+
'tools.ozone.team.defs#roleVerifier',
|
15022
15029
|
],
|
15023
15030
|
},
|
15024
15031
|
scope: {
|
@@ -15171,6 +15178,7 @@ export const schemaDict = {
|
|
15171
15178
|
knownValues: [
|
15172
15179
|
'tools.ozone.team.defs#roleModerator',
|
15173
15180
|
'tools.ozone.team.defs#roleTriage',
|
15181
|
+
'tools.ozone.team.defs#roleVerifier',
|
15174
15182
|
'tools.ozone.team.defs#roleAdmin',
|
15175
15183
|
],
|
15176
15184
|
},
|
@@ -15390,6 +15398,7 @@ export const schemaDict = {
|
|
15390
15398
|
knownValues: [
|
15391
15399
|
'tools.ozone.team.defs#roleAdmin',
|
15392
15400
|
'tools.ozone.team.defs#roleModerator',
|
15401
|
+
'tools.ozone.team.defs#roleVerifier',
|
15393
15402
|
'tools.ozone.team.defs#roleTriage',
|
15394
15403
|
],
|
15395
15404
|
},
|
@@ -15448,6 +15457,7 @@ export const schemaDict = {
|
|
15448
15457
|
'lex:tools.ozone.team.defs#roleAdmin',
|
15449
15458
|
'lex:tools.ozone.team.defs#roleModerator',
|
15450
15459
|
'lex:tools.ozone.team.defs#roleTriage',
|
15460
|
+
'lex:tools.ozone.team.defs#roleVerifier',
|
15451
15461
|
],
|
15452
15462
|
},
|
15453
15463
|
},
|
@@ -15466,6 +15476,10 @@ export const schemaDict = {
|
|
15466
15476
|
description:
|
15467
15477
|
'Triage role. Mostly intended for monitoring and escalating issues.',
|
15468
15478
|
},
|
15479
|
+
roleVerifier: {
|
15480
|
+
type: 'token',
|
15481
|
+
description: 'Verifier role. Only allowed to issue verifications.',
|
15482
|
+
},
|
15469
15483
|
},
|
15470
15484
|
},
|
15471
15485
|
ToolsOzoneTeamDeleteMember: {
|
@@ -15582,6 +15596,7 @@ export const schemaDict = {
|
|
15582
15596
|
knownValues: [
|
15583
15597
|
'tools.ozone.team.defs#roleAdmin',
|
15584
15598
|
'tools.ozone.team.defs#roleModerator',
|
15599
|
+
'tools.ozone.team.defs#roleVerifier',
|
15585
15600
|
'tools.ozone.team.defs#roleTriage',
|
15586
15601
|
],
|
15587
15602
|
},
|
@@ -15604,6 +15619,356 @@ export const schemaDict = {
|
|
15604
15619
|
},
|
15605
15620
|
},
|
15606
15621
|
},
|
15622
|
+
ToolsOzoneVerificationDefs: {
|
15623
|
+
lexicon: 1,
|
15624
|
+
id: 'tools.ozone.verification.defs',
|
15625
|
+
defs: {
|
15626
|
+
verificationView: {
|
15627
|
+
type: 'object',
|
15628
|
+
description: 'Verification data for the associated subject.',
|
15629
|
+
required: [
|
15630
|
+
'issuer',
|
15631
|
+
'uri',
|
15632
|
+
'subject',
|
15633
|
+
'handle',
|
15634
|
+
'displayName',
|
15635
|
+
'createdAt',
|
15636
|
+
],
|
15637
|
+
properties: {
|
15638
|
+
issuer: {
|
15639
|
+
type: 'string',
|
15640
|
+
description: 'The user who issued this verification.',
|
15641
|
+
format: 'did',
|
15642
|
+
},
|
15643
|
+
uri: {
|
15644
|
+
type: 'string',
|
15645
|
+
description: 'The AT-URI of the verification record.',
|
15646
|
+
format: 'at-uri',
|
15647
|
+
},
|
15648
|
+
subject: {
|
15649
|
+
type: 'string',
|
15650
|
+
format: 'did',
|
15651
|
+
description: 'The subject of the verification.',
|
15652
|
+
},
|
15653
|
+
handle: {
|
15654
|
+
type: 'string',
|
15655
|
+
description:
|
15656
|
+
'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.',
|
15657
|
+
format: 'handle',
|
15658
|
+
},
|
15659
|
+
displayName: {
|
15660
|
+
type: 'string',
|
15661
|
+
description:
|
15662
|
+
'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.',
|
15663
|
+
},
|
15664
|
+
createdAt: {
|
15665
|
+
type: 'string',
|
15666
|
+
description: 'Timestamp when the verification was created.',
|
15667
|
+
format: 'datetime',
|
15668
|
+
},
|
15669
|
+
revokeReason: {
|
15670
|
+
type: 'string',
|
15671
|
+
description:
|
15672
|
+
'Describes the reason for revocation, also indicating that the verification is no longer valid.',
|
15673
|
+
},
|
15674
|
+
revokedAt: {
|
15675
|
+
type: 'string',
|
15676
|
+
description: 'Timestamp when the verification was revoked.',
|
15677
|
+
format: 'datetime',
|
15678
|
+
},
|
15679
|
+
revokedBy: {
|
15680
|
+
type: 'string',
|
15681
|
+
description: 'The user who revoked this verification.',
|
15682
|
+
format: 'did',
|
15683
|
+
},
|
15684
|
+
subjectProfile: {
|
15685
|
+
type: 'union',
|
15686
|
+
refs: [],
|
15687
|
+
},
|
15688
|
+
issuerProfile: {
|
15689
|
+
type: 'union',
|
15690
|
+
refs: [],
|
15691
|
+
},
|
15692
|
+
subjectRepo: {
|
15693
|
+
type: 'union',
|
15694
|
+
refs: [
|
15695
|
+
'lex:tools.ozone.moderation.defs#repoViewDetail',
|
15696
|
+
'lex:tools.ozone.moderation.defs#repoViewNotFound',
|
15697
|
+
],
|
15698
|
+
},
|
15699
|
+
issuerRepo: {
|
15700
|
+
type: 'union',
|
15701
|
+
refs: [
|
15702
|
+
'lex:tools.ozone.moderation.defs#repoViewDetail',
|
15703
|
+
'lex:tools.ozone.moderation.defs#repoViewNotFound',
|
15704
|
+
],
|
15705
|
+
},
|
15706
|
+
},
|
15707
|
+
},
|
15708
|
+
},
|
15709
|
+
},
|
15710
|
+
ToolsOzoneVerificationGrantVerifications: {
|
15711
|
+
lexicon: 1,
|
15712
|
+
id: 'tools.ozone.verification.grantVerifications',
|
15713
|
+
defs: {
|
15714
|
+
main: {
|
15715
|
+
type: 'procedure',
|
15716
|
+
description:
|
15717
|
+
'Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.',
|
15718
|
+
input: {
|
15719
|
+
encoding: 'application/json',
|
15720
|
+
schema: {
|
15721
|
+
type: 'object',
|
15722
|
+
required: ['verifications'],
|
15723
|
+
properties: {
|
15724
|
+
verifications: {
|
15725
|
+
type: 'array',
|
15726
|
+
description: 'Array of verification requests to process',
|
15727
|
+
maxLength: 100,
|
15728
|
+
items: {
|
15729
|
+
type: 'ref',
|
15730
|
+
ref: 'lex:tools.ozone.verification.grantVerifications#verificationInput',
|
15731
|
+
},
|
15732
|
+
},
|
15733
|
+
},
|
15734
|
+
},
|
15735
|
+
},
|
15736
|
+
output: {
|
15737
|
+
encoding: 'application/json',
|
15738
|
+
schema: {
|
15739
|
+
type: 'object',
|
15740
|
+
required: ['verifications', 'failedVerifications'],
|
15741
|
+
properties: {
|
15742
|
+
verifications: {
|
15743
|
+
type: 'array',
|
15744
|
+
items: {
|
15745
|
+
type: 'ref',
|
15746
|
+
ref: 'lex:tools.ozone.verification.defs#verificationView',
|
15747
|
+
},
|
15748
|
+
},
|
15749
|
+
failedVerifications: {
|
15750
|
+
type: 'array',
|
15751
|
+
items: {
|
15752
|
+
type: 'ref',
|
15753
|
+
ref: 'lex:tools.ozone.verification.grantVerifications#grantError',
|
15754
|
+
},
|
15755
|
+
},
|
15756
|
+
},
|
15757
|
+
},
|
15758
|
+
},
|
15759
|
+
},
|
15760
|
+
verificationInput: {
|
15761
|
+
type: 'object',
|
15762
|
+
required: ['subject', 'handle', 'displayName'],
|
15763
|
+
properties: {
|
15764
|
+
subject: {
|
15765
|
+
type: 'string',
|
15766
|
+
description: 'The did of the subject being verified',
|
15767
|
+
format: 'did',
|
15768
|
+
},
|
15769
|
+
handle: {
|
15770
|
+
type: 'string',
|
15771
|
+
description:
|
15772
|
+
'Handle of the subject the verification applies to at the moment of verifying.',
|
15773
|
+
format: 'handle',
|
15774
|
+
},
|
15775
|
+
displayName: {
|
15776
|
+
type: 'string',
|
15777
|
+
description:
|
15778
|
+
'Display name of the subject the verification applies to at the moment of verifying.',
|
15779
|
+
},
|
15780
|
+
createdAt: {
|
15781
|
+
type: 'string',
|
15782
|
+
description:
|
15783
|
+
'Timestamp for verification record. Defaults to current time when not specified.',
|
15784
|
+
},
|
15785
|
+
},
|
15786
|
+
},
|
15787
|
+
grantError: {
|
15788
|
+
type: 'object',
|
15789
|
+
description: 'Error object for failed verifications.',
|
15790
|
+
required: ['error', 'subject'],
|
15791
|
+
properties: {
|
15792
|
+
error: {
|
15793
|
+
type: 'string',
|
15794
|
+
description: 'Error message describing the reason for failure.',
|
15795
|
+
},
|
15796
|
+
subject: {
|
15797
|
+
type: 'string',
|
15798
|
+
description: 'The did of the subject being verified',
|
15799
|
+
format: 'did',
|
15800
|
+
},
|
15801
|
+
},
|
15802
|
+
},
|
15803
|
+
},
|
15804
|
+
},
|
15805
|
+
ToolsOzoneVerificationListVerifications: {
|
15806
|
+
lexicon: 1,
|
15807
|
+
id: 'tools.ozone.verification.listVerifications',
|
15808
|
+
defs: {
|
15809
|
+
main: {
|
15810
|
+
type: 'query',
|
15811
|
+
description: 'List verifications',
|
15812
|
+
parameters: {
|
15813
|
+
type: 'params',
|
15814
|
+
properties: {
|
15815
|
+
cursor: {
|
15816
|
+
type: 'string',
|
15817
|
+
description: 'Pagination cursor',
|
15818
|
+
},
|
15819
|
+
limit: {
|
15820
|
+
type: 'integer',
|
15821
|
+
description: 'Maximum number of results to return',
|
15822
|
+
minimum: 1,
|
15823
|
+
maximum: 100,
|
15824
|
+
default: 50,
|
15825
|
+
},
|
15826
|
+
createdAfter: {
|
15827
|
+
type: 'string',
|
15828
|
+
format: 'datetime',
|
15829
|
+
description:
|
15830
|
+
'Filter to verifications created after this timestamp',
|
15831
|
+
},
|
15832
|
+
createdBefore: {
|
15833
|
+
type: 'string',
|
15834
|
+
format: 'datetime',
|
15835
|
+
description:
|
15836
|
+
'Filter to verifications created before this timestamp',
|
15837
|
+
},
|
15838
|
+
issuers: {
|
15839
|
+
type: 'array',
|
15840
|
+
maxLength: 100,
|
15841
|
+
description: 'Filter to verifications from specific issuers',
|
15842
|
+
items: {
|
15843
|
+
type: 'string',
|
15844
|
+
format: 'did',
|
15845
|
+
},
|
15846
|
+
},
|
15847
|
+
subjects: {
|
15848
|
+
type: 'array',
|
15849
|
+
description: 'Filter to specific verified DIDs',
|
15850
|
+
maxLength: 100,
|
15851
|
+
items: {
|
15852
|
+
type: 'string',
|
15853
|
+
format: 'did',
|
15854
|
+
},
|
15855
|
+
},
|
15856
|
+
sortDirection: {
|
15857
|
+
type: 'string',
|
15858
|
+
description: 'Sort direction for creation date',
|
15859
|
+
enum: ['asc', 'desc'],
|
15860
|
+
default: 'desc',
|
15861
|
+
},
|
15862
|
+
isRevoked: {
|
15863
|
+
type: 'boolean',
|
15864
|
+
description:
|
15865
|
+
'Filter to verifications that are revoked or not. By default, includes both.',
|
15866
|
+
},
|
15867
|
+
},
|
15868
|
+
},
|
15869
|
+
output: {
|
15870
|
+
encoding: 'application/json',
|
15871
|
+
schema: {
|
15872
|
+
type: 'object',
|
15873
|
+
required: ['verifications'],
|
15874
|
+
properties: {
|
15875
|
+
cursor: {
|
15876
|
+
type: 'string',
|
15877
|
+
},
|
15878
|
+
verifications: {
|
15879
|
+
type: 'array',
|
15880
|
+
items: {
|
15881
|
+
type: 'ref',
|
15882
|
+
ref: 'lex:tools.ozone.verification.defs#verificationView',
|
15883
|
+
},
|
15884
|
+
},
|
15885
|
+
},
|
15886
|
+
},
|
15887
|
+
},
|
15888
|
+
},
|
15889
|
+
},
|
15890
|
+
},
|
15891
|
+
ToolsOzoneVerificationRevokeVerifications: {
|
15892
|
+
lexicon: 1,
|
15893
|
+
id: 'tools.ozone.verification.revokeVerifications',
|
15894
|
+
defs: {
|
15895
|
+
main: {
|
15896
|
+
type: 'procedure',
|
15897
|
+
description:
|
15898
|
+
'Revoke previously granted verifications in batches of up to 100.',
|
15899
|
+
input: {
|
15900
|
+
encoding: 'application/json',
|
15901
|
+
schema: {
|
15902
|
+
type: 'object',
|
15903
|
+
required: ['uris'],
|
15904
|
+
properties: {
|
15905
|
+
uris: {
|
15906
|
+
type: 'array',
|
15907
|
+
description: 'Array of verification record uris to revoke',
|
15908
|
+
maxLength: 100,
|
15909
|
+
items: {
|
15910
|
+
type: 'string',
|
15911
|
+
description:
|
15912
|
+
'The AT-URI of the verification record to revoke.',
|
15913
|
+
format: 'at-uri',
|
15914
|
+
},
|
15915
|
+
},
|
15916
|
+
revokeReason: {
|
15917
|
+
type: 'string',
|
15918
|
+
description:
|
15919
|
+
'Reason for revoking the verification. This is optional and can be omitted if not needed.',
|
15920
|
+
maxLength: 1000,
|
15921
|
+
},
|
15922
|
+
},
|
15923
|
+
},
|
15924
|
+
},
|
15925
|
+
output: {
|
15926
|
+
encoding: 'application/json',
|
15927
|
+
schema: {
|
15928
|
+
type: 'object',
|
15929
|
+
required: ['revokedVerifications', 'failedRevocations'],
|
15930
|
+
properties: {
|
15931
|
+
revokedVerifications: {
|
15932
|
+
type: 'array',
|
15933
|
+
description: 'List of verification uris successfully revoked',
|
15934
|
+
items: {
|
15935
|
+
type: 'string',
|
15936
|
+
format: 'at-uri',
|
15937
|
+
},
|
15938
|
+
},
|
15939
|
+
failedRevocations: {
|
15940
|
+
type: 'array',
|
15941
|
+
description:
|
15942
|
+
"List of verification uris that couldn't be revoked, including failure reasons",
|
15943
|
+
items: {
|
15944
|
+
type: 'ref',
|
15945
|
+
ref: 'lex:tools.ozone.verification.revokeVerifications#revokeError',
|
15946
|
+
},
|
15947
|
+
},
|
15948
|
+
},
|
15949
|
+
},
|
15950
|
+
},
|
15951
|
+
},
|
15952
|
+
revokeError: {
|
15953
|
+
type: 'object',
|
15954
|
+
description: 'Error object for failed revocations',
|
15955
|
+
required: ['uri', 'error'],
|
15956
|
+
properties: {
|
15957
|
+
uri: {
|
15958
|
+
type: 'string',
|
15959
|
+
description:
|
15960
|
+
'The AT-URI of the verification record that failed to revoke.',
|
15961
|
+
format: 'at-uri',
|
15962
|
+
},
|
15963
|
+
error: {
|
15964
|
+
type: 'string',
|
15965
|
+
description:
|
15966
|
+
'Description of the error that occurred during revocation.',
|
15967
|
+
},
|
15968
|
+
},
|
15969
|
+
},
|
15970
|
+
},
|
15971
|
+
},
|
15607
15972
|
} as const satisfies Record<string, LexiconDoc>
|
15608
15973
|
export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
|
15609
15974
|
export const lexicons: Lexicons = new Lexicons(schemas)
|
@@ -15920,4 +16285,11 @@ export const ids = {
|
|
15920
16285
|
ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember',
|
15921
16286
|
ToolsOzoneTeamListMembers: 'tools.ozone.team.listMembers',
|
15922
16287
|
ToolsOzoneTeamUpdateMember: 'tools.ozone.team.updateMember',
|
16288
|
+
ToolsOzoneVerificationDefs: 'tools.ozone.verification.defs',
|
16289
|
+
ToolsOzoneVerificationGrantVerifications:
|
16290
|
+
'tools.ozone.verification.grantVerifications',
|
16291
|
+
ToolsOzoneVerificationListVerifications:
|
16292
|
+
'tools.ozone.verification.listVerifications',
|
16293
|
+
ToolsOzoneVerificationRevokeVerifications:
|
16294
|
+
'tools.ozone.verification.revokeVerifications',
|
15923
16295
|
} as const
|
@@ -26,6 +26,8 @@ export interface OutputSchema {
|
|
26
26
|
blobDivert?: ServiceConfig
|
27
27
|
chat?: ServiceConfig
|
28
28
|
viewer?: ViewerConfig
|
29
|
+
/** The did of the verifier used for verification. */
|
30
|
+
verifierDid?: string
|
29
31
|
}
|
30
32
|
|
31
33
|
export type HandlerInput = undefined
|
@@ -75,6 +77,7 @@ export interface ViewerConfig {
|
|
75
77
|
| 'tools.ozone.team.defs#roleAdmin'
|
76
78
|
| 'tools.ozone.team.defs#roleModerator'
|
77
79
|
| 'tools.ozone.team.defs#roleTriage'
|
80
|
+
| 'tools.ozone.team.defs#roleVerifier'
|
78
81
|
| (string & {})
|
79
82
|
}
|
80
83
|
|
@@ -26,6 +26,7 @@ export interface Option {
|
|
26
26
|
| 'tools.ozone.team.defs#roleModerator'
|
27
27
|
| 'tools.ozone.team.defs#roleTriage'
|
28
28
|
| 'tools.ozone.team.defs#roleAdmin'
|
29
|
+
| 'tools.ozone.team.defs#roleVerifier'
|
29
30
|
| (string & {})
|
30
31
|
scope: 'instance' | 'personal' | (string & {})
|
31
32
|
createdBy: string
|
@@ -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
|
+
}
|