@atproto/pds 0.4.159 → 0.4.161

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 (36) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/lexicon/index.d.ts +8 -2
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +16 -4
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +388 -82
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +199 -42
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/app/bsky/notification/unregisterPush.d.ts +17 -0
  11. package/dist/lexicon/types/app/bsky/notification/unregisterPush.d.ts.map +1 -0
  12. package/dist/lexicon/types/app/bsky/notification/unregisterPush.js +7 -0
  13. package/dist/lexicon/types/app/bsky/notification/unregisterPush.js.map +1 -0
  14. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +32 -0
  15. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts.map +1 -1
  16. package/dist/lexicon/types/app/bsky/unspecced/defs.js +18 -0
  17. package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
  18. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.d.ts +18 -0
  19. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.d.ts.map +1 -0
  20. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.js +7 -0
  21. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.js.map +1 -0
  22. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.d.ts +28 -0
  23. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.d.ts.map +1 -0
  24. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.js +7 -0
  25. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.js.map +1 -0
  26. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +3 -1
  27. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  28. package/package.json +5 -5
  29. package/src/lexicon/index.ts +50 -11
  30. package/src/lexicon/lexicons.ts +211 -43
  31. package/src/lexicon/types/app/bsky/notification/unregisterPush.ts +36 -0
  32. package/src/lexicon/types/app/bsky/unspecced/defs.ts +50 -0
  33. package/src/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.ts +34 -0
  34. package/src/lexicon/types/app/bsky/unspecced/initAgeAssurance.ts +47 -0
  35. package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +3 -1
  36. package/tsconfig.build.tsbuildinfo +1 -1
@@ -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
@@ -0,0 +1,47 @@
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.initAgeAssurance'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ /** The user's email address to receive assurance instructions. */
22
+ email: string
23
+ /** The user's preferred language for communication during the assurance process. */
24
+ language: string
25
+ /** An ISO 3166-1 alpha-2 code of the user's location. */
26
+ countryCode: string
27
+ }
28
+
29
+ export type OutputSchema = AppBskyUnspeccedDefs.AgeAssuranceState
30
+
31
+ export interface HandlerInput {
32
+ encoding: 'application/json'
33
+ body: InputSchema
34
+ }
35
+
36
+ export interface HandlerSuccess {
37
+ encoding: 'application/json'
38
+ body: OutputSchema
39
+ headers?: { [key: string]: string }
40
+ }
41
+
42
+ export interface HandlerError {
43
+ status: number
44
+ message?: string
45
+ }
46
+
47
+ export type HandlerOutput = HandlerError | HandlerSuccess
@@ -50,6 +50,8 @@ export interface InputSchema {
50
50
  subjectBlobCids?: string[]
51
51
  createdBy: string
52
52
  modTool?: ToolsOzoneModerationDefs.ModTool
53
+ /** 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. */
54
+ externalId?: string
53
55
  }
54
56
 
55
57
  export type OutputSchema = ToolsOzoneModerationDefs.ModEventView
@@ -68,7 +70,7 @@ export interface HandlerSuccess {
68
70
  export interface HandlerError {
69
71
  status: number
70
72
  message?: string
71
- error?: 'SubjectHasAction'
73
+ error?: 'SubjectHasAction' | 'DuplicateExternalId'
72
74
  }
73
75
 
74
76
  export type HandlerOutput = HandlerError | HandlerSuccess