@atproto/ozone 0.1.106 → 0.1.108
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 +20 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +6 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/proxied.d.ts.map +1 -1
- package/dist/api/proxied.js +29 -16
- package/dist/api/proxied.js.map +1 -1
- package/dist/api/server/getConfig.d.ts.map +1 -1
- package/dist/api/server/getConfig.js +1 -0
- package/dist/api/server/getConfig.js.map +1 -1
- package/dist/api/setting/removeOptions.d.ts.map +1 -1
- package/dist/api/setting/removeOptions.js +1 -0
- package/dist/api/setting/removeOptions.js.map +1 -1
- package/dist/api/setting/upsertOption.js +7 -0
- package/dist/api/setting/upsertOption.js.map +1 -1
- package/dist/api/util.d.ts +1 -1
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +6 -1
- package/dist/api/util.js.map +1 -1
- package/dist/api/verification/grantVerifications.d.ts +4 -0
- package/dist/api/verification/grantVerifications.d.ts.map +1 -0
- package/dist/api/verification/grantVerifications.js +52 -0
- package/dist/api/verification/grantVerifications.js.map +1 -0
- package/dist/api/verification/listVerifications.d.ts +4 -0
- package/dist/api/verification/listVerifications.d.ts.map +1 -0
- package/dist/api/verification/listVerifications.js +32 -0
- package/dist/api/verification/listVerifications.js.map +1 -0
- package/dist/api/verification/revokeVerifications.d.ts +4 -0
- package/dist/api/verification/revokeVerifications.d.ts.map +1 -0
- package/dist/api/verification/revokeVerifications.js +36 -0
- package/dist/api/verification/revokeVerifications.js.map +1 -0
- package/dist/auth-verifier.d.ts +4 -1
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +4 -3
- package/dist/auth-verifier.js.map +1 -1
- package/dist/background.d.ts +3 -1
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +3 -2
- package/dist/background.js.map +1 -1
- package/dist/config/config.d.ts +9 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +10 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/env.d.ts +5 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +5 -0
- package/dist/config/env.js.map +1 -1
- package/dist/context.d.ts +6 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +12 -0
- package/dist/context.js.map +1 -1
- package/dist/daemon/context.d.ts +3 -0
- package/dist/daemon/context.d.ts.map +1 -1
- package/dist/daemon/context.js +11 -0
- package/dist/daemon/context.js.map +1 -1
- package/dist/daemon/verification-listener.d.ts +29 -0
- package/dist/daemon/verification-listener.d.ts.map +1 -0
- package/dist/daemon/verification-listener.js +171 -0
- package/dist/daemon/verification-listener.js.map +1 -0
- package/dist/db/migrations/20250415T201720309Z-verification.d.ts +4 -0
- package/dist/db/migrations/20250415T201720309Z-verification.d.ts.map +1 -0
- package/dist/db/migrations/20250415T201720309Z-verification.js +35 -0
- package/dist/db/migrations/20250415T201720309Z-verification.js.map +1 -0
- package/dist/db/migrations/20250417T201720309Z-firehose-cursor.d.ts +4 -0
- package/dist/db/migrations/20250417T201720309Z-firehose-cursor.d.ts.map +1 -0
- package/dist/db/migrations/20250417T201720309Z-firehose-cursor.js +17 -0
- package/dist/db/migrations/20250417T201720309Z-firehose-cursor.js.map +1 -0
- package/dist/db/migrations/index.d.ts +2 -0
- package/dist/db/migrations/index.d.ts.map +1 -1
- package/dist/db/migrations/index.js +3 -1
- package/dist/db/migrations/index.js.map +1 -1
- package/dist/db/pagination.d.ts +15 -0
- package/dist/db/pagination.d.ts.map +1 -1
- package/dist/db/pagination.js +23 -1
- package/dist/db/pagination.js.map +1 -1
- package/dist/db/schema/firehose_cursor.d.ts +11 -0
- package/dist/db/schema/firehose_cursor.d.ts.map +1 -0
- package/dist/db/schema/firehose_cursor.js +5 -0
- package/dist/db/schema/firehose_cursor.js.map +1 -0
- package/dist/db/schema/index.d.ts +3 -1
- package/dist/db/schema/index.d.ts.map +1 -1
- package/dist/db/schema/member.d.ts +1 -1
- package/dist/db/schema/member.d.ts.map +1 -1
- package/dist/db/schema/verification.d.ts +19 -0
- package/dist/db/schema/verification.d.ts.map +1 -0
- package/dist/db/schema/verification.js +5 -0
- package/dist/db/schema/verification.js.map +1 -0
- package/dist/jetstream/service.d.ts +64 -0
- package/dist/jetstream/service.d.ts.map +1 -0
- package/dist/jetstream/service.js +65 -0
- package/dist/jetstream/service.js.map +1 -0
- package/dist/lexicon/index.d.ts +19 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +56 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +976 -80
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +485 -1
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/actor/defs.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.d.ts +81 -0
- package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.js +61 -0
- package/dist/lexicon/types/tools/ozone/hosting/getAccountHistory.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/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/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +58 -21
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/status.d.ts +6 -0
- package/dist/mod-service/status.d.ts.map +1 -1
- package/dist/team/index.d.ts +1 -0
- package/dist/team/index.d.ts.map +1 -1
- package/dist/team/index.js +3 -0
- package/dist/team/index.js.map +1 -1
- package/dist/verification/issuer.d.ts +37 -0
- package/dist/verification/issuer.d.ts.map +1 -0
- package/dist/verification/issuer.js +119 -0
- package/dist/verification/issuer.js.map +1 -0
- package/dist/verification/service.d.ts +47 -0
- package/dist/verification/service.d.ts.map +1 -0
- package/dist/verification/service.js +141 -0
- package/dist/verification/service.js.map +1 -0
- package/dist/verification/util.d.ts +6 -0
- package/dist/verification/util.d.ts.map +1 -0
- package/dist/verification/util.js +32 -0
- package/dist/verification/util.js.map +1 -0
- package/package.json +5 -4
- package/src/api/index.ts +6 -0
- package/src/api/proxied.ts +39 -24
- package/src/api/server/getConfig.ts +1 -0
- package/src/api/setting/removeOptions.ts +1 -0
- package/src/api/setting/upsertOption.ts +7 -0
- package/src/api/util.ts +7 -1
- package/src/api/verification/grantVerifications.ts +74 -0
- package/src/api/verification/listVerifications.ts +44 -0
- package/src/api/verification/revokeVerifications.ts +43 -0
- package/src/auth-verifier.ts +8 -4
- package/src/background.ts +7 -2
- package/src/config/config.ts +21 -0
- package/src/config/env.ts +10 -0
- package/src/context.ts +22 -0
- package/src/daemon/context.ts +19 -0
- package/src/daemon/verification-listener.ts +164 -0
- package/src/db/migrations/20250415T201720309Z-verification.ts +34 -0
- package/src/db/migrations/20250417T201720309Z-firehose-cursor.ts +16 -0
- package/src/db/migrations/index.ts +2 -0
- package/src/db/pagination.ts +31 -0
- package/src/db/schema/firehose_cursor.ts +13 -0
- package/src/db/schema/index.ts +5 -1
- package/src/db/schema/member.ts +1 -0
- package/src/db/schema/verification.ts +21 -0
- package/src/jetstream/service.ts +110 -0
- package/src/lexicon/index.ts +69 -0
- package/src/lexicon/lexicons.ts +505 -1
- package/src/lexicon/types/chat/bsky/actor/defs.ts +1 -1
- package/src/lexicon/types/tools/ozone/hosting/getAccountHistory.ts +161 -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/logger.ts +2 -0
- package/src/mod-service/index.ts +83 -30
- package/src/team/index.ts +4 -0
- package/src/verification/issuer.ts +135 -0
- package/src/verification/service.ts +208 -0
- package/src/verification/util.ts +50 -0
- package/tests/__snapshots__/verification-listener.test.ts.snap +146 -0
- package/tests/__snapshots__/verification.test.ts.snap +288 -0
- package/tests/get-reporter-stats.test.ts +24 -9
- package/tests/verification-listener.test.ts +102 -0
- package/tests/verification.test.ts +136 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
package/src/db/pagination.ts
CHANGED
|
@@ -173,6 +173,37 @@ export class TimeIdKeyset extends GenericKeyset<TimeIdKeysetParam, Cursor> {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
type CreatedAtUriKeysetParam = {
|
|
177
|
+
createdAt: string
|
|
178
|
+
uri: string
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export class CreatedAtUriKeyset extends GenericKeyset<
|
|
182
|
+
CreatedAtUriKeysetParam,
|
|
183
|
+
Cursor
|
|
184
|
+
> {
|
|
185
|
+
labelResult(result: CreatedAtUriKeysetParam): Cursor
|
|
186
|
+
labelResult(result: CreatedAtUriKeysetParam) {
|
|
187
|
+
return { primary: result.createdAt, secondary: result.uri }
|
|
188
|
+
}
|
|
189
|
+
labeledResultToCursor(labeled: Cursor) {
|
|
190
|
+
return {
|
|
191
|
+
primary: new Date(labeled.primary).getTime().toString(),
|
|
192
|
+
secondary: labeled.secondary,
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
cursorToLabeledResult(cursor: Cursor) {
|
|
196
|
+
const primaryDate = new Date(parseInt(cursor.primary, 10))
|
|
197
|
+
if (isNaN(primaryDate.getTime())) {
|
|
198
|
+
throw new InvalidRequestError('Malformed cursor')
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
primary: primaryDate.toISOString(),
|
|
202
|
+
secondary: cursor.secondary,
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
176
207
|
export const paginate = <
|
|
177
208
|
QB extends AnyQb,
|
|
178
209
|
K extends GenericKeyset<unknown, any>,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Generated } from 'kysely'
|
|
2
|
+
|
|
3
|
+
export const firehoseCursorTableName = 'firehose_cursor'
|
|
4
|
+
|
|
5
|
+
export interface FirehoseCursor {
|
|
6
|
+
service: string
|
|
7
|
+
cursor: number | null
|
|
8
|
+
updatedAt: Generated<string>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type PartialDB = {
|
|
12
|
+
[firehoseCursorTableName]: FirehoseCursor
|
|
13
|
+
}
|
package/src/db/schema/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as accountRecordEventsStats from './account_record_events_stats'
|
|
|
4
4
|
import * as accountRecordStatusStats from './account_record_status_stats'
|
|
5
5
|
import * as blobPushEvent from './blob_push_event'
|
|
6
6
|
import * as communicationTemplate from './communication_template'
|
|
7
|
+
import * as firehoseCursor from './firehose_cursor'
|
|
7
8
|
import * as label from './label'
|
|
8
9
|
import * as member from './member'
|
|
9
10
|
import * as modEvent from './moderation_event'
|
|
@@ -14,6 +15,7 @@ import * as recordPushEvent from './record_push_event'
|
|
|
14
15
|
import * as repoPushEvent from './repo_push_event'
|
|
15
16
|
import * as setting from './setting'
|
|
16
17
|
import * as signingKey from './signing_key'
|
|
18
|
+
import * as verification from './verification'
|
|
17
19
|
|
|
18
20
|
export type DatabaseSchemaType = modEvent.PartialDB &
|
|
19
21
|
modSubjectStatus.PartialDB &
|
|
@@ -29,7 +31,9 @@ export type DatabaseSchemaType = modEvent.PartialDB &
|
|
|
29
31
|
accountEventsStats.PartialDB &
|
|
30
32
|
recordEventsStats.PartialDB &
|
|
31
33
|
accountRecordEventsStats.PartialDB &
|
|
32
|
-
accountRecordStatusStats.PartialDB
|
|
34
|
+
accountRecordStatusStats.PartialDB &
|
|
35
|
+
verification.PartialDB &
|
|
36
|
+
firehoseCursor.PartialDB
|
|
33
37
|
|
|
34
38
|
export type DatabaseSchema = Kysely<DatabaseSchemaType>
|
|
35
39
|
|
package/src/db/schema/member.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Generated } from 'kysely'
|
|
2
|
+
|
|
3
|
+
export const verificationTableName = 'verification'
|
|
4
|
+
|
|
5
|
+
export interface Verification {
|
|
6
|
+
uri: string
|
|
7
|
+
cid: string
|
|
8
|
+
issuer: string
|
|
9
|
+
subject: string
|
|
10
|
+
handle: string
|
|
11
|
+
displayName: string
|
|
12
|
+
revokeReason: string | null
|
|
13
|
+
revokedBy: string | null
|
|
14
|
+
revokedAt: string | null
|
|
15
|
+
createdAt: string
|
|
16
|
+
updatedAt: Generated<string>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type PartialDB = {
|
|
20
|
+
[verificationTableName]: Verification
|
|
21
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { WebSocketKeepAlive } from '@atproto/xrpc-server'
|
|
2
|
+
|
|
3
|
+
type JetstreamRecord = Record<string, unknown>
|
|
4
|
+
type OnCreateCallback<T extends JetstreamRecord> = (
|
|
5
|
+
e: CommitCreateEvent<T>,
|
|
6
|
+
) => Promise<void>
|
|
7
|
+
|
|
8
|
+
export type JetstreamOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* The full subscription endpoint to connect to.
|
|
11
|
+
* @default "wss://jetstream1.us-east.bsky.network/subscribe"
|
|
12
|
+
*/
|
|
13
|
+
endpoint?: string
|
|
14
|
+
/**
|
|
15
|
+
* The record collections that you want to receive updates for.
|
|
16
|
+
* Leave this empty to receive updates for all record collections.
|
|
17
|
+
*/
|
|
18
|
+
wantedCollections?: string[]
|
|
19
|
+
/**
|
|
20
|
+
* The DIDs that you want to receive updates for.
|
|
21
|
+
* Leave this empty to receive updates for all DIDs.
|
|
22
|
+
*/
|
|
23
|
+
wantedDids?: string[]
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The Unix timestamp in microseconds that you want to receive updates from.
|
|
27
|
+
*/
|
|
28
|
+
cursor?: number
|
|
29
|
+
}
|
|
30
|
+
export type EventBase = {
|
|
31
|
+
did: string
|
|
32
|
+
time_us: number
|
|
33
|
+
// @TODO: Limited to just commit events for now
|
|
34
|
+
kind: 'commit'
|
|
35
|
+
}
|
|
36
|
+
export type CommitBase = {
|
|
37
|
+
collection: string
|
|
38
|
+
rkey: string
|
|
39
|
+
cid: string
|
|
40
|
+
}
|
|
41
|
+
export interface CommitCreateEvent<RecordType extends JetstreamRecord>
|
|
42
|
+
extends EventBase {
|
|
43
|
+
kind: 'commit'
|
|
44
|
+
commit: {
|
|
45
|
+
operation: 'create'
|
|
46
|
+
record: RecordType
|
|
47
|
+
} & CommitBase
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface CommitDeleteEvent extends EventBase {
|
|
51
|
+
kind: 'commit'
|
|
52
|
+
commit: {
|
|
53
|
+
operation: 'delete'
|
|
54
|
+
} & CommitBase
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class Jetstream {
|
|
58
|
+
public ws?: WebSocketKeepAlive
|
|
59
|
+
public url: URL
|
|
60
|
+
/** The current cursor. */
|
|
61
|
+
public cursor?: number
|
|
62
|
+
|
|
63
|
+
constructor(opts: JetstreamOptions) {
|
|
64
|
+
this.url = new URL(
|
|
65
|
+
opts.endpoint ?? 'wss://jetstream1.us-east.bsky.network/subscribe',
|
|
66
|
+
)
|
|
67
|
+
opts.wantedCollections?.forEach((collection) => {
|
|
68
|
+
this.url.searchParams.append('wantedCollections', collection)
|
|
69
|
+
})
|
|
70
|
+
opts.wantedDids?.forEach((did) => {
|
|
71
|
+
this.url.searchParams.append('wantedDids', did)
|
|
72
|
+
})
|
|
73
|
+
if (opts.cursor) this.cursor = opts.cursor
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async start(options: {
|
|
77
|
+
onCreate?: Record<string, OnCreateCallback<any>>
|
|
78
|
+
onDelete?: Record<string, (e: CommitDeleteEvent) => Promise<void>>
|
|
79
|
+
}) {
|
|
80
|
+
this.ws = new WebSocketKeepAlive({
|
|
81
|
+
getUrl: async () => {
|
|
82
|
+
if (this.cursor)
|
|
83
|
+
this.url.searchParams.set('cursor', this.cursor.toString())
|
|
84
|
+
return this.url.toString()
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
for await (const message of this.ws) {
|
|
89
|
+
const parsedMessage = JSON.parse(message.toString())
|
|
90
|
+
if (parsedMessage.kind === 'commit') {
|
|
91
|
+
const { collection, operation, record } = parsedMessage.commit || {}
|
|
92
|
+
|
|
93
|
+
if (operation === 'create') {
|
|
94
|
+
options.onCreate?.[collection]?.(
|
|
95
|
+
parsedMessage as CommitCreateEvent<typeof record>,
|
|
96
|
+
)
|
|
97
|
+
} else if (operation === 'delete') {
|
|
98
|
+
options.onDelete?.[collection]?.(parsedMessage as CommitDeleteEvent)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Closes the WebSocket connection.
|
|
106
|
+
*/
|
|
107
|
+
close() {
|
|
108
|
+
this.ws?.ws?.close()
|
|
109
|
+
}
|
|
110
|
+
}
|
package/src/lexicon/index.ts
CHANGED
|
@@ -188,6 +188,7 @@ import * as ToolsOzoneCommunicationCreateTemplate from './types/tools/ozone/comm
|
|
|
188
188
|
import * as ToolsOzoneCommunicationDeleteTemplate from './types/tools/ozone/communication/deleteTemplate.js'
|
|
189
189
|
import * as ToolsOzoneCommunicationListTemplates from './types/tools/ozone/communication/listTemplates.js'
|
|
190
190
|
import * as ToolsOzoneCommunicationUpdateTemplate from './types/tools/ozone/communication/updateTemplate.js'
|
|
191
|
+
import * as ToolsOzoneHostingGetAccountHistory from './types/tools/ozone/hosting/getAccountHistory.js'
|
|
191
192
|
import * as ToolsOzoneModerationEmitEvent from './types/tools/ozone/moderation/emitEvent.js'
|
|
192
193
|
import * as ToolsOzoneModerationGetEvent from './types/tools/ozone/moderation/getEvent.js'
|
|
193
194
|
import * as ToolsOzoneModerationGetRecord from './types/tools/ozone/moderation/getRecord.js'
|
|
@@ -216,6 +217,9 @@ import * as ToolsOzoneTeamAddMember from './types/tools/ozone/team/addMember.js'
|
|
|
216
217
|
import * as ToolsOzoneTeamDeleteMember from './types/tools/ozone/team/deleteMember.js'
|
|
217
218
|
import * as ToolsOzoneTeamListMembers from './types/tools/ozone/team/listMembers.js'
|
|
218
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'
|
|
219
223
|
|
|
220
224
|
export const COM_ATPROTO_MODERATION = {
|
|
221
225
|
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
|
|
@@ -257,6 +261,7 @@ export const TOOLS_OZONE_TEAM = {
|
|
|
257
261
|
DefsRoleAdmin: 'tools.ozone.team.defs#roleAdmin',
|
|
258
262
|
DefsRoleModerator: 'tools.ozone.team.defs#roleModerator',
|
|
259
263
|
DefsRoleTriage: 'tools.ozone.team.defs#roleTriage',
|
|
264
|
+
DefsRoleVerifier: 'tools.ozone.team.defs#roleVerifier',
|
|
260
265
|
}
|
|
261
266
|
|
|
262
267
|
export function createServer(options?: XrpcOptions): Server {
|
|
@@ -2487,22 +2492,26 @@ export class ToolsNS {
|
|
|
2487
2492
|
export class ToolsOzoneNS {
|
|
2488
2493
|
_server: Server
|
|
2489
2494
|
communication: ToolsOzoneCommunicationNS
|
|
2495
|
+
hosting: ToolsOzoneHostingNS
|
|
2490
2496
|
moderation: ToolsOzoneModerationNS
|
|
2491
2497
|
server: ToolsOzoneServerNS
|
|
2492
2498
|
set: ToolsOzoneSetNS
|
|
2493
2499
|
setting: ToolsOzoneSettingNS
|
|
2494
2500
|
signature: ToolsOzoneSignatureNS
|
|
2495
2501
|
team: ToolsOzoneTeamNS
|
|
2502
|
+
verification: ToolsOzoneVerificationNS
|
|
2496
2503
|
|
|
2497
2504
|
constructor(server: Server) {
|
|
2498
2505
|
this._server = server
|
|
2499
2506
|
this.communication = new ToolsOzoneCommunicationNS(server)
|
|
2507
|
+
this.hosting = new ToolsOzoneHostingNS(server)
|
|
2500
2508
|
this.moderation = new ToolsOzoneModerationNS(server)
|
|
2501
2509
|
this.server = new ToolsOzoneServerNS(server)
|
|
2502
2510
|
this.set = new ToolsOzoneSetNS(server)
|
|
2503
2511
|
this.setting = new ToolsOzoneSettingNS(server)
|
|
2504
2512
|
this.signature = new ToolsOzoneSignatureNS(server)
|
|
2505
2513
|
this.team = new ToolsOzoneTeamNS(server)
|
|
2514
|
+
this.verification = new ToolsOzoneVerificationNS(server)
|
|
2506
2515
|
}
|
|
2507
2516
|
}
|
|
2508
2517
|
|
|
@@ -2558,6 +2567,25 @@ export class ToolsOzoneCommunicationNS {
|
|
|
2558
2567
|
}
|
|
2559
2568
|
}
|
|
2560
2569
|
|
|
2570
|
+
export class ToolsOzoneHostingNS {
|
|
2571
|
+
_server: Server
|
|
2572
|
+
|
|
2573
|
+
constructor(server: Server) {
|
|
2574
|
+
this._server = server
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
getAccountHistory<AV extends AuthVerifier>(
|
|
2578
|
+
cfg: ConfigOf<
|
|
2579
|
+
AV,
|
|
2580
|
+
ToolsOzoneHostingGetAccountHistory.Handler<ExtractAuth<AV>>,
|
|
2581
|
+
ToolsOzoneHostingGetAccountHistory.HandlerReqCtx<ExtractAuth<AV>>
|
|
2582
|
+
>,
|
|
2583
|
+
) {
|
|
2584
|
+
const nsid = 'tools.ozone.hosting.getAccountHistory' // @ts-ignore
|
|
2585
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2561
2589
|
export class ToolsOzoneModerationNS {
|
|
2562
2590
|
_server: Server
|
|
2563
2591
|
|
|
@@ -2914,6 +2942,47 @@ export class ToolsOzoneTeamNS {
|
|
|
2914
2942
|
}
|
|
2915
2943
|
}
|
|
2916
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
|
+
|
|
2917
2986
|
type SharedRateLimitOpts<T> = {
|
|
2918
2987
|
name: string
|
|
2919
2988
|
calcKey?: (ctx: T) => string | null
|