@atproto/ozone 0.1.129 → 0.1.131
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/moderation/emitEvent.d.ts.map +1 -1
- package/dist/api/moderation/emitEvent.js +9 -1
- package/dist/api/moderation/emitEvent.js.map +1 -1
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +2 -0
- package/dist/api/util.js.map +1 -1
- package/dist/db/migrations/20250715T000000000Z-add-mod-event-external-id.d.ts +4 -0
- package/dist/db/migrations/20250715T000000000Z-add-mod-event-external-id.d.ts.map +1 -0
- package/dist/db/migrations/20250715T000000000Z-add-mod-event-external-id.js +17 -0
- package/dist/db/migrations/20250715T000000000Z-add-mod-event-external-id.js.map +1 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/migrations/index.d.ts.map +1 -1
- package/dist/db/migrations/index.js +2 -1
- package/dist/db/migrations/index.js.map +1 -1
- package/dist/db/schema/moderation_event.d.ts +1 -0
- package/dist/db/schema/moderation_event.d.ts.map +1 -1
- package/dist/lexicon/index.d.ts +8 -2
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +16 -4
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +388 -82
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +199 -42
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/unregisterPush.d.ts +17 -0
- package/dist/lexicon/types/app/bsky/notification/unregisterPush.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/unregisterPush.js +7 -0
- package/dist/lexicon/types/app/bsky/notification/unregisterPush.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +32 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/defs.js +18 -0
- package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.d.ts +18 -0
- package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.js +7 -0
- package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.d.ts +28 -0
- package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.js +7 -0
- package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +3 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/dist/mod-service/index.d.ts +4 -1
- package/dist/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +13 -1
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/status.d.ts +1 -1
- package/package.json +5 -5
- package/src/api/moderation/emitEvent.ts +18 -1
- package/src/api/util.ts +2 -0
- package/src/db/migrations/20250715T000000000Z-add-mod-event-external-id.ts +15 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/schema/moderation_event.ts +1 -0
- package/src/lexicon/index.ts +50 -11
- package/src/lexicon/lexicons.ts +211 -43
- package/src/lexicon/types/app/bsky/notification/unregisterPush.ts +36 -0
- package/src/lexicon/types/app/bsky/unspecced/defs.ts +50 -0
- package/src/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.ts +34 -0
- package/src/lexicon/types/app/bsky/unspecced/initAgeAssurance.ts +47 -0
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +3 -1
- package/src/mod-service/index.ts +26 -1
- package/tests/moderation-events.test.ts +36 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -25,6 +25,7 @@ import { ProtectedTagSetting } from '../../setting/types'
|
|
|
25
25
|
import { TagService } from '../../tag-service'
|
|
26
26
|
import { getTagForReport } from '../../tag-service/util'
|
|
27
27
|
import { retryHttp } from '../../util'
|
|
28
|
+
import { getEventType } from '../util'
|
|
28
29
|
|
|
29
30
|
const handleModerationEvent = async ({
|
|
30
31
|
ctx,
|
|
@@ -43,7 +44,7 @@ const handleModerationEvent = async ({
|
|
|
43
44
|
const db = ctx.db
|
|
44
45
|
const moderationService = ctx.modService(db)
|
|
45
46
|
const settingService = ctx.settingService(db)
|
|
46
|
-
const { event } = input.body
|
|
47
|
+
const { event, externalId } = input.body
|
|
47
48
|
const isAcknowledgeEvent = isModEventAcknowledge(event)
|
|
48
49
|
const isTakedownEvent = isModEventTakedown(event)
|
|
49
50
|
const isReverseTakedownEvent = isModEventReverseTakedown(event)
|
|
@@ -165,11 +166,27 @@ const handleModerationEvent = async ({
|
|
|
165
166
|
const moderationEvent = await db.transaction(async (dbTxn) => {
|
|
166
167
|
const moderationTxn = ctx.modService(dbTxn)
|
|
167
168
|
|
|
169
|
+
if (externalId) {
|
|
170
|
+
const existingEvent = await moderationTxn.getEventByExternalId(
|
|
171
|
+
getEventType(event.$type),
|
|
172
|
+
externalId,
|
|
173
|
+
subject,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
if (existingEvent) {
|
|
177
|
+
throw new InvalidRequestError(
|
|
178
|
+
`An event with the same external ID already exists for the subject.`,
|
|
179
|
+
'DuplicateExternalId',
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
168
184
|
const result = await moderationTxn.logEvent({
|
|
169
185
|
event,
|
|
170
186
|
subject,
|
|
171
187
|
createdBy,
|
|
172
188
|
modTool: input.body.modTool,
|
|
189
|
+
externalId,
|
|
173
190
|
})
|
|
174
191
|
|
|
175
192
|
const tagService = new TagService(
|
package/src/api/util.ts
CHANGED
|
@@ -176,6 +176,8 @@ const eventTypes = new Set([
|
|
|
176
176
|
'tools.ozone.moderation.defs#identityEvent',
|
|
177
177
|
'tools.ozone.moderation.defs#recordEvent',
|
|
178
178
|
'tools.ozone.moderation.defs#modEventPriorityScore',
|
|
179
|
+
'tools.ozone.moderation.defs#ageAssuranceEvent',
|
|
180
|
+
'tools.ozone.moderation.defs#ageAssuranceOverrideEvent',
|
|
179
181
|
])
|
|
180
182
|
|
|
181
183
|
export const getMemberRole = (role: string) => {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Kysely } from 'kysely'
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.alterTable('moderation_event')
|
|
6
|
+
.addColumn('externalId', 'varchar')
|
|
7
|
+
.execute()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
11
|
+
await db.schema
|
|
12
|
+
.alterTable('moderation_event')
|
|
13
|
+
.dropColumn('externalId')
|
|
14
|
+
.execute()
|
|
15
|
+
}
|
|
@@ -28,3 +28,4 @@ export * as _20250417T201720309Z from './20250417T201720309Z-firehose-cursor'
|
|
|
28
28
|
export * as _20250609T110704000Z from './20250609T110704000Z-safelink'
|
|
29
29
|
export * as _20250618T180246000Z from './20250618T180246000Z-add-mod-tool-to-moderation-event'
|
|
30
30
|
export * as _20250701T000000000Z from './20250701T000000000Z-add-age-assurance-state'
|
|
31
|
+
export * as _20250715T000000000Z from './20250715T000000000Z-add-mod-event-external-id'
|
package/src/lexicon/index.ts
CHANGED
|
@@ -109,8 +109,8 @@ import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGene
|
|
|
109
109
|
import * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton.js'
|
|
110
110
|
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes.js'
|
|
111
111
|
import * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed.js'
|
|
112
|
-
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
|
|
113
112
|
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js'
|
|
113
|
+
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js'
|
|
114
114
|
import * as AppBskyFeedGetQuotes from './types/app/bsky/feed/getQuotes.js'
|
|
115
115
|
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy.js'
|
|
116
116
|
import * as AppBskyFeedGetSuggestedFeeds from './types/app/bsky/feed/getSuggestedFeeds.js'
|
|
@@ -147,7 +147,9 @@ import * as AppBskyNotificationPutActivitySubscription from './types/app/bsky/no
|
|
|
147
147
|
import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js'
|
|
148
148
|
import * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js'
|
|
149
149
|
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js'
|
|
150
|
+
import * as AppBskyNotificationUnregisterPush from './types/app/bsky/notification/unregisterPush.js'
|
|
150
151
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
|
152
|
+
import * as AppBskyUnspeccedGetAgeAssuranceState from './types/app/bsky/unspecced/getAgeAssuranceState.js'
|
|
151
153
|
import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
|
|
152
154
|
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
|
|
153
155
|
import * as AppBskyUnspeccedGetPostThreadOtherV2 from './types/app/bsky/unspecced/getPostThreadOtherV2.js'
|
|
@@ -163,6 +165,7 @@ import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecce
|
|
|
163
165
|
import * as AppBskyUnspeccedGetTrendingTopics from './types/app/bsky/unspecced/getTrendingTopics.js'
|
|
164
166
|
import * as AppBskyUnspeccedGetTrends from './types/app/bsky/unspecced/getTrends.js'
|
|
165
167
|
import * as AppBskyUnspeccedGetTrendsSkeleton from './types/app/bsky/unspecced/getTrendsSkeleton.js'
|
|
168
|
+
import * as AppBskyUnspeccedInitAgeAssurance from './types/app/bsky/unspecced/initAgeAssurance.js'
|
|
166
169
|
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton.js'
|
|
167
170
|
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton.js'
|
|
168
171
|
import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton.js'
|
|
@@ -1652,27 +1655,27 @@ export class AppBskyFeedNS {
|
|
|
1652
1655
|
return this._server.xrpc.method(nsid, cfg)
|
|
1653
1656
|
}
|
|
1654
1657
|
|
|
1655
|
-
|
|
1658
|
+
getPostThread<A extends Auth = void>(
|
|
1656
1659
|
cfg: MethodConfigOrHandler<
|
|
1657
1660
|
A,
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
+
AppBskyFeedGetPostThread.QueryParams,
|
|
1662
|
+
AppBskyFeedGetPostThread.HandlerInput,
|
|
1663
|
+
AppBskyFeedGetPostThread.HandlerOutput
|
|
1661
1664
|
>,
|
|
1662
1665
|
) {
|
|
1663
|
-
const nsid = 'app.bsky.feed.
|
|
1666
|
+
const nsid = 'app.bsky.feed.getPostThread' // @ts-ignore
|
|
1664
1667
|
return this._server.xrpc.method(nsid, cfg)
|
|
1665
1668
|
}
|
|
1666
1669
|
|
|
1667
|
-
|
|
1670
|
+
getPosts<A extends Auth = void>(
|
|
1668
1671
|
cfg: MethodConfigOrHandler<
|
|
1669
1672
|
A,
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
+
AppBskyFeedGetPosts.QueryParams,
|
|
1674
|
+
AppBskyFeedGetPosts.HandlerInput,
|
|
1675
|
+
AppBskyFeedGetPosts.HandlerOutput
|
|
1673
1676
|
>,
|
|
1674
1677
|
) {
|
|
1675
|
-
const nsid = 'app.bsky.feed.
|
|
1678
|
+
const nsid = 'app.bsky.feed.getPosts' // @ts-ignore
|
|
1676
1679
|
return this._server.xrpc.method(nsid, cfg)
|
|
1677
1680
|
}
|
|
1678
1681
|
|
|
@@ -2132,6 +2135,18 @@ export class AppBskyNotificationNS {
|
|
|
2132
2135
|
return this._server.xrpc.method(nsid, cfg)
|
|
2133
2136
|
}
|
|
2134
2137
|
|
|
2138
|
+
unregisterPush<A extends Auth = void>(
|
|
2139
|
+
cfg: MethodConfigOrHandler<
|
|
2140
|
+
A,
|
|
2141
|
+
AppBskyNotificationUnregisterPush.QueryParams,
|
|
2142
|
+
AppBskyNotificationUnregisterPush.HandlerInput,
|
|
2143
|
+
AppBskyNotificationUnregisterPush.HandlerOutput
|
|
2144
|
+
>,
|
|
2145
|
+
) {
|
|
2146
|
+
const nsid = 'app.bsky.notification.unregisterPush' // @ts-ignore
|
|
2147
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2135
2150
|
updateSeen<A extends Auth = void>(
|
|
2136
2151
|
cfg: MethodConfigOrHandler<
|
|
2137
2152
|
A,
|
|
@@ -2160,6 +2175,18 @@ export class AppBskyUnspeccedNS {
|
|
|
2160
2175
|
this._server = server
|
|
2161
2176
|
}
|
|
2162
2177
|
|
|
2178
|
+
getAgeAssuranceState<A extends Auth = void>(
|
|
2179
|
+
cfg: MethodConfigOrHandler<
|
|
2180
|
+
A,
|
|
2181
|
+
AppBskyUnspeccedGetAgeAssuranceState.QueryParams,
|
|
2182
|
+
AppBskyUnspeccedGetAgeAssuranceState.HandlerInput,
|
|
2183
|
+
AppBskyUnspeccedGetAgeAssuranceState.HandlerOutput
|
|
2184
|
+
>,
|
|
2185
|
+
) {
|
|
2186
|
+
const nsid = 'app.bsky.unspecced.getAgeAssuranceState' // @ts-ignore
|
|
2187
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2163
2190
|
getConfig<A extends Auth = void>(
|
|
2164
2191
|
cfg: MethodConfigOrHandler<
|
|
2165
2192
|
A,
|
|
@@ -2340,6 +2367,18 @@ export class AppBskyUnspeccedNS {
|
|
|
2340
2367
|
return this._server.xrpc.method(nsid, cfg)
|
|
2341
2368
|
}
|
|
2342
2369
|
|
|
2370
|
+
initAgeAssurance<A extends Auth = void>(
|
|
2371
|
+
cfg: MethodConfigOrHandler<
|
|
2372
|
+
A,
|
|
2373
|
+
AppBskyUnspeccedInitAgeAssurance.QueryParams,
|
|
2374
|
+
AppBskyUnspeccedInitAgeAssurance.HandlerInput,
|
|
2375
|
+
AppBskyUnspeccedInitAgeAssurance.HandlerOutput
|
|
2376
|
+
>,
|
|
2377
|
+
) {
|
|
2378
|
+
const nsid = 'app.bsky.unspecced.initAgeAssurance' // @ts-ignore
|
|
2379
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2343
2382
|
searchActorsSkeleton<A extends Auth = void>(
|
|
2344
2383
|
cfg: MethodConfigOrHandler<
|
|
2345
2384
|
A,
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -7282,48 +7282,6 @@ export const schemaDict = {
|
|
|
7282
7282
|
},
|
|
7283
7283
|
},
|
|
7284
7284
|
},
|
|
7285
|
-
AppBskyFeedGetPosts: {
|
|
7286
|
-
lexicon: 1,
|
|
7287
|
-
id: 'app.bsky.feed.getPosts',
|
|
7288
|
-
defs: {
|
|
7289
|
-
main: {
|
|
7290
|
-
type: 'query',
|
|
7291
|
-
description:
|
|
7292
|
-
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
|
7293
|
-
parameters: {
|
|
7294
|
-
type: 'params',
|
|
7295
|
-
required: ['uris'],
|
|
7296
|
-
properties: {
|
|
7297
|
-
uris: {
|
|
7298
|
-
type: 'array',
|
|
7299
|
-
description: 'List of post AT-URIs to return hydrated views for.',
|
|
7300
|
-
items: {
|
|
7301
|
-
type: 'string',
|
|
7302
|
-
format: 'at-uri',
|
|
7303
|
-
},
|
|
7304
|
-
maxLength: 25,
|
|
7305
|
-
},
|
|
7306
|
-
},
|
|
7307
|
-
},
|
|
7308
|
-
output: {
|
|
7309
|
-
encoding: 'application/json',
|
|
7310
|
-
schema: {
|
|
7311
|
-
type: 'object',
|
|
7312
|
-
required: ['posts'],
|
|
7313
|
-
properties: {
|
|
7314
|
-
posts: {
|
|
7315
|
-
type: 'array',
|
|
7316
|
-
items: {
|
|
7317
|
-
type: 'ref',
|
|
7318
|
-
ref: 'lex:app.bsky.feed.defs#postView',
|
|
7319
|
-
},
|
|
7320
|
-
},
|
|
7321
|
-
},
|
|
7322
|
-
},
|
|
7323
|
-
},
|
|
7324
|
-
},
|
|
7325
|
-
},
|
|
7326
|
-
},
|
|
7327
7285
|
AppBskyFeedGetPostThread: {
|
|
7328
7286
|
lexicon: 1,
|
|
7329
7287
|
id: 'app.bsky.feed.getPostThread',
|
|
@@ -7388,6 +7346,48 @@ export const schemaDict = {
|
|
|
7388
7346
|
},
|
|
7389
7347
|
},
|
|
7390
7348
|
},
|
|
7349
|
+
AppBskyFeedGetPosts: {
|
|
7350
|
+
lexicon: 1,
|
|
7351
|
+
id: 'app.bsky.feed.getPosts',
|
|
7352
|
+
defs: {
|
|
7353
|
+
main: {
|
|
7354
|
+
type: 'query',
|
|
7355
|
+
description:
|
|
7356
|
+
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
|
7357
|
+
parameters: {
|
|
7358
|
+
type: 'params',
|
|
7359
|
+
required: ['uris'],
|
|
7360
|
+
properties: {
|
|
7361
|
+
uris: {
|
|
7362
|
+
type: 'array',
|
|
7363
|
+
description: 'List of post AT-URIs to return hydrated views for.',
|
|
7364
|
+
items: {
|
|
7365
|
+
type: 'string',
|
|
7366
|
+
format: 'at-uri',
|
|
7367
|
+
},
|
|
7368
|
+
maxLength: 25,
|
|
7369
|
+
},
|
|
7370
|
+
},
|
|
7371
|
+
},
|
|
7372
|
+
output: {
|
|
7373
|
+
encoding: 'application/json',
|
|
7374
|
+
schema: {
|
|
7375
|
+
type: 'object',
|
|
7376
|
+
required: ['posts'],
|
|
7377
|
+
properties: {
|
|
7378
|
+
posts: {
|
|
7379
|
+
type: 'array',
|
|
7380
|
+
items: {
|
|
7381
|
+
type: 'ref',
|
|
7382
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
|
7383
|
+
},
|
|
7384
|
+
},
|
|
7385
|
+
},
|
|
7386
|
+
},
|
|
7387
|
+
},
|
|
7388
|
+
},
|
|
7389
|
+
},
|
|
7390
|
+
},
|
|
7391
7391
|
AppBskyFeedGetQuotes: {
|
|
7392
7392
|
lexicon: 1,
|
|
7393
7393
|
id: 'app.bsky.feed.getQuotes',
|
|
@@ -10372,6 +10372,40 @@ export const schemaDict = {
|
|
|
10372
10372
|
},
|
|
10373
10373
|
},
|
|
10374
10374
|
},
|
|
10375
|
+
AppBskyNotificationUnregisterPush: {
|
|
10376
|
+
lexicon: 1,
|
|
10377
|
+
id: 'app.bsky.notification.unregisterPush',
|
|
10378
|
+
defs: {
|
|
10379
|
+
main: {
|
|
10380
|
+
type: 'procedure',
|
|
10381
|
+
description:
|
|
10382
|
+
'The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth.',
|
|
10383
|
+
input: {
|
|
10384
|
+
encoding: 'application/json',
|
|
10385
|
+
schema: {
|
|
10386
|
+
type: 'object',
|
|
10387
|
+
required: ['serviceDid', 'token', 'platform', 'appId'],
|
|
10388
|
+
properties: {
|
|
10389
|
+
serviceDid: {
|
|
10390
|
+
type: 'string',
|
|
10391
|
+
format: 'did',
|
|
10392
|
+
},
|
|
10393
|
+
token: {
|
|
10394
|
+
type: 'string',
|
|
10395
|
+
},
|
|
10396
|
+
platform: {
|
|
10397
|
+
type: 'string',
|
|
10398
|
+
knownValues: ['ios', 'android', 'web'],
|
|
10399
|
+
},
|
|
10400
|
+
appId: {
|
|
10401
|
+
type: 'string',
|
|
10402
|
+
},
|
|
10403
|
+
},
|
|
10404
|
+
},
|
|
10405
|
+
},
|
|
10406
|
+
},
|
|
10407
|
+
},
|
|
10408
|
+
},
|
|
10375
10409
|
AppBskyNotificationUpdateSeen: {
|
|
10376
10410
|
lexicon: 1,
|
|
10377
10411
|
id: 'app.bsky.notification.updateSeen',
|
|
@@ -10675,6 +10709,84 @@ export const schemaDict = {
|
|
|
10675
10709
|
},
|
|
10676
10710
|
},
|
|
10677
10711
|
},
|
|
10712
|
+
ageAssuranceState: {
|
|
10713
|
+
type: 'object',
|
|
10714
|
+
description:
|
|
10715
|
+
'The computed state of the age assurance process, returned to the user in question on certain authenticated requests.',
|
|
10716
|
+
required: ['status'],
|
|
10717
|
+
properties: {
|
|
10718
|
+
lastInitiatedAt: {
|
|
10719
|
+
type: 'string',
|
|
10720
|
+
format: 'datetime',
|
|
10721
|
+
description: 'The timestamp when this state was last updated.',
|
|
10722
|
+
},
|
|
10723
|
+
status: {
|
|
10724
|
+
type: 'string',
|
|
10725
|
+
description: 'The status of the age assurance process.',
|
|
10726
|
+
knownValues: ['unknown', 'pending', 'assured', 'blocked'],
|
|
10727
|
+
},
|
|
10728
|
+
},
|
|
10729
|
+
},
|
|
10730
|
+
ageAssuranceEvent: {
|
|
10731
|
+
type: 'object',
|
|
10732
|
+
description: 'Object used to store age assurance data in stash.',
|
|
10733
|
+
required: ['createdAt', 'status', 'attemptId'],
|
|
10734
|
+
properties: {
|
|
10735
|
+
createdAt: {
|
|
10736
|
+
type: 'string',
|
|
10737
|
+
format: 'datetime',
|
|
10738
|
+
description: 'The date and time of this write operation.',
|
|
10739
|
+
},
|
|
10740
|
+
status: {
|
|
10741
|
+
type: 'string',
|
|
10742
|
+
description: 'The status of the age assurance process.',
|
|
10743
|
+
knownValues: ['unknown', 'pending', 'assured'],
|
|
10744
|
+
},
|
|
10745
|
+
attemptId: {
|
|
10746
|
+
type: 'string',
|
|
10747
|
+
description:
|
|
10748
|
+
'The unique identifier for this instance of the age assurance flow, in UUID format.',
|
|
10749
|
+
},
|
|
10750
|
+
email: {
|
|
10751
|
+
type: 'string',
|
|
10752
|
+
description: 'The email used for AA.',
|
|
10753
|
+
},
|
|
10754
|
+
initIp: {
|
|
10755
|
+
type: 'string',
|
|
10756
|
+
description: 'The IP address used when initiating the AA flow.',
|
|
10757
|
+
},
|
|
10758
|
+
initUa: {
|
|
10759
|
+
type: 'string',
|
|
10760
|
+
description: 'The user agent used when initiating the AA flow.',
|
|
10761
|
+
},
|
|
10762
|
+
completeIp: {
|
|
10763
|
+
type: 'string',
|
|
10764
|
+
description: 'The IP address used when completing the AA flow.',
|
|
10765
|
+
},
|
|
10766
|
+
completeUa: {
|
|
10767
|
+
type: 'string',
|
|
10768
|
+
description: 'The user agent used when completing the AA flow.',
|
|
10769
|
+
},
|
|
10770
|
+
},
|
|
10771
|
+
},
|
|
10772
|
+
},
|
|
10773
|
+
},
|
|
10774
|
+
AppBskyUnspeccedGetAgeAssuranceState: {
|
|
10775
|
+
lexicon: 1,
|
|
10776
|
+
id: 'app.bsky.unspecced.getAgeAssuranceState',
|
|
10777
|
+
defs: {
|
|
10778
|
+
main: {
|
|
10779
|
+
type: 'query',
|
|
10780
|
+
description:
|
|
10781
|
+
'Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.',
|
|
10782
|
+
output: {
|
|
10783
|
+
encoding: 'application/json',
|
|
10784
|
+
schema: {
|
|
10785
|
+
type: 'ref',
|
|
10786
|
+
ref: 'lex:app.bsky.unspecced.defs#ageAssuranceState',
|
|
10787
|
+
},
|
|
10788
|
+
},
|
|
10789
|
+
},
|
|
10678
10790
|
},
|
|
10679
10791
|
},
|
|
10680
10792
|
AppBskyUnspeccedGetConfig: {
|
|
@@ -11438,6 +11550,48 @@ export const schemaDict = {
|
|
|
11438
11550
|
},
|
|
11439
11551
|
},
|
|
11440
11552
|
},
|
|
11553
|
+
AppBskyUnspeccedInitAgeAssurance: {
|
|
11554
|
+
lexicon: 1,
|
|
11555
|
+
id: 'app.bsky.unspecced.initAgeAssurance',
|
|
11556
|
+
defs: {
|
|
11557
|
+
main: {
|
|
11558
|
+
type: 'procedure',
|
|
11559
|
+
description:
|
|
11560
|
+
"Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.",
|
|
11561
|
+
input: {
|
|
11562
|
+
encoding: 'application/json',
|
|
11563
|
+
schema: {
|
|
11564
|
+
type: 'object',
|
|
11565
|
+
required: ['email', 'language', 'countryCode'],
|
|
11566
|
+
properties: {
|
|
11567
|
+
email: {
|
|
11568
|
+
type: 'string',
|
|
11569
|
+
description:
|
|
11570
|
+
"The user's email address to receive assurance instructions.",
|
|
11571
|
+
},
|
|
11572
|
+
language: {
|
|
11573
|
+
type: 'string',
|
|
11574
|
+
description:
|
|
11575
|
+
"The user's preferred language for communication during the assurance process.",
|
|
11576
|
+
},
|
|
11577
|
+
countryCode: {
|
|
11578
|
+
type: 'string',
|
|
11579
|
+
description:
|
|
11580
|
+
"An ISO 3166-1 alpha-2 code of the user's location.",
|
|
11581
|
+
},
|
|
11582
|
+
},
|
|
11583
|
+
},
|
|
11584
|
+
},
|
|
11585
|
+
output: {
|
|
11586
|
+
encoding: 'application/json',
|
|
11587
|
+
schema: {
|
|
11588
|
+
type: 'ref',
|
|
11589
|
+
ref: 'lex:app.bsky.unspecced.defs#ageAssuranceState',
|
|
11590
|
+
},
|
|
11591
|
+
},
|
|
11592
|
+
},
|
|
11593
|
+
},
|
|
11594
|
+
},
|
|
11441
11595
|
AppBskyUnspeccedSearchActorsSkeleton: {
|
|
11442
11596
|
lexicon: 1,
|
|
11443
11597
|
id: 'app.bsky.unspecced.searchActorsSkeleton',
|
|
@@ -14806,6 +14960,11 @@ export const schemaDict = {
|
|
|
14806
14960
|
type: 'ref',
|
|
14807
14961
|
ref: 'lex:tools.ozone.moderation.defs#modTool',
|
|
14808
14962
|
},
|
|
14963
|
+
externalId: {
|
|
14964
|
+
type: 'string',
|
|
14965
|
+
description:
|
|
14966
|
+
'An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject.',
|
|
14967
|
+
},
|
|
14809
14968
|
},
|
|
14810
14969
|
},
|
|
14811
14970
|
},
|
|
@@ -14820,6 +14979,11 @@ export const schemaDict = {
|
|
|
14820
14979
|
{
|
|
14821
14980
|
name: 'SubjectHasAction',
|
|
14822
14981
|
},
|
|
14982
|
+
{
|
|
14983
|
+
name: 'DuplicateExternalId',
|
|
14984
|
+
description:
|
|
14985
|
+
'An event with the same external ID already exists for the subject.',
|
|
14986
|
+
},
|
|
14823
14987
|
],
|
|
14824
14988
|
},
|
|
14825
14989
|
},
|
|
@@ -17504,8 +17668,8 @@ export const ids = {
|
|
|
17504
17668
|
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
|
17505
17669
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
|
17506
17670
|
AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
|
|
17507
|
-
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
17508
17671
|
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
17672
|
+
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
17509
17673
|
AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
|
|
17510
17674
|
AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
|
|
17511
17675
|
AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
|
|
@@ -17563,9 +17727,12 @@ export const ids = {
|
|
|
17563
17727
|
AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
|
|
17564
17728
|
AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
|
|
17565
17729
|
AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
|
|
17730
|
+
AppBskyNotificationUnregisterPush: 'app.bsky.notification.unregisterPush',
|
|
17566
17731
|
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
|
|
17567
17732
|
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
|
|
17568
17733
|
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
|
|
17734
|
+
AppBskyUnspeccedGetAgeAssuranceState:
|
|
17735
|
+
'app.bsky.unspecced.getAgeAssuranceState',
|
|
17569
17736
|
AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
|
|
17570
17737
|
AppBskyUnspeccedGetPopularFeedGenerators:
|
|
17571
17738
|
'app.bsky.unspecced.getPopularFeedGenerators',
|
|
@@ -17589,6 +17756,7 @@ export const ids = {
|
|
|
17589
17756
|
AppBskyUnspeccedGetTrendingTopics: 'app.bsky.unspecced.getTrendingTopics',
|
|
17590
17757
|
AppBskyUnspeccedGetTrends: 'app.bsky.unspecced.getTrends',
|
|
17591
17758
|
AppBskyUnspeccedGetTrendsSkeleton: 'app.bsky.unspecced.getTrendsSkeleton',
|
|
17759
|
+
AppBskyUnspeccedInitAgeAssurance: 'app.bsky.unspecced.initAgeAssurance',
|
|
17592
17760
|
AppBskyUnspeccedSearchActorsSkeleton:
|
|
17593
17761
|
'app.bsky.unspecced.searchActorsSkeleton',
|
|
17594
17762
|
AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
|
|
13
|
+
const is$typed = _is$typed,
|
|
14
|
+
validate = _validate
|
|
15
|
+
const id = 'app.bsky.notification.unregisterPush'
|
|
16
|
+
|
|
17
|
+
export type QueryParams = {}
|
|
18
|
+
|
|
19
|
+
export interface InputSchema {
|
|
20
|
+
serviceDid: string
|
|
21
|
+
token: string
|
|
22
|
+
platform: 'ios' | 'android' | 'web' | (string & {})
|
|
23
|
+
appId: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface HandlerInput {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: InputSchema
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface HandlerError {
|
|
32
|
+
status: number
|
|
33
|
+
message?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type HandlerOutput = HandlerError | void
|
|
@@ -198,3 +198,53 @@ export function isThreadItemBlocked<V>(v: V) {
|
|
|
198
198
|
export function validateThreadItemBlocked<V>(v: V) {
|
|
199
199
|
return validate<ThreadItemBlocked & V>(v, id, hashThreadItemBlocked)
|
|
200
200
|
}
|
|
201
|
+
|
|
202
|
+
/** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. */
|
|
203
|
+
export interface AgeAssuranceState {
|
|
204
|
+
$type?: 'app.bsky.unspecced.defs#ageAssuranceState'
|
|
205
|
+
/** The timestamp when this state was last updated. */
|
|
206
|
+
lastInitiatedAt?: string
|
|
207
|
+
/** The status of the age assurance process. */
|
|
208
|
+
status: 'unknown' | 'pending' | 'assured' | 'blocked' | (string & {})
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const hashAgeAssuranceState = 'ageAssuranceState'
|
|
212
|
+
|
|
213
|
+
export function isAgeAssuranceState<V>(v: V) {
|
|
214
|
+
return is$typed(v, id, hashAgeAssuranceState)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function validateAgeAssuranceState<V>(v: V) {
|
|
218
|
+
return validate<AgeAssuranceState & V>(v, id, hashAgeAssuranceState)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Object used to store age assurance data in stash. */
|
|
222
|
+
export interface AgeAssuranceEvent {
|
|
223
|
+
$type?: 'app.bsky.unspecced.defs#ageAssuranceEvent'
|
|
224
|
+
/** The date and time of this write operation. */
|
|
225
|
+
createdAt: string
|
|
226
|
+
/** The status of the age assurance process. */
|
|
227
|
+
status: 'unknown' | 'pending' | 'assured' | (string & {})
|
|
228
|
+
/** The unique identifier for this instance of the age assurance flow, in UUID format. */
|
|
229
|
+
attemptId: string
|
|
230
|
+
/** The email used for AA. */
|
|
231
|
+
email?: string
|
|
232
|
+
/** The IP address used when initiating the AA flow. */
|
|
233
|
+
initIp?: string
|
|
234
|
+
/** The user agent used when initiating the AA flow. */
|
|
235
|
+
initUa?: string
|
|
236
|
+
/** The IP address used when completing the AA flow. */
|
|
237
|
+
completeIp?: string
|
|
238
|
+
/** The user agent used when completing the AA flow. */
|
|
239
|
+
completeUa?: string
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const hashAgeAssuranceEvent = 'ageAssuranceEvent'
|
|
243
|
+
|
|
244
|
+
export function isAgeAssuranceEvent<V>(v: V) {
|
|
245
|
+
return is$typed(v, id, hashAgeAssuranceEvent)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function validateAgeAssuranceEvent<V>(v: V) {
|
|
249
|
+
return validate<AgeAssuranceEvent & V>(v, id, hashAgeAssuranceEvent)
|
|
250
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 AppBskyUnspeccedDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'app.bsky.unspecced.getAgeAssuranceState'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {}
|
|
19
|
+
export type InputSchema = undefined
|
|
20
|
+
export type OutputSchema = AppBskyUnspeccedDefs.AgeAssuranceState
|
|
21
|
+
export type HandlerInput = void
|
|
22
|
+
|
|
23
|
+
export interface HandlerSuccess {
|
|
24
|
+
encoding: 'application/json'
|
|
25
|
+
body: OutputSchema
|
|
26
|
+
headers?: { [key: string]: string }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface HandlerError {
|
|
30
|
+
status: number
|
|
31
|
+
message?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|