@atproto/pds 0.4.132 → 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.
Files changed (67) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/lexicon/index.d.ts +19 -0
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +56 -1
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +976 -80
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +485 -1
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/chat/bsky/actor/defs.d.ts +1 -1
  11. package/dist/lexicon/types/chat/bsky/actor/defs.d.ts.map +1 -1
  12. package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.d.ts +81 -0
  13. package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.d.ts.map +1 -0
  14. package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.js +61 -0
  15. package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.js.map +1 -0
  16. package/dist/lexicon/types/tools/ozone/server/getConfig.d.ts +3 -1
  17. package/dist/lexicon/types/tools/ozone/server/getConfig.d.ts.map +1 -1
  18. package/dist/lexicon/types/tools/ozone/server/getConfig.js.map +1 -1
  19. package/dist/lexicon/types/tools/ozone/setting/defs.d.ts +1 -1
  20. package/dist/lexicon/types/tools/ozone/setting/defs.d.ts.map +1 -1
  21. package/dist/lexicon/types/tools/ozone/setting/defs.js.map +1 -1
  22. package/dist/lexicon/types/tools/ozone/setting/upsertOption.d.ts +1 -1
  23. package/dist/lexicon/types/tools/ozone/setting/upsertOption.d.ts.map +1 -1
  24. package/dist/lexicon/types/tools/ozone/team/addMember.d.ts +1 -1
  25. package/dist/lexicon/types/tools/ozone/team/addMember.d.ts.map +1 -1
  26. package/dist/lexicon/types/tools/ozone/team/defs.d.ts +3 -1
  27. package/dist/lexicon/types/tools/ozone/team/defs.d.ts.map +1 -1
  28. package/dist/lexicon/types/tools/ozone/team/defs.js +3 -1
  29. package/dist/lexicon/types/tools/ozone/team/defs.js.map +1 -1
  30. package/dist/lexicon/types/tools/ozone/team/updateMember.d.ts +1 -1
  31. package/dist/lexicon/types/tools/ozone/team/updateMember.d.ts.map +1 -1
  32. package/dist/lexicon/types/tools/ozone/verification/defs.d.ts +43 -0
  33. package/dist/lexicon/types/tools/ozone/verification/defs.d.ts.map +1 -0
  34. package/dist/lexicon/types/tools/ozone/verification/defs.js +16 -0
  35. package/dist/lexicon/types/tools/ozone/verification/defs.js.map +1 -0
  36. package/dist/lexicon/types/tools/ozone/verification/grantVerifications.d.ts +66 -0
  37. package/dist/lexicon/types/tools/ozone/verification/grantVerifications.d.ts.map +1 -0
  38. package/dist/lexicon/types/tools/ozone/verification/grantVerifications.js +25 -0
  39. package/dist/lexicon/types/tools/ozone/verification/grantVerifications.js.map +1 -0
  40. package/dist/lexicon/types/tools/ozone/verification/listVerifications.d.ts +52 -0
  41. package/dist/lexicon/types/tools/ozone/verification/listVerifications.d.ts.map +1 -0
  42. package/dist/lexicon/types/tools/ozone/verification/listVerifications.js +7 -0
  43. package/dist/lexicon/types/tools/ozone/verification/listVerifications.js.map +1 -0
  44. package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.d.ts +56 -0
  45. package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.d.ts.map +1 -0
  46. package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.js +16 -0
  47. package/dist/lexicon/types/tools/ozone/verification/revokeVerifications.js.map +1 -0
  48. package/dist/pipethrough.js +3 -0
  49. package/dist/pipethrough.js.map +1 -1
  50. package/package.json +7 -7
  51. package/src/lexicon/index.ts +69 -0
  52. package/src/lexicon/lexicons.ts +505 -1
  53. package/src/lexicon/types/chat/bsky/actor/defs.ts +1 -1
  54. package/src/lexicon/types/tools/ozone/hosting/getAccountHistory.ts +161 -0
  55. package/src/lexicon/types/tools/ozone/server/getConfig.ts +3 -0
  56. package/src/lexicon/types/tools/ozone/setting/defs.ts +1 -0
  57. package/src/lexicon/types/tools/ozone/setting/upsertOption.ts +1 -0
  58. package/src/lexicon/types/tools/ozone/team/addMember.ts +1 -0
  59. package/src/lexicon/types/tools/ozone/team/defs.ts +3 -0
  60. package/src/lexicon/types/tools/ozone/team/updateMember.ts +1 -0
  61. package/src/lexicon/types/tools/ozone/verification/defs.ts +59 -0
  62. package/src/lexicon/types/tools/ozone/verification/grantVerifications.ts +100 -0
  63. package/src/lexicon/types/tools/ozone/verification/listVerifications.ts +70 -0
  64. package/src/lexicon/types/tools/ozone/verification/revokeVerifications.ts +81 -0
  65. package/src/pipethrough.ts +3 -0
  66. package/tests/proxied/views.test.ts +53 -53
  67. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,161 @@
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.hosting.getAccountHistory'
18
+
19
+ export interface QueryParams {
20
+ did: string
21
+ events?:
22
+ | 'accountCreated'
23
+ | 'emailUpdated'
24
+ | 'emailConfirmed'
25
+ | 'passwordUpdated'
26
+ | 'handleUpdated'
27
+ | (string & {})[]
28
+ cursor?: string
29
+ limit: number
30
+ }
31
+
32
+ export type InputSchema = undefined
33
+
34
+ export interface OutputSchema {
35
+ cursor?: string
36
+ events: Event[]
37
+ }
38
+
39
+ export type HandlerInput = undefined
40
+
41
+ export interface HandlerSuccess {
42
+ encoding: 'application/json'
43
+ body: OutputSchema
44
+ headers?: { [key: string]: string }
45
+ }
46
+
47
+ export interface HandlerError {
48
+ status: number
49
+ message?: string
50
+ }
51
+
52
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
53
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
54
+ auth: HA
55
+ params: QueryParams
56
+ input: HandlerInput
57
+ req: express.Request
58
+ res: express.Response
59
+ resetRouteRateLimits: () => Promise<void>
60
+ }
61
+ export type Handler<HA extends HandlerAuth = never> = (
62
+ ctx: HandlerReqCtx<HA>,
63
+ ) => Promise<HandlerOutput> | HandlerOutput
64
+
65
+ export interface Event {
66
+ $type?: 'tools.ozone.hosting.getAccountHistory#event'
67
+ details:
68
+ | $Typed<AccountCreated>
69
+ | $Typed<EmailUpdated>
70
+ | $Typed<EmailConfirmed>
71
+ | $Typed<PasswordUpdated>
72
+ | $Typed<HandleUpdated>
73
+ | { $type: string }
74
+ createdBy: string
75
+ createdAt: string
76
+ }
77
+
78
+ const hashEvent = 'event'
79
+
80
+ export function isEvent<V>(v: V) {
81
+ return is$typed(v, id, hashEvent)
82
+ }
83
+
84
+ export function validateEvent<V>(v: V) {
85
+ return validate<Event & V>(v, id, hashEvent)
86
+ }
87
+
88
+ export interface AccountCreated {
89
+ $type?: 'tools.ozone.hosting.getAccountHistory#accountCreated'
90
+ email?: string
91
+ handle?: string
92
+ }
93
+
94
+ const hashAccountCreated = 'accountCreated'
95
+
96
+ export function isAccountCreated<V>(v: V) {
97
+ return is$typed(v, id, hashAccountCreated)
98
+ }
99
+
100
+ export function validateAccountCreated<V>(v: V) {
101
+ return validate<AccountCreated & V>(v, id, hashAccountCreated)
102
+ }
103
+
104
+ export interface EmailUpdated {
105
+ $type?: 'tools.ozone.hosting.getAccountHistory#emailUpdated'
106
+ email: string
107
+ }
108
+
109
+ const hashEmailUpdated = 'emailUpdated'
110
+
111
+ export function isEmailUpdated<V>(v: V) {
112
+ return is$typed(v, id, hashEmailUpdated)
113
+ }
114
+
115
+ export function validateEmailUpdated<V>(v: V) {
116
+ return validate<EmailUpdated & V>(v, id, hashEmailUpdated)
117
+ }
118
+
119
+ export interface EmailConfirmed {
120
+ $type?: 'tools.ozone.hosting.getAccountHistory#emailConfirmed'
121
+ email: string
122
+ }
123
+
124
+ const hashEmailConfirmed = 'emailConfirmed'
125
+
126
+ export function isEmailConfirmed<V>(v: V) {
127
+ return is$typed(v, id, hashEmailConfirmed)
128
+ }
129
+
130
+ export function validateEmailConfirmed<V>(v: V) {
131
+ return validate<EmailConfirmed & V>(v, id, hashEmailConfirmed)
132
+ }
133
+
134
+ export interface PasswordUpdated {
135
+ $type?: 'tools.ozone.hosting.getAccountHistory#passwordUpdated'
136
+ }
137
+
138
+ const hashPasswordUpdated = 'passwordUpdated'
139
+
140
+ export function isPasswordUpdated<V>(v: V) {
141
+ return is$typed(v, id, hashPasswordUpdated)
142
+ }
143
+
144
+ export function validatePasswordUpdated<V>(v: V) {
145
+ return validate<PasswordUpdated & V>(v, id, hashPasswordUpdated)
146
+ }
147
+
148
+ export interface HandleUpdated {
149
+ $type?: 'tools.ozone.hosting.getAccountHistory#handleUpdated'
150
+ handle: string
151
+ }
152
+
153
+ const hashHandleUpdated = 'handleUpdated'
154
+
155
+ export function isHandleUpdated<V>(v: V) {
156
+ return is$typed(v, id, hashHandleUpdated)
157
+ }
158
+
159
+ export function validateHandleUpdated<V>(v: V) {
160
+ return validate<HandleUpdated & V>(v, id, hashHandleUpdated)
161
+ }
@@ -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 InputSchema {
27
27
  managerRole?:
28
28
  | 'tools.ozone.team.defs#roleModerator'
29
29
  | 'tools.ozone.team.defs#roleTriage'
30
+ | 'tools.ozone.team.defs#roleVerifier'
30
31
  | 'tools.ozone.team.defs#roleAdmin'
31
32
  | (string & {})
32
33
  }
@@ -24,6 +24,7 @@ export interface InputSchema {
24
24
  role:
25
25
  | 'tools.ozone.team.defs#roleAdmin'
26
26
  | 'tools.ozone.team.defs#roleModerator'
27
+ | 'tools.ozone.team.defs#roleVerifier'
27
28
  | 'tools.ozone.team.defs#roleTriage'
28
29
  | (string & {})
29
30
  }
@@ -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`
@@ -25,6 +25,7 @@ export interface InputSchema {
25
25
  role?:
26
26
  | 'tools.ozone.team.defs#roleAdmin'
27
27
  | 'tools.ozone.team.defs#roleModerator'
28
+ | 'tools.ozone.team.defs#roleVerifier'
28
29
  | 'tools.ozone.team.defs#roleTriage'
29
30
  | (string & {})
30
31
  }
@@ -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
+ }
@@ -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