@atproto/api 0.6.19 → 0.6.20
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/CHANGELOG.md +12 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/lexicons.d.ts +99 -0
- package/dist/client/types/com/atproto/server/confirmEmail.d.ts +30 -0
- package/dist/client/types/com/atproto/server/createSession.d.ts +1 -0
- package/dist/client/types/com/atproto/server/getSession.d.ts +1 -0
- package/dist/client/types/com/atproto/server/requestEmailConfirmation.d.ts +13 -0
- package/dist/client/types/com/atproto/server/requestEmailUpdate.d.ts +18 -0
- package/dist/client/types/com/atproto/server/updateEmail.d.ts +27 -0
- package/dist/index.js +472 -230
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +1 -0
- package/package.json +7 -7
- package/src/agent.ts +4 -0
- package/src/client/index.ts +52 -0
- package/src/client/lexicons.ts +122 -0
- package/src/client/types/com/atproto/server/confirmEmail.ts +61 -0
- package/src/client/types/com/atproto/server/createSession.ts +1 -0
- package/src/client/types/com/atproto/server/getSession.ts +1 -0
- package/src/client/types/com/atproto/server/requestEmailConfirmation.ts +28 -0
- package/src/client/types/com/atproto/server/requestEmailUpdate.ts +34 -0
- package/src/client/types/com/atproto/server/updateEmail.ts +55 -0
- package/src/types.ts +1 -0
- package/tests/agent.test.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atproto/api
|
|
2
2
|
|
|
3
|
+
## 0.6.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1568](https://github.com/bluesky-social/atproto/pull/1568) [`41ee177f`](https://github.com/bluesky-social/atproto/commit/41ee177f5a440490280d17acd8a89bcddaffb23b) Thanks [@dholms](https://github.com/dholms)! - Added email verification and update flows
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`41ee177f`](https://github.com/bluesky-social/atproto/commit/41ee177f5a440490280d17acd8a89bcddaffb23b)]:
|
|
10
|
+
- @atproto/common-web@0.2.1
|
|
11
|
+
- @atproto/lexicon@0.2.2
|
|
12
|
+
- @atproto/syntax@0.1.2
|
|
13
|
+
- @atproto/xrpc@0.3.2
|
|
14
|
+
|
|
3
15
|
## 0.6.19
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/client/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord';
|
|
|
28
28
|
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords';
|
|
29
29
|
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
|
|
30
30
|
import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob';
|
|
31
|
+
import * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail';
|
|
31
32
|
import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount';
|
|
32
33
|
import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword';
|
|
33
34
|
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode';
|
|
@@ -41,9 +42,12 @@ import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSessi
|
|
|
41
42
|
import * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords';
|
|
42
43
|
import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession';
|
|
43
44
|
import * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete';
|
|
45
|
+
import * as ComAtprotoServerRequestEmailConfirmation from './types/com/atproto/server/requestEmailConfirmation';
|
|
46
|
+
import * as ComAtprotoServerRequestEmailUpdate from './types/com/atproto/server/requestEmailUpdate';
|
|
44
47
|
import * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset';
|
|
45
48
|
import * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword';
|
|
46
49
|
import * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword';
|
|
50
|
+
import * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail';
|
|
47
51
|
import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob';
|
|
48
52
|
import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks';
|
|
49
53
|
import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout';
|
|
@@ -145,6 +149,7 @@ export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords
|
|
|
145
149
|
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
|
|
146
150
|
export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef';
|
|
147
151
|
export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob';
|
|
152
|
+
export * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail';
|
|
148
153
|
export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount';
|
|
149
154
|
export * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword';
|
|
150
155
|
export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode';
|
|
@@ -159,9 +164,12 @@ export * as ComAtprotoServerGetSession from './types/com/atproto/server/getSessi
|
|
|
159
164
|
export * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords';
|
|
160
165
|
export * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession';
|
|
161
166
|
export * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete';
|
|
167
|
+
export * as ComAtprotoServerRequestEmailConfirmation from './types/com/atproto/server/requestEmailConfirmation';
|
|
168
|
+
export * as ComAtprotoServerRequestEmailUpdate from './types/com/atproto/server/requestEmailUpdate';
|
|
162
169
|
export * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset';
|
|
163
170
|
export * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword';
|
|
164
171
|
export * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword';
|
|
172
|
+
export * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail';
|
|
165
173
|
export * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob';
|
|
166
174
|
export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks';
|
|
167
175
|
export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout';
|
|
@@ -338,6 +346,7 @@ export declare class RepoNS {
|
|
|
338
346
|
export declare class ServerNS {
|
|
339
347
|
_service: AtpServiceClient;
|
|
340
348
|
constructor(service: AtpServiceClient);
|
|
349
|
+
confirmEmail(data?: ComAtprotoServerConfirmEmail.InputSchema, opts?: ComAtprotoServerConfirmEmail.CallOptions): Promise<ComAtprotoServerConfirmEmail.Response>;
|
|
341
350
|
createAccount(data?: ComAtprotoServerCreateAccount.InputSchema, opts?: ComAtprotoServerCreateAccount.CallOptions): Promise<ComAtprotoServerCreateAccount.Response>;
|
|
342
351
|
createAppPassword(data?: ComAtprotoServerCreateAppPassword.InputSchema, opts?: ComAtprotoServerCreateAppPassword.CallOptions): Promise<ComAtprotoServerCreateAppPassword.Response>;
|
|
343
352
|
createInviteCode(data?: ComAtprotoServerCreateInviteCode.InputSchema, opts?: ComAtprotoServerCreateInviteCode.CallOptions): Promise<ComAtprotoServerCreateInviteCode.Response>;
|
|
@@ -351,9 +360,12 @@ export declare class ServerNS {
|
|
|
351
360
|
listAppPasswords(params?: ComAtprotoServerListAppPasswords.QueryParams, opts?: ComAtprotoServerListAppPasswords.CallOptions): Promise<ComAtprotoServerListAppPasswords.Response>;
|
|
352
361
|
refreshSession(data?: ComAtprotoServerRefreshSession.InputSchema, opts?: ComAtprotoServerRefreshSession.CallOptions): Promise<ComAtprotoServerRefreshSession.Response>;
|
|
353
362
|
requestAccountDelete(data?: ComAtprotoServerRequestAccountDelete.InputSchema, opts?: ComAtprotoServerRequestAccountDelete.CallOptions): Promise<ComAtprotoServerRequestAccountDelete.Response>;
|
|
363
|
+
requestEmailConfirmation(data?: ComAtprotoServerRequestEmailConfirmation.InputSchema, opts?: ComAtprotoServerRequestEmailConfirmation.CallOptions): Promise<ComAtprotoServerRequestEmailConfirmation.Response>;
|
|
364
|
+
requestEmailUpdate(data?: ComAtprotoServerRequestEmailUpdate.InputSchema, opts?: ComAtprotoServerRequestEmailUpdate.CallOptions): Promise<ComAtprotoServerRequestEmailUpdate.Response>;
|
|
354
365
|
requestPasswordReset(data?: ComAtprotoServerRequestPasswordReset.InputSchema, opts?: ComAtprotoServerRequestPasswordReset.CallOptions): Promise<ComAtprotoServerRequestPasswordReset.Response>;
|
|
355
366
|
resetPassword(data?: ComAtprotoServerResetPassword.InputSchema, opts?: ComAtprotoServerResetPassword.CallOptions): Promise<ComAtprotoServerResetPassword.Response>;
|
|
356
367
|
revokeAppPassword(data?: ComAtprotoServerRevokeAppPassword.InputSchema, opts?: ComAtprotoServerRevokeAppPassword.CallOptions): Promise<ComAtprotoServerRevokeAppPassword.Response>;
|
|
368
|
+
updateEmail(data?: ComAtprotoServerUpdateEmail.InputSchema, opts?: ComAtprotoServerUpdateEmail.CallOptions): Promise<ComAtprotoServerUpdateEmail.Response>;
|
|
357
369
|
}
|
|
358
370
|
export declare class SyncNS {
|
|
359
371
|
_service: AtpServiceClient;
|
|
@@ -2060,6 +2060,34 @@ export declare const schemaDict: {
|
|
|
2060
2060
|
};
|
|
2061
2061
|
};
|
|
2062
2062
|
};
|
|
2063
|
+
ComAtprotoServerConfirmEmail: {
|
|
2064
|
+
lexicon: number;
|
|
2065
|
+
id: string;
|
|
2066
|
+
defs: {
|
|
2067
|
+
main: {
|
|
2068
|
+
type: string;
|
|
2069
|
+
description: string;
|
|
2070
|
+
input: {
|
|
2071
|
+
encoding: string;
|
|
2072
|
+
schema: {
|
|
2073
|
+
type: string;
|
|
2074
|
+
required: string[];
|
|
2075
|
+
properties: {
|
|
2076
|
+
email: {
|
|
2077
|
+
type: string;
|
|
2078
|
+
};
|
|
2079
|
+
token: {
|
|
2080
|
+
type: string;
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2085
|
+
errors: {
|
|
2086
|
+
name: string;
|
|
2087
|
+
}[];
|
|
2088
|
+
};
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2063
2091
|
ComAtprotoServerCreateAccount: {
|
|
2064
2092
|
lexicon: number;
|
|
2065
2093
|
id: string;
|
|
@@ -2321,6 +2349,9 @@ export declare const schemaDict: {
|
|
|
2321
2349
|
email: {
|
|
2322
2350
|
type: string;
|
|
2323
2351
|
};
|
|
2352
|
+
emailConfirmed: {
|
|
2353
|
+
type: string;
|
|
2354
|
+
};
|
|
2324
2355
|
};
|
|
2325
2356
|
};
|
|
2326
2357
|
};
|
|
@@ -2533,6 +2564,9 @@ export declare const schemaDict: {
|
|
|
2533
2564
|
email: {
|
|
2534
2565
|
type: string;
|
|
2535
2566
|
};
|
|
2567
|
+
emailConfirmed: {
|
|
2568
|
+
type: string;
|
|
2569
|
+
};
|
|
2536
2570
|
};
|
|
2537
2571
|
};
|
|
2538
2572
|
};
|
|
@@ -2627,6 +2661,38 @@ export declare const schemaDict: {
|
|
|
2627
2661
|
};
|
|
2628
2662
|
};
|
|
2629
2663
|
};
|
|
2664
|
+
ComAtprotoServerRequestEmailConfirmation: {
|
|
2665
|
+
lexicon: number;
|
|
2666
|
+
id: string;
|
|
2667
|
+
defs: {
|
|
2668
|
+
main: {
|
|
2669
|
+
type: string;
|
|
2670
|
+
description: string;
|
|
2671
|
+
};
|
|
2672
|
+
};
|
|
2673
|
+
};
|
|
2674
|
+
ComAtprotoServerRequestEmailUpdate: {
|
|
2675
|
+
lexicon: number;
|
|
2676
|
+
id: string;
|
|
2677
|
+
defs: {
|
|
2678
|
+
main: {
|
|
2679
|
+
type: string;
|
|
2680
|
+
description: string;
|
|
2681
|
+
output: {
|
|
2682
|
+
encoding: string;
|
|
2683
|
+
schema: {
|
|
2684
|
+
type: string;
|
|
2685
|
+
required: string[];
|
|
2686
|
+
properties: {
|
|
2687
|
+
tokenRequired: {
|
|
2688
|
+
type: string;
|
|
2689
|
+
};
|
|
2690
|
+
};
|
|
2691
|
+
};
|
|
2692
|
+
};
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2630
2696
|
ComAtprotoServerRequestPasswordReset: {
|
|
2631
2697
|
lexicon: number;
|
|
2632
2698
|
id: string;
|
|
@@ -2699,6 +2765,35 @@ export declare const schemaDict: {
|
|
|
2699
2765
|
};
|
|
2700
2766
|
};
|
|
2701
2767
|
};
|
|
2768
|
+
ComAtprotoServerUpdateEmail: {
|
|
2769
|
+
lexicon: number;
|
|
2770
|
+
id: string;
|
|
2771
|
+
defs: {
|
|
2772
|
+
main: {
|
|
2773
|
+
type: string;
|
|
2774
|
+
description: string;
|
|
2775
|
+
input: {
|
|
2776
|
+
encoding: string;
|
|
2777
|
+
schema: {
|
|
2778
|
+
type: string;
|
|
2779
|
+
required: string[];
|
|
2780
|
+
properties: {
|
|
2781
|
+
email: {
|
|
2782
|
+
type: string;
|
|
2783
|
+
};
|
|
2784
|
+
token: {
|
|
2785
|
+
type: string;
|
|
2786
|
+
description: string;
|
|
2787
|
+
};
|
|
2788
|
+
};
|
|
2789
|
+
};
|
|
2790
|
+
};
|
|
2791
|
+
errors: {
|
|
2792
|
+
name: string;
|
|
2793
|
+
}[];
|
|
2794
|
+
};
|
|
2795
|
+
};
|
|
2796
|
+
};
|
|
2702
2797
|
ComAtprotoSyncGetBlob: {
|
|
2703
2798
|
lexicon: number;
|
|
2704
2799
|
id: string;
|
|
@@ -6836,6 +6931,7 @@ export declare const ids: {
|
|
|
6836
6931
|
ComAtprotoRepoPutRecord: string;
|
|
6837
6932
|
ComAtprotoRepoStrongRef: string;
|
|
6838
6933
|
ComAtprotoRepoUploadBlob: string;
|
|
6934
|
+
ComAtprotoServerConfirmEmail: string;
|
|
6839
6935
|
ComAtprotoServerCreateAccount: string;
|
|
6840
6936
|
ComAtprotoServerCreateAppPassword: string;
|
|
6841
6937
|
ComAtprotoServerCreateInviteCode: string;
|
|
@@ -6850,9 +6946,12 @@ export declare const ids: {
|
|
|
6850
6946
|
ComAtprotoServerListAppPasswords: string;
|
|
6851
6947
|
ComAtprotoServerRefreshSession: string;
|
|
6852
6948
|
ComAtprotoServerRequestAccountDelete: string;
|
|
6949
|
+
ComAtprotoServerRequestEmailConfirmation: string;
|
|
6950
|
+
ComAtprotoServerRequestEmailUpdate: string;
|
|
6853
6951
|
ComAtprotoServerRequestPasswordReset: string;
|
|
6854
6952
|
ComAtprotoServerResetPassword: string;
|
|
6855
6953
|
ComAtprotoServerRevokeAppPassword: string;
|
|
6954
|
+
ComAtprotoServerUpdateEmail: string;
|
|
6856
6955
|
ComAtprotoSyncGetBlob: string;
|
|
6857
6956
|
ComAtprotoSyncGetBlocks: string;
|
|
6858
6957
|
ComAtprotoSyncGetCheckout: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export interface InputSchema {
|
|
5
|
+
email: string;
|
|
6
|
+
token: string;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface CallOptions {
|
|
10
|
+
headers?: Headers;
|
|
11
|
+
qp?: QueryParams;
|
|
12
|
+
encoding: 'application/json';
|
|
13
|
+
}
|
|
14
|
+
export interface Response {
|
|
15
|
+
success: boolean;
|
|
16
|
+
headers: Headers;
|
|
17
|
+
}
|
|
18
|
+
export declare class AccountNotFoundError extends XRPCError {
|
|
19
|
+
constructor(src: XRPCError);
|
|
20
|
+
}
|
|
21
|
+
export declare class ExpiredTokenError extends XRPCError {
|
|
22
|
+
constructor(src: XRPCError);
|
|
23
|
+
}
|
|
24
|
+
export declare class InvalidTokenError extends XRPCError {
|
|
25
|
+
constructor(src: XRPCError);
|
|
26
|
+
}
|
|
27
|
+
export declare class InvalidEmailError extends XRPCError {
|
|
28
|
+
constructor(src: XRPCError);
|
|
29
|
+
}
|
|
30
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export declare type InputSchema = undefined;
|
|
5
|
+
export interface CallOptions {
|
|
6
|
+
headers?: Headers;
|
|
7
|
+
qp?: QueryParams;
|
|
8
|
+
}
|
|
9
|
+
export interface Response {
|
|
10
|
+
success: boolean;
|
|
11
|
+
headers: Headers;
|
|
12
|
+
}
|
|
13
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export declare type InputSchema = undefined;
|
|
5
|
+
export interface OutputSchema {
|
|
6
|
+
tokenRequired: boolean;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface CallOptions {
|
|
10
|
+
headers?: Headers;
|
|
11
|
+
qp?: QueryParams;
|
|
12
|
+
}
|
|
13
|
+
export interface Response {
|
|
14
|
+
success: boolean;
|
|
15
|
+
headers: Headers;
|
|
16
|
+
data: OutputSchema;
|
|
17
|
+
}
|
|
18
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export interface InputSchema {
|
|
5
|
+
email: string;
|
|
6
|
+
token?: string;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface CallOptions {
|
|
10
|
+
headers?: Headers;
|
|
11
|
+
qp?: QueryParams;
|
|
12
|
+
encoding: 'application/json';
|
|
13
|
+
}
|
|
14
|
+
export interface Response {
|
|
15
|
+
success: boolean;
|
|
16
|
+
headers: Headers;
|
|
17
|
+
}
|
|
18
|
+
export declare class ExpiredTokenError extends XRPCError {
|
|
19
|
+
constructor(src: XRPCError);
|
|
20
|
+
}
|
|
21
|
+
export declare class InvalidTokenError extends XRPCError {
|
|
22
|
+
constructor(src: XRPCError);
|
|
23
|
+
}
|
|
24
|
+
export declare class TokenRequiredError extends XRPCError {
|
|
25
|
+
constructor(src: XRPCError);
|
|
26
|
+
}
|
|
27
|
+
export declare function toKnownErr(e: any): any;
|