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.
Files changed (56) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +3 -1
  3. package/dist/auth/account.d.ts +67 -0
  4. package/dist/auth/account.js +136 -0
  5. package/dist/auth/hosts.d.ts +4 -0
  6. package/dist/auth/hosts.js +4 -0
  7. package/dist/auth/index.d.ts +30 -5
  8. package/dist/auth/index.js +80 -12
  9. package/dist/catalog/catalog.gen.js +1332 -205
  10. package/dist/generated/index.d.ts +9 -0
  11. package/dist/generated/index.js +27 -0
  12. package/dist/generated/lexicons.d.ts +1797 -227
  13. package/dist/generated/lexicons.js +1147 -224
  14. package/dist/generated/nsid.d.ts +16 -0
  15. package/dist/generated/nsid.js +16 -0
  16. package/dist/generated/nsid.json +16 -0
  17. package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.d.ts +3 -0
  18. package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.js +7 -0
  19. package/dist/generated/types/pub/techne/draft/identity/attest.d.ts +5 -0
  20. package/dist/generated/types/pub/techne/draft/identity/attest.js +7 -0
  21. package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.d.ts +3 -0
  22. package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.js +7 -0
  23. package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.d.ts +29 -0
  24. package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.js +27 -0
  25. package/dist/generated/types/pub/techne/draft/identity/defs.d.ts +41 -7
  26. package/dist/generated/types/pub/techne/draft/identity/defs.js +14 -0
  27. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +9 -0
  28. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.js +14 -0
  29. package/dist/generated/types/pub/techne/draft/identity/fold.d.ts +3 -0
  30. package/dist/generated/types/pub/techne/draft/identity/fold.js +7 -0
  31. package/dist/generated/types/pub/techne/draft/identity/holdForPhone.d.ts +1 -1
  32. package/dist/generated/types/pub/techne/draft/identity/link.d.ts +3 -0
  33. package/dist/generated/types/pub/techne/draft/identity/link.js +7 -0
  34. package/dist/generated/types/pub/techne/draft/identity/listMethods.d.ts +7 -1
  35. package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +267 -0
  36. package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +265 -0
  37. package/dist/generated/types/pub/techne/draft/identity/openAccountPage.d.ts +40 -0
  38. package/dist/generated/types/pub/techne/draft/identity/openAccountPage.js +55 -0
  39. package/dist/generated/types/pub/techne/draft/identity/resolve.d.ts +4 -0
  40. package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.d.ts +6 -0
  41. package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.js +7 -0
  42. package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +2 -2
  43. package/dist/generated/types/pub/techne/draft/query/getRecords.d.ts +11 -0
  44. package/dist/generated/types/pub/techne/draft/query/getRecords.js +7 -0
  45. package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +7 -1
  46. package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +17 -3
  47. package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +7 -1
  48. package/dist/generated/types/pub/techne/draft/registry/purgeType.js +17 -3
  49. package/dist/query/compose.d.ts +1 -1
  50. package/dist/query/compose.js +1 -1
  51. package/dist/query/index.d.ts +7 -0
  52. package/dist/query/index.js +28 -1
  53. package/dist/versions/react.js +19 -6
  54. package/dist/wasm/techne-wasm.gen.js +1 -1
  55. package/dist/wasm/techne-wasm2js.gen.js +8361 -8359
  56. package/package.json +2 -1
@@ -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,8 @@ 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";
104
+ readonly IDENTITY_DEFS_PERSON_MEMBER: "pub.techne.draft.identity.defs#personMember";
101
105
  readonly IDENTITY_FINISH_ADD_METHOD: "pub.techne.draft.identity.finishAddMethod";
102
106
  readonly IDENTITY_FINISH_ADD_METHOD_OFFER: "pub.techne.draft.identity.finishAddMethod#offer";
103
107
  readonly IDENTITY_FOLD: "pub.techne.draft.identity.fold";
@@ -111,6 +115,17 @@ export declare const NSID: {
111
115
  readonly IDENTITY_LIST_METHODS: "pub.techne.draft.identity.listMethods";
112
116
  readonly IDENTITY_LIST_PHONE_HOLDS: "pub.techne.draft.identity.listPhoneHolds";
113
117
  readonly IDENTITY_LIST_PHONE_HOLDS_HOLD_VIEW: "pub.techne.draft.identity.listPhoneHolds#holdView";
118
+ readonly IDENTITY_MANAGE_METHODS: "pub.techne.draft.identity.manageMethods";
119
+ readonly IDENTITY_MANAGE_METHODS_BACKUP_EMAIL: "pub.techne.draft.identity.manageMethods#backupEmail";
120
+ readonly IDENTITY_MANAGE_METHODS_DUE_DELETE: "pub.techne.draft.identity.manageMethods#dueDelete";
121
+ readonly IDENTITY_MANAGE_METHODS_EXTERNAL: "pub.techne.draft.identity.manageMethods#external";
122
+ readonly IDENTITY_MANAGE_METHODS_IMPORTED_EMAIL: "pub.techne.draft.identity.manageMethods#importedEmail";
123
+ readonly IDENTITY_MANAGE_METHODS_NOTICE: "pub.techne.draft.identity.manageMethods#notice";
124
+ readonly IDENTITY_MANAGE_METHODS_NOTICE_TO: "pub.techne.draft.identity.manageMethods#noticeTo";
125
+ readonly IDENTITY_MANAGE_METHODS_PROVED_METHOD: "pub.techne.draft.identity.manageMethods#provedMethod";
126
+ readonly IDENTITY_MANAGE_METHODS_SIGN_IN_METHOD: "pub.techne.draft.identity.manageMethods#signInMethod";
127
+ readonly IDENTITY_MANAGE_METHODS_STEP_UP: "pub.techne.draft.identity.manageMethods#stepUp";
128
+ readonly IDENTITY_OPEN_ACCOUNT_PAGE: "pub.techne.draft.identity.openAccountPage";
114
129
  readonly IDENTITY_REDEEM_LINK_TOKEN: "pub.techne.draft.identity.redeemLinkToken";
115
130
  readonly IDENTITY_RELEASE_PHONE_HOLD: "pub.techne.draft.identity.releasePhoneHold";
116
131
  readonly IDENTITY_RESET_LINK_TOKEN: "pub.techne.draft.identity.resetLinkToken";
@@ -197,6 +212,7 @@ export declare const NSID: {
197
212
  readonly QUERY_GET_RECORDS_CURATION: "pub.techne.draft.query.getRecords#curation";
198
213
  readonly QUERY_GET_RECORDS_DEFAULT: "pub.techne.draft.query.getRecords#default";
199
214
  readonly QUERY_GET_RECORDS_HANDLE: "pub.techne.draft.query.getRecords#handle";
215
+ readonly QUERY_GET_RECORDS_LINKED_HANDLE: "pub.techne.draft.query.getRecords#linkedHandle";
200
216
  readonly QUERY_GET_RECORDS_RESOLVED: "pub.techne.draft.query.getRecords#resolved";
201
217
  readonly QUERY_HAS: "pub.techne.draft.query#has";
202
218
  readonly QUERY_LIST_RECORDS: "pub.techne.draft.query.listRecords";
@@ -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,8 @@ 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',
108
+ IDENTITY_DEFS_PERSON_MEMBER: 'pub.techne.draft.identity.defs#personMember',
105
109
  IDENTITY_FINISH_ADD_METHOD: 'pub.techne.draft.identity.finishAddMethod',
106
110
  IDENTITY_FINISH_ADD_METHOD_OFFER: 'pub.techne.draft.identity.finishAddMethod#offer',
107
111
  IDENTITY_FOLD: 'pub.techne.draft.identity.fold',
@@ -115,6 +119,17 @@ export const NSID = {
115
119
  IDENTITY_LIST_METHODS: 'pub.techne.draft.identity.listMethods',
116
120
  IDENTITY_LIST_PHONE_HOLDS: 'pub.techne.draft.identity.listPhoneHolds',
117
121
  IDENTITY_LIST_PHONE_HOLDS_HOLD_VIEW: 'pub.techne.draft.identity.listPhoneHolds#holdView',
122
+ IDENTITY_MANAGE_METHODS: 'pub.techne.draft.identity.manageMethods',
123
+ IDENTITY_MANAGE_METHODS_BACKUP_EMAIL: 'pub.techne.draft.identity.manageMethods#backupEmail',
124
+ IDENTITY_MANAGE_METHODS_DUE_DELETE: 'pub.techne.draft.identity.manageMethods#dueDelete',
125
+ IDENTITY_MANAGE_METHODS_EXTERNAL: 'pub.techne.draft.identity.manageMethods#external',
126
+ IDENTITY_MANAGE_METHODS_IMPORTED_EMAIL: 'pub.techne.draft.identity.manageMethods#importedEmail',
127
+ IDENTITY_MANAGE_METHODS_NOTICE: 'pub.techne.draft.identity.manageMethods#notice',
128
+ IDENTITY_MANAGE_METHODS_NOTICE_TO: 'pub.techne.draft.identity.manageMethods#noticeTo',
129
+ IDENTITY_MANAGE_METHODS_PROVED_METHOD: 'pub.techne.draft.identity.manageMethods#provedMethod',
130
+ IDENTITY_MANAGE_METHODS_SIGN_IN_METHOD: 'pub.techne.draft.identity.manageMethods#signInMethod',
131
+ IDENTITY_MANAGE_METHODS_STEP_UP: 'pub.techne.draft.identity.manageMethods#stepUp',
132
+ IDENTITY_OPEN_ACCOUNT_PAGE: 'pub.techne.draft.identity.openAccountPage',
118
133
  IDENTITY_REDEEM_LINK_TOKEN: 'pub.techne.draft.identity.redeemLinkToken',
119
134
  IDENTITY_RELEASE_PHONE_HOLD: 'pub.techne.draft.identity.releasePhoneHold',
120
135
  IDENTITY_RESET_LINK_TOKEN: 'pub.techne.draft.identity.resetLinkToken',
@@ -201,6 +216,7 @@ export const NSID = {
201
216
  QUERY_GET_RECORDS_CURATION: 'pub.techne.draft.query.getRecords#curation',
202
217
  QUERY_GET_RECORDS_DEFAULT: 'pub.techne.draft.query.getRecords#default',
203
218
  QUERY_GET_RECORDS_HANDLE: 'pub.techne.draft.query.getRecords#handle',
219
+ QUERY_GET_RECORDS_LINKED_HANDLE: 'pub.techne.draft.query.getRecords#linkedHandle',
204
220
  QUERY_GET_RECORDS_RESOLVED: 'pub.techne.draft.query.getRecords#resolved',
205
221
  QUERY_HAS: 'pub.techne.draft.query#has',
206
222
  QUERY_LIST_RECORDS: 'pub.techne.draft.query.listRecords',
@@ -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,8 @@
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",
104
+ "IDENTITY_DEFS_PERSON_MEMBER": "pub.techne.draft.identity.defs#personMember",
101
105
  "IDENTITY_FINISH_ADD_METHOD": "pub.techne.draft.identity.finishAddMethod",
102
106
  "IDENTITY_FINISH_ADD_METHOD_OFFER": "pub.techne.draft.identity.finishAddMethod#offer",
103
107
  "IDENTITY_FOLD": "pub.techne.draft.identity.fold",
@@ -111,6 +115,17 @@
111
115
  "IDENTITY_LIST_METHODS": "pub.techne.draft.identity.listMethods",
112
116
  "IDENTITY_LIST_PHONE_HOLDS": "pub.techne.draft.identity.listPhoneHolds",
113
117
  "IDENTITY_LIST_PHONE_HOLDS_HOLD_VIEW": "pub.techne.draft.identity.listPhoneHolds#holdView",
118
+ "IDENTITY_MANAGE_METHODS": "pub.techne.draft.identity.manageMethods",
119
+ "IDENTITY_MANAGE_METHODS_BACKUP_EMAIL": "pub.techne.draft.identity.manageMethods#backupEmail",
120
+ "IDENTITY_MANAGE_METHODS_DUE_DELETE": "pub.techne.draft.identity.manageMethods#dueDelete",
121
+ "IDENTITY_MANAGE_METHODS_EXTERNAL": "pub.techne.draft.identity.manageMethods#external",
122
+ "IDENTITY_MANAGE_METHODS_IMPORTED_EMAIL": "pub.techne.draft.identity.manageMethods#importedEmail",
123
+ "IDENTITY_MANAGE_METHODS_NOTICE": "pub.techne.draft.identity.manageMethods#notice",
124
+ "IDENTITY_MANAGE_METHODS_NOTICE_TO": "pub.techne.draft.identity.manageMethods#noticeTo",
125
+ "IDENTITY_MANAGE_METHODS_PROVED_METHOD": "pub.techne.draft.identity.manageMethods#provedMethod",
126
+ "IDENTITY_MANAGE_METHODS_SIGN_IN_METHOD": "pub.techne.draft.identity.manageMethods#signInMethod",
127
+ "IDENTITY_MANAGE_METHODS_STEP_UP": "pub.techne.draft.identity.manageMethods#stepUp",
128
+ "IDENTITY_OPEN_ACCOUNT_PAGE": "pub.techne.draft.identity.openAccountPage",
114
129
  "IDENTITY_REDEEM_LINK_TOKEN": "pub.techne.draft.identity.redeemLinkToken",
115
130
  "IDENTITY_RELEASE_PHONE_HOLD": "pub.techne.draft.identity.releasePhoneHold",
116
131
  "IDENTITY_RESET_LINK_TOKEN": "pub.techne.draft.identity.resetLinkToken",
@@ -197,6 +212,7 @@
197
212
  "QUERY_GET_RECORDS_CURATION": "pub.techne.draft.query.getRecords#curation",
198
213
  "QUERY_GET_RECORDS_DEFAULT": "pub.techne.draft.query.getRecords#default",
199
214
  "QUERY_GET_RECORDS_HANDLE": "pub.techne.draft.query.getRecords#handle",
215
+ "QUERY_GET_RECORDS_LINKED_HANDLE": "pub.techne.draft.query.getRecords#linkedHandle",
200
216
  "QUERY_GET_RECORDS_RESOLVED": "pub.techne.draft.query.getRecords#resolved",
201
217
  "QUERY_HAS": "pub.techne.draft.query#has",
202
218
  "QUERY_LIST_RECORDS": "pub.techne.draft.query.listRecords",
@@ -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')
@@ -13,6 +13,8 @@ export interface InputSchema {
13
13
  verifiedAt: string;
14
14
  /** The PDS created the account in this sign-in. */
15
15
  newAccount: boolean;
16
+ /** Optional; sent only as true, and only with `newAccount`. The PDS's sign-in page named its Terms of Use and Privacy Policy when this account was made there, so the issuer records the person's assent. Absent: nothing to record (a returning sign-in, a page without the line, an older PDS, or a first-party app that shows its own terms). */
17
+ termsShown?: boolean;
16
18
  }
17
19
  export interface OutputSchema {
18
20
  /** Hook protocol version. */
@@ -45,6 +47,9 @@ export declare class ChannelBoundError extends XRPCError {
45
47
  export declare class ChannelReleasedError extends XRPCError {
46
48
  constructor(src: XRPCError);
47
49
  }
50
+ export declare class MethodFrozenError extends XRPCError {
51
+ constructor(src: XRPCError);
52
+ }
48
53
  export declare class RateLimitExceededError extends XRPCError {
49
54
  constructor(src: XRPCError);
50
55
  }
@@ -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,30 +11,64 @@ 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 bound to the caller's account, masked. */
14
+ /** One sign-in method of an account. `masked` is always masked. Only identity.manageMethods `list` (the identity PDS's signed hook, for the signed-in owner's own account page) adds `value`; identity.listMethods never does. */
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
+ /** An email's full address or a phone's full number (E.164). Sent only by identity.manageMethods `list`, to the identity PDS, for the owner's own account page; never in identity.listMethods, signInMethods or a notice. Absent on a passkey, Nostr key or recovery codes. */
23
+ value?: string;
22
24
  boundAt: string;
25
+ /** A recovery method of this account. Private: only the account sees it. */
26
+ recovery?: boolean;
27
+ /** Frozen: it signs in nowhere until then, or until a recovery method lifts it. */
28
+ frozenUntil?: string;
29
+ /** "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. */
30
+ programs?: boolean;
23
31
  }
24
32
  export declare function isMethodView<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "methodView">;
25
33
  export declare function validateMethodView<V>(v: V): ValidationResult<MethodView & V>;
26
- /** An alias link between the caller's account and another. */
34
+ /** A change that waits for its time (a method's removal, the account's deletion, or a method's move onto another account (identity.manageMethods moveMethod), 7 days, or none for a move a recovery method proved; the account's first recovery mark, 24 hours). A move is completed by the platform once due, tried again after a failed write, and may be dropped instead (identity.manageMethods moveMethod says when). 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 (even if a recovery method lifted the freeze early) is dropped when it runs out, not completed. */
35
+ export interface PendingChange {
36
+ $type?: 'pub.techne.draft.identity.defs#pendingChange';
37
+ id: string;
38
+ kind: 'removeMethod' | 'deleteAccount' | 'markRecovery' | 'moveMethod' | (string & {});
39
+ /** The method it removes, marks or moves (for an incoming move, the other account's method). */
40
+ method?: string;
41
+ /** moveMethod: the other account. On the account the method leaves, where it goes; on the account it joins (identity.manageMethods `list` shows the move there too, and either account can cancel it), where it comes from. */
42
+ other?: string;
43
+ createdAt: string;
44
+ dueAt: string;
45
+ }
46
+ export declare function isPendingChange<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "pendingChange">;
47
+ export declare function validatePendingChange<V>(v: V): ValidationResult<PendingChange & V>;
48
+ /** Another account of the caller's person: the two are linked (identity.manageMethods moveMethod), every DID of the person naming every other in `alsoKnownAs`. Linked accounts have no primary, and a link is always mutual: identity.listMethods sends `mutual` as true. */
27
49
  export interface LinkView {
28
50
  $type?: 'pub.techne.draft.identity.defs#linkView';
29
51
  /** The other account. */
30
52
  did: string;
31
53
  handle?: string;
32
- primary: string;
33
- /** Both accounts hold a matching pub.techne.draft.accountLink; a link counts only when true. */
54
+ /** Retired: a link is always mutual, and identity.listMethods sends `true` (it was: both accounts hold a matching pub.techne.draft.accountLink). */
34
55
  mutual: boolean;
56
+ /** When the two accounts became one person. */
57
+ since?: string;
35
58
  }
36
59
  export declare function isLinkView<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "linkView">;
37
60
  export declare function validateLinkView<V>(v: V): ValidationResult<LinkView & V>;
61
+ /** Another account of an account's person (identity.manageMethods `list` and moveMethod). */
62
+ export interface PersonMember {
63
+ $type?: 'pub.techne.draft.identity.defs#personMember';
64
+ did: string;
65
+ /** When it joined the person. Sent by `list`. */
66
+ since?: string;
67
+ /** Its handle, when the platform knows one. Sent in addChannel's `otherPerson`. */
68
+ handle?: string;
69
+ }
70
+ export declare function isPersonMember<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.defs", "personMember">;
71
+ export declare function validatePersonMember<V>(v: V): ValidationResult<PersonMember & V>;
38
72
  /** A link token as its owner sees it, without the token. */
39
73
  export interface LinkTokenView {
40
74
  $type?: 'pub.techne.draft.identity.defs#linkTokenView';
@@ -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);
@@ -23,6 +30,13 @@ export function isLinkView(v) {
23
30
  export function validateLinkView(v) {
24
31
  return validate(v, id, hashLinkView);
25
32
  }
33
+ const hashPersonMember = 'personMember';
34
+ export function isPersonMember(v) {
35
+ return is$typed(v, id, hashPersonMember);
36
+ }
37
+ export function validatePersonMember(v) {
38
+ return validate(v, id, hashPersonMember);
39
+ }
26
40
  const hashLinkTokenView = 'linkTokenView';
27
41
  export function isLinkTokenView(v) {
28
42
  return is$typed(v, id, hashLinkTokenView);
@@ -13,6 +13,8 @@ export interface OutputSchema {
13
13
  status: 'added' | 'alreadyYours' | 'boundElsewhere' | 'unavailable' | (string & {});
14
14
  method?: PubTechneDraftIdentityDefs.MethodView;
15
15
  offer?: Offer;
16
+ /** `boundElsewhere` when both accounts hold something: the account the method signs in to (no `offer`). */
17
+ other?: string;
16
18
  }
17
19
  export interface CallOptions {
18
20
  signal?: AbortSignal;
@@ -34,12 +36,19 @@ export declare class InvalidCodeError extends XRPCError {
34
36
  export declare class RateLimitExceededError extends XRPCError {
35
37
  constructor(src: XRPCError);
36
38
  }
39
+ export declare class MethodFrozenError extends XRPCError {
40
+ constructor(src: XRPCError);
41
+ }
42
+ export declare class ProtectedAccountError extends XRPCError {
43
+ constructor(src: XRPCError);
44
+ }
37
45
  export declare class UpstreamFailureError extends XRPCError {
38
46
  constructor(src: XRPCError);
39
47
  }
40
48
  export declare function toKnownErr(e: any): any;
41
49
  export interface Offer {
42
50
  $type?: 'pub.techne.draft.identity.finishAddMethod#offer';
51
+ /** `fold`. (`link` is retired and no longer offered.) */
43
52
  action: 'fold' | 'link' | (string & {});
44
53
  token: string;
45
54
  /** The account the method is bound to. */
@@ -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,17 @@
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[];
13
+ /** The other accounts of the caller's person (linked with identity.manageMethods moveMethod), each with `did`, `since` and `mutual` (always true); linked accounts have no primary. Empty when it is alone. */
10
14
  links: PubTechneDraftIdentityDefs.LinkView[];
15
+ /** The account's pending changes, soonest first (the account page shows them at the top, with Cancel), a move of one of its methods onto another account included. */
16
+ pending?: PubTechneDraftIdentityDefs.PendingChange[];
11
17
  }
12
18
  export interface CallOptions {
13
19
  signal?: AbortSignal;