techne-sdk 0.3.8 → 0.4.0
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 +59 -0
- package/README.md +3 -1
- package/dist/auth/account.d.ts +67 -0
- package/dist/auth/account.js +136 -0
- package/dist/auth/hosts.d.ts +4 -0
- package/dist/auth/hosts.js +4 -0
- package/dist/auth/index.d.ts +30 -5
- package/dist/auth/index.js +80 -12
- package/dist/catalog/catalog.gen.js +1067 -194
- package/dist/generated/index.d.ts +9 -0
- package/dist/generated/index.js +27 -0
- package/dist/generated/lexicons.d.ts +1436 -148
- package/dist/generated/lexicons.js +782 -23
- package/dist/generated/nsid.d.ts +14 -0
- package/dist/generated/nsid.js +14 -0
- package/dist/generated/nsid.json +14 -0
- package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/attest.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/attest.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.d.ts +29 -0
- package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.js +27 -0
- package/dist/generated/types/pub/techne/draft/identity/defs.d.ts +22 -4
- package/dist/generated/types/pub/techne/draft/identity/defs.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +6 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.js +14 -0
- package/dist/generated/types/pub/techne/draft/identity/fold.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/fold.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/holdForPhone.d.ts +1 -1
- package/dist/generated/types/pub/techne/draft/identity/link.d.ts +3 -0
- package/dist/generated/types/pub/techne/draft/identity/link.js +7 -0
- package/dist/generated/types/pub/techne/draft/identity/listMethods.d.ts +6 -1
- package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +225 -0
- package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +209 -0
- package/dist/generated/types/pub/techne/draft/identity/openAccountPage.d.ts +40 -0
- package/dist/generated/types/pub/techne/draft/identity/openAccountPage.js +55 -0
- package/dist/generated/types/pub/techne/draft/identity/resolve.d.ts +4 -0
- package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.d.ts +6 -0
- package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.js +7 -0
- package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +2 -2
- package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +7 -1
- package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +17 -3
- package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +7 -1
- package/dist/generated/types/pub/techne/draft/registry/purgeType.js +17 -3
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +11723 -11721
- package/package.json +2 -1
package/dist/generated/nsid.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const NSID: {
|
|
|
19
19
|
readonly ATTENTION_PREFS: "pub.techne.draft.attentionPrefs";
|
|
20
20
|
readonly AUTHORITY: "pub.techne";
|
|
21
21
|
readonly AUTH_COMMONS: "pub.techne.draft.authCommons";
|
|
22
|
+
readonly AUTH_MODERATE: "pub.techne.draft.authModerate";
|
|
22
23
|
readonly AUTH_OPERATOR: "pub.techne.draft.authOperator";
|
|
23
24
|
readonly AUTH_PERMISSIONED: "pub.techne.draft.authPermissioned";
|
|
24
25
|
readonly AUTH_READ: "pub.techne.draft.authRead";
|
|
@@ -87,6 +88,7 @@ export declare const NSID: {
|
|
|
87
88
|
readonly IDENTITY_ACCOUNTS_FOR_PHONES_ACCOUNT: "pub.techne.draft.identity.accountsForPhones#account";
|
|
88
89
|
readonly IDENTITY_ATTEST: "pub.techne.draft.identity.attest";
|
|
89
90
|
readonly IDENTITY_BEGIN_ADD_METHOD: "pub.techne.draft.identity.beginAddMethod";
|
|
91
|
+
readonly IDENTITY_CANCEL_PENDING_CHANGE: "pub.techne.draft.identity.cancelPendingChange";
|
|
90
92
|
readonly IDENTITY_CHECK_LINK_TOKEN: "pub.techne.draft.identity.checkLinkToken";
|
|
91
93
|
readonly IDENTITY_CREATE_COLLECTIVE: "pub.techne.draft.identity.createCollective";
|
|
92
94
|
readonly IDENTITY_CREATE_LINK_TOKEN: "pub.techne.draft.identity.createLinkToken";
|
|
@@ -98,6 +100,7 @@ export declare const NSID: {
|
|
|
98
100
|
readonly IDENTITY_DEFS_LINK_TOKEN_VIEW: "pub.techne.draft.identity.defs#linkTokenView";
|
|
99
101
|
readonly IDENTITY_DEFS_LINK_VIEW: "pub.techne.draft.identity.defs#linkView";
|
|
100
102
|
readonly IDENTITY_DEFS_METHOD_VIEW: "pub.techne.draft.identity.defs#methodView";
|
|
103
|
+
readonly IDENTITY_DEFS_PENDING_CHANGE: "pub.techne.draft.identity.defs#pendingChange";
|
|
101
104
|
readonly IDENTITY_FINISH_ADD_METHOD: "pub.techne.draft.identity.finishAddMethod";
|
|
102
105
|
readonly IDENTITY_FINISH_ADD_METHOD_OFFER: "pub.techne.draft.identity.finishAddMethod#offer";
|
|
103
106
|
readonly IDENTITY_FOLD: "pub.techne.draft.identity.fold";
|
|
@@ -111,6 +114,17 @@ export declare const NSID: {
|
|
|
111
114
|
readonly IDENTITY_LIST_METHODS: "pub.techne.draft.identity.listMethods";
|
|
112
115
|
readonly IDENTITY_LIST_PHONE_HOLDS: "pub.techne.draft.identity.listPhoneHolds";
|
|
113
116
|
readonly IDENTITY_LIST_PHONE_HOLDS_HOLD_VIEW: "pub.techne.draft.identity.listPhoneHolds#holdView";
|
|
117
|
+
readonly IDENTITY_MANAGE_METHODS: "pub.techne.draft.identity.manageMethods";
|
|
118
|
+
readonly IDENTITY_MANAGE_METHODS_BACKUP_EMAIL: "pub.techne.draft.identity.manageMethods#backupEmail";
|
|
119
|
+
readonly IDENTITY_MANAGE_METHODS_DUE_DELETE: "pub.techne.draft.identity.manageMethods#dueDelete";
|
|
120
|
+
readonly IDENTITY_MANAGE_METHODS_EXTERNAL: "pub.techne.draft.identity.manageMethods#external";
|
|
121
|
+
readonly IDENTITY_MANAGE_METHODS_IMPORTED_EMAIL: "pub.techne.draft.identity.manageMethods#importedEmail";
|
|
122
|
+
readonly IDENTITY_MANAGE_METHODS_NOTICE: "pub.techne.draft.identity.manageMethods#notice";
|
|
123
|
+
readonly IDENTITY_MANAGE_METHODS_NOTICE_TO: "pub.techne.draft.identity.manageMethods#noticeTo";
|
|
124
|
+
readonly IDENTITY_MANAGE_METHODS_PROVED_METHOD: "pub.techne.draft.identity.manageMethods#provedMethod";
|
|
125
|
+
readonly IDENTITY_MANAGE_METHODS_SIGN_IN_METHOD: "pub.techne.draft.identity.manageMethods#signInMethod";
|
|
126
|
+
readonly IDENTITY_MANAGE_METHODS_STEP_UP: "pub.techne.draft.identity.manageMethods#stepUp";
|
|
127
|
+
readonly IDENTITY_OPEN_ACCOUNT_PAGE: "pub.techne.draft.identity.openAccountPage";
|
|
114
128
|
readonly IDENTITY_REDEEM_LINK_TOKEN: "pub.techne.draft.identity.redeemLinkToken";
|
|
115
129
|
readonly IDENTITY_RELEASE_PHONE_HOLD: "pub.techne.draft.identity.releasePhoneHold";
|
|
116
130
|
readonly IDENTITY_RESET_LINK_TOKEN: "pub.techne.draft.identity.resetLinkToken";
|
package/dist/generated/nsid.js
CHANGED
|
@@ -23,6 +23,7 @@ export const NSID = {
|
|
|
23
23
|
ATTENTION_PREFS: 'pub.techne.draft.attentionPrefs',
|
|
24
24
|
AUTHORITY: 'pub.techne',
|
|
25
25
|
AUTH_COMMONS: 'pub.techne.draft.authCommons',
|
|
26
|
+
AUTH_MODERATE: 'pub.techne.draft.authModerate',
|
|
26
27
|
AUTH_OPERATOR: 'pub.techne.draft.authOperator',
|
|
27
28
|
AUTH_PERMISSIONED: 'pub.techne.draft.authPermissioned',
|
|
28
29
|
AUTH_READ: 'pub.techne.draft.authRead',
|
|
@@ -91,6 +92,7 @@ export const NSID = {
|
|
|
91
92
|
IDENTITY_ACCOUNTS_FOR_PHONES_ACCOUNT: 'pub.techne.draft.identity.accountsForPhones#account',
|
|
92
93
|
IDENTITY_ATTEST: 'pub.techne.draft.identity.attest',
|
|
93
94
|
IDENTITY_BEGIN_ADD_METHOD: 'pub.techne.draft.identity.beginAddMethod',
|
|
95
|
+
IDENTITY_CANCEL_PENDING_CHANGE: 'pub.techne.draft.identity.cancelPendingChange',
|
|
94
96
|
IDENTITY_CHECK_LINK_TOKEN: 'pub.techne.draft.identity.checkLinkToken',
|
|
95
97
|
IDENTITY_CREATE_COLLECTIVE: 'pub.techne.draft.identity.createCollective',
|
|
96
98
|
IDENTITY_CREATE_LINK_TOKEN: 'pub.techne.draft.identity.createLinkToken',
|
|
@@ -102,6 +104,7 @@ export const NSID = {
|
|
|
102
104
|
IDENTITY_DEFS_LINK_TOKEN_VIEW: 'pub.techne.draft.identity.defs#linkTokenView',
|
|
103
105
|
IDENTITY_DEFS_LINK_VIEW: 'pub.techne.draft.identity.defs#linkView',
|
|
104
106
|
IDENTITY_DEFS_METHOD_VIEW: 'pub.techne.draft.identity.defs#methodView',
|
|
107
|
+
IDENTITY_DEFS_PENDING_CHANGE: 'pub.techne.draft.identity.defs#pendingChange',
|
|
105
108
|
IDENTITY_FINISH_ADD_METHOD: 'pub.techne.draft.identity.finishAddMethod',
|
|
106
109
|
IDENTITY_FINISH_ADD_METHOD_OFFER: 'pub.techne.draft.identity.finishAddMethod#offer',
|
|
107
110
|
IDENTITY_FOLD: 'pub.techne.draft.identity.fold',
|
|
@@ -115,6 +118,17 @@ export const NSID = {
|
|
|
115
118
|
IDENTITY_LIST_METHODS: 'pub.techne.draft.identity.listMethods',
|
|
116
119
|
IDENTITY_LIST_PHONE_HOLDS: 'pub.techne.draft.identity.listPhoneHolds',
|
|
117
120
|
IDENTITY_LIST_PHONE_HOLDS_HOLD_VIEW: 'pub.techne.draft.identity.listPhoneHolds#holdView',
|
|
121
|
+
IDENTITY_MANAGE_METHODS: 'pub.techne.draft.identity.manageMethods',
|
|
122
|
+
IDENTITY_MANAGE_METHODS_BACKUP_EMAIL: 'pub.techne.draft.identity.manageMethods#backupEmail',
|
|
123
|
+
IDENTITY_MANAGE_METHODS_DUE_DELETE: 'pub.techne.draft.identity.manageMethods#dueDelete',
|
|
124
|
+
IDENTITY_MANAGE_METHODS_EXTERNAL: 'pub.techne.draft.identity.manageMethods#external',
|
|
125
|
+
IDENTITY_MANAGE_METHODS_IMPORTED_EMAIL: 'pub.techne.draft.identity.manageMethods#importedEmail',
|
|
126
|
+
IDENTITY_MANAGE_METHODS_NOTICE: 'pub.techne.draft.identity.manageMethods#notice',
|
|
127
|
+
IDENTITY_MANAGE_METHODS_NOTICE_TO: 'pub.techne.draft.identity.manageMethods#noticeTo',
|
|
128
|
+
IDENTITY_MANAGE_METHODS_PROVED_METHOD: 'pub.techne.draft.identity.manageMethods#provedMethod',
|
|
129
|
+
IDENTITY_MANAGE_METHODS_SIGN_IN_METHOD: 'pub.techne.draft.identity.manageMethods#signInMethod',
|
|
130
|
+
IDENTITY_MANAGE_METHODS_STEP_UP: 'pub.techne.draft.identity.manageMethods#stepUp',
|
|
131
|
+
IDENTITY_OPEN_ACCOUNT_PAGE: 'pub.techne.draft.identity.openAccountPage',
|
|
118
132
|
IDENTITY_REDEEM_LINK_TOKEN: 'pub.techne.draft.identity.redeemLinkToken',
|
|
119
133
|
IDENTITY_RELEASE_PHONE_HOLD: 'pub.techne.draft.identity.releasePhoneHold',
|
|
120
134
|
IDENTITY_RESET_LINK_TOKEN: 'pub.techne.draft.identity.resetLinkToken',
|
package/dist/generated/nsid.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"ATTENTION_PREFS": "pub.techne.draft.attentionPrefs",
|
|
20
20
|
"AUTHORITY": "pub.techne",
|
|
21
21
|
"AUTH_COMMONS": "pub.techne.draft.authCommons",
|
|
22
|
+
"AUTH_MODERATE": "pub.techne.draft.authModerate",
|
|
22
23
|
"AUTH_OPERATOR": "pub.techne.draft.authOperator",
|
|
23
24
|
"AUTH_PERMISSIONED": "pub.techne.draft.authPermissioned",
|
|
24
25
|
"AUTH_READ": "pub.techne.draft.authRead",
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"IDENTITY_ACCOUNTS_FOR_PHONES_ACCOUNT": "pub.techne.draft.identity.accountsForPhones#account",
|
|
88
89
|
"IDENTITY_ATTEST": "pub.techne.draft.identity.attest",
|
|
89
90
|
"IDENTITY_BEGIN_ADD_METHOD": "pub.techne.draft.identity.beginAddMethod",
|
|
91
|
+
"IDENTITY_CANCEL_PENDING_CHANGE": "pub.techne.draft.identity.cancelPendingChange",
|
|
90
92
|
"IDENTITY_CHECK_LINK_TOKEN": "pub.techne.draft.identity.checkLinkToken",
|
|
91
93
|
"IDENTITY_CREATE_COLLECTIVE": "pub.techne.draft.identity.createCollective",
|
|
92
94
|
"IDENTITY_CREATE_LINK_TOKEN": "pub.techne.draft.identity.createLinkToken",
|
|
@@ -98,6 +100,7 @@
|
|
|
98
100
|
"IDENTITY_DEFS_LINK_TOKEN_VIEW": "pub.techne.draft.identity.defs#linkTokenView",
|
|
99
101
|
"IDENTITY_DEFS_LINK_VIEW": "pub.techne.draft.identity.defs#linkView",
|
|
100
102
|
"IDENTITY_DEFS_METHOD_VIEW": "pub.techne.draft.identity.defs#methodView",
|
|
103
|
+
"IDENTITY_DEFS_PENDING_CHANGE": "pub.techne.draft.identity.defs#pendingChange",
|
|
101
104
|
"IDENTITY_FINISH_ADD_METHOD": "pub.techne.draft.identity.finishAddMethod",
|
|
102
105
|
"IDENTITY_FINISH_ADD_METHOD_OFFER": "pub.techne.draft.identity.finishAddMethod#offer",
|
|
103
106
|
"IDENTITY_FOLD": "pub.techne.draft.identity.fold",
|
|
@@ -111,6 +114,17 @@
|
|
|
111
114
|
"IDENTITY_LIST_METHODS": "pub.techne.draft.identity.listMethods",
|
|
112
115
|
"IDENTITY_LIST_PHONE_HOLDS": "pub.techne.draft.identity.listPhoneHolds",
|
|
113
116
|
"IDENTITY_LIST_PHONE_HOLDS_HOLD_VIEW": "pub.techne.draft.identity.listPhoneHolds#holdView",
|
|
117
|
+
"IDENTITY_MANAGE_METHODS": "pub.techne.draft.identity.manageMethods",
|
|
118
|
+
"IDENTITY_MANAGE_METHODS_BACKUP_EMAIL": "pub.techne.draft.identity.manageMethods#backupEmail",
|
|
119
|
+
"IDENTITY_MANAGE_METHODS_DUE_DELETE": "pub.techne.draft.identity.manageMethods#dueDelete",
|
|
120
|
+
"IDENTITY_MANAGE_METHODS_EXTERNAL": "pub.techne.draft.identity.manageMethods#external",
|
|
121
|
+
"IDENTITY_MANAGE_METHODS_IMPORTED_EMAIL": "pub.techne.draft.identity.manageMethods#importedEmail",
|
|
122
|
+
"IDENTITY_MANAGE_METHODS_NOTICE": "pub.techne.draft.identity.manageMethods#notice",
|
|
123
|
+
"IDENTITY_MANAGE_METHODS_NOTICE_TO": "pub.techne.draft.identity.manageMethods#noticeTo",
|
|
124
|
+
"IDENTITY_MANAGE_METHODS_PROVED_METHOD": "pub.techne.draft.identity.manageMethods#provedMethod",
|
|
125
|
+
"IDENTITY_MANAGE_METHODS_SIGN_IN_METHOD": "pub.techne.draft.identity.manageMethods#signInMethod",
|
|
126
|
+
"IDENTITY_MANAGE_METHODS_STEP_UP": "pub.techne.draft.identity.manageMethods#stepUp",
|
|
127
|
+
"IDENTITY_OPEN_ACCOUNT_PAGE": "pub.techne.draft.identity.openAccountPage",
|
|
114
128
|
"IDENTITY_REDEEM_LINK_TOKEN": "pub.techne.draft.identity.redeemLinkToken",
|
|
115
129
|
"IDENTITY_RELEASE_PHONE_HOLD": "pub.techne.draft.identity.releasePhoneHold",
|
|
116
130
|
"IDENTITY_RESET_LINK_TOKEN": "pub.techne.draft.identity.resetLinkToken",
|
|
@@ -33,6 +33,9 @@ export declare class AuthenticationRequiredError extends XRPCError {
|
|
|
33
33
|
export declare class NotAuthorizedError extends XRPCError {
|
|
34
34
|
constructor(src: XRPCError);
|
|
35
35
|
}
|
|
36
|
+
export declare class ProgramRefusedError extends XRPCError {
|
|
37
|
+
constructor(src: XRPCError);
|
|
38
|
+
}
|
|
36
39
|
export declare class InvalidRequestError extends XRPCError {
|
|
37
40
|
constructor(src: XRPCError);
|
|
38
41
|
}
|
|
@@ -16,6 +16,11 @@ export class NotAuthorizedError extends XRPCError {
|
|
|
16
16
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
export class ProgramRefusedError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
19
24
|
export class InvalidRequestError extends XRPCError {
|
|
20
25
|
constructor(src) {
|
|
21
26
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
@@ -37,6 +42,8 @@ export function toKnownErr(e) {
|
|
|
37
42
|
return new AuthenticationRequiredError(e);
|
|
38
43
|
if (e.error === 'NotAuthorized')
|
|
39
44
|
return new NotAuthorizedError(e);
|
|
45
|
+
if (e.error === 'ProgramRefused')
|
|
46
|
+
return new ProgramRefusedError(e);
|
|
40
47
|
if (e.error === 'InvalidRequest')
|
|
41
48
|
return new InvalidRequestError(e);
|
|
42
49
|
if (e.error === 'HandleTaken')
|
|
@@ -45,6 +45,9 @@ export declare class ChannelBoundError extends XRPCError {
|
|
|
45
45
|
export declare class ChannelReleasedError extends XRPCError {
|
|
46
46
|
constructor(src: XRPCError);
|
|
47
47
|
}
|
|
48
|
+
export declare class MethodFrozenError extends XRPCError {
|
|
49
|
+
constructor(src: XRPCError);
|
|
50
|
+
}
|
|
48
51
|
export declare class RateLimitExceededError extends XRPCError {
|
|
49
52
|
constructor(src: XRPCError);
|
|
50
53
|
}
|
|
@@ -31,6 +31,11 @@ export class ChannelReleasedError extends XRPCError {
|
|
|
31
31
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
export class MethodFrozenError extends XRPCError {
|
|
35
|
+
constructor(src) {
|
|
36
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
34
39
|
export class RateLimitExceededError extends XRPCError {
|
|
35
40
|
constructor(src) {
|
|
36
41
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
@@ -48,6 +53,8 @@ export function toKnownErr(e) {
|
|
|
48
53
|
return new ChannelBoundError(e);
|
|
49
54
|
if (e.error === 'ChannelReleased')
|
|
50
55
|
return new ChannelReleasedError(e);
|
|
56
|
+
if (e.error === 'MethodFrozen')
|
|
57
|
+
return new MethodFrozenError(e);
|
|
51
58
|
if (e.error === 'RateLimitExceeded')
|
|
52
59
|
return new RateLimitExceededError(e);
|
|
53
60
|
}
|
|
@@ -32,6 +32,9 @@ export declare class InvalidRequestError extends XRPCError {
|
|
|
32
32
|
export declare class RateLimitExceededError extends XRPCError {
|
|
33
33
|
constructor(src: XRPCError);
|
|
34
34
|
}
|
|
35
|
+
export declare class MethodFrozenError extends XRPCError {
|
|
36
|
+
constructor(src: XRPCError);
|
|
37
|
+
}
|
|
35
38
|
export declare class SendFailedError extends XRPCError {
|
|
36
39
|
constructor(src: XRPCError);
|
|
37
40
|
}
|
|
@@ -21,6 +21,11 @@ export class RateLimitExceededError extends XRPCError {
|
|
|
21
21
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
export class MethodFrozenError extends XRPCError {
|
|
25
|
+
constructor(src) {
|
|
26
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
24
29
|
export class SendFailedError extends XRPCError {
|
|
25
30
|
constructor(src) {
|
|
26
31
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
@@ -34,6 +39,8 @@ export function toKnownErr(e) {
|
|
|
34
39
|
return new InvalidRequestError(e);
|
|
35
40
|
if (e.error === 'RateLimitExceeded')
|
|
36
41
|
return new RateLimitExceededError(e);
|
|
42
|
+
if (e.error === 'MethodFrozen')
|
|
43
|
+
return new MethodFrozenError(e);
|
|
37
44
|
if (e.error === 'SendFailed')
|
|
38
45
|
return new SendFailedError(e);
|
|
39
46
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
export type QueryParams = {};
|
|
6
|
+
export interface InputSchema {
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CallOptions {
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
headers?: HeadersMap;
|
|
15
|
+
qp?: QueryParams;
|
|
16
|
+
encoding?: 'application/json';
|
|
17
|
+
}
|
|
18
|
+
export interface Response {
|
|
19
|
+
success: boolean;
|
|
20
|
+
headers: HeadersMap;
|
|
21
|
+
data: OutputSchema;
|
|
22
|
+
}
|
|
23
|
+
export declare class AuthenticationRequiredError extends XRPCError {
|
|
24
|
+
constructor(src: XRPCError);
|
|
25
|
+
}
|
|
26
|
+
export declare class NotFoundError extends XRPCError {
|
|
27
|
+
constructor(src: XRPCError);
|
|
28
|
+
}
|
|
29
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import { validate as _validate } from '../../../../../lexicons.js';
|
|
6
|
+
import { is$typed as _is$typed, } from '../../../../../util.js';
|
|
7
|
+
const is$typed = _is$typed, validate = _validate;
|
|
8
|
+
const id = 'pub.techne.draft.identity.cancelPendingChange';
|
|
9
|
+
export class AuthenticationRequiredError extends XRPCError {
|
|
10
|
+
constructor(src) {
|
|
11
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class NotFoundError extends XRPCError {
|
|
15
|
+
constructor(src) {
|
|
16
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function toKnownErr(e) {
|
|
20
|
+
if (e instanceof XRPCError) {
|
|
21
|
+
if (e.error === 'AuthenticationRequired')
|
|
22
|
+
return new AuthenticationRequiredError(e);
|
|
23
|
+
if (e.error === 'NotFound')
|
|
24
|
+
return new NotFoundError(e);
|
|
25
|
+
}
|
|
26
|
+
return e;
|
|
27
|
+
}
|
|
@@ -11,18 +11,36 @@ export interface Channel {
|
|
|
11
11
|
}
|
|
12
12
|
export declare function isChannel<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "channel">;
|
|
13
13
|
export declare function validateChannel<V>(v: V): ValidationResult<Channel & V>;
|
|
14
|
-
/** One sign-in method
|
|
14
|
+
/** One sign-in method of the caller's account, masked. */
|
|
15
15
|
export interface MethodView {
|
|
16
16
|
$type?: 'pub.techne.draft.identity.defs#methodView';
|
|
17
|
-
/** The binding id (the credential's record key). Names the method in unlinkMethod. */
|
|
17
|
+
/** The method's id: the binding id (the credential's record key) of an email or phone, else the platform's id for it. Names the method in unlinkMethod and manageMethods. */
|
|
18
18
|
bid: string;
|
|
19
|
-
type: 'email' | 'phone' | (string & {});
|
|
20
|
-
/** The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`. */
|
|
19
|
+
type: 'email' | 'phone' | 'passkey' | 'nostr' | 'recoveryCodes' | (string & {});
|
|
20
|
+
/** The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`; a passkey's or Nostr key's label; `Recovery codes (n left)`. */
|
|
21
21
|
masked: string;
|
|
22
22
|
boundAt: string;
|
|
23
|
+
/** A recovery method of this account. Private: only the account sees it. */
|
|
24
|
+
recovery?: boolean;
|
|
25
|
+
/** Frozen: it signs in nowhere until then, or until a recovery method lifts it. */
|
|
26
|
+
frozenUntil?: string;
|
|
27
|
+
/** "Programs can sign in with this key" (identity.manageMethods setPrograms). Present on the types that support it (a Nostr key), off by default. Never on for a recovery method. */
|
|
28
|
+
programs?: boolean;
|
|
23
29
|
}
|
|
24
30
|
export declare function isMethodView<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "methodView">;
|
|
25
31
|
export declare function validateMethodView<V>(v: V): ValidationResult<MethodView & V>;
|
|
32
|
+
/** A change that waits for its time (a method's removal or the account's deletion, 7 days; the account's first recovery mark, 24 hours). Any of the account's methods, a frozen one too, can cancel it until then; a wait during which one of the account's methods was frozen (and not lifted early by a recovery method) is dropped when it runs out, not completed. */
|
|
33
|
+
export interface PendingChange {
|
|
34
|
+
$type?: 'pub.techne.draft.identity.defs#pendingChange';
|
|
35
|
+
id: string;
|
|
36
|
+
kind: 'removeMethod' | 'deleteAccount' | 'markRecovery' | (string & {});
|
|
37
|
+
/** The method it removes or marks. */
|
|
38
|
+
method?: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
dueAt: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function isPendingChange<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "pendingChange">;
|
|
43
|
+
export declare function validatePendingChange<V>(v: V): ValidationResult<PendingChange & V>;
|
|
26
44
|
/** An alias link between the caller's account and another. */
|
|
27
45
|
export interface LinkView {
|
|
28
46
|
$type?: 'pub.techne.draft.identity.defs#linkView';
|
|
@@ -16,6 +16,13 @@ export function isMethodView(v) {
|
|
|
16
16
|
export function validateMethodView(v) {
|
|
17
17
|
return validate(v, id, hashMethodView);
|
|
18
18
|
}
|
|
19
|
+
const hashPendingChange = 'pendingChange';
|
|
20
|
+
export function isPendingChange(v) {
|
|
21
|
+
return is$typed(v, id, hashPendingChange);
|
|
22
|
+
}
|
|
23
|
+
export function validatePendingChange(v) {
|
|
24
|
+
return validate(v, id, hashPendingChange);
|
|
25
|
+
}
|
|
19
26
|
const hashLinkView = 'linkView';
|
|
20
27
|
export function isLinkView(v) {
|
|
21
28
|
return is$typed(v, id, hashLinkView);
|
|
@@ -34,6 +34,12 @@ export declare class InvalidCodeError extends XRPCError {
|
|
|
34
34
|
export declare class RateLimitExceededError extends XRPCError {
|
|
35
35
|
constructor(src: XRPCError);
|
|
36
36
|
}
|
|
37
|
+
export declare class MethodFrozenError extends XRPCError {
|
|
38
|
+
constructor(src: XRPCError);
|
|
39
|
+
}
|
|
40
|
+
export declare class ProtectedAccountError extends XRPCError {
|
|
41
|
+
constructor(src: XRPCError);
|
|
42
|
+
}
|
|
37
43
|
export declare class UpstreamFailureError extends XRPCError {
|
|
38
44
|
constructor(src: XRPCError);
|
|
39
45
|
}
|
|
@@ -21,6 +21,16 @@ export class RateLimitExceededError extends XRPCError {
|
|
|
21
21
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
export class MethodFrozenError extends XRPCError {
|
|
25
|
+
constructor(src) {
|
|
26
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class ProtectedAccountError extends XRPCError {
|
|
30
|
+
constructor(src) {
|
|
31
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
24
34
|
export class UpstreamFailureError extends XRPCError {
|
|
25
35
|
constructor(src) {
|
|
26
36
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
@@ -34,6 +44,10 @@ export function toKnownErr(e) {
|
|
|
34
44
|
return new InvalidCodeError(e);
|
|
35
45
|
if (e.error === 'RateLimitExceeded')
|
|
36
46
|
return new RateLimitExceededError(e);
|
|
47
|
+
if (e.error === 'MethodFrozen')
|
|
48
|
+
return new MethodFrozenError(e);
|
|
49
|
+
if (e.error === 'ProtectedAccount')
|
|
50
|
+
return new ProtectedAccountError(e);
|
|
37
51
|
if (e.error === 'UpstreamFailure')
|
|
38
52
|
return new UpstreamFailureError(e);
|
|
39
53
|
}
|
|
@@ -31,6 +31,9 @@ export declare class AuthenticationRequiredError extends XRPCError {
|
|
|
31
31
|
export declare class InvalidTokenError extends XRPCError {
|
|
32
32
|
constructor(src: XRPCError);
|
|
33
33
|
}
|
|
34
|
+
export declare class ProtectedAccountError extends XRPCError {
|
|
35
|
+
constructor(src: XRPCError);
|
|
36
|
+
}
|
|
34
37
|
export declare class NotEmptyError extends XRPCError {
|
|
35
38
|
constructor(src: XRPCError);
|
|
36
39
|
}
|
|
@@ -16,6 +16,11 @@ export class InvalidTokenError extends XRPCError {
|
|
|
16
16
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
export class ProtectedAccountError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
19
24
|
export class NotEmptyError extends XRPCError {
|
|
20
25
|
constructor(src) {
|
|
21
26
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
@@ -27,6 +32,8 @@ export function toKnownErr(e) {
|
|
|
27
32
|
return new AuthenticationRequiredError(e);
|
|
28
33
|
if (e.error === 'InvalidToken')
|
|
29
34
|
return new InvalidTokenError(e);
|
|
35
|
+
if (e.error === 'ProtectedAccount')
|
|
36
|
+
return new ProtectedAccountError(e);
|
|
30
37
|
if (e.error === 'NotEmpty')
|
|
31
38
|
return new NotEmptyError(e);
|
|
32
39
|
}
|
|
@@ -45,7 +45,7 @@ export interface HeldWrite {
|
|
|
45
45
|
rkey?: string;
|
|
46
46
|
/** The space the record is for, as permissioned.putRecord's `space`. Required: a public record is not held. */
|
|
47
47
|
space: string;
|
|
48
|
-
/** The record, with the "$subject" (and optionally "$now") slots as string values. */
|
|
48
|
+
/** The record, with the "$subject" (and optionally "$now" and "$name") slots as string values. */
|
|
49
49
|
record: {
|
|
50
50
|
[_ in string]: unknown;
|
|
51
51
|
};
|
|
@@ -29,6 +29,9 @@ export declare class AuthenticationRequiredError extends XRPCError {
|
|
|
29
29
|
export declare class InvalidTokenError extends XRPCError {
|
|
30
30
|
constructor(src: XRPCError);
|
|
31
31
|
}
|
|
32
|
+
export declare class ProtectedAccountError extends XRPCError {
|
|
33
|
+
constructor(src: XRPCError);
|
|
34
|
+
}
|
|
32
35
|
export declare class InvalidRequestError extends XRPCError {
|
|
33
36
|
constructor(src: XRPCError);
|
|
34
37
|
}
|
|
@@ -16,6 +16,11 @@ export class InvalidTokenError extends XRPCError {
|
|
|
16
16
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
export class ProtectedAccountError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
19
24
|
export class InvalidRequestError extends XRPCError {
|
|
20
25
|
constructor(src) {
|
|
21
26
|
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
@@ -27,6 +32,8 @@ export function toKnownErr(e) {
|
|
|
27
32
|
return new AuthenticationRequiredError(e);
|
|
28
33
|
if (e.error === 'InvalidToken')
|
|
29
34
|
return new InvalidTokenError(e);
|
|
35
|
+
if (e.error === 'ProtectedAccount')
|
|
36
|
+
return new ProtectedAccountError(e);
|
|
30
37
|
if (e.error === 'InvalidRequest')
|
|
31
38
|
return new InvalidRequestError(e);
|
|
32
39
|
}
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
5
|
import type * as PubTechneDraftIdentityDefs from './defs.js';
|
|
6
|
-
export type QueryParams = {
|
|
6
|
+
export type QueryParams = {
|
|
7
|
+
/** Also list passkeys, Nostr keys and the recovery-code set. */
|
|
8
|
+
allTypes?: boolean;
|
|
9
|
+
};
|
|
7
10
|
export type InputSchema = undefined;
|
|
8
11
|
export interface OutputSchema {
|
|
9
12
|
methods: PubTechneDraftIdentityDefs.MethodView[];
|
|
10
13
|
links: PubTechneDraftIdentityDefs.LinkView[];
|
|
14
|
+
/** The account's pending changes, soonest first (the account page shows them at the top, with Cancel). */
|
|
15
|
+
pending?: PubTechneDraftIdentityDefs.PendingChange[];
|
|
11
16
|
}
|
|
12
17
|
export interface CallOptions {
|
|
13
18
|
signal?: AbortSignal;
|