@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
@@ -1254,9 +1254,8 @@ export const schemaDict = {
1254
1254
  },
1255
1255
  validate: {
1256
1256
  type: 'boolean',
1257
- default: true,
1258
1257
  description:
1259
- "Can be set to 'false' to skip Lexicon schema validation of record data, for all operations.",
1258
+ "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.",
1260
1259
  },
1261
1260
  writes: {
1262
1261
  type: 'array',
@@ -1279,6 +1278,31 @@ export const schemaDict = {
1279
1278
  },
1280
1279
  },
1281
1280
  },
1281
+ output: {
1282
+ encoding: 'application/json',
1283
+ schema: {
1284
+ type: 'object',
1285
+ required: [],
1286
+ properties: {
1287
+ commit: {
1288
+ type: 'ref',
1289
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1290
+ },
1291
+ results: {
1292
+ type: 'array',
1293
+ items: {
1294
+ type: 'union',
1295
+ refs: [
1296
+ 'lex:com.atproto.repo.applyWrites#createResult',
1297
+ 'lex:com.atproto.repo.applyWrites#updateResult',
1298
+ 'lex:com.atproto.repo.applyWrites#deleteResult',
1299
+ ],
1300
+ closed: true,
1301
+ },
1302
+ },
1303
+ },
1304
+ },
1305
+ },
1282
1306
  errors: [
1283
1307
  {
1284
1308
  name: 'InvalidSwap',
@@ -1336,6 +1360,47 @@ export const schemaDict = {
1336
1360
  },
1337
1361
  },
1338
1362
  },
1363
+ createResult: {
1364
+ type: 'object',
1365
+ required: ['uri', 'cid'],
1366
+ properties: {
1367
+ uri: {
1368
+ type: 'string',
1369
+ format: 'at-uri',
1370
+ },
1371
+ cid: {
1372
+ type: 'string',
1373
+ format: 'cid',
1374
+ },
1375
+ validationStatus: {
1376
+ type: 'string',
1377
+ knownValues: ['valid', 'unknown'],
1378
+ },
1379
+ },
1380
+ },
1381
+ updateResult: {
1382
+ type: 'object',
1383
+ required: ['uri', 'cid'],
1384
+ properties: {
1385
+ uri: {
1386
+ type: 'string',
1387
+ format: 'at-uri',
1388
+ },
1389
+ cid: {
1390
+ type: 'string',
1391
+ format: 'cid',
1392
+ },
1393
+ validationStatus: {
1394
+ type: 'string',
1395
+ knownValues: ['valid', 'unknown'],
1396
+ },
1397
+ },
1398
+ },
1399
+ deleteResult: {
1400
+ type: 'object',
1401
+ required: [],
1402
+ properties: {},
1403
+ },
1339
1404
  },
1340
1405
  },
1341
1406
  ComAtprotoRepoCreateRecord: {
@@ -1370,9 +1435,8 @@ export const schemaDict = {
1370
1435
  },
1371
1436
  validate: {
1372
1437
  type: 'boolean',
1373
- default: true,
1374
1438
  description:
1375
- "Can be set to 'false' to skip Lexicon schema validation of record data.",
1439
+ "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.",
1376
1440
  },
1377
1441
  record: {
1378
1442
  type: 'unknown',
@@ -1401,6 +1465,14 @@ export const schemaDict = {
1401
1465
  type: 'string',
1402
1466
  format: 'cid',
1403
1467
  },
1468
+ commit: {
1469
+ type: 'ref',
1470
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1471
+ },
1472
+ validationStatus: {
1473
+ type: 'string',
1474
+ knownValues: ['valid', 'unknown'],
1475
+ },
1404
1476
  },
1405
1477
  },
1406
1478
  },
@@ -1414,6 +1486,25 @@ export const schemaDict = {
1414
1486
  },
1415
1487
  },
1416
1488
  },
1489
+ ComAtprotoRepoDefs: {
1490
+ lexicon: 1,
1491
+ id: 'com.atproto.repo.defs',
1492
+ defs: {
1493
+ commitMeta: {
1494
+ type: 'object',
1495
+ required: ['cid', 'rev'],
1496
+ properties: {
1497
+ cid: {
1498
+ type: 'string',
1499
+ format: 'cid',
1500
+ },
1501
+ rev: {
1502
+ type: 'string',
1503
+ },
1504
+ },
1505
+ },
1506
+ },
1507
+ },
1417
1508
  ComAtprotoRepoDeleteRecord: {
1418
1509
  lexicon: 1,
1419
1510
  id: 'com.atproto.repo.deleteRecord',
@@ -1458,6 +1549,18 @@ export const schemaDict = {
1458
1549
  },
1459
1550
  },
1460
1551
  },
1552
+ output: {
1553
+ encoding: 'application/json',
1554
+ schema: {
1555
+ type: 'object',
1556
+ properties: {
1557
+ commit: {
1558
+ type: 'ref',
1559
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1560
+ },
1561
+ },
1562
+ },
1563
+ },
1461
1564
  errors: [
1462
1565
  {
1463
1566
  name: 'InvalidSwap',
@@ -1778,9 +1881,8 @@ export const schemaDict = {
1778
1881
  },
1779
1882
  validate: {
1780
1883
  type: 'boolean',
1781
- default: true,
1782
1884
  description:
1783
- "Can be set to 'false' to skip Lexicon schema validation of record data.",
1885
+ "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.",
1784
1886
  },
1785
1887
  record: {
1786
1888
  type: 'unknown',
@@ -1815,6 +1917,14 @@ export const schemaDict = {
1815
1917
  type: 'string',
1816
1918
  format: 'cid',
1817
1919
  },
1920
+ commit: {
1921
+ type: 'ref',
1922
+ ref: 'lex:com.atproto.repo.defs#commitMeta',
1923
+ },
1924
+ validationStatus: {
1925
+ type: 'string',
1926
+ knownValues: ['valid', 'unknown'],
1927
+ },
1818
1928
  },
1819
1929
  },
1820
1930
  },
@@ -4462,6 +4572,15 @@ export const schemaDict = {
4462
4572
  maxLength: 100,
4463
4573
  },
4464
4574
  },
4575
+ nuxs: {
4576
+ description: 'Storage for NUXs the user has encountered.',
4577
+ type: 'array',
4578
+ maxLength: 100,
4579
+ items: {
4580
+ type: 'ref',
4581
+ ref: 'lex:app.bsky.actor.defs#nux',
4582
+ },
4583
+ },
4465
4584
  },
4466
4585
  },
4467
4586
  bskyAppProgressGuide: {
@@ -4476,6 +4595,34 @@ export const schemaDict = {
4476
4595
  },
4477
4596
  },
4478
4597
  },
4598
+ nux: {
4599
+ type: 'object',
4600
+ description: 'A new user experiences (NUX) storage object',
4601
+ required: ['id', 'completed'],
4602
+ properties: {
4603
+ id: {
4604
+ type: 'string',
4605
+ maxLength: 100,
4606
+ },
4607
+ completed: {
4608
+ type: 'boolean',
4609
+ default: false,
4610
+ },
4611
+ data: {
4612
+ description:
4613
+ 'Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.',
4614
+ type: 'string',
4615
+ maxLength: 3000,
4616
+ maxGraphemes: 300,
4617
+ },
4618
+ expiresAt: {
4619
+ type: 'string',
4620
+ format: 'datetime',
4621
+ description:
4622
+ 'The date and time at which the NUX will expire and should be considered completed.',
4623
+ },
4624
+ },
4625
+ },
4479
4626
  },
4480
4627
  },
4481
4628
  AppBskyActorGetPreferences: {
@@ -10356,6 +10503,11 @@ export const schemaDict = {
10356
10503
  type: 'string',
10357
10504
  description: 'Subject of the message, used in emails.',
10358
10505
  },
10506
+ lang: {
10507
+ type: 'string',
10508
+ format: 'language',
10509
+ description: 'Message language.',
10510
+ },
10359
10511
  createdBy: {
10360
10512
  type: 'string',
10361
10513
  format: 'did',
@@ -10371,6 +10523,11 @@ export const schemaDict = {
10371
10523
  ref: 'lex:tools.ozone.communication.defs#templateView',
10372
10524
  },
10373
10525
  },
10526
+ errors: [
10527
+ {
10528
+ name: 'DuplicateTemplateName',
10529
+ },
10530
+ ],
10374
10531
  },
10375
10532
  },
10376
10533
  },
@@ -10409,6 +10566,11 @@ export const schemaDict = {
10409
10566
  disabled: {
10410
10567
  type: 'boolean',
10411
10568
  },
10569
+ lang: {
10570
+ type: 'string',
10571
+ format: 'language',
10572
+ description: 'Message language.',
10573
+ },
10412
10574
  lastUpdatedBy: {
10413
10575
  type: 'string',
10414
10576
  format: 'did',
@@ -10496,6 +10658,11 @@ export const schemaDict = {
10496
10658
  type: 'string',
10497
10659
  description: 'Name of the template.',
10498
10660
  },
10661
+ lang: {
10662
+ type: 'string',
10663
+ format: 'language',
10664
+ description: 'Message language.',
10665
+ },
10499
10666
  contentMarkdown: {
10500
10667
  type: 'string',
10501
10668
  description:
@@ -10523,6 +10690,11 @@ export const schemaDict = {
10523
10690
  ref: 'lex:tools.ozone.communication.defs#templateView',
10524
10691
  },
10525
10692
  },
10693
+ errors: [
10694
+ {
10695
+ name: 'DuplicateTemplateName',
10696
+ },
10697
+ ],
10526
10698
  },
10527
10699
  },
10528
10700
  },
@@ -10785,6 +10957,11 @@ export const schemaDict = {
10785
10957
  description:
10786
10958
  'Indicates how long the takedown should be in effect before automatically expiring.',
10787
10959
  },
10960
+ acknowledgeAccountSubjects: {
10961
+ type: 'boolean',
10962
+ description:
10963
+ 'If true, all other reports on content authored by this account will be resolved (acknowledged).',
10964
+ },
10788
10965
  },
10789
10966
  },
10790
10967
  modEventReverseTakedown: {
@@ -11322,6 +11499,7 @@ export const schemaDict = {
11322
11499
  'lex:tools.ozone.moderation.defs#modEventMuteReporter',
11323
11500
  'lex:tools.ozone.moderation.defs#modEventUnmuteReporter',
11324
11501
  'lex:tools.ozone.moderation.defs#modEventReverseTakedown',
11502
+ 'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
11325
11503
  'lex:tools.ozone.moderation.defs#modEventEmail',
11326
11504
  'lex:tools.ozone.moderation.defs#modEventTag',
11327
11505
  ],
@@ -11595,9 +11773,15 @@ export const schemaDict = {
11595
11773
  parameters: {
11596
11774
  type: 'params',
11597
11775
  properties: {
11776
+ includeAllUserRecords: {
11777
+ type: 'boolean',
11778
+ description:
11779
+ "All subjects belonging to the account specified in the 'subject' param will be returned.",
11780
+ },
11598
11781
  subject: {
11599
11782
  type: 'string',
11600
11783
  format: 'uri',
11784
+ description: 'The subject to get the status for.',
11601
11785
  },
11602
11786
  comment: {
11603
11787
  type: 'string',
@@ -12084,6 +12268,7 @@ export const ids = {
12084
12268
  ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
12085
12269
  ComAtprotoRepoApplyWrites: 'com.atproto.repo.applyWrites',
12086
12270
  ComAtprotoRepoCreateRecord: 'com.atproto.repo.createRecord',
12271
+ ComAtprotoRepoDefs: 'com.atproto.repo.defs',
12087
12272
  ComAtprotoRepoDeleteRecord: 'com.atproto.repo.deleteRecord',
12088
12273
  ComAtprotoRepoDescribeRepo: 'com.atproto.repo.describeRepo',
12089
12274
  ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord',
@@ -469,6 +469,8 @@ export interface BskyAppStatePref {
469
469
  activeProgressGuide?: BskyAppProgressGuide
470
470
  /** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */
471
471
  queuedNudges?: string[]
472
+ /** Storage for NUXs the user has encountered. */
473
+ nuxs?: Nux[]
472
474
  [k: string]: unknown
473
475
  }
474
476
 
@@ -501,3 +503,24 @@ export function isBskyAppProgressGuide(v: unknown): v is BskyAppProgressGuide {
501
503
  export function validateBskyAppProgressGuide(v: unknown): ValidationResult {
502
504
  return lexicons.validate('app.bsky.actor.defs#bskyAppProgressGuide', v)
503
505
  }
506
+
507
+ /** A new user experiences (NUX) storage object */
508
+ export interface Nux {
509
+ id: string
510
+ completed: boolean
511
+ /** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */
512
+ data?: string
513
+ /** The date and time at which the NUX will expire and should be considered completed. */
514
+ expiresAt?: string
515
+ [k: string]: unknown
516
+ }
517
+
518
+ export function isNux(v: unknown): v is Nux {
519
+ return (
520
+ isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.actor.defs#nux'
521
+ )
522
+ }
523
+
524
+ export function validateNux(v: unknown): ValidationResult {
525
+ return lexicons.validate('app.bsky.actor.defs#nux', v)
526
+ }
@@ -6,13 +6,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
8
  import { CID } from 'multiformats/cid'
9
+ import * as ComAtprotoRepoDefs from './defs'
9
10
 
10
11
  export interface QueryParams {}
11
12
 
12
13
  export interface InputSchema {
13
14
  /** The handle or DID of the repo (aka, current account). */
14
15
  repo: string
15
- /** Can be set to 'false' to skip Lexicon schema validation of record data, for all operations. */
16
+ /** 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. */
16
17
  validate?: boolean
17
18
  writes: (Create | Update | Delete)[]
18
19
  /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */
@@ -20,6 +21,12 @@ export interface InputSchema {
20
21
  [k: string]: unknown
21
22
  }
22
23
 
24
+ export interface OutputSchema {
25
+ commit?: ComAtprotoRepoDefs.CommitMeta
26
+ results?: (CreateResult | UpdateResult | DeleteResult)[]
27
+ [k: string]: unknown
28
+ }
29
+
23
30
  export interface CallOptions {
24
31
  signal?: AbortSignal
25
32
  headers?: HeadersMap
@@ -30,6 +37,7 @@ export interface CallOptions {
30
37
  export interface Response {
31
38
  success: boolean
32
39
  headers: HeadersMap
40
+ data: OutputSchema
33
41
  }
34
42
 
35
43
  export class InvalidSwapError extends XRPCError {
@@ -104,3 +112,57 @@ export function isDelete(v: unknown): v is Delete {
104
112
  export function validateDelete(v: unknown): ValidationResult {
105
113
  return lexicons.validate('com.atproto.repo.applyWrites#delete', v)
106
114
  }
115
+
116
+ export interface CreateResult {
117
+ uri: string
118
+ cid: string
119
+ validationStatus?: 'valid' | 'unknown' | (string & {})
120
+ [k: string]: unknown
121
+ }
122
+
123
+ export function isCreateResult(v: unknown): v is CreateResult {
124
+ return (
125
+ isObj(v) &&
126
+ hasProp(v, '$type') &&
127
+ v.$type === 'com.atproto.repo.applyWrites#createResult'
128
+ )
129
+ }
130
+
131
+ export function validateCreateResult(v: unknown): ValidationResult {
132
+ return lexicons.validate('com.atproto.repo.applyWrites#createResult', v)
133
+ }
134
+
135
+ export interface UpdateResult {
136
+ uri: string
137
+ cid: string
138
+ validationStatus?: 'valid' | 'unknown' | (string & {})
139
+ [k: string]: unknown
140
+ }
141
+
142
+ export function isUpdateResult(v: unknown): v is UpdateResult {
143
+ return (
144
+ isObj(v) &&
145
+ hasProp(v, '$type') &&
146
+ v.$type === 'com.atproto.repo.applyWrites#updateResult'
147
+ )
148
+ }
149
+
150
+ export function validateUpdateResult(v: unknown): ValidationResult {
151
+ return lexicons.validate('com.atproto.repo.applyWrites#updateResult', v)
152
+ }
153
+
154
+ export interface DeleteResult {
155
+ [k: string]: unknown
156
+ }
157
+
158
+ export function isDeleteResult(v: unknown): v is DeleteResult {
159
+ return (
160
+ isObj(v) &&
161
+ hasProp(v, '$type') &&
162
+ v.$type === 'com.atproto.repo.applyWrites#deleteResult'
163
+ )
164
+ }
165
+
166
+ export function validateDeleteResult(v: unknown): ValidationResult {
167
+ return lexicons.validate('com.atproto.repo.applyWrites#deleteResult', v)
168
+ }
@@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
8
  import { CID } from 'multiformats/cid'
9
+ import * as ComAtprotoRepoDefs from './defs'
9
10
 
10
11
  export interface QueryParams {}
11
12
 
@@ -16,7 +17,7 @@ export interface InputSchema {
16
17
  collection: string
17
18
  /** The Record Key. */
18
19
  rkey?: string
19
- /** Can be set to 'false' to skip Lexicon schema validation of record data. */
20
+ /** 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. */
20
21
  validate?: boolean
21
22
  /** The record itself. Must contain a $type field. */
22
23
  record: {}
@@ -28,6 +29,8 @@ export interface InputSchema {
28
29
  export interface OutputSchema {
29
30
  uri: string
30
31
  cid: string
32
+ commit?: ComAtprotoRepoDefs.CommitMeta
33
+ validationStatus?: 'valid' | 'unknown' | (string & {})
31
34
  [k: string]: unknown
32
35
  }
33
36
 
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { CID } from 'multiformats/cid'
8
+
9
+ export interface CommitMeta {
10
+ cid: string
11
+ rev: string
12
+ [k: string]: unknown
13
+ }
14
+
15
+ export function isCommitMeta(v: unknown): v is CommitMeta {
16
+ return (
17
+ isObj(v) &&
18
+ hasProp(v, '$type') &&
19
+ v.$type === 'com.atproto.repo.defs#commitMeta'
20
+ )
21
+ }
22
+
23
+ export function validateCommitMeta(v: unknown): ValidationResult {
24
+ return lexicons.validate('com.atproto.repo.defs#commitMeta', v)
25
+ }
@@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
8
  import { CID } from 'multiformats/cid'
9
+ import * as ComAtprotoRepoDefs from './defs'
9
10
 
10
11
  export interface QueryParams {}
11
12
 
@@ -23,6 +24,11 @@ export interface InputSchema {
23
24
  [k: string]: unknown
24
25
  }
25
26
 
27
+ export interface OutputSchema {
28
+ commit?: ComAtprotoRepoDefs.CommitMeta
29
+ [k: string]: unknown
30
+ }
31
+
26
32
  export interface CallOptions {
27
33
  signal?: AbortSignal
28
34
  headers?: HeadersMap
@@ -33,6 +39,7 @@ export interface CallOptions {
33
39
  export interface Response {
34
40
  success: boolean
35
41
  headers: HeadersMap
42
+ data: OutputSchema
36
43
  }
37
44
 
38
45
  export class InvalidSwapError extends XRPCError {
@@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
8
  import { CID } from 'multiformats/cid'
9
+ import * as ComAtprotoRepoDefs from './defs'
9
10
 
10
11
  export interface QueryParams {}
11
12
 
@@ -16,7 +17,7 @@ export interface InputSchema {
16
17
  collection: string
17
18
  /** The Record Key. */
18
19
  rkey: string
19
- /** Can be set to 'false' to skip Lexicon schema validation of record data. */
20
+ /** 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. */
20
21
  validate?: boolean
21
22
  /** The record to write. */
22
23
  record: {}
@@ -30,6 +31,8 @@ export interface InputSchema {
30
31
  export interface OutputSchema {
31
32
  uri: string
32
33
  cid: string
34
+ commit?: ComAtprotoRepoDefs.CommitMeta
35
+ validationStatus?: 'valid' | 'unknown' | (string & {})
33
36
  [k: string]: unknown
34
37
  }
35
38
 
@@ -17,6 +17,8 @@ export interface InputSchema {
17
17
  contentMarkdown: string
18
18
  /** Subject of the message, used in emails. */
19
19
  subject: string
20
+ /** Message language. */
21
+ lang?: string
20
22
  /** DID of the user who is creating the template. */
21
23
  createdBy?: string
22
24
  [k: string]: unknown
@@ -37,6 +39,17 @@ export interface Response {
37
39
  data: OutputSchema
38
40
  }
39
41
 
42
+ export class DuplicateTemplateNameError extends XRPCError {
43
+ constructor(src: XRPCError) {
44
+ super(src.status, src.error, src.message, src.headers, { cause: src })
45
+ }
46
+ }
47
+
40
48
  export function toKnownErr(e: any) {
49
+ if (e instanceof XRPCError) {
50
+ if (e.error === 'DuplicateTemplateName')
51
+ return new DuplicateTemplateNameError(e)
52
+ }
53
+
41
54
  return e
42
55
  }
@@ -15,6 +15,8 @@ export interface TemplateView {
15
15
  /** Subject of the message, used in emails. */
16
16
  contentMarkdown: string
17
17
  disabled: boolean
18
+ /** Message language. */
19
+ lang?: string
18
20
  /** DID of the user who last updated the template. */
19
21
  lastUpdatedBy: string
20
22
  createdAt: string
@@ -15,6 +15,8 @@ export interface InputSchema {
15
15
  id: string
16
16
  /** Name of the template. */
17
17
  name?: string
18
+ /** Message language. */
19
+ lang?: string
18
20
  /** Content of the template, markdown supported, can contain variable placeholders. */
19
21
  contentMarkdown?: string
20
22
  /** Subject of the message, used in emails. */
@@ -40,6 +42,17 @@ export interface Response {
40
42
  data: OutputSchema
41
43
  }
42
44
 
45
+ export class DuplicateTemplateNameError extends XRPCError {
46
+ constructor(src: XRPCError) {
47
+ super(src.status, src.error, src.message, src.headers, { cause: src })
48
+ }
49
+ }
50
+
43
51
  export function toKnownErr(e: any) {
52
+ if (e instanceof XRPCError) {
53
+ if (e.error === 'DuplicateTemplateName')
54
+ return new DuplicateTemplateNameError(e)
55
+ }
56
+
44
57
  return e
45
58
  }
@@ -162,6 +162,8 @@ export interface ModEventTakedown {
162
162
  comment?: string
163
163
  /** Indicates how long the takedown should be in effect before automatically expiring. */
164
164
  durationInHours?: number
165
+ /** If true, all other reports on content authored by this account will be resolved (acknowledged). */
166
+ acknowledgeAccountSubjects?: boolean
165
167
  [k: string]: unknown
166
168
  }
167
169
 
@@ -25,6 +25,7 @@ export interface InputSchema {
25
25
  | ToolsOzoneModerationDefs.ModEventMuteReporter
26
26
  | ToolsOzoneModerationDefs.ModEventUnmuteReporter
27
27
  | ToolsOzoneModerationDefs.ModEventReverseTakedown
28
+ | ToolsOzoneModerationDefs.ModEventResolveAppeal
28
29
  | ToolsOzoneModerationDefs.ModEventEmail
29
30
  | ToolsOzoneModerationDefs.ModEventTag
30
31
  | { $type: string; [k: string]: unknown }
@@ -9,6 +9,9 @@ import { CID } from 'multiformats/cid'
9
9
  import * as ToolsOzoneModerationDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
+ /** All subjects belonging to the account specified in the 'subject' param will be returned. */
13
+ includeAllUserRecords?: boolean
14
+ /** The subject to get the status for. */
12
15
  subject?: string
13
16
  /** Search subjects by keyword from comments */
14
17
  comment?: string
package/src/types.ts CHANGED
@@ -106,5 +106,6 @@ export interface BskyPreferences {
106
106
  bskyAppState: {
107
107
  queuedNudges: string[]
108
108
  activeProgressGuide: AppBskyActorDefs.BskyAppProgressGuide | undefined
109
+ nuxs: AppBskyActorDefs.Nux[]
109
110
  }
110
111
  }