@atcute/client 2.0.4 → 2.0.6
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 +23 -3
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +2 -2
- package/dist/rpc.js.map +1 -1
- package/lib/lexicons.ts +22 -3
- package/lib/rpc.ts +10 -2
- package/package.json +1 -1
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 {
|
|
@@ -498,7 +504,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
|
|
|
498
504
|
[Brand.Type]?: 'com.atproto.repo.applyWrites#create';
|
|
499
505
|
collection: string;
|
|
500
506
|
value: unknown;
|
|
501
|
-
/** Maximum string length:
|
|
507
|
+
/** Maximum string length: 512 */
|
|
502
508
|
rkey?: string;
|
|
503
509
|
}
|
|
504
510
|
interface CreateResult {
|
|
@@ -543,7 +549,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
|
|
|
543
549
|
repo: string;
|
|
544
550
|
/**
|
|
545
551
|
* The Record Key. \
|
|
546
|
-
* Maximum string length:
|
|
552
|
+
* Maximum string length: 512
|
|
547
553
|
*/
|
|
548
554
|
rkey?: string;
|
|
549
555
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -713,7 +719,7 @@ export declare namespace ComAtprotoRepoPutRecord {
|
|
|
713
719
|
repo: string;
|
|
714
720
|
/**
|
|
715
721
|
* The Record Key. \
|
|
716
|
-
* Maximum string length:
|
|
722
|
+
* Maximum string length: 512
|
|
717
723
|
*/
|
|
718
724
|
rkey: string;
|
|
719
725
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -1483,6 +1489,16 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1483
1489
|
time: string;
|
|
1484
1490
|
}
|
|
1485
1491
|
}
|
|
1492
|
+
/** Add a handle to the set of reserved handles. */
|
|
1493
|
+
export declare namespace ComAtprotoTempAddReservedHandle {
|
|
1494
|
+
interface Params {
|
|
1495
|
+
}
|
|
1496
|
+
interface Input {
|
|
1497
|
+
handle: string;
|
|
1498
|
+
}
|
|
1499
|
+
interface Output {
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1486
1502
|
/** Check accounts location in signup queue. */
|
|
1487
1503
|
export declare namespace ComAtprotoTempCheckSignupQueue {
|
|
1488
1504
|
interface Params {
|
|
@@ -1769,6 +1785,10 @@ export declare interface Procedures {
|
|
|
1769
1785
|
'com.atproto.sync.requestCrawl': {
|
|
1770
1786
|
input: ComAtprotoSyncRequestCrawl.Input;
|
|
1771
1787
|
};
|
|
1788
|
+
'com.atproto.temp.addReservedHandle': {
|
|
1789
|
+
input: ComAtprotoTempAddReservedHandle.Input;
|
|
1790
|
+
output: ComAtprotoTempAddReservedHandle.Output;
|
|
1791
|
+
};
|
|
1772
1792
|
'com.atproto.temp.requestPhoneVerification': {
|
|
1773
1793
|
input: ComAtprotoTempRequestPhoneVerification.Input;
|
|
1774
1794
|
};
|
package/dist/rpc.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class XRPCError extends Error {
|
|
|
24
24
|
kind?: string;
|
|
25
25
|
/** Error description */
|
|
26
26
|
description?: string;
|
|
27
|
-
constructor(status: number, { kind, description, headers, cause }?: XRPCErrorOptions);
|
|
27
|
+
constructor(status: number, { kind, description, headers, cause, }?: XRPCErrorOptions);
|
|
28
28
|
}
|
|
29
29
|
/** Service proxy options */
|
|
30
30
|
export interface XRPCProxyOptions {
|
package/dist/rpc.js
CHANGED
|
@@ -2,8 +2,8 @@ import { buildFetchHandler } from './fetch-handler.js';
|
|
|
2
2
|
import { mergeHeaders } from './utils/http.js';
|
|
3
3
|
/** Error coming from the XRPC service */
|
|
4
4
|
export class XRPCError extends Error {
|
|
5
|
-
constructor(status, { kind
|
|
6
|
-
super(`${kind
|
|
5
|
+
constructor(status, { kind = `HTTP error ${status}`, description = `Unspecified error description`, headers, cause, } = {}) {
|
|
6
|
+
super(`${kind} > ${description}`, { cause });
|
|
7
7
|
this.name = 'XRPCError';
|
|
8
8
|
this.status = status;
|
|
9
9
|
this.kind = kind;
|
package/dist/rpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../lib/rpc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA8C,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAkB/C,yCAAyC;AACzC,MAAM,OAAO,SAAU,SAAQ,KAAK;IAYnC,
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../lib/rpc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA8C,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAkB/C,yCAAyC;AACzC,MAAM,OAAO,SAAU,SAAQ,KAAK;IAYnC,YACC,MAAc,EACd,EACC,IAAI,GAAG,cAAc,MAAM,EAAE,EAC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AK,GAAG,CAAC,GAAS,EAAQ,EAAE;IACxC,OAAO,IAAI,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAS,EAAE,OAAyB,EAAE,EAAE;IACjE,OAAO,IAAI,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1D,CAAC,CAAC"}
|
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. */
|
|
@@ -541,7 +547,7 @@ export declare namespace ComAtprotoRepoApplyWrites {
|
|
|
541
547
|
[Brand.Type]?: 'com.atproto.repo.applyWrites#create';
|
|
542
548
|
collection: string;
|
|
543
549
|
value: unknown;
|
|
544
|
-
/** Maximum string length:
|
|
550
|
+
/** Maximum string length: 512 */
|
|
545
551
|
rkey?: string;
|
|
546
552
|
}
|
|
547
553
|
interface CreateResult {
|
|
@@ -586,7 +592,7 @@ export declare namespace ComAtprotoRepoCreateRecord {
|
|
|
586
592
|
repo: string;
|
|
587
593
|
/**
|
|
588
594
|
* The Record Key. \
|
|
589
|
-
* Maximum string length:
|
|
595
|
+
* Maximum string length: 512
|
|
590
596
|
*/
|
|
591
597
|
rkey?: string;
|
|
592
598
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -761,7 +767,7 @@ export declare namespace ComAtprotoRepoPutRecord {
|
|
|
761
767
|
repo: string;
|
|
762
768
|
/**
|
|
763
769
|
* The Record Key. \
|
|
764
|
-
* Maximum string length:
|
|
770
|
+
* Maximum string length: 512
|
|
765
771
|
*/
|
|
766
772
|
rkey: string;
|
|
767
773
|
/** Compare and swap with the previous commit by CID. */
|
|
@@ -1547,6 +1553,15 @@ export declare namespace ComAtprotoSyncSubscribeRepos {
|
|
|
1547
1553
|
}
|
|
1548
1554
|
}
|
|
1549
1555
|
|
|
1556
|
+
/** Add a handle to the set of reserved handles. */
|
|
1557
|
+
export declare namespace ComAtprotoTempAddReservedHandle {
|
|
1558
|
+
interface Params {}
|
|
1559
|
+
interface Input {
|
|
1560
|
+
handle: string;
|
|
1561
|
+
}
|
|
1562
|
+
interface Output {}
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1550
1565
|
/** Check accounts location in signup queue. */
|
|
1551
1566
|
export declare namespace ComAtprotoTempCheckSignupQueue {
|
|
1552
1567
|
interface Params {}
|
|
@@ -1835,6 +1850,10 @@ export declare interface Procedures {
|
|
|
1835
1850
|
'com.atproto.sync.requestCrawl': {
|
|
1836
1851
|
input: ComAtprotoSyncRequestCrawl.Input;
|
|
1837
1852
|
};
|
|
1853
|
+
'com.atproto.temp.addReservedHandle': {
|
|
1854
|
+
input: ComAtprotoTempAddReservedHandle.Input;
|
|
1855
|
+
output: ComAtprotoTempAddReservedHandle.Output;
|
|
1856
|
+
};
|
|
1838
1857
|
'com.atproto.temp.requestPhoneVerification': {
|
|
1839
1858
|
input: ComAtprotoTempRequestPhoneVerification.Input;
|
|
1840
1859
|
};
|
package/lib/rpc.ts
CHANGED
|
@@ -32,8 +32,16 @@ export class XRPCError extends Error {
|
|
|
32
32
|
/** Error description */
|
|
33
33
|
description?: string;
|
|
34
34
|
|
|
35
|
-
constructor(
|
|
36
|
-
|
|
35
|
+
constructor(
|
|
36
|
+
status: number,
|
|
37
|
+
{
|
|
38
|
+
kind = `HTTP error ${status}`,
|
|
39
|
+
description = `Unspecified error description`,
|
|
40
|
+
headers,
|
|
41
|
+
cause,
|
|
42
|
+
}: XRPCErrorOptions = {},
|
|
43
|
+
) {
|
|
44
|
+
super(`${kind} > ${description}`, { cause });
|
|
37
45
|
|
|
38
46
|
this.status = status;
|
|
39
47
|
this.kind = kind;
|