@atcute/client 2.0.6 → 2.0.8

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.
@@ -3,7 +3,7 @@ import { type FetchHandlerObject } from './fetch-handler.js';
3
3
  /** Interface for the decoded access token, for convenience */
4
4
  export interface AtpAccessJwt {
5
5
  /** Access token scope, app password returns a different scope. */
6
- scope: 'com.atproto.access' | 'com.atproto.appPass' | 'com.atproto.appPassPrivileged';
6
+ scope: 'com.atproto.access' | 'com.atproto.appPass' | 'com.atproto.appPassPrivileged' | 'com.atproto.signupQueued' | 'com.atproto.takendown';
7
7
  /** Account DID */
8
8
  sub: At.DID;
9
9
  /** Expiration time */
@@ -90,4 +90,6 @@ export interface AuthLoginOptions {
90
90
  password: string;
91
91
  /** Two-factor authentication code */
92
92
  code?: string;
93
+ /** Allow signing in even if the account has been taken down, */
94
+ allowTakendown?: boolean;
93
95
  }
@@ -144,6 +144,7 @@ export class CredentialManager {
144
144
  identifier: options.identifier,
145
145
  password: options.password,
146
146
  authFactorToken: options.code,
147
+ allowTakendown: options.allowTakendown,
147
148
  },
148
149
  });
149
150
  return this.#updateSession(res.data);
@@ -1 +1 @@
1
- {"version":3,"file":"credential-manager.js","sourceRoot":"","sources":["../lib/credential-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAoB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAqE3C,MAAM,OAAO,iBAAiB;IAI7B,OAAO,CAAO;IACd,sBAAsB,CAA4B;IAElD,UAAU,CAAwC;IAClD,UAAU,CAAwC;IAClD,gBAAgB,CAA8C;IAK9D,YAAY,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,eAAe,EACf,KAAK,EAA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IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,kBAAkB,EAAE,CAAC;QACjE,OAAO,KAAK,CAAC;IACd,CAAC;IAED,yDAAyD;IACzD,wDAAwD;IACxD,IAAI,oBAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;QACvD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QACzD,OAAO,KAAK,KAAK,cAAc,IAAI,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,SAAS,CAAC,CAAC;IAC3F,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC/C,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;AAC3D,CAAC,CAAC;AACF,MAAM,oBAAoB,GAAG,CAAC,OAAgB,EAAE,EAAE;IACjD,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,CAAC;AACrD,CAAC,CAAC"}
@@ -441,6 +441,14 @@ export declare namespace ComAtprotoLabelSubscribeLabels {
441
441
  seq: number;
442
442
  }
443
443
  }
444
+ export declare namespace ComAtprotoLexiconSchema {
445
+ /** Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc). */
446
+ interface Record {
447
+ $type: 'com.atproto.lexicon.schema';
448
+ /** Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. */
449
+ lexicon: number;
450
+ }
451
+ }
444
452
  /** Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. */
445
453
  export declare namespace ComAtprotoModerationCreateReport {
446
454
  interface Params {
@@ -504,7 +512,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
504
512
  [Brand.Type]?: 'com.atproto.repo.applyWrites#create';
505
513
  collection: string;
506
514
  value: unknown;
507
- /** Maximum string length: 512 */
515
+ /** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
508
516
  rkey?: string;
509
517
  }
510
518
  interface CreateResult {
@@ -547,10 +555,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
547
555
  record: unknown;
548
556
  /** The handle or DID of the repo (aka, current account). */
549
557
  repo: string;
550
- /**
551
- * The Record Key. \
552
- * Maximum string length: 512
553
- */
558
+ /** The Record Key. */
554
559
  rkey?: string;
555
560
  /** Compare and swap with the previous commit by CID. */
556
561
  swapCommit?: At.CID;
@@ -717,10 +722,7 @@ export declare namespace ComAtprotoRepoPutRecord {
717
722
  record: unknown;
718
723
  /** The handle or DID of the repo (aka, current account). */
719
724
  repo: string;
720
- /**
721
- * The Record Key. \
722
- * Maximum string length: 512
723
- */
725
+ /** The Record Key. */
724
726
  rkey: string;
725
727
  /** Compare and swap with the previous commit by CID. */
726
728
  swapCommit?: At.CID;
@@ -896,6 +898,8 @@ export declare namespace ComAtprotoServerCreateSession {
896
898
  /** Handle or other identifier supported by the server for the authenticating user. */
897
899
  identifier: string;
898
900
  password: string;
901
+ /** When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned */
902
+ allowTakendown?: boolean;
899
903
  authFactorToken?: string;
900
904
  }
901
905
  interface Output {
@@ -1305,7 +1309,7 @@ export declare namespace ComAtprotoSyncGetRepoStatus {
1305
1309
  /** Optional field, the current rev of the repo, if active=true */
1306
1310
  rev?: string;
1307
1311
  /** 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. */
1308
- status?: 'deactivated' | 'suspended' | 'takendown' | (string & {});
1312
+ status?: 'deactivated' | 'deleted' | 'desynchronized' | 'suspended' | 'takendown' | 'throttled' | (string & {});
1309
1313
  }
1310
1314
  interface Errors {
1311
1315
  RepoNotFound: {};
@@ -1362,7 +1366,30 @@ export declare namespace ComAtprotoSyncListRepos {
1362
1366
  rev: string;
1363
1367
  active?: boolean;
1364
1368
  /** 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. */
1365
- status?: 'deactivated' | 'suspended' | 'takendown' | (string & {});
1369
+ status?: 'deactivated' | 'deleted' | 'desynchronized' | 'suspended' | 'takendown' | 'throttled' | (string & {});
1370
+ }
1371
+ }
1372
+ /** Enumerates all the DIDs which have records with the given collection NSID. */
1373
+ export declare namespace ComAtprotoSyncListReposByCollection {
1374
+ interface Params {
1375
+ collection: string;
1376
+ cursor?: string;
1377
+ /**
1378
+ * Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. \
1379
+ * Minimum: 1 \
1380
+ * Maximum: 2000
1381
+ * @default 500
1382
+ */
1383
+ limit?: number;
1384
+ }
1385
+ type Input = undefined;
1386
+ interface Output {
1387
+ repos: Repo[];
1388
+ cursor?: string;
1389
+ }
1390
+ interface Repo {
1391
+ [Brand.Type]?: 'com.atproto.sync.listReposByCollection#repo';
1392
+ did: At.DID;
1366
1393
  }
1367
1394
  }
1368
1395
  /** 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. */
@@ -1395,14 +1422,17 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1395
1422
  seq: number;
1396
1423
  time: string;
1397
1424
  /** If active=false, this optional field indicates a reason for why the account is not active. */
1398
- status?: 'deactivated' | 'deleted' | 'suspended' | 'takendown' | (string & {});
1425
+ status?: 'deactivated' | 'deleted' | 'desynchronized' | 'suspended' | 'takendown' | 'throttled' | (string & {});
1399
1426
  }
1400
1427
  /** 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. */
1401
1428
  interface Commit {
1402
1429
  [Brand.Type]?: 'com.atproto.sync.subscribeRepos#commit';
1403
- /** List of new blobs (by CID) referenced by records in this commit. */
1430
+ /**
1431
+ * DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.
1432
+ * @deprecated
1433
+ */
1404
1434
  blobs: At.CIDLink[];
1405
- /** CAR file containing relevant blocks, as a diff since the previous repo state. */
1435
+ /** 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. */
1406
1436
  blocks: At.Bytes;
1407
1437
  /** Repo commit object CID. */
1408
1438
  commit: At.CIDLink;
@@ -1416,7 +1446,7 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1416
1446
  * @deprecated
1417
1447
  */
1418
1448
  rebase: boolean;
1419
- /** The repo this event comes from. */
1449
+ /** The repo this event comes from. Note that all other message types name this field 'did'. */
1420
1450
  repo: At.DID;
1421
1451
  /** 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. */
1422
1452
  rev: string;
@@ -1426,13 +1456,13 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1426
1456
  since: string | null;
1427
1457
  /** Timestamp of when this message was originally broadcast. */
1428
1458
  time: string;
1429
- /** 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. */
1430
- tooBig: boolean;
1431
1459
  /**
1432
- * DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability.
1460
+ * 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.
1433
1461
  * @deprecated
1434
1462
  */
1435
- prev?: At.CIDLink | null;
1463
+ tooBig: boolean;
1464
+ /** 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. */
1465
+ prevData?: At.CIDLink;
1436
1466
  }
1437
1467
  /**
1438
1468
  * DEPRECATED -- Use #identity event instead
@@ -1477,6 +1507,22 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1477
1507
  /** For creates and updates, the new record CID. For deletions, null. */
1478
1508
  cid: At.CIDLink | null;
1479
1509
  path: string;
1510
+ /** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */
1511
+ prev?: At.CIDLink;
1512
+ }
1513
+ /** 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. */
1514
+ interface Sync {
1515
+ [Brand.Type]?: 'com.atproto.sync.subscribeRepos#sync';
1516
+ /** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */
1517
+ blocks: At.Bytes;
1518
+ /** The account this repo event corresponds to. Must match that in the commit object. */
1519
+ did: At.DID;
1520
+ /** The rev of the commit. This value must match that in the commit object. */
1521
+ rev: string;
1522
+ /** The stream sequence number of this message. */
1523
+ seq: number;
1524
+ /** Timestamp of when this message was originally broadcast. */
1525
+ time: string;
1480
1526
  }
1481
1527
  /**
1482
1528
  * DEPRECATED -- Use #account event instead
@@ -1539,6 +1585,7 @@ export declare namespace ComAtprotoTempRequestPhoneVerification {
1539
1585
  type Output = undefined;
1540
1586
  }
1541
1587
  export declare interface Records {
1588
+ 'com.atproto.lexicon.schema': ComAtprotoLexiconSchema.Record;
1542
1589
  }
1543
1590
  export declare interface Queries {
1544
1591
  'com.atproto.admin.getAccountInfo': {
@@ -1648,6 +1695,10 @@ export declare interface Queries {
1648
1695
  params: ComAtprotoSyncListRepos.Params;
1649
1696
  output: ComAtprotoSyncListRepos.Output;
1650
1697
  };
1698
+ 'com.atproto.sync.listReposByCollection': {
1699
+ params: ComAtprotoSyncListReposByCollection.Params;
1700
+ output: ComAtprotoSyncListReposByCollection.Output;
1701
+ };
1651
1702
  'com.atproto.temp.checkSignupQueue': {
1652
1703
  output: ComAtprotoTempCheckSignupQueue.Output;
1653
1704
  };
@@ -9,7 +9,12 @@ import { decodeJwt } from './utils/jwt.js';
9
9
  /** Interface for the decoded access token, for convenience */
10
10
  export interface AtpAccessJwt {
11
11
  /** Access token scope, app password returns a different scope. */
12
- scope: 'com.atproto.access' | 'com.atproto.appPass' | 'com.atproto.appPassPrivileged';
12
+ scope:
13
+ | 'com.atproto.access'
14
+ | 'com.atproto.appPass'
15
+ | 'com.atproto.appPassPrivileged'
16
+ | 'com.atproto.signupQueued'
17
+ | 'com.atproto.takendown';
13
18
  /** Account DID */
14
19
  sub: At.DID;
15
20
  /** Expiration time */
@@ -264,6 +269,7 @@ export class CredentialManager implements FetchHandlerObject {
264
269
  identifier: options.identifier,
265
270
  password: options.password,
266
271
  authFactorToken: options.code,
272
+ allowTakendown: options.allowTakendown,
267
273
  },
268
274
  });
269
275
 
@@ -279,6 +285,8 @@ export interface AuthLoginOptions {
279
285
  password: string;
280
286
  /** Two-factor authentication code */
281
287
  code?: string;
288
+ /** Allow signing in even if the account has been taken down, */
289
+ allowTakendown?: boolean;
282
290
  }
283
291
 
284
292
  const isExpiredTokenResponse = async (response: Response): Promise<boolean> => {
package/lib/lexicons.ts CHANGED
@@ -476,6 +476,15 @@ export declare namespace ComAtprotoLabelSubscribeLabels {
476
476
  }
477
477
  }
478
478
 
479
+ export declare namespace ComAtprotoLexiconSchema {
480
+ /** Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc). */
481
+ interface Record {
482
+ $type: 'com.atproto.lexicon.schema';
483
+ /** Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. */
484
+ lexicon: number;
485
+ }
486
+ }
487
+
479
488
  /** Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. */
480
489
  export declare namespace ComAtprotoModerationCreateReport {
481
490
  interface Params {}
@@ -547,7 +556,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
547
556
  [Brand.Type]?: 'com.atproto.repo.applyWrites#create';
548
557
  collection: string;
549
558
  value: unknown;
550
- /** Maximum string length: 512 */
559
+ /** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
551
560
  rkey?: string;
552
561
  }
553
562
  interface CreateResult {
@@ -590,10 +599,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
590
599
  record: unknown;
591
600
  /** The handle or DID of the repo (aka, current account). */
592
601
  repo: string;
593
- /**
594
- * The Record Key. \
595
- * Maximum string length: 512
596
- */
602
+ /** The Record Key. */
597
603
  rkey?: string;
598
604
  /** Compare and swap with the previous commit by CID. */
599
605
  swapCommit?: At.CID;
@@ -765,10 +771,7 @@ export declare namespace ComAtprotoRepoPutRecord {
765
771
  record: unknown;
766
772
  /** The handle or DID of the repo (aka, current account). */
767
773
  repo: string;
768
- /**
769
- * The Record Key. \
770
- * Maximum string length: 512
771
- */
774
+ /** The Record Key. */
772
775
  rkey: string;
773
776
  /** Compare and swap with the previous commit by CID. */
774
777
  swapCommit?: At.CID;
@@ -945,6 +948,8 @@ export declare namespace ComAtprotoServerCreateSession {
945
948
  /** Handle or other identifier supported by the server for the authenticating user. */
946
949
  identifier: string;
947
950
  password: string;
951
+ /** When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned */
952
+ allowTakendown?: boolean;
948
953
  authFactorToken?: string;
949
954
  }
950
955
  interface Output {
@@ -1365,7 +1370,14 @@ export declare namespace ComAtprotoSyncGetRepoStatus {
1365
1370
  /** Optional field, the current rev of the repo, if active=true */
1366
1371
  rev?: string;
1367
1372
  /** 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. */
1368
- status?: 'deactivated' | 'suspended' | 'takendown' | (string & {});
1373
+ status?:
1374
+ | 'deactivated'
1375
+ | 'deleted'
1376
+ | 'desynchronized'
1377
+ | 'suspended'
1378
+ | 'takendown'
1379
+ | 'throttled'
1380
+ | (string & {});
1369
1381
  }
1370
1382
  interface Errors {
1371
1383
  RepoNotFound: {};
@@ -1424,7 +1436,38 @@ export declare namespace ComAtprotoSyncListRepos {
1424
1436
  rev: string;
1425
1437
  active?: boolean;
1426
1438
  /** 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. */
1427
- status?: 'deactivated' | 'suspended' | 'takendown' | (string & {});
1439
+ status?:
1440
+ | 'deactivated'
1441
+ | 'deleted'
1442
+ | 'desynchronized'
1443
+ | 'suspended'
1444
+ | 'takendown'
1445
+ | 'throttled'
1446
+ | (string & {});
1447
+ }
1448
+ }
1449
+
1450
+ /** Enumerates all the DIDs which have records with the given collection NSID. */
1451
+ export declare namespace ComAtprotoSyncListReposByCollection {
1452
+ interface Params {
1453
+ collection: string;
1454
+ cursor?: string;
1455
+ /**
1456
+ * Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. \
1457
+ * Minimum: 1 \
1458
+ * Maximum: 2000
1459
+ * @default 500
1460
+ */
1461
+ limit?: number;
1462
+ }
1463
+ type Input = undefined;
1464
+ interface Output {
1465
+ repos: Repo[];
1466
+ cursor?: string;
1467
+ }
1468
+ interface Repo {
1469
+ [Brand.Type]?: 'com.atproto.sync.listReposByCollection#repo';
1470
+ did: At.DID;
1428
1471
  }
1429
1472
  }
1430
1473
 
@@ -1458,14 +1501,24 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1458
1501
  seq: number;
1459
1502
  time: string;
1460
1503
  /** If active=false, this optional field indicates a reason for why the account is not active. */
1461
- status?: 'deactivated' | 'deleted' | 'suspended' | 'takendown' | (string & {});
1504
+ status?:
1505
+ | 'deactivated'
1506
+ | 'deleted'
1507
+ | 'desynchronized'
1508
+ | 'suspended'
1509
+ | 'takendown'
1510
+ | 'throttled'
1511
+ | (string & {});
1462
1512
  }
1463
1513
  /** 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. */
1464
1514
  interface Commit {
1465
1515
  [Brand.Type]?: 'com.atproto.sync.subscribeRepos#commit';
1466
- /** List of new blobs (by CID) referenced by records in this commit. */
1516
+ /**
1517
+ * DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.
1518
+ * @deprecated
1519
+ */
1467
1520
  blobs: At.CIDLink[];
1468
- /** CAR file containing relevant blocks, as a diff since the previous repo state. */
1521
+ /** 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. */
1469
1522
  blocks: At.Bytes;
1470
1523
  /** Repo commit object CID. */
1471
1524
  commit: At.CIDLink;
@@ -1479,7 +1532,7 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1479
1532
  * @deprecated
1480
1533
  */
1481
1534
  rebase: boolean;
1482
- /** The repo this event comes from. */
1535
+ /** The repo this event comes from. Note that all other message types name this field 'did'. */
1483
1536
  repo: At.DID;
1484
1537
  /** 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. */
1485
1538
  rev: string;
@@ -1489,13 +1542,13 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1489
1542
  since: string | null;
1490
1543
  /** Timestamp of when this message was originally broadcast. */
1491
1544
  time: string;
1492
- /** 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. */
1493
- tooBig: boolean;
1494
1545
  /**
1495
- * DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability.
1546
+ * 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.
1496
1547
  * @deprecated
1497
1548
  */
1498
- prev?: At.CIDLink | null;
1549
+ tooBig: boolean;
1550
+ /** 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. */
1551
+ prevData?: At.CIDLink;
1499
1552
  }
1500
1553
  /**
1501
1554
  * DEPRECATED -- Use #identity event instead
@@ -1540,6 +1593,22 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
1540
1593
  /** For creates and updates, the new record CID. For deletions, null. */
1541
1594
  cid: At.CIDLink | null;
1542
1595
  path: string;
1596
+ /** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */
1597
+ prev?: At.CIDLink;
1598
+ }
1599
+ /** 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. */
1600
+ interface Sync {
1601
+ [Brand.Type]?: 'com.atproto.sync.subscribeRepos#sync';
1602
+ /** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */
1603
+ blocks: At.Bytes;
1604
+ /** The account this repo event corresponds to. Must match that in the commit object. */
1605
+ did: At.DID;
1606
+ /** The rev of the commit. This value must match that in the commit object. */
1607
+ rev: string;
1608
+ /** The stream sequence number of this message. */
1609
+ seq: number;
1610
+ /** Timestamp of when this message was originally broadcast. */
1611
+ time: string;
1543
1612
  }
1544
1613
  /**
1545
1614
  * DEPRECATED -- Use #account event instead
@@ -1602,7 +1671,9 @@ export declare namespace ComAtprotoTempRequestPhoneVerification {
1602
1671
  type Output = undefined;
1603
1672
  }
1604
1673
 
1605
- export declare interface Records {}
1674
+ export declare interface Records {
1675
+ 'com.atproto.lexicon.schema': ComAtprotoLexiconSchema.Record;
1676
+ }
1606
1677
 
1607
1678
  export declare interface Queries {
1608
1679
  'com.atproto.admin.getAccountInfo': {
@@ -1712,6 +1783,10 @@ export declare interface Queries {
1712
1783
  params: ComAtprotoSyncListRepos.Params;
1713
1784
  output: ComAtprotoSyncListRepos.Output;
1714
1785
  };
1786
+ 'com.atproto.sync.listReposByCollection': {
1787
+ params: ComAtprotoSyncListReposByCollection.Params;
1788
+ output: ComAtprotoSyncListReposByCollection.Output;
1789
+ };
1715
1790
  'com.atproto.temp.checkSignupQueue': {
1716
1791
  output: ComAtprotoTempCheckSignupQueue.Output;
1717
1792
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@atcute/client",
4
- "version": "2.0.6",
4
+ "version": "2.0.8",
5
5
  "description": "lightweight and cute API client for AT Protocol",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -22,14 +22,14 @@
22
22
  "./utils/jwt": "./dist/utils/jwt.js"
23
23
  },
24
24
  "devDependencies": {
25
- "@vitest/coverage-v8": "^2.1.3",
26
- "vitest": "^2.1.3",
25
+ "@vitest/coverage-v8": "^3.0.4",
26
+ "vitest": "^3.0.4",
27
27
  "@atcute/internal-dev-env": "^1.0.1",
28
- "@atcute/lex-cli": "^1.0.3"
28
+ "@atcute/lex-cli": "^1.0.4"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsc --project tsconfig.build.json",
32
- "test": "vitest run",
32
+ "test": "vitest run --coverage",
33
33
  "generate": "./scripts/generate-lexicons.sh",
34
34
  "prepublish": "rm -rf dist; pnpm run build"
35
35
  }