@atproto/pds 0.4.56 → 0.4.58

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  3. package/dist/api/com/atproto/repo/applyWrites.js +43 -7
  4. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  5. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  6. package/dist/api/com/atproto/repo/createRecord.js +10 -2
  7. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  8. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  9. package/dist/api/com/atproto/repo/deleteRecord.js +11 -0
  10. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  11. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  12. package/dist/api/com/atproto/repo/putRecord.js +7 -0
  13. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  14. package/dist/lexicon/lexicons.d.ts +131 -3
  15. package/dist/lexicon/lexicons.d.ts.map +1 -1
  16. package/dist/lexicon/lexicons.js +143 -6
  17. package/dist/lexicon/lexicons.js.map +1 -1
  18. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +38 -4
  19. package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
  20. package/dist/lexicon/types/com/atproto/repo/applyWrites.js +31 -1
  21. package/dist/lexicon/types/com/atproto/repo/applyWrites.js.map +1 -1
  22. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +5 -2
  23. package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts.map +1 -1
  24. package/dist/lexicon/types/com/atproto/repo/defs.d.ts +12 -0
  25. package/dist/lexicon/types/com/atproto/repo/defs.d.ts.map +1 -0
  26. package/dist/lexicon/types/com/atproto/repo/defs.js +16 -0
  27. package/dist/lexicon/types/com/atproto/repo/defs.js.map +1 -0
  28. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +14 -2
  29. package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  30. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +5 -2
  31. package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts.map +1 -1
  32. package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts +3 -0
  33. package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
  34. package/dist/lexicon/types/tools/ozone/communication/defs.d.ts +2 -0
  35. package/dist/lexicon/types/tools/ozone/communication/defs.d.ts.map +1 -1
  36. package/dist/lexicon/types/tools/ozone/communication/defs.js.map +1 -1
  37. package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts +3 -0
  38. package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
  39. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
  40. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  41. package/dist/repo/prepare.d.ts +4 -2
  42. package/dist/repo/prepare.d.ts.map +1 -1
  43. package/dist/repo/prepare.js +30 -14
  44. package/dist/repo/prepare.js.map +1 -1
  45. package/dist/repo/types.d.ts +3 -0
  46. package/dist/repo/types.d.ts.map +1 -1
  47. package/dist/repo/types.js.map +1 -1
  48. package/dist/sequencer/events.d.ts +2 -2
  49. package/package.json +6 -6
  50. package/src/api/com/atproto/repo/applyWrites.ts +41 -0
  51. package/src/api/com/atproto/repo/createRecord.ts +16 -7
  52. package/src/api/com/atproto/repo/deleteRecord.ts +11 -0
  53. package/src/api/com/atproto/repo/putRecord.ts +7 -0
  54. package/src/lexicon/lexicons.ts +143 -6
  55. package/src/lexicon/types/com/atproto/repo/applyWrites.ts +70 -3
  56. package/src/lexicon/types/com/atproto/repo/createRecord.ts +5 -2
  57. package/src/lexicon/types/com/atproto/repo/defs.ts +25 -0
  58. package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +13 -1
  59. package/src/lexicon/types/com/atproto/repo/putRecord.ts +5 -2
  60. package/src/lexicon/types/tools/ozone/communication/createTemplate.ts +3 -0
  61. package/src/lexicon/types/tools/ozone/communication/defs.ts +2 -0
  62. package/src/lexicon/types/tools/ozone/communication/updateTemplate.ts +3 -0
  63. package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
  64. package/src/repo/prepare.ts +31 -13
  65. package/src/repo/types.ts +4 -0
  66. package/tests/crud.test.ts +131 -14
  67. package/tests/sync/sync.test.ts +4 -4
@@ -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
  },
@@ -10065,6 +10175,11 @@ exports.schemaDict = {
10065
10175
  type: 'string',
10066
10176
  description: 'Subject of the message, used in emails.',
10067
10177
  },
10178
+ lang: {
10179
+ type: 'string',
10180
+ format: 'language',
10181
+ description: 'Message language.',
10182
+ },
10068
10183
  createdBy: {
10069
10184
  type: 'string',
10070
10185
  format: 'did',
@@ -10080,6 +10195,11 @@ exports.schemaDict = {
10080
10195
  ref: 'lex:tools.ozone.communication.defs#templateView',
10081
10196
  },
10082
10197
  },
10198
+ errors: [
10199
+ {
10200
+ name: 'DuplicateTemplateName',
10201
+ },
10202
+ ],
10083
10203
  },
10084
10204
  },
10085
10205
  },
@@ -10117,6 +10237,11 @@ exports.schemaDict = {
10117
10237
  disabled: {
10118
10238
  type: 'boolean',
10119
10239
  },
10240
+ lang: {
10241
+ type: 'string',
10242
+ format: 'language',
10243
+ description: 'Message language.',
10244
+ },
10120
10245
  lastUpdatedBy: {
10121
10246
  type: 'string',
10122
10247
  format: 'did',
@@ -10203,6 +10328,11 @@ exports.schemaDict = {
10203
10328
  type: 'string',
10204
10329
  description: 'Name of the template.',
10205
10330
  },
10331
+ lang: {
10332
+ type: 'string',
10333
+ format: 'language',
10334
+ description: 'Message language.',
10335
+ },
10206
10336
  contentMarkdown: {
10207
10337
  type: 'string',
10208
10338
  description: 'Content of the template, markdown supported, can contain variable placeholders.',
@@ -10229,6 +10359,11 @@ exports.schemaDict = {
10229
10359
  ref: 'lex:tools.ozone.communication.defs#templateView',
10230
10360
  },
10231
10361
  },
10362
+ errors: [
10363
+ {
10364
+ name: 'DuplicateTemplateName',
10365
+ },
10366
+ ],
10232
10367
  },
10233
10368
  },
10234
10369
  },
@@ -11015,6 +11150,7 @@ exports.schemaDict = {
11015
11150
  'lex:tools.ozone.moderation.defs#modEventMuteReporter',
11016
11151
  'lex:tools.ozone.moderation.defs#modEventUnmuteReporter',
11017
11152
  'lex:tools.ozone.moderation.defs#modEventReverseTakedown',
11153
+ 'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
11018
11154
  'lex:tools.ozone.moderation.defs#modEventEmail',
11019
11155
  'lex:tools.ozone.moderation.defs#modEventTag',
11020
11156
  ],
@@ -11758,6 +11894,7 @@ exports.ids = {
11758
11894
  ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
11759
11895
  ComAtprotoRepoApplyWrites: 'com.atproto.repo.applyWrites',
11760
11896
  ComAtprotoRepoCreateRecord: 'com.atproto.repo.createRecord',
11897
+ ComAtprotoRepoDefs: 'com.atproto.repo.defs',
11761
11898
  ComAtprotoRepoDeleteRecord: 'com.atproto.repo.deleteRecord',
11762
11899
  ComAtprotoRepoDescribeRepo: 'com.atproto.repo.describeRepo',
11763
11900
  ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord',