@atproto/api 0.13.5 → 0.13.7

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 (80) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/agent.d.ts +9 -1
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +62 -0
  5. package/dist/agent.js.map +1 -1
  6. package/dist/client/index.d.ts +1 -0
  7. package/dist/client/index.d.ts.map +1 -1
  8. package/dist/client/index.js +19 -8
  9. package/dist/client/index.js.map +1 -1
  10. package/dist/client/lexicons.d.ts +175 -3
  11. package/dist/client/lexicons.d.ts.map +1 -1
  12. package/dist/client/lexicons.js +187 -6
  13. package/dist/client/lexicons.js.map +1 -1
  14. package/dist/client/types/app/bsky/actor/defs.d.ts +14 -0
  15. package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
  16. package/dist/client/types/app/bsky/actor/defs.js +9 -1
  17. package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
  18. package/dist/client/types/com/atproto/repo/applyWrites.d.ts +29 -1
  19. package/dist/client/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
  20. package/dist/client/types/com/atproto/repo/applyWrites.js +31 -1
  21. package/dist/client/types/com/atproto/repo/applyWrites.js.map +1 -1
  22. package/dist/client/types/com/atproto/repo/createRecord.d.ts +4 -1
  23. package/dist/client/types/com/atproto/repo/createRecord.d.ts.map +1 -1
  24. package/dist/client/types/com/atproto/repo/createRecord.js.map +1 -1
  25. package/dist/client/types/com/atproto/repo/defs.d.ts +12 -0
  26. package/dist/client/types/com/atproto/repo/defs.d.ts.map +1 -0
  27. package/dist/client/types/com/atproto/repo/defs.js +16 -0
  28. package/dist/client/types/com/atproto/repo/defs.js.map +1 -0
  29. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +6 -0
  30. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  31. package/dist/client/types/com/atproto/repo/deleteRecord.js.map +1 -1
  32. package/dist/client/types/com/atproto/repo/putRecord.d.ts +4 -1
  33. package/dist/client/types/com/atproto/repo/putRecord.d.ts.map +1 -1
  34. package/dist/client/types/com/atproto/repo/putRecord.js.map +1 -1
  35. package/dist/client/types/tools/ozone/communication/createTemplate.d.ts +6 -1
  36. package/dist/client/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
  37. package/dist/client/types/tools/ozone/communication/createTemplate.js +15 -1
  38. package/dist/client/types/tools/ozone/communication/createTemplate.js.map +1 -1
  39. package/dist/client/types/tools/ozone/communication/defs.d.ts +2 -0
  40. package/dist/client/types/tools/ozone/communication/defs.d.ts.map +1 -1
  41. package/dist/client/types/tools/ozone/communication/defs.js.map +1 -1
  42. package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts +6 -1
  43. package/dist/client/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
  44. package/dist/client/types/tools/ozone/communication/updateTemplate.js +15 -1
  45. package/dist/client/types/tools/ozone/communication/updateTemplate.js.map +1 -1
  46. package/dist/client/types/tools/ozone/moderation/defs.d.ts +2 -0
  47. package/dist/client/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  48. package/dist/client/types/tools/ozone/moderation/defs.js.map +1 -1
  49. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
  50. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  51. package/dist/client/types/tools/ozone/moderation/emitEvent.js.map +1 -1
  52. package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts +3 -0
  53. package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
  54. package/dist/client/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
  55. package/dist/types.d.ts +1 -0
  56. package/dist/types.d.ts.map +1 -1
  57. package/dist/util.d.ts +19 -0
  58. package/dist/util.d.ts.map +1 -1
  59. package/dist/util.js +17 -1
  60. package/dist/util.js.map +1 -1
  61. package/package.json +3 -2
  62. package/src/agent.ts +80 -1
  63. package/src/client/index.ts +12 -12
  64. package/src/client/lexicons.ts +191 -6
  65. package/src/client/types/app/bsky/actor/defs.ts +23 -0
  66. package/src/client/types/com/atproto/repo/applyWrites.ts +63 -1
  67. package/src/client/types/com/atproto/repo/createRecord.ts +4 -1
  68. package/src/client/types/com/atproto/repo/defs.ts +25 -0
  69. package/src/client/types/com/atproto/repo/deleteRecord.ts +7 -0
  70. package/src/client/types/com/atproto/repo/putRecord.ts +4 -1
  71. package/src/client/types/tools/ozone/communication/createTemplate.ts +13 -0
  72. package/src/client/types/tools/ozone/communication/defs.ts +2 -0
  73. package/src/client/types/tools/ozone/communication/updateTemplate.ts +13 -0
  74. package/src/client/types/tools/ozone/moderation/defs.ts +2 -0
  75. package/src/client/types/tools/ozone/moderation/emitEvent.ts +1 -0
  76. package/src/client/types/tools/ozone/moderation/queryStatuses.ts +3 -0
  77. package/src/types.ts +1 -0
  78. package/src/util.ts +15 -0
  79. package/tests/bsky-agent.test.ts +91 -0
  80. package/tests/moderation-prefs.test.ts +4 -0
@@ -1216,8 +1216,7 @@ exports.schemaDict = {
1216
1216
  },
1217
1217
  validate: {
1218
1218
  type: 'boolean',
1219
- default: true,
1220
- description: "Can be set to 'false' to skip Lexicon schema validation of record data, for all operations.",
1219
+ description: "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons.",
1221
1220
  },
1222
1221
  writes: {
1223
1222
  type: 'array',
@@ -1239,6 +1238,31 @@ exports.schemaDict = {
1239
1238
  },
1240
1239
  },
1241
1240
  },
1241
+ output: {
1242
+ encoding: 'application/json',
1243
+ schema: {
1244
+ type: 'object',
1245
+ required: [],
1246
+ properties: {
1247
+ commit: {
1248
+ type: 'ref',
1249
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1250
+ },
1251
+ results: {
1252
+ type: 'array',
1253
+ items: {
1254
+ type: 'union',
1255
+ refs: [
1256
+ 'lex:com.atproto.repo.applyWrites#createResult',
1257
+ 'lex:com.atproto.repo.applyWrites#updateResult',
1258
+ 'lex:com.atproto.repo.applyWrites#deleteResult',
1259
+ ],
1260
+ closed: true,
1261
+ },
1262
+ },
1263
+ },
1264
+ },
1265
+ },
1242
1266
  errors: [
1243
1267
  {
1244
1268
  name: 'InvalidSwap',
@@ -1295,6 +1319,47 @@ exports.schemaDict = {
1295
1319
  },
1296
1320
  },
1297
1321
  },
1322
+ createResult: {
1323
+ type: 'object',
1324
+ required: ['uri', 'cid'],
1325
+ properties: {
1326
+ uri: {
1327
+ type: 'string',
1328
+ format: 'at-uri',
1329
+ },
1330
+ cid: {
1331
+ type: 'string',
1332
+ format: 'cid',
1333
+ },
1334
+ validationStatus: {
1335
+ type: 'string',
1336
+ knownValues: ['valid', 'unknown'],
1337
+ },
1338
+ },
1339
+ },
1340
+ updateResult: {
1341
+ type: 'object',
1342
+ required: ['uri', 'cid'],
1343
+ properties: {
1344
+ uri: {
1345
+ type: 'string',
1346
+ format: 'at-uri',
1347
+ },
1348
+ cid: {
1349
+ type: 'string',
1350
+ format: 'cid',
1351
+ },
1352
+ validationStatus: {
1353
+ type: 'string',
1354
+ knownValues: ['valid', 'unknown'],
1355
+ },
1356
+ },
1357
+ },
1358
+ deleteResult: {
1359
+ type: 'object',
1360
+ required: [],
1361
+ properties: {},
1362
+ },
1298
1363
  },
1299
1364
  },
1300
1365
  ComAtprotoRepoCreateRecord: {
@@ -1327,8 +1392,7 @@ exports.schemaDict = {
1327
1392
  },
1328
1393
  validate: {
1329
1394
  type: 'boolean',
1330
- default: true,
1331
- description: "Can be set to 'false' to skip Lexicon schema validation of record data.",
1395
+ description: "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.",
1332
1396
  },
1333
1397
  record: {
1334
1398
  type: 'unknown',
@@ -1356,6 +1420,14 @@ exports.schemaDict = {
1356
1420
  type: 'string',
1357
1421
  format: 'cid',
1358
1422
  },
1423
+ commit: {
1424
+ type: 'ref',
1425
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1426
+ },
1427
+ validationStatus: {
1428
+ type: 'string',
1429
+ knownValues: ['valid', 'unknown'],
1430
+ },
1359
1431
  },
1360
1432
  },
1361
1433
  },
@@ -1368,6 +1440,25 @@ exports.schemaDict = {
1368
1440
  },
1369
1441
  },
1370
1442
  },
1443
+ ComAtprotoRepoDefs: {
1444
+ lexicon: 1,
1445
+ id: 'com.atproto.repo.defs',
1446
+ defs: {
1447
+ commitMeta: {
1448
+ type: 'object',
1449
+ required: ['cid', 'rev'],
1450
+ properties: {
1451
+ cid: {
1452
+ type: 'string',
1453
+ format: 'cid',
1454
+ },
1455
+ rev: {
1456
+ type: 'string',
1457
+ },
1458
+ },
1459
+ },
1460
+ },
1461
+ },
1371
1462
  ComAtprotoRepoDeleteRecord: {
1372
1463
  lexicon: 1,
1373
1464
  id: 'com.atproto.repo.deleteRecord',
@@ -1408,6 +1499,18 @@ exports.schemaDict = {
1408
1499
  },
1409
1500
  },
1410
1501
  },
1502
+ output: {
1503
+ encoding: 'application/json',
1504
+ schema: {
1505
+ type: 'object',
1506
+ properties: {
1507
+ commit: {
1508
+ type: 'ref',
1509
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1510
+ },
1511
+ },
1512
+ },
1513
+ },
1411
1514
  errors: [
1412
1515
  {
1413
1516
  name: 'InvalidSwap',
@@ -1716,8 +1819,7 @@ exports.schemaDict = {
1716
1819
  },
1717
1820
  validate: {
1718
1821
  type: 'boolean',
1719
- default: true,
1720
- description: "Can be set to 'false' to skip Lexicon schema validation of record data.",
1822
+ description: "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.",
1721
1823
  },
1722
1824
  record: {
1723
1825
  type: 'unknown',
@@ -1750,6 +1852,14 @@ exports.schemaDict = {
1750
1852
  type: 'string',
1751
1853
  format: 'cid',
1752
1854
  },
1855
+ commit: {
1856
+ type: 'ref',
1857
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1858
+ },
1859
+ validationStatus: {
1860
+ type: 'string',
1861
+ knownValues: ['valid', 'unknown'],
1862
+ },
1753
1863
  },
1754
1864
  },
1755
1865
  },
@@ -4314,6 +4424,15 @@ exports.schemaDict = {
4314
4424
  maxLength: 100,
4315
4425
  },
4316
4426
  },
4427
+ nuxs: {
4428
+ description: 'Storage for NUXs the user has encountered.',
4429
+ type: 'array',
4430
+ maxLength: 100,
4431
+ items: {
4432
+ type: 'ref',
4433
+ ref: 'lex:app.bsky.actor.defs#nux',
4434
+ },
4435
+ },
4317
4436
  },
4318
4437
  },
4319
4438
  bskyAppProgressGuide: {
@@ -4327,6 +4446,32 @@ exports.schemaDict = {
4327
4446
  },
4328
4447
  },
4329
4448
  },
4449
+ nux: {
4450
+ type: 'object',
4451
+ description: 'A new user experiences (NUX) storage object',
4452
+ required: ['id', 'completed'],
4453
+ properties: {
4454
+ id: {
4455
+ type: 'string',
4456
+ maxLength: 100,
4457
+ },
4458
+ completed: {
4459
+ type: 'boolean',
4460
+ default: false,
4461
+ },
4462
+ data: {
4463
+ description: 'Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.',
4464
+ type: 'string',
4465
+ maxLength: 3000,
4466
+ maxGraphemes: 300,
4467
+ },
4468
+ expiresAt: {
4469
+ type: 'string',
4470
+ format: 'datetime',
4471
+ description: 'The date and time at which the NUX will expire and should be considered completed.',
4472
+ },
4473
+ },
4474
+ },
4330
4475
  },
4331
4476
  },
4332
4477
  AppBskyActorGetPreferences: {
@@ -10065,6 +10210,11 @@ exports.schemaDict = {
10065
10210
  type: 'string',
10066
10211
  description: 'Subject of the message, used in emails.',
10067
10212
  },
10213
+ lang: {
10214
+ type: 'string',
10215
+ format: 'language',
10216
+ description: 'Message language.',
10217
+ },
10068
10218
  createdBy: {
10069
10219
  type: 'string',
10070
10220
  format: 'did',
@@ -10080,6 +10230,11 @@ exports.schemaDict = {
10080
10230
  ref: 'lex:tools.ozone.communication.defs#templateView',
10081
10231
  },
10082
10232
  },
10233
+ errors: [
10234
+ {
10235
+ name: 'DuplicateTemplateName',
10236
+ },
10237
+ ],
10083
10238
  },
10084
10239
  },
10085
10240
  },
@@ -10117,6 +10272,11 @@ exports.schemaDict = {
10117
10272
  disabled: {
10118
10273
  type: 'boolean',
10119
10274
  },
10275
+ lang: {
10276
+ type: 'string',
10277
+ format: 'language',
10278
+ description: 'Message language.',
10279
+ },
10120
10280
  lastUpdatedBy: {
10121
10281
  type: 'string',
10122
10282
  format: 'did',
@@ -10203,6 +10363,11 @@ exports.schemaDict = {
10203
10363
  type: 'string',
10204
10364
  description: 'Name of the template.',
10205
10365
  },
10366
+ lang: {
10367
+ type: 'string',
10368
+ format: 'language',
10369
+ description: 'Message language.',
10370
+ },
10206
10371
  contentMarkdown: {
10207
10372
  type: 'string',
10208
10373
  description: 'Content of the template, markdown supported, can contain variable placeholders.',
@@ -10229,6 +10394,11 @@ exports.schemaDict = {
10229
10394
  ref: 'lex:tools.ozone.communication.defs#templateView',
10230
10395
  },
10231
10396
  },
10397
+ errors: [
10398
+ {
10399
+ name: 'DuplicateTemplateName',
10400
+ },
10401
+ ],
10232
10402
  },
10233
10403
  },
10234
10404
  },
@@ -10482,6 +10652,10 @@ exports.schemaDict = {
10482
10652
  type: 'integer',
10483
10653
  description: 'Indicates how long the takedown should be in effect before automatically expiring.',
10484
10654
  },
10655
+ acknowledgeAccountSubjects: {
10656
+ type: 'boolean',
10657
+ description: 'If true, all other reports on content authored by this account will be resolved (acknowledged).',
10658
+ },
10485
10659
  },
10486
10660
  },
10487
10661
  modEventReverseTakedown: {
@@ -11015,6 +11189,7 @@ exports.schemaDict = {
11015
11189
  'lex:tools.ozone.moderation.defs#modEventMuteReporter',
11016
11190
  'lex:tools.ozone.moderation.defs#modEventUnmuteReporter',
11017
11191
  'lex:tools.ozone.moderation.defs#modEventReverseTakedown',
11192
+ 'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
11018
11193
  'lex:tools.ozone.moderation.defs#modEventEmail',
11019
11194
  'lex:tools.ozone.moderation.defs#modEventTag',
11020
11195
  ],
@@ -11280,9 +11455,14 @@ exports.schemaDict = {
11280
11455
  parameters: {
11281
11456
  type: 'params',
11282
11457
  properties: {
11458
+ includeAllUserRecords: {
11459
+ type: 'boolean',
11460
+ description: "All subjects belonging to the account specified in the 'subject' param will be returned.",
11461
+ },
11283
11462
  subject: {
11284
11463
  type: 'string',
11285
11464
  format: 'uri',
11465
+ description: 'The subject to get the status for.',
11286
11466
  },
11287
11467
  comment: {
11288
11468
  type: 'string',
@@ -11758,6 +11938,7 @@ exports.ids = {
11758
11938
  ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
11759
11939
  ComAtprotoRepoApplyWrites: 'com.atproto.repo.applyWrites',
11760
11940
  ComAtprotoRepoCreateRecord: 'com.atproto.repo.createRecord',
11941
+ ComAtprotoRepoDefs: 'com.atproto.repo.defs',
11761
11942
  ComAtprotoRepoDeleteRecord: 'com.atproto.repo.deleteRecord',
11762
11943
  ComAtprotoRepoDescribeRepo: 'com.atproto.repo.describeRepo',
11763
11944
  ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord',