@atproto/api 0.24.3 → 0.26.0

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 (34) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/client/index.d.ts +28 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +35 -0
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +498 -28
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +253 -14
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/actor/defs.d.ts +16 -0
  11. package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
  12. package/dist/client/types/app/bsky/actor/defs.js +7 -0
  13. package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
  14. package/dist/client/types/app/bsky/actor/link.d.ts +24 -0
  15. package/dist/client/types/app/bsky/actor/link.d.ts.map +1 -0
  16. package/dist/client/types/app/bsky/actor/link.js +18 -0
  17. package/dist/client/types/app/bsky/actor/link.js.map +1 -0
  18. package/dist/client/types/app/bsky/actor/profile.d.ts +2 -0
  19. package/dist/client/types/app/bsky/actor/profile.d.ts.map +1 -1
  20. package/dist/client/types/app/bsky/actor/profile.js.map +1 -1
  21. package/dist/client/types/app/bsky/embed/getEmbedExternalView.d.ts +11 -4
  22. package/dist/client/types/app/bsky/embed/getEmbedExternalView.d.ts.map +1 -1
  23. package/dist/client/types/app/bsky/embed/getEmbedExternalView.js.map +1 -1
  24. package/dist/client/types/app/bsky/notification/getGroupedNotifications.d.ts +49 -2
  25. package/dist/client/types/app/bsky/notification/getGroupedNotifications.d.ts.map +1 -1
  26. package/dist/client/types/app/bsky/notification/getGroupedNotifications.js +42 -0
  27. package/dist/client/types/app/bsky/notification/getGroupedNotifications.js.map +1 -1
  28. package/dist/client/types/tools/ozone/inbox/defs.d.ts +7 -1
  29. package/dist/client/types/tools/ozone/inbox/defs.d.ts.map +1 -1
  30. package/dist/client/types/tools/ozone/inbox/defs.js.map +1 -1
  31. package/dist/client/types/tools/ozone/inbox/putNotificationPreferences.d.ts +6 -1
  32. package/dist/client/types/tools/ozone/inbox/putNotificationPreferences.d.ts.map +1 -1
  33. package/dist/client/types/tools/ozone/inbox/putNotificationPreferences.js.map +1 -1
  34. package/package.json +2 -2
@@ -229,6 +229,14 @@ export const schemaDict = {
229
229
  type: 'ref',
230
230
  ref: 'lex:com.atproto.repo.strongRef',
231
231
  },
232
+ links: {
233
+ type: 'array',
234
+ description: "The profile's links, in display order. Links that were taken down or don't resolve are left out.",
235
+ items: {
236
+ type: 'ref',
237
+ ref: 'lex:app.bsky.actor.defs#profileLinkView',
238
+ },
239
+ },
232
240
  verification: {
233
241
  type: 'ref',
234
242
  ref: 'lex:app.bsky.actor.defs#verificationState',
@@ -300,6 +308,43 @@ export const schemaDict = {
300
308
  },
301
309
  },
302
310
  },
311
+ profileLinkView: {
312
+ type: 'object',
313
+ required: ['uri', 'cid', 'url'],
314
+ properties: {
315
+ uri: {
316
+ type: 'string',
317
+ format: 'at-uri',
318
+ description: 'The app.bsky.actor.link record, e.g. for reporting the link.',
319
+ },
320
+ cid: {
321
+ type: 'string',
322
+ format: 'cid',
323
+ },
324
+ url: {
325
+ type: 'string',
326
+ format: 'uri',
327
+ description: 'The link destination.',
328
+ },
329
+ title: {
330
+ type: 'string',
331
+ maxGraphemes: 40,
332
+ maxLength: 320,
333
+ },
334
+ icon: {
335
+ type: 'string',
336
+ format: 'uri',
337
+ description: "Image URL for the destination site's icon.",
338
+ },
339
+ labels: {
340
+ type: 'array',
341
+ items: {
342
+ type: 'ref',
343
+ ref: 'lex:com.atproto.label.defs#label',
344
+ },
345
+ },
346
+ },
347
+ },
303
348
  profileAssociatedActivitySubscription: {
304
349
  type: 'object',
305
350
  required: ['allowSubscriptions'],
@@ -1059,6 +1104,49 @@ export const schemaDict = {
1059
1104
  },
1060
1105
  },
1061
1106
  },
1107
+ AppBskyActorLink: {
1108
+ lexicon: 1,
1109
+ id: 'app.bsky.actor.link',
1110
+ defs: {
1111
+ main: {
1112
+ type: 'record',
1113
+ description: "A link shown on the account's profile. The profile record's links field sets which links are shown, and in what order.",
1114
+ key: 'tid',
1115
+ record: {
1116
+ type: 'object',
1117
+ required: ['url', 'createdAt'],
1118
+ properties: {
1119
+ url: {
1120
+ type: 'string',
1121
+ format: 'uri',
1122
+ description: 'The link destination, an https URL.',
1123
+ },
1124
+ title: {
1125
+ type: 'string',
1126
+ description: "Optional label for the link. Clients can fall back to the destination's domain.",
1127
+ maxGraphemes: 40,
1128
+ maxLength: 320,
1129
+ },
1130
+ icon: {
1131
+ type: 'blob',
1132
+ description: "The destination site's icon, uploaded when the link is saved.",
1133
+ accept: ['image/png', 'image/jpeg', 'image/webp'],
1134
+ maxSize: 100000,
1135
+ },
1136
+ createdAt: {
1137
+ type: 'string',
1138
+ format: 'datetime',
1139
+ },
1140
+ labels: {
1141
+ type: 'union',
1142
+ description: 'Self-label values for this link.',
1143
+ refs: ['lex:com.atproto.label.defs#selfLabels'],
1144
+ },
1145
+ },
1146
+ },
1147
+ },
1148
+ },
1149
+ },
1062
1150
  AppBskyActorProfile: {
1063
1151
  lexicon: 1,
1064
1152
  id: 'app.bsky.actor.profile',
@@ -1116,6 +1204,15 @@ export const schemaDict = {
1116
1204
  type: 'ref',
1117
1205
  ref: 'lex:com.atproto.repo.strongRef',
1118
1206
  },
1207
+ links: {
1208
+ type: 'array',
1209
+ description: 'Links shown on the profile, in display order. Each ref points to an app.bsky.actor.link record in this repo.',
1210
+ maxLength: 10,
1211
+ items: {
1212
+ type: 'ref',
1213
+ ref: 'lex:com.atproto.repo.strongRef',
1214
+ },
1215
+ },
1119
1216
  createdAt: {
1120
1217
  type: 'string',
1121
1218
  format: 'datetime',
@@ -3236,19 +3333,24 @@ export const schemaDict = {
3236
3333
  defs: {
3237
3334
  main: {
3238
3335
  type: 'query',
3239
- description: "Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs), the raw `associatedRecords`, and a hydrated `view`. The response is empty (`{}`) when no records were resolvable, or when validation determined the resolved records don't actually back the requested URL; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.",
3336
+ description: "Resolve one AT-URI record into the data needed to render an enhanced external embed. The records are validated against the requested `url` before any view is built. When validation passes, returns `data`, `associatedRefs` (strongRefs to embed into a post's external.associatedRefs) and the raw `associatedRecords`, plus a legacy `view` for Standard.site records only. When validation fails, only `unverifiedAssociatedRefs` and `unverifiedAssociatedRecords` are returned and no view or data is built. The response is empty (`{}`) when no record URI was usable or the record could not be resolved; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.",
3240
3337
  parameters: {
3241
3338
  type: 'params',
3242
- required: ['url', 'uris'],
3339
+ required: ['url'],
3243
3340
  properties: {
3244
3341
  url: {
3245
3342
  type: 'string',
3246
3343
  format: 'uri',
3247
- description: "The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. May be used for validation in the future.",
3344
+ description: "The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`, and validated against the resolved records.",
3345
+ },
3346
+ canonicalUri: {
3347
+ type: 'string',
3348
+ format: 'at-uri',
3349
+ description: 'The canonical AT URI of the atproto record found on the webpage. When provided, takes precedence over `uris`, which is then ignored.',
3248
3350
  },
3249
3351
  uris: {
3250
3352
  type: 'array',
3251
- description: 'AT-URIs of any Atmosphere records that can be resolved and used to construct #externalView views. Example: a site.standard.document and optionally its associated site.standard.publication.',
3353
+ description: "Legacy input for Standard.site callers, ignored when `canonicalUri` is provided. A single record is selected from it: the first site.standard.document URI, otherwise the first site.standard.publication URI. Other entries are ignored; a document's publication is discovered from the document itself.",
3252
3354
  items: {
3253
3355
  type: 'string',
3254
3356
  format: 'at-uri',
@@ -3265,7 +3367,7 @@ export const schemaDict = {
3265
3367
  view: {
3266
3368
  type: 'ref',
3267
3369
  ref: 'lex:app.bsky.embed.external#view',
3268
- description: 'Hydrated view of the embed. Present only when the resolved records back the requested URL and supply enough information to populate the required `viewExternal` fields. Omitted alongside the rest of the response when no records resolved or validation failed.',
3370
+ description: 'Legacy hydrated view of the embed, returned for Standard.site records only. Present only when validation passed and the records supply enough information to populate the required `viewExternal` fields.',
3269
3371
  },
3270
3372
  data: {
3271
3373
  type: 'union',
@@ -3275,7 +3377,7 @@ export const schemaDict = {
3275
3377
  'lex:app.bsky.embed.external#viewGallery',
3276
3378
  'lex:app.bsky.embed.external#viewLivestream',
3277
3379
  ],
3278
- description: 'Preferred to #view. Hydrated data of the embed. Present only when the resolved records back the requested URL and supply enough information to populate the required fields. Omitted alongside the rest of the response when no records resolved or validation failed.',
3380
+ description: 'Preferred to #view. Hydrated data of the embed. Present only when validation passed and the records supply enough information to populate the required fields.',
3279
3381
  },
3280
3382
  associatedRefs: {
3281
3383
  type: 'array',
@@ -3283,13 +3385,28 @@ export const schemaDict = {
3283
3385
  type: 'ref',
3284
3386
  ref: 'lex:com.atproto.repo.strongRef',
3285
3387
  },
3286
- description: "StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs.",
3388
+ description: 'StrongRefs (URI+CID) of the Atmosphere records selected for persistence in a post, suitable for embedding into its external.associatedRefs: the canonical record, plus only the additional records the service chooses to persist for its collection. This can be a subset of the records used to render `data`, which may also draw on other hydrated records such as recommendations, subscriptions, or favorites. Present only when validation passed. Index-aligned with `associatedRecords`.',
3287
3389
  },
3288
3390
  associatedRecords: {
3289
3391
  type: 'array',
3290
3392
  items: {
3291
3393
  type: 'unknown',
3292
- description: 'The raw record data of the Atmosphere records that backed this view. This is returned for convenience, to avoid the need for the client to separately fetch the record data for the associatedRefs. Example: the site.standard.document and site.standard.publication records that backed this view.',
3394
+ description: 'The raw record data of the Atmosphere records selected for persistence, index-aligned with `associatedRefs`. Returned for convenience, to avoid the client separately fetching them. Present only when validation passed.',
3395
+ },
3396
+ },
3397
+ unverifiedAssociatedRefs: {
3398
+ type: 'array',
3399
+ items: {
3400
+ type: 'ref',
3401
+ ref: 'lex:com.atproto.repo.strongRef',
3402
+ },
3403
+ description: 'StrongRefs (URI+CID) of the same persistence-selected Atmosphere records (the canonical record plus chosen additional records) when validation of the requested `url` failed. These must not be written to a post. Index-aligned with `unverifiedAssociatedRecords`.',
3404
+ },
3405
+ unverifiedAssociatedRecords: {
3406
+ type: 'array',
3407
+ items: {
3408
+ type: 'unknown',
3409
+ description: 'The raw record data of the persistence-selected Atmosphere records, index-aligned with `unverifiedAssociatedRefs`. Present only when validation failed.',
3293
3410
  },
3294
3411
  },
3295
3412
  },
@@ -7995,12 +8112,12 @@ export const schemaDict = {
7995
8112
  items: {
7996
8113
  type: 'union',
7997
8114
  refs: [
7998
- 'lex:app.bsky.actor.defs#profileViewDetailed',
8115
+ 'lex:app.bsky.actor.defs#profileViewBasic',
7999
8116
  'lex:app.bsky.feed.defs#blockedPost',
8000
8117
  'lex:app.bsky.feed.defs#generatorView',
8001
8118
  'lex:app.bsky.feed.defs#notFoundPost',
8002
8119
  'lex:app.bsky.feed.defs#postView',
8003
- 'lex:app.bsky.graph.defs#starterPackView',
8120
+ 'lex:app.bsky.graph.defs#starterPackViewBasic',
8004
8121
  ],
8005
8122
  },
8006
8123
  },
@@ -8033,6 +8150,9 @@ export const schemaDict = {
8033
8150
  refs: [
8034
8151
  'lex:app.bsky.notification.getGroupedNotifications#likeGroup',
8035
8152
  'lex:app.bsky.notification.getGroupedNotifications#multiPostLikeGroup',
8153
+ 'lex:app.bsky.notification.getGroupedNotifications#multiPostRepostGroup',
8154
+ 'lex:app.bsky.notification.getGroupedNotifications#multiPostLikeViaRepostGroup',
8155
+ 'lex:app.bsky.notification.getGroupedNotifications#multiPostRepostViaRepostGroup',
8036
8156
  'lex:app.bsky.notification.getGroupedNotifications#repostGroup',
8037
8157
  'lex:app.bsky.notification.getGroupedNotifications#likeViaRepostGroup',
8038
8158
  'lex:app.bsky.notification.getGroupedNotifications#repostViaRepostGroup',
@@ -8111,6 +8231,104 @@ export const schemaDict = {
8111
8231
  },
8112
8232
  },
8113
8233
  },
8234
+ multiPostRepostGroup: {
8235
+ type: 'object',
8236
+ description: 'Group of reposts by the same actor of different posts.',
8237
+ required: ['actor', 'items'],
8238
+ properties: {
8239
+ actor: {
8240
+ type: 'string',
8241
+ format: 'did',
8242
+ },
8243
+ items: {
8244
+ type: 'array',
8245
+ minLength: 2,
8246
+ items: {
8247
+ type: 'ref',
8248
+ ref: 'lex:app.bsky.notification.getGroupedNotifications#multiPostRepostItem',
8249
+ },
8250
+ },
8251
+ },
8252
+ },
8253
+ multiPostRepostItem: {
8254
+ type: 'object',
8255
+ description: "One post which was reposted by the group's actor.",
8256
+ required: ['post'],
8257
+ properties: {
8258
+ post: {
8259
+ type: 'string',
8260
+ format: 'at-uri',
8261
+ },
8262
+ },
8263
+ },
8264
+ multiPostLikeViaRepostGroup: {
8265
+ type: 'object',
8266
+ description: "Group of likes by the same actor on different posts via the requesting account's reposts.",
8267
+ required: ['actor', 'items'],
8268
+ properties: {
8269
+ actor: {
8270
+ type: 'string',
8271
+ format: 'did',
8272
+ },
8273
+ items: {
8274
+ type: 'array',
8275
+ minLength: 2,
8276
+ items: {
8277
+ type: 'ref',
8278
+ ref: 'lex:app.bsky.notification.getGroupedNotifications#multiPostLikeViaRepostItem',
8279
+ },
8280
+ },
8281
+ },
8282
+ },
8283
+ multiPostLikeViaRepostItem: {
8284
+ type: 'object',
8285
+ description: "One post which was liked by the group's actor via the requesting account's repost.",
8286
+ required: ['post', 'viaRepost'],
8287
+ properties: {
8288
+ post: {
8289
+ type: 'string',
8290
+ format: 'at-uri',
8291
+ },
8292
+ viaRepost: {
8293
+ type: 'string',
8294
+ format: 'at-uri',
8295
+ },
8296
+ },
8297
+ },
8298
+ multiPostRepostViaRepostGroup: {
8299
+ type: 'object',
8300
+ description: "Group of reposts by the same actor of different posts via the requesting account's reposts.",
8301
+ required: ['actor', 'items'],
8302
+ properties: {
8303
+ actor: {
8304
+ type: 'string',
8305
+ format: 'did',
8306
+ },
8307
+ items: {
8308
+ type: 'array',
8309
+ minLength: 2,
8310
+ items: {
8311
+ type: 'ref',
8312
+ ref: 'lex:app.bsky.notification.getGroupedNotifications#multiPostRepostViaRepostItem',
8313
+ },
8314
+ },
8315
+ },
8316
+ },
8317
+ multiPostRepostViaRepostItem: {
8318
+ type: 'object',
8319
+ description: "One post which was reposted by the group's actor via the requesting account's repost.",
8320
+ required: ['post', 'viaRepost'],
8321
+ properties: {
8322
+ post: {
8323
+ type: 'string',
8324
+ format: 'at-uri',
8325
+ },
8326
+ viaRepost: {
8327
+ type: 'string',
8328
+ format: 'at-uri',
8329
+ },
8330
+ },
8331
+ },
8114
8332
  repostGroup: {
8115
8333
  type: 'object',
8116
8334
  description: 'Group of reposts by different actors of the same post.',
@@ -21538,10 +21756,20 @@ export const schemaDict = {
21538
21756
  },
21539
21757
  notificationPreferences: {
21540
21758
  type: 'object',
21541
- required: ['push'],
21759
+ description: 'Push notification preferences by moderation notification category. These preferences do not hide in-app inbox activity. Each category defaults to enabled.',
21760
+ required: ['reports', 'account', 'labels'],
21542
21761
  properties: {
21543
- push: {
21762
+ reports: {
21763
+ type: 'boolean',
21764
+ description: 'Notify about outcomes of reports filed by the account (reportResolved and reportReopened).',
21765
+ },
21766
+ account: {
21767
+ type: 'boolean',
21768
+ description: 'Notify about moderation actions against the account or its content, action reversals, appeal outcomes, and standing changes. Label application and removal are controlled by labels.',
21769
+ },
21770
+ labels: {
21544
21771
  type: 'boolean',
21772
+ description: 'Notify when labels are applied to or removed from the account or its content (labelApplied and labelRemoved actions).',
21545
21773
  },
21546
21774
  },
21547
21775
  },
@@ -21705,6 +21933,7 @@ export const schemaDict = {
21705
21933
  defs: {
21706
21934
  main: {
21707
21935
  type: 'query',
21936
+ description: 'Get moderation push notification preferences for report outcomes, account actions, and labeling. Returns all three categories, defaulting to enabled for an account without saved preferences.',
21708
21937
  parameters: {
21709
21938
  type: 'params',
21710
21939
  properties: {
@@ -22188,14 +22417,23 @@ export const schemaDict = {
22188
22417
  defs: {
22189
22418
  main: {
22190
22419
  type: 'procedure',
22420
+ description: "Update the authenticated account's moderation push notification preferences. Only provided categories are updated; omitted categories retain their values. At least one category must be provided. Returns all three preferences. These preferences do not hide in-app inbox activity.",
22191
22421
  input: {
22192
22422
  encoding: 'application/json',
22193
22423
  schema: {
22194
22424
  type: 'object',
22195
- required: ['push'],
22196
22425
  properties: {
22197
- push: {
22426
+ reports: {
22427
+ type: 'boolean',
22428
+ description: 'Notify about outcomes of reports filed by the account.',
22429
+ },
22430
+ account: {
22431
+ type: 'boolean',
22432
+ description: 'Notify about moderation actions against the account or its content, excluding labeling.',
22433
+ },
22434
+ labels: {
22198
22435
  type: 'boolean',
22436
+ description: 'Notify about labels applied to or removed from the account or its content.',
22199
22437
  },
22200
22438
  },
22201
22439
  },
@@ -29053,6 +29291,7 @@ export const ids = {
29053
29291
  AppBskyActorGetProfile: 'app.bsky.actor.getProfile',
29054
29292
  AppBskyActorGetProfiles: 'app.bsky.actor.getProfiles',
29055
29293
  AppBskyActorGetSuggestions: 'app.bsky.actor.getSuggestions',
29294
+ AppBskyActorLink: 'app.bsky.actor.link',
29056
29295
  AppBskyActorProfile: 'app.bsky.actor.profile',
29057
29296
  AppBskyActorPutPreferences: 'app.bsky.actor.putPreferences',
29058
29297
  AppBskyActorSearchActors: 'app.bsky.actor.searchActors',