techne-sdk 0.3.8 → 0.5.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 +97 -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 +1332 -205
- package/dist/generated/index.d.ts +9 -0
- package/dist/generated/index.js +27 -0
- package/dist/generated/lexicons.d.ts +1797 -227
- package/dist/generated/lexicons.js +1147 -224
- package/dist/generated/nsid.d.ts +16 -0
- package/dist/generated/nsid.js +16 -0
- package/dist/generated/nsid.json +16 -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 +5 -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 +41 -7
- package/dist/generated/types/pub/techne/draft/identity/defs.js +14 -0
- package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +9 -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 +7 -1
- package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +267 -0
- package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +265 -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/query/getRecords.d.ts +11 -0
- package/dist/generated/types/pub/techne/draft/query/getRecords.js +7 -0
- 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/query/compose.d.ts +1 -1
- package/dist/query/compose.js +1 -1
- package/dist/query/index.d.ts +7 -0
- package/dist/query/index.js +28 -1
- package/dist/versions/react.js +19 -6
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +8361 -8359
- package/package.json +2 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
6
|
+
import type * as PubTechneDraftIdentityDefs from './defs.js';
|
|
7
|
+
import type * as PubTechneDraftIdentityFinishAddMethod from './finishAddMethod.js';
|
|
8
|
+
export type QueryParams = {};
|
|
9
|
+
export interface InputSchema {
|
|
10
|
+
v: 1;
|
|
11
|
+
/** The op. `link` is retired: it answers 400 InvalidRequest; `moveMethod` links two accounts now. */
|
|
12
|
+
op: 'list' | 'signInMethods' | 'sendTo' | 'remove' | 'cancel' | 'freeze' | 'unfreeze' | 'mark' | 'unmark' | 'signOut' | 'delete' | 'addExternal' | 'newRecoveryCodes' | 'redeemCode' | 'setPrograms' | 'importBackupEmails' | 'findKey' | 'notices' | 'noticesSent' | 'dueDeletes' | 'dueDeletesDone' | 'addChannel' | 'fold' | 'link' | 'moveMethod' | 'unlink' | 'operator' | (string & {});
|
|
13
|
+
/** The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`. */
|
|
14
|
+
did?: string;
|
|
15
|
+
stepUp?: StepUp;
|
|
16
|
+
/** The method acted on (its `id` in `list` or `signInMethods`). moveMethod: the method of `from` that moves onto `did`. unlink: the method of `did` handed to `other` when `other` would have none left. */
|
|
17
|
+
method?: string;
|
|
18
|
+
/** The pending change `cancel` cancels. */
|
|
19
|
+
pending?: string;
|
|
20
|
+
/** With `freeze`: also sign out everywhere. */
|
|
21
|
+
signOut?: boolean;
|
|
22
|
+
external?: External;
|
|
23
|
+
/** A recovery code, for `redeemCode`. */
|
|
24
|
+
code?: string;
|
|
25
|
+
/** Unused, kept for older clients: notice ids for `noticesSent`, which confirms none. */
|
|
26
|
+
ids?: number[];
|
|
27
|
+
/** Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest. */
|
|
28
|
+
emails?: string[];
|
|
29
|
+
/** importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it. */
|
|
30
|
+
backupEmails?: BackupEmail[];
|
|
31
|
+
/** dueDeletesDone: the accounts whose PDS account was deleted. */
|
|
32
|
+
dids?: string[];
|
|
33
|
+
channel?: PubTechneDraftIdentityDefs.Channel;
|
|
34
|
+
/** fold: the offer's token from addChannel. (link, retired, took one too.) */
|
|
35
|
+
token?: string;
|
|
36
|
+
/** moveMethod: the account the method leaves. */
|
|
37
|
+
from?: string;
|
|
38
|
+
fromStepUp?: StepUp;
|
|
39
|
+
/** unlink: the account that leaves `did`'s person. */
|
|
40
|
+
other?: string;
|
|
41
|
+
/** Retired, not read: it was the retired `link` op's primary account. Linked accounts have no primary. */
|
|
42
|
+
primary?: string;
|
|
43
|
+
/** setPrograms: on or off. */
|
|
44
|
+
on?: boolean;
|
|
45
|
+
/** A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused). */
|
|
46
|
+
program?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface OutputSchema {
|
|
49
|
+
v: 1;
|
|
50
|
+
/** `done`: it happened now. `pending`: it waits (`pending`). `deleted` / `deleting` (`delete` done now): the account is gone / its local half is gone and a sweep finishes the rest (deleteAccount's `deleted` / `pending`; a deletion that could not start answers 503 Unavailable, try again). `bound`: addExternal's key is on another account. `invalid`: redeemCode's code is wrong, used, or the set is not a recovery method or is frozen. `hasRecovery`: importBackupEmails found a recovery method on the account; nothing changed. `indexOff`: importBackupEmails can't mark anything while the identity index is off; nothing changed. `alreadyImported`: importBackupEmails ran for this account before; nothing changed. `added` / `alreadyYours` / `boundElsewhere` / `unavailable`: addChannel, as identity.finishAddMethod. `folded`: fold done. `linked`: retired (the retired `link` op's answer). moveMethod answers `pending` only, with `pending` (the change, a defs#pendingChange) and `due`. `none`: findKey's key is no method of an account the calling PDS hosts. */
|
|
51
|
+
status?: 'done' | 'pending' | 'deleted' | 'deleting' | 'bound' | 'invalid' | 'hasRecovery' | 'indexOff' | 'alreadyImported' | 'added' | 'alreadyYours' | 'boundElsewhere' | 'unavailable' | 'folded' | 'linked' | 'none' | (string & {});
|
|
52
|
+
pending?: PubTechneDraftIdentityDefs.PendingChange;
|
|
53
|
+
/** moveMethod `pending`: when the move is due (now for one a recovery method of `from` proved, else 7 days on). The platform completes it then or after a failed try, unless it is cancelled or dropped. */
|
|
54
|
+
due?: string;
|
|
55
|
+
/** addExternal's new method id, the recovery-code set redeemCode used, or addChannel's method id when `added` or `alreadyYours` (empty while the identity index is off); findKey's method id of the key. addChannel `boundElsewhere` when both accounts hold something: the other account's method id, for `moveMethod` (identity.finishAddMethod's session answer leaves it out). */
|
|
56
|
+
method?: string;
|
|
57
|
+
/** newRecoveryCodes: the codes, shown once. */
|
|
58
|
+
codes?: string[];
|
|
59
|
+
/** list: the account's methods (`value` on emails and phones; see defs#methodView). */
|
|
60
|
+
methods?: PubTechneDraftIdentityDefs.MethodView[];
|
|
61
|
+
hasRecovery?: boolean;
|
|
62
|
+
/** Unused, kept for older clients: always empty. The platform emails every notice itself. */
|
|
63
|
+
notices?: Notice[];
|
|
64
|
+
/** dueDeletesDone: how many were confirmed. noticesSent (unused, kept for older clients): always 0. */
|
|
65
|
+
count?: number;
|
|
66
|
+
/** signInMethods: the account's methods that can sign in now (not frozen), oldest first. */
|
|
67
|
+
signInMethods?: SignInMethod[];
|
|
68
|
+
to?: NoticeTo;
|
|
69
|
+
/** importBackupEmails: each address sent, with what happened to it. */
|
|
70
|
+
imported?: ImportedEmail[];
|
|
71
|
+
/** dueDeletes: accounts to delete on the PDS, oldest first. */
|
|
72
|
+
dueDeletes?: DueDelete[];
|
|
73
|
+
offer?: PubTechneDraftIdentityFinishAddMethod.Offer;
|
|
74
|
+
/** fold: the kept account. findKey: the account the key signs in to. */
|
|
75
|
+
did?: string;
|
|
76
|
+
/** addChannel `boundElsewhere` when both accounts hold something: the account the channel signs in to (for `moveMethod`'s `from`). */
|
|
77
|
+
other?: string;
|
|
78
|
+
/** addChannel `boundElsewhere` (either form): the other accounts of the person of the account the channel signs in to, now (`did`, `handle` when known), that account itself left out; empty when it is alone. */
|
|
79
|
+
otherPerson?: PubTechneDraftIdentityDefs.PersonMember[];
|
|
80
|
+
/** fold: the account folded in and deleted. */
|
|
81
|
+
emptied?: string;
|
|
82
|
+
/** list: the other accounts of `did`'s person (empty when it is alone). moveMethod no longer answers `done`, which carried the person's accounts here. */
|
|
83
|
+
person?: PubTechneDraftIdentityDefs.PersonMember[];
|
|
84
|
+
link?: PubTechneDraftIdentityDefs.LinkView;
|
|
85
|
+
/** findKey: the key's method is frozen now and can't sign in. */
|
|
86
|
+
frozen?: boolean;
|
|
87
|
+
/** findKey: "Programs can sign in with this key" is on. */
|
|
88
|
+
programs?: boolean;
|
|
89
|
+
/** operator: whether `did` is one of the platform's operators. */
|
|
90
|
+
operator?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface CallOptions {
|
|
93
|
+
signal?: AbortSignal;
|
|
94
|
+
headers?: HeadersMap;
|
|
95
|
+
qp?: QueryParams;
|
|
96
|
+
encoding?: 'application/json';
|
|
97
|
+
}
|
|
98
|
+
export interface Response {
|
|
99
|
+
success: boolean;
|
|
100
|
+
headers: HeadersMap;
|
|
101
|
+
data: OutputSchema;
|
|
102
|
+
}
|
|
103
|
+
export declare class BadSignatureError extends XRPCError {
|
|
104
|
+
constructor(src: XRPCError);
|
|
105
|
+
}
|
|
106
|
+
export declare class InvalidRequestError extends XRPCError {
|
|
107
|
+
constructor(src: XRPCError);
|
|
108
|
+
}
|
|
109
|
+
export declare class UnknownAccountError extends XRPCError {
|
|
110
|
+
constructor(src: XRPCError);
|
|
111
|
+
}
|
|
112
|
+
export declare class RateLimitExceededError extends XRPCError {
|
|
113
|
+
constructor(src: XRPCError);
|
|
114
|
+
}
|
|
115
|
+
export declare class UnavailableError extends XRPCError {
|
|
116
|
+
constructor(src: XRPCError);
|
|
117
|
+
}
|
|
118
|
+
export declare class NotFoundError extends XRPCError {
|
|
119
|
+
constructor(src: XRPCError);
|
|
120
|
+
}
|
|
121
|
+
export declare class NotYourMethodError extends XRPCError {
|
|
122
|
+
constructor(src: XRPCError);
|
|
123
|
+
}
|
|
124
|
+
export declare class LastMethodError extends XRPCError {
|
|
125
|
+
constructor(src: XRPCError);
|
|
126
|
+
}
|
|
127
|
+
export declare class RecoveryProtectedError extends XRPCError {
|
|
128
|
+
constructor(src: XRPCError);
|
|
129
|
+
}
|
|
130
|
+
export declare class NeedsRecoveryMethodError extends XRPCError {
|
|
131
|
+
constructor(src: XRPCError);
|
|
132
|
+
}
|
|
133
|
+
export declare class StepUpRequiredError extends XRPCError {
|
|
134
|
+
constructor(src: XRPCError);
|
|
135
|
+
}
|
|
136
|
+
export declare class SameMethodError extends XRPCError {
|
|
137
|
+
constructor(src: XRPCError);
|
|
138
|
+
}
|
|
139
|
+
export declare class MethodFrozenError extends XRPCError {
|
|
140
|
+
constructor(src: XRPCError);
|
|
141
|
+
}
|
|
142
|
+
export declare class InvalidTokenError extends XRPCError {
|
|
143
|
+
constructor(src: XRPCError);
|
|
144
|
+
}
|
|
145
|
+
export declare class ProtectedAccountError extends XRPCError {
|
|
146
|
+
constructor(src: XRPCError);
|
|
147
|
+
}
|
|
148
|
+
export declare class NotEmptyError extends XRPCError {
|
|
149
|
+
constructor(src: XRPCError);
|
|
150
|
+
}
|
|
151
|
+
export declare class ProgramRefusedError extends XRPCError {
|
|
152
|
+
constructor(src: XRPCError);
|
|
153
|
+
}
|
|
154
|
+
export declare class ProgramsOnError extends XRPCError {
|
|
155
|
+
constructor(src: XRPCError);
|
|
156
|
+
}
|
|
157
|
+
export declare class IsRecoveryError extends XRPCError {
|
|
158
|
+
constructor(src: XRPCError);
|
|
159
|
+
}
|
|
160
|
+
export declare class FromStepUpRequiredError extends XRPCError {
|
|
161
|
+
constructor(src: XRPCError);
|
|
162
|
+
}
|
|
163
|
+
export declare class FrozenError extends XRPCError {
|
|
164
|
+
constructor(src: XRPCError);
|
|
165
|
+
}
|
|
166
|
+
export declare class PendingChangeError extends XRPCError {
|
|
167
|
+
constructor(src: XRPCError);
|
|
168
|
+
}
|
|
169
|
+
export declare class TooManyError extends XRPCError {
|
|
170
|
+
constructor(src: XRPCError);
|
|
171
|
+
}
|
|
172
|
+
export declare class SameError extends XRPCError {
|
|
173
|
+
constructor(src: XRPCError);
|
|
174
|
+
}
|
|
175
|
+
export declare class NoKeyError extends XRPCError {
|
|
176
|
+
constructor(src: XRPCError);
|
|
177
|
+
}
|
|
178
|
+
export declare class NeedsMethodError extends XRPCError {
|
|
179
|
+
constructor(src: XRPCError);
|
|
180
|
+
}
|
|
181
|
+
export declare class NotLinkedError extends XRPCError {
|
|
182
|
+
constructor(src: XRPCError);
|
|
183
|
+
}
|
|
184
|
+
export declare function toKnownErr(e: any): any;
|
|
185
|
+
/** What the PDS's step-up proved. */
|
|
186
|
+
export interface StepUp {
|
|
187
|
+
$type?: 'pub.techne.draft.identity.manageMethods#stepUp';
|
|
188
|
+
method: ProvedMethod;
|
|
189
|
+
provedAt: string;
|
|
190
|
+
}
|
|
191
|
+
export declare function isStepUp<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "stepUp">;
|
|
192
|
+
export declare function validateStepUp<V>(v: V): ValidationResult<StepUp & V>;
|
|
193
|
+
export interface External {
|
|
194
|
+
$type?: 'pub.techne.draft.identity.manageMethods#external';
|
|
195
|
+
type: 'passkey' | 'nostr' | (string & {});
|
|
196
|
+
/** The passkey credential id, or the Nostr key (hex). */
|
|
197
|
+
ref: string;
|
|
198
|
+
label?: string;
|
|
199
|
+
}
|
|
200
|
+
export declare function isExternal<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "external">;
|
|
201
|
+
export declare function validateExternal<V>(v: V): ValidationResult<External & V>;
|
|
202
|
+
/** Unused, kept for older clients: `notices` always answers an empty list. The platform emails every notice itself, to the account's email methods only. */
|
|
203
|
+
export interface Notice {
|
|
204
|
+
$type?: 'pub.techne.draft.identity.manageMethods#notice';
|
|
205
|
+
id: number;
|
|
206
|
+
did: string;
|
|
207
|
+
/** What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`, `moveMethod`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`), `linked` / `unlinked`: a link (moveMethod completed) or an unlink changed the account's person, `moveDropped` / `moveTimedOut` / `moveCancelled`: a move was dropped because a key can't be used or the identity PDS refused it for good, because it still could not be written 24 hours past due, or because something changed on one of its accounts, or `akaLeft` / `emailLeft`: an `alsoKnownAs` entry or an identity-PDS account email the platform owed removing was given up and is left. */
|
|
208
|
+
event: 'removeMethod' | 'deleteAccount' | 'markRecovery' | 'freeze' | 'waitDropped' | 'programsOn' | 'moveMethod' | 'linked' | 'unlinked' | 'moveDropped' | 'moveTimedOut' | 'moveCancelled' | 'akaLeft' | 'emailLeft' | (string & {});
|
|
209
|
+
to: NoticeTo;
|
|
210
|
+
pending?: PubTechneDraftIdentityDefs.PendingChange;
|
|
211
|
+
createdAt: string;
|
|
212
|
+
}
|
|
213
|
+
export declare function isNotice<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "notice">;
|
|
214
|
+
export declare function validateNotice<V>(v: V): ValidationResult<Notice & V>;
|
|
215
|
+
export interface ProvedMethod {
|
|
216
|
+
$type?: 'pub.techne.draft.identity.manageMethods#provedMethod';
|
|
217
|
+
type: 'email' | 'phone' | 'passkey' | 'nostr' | 'recoveryCodes' | (string & {});
|
|
218
|
+
/** The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes. */
|
|
219
|
+
value?: string;
|
|
220
|
+
}
|
|
221
|
+
export declare function isProvedMethod<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "provedMethod">;
|
|
222
|
+
export declare function validateProvedMethod<V>(v: V): ValidationResult<ProvedMethod & V>;
|
|
223
|
+
/** An email or phone number in full: `sendTo`'s `to`. Also the shape of #notice's `to`, which is unused and kept for older clients (notices go to email methods only). */
|
|
224
|
+
export interface NoticeTo {
|
|
225
|
+
$type?: 'pub.techne.draft.identity.manageMethods#noticeTo';
|
|
226
|
+
type: 'email' | 'phone' | 'nostr' | (string & {});
|
|
227
|
+
value: string;
|
|
228
|
+
}
|
|
229
|
+
export declare function isNoticeTo<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "noticeTo">;
|
|
230
|
+
export declare function validateNoticeTo<V>(v: V): ValidationResult<NoticeTo & V>;
|
|
231
|
+
/** One way to sign in, as a page may show it before anyone has signed in: an email as `***a@***e.***m` (the last character of each dot-separated part), a phone as `•••• 97` (its last two digits), a passkey or Nostr key by its label. */
|
|
232
|
+
export interface SignInMethod {
|
|
233
|
+
$type?: 'pub.techne.draft.identity.manageMethods#signInMethod';
|
|
234
|
+
/** The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge). */
|
|
235
|
+
id: string;
|
|
236
|
+
type: 'email' | 'phone' | 'passkey' | 'nostr' | (string & {});
|
|
237
|
+
display: string;
|
|
238
|
+
}
|
|
239
|
+
export declare function isSignInMethod<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "signInMethod">;
|
|
240
|
+
export declare function validateSignInMethod<V>(v: V): ValidationResult<SignInMethod & V>;
|
|
241
|
+
/** One address importBackupEmails was sent, with what happened to it. */
|
|
242
|
+
export interface ImportedEmail {
|
|
243
|
+
$type?: 'pub.techne.draft.identity.manageMethods#importedEmail';
|
|
244
|
+
email: string;
|
|
245
|
+
/** `marked`: an email method of the account now, marked for recovery. `boundElsewhere`: on another account, left there. `released`: the account removed it; only adding it again binds it back. `invalid`: not an email address. `afterCutoff`: verified at or after 2026-11-13T00:00:00Z, not imported (add it and mark it under the rules). */
|
|
246
|
+
status: 'marked' | 'boundElsewhere' | 'released' | 'invalid' | 'afterCutoff' | (string & {});
|
|
247
|
+
}
|
|
248
|
+
export declare function isImportedEmail<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "importedEmail">;
|
|
249
|
+
export declare function validateImportedEmail<V>(v: V): ValidationResult<ImportedEmail & V>;
|
|
250
|
+
/** One backup email importBackupEmails moves, with when the PDS verified it. */
|
|
251
|
+
export interface BackupEmail {
|
|
252
|
+
$type?: 'pub.techne.draft.identity.manageMethods#backupEmail';
|
|
253
|
+
email: string;
|
|
254
|
+
/** When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported. */
|
|
255
|
+
verifiedAt: string;
|
|
256
|
+
}
|
|
257
|
+
export declare function isBackupEmail<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "backupEmail">;
|
|
258
|
+
export declare function validateBackupEmail<V>(v: V): ValidationResult<BackupEmail & V>;
|
|
259
|
+
/** An account whose scheduled deletion ran on the platform: the PDS deletes its PDS account, then confirms (`dueDeletesDone`). An account already gone from the PDS counts as deleted. */
|
|
260
|
+
export interface DueDelete {
|
|
261
|
+
$type?: 'pub.techne.draft.identity.manageMethods#dueDelete';
|
|
262
|
+
did: string;
|
|
263
|
+
/** When the platform deleted its side. */
|
|
264
|
+
deletedAt: string;
|
|
265
|
+
}
|
|
266
|
+
export declare function isDueDelete<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.manageMethods", "dueDelete">;
|
|
267
|
+
export declare function validateDueDelete<V>(v: V): ValidationResult<DueDelete & V>;
|
|
@@ -0,0 +1,265 @@
|
|
|
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.manageMethods';
|
|
9
|
+
export class BadSignatureError extends XRPCError {
|
|
10
|
+
constructor(src) {
|
|
11
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class InvalidRequestError extends XRPCError {
|
|
15
|
+
constructor(src) {
|
|
16
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class UnknownAccountError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class RateLimitExceededError extends XRPCError {
|
|
25
|
+
constructor(src) {
|
|
26
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class UnavailableError extends XRPCError {
|
|
30
|
+
constructor(src) {
|
|
31
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class NotFoundError extends XRPCError {
|
|
35
|
+
constructor(src) {
|
|
36
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class NotYourMethodError extends XRPCError {
|
|
40
|
+
constructor(src) {
|
|
41
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export class LastMethodError extends XRPCError {
|
|
45
|
+
constructor(src) {
|
|
46
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class RecoveryProtectedError extends XRPCError {
|
|
50
|
+
constructor(src) {
|
|
51
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class NeedsRecoveryMethodError extends XRPCError {
|
|
55
|
+
constructor(src) {
|
|
56
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export class StepUpRequiredError extends XRPCError {
|
|
60
|
+
constructor(src) {
|
|
61
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class SameMethodError extends XRPCError {
|
|
65
|
+
constructor(src) {
|
|
66
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export class MethodFrozenError extends XRPCError {
|
|
70
|
+
constructor(src) {
|
|
71
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class InvalidTokenError extends XRPCError {
|
|
75
|
+
constructor(src) {
|
|
76
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export class ProtectedAccountError extends XRPCError {
|
|
80
|
+
constructor(src) {
|
|
81
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export class NotEmptyError extends XRPCError {
|
|
85
|
+
constructor(src) {
|
|
86
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export class ProgramRefusedError extends XRPCError {
|
|
90
|
+
constructor(src) {
|
|
91
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export class ProgramsOnError extends XRPCError {
|
|
95
|
+
constructor(src) {
|
|
96
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export class IsRecoveryError extends XRPCError {
|
|
100
|
+
constructor(src) {
|
|
101
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export class FromStepUpRequiredError extends XRPCError {
|
|
105
|
+
constructor(src) {
|
|
106
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export class FrozenError extends XRPCError {
|
|
110
|
+
constructor(src) {
|
|
111
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export class PendingChangeError extends XRPCError {
|
|
115
|
+
constructor(src) {
|
|
116
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export class TooManyError extends XRPCError {
|
|
120
|
+
constructor(src) {
|
|
121
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export class SameError extends XRPCError {
|
|
125
|
+
constructor(src) {
|
|
126
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
export class NoKeyError extends XRPCError {
|
|
130
|
+
constructor(src) {
|
|
131
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
export class NeedsMethodError extends XRPCError {
|
|
135
|
+
constructor(src) {
|
|
136
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export class NotLinkedError extends XRPCError {
|
|
140
|
+
constructor(src) {
|
|
141
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export function toKnownErr(e) {
|
|
145
|
+
if (e instanceof XRPCError) {
|
|
146
|
+
if (e.error === 'BadSignature')
|
|
147
|
+
return new BadSignatureError(e);
|
|
148
|
+
if (e.error === 'InvalidRequest')
|
|
149
|
+
return new InvalidRequestError(e);
|
|
150
|
+
if (e.error === 'UnknownAccount')
|
|
151
|
+
return new UnknownAccountError(e);
|
|
152
|
+
if (e.error === 'RateLimitExceeded')
|
|
153
|
+
return new RateLimitExceededError(e);
|
|
154
|
+
if (e.error === 'Unavailable')
|
|
155
|
+
return new UnavailableError(e);
|
|
156
|
+
if (e.error === 'NotFound')
|
|
157
|
+
return new NotFoundError(e);
|
|
158
|
+
if (e.error === 'NotYourMethod')
|
|
159
|
+
return new NotYourMethodError(e);
|
|
160
|
+
if (e.error === 'LastMethod')
|
|
161
|
+
return new LastMethodError(e);
|
|
162
|
+
if (e.error === 'RecoveryProtected')
|
|
163
|
+
return new RecoveryProtectedError(e);
|
|
164
|
+
if (e.error === 'NeedsRecoveryMethod')
|
|
165
|
+
return new NeedsRecoveryMethodError(e);
|
|
166
|
+
if (e.error === 'StepUpRequired')
|
|
167
|
+
return new StepUpRequiredError(e);
|
|
168
|
+
if (e.error === 'SameMethod')
|
|
169
|
+
return new SameMethodError(e);
|
|
170
|
+
if (e.error === 'MethodFrozen')
|
|
171
|
+
return new MethodFrozenError(e);
|
|
172
|
+
if (e.error === 'InvalidToken')
|
|
173
|
+
return new InvalidTokenError(e);
|
|
174
|
+
if (e.error === 'ProtectedAccount')
|
|
175
|
+
return new ProtectedAccountError(e);
|
|
176
|
+
if (e.error === 'NotEmpty')
|
|
177
|
+
return new NotEmptyError(e);
|
|
178
|
+
if (e.error === 'ProgramRefused')
|
|
179
|
+
return new ProgramRefusedError(e);
|
|
180
|
+
if (e.error === 'ProgramsOn')
|
|
181
|
+
return new ProgramsOnError(e);
|
|
182
|
+
if (e.error === 'IsRecovery')
|
|
183
|
+
return new IsRecoveryError(e);
|
|
184
|
+
if (e.error === 'FromStepUpRequired')
|
|
185
|
+
return new FromStepUpRequiredError(e);
|
|
186
|
+
if (e.error === 'Frozen')
|
|
187
|
+
return new FrozenError(e);
|
|
188
|
+
if (e.error === 'PendingChange')
|
|
189
|
+
return new PendingChangeError(e);
|
|
190
|
+
if (e.error === 'TooMany')
|
|
191
|
+
return new TooManyError(e);
|
|
192
|
+
if (e.error === 'Same')
|
|
193
|
+
return new SameError(e);
|
|
194
|
+
if (e.error === 'NoKey')
|
|
195
|
+
return new NoKeyError(e);
|
|
196
|
+
if (e.error === 'NeedsMethod')
|
|
197
|
+
return new NeedsMethodError(e);
|
|
198
|
+
if (e.error === 'NotLinked')
|
|
199
|
+
return new NotLinkedError(e);
|
|
200
|
+
}
|
|
201
|
+
return e;
|
|
202
|
+
}
|
|
203
|
+
const hashStepUp = 'stepUp';
|
|
204
|
+
export function isStepUp(v) {
|
|
205
|
+
return is$typed(v, id, hashStepUp);
|
|
206
|
+
}
|
|
207
|
+
export function validateStepUp(v) {
|
|
208
|
+
return validate(v, id, hashStepUp);
|
|
209
|
+
}
|
|
210
|
+
const hashExternal = 'external';
|
|
211
|
+
export function isExternal(v) {
|
|
212
|
+
return is$typed(v, id, hashExternal);
|
|
213
|
+
}
|
|
214
|
+
export function validateExternal(v) {
|
|
215
|
+
return validate(v, id, hashExternal);
|
|
216
|
+
}
|
|
217
|
+
const hashNotice = 'notice';
|
|
218
|
+
export function isNotice(v) {
|
|
219
|
+
return is$typed(v, id, hashNotice);
|
|
220
|
+
}
|
|
221
|
+
export function validateNotice(v) {
|
|
222
|
+
return validate(v, id, hashNotice);
|
|
223
|
+
}
|
|
224
|
+
const hashProvedMethod = 'provedMethod';
|
|
225
|
+
export function isProvedMethod(v) {
|
|
226
|
+
return is$typed(v, id, hashProvedMethod);
|
|
227
|
+
}
|
|
228
|
+
export function validateProvedMethod(v) {
|
|
229
|
+
return validate(v, id, hashProvedMethod);
|
|
230
|
+
}
|
|
231
|
+
const hashNoticeTo = 'noticeTo';
|
|
232
|
+
export function isNoticeTo(v) {
|
|
233
|
+
return is$typed(v, id, hashNoticeTo);
|
|
234
|
+
}
|
|
235
|
+
export function validateNoticeTo(v) {
|
|
236
|
+
return validate(v, id, hashNoticeTo);
|
|
237
|
+
}
|
|
238
|
+
const hashSignInMethod = 'signInMethod';
|
|
239
|
+
export function isSignInMethod(v) {
|
|
240
|
+
return is$typed(v, id, hashSignInMethod);
|
|
241
|
+
}
|
|
242
|
+
export function validateSignInMethod(v) {
|
|
243
|
+
return validate(v, id, hashSignInMethod);
|
|
244
|
+
}
|
|
245
|
+
const hashImportedEmail = 'importedEmail';
|
|
246
|
+
export function isImportedEmail(v) {
|
|
247
|
+
return is$typed(v, id, hashImportedEmail);
|
|
248
|
+
}
|
|
249
|
+
export function validateImportedEmail(v) {
|
|
250
|
+
return validate(v, id, hashImportedEmail);
|
|
251
|
+
}
|
|
252
|
+
const hashBackupEmail = 'backupEmail';
|
|
253
|
+
export function isBackupEmail(v) {
|
|
254
|
+
return is$typed(v, id, hashBackupEmail);
|
|
255
|
+
}
|
|
256
|
+
export function validateBackupEmail(v) {
|
|
257
|
+
return validate(v, id, hashBackupEmail);
|
|
258
|
+
}
|
|
259
|
+
const hashDueDelete = 'dueDelete';
|
|
260
|
+
export function isDueDelete(v) {
|
|
261
|
+
return is$typed(v, id, hashDueDelete);
|
|
262
|
+
}
|
|
263
|
+
export function validateDueDelete(v) {
|
|
264
|
+
return validate(v, id, hashDueDelete);
|
|
265
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
export type QueryParams = {};
|
|
6
|
+
export type InputSchema = undefined;
|
|
7
|
+
export interface OutputSchema {
|
|
8
|
+
/** Open it once, before expiresAt. */
|
|
9
|
+
url: string;
|
|
10
|
+
expiresAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CallOptions {
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
headers?: HeadersMap;
|
|
15
|
+
qp?: QueryParams;
|
|
16
|
+
}
|
|
17
|
+
export interface Response {
|
|
18
|
+
success: boolean;
|
|
19
|
+
headers: HeadersMap;
|
|
20
|
+
data: OutputSchema;
|
|
21
|
+
}
|
|
22
|
+
export declare class AuthenticationRequiredError extends XRPCError {
|
|
23
|
+
constructor(src: XRPCError);
|
|
24
|
+
}
|
|
25
|
+
export declare class NotAuthorizedError extends XRPCError {
|
|
26
|
+
constructor(src: XRPCError);
|
|
27
|
+
}
|
|
28
|
+
export declare class ProgramRefusedError extends XRPCError {
|
|
29
|
+
constructor(src: XRPCError);
|
|
30
|
+
}
|
|
31
|
+
export declare class NotFoundError extends XRPCError {
|
|
32
|
+
constructor(src: XRPCError);
|
|
33
|
+
}
|
|
34
|
+
export declare class RateLimitExceededError extends XRPCError {
|
|
35
|
+
constructor(src: XRPCError);
|
|
36
|
+
}
|
|
37
|
+
export declare class UnavailableError extends XRPCError {
|
|
38
|
+
constructor(src: XRPCError);
|
|
39
|
+
}
|
|
40
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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.openAccountPage';
|
|
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 NotAuthorizedError extends XRPCError {
|
|
15
|
+
constructor(src) {
|
|
16
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class ProgramRefusedError extends XRPCError {
|
|
20
|
+
constructor(src) {
|
|
21
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class NotFoundError extends XRPCError {
|
|
25
|
+
constructor(src) {
|
|
26
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class RateLimitExceededError extends XRPCError {
|
|
30
|
+
constructor(src) {
|
|
31
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class UnavailableError extends XRPCError {
|
|
35
|
+
constructor(src) {
|
|
36
|
+
super(src.status, src.error, src.message, src.headers, { cause: src });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function toKnownErr(e) {
|
|
40
|
+
if (e instanceof XRPCError) {
|
|
41
|
+
if (e.error === 'AuthenticationRequired')
|
|
42
|
+
return new AuthenticationRequiredError(e);
|
|
43
|
+
if (e.error === 'NotAuthorized')
|
|
44
|
+
return new NotAuthorizedError(e);
|
|
45
|
+
if (e.error === 'ProgramRefused')
|
|
46
|
+
return new ProgramRefusedError(e);
|
|
47
|
+
if (e.error === 'NotFound')
|
|
48
|
+
return new NotFoundError(e);
|
|
49
|
+
if (e.error === 'RateLimitExceeded')
|
|
50
|
+
return new RateLimitExceededError(e);
|
|
51
|
+
if (e.error === 'Unavailable')
|
|
52
|
+
return new UnavailableError(e);
|
|
53
|
+
}
|
|
54
|
+
return e;
|
|
55
|
+
}
|
|
@@ -19,6 +19,10 @@ export interface OutputSchema {
|
|
|
19
19
|
released?: boolean;
|
|
20
20
|
/** Present only with `released`, and only when the calling PDS hosts the account that removed the number: that account's DID. A PDS that keeps an account per phone number (a placeholder) uses it to tell two placeholders apart: the old account's, which must not sign in with this number again, and the one it started for the number's new holder after the removal, which it finds by this DID and `releaseId` and signs in until the number is bound to it. Binding the number back to this account through identity.attest is refused (`ChannelReleased`). */
|
|
21
21
|
releasedFrom?: string;
|
|
22
|
+
/** Present (true) only with `did`: this method of the account is frozen (identity.manageMethods `freeze`). The PDS refuses the sign-in and creates nothing; the account's other methods still sign in. */
|
|
23
|
+
frozen?: boolean;
|
|
24
|
+
/** Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner. */
|
|
25
|
+
frozenUntil?: string;
|
|
22
26
|
/** Present only with `releasedFrom`: the platform's id for that removal, fresh each time the number is removed. A PDS keys the number's next holder's account on `releasedFrom` and `releaseId` together, so an account that later removed the number itself is never handed on to the holder after it. */
|
|
23
27
|
releaseId?: string;
|
|
24
28
|
}
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { HeadersMap, XRPCError } from '@atproto/xrpc';
|
|
5
|
+
import type * as PubTechneDraftIdentityDefs from './defs.js';
|
|
5
6
|
export type QueryParams = {};
|
|
6
7
|
export interface InputSchema {
|
|
7
8
|
bid: string;
|
|
8
9
|
}
|
|
9
10
|
export interface OutputSchema {
|
|
10
11
|
ok: boolean;
|
|
12
|
+
status?: 'pending' | (string & {});
|
|
13
|
+
pending?: PubTechneDraftIdentityDefs.PendingChange;
|
|
11
14
|
}
|
|
12
15
|
export interface CallOptions {
|
|
13
16
|
signal?: AbortSignal;
|
|
@@ -29,4 +32,7 @@ export declare class NotFoundError extends XRPCError {
|
|
|
29
32
|
export declare class LastMethodError extends XRPCError {
|
|
30
33
|
constructor(src: XRPCError);
|
|
31
34
|
}
|
|
35
|
+
export declare class RecoveryProtectedError extends XRPCError {
|
|
36
|
+
constructor(src: XRPCError);
|
|
37
|
+
}
|
|
32
38
|
export declare function toKnownErr(e: any): any;
|