@atcute/client 2.0.5 → 2.0.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.
|
@@ -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
|
}
|
|
@@ -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;
|
|
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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AAC;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"}
|
package/dist/lexicons.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export declare namespace ComAtprotoAdminDefs {
|
|
|
64
64
|
invites?: ComAtprotoServerDefs.InviteCode[];
|
|
65
65
|
invitesDisabled?: boolean;
|
|
66
66
|
relatedRecords?: unknown[];
|
|
67
|
+
threatSignatures?: ThreatSignature[];
|
|
67
68
|
}
|
|
68
69
|
interface RepoBlobRef {
|
|
69
70
|
[Brand.Type]?: 'com.atproto.admin.defs#repoBlobRef';
|
|
@@ -80,6 +81,11 @@ export declare namespace ComAtprotoAdminDefs {
|
|
|
80
81
|
applied: boolean;
|
|
81
82
|
ref?: string;
|
|
82
83
|
}
|
|
84
|
+
interface ThreatSignature {
|
|
85
|
+
[Brand.Type]?: 'com.atproto.admin.defs#threatSignature';
|
|
86
|
+
property: string;
|
|
87
|
+
value: string;
|
|
88
|
+
}
|
|
83
89
|
}
|
|
84
90
|
/** Delete a user account as an administrator. */
|
|
85
91
|
export declare namespace ComAtprotoAdminDeleteAccount {
|
|
@@ -435,6 +441,14 @@ export declare namespace ComAtprotoLabelSubscribeLabels {
|
|
|
435
441
|
seq: number;
|
|
436
442
|
}
|
|
437
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
|
+
}
|
|
438
452
|
/** Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. */
|
|
439
453
|
export declare namespace ComAtprotoModerationCreateReport {
|
|
440
454
|
interface Params {
|
|
@@ -498,7 +512,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
|
|
|
498
512
|
[Brand.Type]?: 'com.atproto.repo.applyWrites#create';
|
|
499
513
|
collection: string;
|
|
500
514
|
value: unknown;
|
|
501
|
-
/** Maximum string length:
|
|
515
|
+
/** Maximum string length: 512 */
|
|
502
516
|
rkey?: string;
|
|
503
517
|
}
|
|
504
518
|
interface CreateResult {
|
|
@@ -543,7 +557,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
|
|
|
543
557
|
repo: string;
|
|
544
558
|
/**
|
|
545
559
|
* The Record Key. \
|
|
546
|
-
* Maximum string length:
|
|
560
|
+
* Maximum string length: 512
|
|
547
561
|
*/
|
|
548
562
|
rkey?: string;
|
|
549
563
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -713,7 +727,7 @@ export declare namespace ComAtprotoRepoPutRecord {
|
|
|
713
727
|
repo: string;
|
|
714
728
|
/**
|
|
715
729
|
* The Record Key. \
|
|
716
|
-
* Maximum string length:
|
|
730
|
+
* Maximum string length: 512
|
|
717
731
|
*/
|
|
718
732
|
rkey: string;
|
|
719
733
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -890,6 +904,8 @@ export declare namespace ComAtprotoServerCreateSession {
|
|
|
890
904
|
/** Handle or other identifier supported by the server for the authenticating user. */
|
|
891
905
|
identifier: string;
|
|
892
906
|
password: string;
|
|
907
|
+
/** When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned */
|
|
908
|
+
allowTakendown?: boolean;
|
|
893
909
|
authFactorToken?: string;
|
|
894
910
|
}
|
|
895
911
|
interface Output {
|
|
@@ -1483,6 +1499,16 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1483
1499
|
time: string;
|
|
1484
1500
|
}
|
|
1485
1501
|
}
|
|
1502
|
+
/** Add a handle to the set of reserved handles. */
|
|
1503
|
+
export declare namespace ComAtprotoTempAddReservedHandle {
|
|
1504
|
+
interface Params {
|
|
1505
|
+
}
|
|
1506
|
+
interface Input {
|
|
1507
|
+
handle: string;
|
|
1508
|
+
}
|
|
1509
|
+
interface Output {
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1486
1512
|
/** Check accounts location in signup queue. */
|
|
1487
1513
|
export declare namespace ComAtprotoTempCheckSignupQueue {
|
|
1488
1514
|
interface Params {
|
|
@@ -1523,6 +1549,7 @@ export declare namespace ComAtprotoTempRequestPhoneVerification {
|
|
|
1523
1549
|
type Output = undefined;
|
|
1524
1550
|
}
|
|
1525
1551
|
export declare interface Records {
|
|
1552
|
+
'com.atproto.lexicon.schema': ComAtprotoLexiconSchema.Record;
|
|
1526
1553
|
}
|
|
1527
1554
|
export declare interface Queries {
|
|
1528
1555
|
'com.atproto.admin.getAccountInfo': {
|
|
@@ -1769,6 +1796,10 @@ export declare interface Procedures {
|
|
|
1769
1796
|
'com.atproto.sync.requestCrawl': {
|
|
1770
1797
|
input: ComAtprotoSyncRequestCrawl.Input;
|
|
1771
1798
|
};
|
|
1799
|
+
'com.atproto.temp.addReservedHandle': {
|
|
1800
|
+
input: ComAtprotoTempAddReservedHandle.Input;
|
|
1801
|
+
output: ComAtprotoTempAddReservedHandle.Output;
|
|
1802
|
+
};
|
|
1772
1803
|
'com.atproto.temp.requestPhoneVerification': {
|
|
1773
1804
|
input: ComAtprotoTempRequestPhoneVerification.Input;
|
|
1774
1805
|
};
|
|
@@ -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:
|
|
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
|
@@ -71,6 +71,7 @@ export declare namespace ComAtprotoAdminDefs {
|
|
|
71
71
|
invites?: ComAtprotoServerDefs.InviteCode[];
|
|
72
72
|
invitesDisabled?: boolean;
|
|
73
73
|
relatedRecords?: unknown[];
|
|
74
|
+
threatSignatures?: ThreatSignature[];
|
|
74
75
|
}
|
|
75
76
|
interface RepoBlobRef {
|
|
76
77
|
[Brand.Type]?: 'com.atproto.admin.defs#repoBlobRef';
|
|
@@ -87,6 +88,11 @@ export declare namespace ComAtprotoAdminDefs {
|
|
|
87
88
|
applied: boolean;
|
|
88
89
|
ref?: string;
|
|
89
90
|
}
|
|
91
|
+
interface ThreatSignature {
|
|
92
|
+
[Brand.Type]?: 'com.atproto.admin.defs#threatSignature';
|
|
93
|
+
property: string;
|
|
94
|
+
value: string;
|
|
95
|
+
}
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
/** Delete a user account as an administrator. */
|
|
@@ -470,6 +476,15 @@ export declare namespace ComAtprotoLabelSubscribeLabels {
|
|
|
470
476
|
}
|
|
471
477
|
}
|
|
472
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
|
+
|
|
473
488
|
/** Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. */
|
|
474
489
|
export declare namespace ComAtprotoModerationCreateReport {
|
|
475
490
|
interface Params {}
|
|
@@ -541,7 +556,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
|
|
|
541
556
|
[Brand.Type]?: 'com.atproto.repo.applyWrites#create';
|
|
542
557
|
collection: string;
|
|
543
558
|
value: unknown;
|
|
544
|
-
/** Maximum string length:
|
|
559
|
+
/** Maximum string length: 512 */
|
|
545
560
|
rkey?: string;
|
|
546
561
|
}
|
|
547
562
|
interface CreateResult {
|
|
@@ -586,7 +601,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
|
|
|
586
601
|
repo: string;
|
|
587
602
|
/**
|
|
588
603
|
* The Record Key. \
|
|
589
|
-
* Maximum string length:
|
|
604
|
+
* Maximum string length: 512
|
|
590
605
|
*/
|
|
591
606
|
rkey?: string;
|
|
592
607
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -761,7 +776,7 @@ export declare namespace ComAtprotoRepoPutRecord {
|
|
|
761
776
|
repo: string;
|
|
762
777
|
/**
|
|
763
778
|
* The Record Key. \
|
|
764
|
-
* Maximum string length:
|
|
779
|
+
* Maximum string length: 512
|
|
765
780
|
*/
|
|
766
781
|
rkey: string;
|
|
767
782
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -939,6 +954,8 @@ export declare namespace ComAtprotoServerCreateSession {
|
|
|
939
954
|
/** Handle or other identifier supported by the server for the authenticating user. */
|
|
940
955
|
identifier: string;
|
|
941
956
|
password: string;
|
|
957
|
+
/** When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned */
|
|
958
|
+
allowTakendown?: boolean;
|
|
942
959
|
authFactorToken?: string;
|
|
943
960
|
}
|
|
944
961
|
interface Output {
|
|
@@ -1547,6 +1564,15 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1547
1564
|
}
|
|
1548
1565
|
}
|
|
1549
1566
|
|
|
1567
|
+
/** Add a handle to the set of reserved handles. */
|
|
1568
|
+
export declare namespace ComAtprotoTempAddReservedHandle {
|
|
1569
|
+
interface Params {}
|
|
1570
|
+
interface Input {
|
|
1571
|
+
handle: string;
|
|
1572
|
+
}
|
|
1573
|
+
interface Output {}
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1550
1576
|
/** Check accounts location in signup queue. */
|
|
1551
1577
|
export declare namespace ComAtprotoTempCheckSignupQueue {
|
|
1552
1578
|
interface Params {}
|
|
@@ -1587,7 +1613,9 @@ export declare namespace ComAtprotoTempRequestPhoneVerification {
|
|
|
1587
1613
|
type Output = undefined;
|
|
1588
1614
|
}
|
|
1589
1615
|
|
|
1590
|
-
export declare interface Records {
|
|
1616
|
+
export declare interface Records {
|
|
1617
|
+
'com.atproto.lexicon.schema': ComAtprotoLexiconSchema.Record;
|
|
1618
|
+
}
|
|
1591
1619
|
|
|
1592
1620
|
export declare interface Queries {
|
|
1593
1621
|
'com.atproto.admin.getAccountInfo': {
|
|
@@ -1835,6 +1863,10 @@ export declare interface Procedures {
|
|
|
1835
1863
|
'com.atproto.sync.requestCrawl': {
|
|
1836
1864
|
input: ComAtprotoSyncRequestCrawl.Input;
|
|
1837
1865
|
};
|
|
1866
|
+
'com.atproto.temp.addReservedHandle': {
|
|
1867
|
+
input: ComAtprotoTempAddReservedHandle.Input;
|
|
1868
|
+
output: ComAtprotoTempAddReservedHandle.Output;
|
|
1869
|
+
};
|
|
1838
1870
|
'com.atproto.temp.requestPhoneVerification': {
|
|
1839
1871
|
input: ComAtprotoTempRequestPhoneVerification.Input;
|
|
1840
1872
|
};
|
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.7",
|
|
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.
|
|
26
|
-
"vitest": "^2.1.
|
|
25
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
26
|
+
"vitest": "^2.1.8",
|
|
27
27
|
"@atcute/internal-dev-env": "^1.0.1",
|
|
28
|
-
"@atcute/lex-cli": "^1.0.
|
|
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
|
}
|