@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
@@ -7031,47 +7031,6 @@ exports.schemaDict = {
7031
7031
  },
7032
7032
  },
7033
7033
  },
7034
- AppBskyFeedGetPosts: {
7035
- lexicon: 1,
7036
- id: 'app.bsky.feed.getPosts',
7037
- defs: {
7038
- main: {
7039
- type: 'query',
7040
- description: "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
7041
- parameters: {
7042
- type: 'params',
7043
- required: ['uris'],
7044
- properties: {
7045
- uris: {
7046
- type: 'array',
7047
- description: 'List of post AT-URIs to return hydrated views for.',
7048
- items: {
7049
- type: 'string',
7050
- format: 'at-uri',
7051
- },
7052
- maxLength: 25,
7053
- },
7054
- },
7055
- },
7056
- output: {
7057
- encoding: 'application/json',
7058
- schema: {
7059
- type: 'object',
7060
- required: ['posts'],
7061
- properties: {
7062
- posts: {
7063
- type: 'array',
7064
- items: {
7065
- type: 'ref',
7066
- ref: 'lex:app.bsky.feed.defs#postView',
7067
- },
7068
- },
7069
- },
7070
- },
7071
- },
7072
- },
7073
- },
7074
- },
7075
7034
  AppBskyFeedGetPostThread: {
7076
7035
  lexicon: 1,
7077
7036
  id: 'app.bsky.feed.getPostThread',
@@ -7133,6 +7092,47 @@ exports.schemaDict = {
7133
7092
  },
7134
7093
  },
7135
7094
  },
7095
+ AppBskyFeedGetPosts: {
7096
+ lexicon: 1,
7097
+ id: 'app.bsky.feed.getPosts',
7098
+ defs: {
7099
+ main: {
7100
+ type: 'query',
7101
+ description: "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
7102
+ parameters: {
7103
+ type: 'params',
7104
+ required: ['uris'],
7105
+ properties: {
7106
+ uris: {
7107
+ type: 'array',
7108
+ description: 'List of post AT-URIs to return hydrated views for.',
7109
+ items: {
7110
+ type: 'string',
7111
+ format: 'at-uri',
7112
+ },
7113
+ maxLength: 25,
7114
+ },
7115
+ },
7116
+ },
7117
+ output: {
7118
+ encoding: 'application/json',
7119
+ schema: {
7120
+ type: 'object',
7121
+ required: ['posts'],
7122
+ properties: {
7123
+ posts: {
7124
+ type: 'array',
7125
+ items: {
7126
+ type: 'ref',
7127
+ ref: 'lex:app.bsky.feed.defs#postView',
7128
+ },
7129
+ },
7130
+ },
7131
+ },
7132
+ },
7133
+ },
7134
+ },
7135
+ },
7136
7136
  AppBskyFeedGetQuotes: {
7137
7137
  lexicon: 1,
7138
7138
  id: 'app.bsky.feed.getQuotes',
@@ -10028,6 +10028,39 @@ exports.schemaDict = {
10028
10028
  },
10029
10029
  },
10030
10030
  },
10031
+ AppBskyNotificationUnregisterPush: {
10032
+ lexicon: 1,
10033
+ id: 'app.bsky.notification.unregisterPush',
10034
+ defs: {
10035
+ main: {
10036
+ type: 'procedure',
10037
+ description: '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.',
10038
+ input: {
10039
+ encoding: 'application/json',
10040
+ schema: {
10041
+ type: 'object',
10042
+ required: ['serviceDid', 'token', 'platform', 'appId'],
10043
+ properties: {
10044
+ serviceDid: {
10045
+ type: 'string',
10046
+ format: 'did',
10047
+ },
10048
+ token: {
10049
+ type: 'string',
10050
+ },
10051
+ platform: {
10052
+ type: 'string',
10053
+ knownValues: ['ios', 'android', 'web'],
10054
+ },
10055
+ appId: {
10056
+ type: 'string',
10057
+ },
10058
+ },
10059
+ },
10060
+ },
10061
+ },
10062
+ },
10063
+ },
10031
10064
  AppBskyNotificationUpdateSeen: {
10032
10065
  lexicon: 1,
10033
10066
  id: 'app.bsky.notification.updateSeen',
@@ -10321,6 +10354,81 @@ exports.schemaDict = {
10321
10354
  },
10322
10355
  },
10323
10356
  },
10357
+ ageAssuranceState: {
10358
+ type: 'object',
10359
+ description: 'The computed state of the age assurance process, returned to the user in question on certain authenticated requests.',
10360
+ required: ['status'],
10361
+ properties: {
10362
+ lastInitiatedAt: {
10363
+ type: 'string',
10364
+ format: 'datetime',
10365
+ description: 'The timestamp when this state was last updated.',
10366
+ },
10367
+ status: {
10368
+ type: 'string',
10369
+ description: 'The status of the age assurance process.',
10370
+ knownValues: ['unknown', 'pending', 'assured', 'blocked'],
10371
+ },
10372
+ },
10373
+ },
10374
+ ageAssuranceEvent: {
10375
+ type: 'object',
10376
+ description: 'Object used to store age assurance data in stash.',
10377
+ required: ['createdAt', 'status', 'attemptId'],
10378
+ properties: {
10379
+ createdAt: {
10380
+ type: 'string',
10381
+ format: 'datetime',
10382
+ description: 'The date and time of this write operation.',
10383
+ },
10384
+ status: {
10385
+ type: 'string',
10386
+ description: 'The status of the age assurance process.',
10387
+ knownValues: ['unknown', 'pending', 'assured'],
10388
+ },
10389
+ attemptId: {
10390
+ type: 'string',
10391
+ description: 'The unique identifier for this instance of the age assurance flow, in UUID format.',
10392
+ },
10393
+ email: {
10394
+ type: 'string',
10395
+ description: 'The email used for AA.',
10396
+ },
10397
+ initIp: {
10398
+ type: 'string',
10399
+ description: 'The IP address used when initiating the AA flow.',
10400
+ },
10401
+ initUa: {
10402
+ type: 'string',
10403
+ description: 'The user agent used when initiating the AA flow.',
10404
+ },
10405
+ completeIp: {
10406
+ type: 'string',
10407
+ description: 'The IP address used when completing the AA flow.',
10408
+ },
10409
+ completeUa: {
10410
+ type: 'string',
10411
+ description: 'The user agent used when completing the AA flow.',
10412
+ },
10413
+ },
10414
+ },
10415
+ },
10416
+ },
10417
+ AppBskyUnspeccedGetAgeAssuranceState: {
10418
+ lexicon: 1,
10419
+ id: 'app.bsky.unspecced.getAgeAssuranceState',
10420
+ defs: {
10421
+ main: {
10422
+ type: 'query',
10423
+ description: '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.',
10424
+ output: {
10425
+ encoding: 'application/json',
10426
+ schema: {
10427
+ type: 'ref',
10428
+ ref: 'lex:app.bsky.unspecced.defs#ageAssuranceState',
10429
+ },
10430
+ },
10431
+ },
10324
10432
  },
10325
10433
  },
10326
10434
  AppBskyUnspeccedGetConfig: {
@@ -11056,6 +11164,44 @@ exports.schemaDict = {
11056
11164
  },
11057
11165
  },
11058
11166
  },
11167
+ AppBskyUnspeccedInitAgeAssurance: {
11168
+ lexicon: 1,
11169
+ id: 'app.bsky.unspecced.initAgeAssurance',
11170
+ defs: {
11171
+ main: {
11172
+ type: 'procedure',
11173
+ description: "Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.",
11174
+ input: {
11175
+ encoding: 'application/json',
11176
+ schema: {
11177
+ type: 'object',
11178
+ required: ['email', 'language', 'countryCode'],
11179
+ properties: {
11180
+ email: {
11181
+ type: 'string',
11182
+ description: "The user's email address to receive assurance instructions.",
11183
+ },
11184
+ language: {
11185
+ type: 'string',
11186
+ description: "The user's preferred language for communication during the assurance process.",
11187
+ },
11188
+ countryCode: {
11189
+ type: 'string',
11190
+ description: "An ISO 3166-1 alpha-2 code of the user's location.",
11191
+ },
11192
+ },
11193
+ },
11194
+ },
11195
+ output: {
11196
+ encoding: 'application/json',
11197
+ schema: {
11198
+ type: 'ref',
11199
+ ref: 'lex:app.bsky.unspecced.defs#ageAssuranceState',
11200
+ },
11201
+ },
11202
+ },
11203
+ },
11204
+ },
11059
11205
  AppBskyUnspeccedSearchActorsSkeleton: {
11060
11206
  lexicon: 1,
11061
11207
  id: 'app.bsky.unspecced.searchActorsSkeleton',
@@ -12859,8 +13005,8 @@ exports.ids = {
12859
13005
  AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
12860
13006
  AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
12861
13007
  AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
12862
- AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
12863
13008
  AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
13009
+ AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
12864
13010
  AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
12865
13011
  AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
12866
13012
  AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
@@ -12914,9 +13060,11 @@ exports.ids = {
12914
13060
  AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
12915
13061
  AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
12916
13062
  AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
13063
+ AppBskyNotificationUnregisterPush: 'app.bsky.notification.unregisterPush',
12917
13064
  AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
12918
13065
  AppBskyRichtextFacet: 'app.bsky.richtext.facet',
12919
13066
  AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
13067
+ AppBskyUnspeccedGetAgeAssuranceState: 'app.bsky.unspecced.getAgeAssuranceState',
12920
13068
  AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
12921
13069
  AppBskyUnspeccedGetPopularFeedGenerators: 'app.bsky.unspecced.getPopularFeedGenerators',
12922
13070
  AppBskyUnspeccedGetPostThreadOtherV2: 'app.bsky.unspecced.getPostThreadOtherV2',
@@ -12932,6 +13080,7 @@ exports.ids = {
12932
13080
  AppBskyUnspeccedGetTrendingTopics: 'app.bsky.unspecced.getTrendingTopics',
12933
13081
  AppBskyUnspeccedGetTrends: 'app.bsky.unspecced.getTrends',
12934
13082
  AppBskyUnspeccedGetTrendsSkeleton: 'app.bsky.unspecced.getTrendsSkeleton',
13083
+ AppBskyUnspeccedInitAgeAssurance: 'app.bsky.unspecced.initAgeAssurance',
12935
13084
  AppBskyUnspeccedSearchActorsSkeleton: 'app.bsky.unspecced.searchActorsSkeleton',
12936
13085
  AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
12937
13086
  AppBskyUnspeccedSearchStarterPacksSkeleton: 'app.bsky.unspecced.searchStarterPacksSkeleton',