@atproto/ozone 0.1.108 → 0.1.110
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 +24 -0
- package/LICENSE.txt +1 -1
- package/dist/api/health.js +1 -1
- package/dist/api/health.js.map +1 -1
- package/dist/api/verification/grantVerifications.d.ts.map +1 -1
- package/dist/api/verification/grantVerifications.js +9 -1
- package/dist/api/verification/grantVerifications.js.map +1 -1
- package/dist/api/well-known.d.ts.map +1 -1
- package/dist/api/well-known.js +4 -1
- package/dist/api/well-known.js.map +1 -1
- package/dist/background.js +1 -1
- package/dist/background.js.map +1 -1
- package/dist/error.js +1 -1
- package/dist/error.js.map +1 -1
- package/dist/jetstream/service.d.ts +1 -5
- package/dist/jetstream/service.d.ts.map +1 -1
- package/dist/jetstream/service.js +1 -1
- package/dist/jetstream/service.js.map +1 -1
- package/dist/lexicon/index.d.ts +5 -2
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +8 -5
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +288 -82
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +146 -42
- 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/app/bsky/unspecced/getConfig.d.ts +9 -0
- package/dist/lexicon/types/app/bsky/unspecced/getConfig.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getConfig.js +9 -0
- package/dist/lexicon/types/app/bsky/unspecced/getConfig.js.map +1 -1
- package/dist/mod-service/index.js +1 -1
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/views.d.ts.map +1 -1
- package/dist/mod-service/views.js +2 -0
- package/dist/mod-service/views.js.map +1 -1
- package/dist/team/index.d.ts.map +1 -1
- package/dist/team/index.js +2 -2
- package/dist/team/index.js.map +1 -1
- package/package.json +9 -9
- package/src/api/health.ts +1 -1
- package/src/api/verification/grantVerifications.ts +17 -1
- package/src/api/well-known.ts +4 -1
- package/src/background.ts +1 -1
- package/src/error.ts +1 -1
- package/src/jetstream/service.ts +2 -8
- package/src/lexicon/index.ts +12 -9
- package/src/lexicon/lexicons.ts +151 -43
- 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/app/bsky/unspecced/getConfig.ts +17 -0
- package/src/mod-service/index.ts +1 -1
- package/src/mod-service/views.ts +4 -0
- package/src/team/index.ts +2 -5
- package/tests/expiring-label.test.ts +72 -0
- package/tests/verification.test.ts +30 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
package/dist/team/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/team/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,QAAQ,MAAM,cAAc,CAAA;AAGnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AAC1E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,wCAAwC,CAAA;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,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catch (
|
|
163
|
-
logger_1.httpLogger.error({
|
|
162
|
+
catch (err) {
|
|
163
|
+
logger_1.httpLogger.error({ err, dids }, 'Failed to get profiles for team members');
|
|
164
164
|
}
|
|
165
165
|
return profiles;
|
|
166
166
|
}
|
package/dist/team/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/team/index.ts"],"names":[],"mappings":";;;AAEA,4CAA4C;AAC5C,sDAA0D;AAG1D,kDAAyC;AAGzC,sCAAsC;AAKtC,MAAa,WAAW;IACtB,YACS,EAAY,EACX,YAAsB,EACtB,UAAkB,EAClB,iBAGiB;QANzB;;;;mBAAO,EAAE;WAAU;QACnB;;;;mBAAQ,YAAY;WAAU;QAC9B;;;;mBAAQ,UAAU;WAAQ;QAC1B;;;;mBAAQ,iBAAiB;WAGA;IACxB,CAAC;IAEJ,MAAM,CAAC,OAAO,CACZ,YAAsB,EACtB,UAAkB,EAClB,iBAAwE;QAExE,OAAO,CAAC,EAAY,EAAE,EAAE,CACtB,IAAI,WAAW,CAAC,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAA;IACpE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EACT,MAAM,EACN,KAAK,GAAG,EAAE,EACV,KAAK,EACL,QAAQ,EACR,CAAC,GAOF;QACC,IAAI,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAA;QACzD,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;QAC7D,CAAC;QACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAC7B,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,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,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI;iBACzC,CAAC;qBACD,OAAO,EAAE,CAAA;YACd,CAAC;YAED,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QAC7B,CAAC,QAAQ,OAAO,EAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAA6B;QACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;QACtE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5B,OAAO;gBACL,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC;gBACjC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;gBACzC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;gBACzC,aAAa,EAAE,MAAM,CAAC,aAAa;aACpC,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA5QD,kCA4QC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/ozone",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.110",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Backend service for moderating the Bluesky network.",
|
|
6
6
|
"keywords": [
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"uint8arrays": "3.0.0",
|
|
36
36
|
"undici": "^6.14.1",
|
|
37
37
|
"ws": "^8.12.0",
|
|
38
|
-
"@atproto/api": "^0.15.
|
|
39
|
-
"@atproto/common": "^0.4.
|
|
38
|
+
"@atproto/api": "^0.15.7",
|
|
39
|
+
"@atproto/common": "^0.4.11",
|
|
40
40
|
"@atproto/crypto": "^0.4.4",
|
|
41
|
-
"@atproto/identity": "^0.4.
|
|
42
|
-
"@atproto/lexicon": "^0.4.10",
|
|
41
|
+
"@atproto/identity": "^0.4.8",
|
|
43
42
|
"@atproto/syntax": "^0.4.0",
|
|
44
|
-
"@atproto/
|
|
45
|
-
"@atproto/xrpc
|
|
43
|
+
"@atproto/lexicon": "^0.4.11",
|
|
44
|
+
"@atproto/xrpc": "^0.7.0",
|
|
45
|
+
"@atproto/xrpc-server": "^0.7.18"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@did-plc/server": "^0.0.1",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"jest": "^28.1.2",
|
|
55
55
|
"ts-node": "^10.8.2",
|
|
56
56
|
"typescript": "^5.6.3",
|
|
57
|
-
"@atproto/lex-cli": "^0.8.
|
|
58
|
-
"@atproto/pds": "^0.4.
|
|
57
|
+
"@atproto/lex-cli": "^0.8.1",
|
|
58
|
+
"@atproto/pds": "^0.4.137"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"codegen": "lex gen-server --yes ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
package/src/api/health.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const createRouter = (ctx: AppContext): Router => {
|
|
|
17
17
|
try {
|
|
18
18
|
await sql`select 1`.execute(ctx.db.db)
|
|
19
19
|
} catch (err) {
|
|
20
|
-
req.log.error(err, 'failed health check')
|
|
20
|
+
req.log.error({ err }, 'failed health check')
|
|
21
21
|
return res.status(503).send({ version, error: 'Service Unavailable' })
|
|
22
22
|
}
|
|
23
23
|
res.send({ version })
|
|
@@ -20,10 +20,26 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const modViews = ctx.modService(ctx.db).views
|
|
23
|
+
const profilesBefore = await modViews.getProfiles(
|
|
24
|
+
input.body.verifications.map((v) => v.subject),
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
// Filter out any subject for which, the current issuer already has a valid verification record indexed
|
|
28
|
+
const verificationsToBeGranted = input.body.verifications.filter(
|
|
29
|
+
(verificationInput) => {
|
|
30
|
+
const hasValidVerification = profilesBefore
|
|
31
|
+
.get(verificationInput.subject)
|
|
32
|
+
?.verification?.verifications.find(
|
|
33
|
+
(v) => v.issuer === ctx.cfg.verifier?.did && v.isValid,
|
|
34
|
+
)
|
|
35
|
+
return !hasValidVerification
|
|
36
|
+
},
|
|
37
|
+
)
|
|
38
|
+
|
|
23
39
|
const verificationIssuer = ctx.verificationIssuer(ctx.cfg.verifier)
|
|
24
40
|
const verificationService = ctx.verificationService(ctx.db)
|
|
25
41
|
const { grantedVerifications, failedVerifications } =
|
|
26
|
-
await verificationIssuer.verify(
|
|
42
|
+
await verificationIssuer.verify(verificationsToBeGranted)
|
|
27
43
|
|
|
28
44
|
if (!grantedVerifications.length) {
|
|
29
45
|
return {
|
package/src/api/well-known.ts
CHANGED
|
@@ -11,7 +11,10 @@ export const createRouter = (ctx: AppContext): Router => {
|
|
|
11
11
|
return res.sendStatus(404)
|
|
12
12
|
}
|
|
13
13
|
res.json({
|
|
14
|
-
'@context': [
|
|
14
|
+
'@context': [
|
|
15
|
+
'https://www.w3.org/ns/did/v1',
|
|
16
|
+
'https://w3id.org/security/multikey/v1',
|
|
17
|
+
],
|
|
15
18
|
id: ctx.cfg.service.did,
|
|
16
19
|
verificationMethod: [
|
|
17
20
|
{
|
package/src/background.ts
CHANGED
|
@@ -63,7 +63,7 @@ export class BackgroundQueue {
|
|
|
63
63
|
await task(this.db, abortController.signal)
|
|
64
64
|
} catch (err) {
|
|
65
65
|
if (!isCausedBySignal(err, abortController.signal)) {
|
|
66
|
-
dbLogger.error(err, 'background queue task failed')
|
|
66
|
+
dbLogger.error({ err }, 'background queue task failed')
|
|
67
67
|
}
|
|
68
68
|
} finally {
|
|
69
69
|
abortController.abort()
|
package/src/error.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { XRPCError } from '@atproto/xrpc-server'
|
|
|
3
3
|
import { httpLogger as log } from './logger'
|
|
4
4
|
|
|
5
5
|
export const handler: ErrorRequestHandler = (err, _req, res, next) => {
|
|
6
|
-
log.error(err, 'unexpected internal server error')
|
|
6
|
+
log.error({ err }, 'unexpected internal server error')
|
|
7
7
|
if (res.headersSent) {
|
|
8
8
|
return next(err)
|
|
9
9
|
}
|
package/src/jetstream/service.ts
CHANGED
|
@@ -6,11 +6,7 @@ type OnCreateCallback<T extends JetstreamRecord> = (
|
|
|
6
6
|
) => Promise<void>
|
|
7
7
|
|
|
8
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
|
|
9
|
+
endpoint: string
|
|
14
10
|
/**
|
|
15
11
|
* The record collections that you want to receive updates for.
|
|
16
12
|
* Leave this empty to receive updates for all record collections.
|
|
@@ -61,9 +57,7 @@ export class Jetstream {
|
|
|
61
57
|
public cursor?: number
|
|
62
58
|
|
|
63
59
|
constructor(opts: JetstreamOptions) {
|
|
64
|
-
this.url = new URL(
|
|
65
|
-
opts.endpoint ?? 'wss://jetstream1.us-east.bsky.network/subscribe',
|
|
66
|
-
)
|
|
60
|
+
this.url = new URL(opts.endpoint)
|
|
67
61
|
opts.wantedCollections?.forEach((collection) => {
|
|
68
62
|
this.url.searchParams.append('wantedCollections', collection)
|
|
69
63
|
})
|
package/src/lexicon/index.ts
CHANGED
|
@@ -108,8 +108,8 @@ import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGene
|
|
|
108
108
|
import * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton.js'
|
|
109
109
|
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes.js'
|
|
110
110
|
import * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed.js'
|
|
111
|
-
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js'
|
|
112
111
|
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
|
|
112
|
+
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js'
|
|
113
113
|
import * as AppBskyFeedGetQuotes from './types/app/bsky/feed/getQuotes.js'
|
|
114
114
|
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy.js'
|
|
115
115
|
import * as AppBskyFeedGetSuggestedFeeds from './types/app/bsky/feed/getSuggestedFeeds.js'
|
|
@@ -230,6 +230,9 @@ export const COM_ATPROTO_MODERATION = {
|
|
|
230
230
|
DefsReasonOther: 'com.atproto.moderation.defs#reasonOther',
|
|
231
231
|
DefsReasonAppeal: 'com.atproto.moderation.defs#reasonAppeal',
|
|
232
232
|
}
|
|
233
|
+
export const APP_BSKY_ACTOR = {
|
|
234
|
+
StatusLive: 'app.bsky.actor.status#live',
|
|
235
|
+
}
|
|
233
236
|
export const APP_BSKY_FEED = {
|
|
234
237
|
DefsRequestLess: 'app.bsky.feed.defs#requestLess',
|
|
235
238
|
DefsRequestMore: 'app.bsky.feed.defs#requestMore',
|
|
@@ -1544,25 +1547,25 @@ export class AppBskyFeedNS {
|
|
|
1544
1547
|
return this._server.xrpc.method(nsid, cfg)
|
|
1545
1548
|
}
|
|
1546
1549
|
|
|
1547
|
-
|
|
1550
|
+
getPosts<AV extends AuthVerifier>(
|
|
1548
1551
|
cfg: ConfigOf<
|
|
1549
1552
|
AV,
|
|
1550
|
-
|
|
1551
|
-
|
|
1553
|
+
AppBskyFeedGetPosts.Handler<ExtractAuth<AV>>,
|
|
1554
|
+
AppBskyFeedGetPosts.HandlerReqCtx<ExtractAuth<AV>>
|
|
1552
1555
|
>,
|
|
1553
1556
|
) {
|
|
1554
|
-
const nsid = 'app.bsky.feed.
|
|
1557
|
+
const nsid = 'app.bsky.feed.getPosts' // @ts-ignore
|
|
1555
1558
|
return this._server.xrpc.method(nsid, cfg)
|
|
1556
1559
|
}
|
|
1557
1560
|
|
|
1558
|
-
|
|
1561
|
+
getPostThread<AV extends AuthVerifier>(
|
|
1559
1562
|
cfg: ConfigOf<
|
|
1560
1563
|
AV,
|
|
1561
|
-
|
|
1562
|
-
|
|
1564
|
+
AppBskyFeedGetPostThread.Handler<ExtractAuth<AV>>,
|
|
1565
|
+
AppBskyFeedGetPostThread.HandlerReqCtx<ExtractAuth<AV>>
|
|
1563
1566
|
>,
|
|
1564
1567
|
) {
|
|
1565
|
-
const nsid = 'app.bsky.feed.
|
|
1568
|
+
const nsid = 'app.bsky.feed.getPostThread' // @ts-ignore
|
|
1566
1569
|
return this._server.xrpc.method(nsid, cfg)
|
|
1567
1570
|
}
|
|
1568
1571
|
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -4568,6 +4568,10 @@ export const schemaDict = {
|
|
|
4568
4568
|
type: 'ref',
|
|
4569
4569
|
ref: 'lex:app.bsky.actor.defs#verificationState',
|
|
4570
4570
|
},
|
|
4571
|
+
status: {
|
|
4572
|
+
type: 'ref',
|
|
4573
|
+
ref: 'lex:app.bsky.actor.defs#statusView',
|
|
4574
|
+
},
|
|
4571
4575
|
},
|
|
4572
4576
|
},
|
|
4573
4577
|
profileView: {
|
|
@@ -4623,6 +4627,10 @@ export const schemaDict = {
|
|
|
4623
4627
|
type: 'ref',
|
|
4624
4628
|
ref: 'lex:app.bsky.actor.defs#verificationState',
|
|
4625
4629
|
},
|
|
4630
|
+
status: {
|
|
4631
|
+
type: 'ref',
|
|
4632
|
+
ref: 'lex:app.bsky.actor.defs#statusView',
|
|
4633
|
+
},
|
|
4626
4634
|
},
|
|
4627
4635
|
},
|
|
4628
4636
|
profileViewDetailed: {
|
|
@@ -4699,6 +4707,10 @@ export const schemaDict = {
|
|
|
4699
4707
|
type: 'ref',
|
|
4700
4708
|
ref: 'lex:app.bsky.actor.defs#verificationState',
|
|
4701
4709
|
},
|
|
4710
|
+
status: {
|
|
4711
|
+
type: 'ref',
|
|
4712
|
+
ref: 'lex:app.bsky.actor.defs#statusView',
|
|
4713
|
+
},
|
|
4702
4714
|
},
|
|
4703
4715
|
},
|
|
4704
4716
|
profileAssociated: {
|
|
@@ -5240,6 +5252,36 @@ export const schemaDict = {
|
|
|
5240
5252
|
},
|
|
5241
5253
|
},
|
|
5242
5254
|
},
|
|
5255
|
+
statusView: {
|
|
5256
|
+
type: 'object',
|
|
5257
|
+
required: ['status', 'record'],
|
|
5258
|
+
properties: {
|
|
5259
|
+
status: {
|
|
5260
|
+
type: 'string',
|
|
5261
|
+
description: 'The status for the account.',
|
|
5262
|
+
knownValues: ['app.bsky.actor.status#live'],
|
|
5263
|
+
},
|
|
5264
|
+
record: {
|
|
5265
|
+
type: 'unknown',
|
|
5266
|
+
},
|
|
5267
|
+
embed: {
|
|
5268
|
+
type: 'union',
|
|
5269
|
+
description: 'An optional embed associated with the status.',
|
|
5270
|
+
refs: ['lex:app.bsky.embed.external#view'],
|
|
5271
|
+
},
|
|
5272
|
+
expiresAt: {
|
|
5273
|
+
type: 'string',
|
|
5274
|
+
description:
|
|
5275
|
+
'The date when this status will expire. The application might choose to no longer return the status after expiration.',
|
|
5276
|
+
format: 'datetime',
|
|
5277
|
+
},
|
|
5278
|
+
isActive: {
|
|
5279
|
+
type: 'boolean',
|
|
5280
|
+
description:
|
|
5281
|
+
'True if the status is not expired, false if it is expired. Only present if expiration was set.',
|
|
5282
|
+
},
|
|
5283
|
+
},
|
|
5284
|
+
},
|
|
5243
5285
|
},
|
|
5244
5286
|
},
|
|
5245
5287
|
AppBskyActorGetPreferences: {
|
|
@@ -5569,6 +5611,48 @@ export const schemaDict = {
|
|
|
5569
5611
|
},
|
|
5570
5612
|
},
|
|
5571
5613
|
},
|
|
5614
|
+
AppBskyActorStatus: {
|
|
5615
|
+
lexicon: 1,
|
|
5616
|
+
id: 'app.bsky.actor.status',
|
|
5617
|
+
defs: {
|
|
5618
|
+
main: {
|
|
5619
|
+
type: 'record',
|
|
5620
|
+
description: 'A declaration of a Bluesky account status.',
|
|
5621
|
+
key: 'literal:self',
|
|
5622
|
+
record: {
|
|
5623
|
+
type: 'object',
|
|
5624
|
+
required: ['status', 'createdAt'],
|
|
5625
|
+
properties: {
|
|
5626
|
+
status: {
|
|
5627
|
+
type: 'string',
|
|
5628
|
+
description: 'The status for the account.',
|
|
5629
|
+
knownValues: ['app.bsky.actor.status#live'],
|
|
5630
|
+
},
|
|
5631
|
+
embed: {
|
|
5632
|
+
type: 'union',
|
|
5633
|
+
description: 'An optional embed associated with the status.',
|
|
5634
|
+
refs: ['lex:app.bsky.embed.external'],
|
|
5635
|
+
},
|
|
5636
|
+
durationMinutes: {
|
|
5637
|
+
type: 'integer',
|
|
5638
|
+
description:
|
|
5639
|
+
'The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.',
|
|
5640
|
+
minimum: 1,
|
|
5641
|
+
},
|
|
5642
|
+
createdAt: {
|
|
5643
|
+
type: 'string',
|
|
5644
|
+
format: 'datetime',
|
|
5645
|
+
},
|
|
5646
|
+
},
|
|
5647
|
+
},
|
|
5648
|
+
},
|
|
5649
|
+
live: {
|
|
5650
|
+
type: 'token',
|
|
5651
|
+
description:
|
|
5652
|
+
'Advertises an account as currently offering live content.',
|
|
5653
|
+
},
|
|
5654
|
+
},
|
|
5655
|
+
},
|
|
5572
5656
|
AppBskyEmbedDefs: {
|
|
5573
5657
|
lexicon: 1,
|
|
5574
5658
|
id: 'app.bsky.embed.defs',
|
|
@@ -7129,6 +7213,48 @@ export const schemaDict = {
|
|
|
7129
7213
|
},
|
|
7130
7214
|
},
|
|
7131
7215
|
},
|
|
7216
|
+
AppBskyFeedGetPosts: {
|
|
7217
|
+
lexicon: 1,
|
|
7218
|
+
id: 'app.bsky.feed.getPosts',
|
|
7219
|
+
defs: {
|
|
7220
|
+
main: {
|
|
7221
|
+
type: 'query',
|
|
7222
|
+
description:
|
|
7223
|
+
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
|
7224
|
+
parameters: {
|
|
7225
|
+
type: 'params',
|
|
7226
|
+
required: ['uris'],
|
|
7227
|
+
properties: {
|
|
7228
|
+
uris: {
|
|
7229
|
+
type: 'array',
|
|
7230
|
+
description: 'List of post AT-URIs to return hydrated views for.',
|
|
7231
|
+
items: {
|
|
7232
|
+
type: 'string',
|
|
7233
|
+
format: 'at-uri',
|
|
7234
|
+
},
|
|
7235
|
+
maxLength: 25,
|
|
7236
|
+
},
|
|
7237
|
+
},
|
|
7238
|
+
},
|
|
7239
|
+
output: {
|
|
7240
|
+
encoding: 'application/json',
|
|
7241
|
+
schema: {
|
|
7242
|
+
type: 'object',
|
|
7243
|
+
required: ['posts'],
|
|
7244
|
+
properties: {
|
|
7245
|
+
posts: {
|
|
7246
|
+
type: 'array',
|
|
7247
|
+
items: {
|
|
7248
|
+
type: 'ref',
|
|
7249
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
|
7250
|
+
},
|
|
7251
|
+
},
|
|
7252
|
+
},
|
|
7253
|
+
},
|
|
7254
|
+
},
|
|
7255
|
+
},
|
|
7256
|
+
},
|
|
7257
|
+
},
|
|
7132
7258
|
AppBskyFeedGetPostThread: {
|
|
7133
7259
|
lexicon: 1,
|
|
7134
7260
|
id: 'app.bsky.feed.getPostThread',
|
|
@@ -7193,48 +7319,6 @@ export const schemaDict = {
|
|
|
7193
7319
|
},
|
|
7194
7320
|
},
|
|
7195
7321
|
},
|
|
7196
|
-
AppBskyFeedGetPosts: {
|
|
7197
|
-
lexicon: 1,
|
|
7198
|
-
id: 'app.bsky.feed.getPosts',
|
|
7199
|
-
defs: {
|
|
7200
|
-
main: {
|
|
7201
|
-
type: 'query',
|
|
7202
|
-
description:
|
|
7203
|
-
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
|
7204
|
-
parameters: {
|
|
7205
|
-
type: 'params',
|
|
7206
|
-
required: ['uris'],
|
|
7207
|
-
properties: {
|
|
7208
|
-
uris: {
|
|
7209
|
-
type: 'array',
|
|
7210
|
-
description: 'List of post AT-URIs to return hydrated views for.',
|
|
7211
|
-
items: {
|
|
7212
|
-
type: 'string',
|
|
7213
|
-
format: 'at-uri',
|
|
7214
|
-
},
|
|
7215
|
-
maxLength: 25,
|
|
7216
|
-
},
|
|
7217
|
-
},
|
|
7218
|
-
},
|
|
7219
|
-
output: {
|
|
7220
|
-
encoding: 'application/json',
|
|
7221
|
-
schema: {
|
|
7222
|
-
type: 'object',
|
|
7223
|
-
required: ['posts'],
|
|
7224
|
-
properties: {
|
|
7225
|
-
posts: {
|
|
7226
|
-
type: 'array',
|
|
7227
|
-
items: {
|
|
7228
|
-
type: 'ref',
|
|
7229
|
-
ref: 'lex:app.bsky.feed.defs#postView',
|
|
7230
|
-
},
|
|
7231
|
-
},
|
|
7232
|
-
},
|
|
7233
|
-
},
|
|
7234
|
-
},
|
|
7235
|
-
},
|
|
7236
|
-
},
|
|
7237
|
-
},
|
|
7238
7322
|
AppBskyFeedGetQuotes: {
|
|
7239
7323
|
lexicon: 1,
|
|
7240
7324
|
id: 'app.bsky.feed.getQuotes',
|
|
@@ -10099,6 +10183,29 @@ export const schemaDict = {
|
|
|
10099
10183
|
checkEmailConfirmed: {
|
|
10100
10184
|
type: 'boolean',
|
|
10101
10185
|
},
|
|
10186
|
+
liveNow: {
|
|
10187
|
+
type: 'array',
|
|
10188
|
+
items: {
|
|
10189
|
+
type: 'ref',
|
|
10190
|
+
ref: 'lex:app.bsky.unspecced.getConfig#liveNowConfig',
|
|
10191
|
+
},
|
|
10192
|
+
},
|
|
10193
|
+
},
|
|
10194
|
+
},
|
|
10195
|
+
},
|
|
10196
|
+
},
|
|
10197
|
+
liveNowConfig: {
|
|
10198
|
+
type: 'object',
|
|
10199
|
+
required: ['did', 'domains'],
|
|
10200
|
+
properties: {
|
|
10201
|
+
did: {
|
|
10202
|
+
type: 'string',
|
|
10203
|
+
format: 'did',
|
|
10204
|
+
},
|
|
10205
|
+
domains: {
|
|
10206
|
+
type: 'array',
|
|
10207
|
+
items: {
|
|
10208
|
+
type: 'string',
|
|
10102
10209
|
},
|
|
10103
10210
|
},
|
|
10104
10211
|
},
|
|
@@ -16113,6 +16220,7 @@ export const ids = {
|
|
|
16113
16220
|
AppBskyActorPutPreferences: 'app.bsky.actor.putPreferences',
|
|
16114
16221
|
AppBskyActorSearchActors: 'app.bsky.actor.searchActors',
|
|
16115
16222
|
AppBskyActorSearchActorsTypeahead: 'app.bsky.actor.searchActorsTypeahead',
|
|
16223
|
+
AppBskyActorStatus: 'app.bsky.actor.status',
|
|
16116
16224
|
AppBskyEmbedDefs: 'app.bsky.embed.defs',
|
|
16117
16225
|
AppBskyEmbedExternal: 'app.bsky.embed.external',
|
|
16118
16226
|
AppBskyEmbedImages: 'app.bsky.embed.images',
|
|
@@ -16131,8 +16239,8 @@ export const ids = {
|
|
|
16131
16239
|
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
|
16132
16240
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
|
16133
16241
|
AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
|
|
16134
|
-
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
16135
16242
|
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
16243
|
+
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
16136
16244
|
AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
|
|
16137
16245
|
AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
|
|
16138
16246
|
AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
|
|
@@ -14,6 +14,7 @@ import type * as AppBskyGraphDefs from '../graph/defs.js'
|
|
|
14
14
|
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
|
|
15
15
|
import type * as AppBskyFeedThreadgate from '../feed/threadgate.js'
|
|
16
16
|
import type * as AppBskyFeedPostgate from '../feed/postgate.js'
|
|
17
|
+
import type * as AppBskyEmbedExternal from '../embed/external.js'
|
|
17
18
|
|
|
18
19
|
const is$typed = _is$typed,
|
|
19
20
|
validate = _validate
|
|
@@ -30,6 +31,7 @@ export interface ProfileViewBasic {
|
|
|
30
31
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
31
32
|
createdAt?: string
|
|
32
33
|
verification?: VerificationState
|
|
34
|
+
status?: StatusView
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
const hashProfileViewBasic = 'profileViewBasic'
|
|
@@ -55,6 +57,7 @@ export interface ProfileView {
|
|
|
55
57
|
viewer?: ViewerState
|
|
56
58
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
57
59
|
verification?: VerificationState
|
|
60
|
+
status?: StatusView
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
const hashProfileView = 'profileView'
|
|
@@ -86,6 +89,7 @@ export interface ProfileViewDetailed {
|
|
|
86
89
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
87
90
|
pinnedPost?: ComAtprotoRepoStrongRef.Main
|
|
88
91
|
verification?: VerificationState
|
|
92
|
+
status?: StatusView
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
const hashProfileViewDetailed = 'profileViewDetailed'
|
|
@@ -592,3 +596,25 @@ export function validatePostInteractionSettingsPref<V>(v: V) {
|
|
|
592
596
|
hashPostInteractionSettingsPref,
|
|
593
597
|
)
|
|
594
598
|
}
|
|
599
|
+
|
|
600
|
+
export interface StatusView {
|
|
601
|
+
$type?: 'app.bsky.actor.defs#statusView'
|
|
602
|
+
/** The status for the account. */
|
|
603
|
+
status: 'app.bsky.actor.status#live' | (string & {})
|
|
604
|
+
record: { [_ in string]: unknown }
|
|
605
|
+
embed?: $Typed<AppBskyEmbedExternal.View> | { $type: string }
|
|
606
|
+
/** The date when this status will expire. The application might choose to no longer return the status after expiration. */
|
|
607
|
+
expiresAt?: string
|
|
608
|
+
/** True if the status is not expired, false if it is expired. Only present if expiration was set. */
|
|
609
|
+
isActive?: boolean
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
const hashStatusView = 'statusView'
|
|
613
|
+
|
|
614
|
+
export function isStatusView<V>(v: V) {
|
|
615
|
+
return is$typed(v, id, hashStatusView)
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export function validateStatusView<V>(v: V) {
|
|
619
|
+
return validate<StatusView & V>(v, id, hashStatusView)
|
|
620
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 AppBskyEmbedExternal from '../embed/external.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'app.bsky.actor.status'
|
|
17
|
+
|
|
18
|
+
export interface Record {
|
|
19
|
+
$type: 'app.bsky.actor.status'
|
|
20
|
+
/** The status for the account. */
|
|
21
|
+
status: 'app.bsky.actor.status#live' | (string & {})
|
|
22
|
+
embed?: $Typed<AppBskyEmbedExternal.Main> | { $type: string }
|
|
23
|
+
/** The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. */
|
|
24
|
+
durationMinutes?: number
|
|
25
|
+
createdAt: string
|
|
26
|
+
[k: string]: unknown
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const hashRecord = 'main'
|
|
30
|
+
|
|
31
|
+
export function isRecord<V>(v: V) {
|
|
32
|
+
return is$typed(v, id, hashRecord)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function validateRecord<V>(v: V) {
|
|
36
|
+
return validate<Record & V>(v, id, hashRecord, true)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Advertises an account as currently offering live content. */
|
|
40
|
+
export const LIVE = `${id}#live`
|
|
@@ -22,6 +22,7 @@ export type InputSchema = undefined
|
|
|
22
22
|
|
|
23
23
|
export interface OutputSchema {
|
|
24
24
|
checkEmailConfirmed?: boolean
|
|
25
|
+
liveNow?: LiveNowConfig[]
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export type HandlerInput = undefined
|
|
@@ -49,3 +50,19 @@ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
|
49
50
|
export type Handler<HA extends HandlerAuth = never> = (
|
|
50
51
|
ctx: HandlerReqCtx<HA>,
|
|
51
52
|
) => Promise<HandlerOutput> | HandlerOutput
|
|
53
|
+
|
|
54
|
+
export interface LiveNowConfig {
|
|
55
|
+
$type?: 'app.bsky.unspecced.getConfig#liveNowConfig'
|
|
56
|
+
did: string
|
|
57
|
+
domains: string[]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const hashLiveNowConfig = 'liveNowConfig'
|
|
61
|
+
|
|
62
|
+
export function isLiveNowConfig<V>(v: V) {
|
|
63
|
+
return is$typed(v, id, hashLiveNowConfig)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function validateLiveNowConfig<V>(v: V) {
|
|
67
|
+
return validate<LiveNowConfig & V>(v, id, hashLiveNowConfig)
|
|
68
|
+
}
|
package/src/mod-service/index.ts
CHANGED
package/src/mod-service/views.ts
CHANGED
|
@@ -544,10 +544,14 @@ export class ModerationViews {
|
|
|
544
544
|
subjects: string[],
|
|
545
545
|
includeNeg?: boolean,
|
|
546
546
|
): Promise<Map<string, Label[]>> {
|
|
547
|
+
const now = new Date().toISOString()
|
|
547
548
|
const labels = new Map<string, Label[]>()
|
|
548
549
|
const res = await this.db.db
|
|
549
550
|
.selectFrom('label')
|
|
550
551
|
.where('label.uri', 'in', subjects)
|
|
552
|
+
.where((qb) =>
|
|
553
|
+
qb.where('label.exp', 'is', null).orWhere('label.exp', '>', now),
|
|
554
|
+
)
|
|
551
555
|
.if(!includeNeg, (qb) => qb.where('neg', '=', false))
|
|
552
556
|
.selectAll()
|
|
553
557
|
.execute()
|