@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.
- package/CHANGELOG.md +15 -0
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js +43 -7
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js +10 -2
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js +11 -0
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js +7 -0
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +131 -3
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +143 -6
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts +38 -4
- package/dist/lexicon/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.js +31 -1
- package/dist/lexicon/types/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts +5 -2
- package/dist/lexicon/types/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/defs.d.ts +12 -0
- package/dist/lexicon/types/com/atproto/repo/defs.d.ts.map +1 -0
- package/dist/lexicon/types/com/atproto/repo/defs.js +16 -0
- package/dist/lexicon/types/com/atproto/repo/defs.js.map +1 -0
- package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts +14 -2
- package/dist/lexicon/types/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts +5 -2
- package/dist/lexicon/types/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts +3 -0
- package/dist/lexicon/types/tools/ozone/communication/createTemplate.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/defs.d.ts +2 -0
- package/dist/lexicon/types/tools/ozone/communication/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts +3 -0
- package/dist/lexicon/types/tools/ozone/communication/updateTemplate.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/dist/repo/prepare.d.ts +4 -2
- package/dist/repo/prepare.d.ts.map +1 -1
- package/dist/repo/prepare.js +30 -14
- package/dist/repo/prepare.js.map +1 -1
- package/dist/repo/types.d.ts +3 -0
- package/dist/repo/types.d.ts.map +1 -1
- package/dist/repo/types.js.map +1 -1
- package/dist/sequencer/events.d.ts +2 -2
- package/package.json +6 -6
- package/src/api/com/atproto/repo/applyWrites.ts +41 -0
- package/src/api/com/atproto/repo/createRecord.ts +16 -7
- package/src/api/com/atproto/repo/deleteRecord.ts +11 -0
- package/src/api/com/atproto/repo/putRecord.ts +7 -0
- package/src/lexicon/lexicons.ts +143 -6
- package/src/lexicon/types/com/atproto/repo/applyWrites.ts +70 -3
- package/src/lexicon/types/com/atproto/repo/createRecord.ts +5 -2
- package/src/lexicon/types/com/atproto/repo/defs.ts +25 -0
- package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +13 -1
- package/src/lexicon/types/com/atproto/repo/putRecord.ts +5 -2
- package/src/lexicon/types/tools/ozone/communication/createTemplate.ts +3 -0
- package/src/lexicon/types/tools/ozone/communication/defs.ts +2 -0
- package/src/lexicon/types/tools/ozone/communication/updateTemplate.ts +3 -0
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
- package/src/repo/prepare.ts +31 -13
- package/src/repo/types.ts +4 -0
- package/tests/crud.test.ts +131 -14
- package/tests/sync/sync.test.ts +4 -4
package/dist/lexicon/lexicons.js
CHANGED
@@ -1216,8 +1216,7 @@ exports.schemaDict = {
|
|
1216
1216
|
},
|
1217
1217
|
validate: {
|
1218
1218
|
type: 'boolean',
|
1219
|
-
|
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
|
-
|
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
|
-
|
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',
|