@atproto/bsky 0.0.170 → 0.0.172

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 (162) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  3. package/dist/api/app/bsky/notification/registerPush.js +6 -7
  4. package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
  5. package/dist/api/app/bsky/notification/unregisterPush.d.ts +4 -0
  6. package/dist/api/app/bsky/notification/unregisterPush.d.ts.map +1 -0
  7. package/dist/api/app/bsky/notification/unregisterPush.js +33 -0
  8. package/dist/api/app/bsky/notification/unregisterPush.js.map +1 -0
  9. package/dist/api/app/bsky/notification/util.d.ts +4 -0
  10. package/dist/api/app/bsky/notification/util.d.ts.map +1 -1
  11. package/dist/api/app/bsky/notification/util.js +14 -1
  12. package/dist/api/app/bsky/notification/util.js.map +1 -1
  13. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.d.ts +4 -0
  14. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.d.ts.map +1 -0
  15. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.js +36 -0
  16. package/dist/api/app/bsky/unspecced/getAgeAssuranceState.js.map +1 -0
  17. package/dist/api/app/bsky/unspecced/initAgeAssurance.d.ts +4 -0
  18. package/dist/api/app/bsky/unspecced/initAgeAssurance.d.ts.map +1 -0
  19. package/dist/api/app/bsky/unspecced/initAgeAssurance.js +59 -0
  20. package/dist/api/app/bsky/unspecced/initAgeAssurance.js.map +1 -0
  21. package/dist/api/external.d.ts +4 -0
  22. package/dist/api/external.d.ts.map +1 -0
  23. package/dist/api/external.js +47 -0
  24. package/dist/api/external.js.map +1 -0
  25. package/dist/api/index.d.ts +1 -0
  26. package/dist/api/index.d.ts.map +1 -1
  27. package/dist/api/index.js +6 -1
  28. package/dist/api/index.js.map +1 -1
  29. package/dist/api/kws/api.d.ts +4 -0
  30. package/dist/api/kws/api.d.ts.map +1 -0
  31. package/dist/api/kws/api.js +60 -0
  32. package/dist/api/kws/api.js.map +1 -0
  33. package/dist/api/kws/index.d.ts +4 -0
  34. package/dist/api/kws/index.d.ts.map +1 -0
  35. package/dist/api/kws/index.js +21 -0
  36. package/dist/api/kws/index.js.map +1 -0
  37. package/dist/api/kws/types.d.ts +100 -0
  38. package/dist/api/kws/types.d.ts.map +1 -0
  39. package/dist/api/kws/types.js +29 -0
  40. package/dist/api/kws/types.js.map +1 -0
  41. package/dist/api/kws/util.d.ts +21 -0
  42. package/dist/api/kws/util.d.ts.map +1 -0
  43. package/dist/api/kws/util.js +78 -0
  44. package/dist/api/kws/util.js.map +1 -0
  45. package/dist/api/kws/webhook.d.ts +5 -0
  46. package/dist/api/kws/webhook.d.ts.map +1 -0
  47. package/dist/api/kws/webhook.js +80 -0
  48. package/dist/api/kws/webhook.js.map +1 -0
  49. package/dist/config.d.ts +12 -0
  50. package/dist/config.d.ts.map +1 -1
  51. package/dist/config.js +40 -0
  52. package/dist/config.js.map +1 -1
  53. package/dist/context.d.ts +3 -0
  54. package/dist/context.d.ts.map +1 -1
  55. package/dist/context.js +3 -0
  56. package/dist/context.js.map +1 -1
  57. package/dist/data-plane/bsync/index.d.ts.map +1 -1
  58. package/dist/data-plane/bsync/index.js +52 -33
  59. package/dist/data-plane/bsync/index.js.map +1 -1
  60. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.d.ts +4 -0
  61. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.d.ts.map +1 -0
  62. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.js +22 -0
  63. package/dist/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.js.map +1 -0
  64. package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
  65. package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
  66. package/dist/data-plane/server/db/migrations/index.js +2 -0
  67. package/dist/data-plane/server/db/migrations/index.js.map +1 -1
  68. package/dist/data-plane/server/db/tables/actor.d.ts +2 -0
  69. package/dist/data-plane/server/db/tables/actor.d.ts.map +1 -1
  70. package/dist/data-plane/server/db/tables/actor.js.map +1 -1
  71. package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
  72. package/dist/data-plane/server/routes/profile.js +14 -1
  73. package/dist/data-plane/server/routes/profile.js.map +1 -1
  74. package/dist/feature-gates.d.ts +2 -1
  75. package/dist/feature-gates.d.ts.map +1 -1
  76. package/dist/feature-gates.js +1 -0
  77. package/dist/feature-gates.js.map +1 -1
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +5 -0
  80. package/dist/index.js.map +1 -1
  81. package/dist/kws.d.ts +16 -0
  82. package/dist/kws.d.ts.map +1 -0
  83. package/dist/kws.js +86 -0
  84. package/dist/kws.js.map +1 -0
  85. package/dist/lexicon/index.d.ts +8 -2
  86. package/dist/lexicon/index.d.ts.map +1 -1
  87. package/dist/lexicon/index.js +16 -4
  88. package/dist/lexicon/index.js.map +1 -1
  89. package/dist/lexicon/lexicons.d.ts +374 -82
  90. package/dist/lexicon/lexicons.d.ts.map +1 -1
  91. package/dist/lexicon/lexicons.js +191 -42
  92. package/dist/lexicon/lexicons.js.map +1 -1
  93. package/dist/lexicon/types/app/bsky/notification/unregisterPush.d.ts +17 -0
  94. package/dist/lexicon/types/app/bsky/notification/unregisterPush.d.ts.map +1 -0
  95. package/dist/lexicon/types/app/bsky/notification/unregisterPush.js +7 -0
  96. package/dist/lexicon/types/app/bsky/notification/unregisterPush.js.map +1 -0
  97. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts +32 -0
  98. package/dist/lexicon/types/app/bsky/unspecced/defs.d.ts.map +1 -1
  99. package/dist/lexicon/types/app/bsky/unspecced/defs.js +18 -0
  100. package/dist/lexicon/types/app/bsky/unspecced/defs.js.map +1 -1
  101. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.d.ts +18 -0
  102. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.d.ts.map +1 -0
  103. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.js +7 -0
  104. package/dist/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.js.map +1 -0
  105. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.d.ts +28 -0
  106. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.d.ts.map +1 -0
  107. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.js +7 -0
  108. package/dist/lexicon/types/app/bsky/unspecced/initAgeAssurance.js.map +1 -0
  109. package/dist/proto/bsky_pb.d.ts +33 -0
  110. package/dist/proto/bsky_pb.d.ts.map +1 -1
  111. package/dist/proto/bsky_pb.js +112 -4
  112. package/dist/proto/bsky_pb.js.map +1 -1
  113. package/dist/proto/courier_connect.d.ts +19 -1
  114. package/dist/proto/courier_connect.d.ts.map +1 -1
  115. package/dist/proto/courier_connect.js +18 -0
  116. package/dist/proto/courier_connect.js.map +1 -1
  117. package/dist/proto/courier_pb.d.ts +76 -0
  118. package/dist/proto/courier_pb.d.ts.map +1 -1
  119. package/dist/proto/courier_pb.js +233 -1
  120. package/dist/proto/courier_pb.js.map +1 -1
  121. package/dist/stash.d.ts +1 -0
  122. package/dist/stash.d.ts.map +1 -1
  123. package/dist/stash.js +1 -0
  124. package/dist/stash.js.map +1 -1
  125. package/package.json +7 -4
  126. package/proto/bsky.proto +8 -0
  127. package/proto/courier.proto +18 -0
  128. package/src/api/app/bsky/notification/registerPush.ts +5 -8
  129. package/src/api/app/bsky/notification/unregisterPush.ts +38 -0
  130. package/src/api/app/bsky/notification/util.ts +18 -0
  131. package/src/api/app/bsky/unspecced/getAgeAssuranceState.ts +46 -0
  132. package/src/api/app/bsky/unspecced/initAgeAssurance.ts +71 -0
  133. package/src/api/external.ts +13 -0
  134. package/src/api/index.ts +6 -0
  135. package/src/api/kws/api.ts +92 -0
  136. package/src/api/kws/index.ts +23 -0
  137. package/src/api/kws/types.ts +67 -0
  138. package/src/api/kws/util.ts +111 -0
  139. package/src/api/kws/webhook.ts +107 -0
  140. package/src/config.ts +59 -0
  141. package/src/context.ts +6 -0
  142. package/src/data-plane/bsync/index.ts +69 -33
  143. package/src/data-plane/server/db/migrations/20250627T025331240Z-add-actor-age-assurance-columns.ts +22 -0
  144. package/src/data-plane/server/db/migrations/index.ts +1 -0
  145. package/src/data-plane/server/db/tables/actor.ts +2 -0
  146. package/src/data-plane/server/routes/profile.ts +16 -1
  147. package/src/feature-gates.ts +1 -0
  148. package/src/index.ts +7 -1
  149. package/src/kws.ts +108 -0
  150. package/src/lexicon/index.ts +50 -11
  151. package/src/lexicon/lexicons.ts +201 -43
  152. package/src/lexicon/types/app/bsky/notification/unregisterPush.ts +36 -0
  153. package/src/lexicon/types/app/bsky/unspecced/defs.ts +50 -0
  154. package/src/lexicon/types/app/bsky/unspecced/getAgeAssuranceState.ts +34 -0
  155. package/src/lexicon/types/app/bsky/unspecced/initAgeAssurance.ts +47 -0
  156. package/src/proto/bsky_pb.ts +90 -0
  157. package/src/proto/courier_connect.ts +22 -0
  158. package/src/proto/courier_pb.ts +246 -0
  159. package/src/stash.ts +3 -0
  160. package/tests/views/age-assurance.test.ts +425 -0
  161. package/tsconfig.build.tsbuildinfo +1 -1
  162. package/tsconfig.tests.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',
@@ -13306,8 +13460,8 @@ export const ids = {
13306
13460
  AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
13307
13461
  AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
13308
13462
  AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
13309
- AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
13310
13463
  AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
13464
+ AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
13311
13465
  AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
13312
13466
  AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
13313
13467
  AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
@@ -13365,9 +13519,12 @@ export const ids = {
13365
13519
  AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
13366
13520
  AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
13367
13521
  AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
13522
+ AppBskyNotificationUnregisterPush: 'app.bsky.notification.unregisterPush',
13368
13523
  AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
13369
13524
  AppBskyRichtextFacet: 'app.bsky.richtext.facet',
13370
13525
  AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
13526
+ AppBskyUnspeccedGetAgeAssuranceState:
13527
+ 'app.bsky.unspecced.getAgeAssuranceState',
13371
13528
  AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
13372
13529
  AppBskyUnspeccedGetPopularFeedGenerators:
13373
13530
  'app.bsky.unspecced.getPopularFeedGenerators',
@@ -13391,6 +13548,7 @@ export const ids = {
13391
13548
  AppBskyUnspeccedGetTrendingTopics: 'app.bsky.unspecced.getTrendingTopics',
13392
13549
  AppBskyUnspeccedGetTrends: 'app.bsky.unspecced.getTrends',
13393
13550
  AppBskyUnspeccedGetTrendsSkeleton: 'app.bsky.unspecced.getTrendsSkeleton',
13551
+ AppBskyUnspeccedInitAgeAssurance: 'app.bsky.unspecced.initAgeAssurance',
13394
13552
  AppBskyUnspeccedSearchActorsSkeleton:
13395
13553
  'app.bsky.unspecced.searchActorsSkeleton',
13396
13554
  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
@@ -5458,6 +5458,11 @@ export class GetActorsRequest extends Message<GetActorsRequest> {
5458
5458
  */
5459
5459
  skipCacheForDids: string[] = []
5460
5460
 
5461
+ /**
5462
+ * @generated from field: repeated string return_age_assurance_for_dids = 3;
5463
+ */
5464
+ returnAgeAssuranceForDids: string[] = []
5465
+
5461
5466
  constructor(data?: PartialMessage<GetActorsRequest>) {
5462
5467
  super()
5463
5468
  proto3.util.initPartial(data, this)
@@ -5480,6 +5485,13 @@ export class GetActorsRequest extends Message<GetActorsRequest> {
5480
5485
  T: 9 /* ScalarType.STRING */,
5481
5486
  repeated: true,
5482
5487
  },
5488
+ {
5489
+ no: 3,
5490
+ name: 'return_age_assurance_for_dids',
5491
+ kind: 'scalar',
5492
+ T: 9 /* ScalarType.STRING */,
5493
+ repeated: true,
5494
+ },
5483
5495
  ])
5484
5496
 
5485
5497
  static fromBinary(
@@ -5609,6 +5621,11 @@ export class ActorInfo extends Message<ActorInfo> {
5609
5621
  */
5610
5622
  allowActivitySubscriptionsFrom = ''
5611
5623
 
5624
+ /**
5625
+ * @generated from field: optional bsky.AgeAssuranceStatus age_assurance_status = 19;
5626
+ */
5627
+ ageAssuranceStatus?: AgeAssuranceStatus
5628
+
5612
5629
  constructor(data?: PartialMessage<ActorInfo>) {
5613
5630
  super()
5614
5631
  proto3.util.initPartial(data, this)
@@ -5683,6 +5700,13 @@ export class ActorInfo extends Message<ActorInfo> {
5683
5700
  kind: 'scalar',
5684
5701
  T: 9 /* ScalarType.STRING */,
5685
5702
  },
5703
+ {
5704
+ no: 19,
5705
+ name: 'age_assurance_status',
5706
+ kind: 'message',
5707
+ T: AgeAssuranceStatus,
5708
+ opt: true,
5709
+ },
5686
5710
  ])
5687
5711
 
5688
5712
  static fromBinary(
@@ -5714,6 +5738,72 @@ export class ActorInfo extends Message<ActorInfo> {
5714
5738
  }
5715
5739
  }
5716
5740
 
5741
+ /**
5742
+ * @generated from message bsky.AgeAssuranceStatus
5743
+ */
5744
+ export class AgeAssuranceStatus extends Message<AgeAssuranceStatus> {
5745
+ /**
5746
+ * @generated from field: string status = 1;
5747
+ */
5748
+ status = ''
5749
+
5750
+ /**
5751
+ * @generated from field: google.protobuf.Timestamp last_initiated_at = 2;
5752
+ */
5753
+ lastInitiatedAt?: Timestamp
5754
+
5755
+ /**
5756
+ * @generated from field: bool override_applied = 3;
5757
+ */
5758
+ overrideApplied = false
5759
+
5760
+ constructor(data?: PartialMessage<AgeAssuranceStatus>) {
5761
+ super()
5762
+ proto3.util.initPartial(data, this)
5763
+ }
5764
+
5765
+ static readonly runtime: typeof proto3 = proto3
5766
+ static readonly typeName = 'bsky.AgeAssuranceStatus'
5767
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
5768
+ { no: 1, name: 'status', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
5769
+ { no: 2, name: 'last_initiated_at', kind: 'message', T: Timestamp },
5770
+ {
5771
+ no: 3,
5772
+ name: 'override_applied',
5773
+ kind: 'scalar',
5774
+ T: 8 /* ScalarType.BOOL */,
5775
+ },
5776
+ ])
5777
+
5778
+ static fromBinary(
5779
+ bytes: Uint8Array,
5780
+ options?: Partial<BinaryReadOptions>,
5781
+ ): AgeAssuranceStatus {
5782
+ return new AgeAssuranceStatus().fromBinary(bytes, options)
5783
+ }
5784
+
5785
+ static fromJson(
5786
+ jsonValue: JsonValue,
5787
+ options?: Partial<JsonReadOptions>,
5788
+ ): AgeAssuranceStatus {
5789
+ return new AgeAssuranceStatus().fromJson(jsonValue, options)
5790
+ }
5791
+
5792
+ static fromJsonString(
5793
+ jsonString: string,
5794
+ options?: Partial<JsonReadOptions>,
5795
+ ): AgeAssuranceStatus {
5796
+ return new AgeAssuranceStatus().fromJsonString(jsonString, options)
5797
+ }
5798
+
5799
+ static equals(
5800
+ a: AgeAssuranceStatus | PlainMessage<AgeAssuranceStatus> | undefined,
5801
+ b: AgeAssuranceStatus | PlainMessage<AgeAssuranceStatus> | undefined,
5802
+ ): boolean {
5803
+ return proto3.util.equals(AgeAssuranceStatus, a, b)
5804
+ }
5805
+ }
5806
+
5717
5807
  /**
5718
5808
  * @generated from message bsky.GetActorsResponse
5719
5809
  */
@@ -10,6 +10,10 @@ import {
10
10
  PushNotificationsResponse,
11
11
  RegisterDeviceTokenRequest,
12
12
  RegisterDeviceTokenResponse,
13
+ SetAgeRestrictedRequest,
14
+ SetAgeRestrictedResponse,
15
+ UnregisterDeviceTokenRequest,
16
+ UnregisterDeviceTokenResponse,
13
17
  } from './courier_pb'
14
18
  import { MethodKind } from '@bufbuild/protobuf'
15
19
 
@@ -46,5 +50,23 @@ export const Service = {
46
50
  O: RegisterDeviceTokenResponse,
47
51
  kind: MethodKind.Unary,
48
52
  },
53
+ /**
54
+ * @generated from rpc courier.Service.UnregisterDeviceToken
55
+ */
56
+ unregisterDeviceToken: {
57
+ name: 'UnregisterDeviceToken',
58
+ I: UnregisterDeviceTokenRequest,
59
+ O: UnregisterDeviceTokenResponse,
60
+ kind: MethodKind.Unary,
61
+ },
62
+ /**
63
+ * @generated from rpc courier.Service.SetAgeRestricted
64
+ */
65
+ setAgeRestricted: {
66
+ name: 'SetAgeRestricted',
67
+ I: SetAgeRestrictedRequest,
68
+ O: SetAgeRestrictedResponse,
69
+ kind: MethodKind.Unary,
70
+ },
49
71
  },
50
72
  } as const