@atcute/client 2.0.7 → 2.0.9
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.
- package/dist/lexicons.d.ts +128 -64
- package/lib/lexicons.ts +153 -64
- package/package.json +5 -5
package/dist/lexicons.d.ts
CHANGED
|
@@ -258,6 +258,16 @@ export declare namespace ComAtprotoAdminUpdateSubjectStatus {
|
|
|
258
258
|
takedown?: ComAtprotoAdminDefs.StatusAttr;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
+
export declare namespace ComAtprotoIdentityDefs {
|
|
262
|
+
interface IdentityInfo {
|
|
263
|
+
[Brand.Type]?: 'com.atproto.identity.defs#identityInfo';
|
|
264
|
+
did: At.DID;
|
|
265
|
+
/** The complete DID document for the identity. */
|
|
266
|
+
didDoc: unknown;
|
|
267
|
+
/** The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. */
|
|
268
|
+
handle: At.Handle;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
261
271
|
/** Describe the credentials that should be included in the DID doc of an account that is migrating to this service. */
|
|
262
272
|
export declare namespace ComAtprotoIdentityGetRecommendedDidCredentials {
|
|
263
273
|
interface Params {
|
|
@@ -271,6 +281,20 @@ export declare namespace ComAtprotoIdentityGetRecommendedDidCredentials {
|
|
|
271
281
|
verificationMethods?: unknown;
|
|
272
282
|
}
|
|
273
283
|
}
|
|
284
|
+
/** Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. */
|
|
285
|
+
export declare namespace ComAtprotoIdentityRefreshIdentity {
|
|
286
|
+
interface Params {
|
|
287
|
+
}
|
|
288
|
+
interface Input {
|
|
289
|
+
identifier: string;
|
|
290
|
+
}
|
|
291
|
+
type Output = ComAtprotoIdentityDefs.IdentityInfo;
|
|
292
|
+
interface Errors {
|
|
293
|
+
HandleNotFound: {};
|
|
294
|
+
DidNotFound: {};
|
|
295
|
+
DidDeactivated: {};
|
|
296
|
+
}
|
|
297
|
+
}
|
|
274
298
|
/** Request an email with a code to in order to request a signed PLC operation. Requires Auth. */
|
|
275
299
|
export declare namespace ComAtprotoIdentityRequestPlcOperationSignature {
|
|
276
300
|
interface Params {
|
|
@@ -278,7 +302,23 @@ export declare namespace ComAtprotoIdentityRequestPlcOperationSignature {
|
|
|
278
302
|
type Input = undefined;
|
|
279
303
|
type Output = undefined;
|
|
280
304
|
}
|
|
281
|
-
/** Resolves
|
|
305
|
+
/** Resolves DID to DID document. Does not bi-directionally verify handle. */
|
|
306
|
+
export declare namespace ComAtprotoIdentityResolveDid {
|
|
307
|
+
interface Params {
|
|
308
|
+
/** DID to resolve. */
|
|
309
|
+
did: At.DID;
|
|
310
|
+
}
|
|
311
|
+
type Input = undefined;
|
|
312
|
+
interface Output {
|
|
313
|
+
/** The complete DID document for the identity. */
|
|
314
|
+
didDoc: unknown;
|
|
315
|
+
}
|
|
316
|
+
interface Errors {
|
|
317
|
+
DidNotFound: {};
|
|
318
|
+
DidDeactivated: {};
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
/** Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. */
|
|
282
322
|
export declare namespace ComAtprotoIdentityResolveHandle {
|
|
283
323
|
interface Params {
|
|
284
324
|
/** The handle to resolve. */
|
|
@@ -288,6 +328,23 @@ export declare namespace ComAtprotoIdentityResolveHandle {
|
|
|
288
328
|
interface Output {
|
|
289
329
|
did: At.DID;
|
|
290
330
|
}
|
|
331
|
+
interface Errors {
|
|
332
|
+
HandleNotFound: {};
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/** Resolves an identity (DID or Handle) to a full identity (DID document and verified handle). */
|
|
336
|
+
export declare namespace ComAtprotoIdentityResolveIdentity {
|
|
337
|
+
interface Params {
|
|
338
|
+
/** Handle or DID to resolve. */
|
|
339
|
+
identifier: string;
|
|
340
|
+
}
|
|
341
|
+
type Input = undefined;
|
|
342
|
+
type Output = ComAtprotoIdentityDefs.IdentityInfo;
|
|
343
|
+
interface Errors {
|
|
344
|
+
HandleNotFound: {};
|
|
345
|
+
DidNotFound: {};
|
|
346
|
+
DidDeactivated: {};
|
|
347
|
+
}
|
|
291
348
|
}
|
|
292
349
|
/** Signs a PLC operation to update some value(s) in the requesting DID's document. */
|
|
293
350
|
export declare namespace ComAtprotoIdentitySignPlcOperation {
|
|
@@ -486,6 +543,8 @@ export declare namespace ComAtprotoModerationDefs {
|
|
|
486
543
|
type ReasonSpam = 'com.atproto.moderation.defs#reasonSpam';
|
|
487
544
|
type ReasonType = 'com.atproto.moderation.defs#reasonAppeal' | 'com.atproto.moderation.defs#reasonMisleading' | 'com.atproto.moderation.defs#reasonOther' | 'com.atproto.moderation.defs#reasonRude' | 'com.atproto.moderation.defs#reasonSexual' | 'com.atproto.moderation.defs#reasonSpam' | 'com.atproto.moderation.defs#reasonViolation' | (string & {});
|
|
488
545
|
type ReasonViolation = 'com.atproto.moderation.defs#reasonViolation';
|
|
546
|
+
/** Tag describing a type of subject that might be reported. */
|
|
547
|
+
type SubjectType = 'account' | 'chat' | 'record' | (string & {});
|
|
489
548
|
}
|
|
490
549
|
/** Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. */
|
|
491
550
|
export declare namespace ComAtprotoRepoApplyWrites {
|
|
@@ -512,7 +571,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
|
|
|
512
571
|
[Brand.Type]?: 'com.atproto.repo.applyWrites#create';
|
|
513
572
|
collection: string;
|
|
514
573
|
value: unknown;
|
|
515
|
-
/**
|
|
574
|
+
/** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
|
|
516
575
|
rkey?: string;
|
|
517
576
|
}
|
|
518
577
|
interface CreateResult {
|
|
@@ -555,10 +614,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
|
|
|
555
614
|
record: unknown;
|
|
556
615
|
/** The handle or DID of the repo (aka, current account). */
|
|
557
616
|
repo: string;
|
|
558
|
-
/**
|
|
559
|
-
* The Record Key. \
|
|
560
|
-
* Maximum string length: 512
|
|
561
|
-
*/
|
|
617
|
+
/** The Record Key. */
|
|
562
618
|
rkey?: string;
|
|
563
619
|
/** Compare and swap with the previous commit by CID. */
|
|
564
620
|
swapCommit?: At.CID;
|
|
@@ -691,16 +747,6 @@ export declare namespace ComAtprotoRepoListRecords {
|
|
|
691
747
|
limit?: number;
|
|
692
748
|
/** Flag to reverse the order of the returned records. */
|
|
693
749
|
reverse?: boolean;
|
|
694
|
-
/**
|
|
695
|
-
* DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)
|
|
696
|
-
* @deprecated
|
|
697
|
-
*/
|
|
698
|
-
rkeyEnd?: string;
|
|
699
|
-
/**
|
|
700
|
-
* DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)
|
|
701
|
-
* @deprecated
|
|
702
|
-
*/
|
|
703
|
-
rkeyStart?: string;
|
|
704
750
|
}
|
|
705
751
|
type Input = undefined;
|
|
706
752
|
interface Output {
|
|
@@ -725,10 +771,7 @@ export declare namespace ComAtprotoRepoPutRecord {
|
|
|
725
771
|
record: unknown;
|
|
726
772
|
/** The handle or DID of the repo (aka, current account). */
|
|
727
773
|
repo: string;
|
|
728
|
-
/**
|
|
729
|
-
* The Record Key. \
|
|
730
|
-
* Maximum string length: 512
|
|
731
|
-
*/
|
|
774
|
+
/** The Record Key. */
|
|
732
775
|
rkey: string;
|
|
733
776
|
/** Compare and swap with the previous commit by CID. */
|
|
734
777
|
swapCommit?: At.CID;
|
|
@@ -1269,11 +1312,6 @@ export declare namespace ComAtprotoSyncGetRecord {
|
|
|
1269
1312
|
did: At.DID;
|
|
1270
1313
|
/** Record Key */
|
|
1271
1314
|
rkey: string;
|
|
1272
|
-
/**
|
|
1273
|
-
* DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit
|
|
1274
|
-
* @deprecated
|
|
1275
|
-
*/
|
|
1276
|
-
commit?: At.CID;
|
|
1277
1315
|
}
|
|
1278
1316
|
type Input = undefined;
|
|
1279
1317
|
type Output = Uint8Array;
|
|
@@ -1315,7 +1353,7 @@ export declare namespace ComAtprotoSyncGetRepoStatus {
|
|
|
1315
1353
|
/** Optional field, the current rev of the repo, if active=true */
|
|
1316
1354
|
rev?: string;
|
|
1317
1355
|
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
1318
|
-
status?: 'deactivated' | 'suspended' | 'takendown' | (string & {});
|
|
1356
|
+
status?: 'deactivated' | 'deleted' | 'desynchronized' | 'suspended' | 'takendown' | 'throttled' | (string & {});
|
|
1319
1357
|
}
|
|
1320
1358
|
interface Errors {
|
|
1321
1359
|
RepoNotFound: {};
|
|
@@ -1372,10 +1410,33 @@ export declare namespace ComAtprotoSyncListRepos {
|
|
|
1372
1410
|
rev: string;
|
|
1373
1411
|
active?: boolean;
|
|
1374
1412
|
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
1375
|
-
status?: 'deactivated' | 'suspended' | 'takendown' | (string & {});
|
|
1413
|
+
status?: 'deactivated' | 'deleted' | 'desynchronized' | 'suspended' | 'takendown' | 'throttled' | (string & {});
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
/** Enumerates all the DIDs which have records with the given collection NSID. */
|
|
1417
|
+
export declare namespace ComAtprotoSyncListReposByCollection {
|
|
1418
|
+
interface Params {
|
|
1419
|
+
collection: string;
|
|
1420
|
+
cursor?: string;
|
|
1421
|
+
/**
|
|
1422
|
+
* Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. \
|
|
1423
|
+
* Minimum: 1 \
|
|
1424
|
+
* Maximum: 2000
|
|
1425
|
+
* @default 500
|
|
1426
|
+
*/
|
|
1427
|
+
limit?: number;
|
|
1428
|
+
}
|
|
1429
|
+
type Input = undefined;
|
|
1430
|
+
interface Output {
|
|
1431
|
+
repos: Repo[];
|
|
1432
|
+
cursor?: string;
|
|
1433
|
+
}
|
|
1434
|
+
interface Repo {
|
|
1435
|
+
[Brand.Type]?: 'com.atproto.sync.listReposByCollection#repo';
|
|
1436
|
+
did: At.DID;
|
|
1376
1437
|
}
|
|
1377
1438
|
}
|
|
1378
|
-
/** Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. */
|
|
1439
|
+
/** Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl */
|
|
1379
1440
|
export declare namespace ComAtprotoSyncNotifyOfUpdate {
|
|
1380
1441
|
interface Params {
|
|
1381
1442
|
}
|
|
@@ -1405,14 +1466,17 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1405
1466
|
seq: number;
|
|
1406
1467
|
time: string;
|
|
1407
1468
|
/** If active=false, this optional field indicates a reason for why the account is not active. */
|
|
1408
|
-
status?: 'deactivated' | 'deleted' | 'suspended' | 'takendown' | (string & {});
|
|
1469
|
+
status?: 'deactivated' | 'deleted' | 'desynchronized' | 'suspended' | 'takendown' | 'throttled' | (string & {});
|
|
1409
1470
|
}
|
|
1410
1471
|
/** Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. */
|
|
1411
1472
|
interface Commit {
|
|
1412
1473
|
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#commit';
|
|
1413
|
-
/**
|
|
1474
|
+
/**
|
|
1475
|
+
* DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.
|
|
1476
|
+
* @deprecated
|
|
1477
|
+
*/
|
|
1414
1478
|
blobs: At.CIDLink[];
|
|
1415
|
-
/** CAR file containing relevant blocks, as a diff since the previous repo state. */
|
|
1479
|
+
/** CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. */
|
|
1416
1480
|
blocks: At.Bytes;
|
|
1417
1481
|
/** Repo commit object CID. */
|
|
1418
1482
|
commit: At.CIDLink;
|
|
@@ -1426,7 +1490,7 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1426
1490
|
* @deprecated
|
|
1427
1491
|
*/
|
|
1428
1492
|
rebase: boolean;
|
|
1429
|
-
/** The repo this event comes from. */
|
|
1493
|
+
/** The repo this event comes from. Note that all other message types name this field 'did'. */
|
|
1430
1494
|
repo: At.DID;
|
|
1431
1495
|
/** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */
|
|
1432
1496
|
rev: string;
|
|
@@ -1436,24 +1500,13 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1436
1500
|
since: string | null;
|
|
1437
1501
|
/** Timestamp of when this message was originally broadcast. */
|
|
1438
1502
|
time: string;
|
|
1439
|
-
/** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
1440
|
-
tooBig: boolean;
|
|
1441
1503
|
/**
|
|
1442
|
-
* DEPRECATED --
|
|
1504
|
+
* DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.
|
|
1443
1505
|
* @deprecated
|
|
1444
1506
|
*/
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
* DEPRECATED -- Use #identity event instead
|
|
1449
|
-
* @deprecated
|
|
1450
|
-
*/
|
|
1451
|
-
interface Handle {
|
|
1452
|
-
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#handle';
|
|
1453
|
-
did: At.DID;
|
|
1454
|
-
handle: At.Handle;
|
|
1455
|
-
seq: number;
|
|
1456
|
-
time: string;
|
|
1507
|
+
tooBig: boolean;
|
|
1508
|
+
/** The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. */
|
|
1509
|
+
prevData?: At.CIDLink;
|
|
1457
1510
|
}
|
|
1458
1511
|
/** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */
|
|
1459
1512
|
interface Identity {
|
|
@@ -1469,17 +1522,6 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1469
1522
|
name: 'OutdatedCursor' | (string & {});
|
|
1470
1523
|
message?: string;
|
|
1471
1524
|
}
|
|
1472
|
-
/**
|
|
1473
|
-
* DEPRECATED -- Use #account event instead
|
|
1474
|
-
* @deprecated
|
|
1475
|
-
*/
|
|
1476
|
-
interface Migrate {
|
|
1477
|
-
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#migrate';
|
|
1478
|
-
did: At.DID;
|
|
1479
|
-
migrateTo: string | null;
|
|
1480
|
-
seq: number;
|
|
1481
|
-
time: string;
|
|
1482
|
-
}
|
|
1483
1525
|
/** A repo operation, ie a mutation of a single record. */
|
|
1484
1526
|
interface RepoOp {
|
|
1485
1527
|
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#repoOp';
|
|
@@ -1487,15 +1529,21 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1487
1529
|
/** For creates and updates, the new record CID. For deletions, null. */
|
|
1488
1530
|
cid: At.CIDLink | null;
|
|
1489
1531
|
path: string;
|
|
1532
|
+
/** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */
|
|
1533
|
+
prev?: At.CIDLink;
|
|
1490
1534
|
}
|
|
1491
|
-
/**
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1535
|
+
/** Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. */
|
|
1536
|
+
interface Sync {
|
|
1537
|
+
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#sync';
|
|
1538
|
+
/** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */
|
|
1539
|
+
blocks: At.Bytes;
|
|
1540
|
+
/** The account this repo event corresponds to. Must match that in the commit object. */
|
|
1497
1541
|
did: At.DID;
|
|
1542
|
+
/** The rev of the commit. This value must match that in the commit object. */
|
|
1543
|
+
rev: string;
|
|
1544
|
+
/** The stream sequence number of this message. */
|
|
1498
1545
|
seq: number;
|
|
1546
|
+
/** Timestamp of when this message was originally broadcast. */
|
|
1499
1547
|
time: string;
|
|
1500
1548
|
}
|
|
1501
1549
|
}
|
|
@@ -1575,10 +1623,18 @@ export declare interface Queries {
|
|
|
1575
1623
|
'com.atproto.identity.getRecommendedDidCredentials': {
|
|
1576
1624
|
output: ComAtprotoIdentityGetRecommendedDidCredentials.Output;
|
|
1577
1625
|
};
|
|
1626
|
+
'com.atproto.identity.resolveDid': {
|
|
1627
|
+
params: ComAtprotoIdentityResolveDid.Params;
|
|
1628
|
+
output: ComAtprotoIdentityResolveDid.Output;
|
|
1629
|
+
};
|
|
1578
1630
|
'com.atproto.identity.resolveHandle': {
|
|
1579
1631
|
params: ComAtprotoIdentityResolveHandle.Params;
|
|
1580
1632
|
output: ComAtprotoIdentityResolveHandle.Output;
|
|
1581
1633
|
};
|
|
1634
|
+
'com.atproto.identity.resolveIdentity': {
|
|
1635
|
+
params: ComAtprotoIdentityResolveIdentity.Params;
|
|
1636
|
+
output: ComAtprotoIdentityResolveIdentity.Output;
|
|
1637
|
+
};
|
|
1582
1638
|
'com.atproto.label.queryLabels': {
|
|
1583
1639
|
params: ComAtprotoLabelQueryLabels.Params;
|
|
1584
1640
|
output: ComAtprotoLabelQueryLabels.Output;
|
|
@@ -1659,6 +1715,10 @@ export declare interface Queries {
|
|
|
1659
1715
|
params: ComAtprotoSyncListRepos.Params;
|
|
1660
1716
|
output: ComAtprotoSyncListRepos.Output;
|
|
1661
1717
|
};
|
|
1718
|
+
'com.atproto.sync.listReposByCollection': {
|
|
1719
|
+
params: ComAtprotoSyncListReposByCollection.Params;
|
|
1720
|
+
output: ComAtprotoSyncListReposByCollection.Output;
|
|
1721
|
+
};
|
|
1662
1722
|
'com.atproto.temp.checkSignupQueue': {
|
|
1663
1723
|
output: ComAtprotoTempCheckSignupQueue.Output;
|
|
1664
1724
|
};
|
|
@@ -1697,6 +1757,10 @@ export declare interface Procedures {
|
|
|
1697
1757
|
input: ComAtprotoAdminUpdateSubjectStatus.Input;
|
|
1698
1758
|
output: ComAtprotoAdminUpdateSubjectStatus.Output;
|
|
1699
1759
|
};
|
|
1760
|
+
'com.atproto.identity.refreshIdentity': {
|
|
1761
|
+
input: ComAtprotoIdentityRefreshIdentity.Input;
|
|
1762
|
+
output: ComAtprotoIdentityRefreshIdentity.Output;
|
|
1763
|
+
};
|
|
1700
1764
|
'com.atproto.identity.requestPlcOperationSignature': {};
|
|
1701
1765
|
'com.atproto.identity.signPlcOperation': {
|
|
1702
1766
|
input: ComAtprotoIdentitySignPlcOperation.Input;
|
package/lib/lexicons.ts
CHANGED
|
@@ -277,6 +277,17 @@ export declare namespace ComAtprotoAdminUpdateSubjectStatus {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
+
export declare namespace ComAtprotoIdentityDefs {
|
|
281
|
+
interface IdentityInfo {
|
|
282
|
+
[Brand.Type]?: 'com.atproto.identity.defs#identityInfo';
|
|
283
|
+
did: At.DID;
|
|
284
|
+
/** The complete DID document for the identity. */
|
|
285
|
+
didDoc: unknown;
|
|
286
|
+
/** The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. */
|
|
287
|
+
handle: At.Handle;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
280
291
|
/** Describe the credentials that should be included in the DID doc of an account that is migrating to this service. */
|
|
281
292
|
export declare namespace ComAtprotoIdentityGetRecommendedDidCredentials {
|
|
282
293
|
interface Params {}
|
|
@@ -290,6 +301,20 @@ export declare namespace ComAtprotoIdentityGetRecommendedDidCredentials {
|
|
|
290
301
|
}
|
|
291
302
|
}
|
|
292
303
|
|
|
304
|
+
/** Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. */
|
|
305
|
+
export declare namespace ComAtprotoIdentityRefreshIdentity {
|
|
306
|
+
interface Params {}
|
|
307
|
+
interface Input {
|
|
308
|
+
identifier: string;
|
|
309
|
+
}
|
|
310
|
+
type Output = ComAtprotoIdentityDefs.IdentityInfo;
|
|
311
|
+
interface Errors {
|
|
312
|
+
HandleNotFound: {};
|
|
313
|
+
DidNotFound: {};
|
|
314
|
+
DidDeactivated: {};
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
293
318
|
/** Request an email with a code to in order to request a signed PLC operation. Requires Auth. */
|
|
294
319
|
export declare namespace ComAtprotoIdentityRequestPlcOperationSignature {
|
|
295
320
|
interface Params {}
|
|
@@ -297,7 +322,24 @@ export declare namespace ComAtprotoIdentityRequestPlcOperationSignature {
|
|
|
297
322
|
type Output = undefined;
|
|
298
323
|
}
|
|
299
324
|
|
|
300
|
-
/** Resolves
|
|
325
|
+
/** Resolves DID to DID document. Does not bi-directionally verify handle. */
|
|
326
|
+
export declare namespace ComAtprotoIdentityResolveDid {
|
|
327
|
+
interface Params {
|
|
328
|
+
/** DID to resolve. */
|
|
329
|
+
did: At.DID;
|
|
330
|
+
}
|
|
331
|
+
type Input = undefined;
|
|
332
|
+
interface Output {
|
|
333
|
+
/** The complete DID document for the identity. */
|
|
334
|
+
didDoc: unknown;
|
|
335
|
+
}
|
|
336
|
+
interface Errors {
|
|
337
|
+
DidNotFound: {};
|
|
338
|
+
DidDeactivated: {};
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/** Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. */
|
|
301
343
|
export declare namespace ComAtprotoIdentityResolveHandle {
|
|
302
344
|
interface Params {
|
|
303
345
|
/** The handle to resolve. */
|
|
@@ -307,6 +349,24 @@ export declare namespace ComAtprotoIdentityResolveHandle {
|
|
|
307
349
|
interface Output {
|
|
308
350
|
did: At.DID;
|
|
309
351
|
}
|
|
352
|
+
interface Errors {
|
|
353
|
+
HandleNotFound: {};
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/** Resolves an identity (DID or Handle) to a full identity (DID document and verified handle). */
|
|
358
|
+
export declare namespace ComAtprotoIdentityResolveIdentity {
|
|
359
|
+
interface Params {
|
|
360
|
+
/** Handle or DID to resolve. */
|
|
361
|
+
identifier: string;
|
|
362
|
+
}
|
|
363
|
+
type Input = undefined;
|
|
364
|
+
type Output = ComAtprotoIdentityDefs.IdentityInfo;
|
|
365
|
+
interface Errors {
|
|
366
|
+
HandleNotFound: {};
|
|
367
|
+
DidNotFound: {};
|
|
368
|
+
DidDeactivated: {};
|
|
369
|
+
}
|
|
310
370
|
}
|
|
311
371
|
|
|
312
372
|
/** Signs a PLC operation to update some value(s) in the requesting DID's document. */
|
|
@@ -530,6 +590,8 @@ export declare namespace ComAtprotoModerationDefs {
|
|
|
530
590
|
| 'com.atproto.moderation.defs#reasonViolation'
|
|
531
591
|
| (string & {});
|
|
532
592
|
type ReasonViolation = 'com.atproto.moderation.defs#reasonViolation';
|
|
593
|
+
/** Tag describing a type of subject that might be reported. */
|
|
594
|
+
type SubjectType = 'account' | 'chat' | 'record' | (string & {});
|
|
533
595
|
}
|
|
534
596
|
|
|
535
597
|
/** Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. */
|
|
@@ -556,7 +618,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
|
|
|
556
618
|
[Brand.Type]?: 'com.atproto.repo.applyWrites#create';
|
|
557
619
|
collection: string;
|
|
558
620
|
value: unknown;
|
|
559
|
-
/**
|
|
621
|
+
/** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
|
|
560
622
|
rkey?: string;
|
|
561
623
|
}
|
|
562
624
|
interface CreateResult {
|
|
@@ -599,10 +661,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
|
|
|
599
661
|
record: unknown;
|
|
600
662
|
/** The handle or DID of the repo (aka, current account). */
|
|
601
663
|
repo: string;
|
|
602
|
-
/**
|
|
603
|
-
* The Record Key. \
|
|
604
|
-
* Maximum string length: 512
|
|
605
|
-
*/
|
|
664
|
+
/** The Record Key. */
|
|
606
665
|
rkey?: string;
|
|
607
666
|
/** Compare and swap with the previous commit by CID. */
|
|
608
667
|
swapCommit?: At.CID;
|
|
@@ -740,16 +799,6 @@ export declare namespace ComAtprotoRepoListRecords {
|
|
|
740
799
|
limit?: number;
|
|
741
800
|
/** Flag to reverse the order of the returned records. */
|
|
742
801
|
reverse?: boolean;
|
|
743
|
-
/**
|
|
744
|
-
* DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)
|
|
745
|
-
* @deprecated
|
|
746
|
-
*/
|
|
747
|
-
rkeyEnd?: string;
|
|
748
|
-
/**
|
|
749
|
-
* DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)
|
|
750
|
-
* @deprecated
|
|
751
|
-
*/
|
|
752
|
-
rkeyStart?: string;
|
|
753
802
|
}
|
|
754
803
|
type Input = undefined;
|
|
755
804
|
interface Output {
|
|
@@ -774,10 +823,7 @@ export declare namespace ComAtprotoRepoPutRecord {
|
|
|
774
823
|
record: unknown;
|
|
775
824
|
/** The handle or DID of the repo (aka, current account). */
|
|
776
825
|
repo: string;
|
|
777
|
-
/**
|
|
778
|
-
* The Record Key. \
|
|
779
|
-
* Maximum string length: 512
|
|
780
|
-
*/
|
|
826
|
+
/** The Record Key. */
|
|
781
827
|
rkey: string;
|
|
782
828
|
/** Compare and swap with the previous commit by CID. */
|
|
783
829
|
swapCommit?: At.CID;
|
|
@@ -1328,11 +1374,6 @@ export declare namespace ComAtprotoSyncGetRecord {
|
|
|
1328
1374
|
did: At.DID;
|
|
1329
1375
|
/** Record Key */
|
|
1330
1376
|
rkey: string;
|
|
1331
|
-
/**
|
|
1332
|
-
* DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit
|
|
1333
|
-
* @deprecated
|
|
1334
|
-
*/
|
|
1335
|
-
commit?: At.CID;
|
|
1336
1377
|
}
|
|
1337
1378
|
type Input = undefined;
|
|
1338
1379
|
type Output = Uint8Array;
|
|
@@ -1376,7 +1417,14 @@ export declare namespace ComAtprotoSyncGetRepoStatus {
|
|
|
1376
1417
|
/** Optional field, the current rev of the repo, if active=true */
|
|
1377
1418
|
rev?: string;
|
|
1378
1419
|
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
1379
|
-
status?:
|
|
1420
|
+
status?:
|
|
1421
|
+
| 'deactivated'
|
|
1422
|
+
| 'deleted'
|
|
1423
|
+
| 'desynchronized'
|
|
1424
|
+
| 'suspended'
|
|
1425
|
+
| 'takendown'
|
|
1426
|
+
| 'throttled'
|
|
1427
|
+
| (string & {});
|
|
1380
1428
|
}
|
|
1381
1429
|
interface Errors {
|
|
1382
1430
|
RepoNotFound: {};
|
|
@@ -1435,11 +1483,42 @@ export declare namespace ComAtprotoSyncListRepos {
|
|
|
1435
1483
|
rev: string;
|
|
1436
1484
|
active?: boolean;
|
|
1437
1485
|
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
1438
|
-
status?:
|
|
1486
|
+
status?:
|
|
1487
|
+
| 'deactivated'
|
|
1488
|
+
| 'deleted'
|
|
1489
|
+
| 'desynchronized'
|
|
1490
|
+
| 'suspended'
|
|
1491
|
+
| 'takendown'
|
|
1492
|
+
| 'throttled'
|
|
1493
|
+
| (string & {});
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
/** Enumerates all the DIDs which have records with the given collection NSID. */
|
|
1498
|
+
export declare namespace ComAtprotoSyncListReposByCollection {
|
|
1499
|
+
interface Params {
|
|
1500
|
+
collection: string;
|
|
1501
|
+
cursor?: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. \
|
|
1504
|
+
* Minimum: 1 \
|
|
1505
|
+
* Maximum: 2000
|
|
1506
|
+
* @default 500
|
|
1507
|
+
*/
|
|
1508
|
+
limit?: number;
|
|
1509
|
+
}
|
|
1510
|
+
type Input = undefined;
|
|
1511
|
+
interface Output {
|
|
1512
|
+
repos: Repo[];
|
|
1513
|
+
cursor?: string;
|
|
1514
|
+
}
|
|
1515
|
+
interface Repo {
|
|
1516
|
+
[Brand.Type]?: 'com.atproto.sync.listReposByCollection#repo';
|
|
1517
|
+
did: At.DID;
|
|
1439
1518
|
}
|
|
1440
1519
|
}
|
|
1441
1520
|
|
|
1442
|
-
/** Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. */
|
|
1521
|
+
/** Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl */
|
|
1443
1522
|
export declare namespace ComAtprotoSyncNotifyOfUpdate {
|
|
1444
1523
|
interface Params {}
|
|
1445
1524
|
interface Input {
|
|
@@ -1469,14 +1548,24 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1469
1548
|
seq: number;
|
|
1470
1549
|
time: string;
|
|
1471
1550
|
/** If active=false, this optional field indicates a reason for why the account is not active. */
|
|
1472
|
-
status?:
|
|
1551
|
+
status?:
|
|
1552
|
+
| 'deactivated'
|
|
1553
|
+
| 'deleted'
|
|
1554
|
+
| 'desynchronized'
|
|
1555
|
+
| 'suspended'
|
|
1556
|
+
| 'takendown'
|
|
1557
|
+
| 'throttled'
|
|
1558
|
+
| (string & {});
|
|
1473
1559
|
}
|
|
1474
1560
|
/** Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. */
|
|
1475
1561
|
interface Commit {
|
|
1476
1562
|
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#commit';
|
|
1477
|
-
/**
|
|
1563
|
+
/**
|
|
1564
|
+
* DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.
|
|
1565
|
+
* @deprecated
|
|
1566
|
+
*/
|
|
1478
1567
|
blobs: At.CIDLink[];
|
|
1479
|
-
/** CAR file containing relevant blocks, as a diff since the previous repo state. */
|
|
1568
|
+
/** CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. */
|
|
1480
1569
|
blocks: At.Bytes;
|
|
1481
1570
|
/** Repo commit object CID. */
|
|
1482
1571
|
commit: At.CIDLink;
|
|
@@ -1490,7 +1579,7 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1490
1579
|
* @deprecated
|
|
1491
1580
|
*/
|
|
1492
1581
|
rebase: boolean;
|
|
1493
|
-
/** The repo this event comes from. */
|
|
1582
|
+
/** The repo this event comes from. Note that all other message types name this field 'did'. */
|
|
1494
1583
|
repo: At.DID;
|
|
1495
1584
|
/** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */
|
|
1496
1585
|
rev: string;
|
|
@@ -1500,24 +1589,13 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1500
1589
|
since: string | null;
|
|
1501
1590
|
/** Timestamp of when this message was originally broadcast. */
|
|
1502
1591
|
time: string;
|
|
1503
|
-
/** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */
|
|
1504
|
-
tooBig: boolean;
|
|
1505
1592
|
/**
|
|
1506
|
-
* DEPRECATED --
|
|
1593
|
+
* DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.
|
|
1507
1594
|
* @deprecated
|
|
1508
1595
|
*/
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
* DEPRECATED -- Use #identity event instead
|
|
1513
|
-
* @deprecated
|
|
1514
|
-
*/
|
|
1515
|
-
interface Handle {
|
|
1516
|
-
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#handle';
|
|
1517
|
-
did: At.DID;
|
|
1518
|
-
handle: At.Handle;
|
|
1519
|
-
seq: number;
|
|
1520
|
-
time: string;
|
|
1596
|
+
tooBig: boolean;
|
|
1597
|
+
/** The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. */
|
|
1598
|
+
prevData?: At.CIDLink;
|
|
1521
1599
|
}
|
|
1522
1600
|
/** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */
|
|
1523
1601
|
interface Identity {
|
|
@@ -1533,17 +1611,6 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1533
1611
|
name: 'OutdatedCursor' | (string & {});
|
|
1534
1612
|
message?: string;
|
|
1535
1613
|
}
|
|
1536
|
-
/**
|
|
1537
|
-
* DEPRECATED -- Use #account event instead
|
|
1538
|
-
* @deprecated
|
|
1539
|
-
*/
|
|
1540
|
-
interface Migrate {
|
|
1541
|
-
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#migrate';
|
|
1542
|
-
did: At.DID;
|
|
1543
|
-
migrateTo: string | null;
|
|
1544
|
-
seq: number;
|
|
1545
|
-
time: string;
|
|
1546
|
-
}
|
|
1547
1614
|
/** A repo operation, ie a mutation of a single record. */
|
|
1548
1615
|
interface RepoOp {
|
|
1549
1616
|
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#repoOp';
|
|
@@ -1551,15 +1618,21 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1551
1618
|
/** For creates and updates, the new record CID. For deletions, null. */
|
|
1552
1619
|
cid: At.CIDLink | null;
|
|
1553
1620
|
path: string;
|
|
1621
|
+
/** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */
|
|
1622
|
+
prev?: At.CIDLink;
|
|
1554
1623
|
}
|
|
1555
|
-
/**
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1624
|
+
/** Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. */
|
|
1625
|
+
interface Sync {
|
|
1626
|
+
[Brand.Type]?: 'com.atproto.sync.subscribeRepos#sync';
|
|
1627
|
+
/** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */
|
|
1628
|
+
blocks: At.Bytes;
|
|
1629
|
+
/** The account this repo event corresponds to. Must match that in the commit object. */
|
|
1561
1630
|
did: At.DID;
|
|
1631
|
+
/** The rev of the commit. This value must match that in the commit object. */
|
|
1632
|
+
rev: string;
|
|
1633
|
+
/** The stream sequence number of this message. */
|
|
1562
1634
|
seq: number;
|
|
1635
|
+
/** Timestamp of when this message was originally broadcast. */
|
|
1563
1636
|
time: string;
|
|
1564
1637
|
}
|
|
1565
1638
|
}
|
|
@@ -1641,10 +1714,18 @@ export declare interface Queries {
|
|
|
1641
1714
|
'com.atproto.identity.getRecommendedDidCredentials': {
|
|
1642
1715
|
output: ComAtprotoIdentityGetRecommendedDidCredentials.Output;
|
|
1643
1716
|
};
|
|
1717
|
+
'com.atproto.identity.resolveDid': {
|
|
1718
|
+
params: ComAtprotoIdentityResolveDid.Params;
|
|
1719
|
+
output: ComAtprotoIdentityResolveDid.Output;
|
|
1720
|
+
};
|
|
1644
1721
|
'com.atproto.identity.resolveHandle': {
|
|
1645
1722
|
params: ComAtprotoIdentityResolveHandle.Params;
|
|
1646
1723
|
output: ComAtprotoIdentityResolveHandle.Output;
|
|
1647
1724
|
};
|
|
1725
|
+
'com.atproto.identity.resolveIdentity': {
|
|
1726
|
+
params: ComAtprotoIdentityResolveIdentity.Params;
|
|
1727
|
+
output: ComAtprotoIdentityResolveIdentity.Output;
|
|
1728
|
+
};
|
|
1648
1729
|
'com.atproto.label.queryLabels': {
|
|
1649
1730
|
params: ComAtprotoLabelQueryLabels.Params;
|
|
1650
1731
|
output: ComAtprotoLabelQueryLabels.Output;
|
|
@@ -1725,6 +1806,10 @@ export declare interface Queries {
|
|
|
1725
1806
|
params: ComAtprotoSyncListRepos.Params;
|
|
1726
1807
|
output: ComAtprotoSyncListRepos.Output;
|
|
1727
1808
|
};
|
|
1809
|
+
'com.atproto.sync.listReposByCollection': {
|
|
1810
|
+
params: ComAtprotoSyncListReposByCollection.Params;
|
|
1811
|
+
output: ComAtprotoSyncListReposByCollection.Output;
|
|
1812
|
+
};
|
|
1728
1813
|
'com.atproto.temp.checkSignupQueue': {
|
|
1729
1814
|
output: ComAtprotoTempCheckSignupQueue.Output;
|
|
1730
1815
|
};
|
|
@@ -1764,6 +1849,10 @@ export declare interface Procedures {
|
|
|
1764
1849
|
input: ComAtprotoAdminUpdateSubjectStatus.Input;
|
|
1765
1850
|
output: ComAtprotoAdminUpdateSubjectStatus.Output;
|
|
1766
1851
|
};
|
|
1852
|
+
'com.atproto.identity.refreshIdentity': {
|
|
1853
|
+
input: ComAtprotoIdentityRefreshIdentity.Input;
|
|
1854
|
+
output: ComAtprotoIdentityRefreshIdentity.Output;
|
|
1855
|
+
};
|
|
1767
1856
|
'com.atproto.identity.requestPlcOperationSignature': {};
|
|
1768
1857
|
'com.atproto.identity.signPlcOperation': {
|
|
1769
1858
|
input: ComAtprotoIdentitySignPlcOperation.Input;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@atcute/client",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.9",
|
|
5
5
|
"description": "lightweight and cute API client for AT Protocol",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"./utils/jwt": "./dist/utils/jwt.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@vitest/coverage-v8": "^
|
|
26
|
-
"vitest": "^
|
|
27
|
-
"@atcute/
|
|
28
|
-
"@atcute/
|
|
25
|
+
"@vitest/coverage-v8": "^3.0.4",
|
|
26
|
+
"vitest": "^3.0.4",
|
|
27
|
+
"@atcute/lex-cli": "^1.0.4",
|
|
28
|
+
"@atcute/internal-dev-env": "^1.0.1"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsc --project tsconfig.build.json",
|