@atproto/pds 0.4.198 → 0.4.200
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 +23 -0
- package/dist/actor-store/preference/reader.d.ts.map +1 -1
- package/dist/actor-store/preference/reader.js +15 -2
- package/dist/actor-store/preference/reader.js.map +1 -1
- package/dist/actor-store/preference/transactor.d.ts.map +1 -1
- package/dist/actor-store/preference/transactor.js +3 -1
- package/dist/actor-store/preference/transactor.js.map +1 -1
- package/dist/actor-store/preference/util.d.ts +4 -0
- package/dist/actor-store/preference/util.d.ts.map +1 -1
- package/dist/actor-store/preference/util.js +20 -3
- package/dist/actor-store/preference/util.js.map +1 -1
- package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +2 -2
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +2 -2
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +4 -2
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +286 -54
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +166 -25
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +13 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +9 -0
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/defs.d.ts +10 -0
- package/dist/lexicon/types/app/bsky/contact/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/defs.js +9 -0
- package/dist/lexicon/types/app/bsky/contact/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/dismissMatch.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/getMatches.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/importContacts.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/removeData.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/removeData.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/removeData.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/sendNotification.d.ts +26 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.js +7 -0
- package/dist/lexicon/types/app/bsky/contact/sendNotification.js.map +1 -0
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/contact/verifyPhone.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts +3 -3
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getSession.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +4 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.js.map +1 -1
- package/package.json +10 -10
- package/src/actor-store/preference/reader.ts +27 -3
- package/src/actor-store/preference/transactor.ts +9 -7
- package/src/actor-store/preference/util.ts +21 -3
- package/src/api/com/atproto/server/createSession.ts +3 -2
- package/src/api/com/atproto/server/getSession.ts +2 -2
- package/src/api/com/atproto/server/refreshSession.ts +5 -2
- package/src/lexicon/index.ts +13 -0
- package/src/lexicon/lexicons.ts +173 -25
- package/src/lexicon/types/app/bsky/actor/defs.ts +22 -0
- package/src/lexicon/types/app/bsky/contact/defs.ts +19 -0
- package/src/lexicon/types/app/bsky/contact/dismissMatch.ts +1 -1
- package/src/lexicon/types/app/bsky/contact/getMatches.ts +1 -1
- package/src/lexicon/types/app/bsky/contact/getSyncStatus.ts +1 -1
- package/src/lexicon/types/app/bsky/contact/importContacts.ts +6 -1
- package/src/lexicon/types/app/bsky/contact/removeData.ts +1 -1
- package/src/lexicon/types/app/bsky/contact/sendNotification.ts +44 -0
- package/src/lexicon/types/app/bsky/contact/startPhoneVerification.ts +1 -1
- package/src/lexicon/types/app/bsky/contact/verifyPhone.ts +6 -1
- package/src/lexicon/types/app/bsky/notification/listNotifications.ts +1 -0
- package/src/lexicon/types/com/atproto/server/deleteSession.ts +1 -0
- package/src/lexicon/types/com/atproto/server/getSession.ts +1 -1
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +4 -1
- package/tests/_puppeteer.ts +87 -0
- package/tests/oauth.test.ts +54 -94
- package/tests/preferences.test.ts +96 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listNotifications.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAM9E,MAAM,MAAM,WAAW,GAAG;IACxB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,YAAY,EAAE,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,sDAAsD,CAAA;IAC9D,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAA;IACpC,iHAAiH;IACjH,MAAM,EACF,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,oBAAoB,GACpB,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IAClC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;CACrC;AAID,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8GAErC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,sCAE3C"}
|
|
1
|
+
{"version":3,"file":"listNotifications.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AACzD,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAM9E,MAAM,MAAM,WAAW,GAAG;IACxB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,YAAY,EAAE,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,sDAAsD,CAAA;IAC9D,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAA;IACpC,iHAAiH;IACjH,MAAM,EACF,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,oBAAoB,GACpB,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,eAAe,GACf,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IAClC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC,KAAK,EAAE,CAAA;CACrC;AAID,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8GAErC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,sCAE3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listNotifications.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"listNotifications.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/notification/listNotifications.ts"],"names":[],"mappings":";;AAgFA,wCAEC;AAED,oDAEC;AAjFD,mDAA4D;AAC5D,2CAIyB;AAIzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,yCAAyC,CAAA;AA8DpD,MAAM,gBAAgB,GAAG,cAAc,CAAA;AAEvC,SAAgB,cAAc,CAAI,CAAI;IACpC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC1C,CAAC;AAED,SAAgB,oBAAoB,CAAI,CAAI;IAC1C,OAAO,QAAQ,CAAmB,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC5D,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyActorDefs from '../actor/defs.js'\nimport type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.notification.listNotifications'\n\nexport type QueryParams = {\n /** Notification reasons to include in response. */\n reasons?: string[]\n limit: number\n priority?: boolean\n cursor?: string\n seenAt?: string\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n cursor?: string\n notifications: Notification[]\n priority?: boolean\n seenAt?: string\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n\nexport interface Notification {\n $type?: 'app.bsky.notification.listNotifications#notification'\n uri: string\n cid: string\n author: AppBskyActorDefs.ProfileView\n /** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. */\n reason:\n | 'like'\n | 'repost'\n | 'follow'\n | 'mention'\n | 'reply'\n | 'quote'\n | 'starterpack-joined'\n | 'verified'\n | 'unverified'\n | 'like-via-repost'\n | 'repost-via-repost'\n | 'subscribed-post'\n | 'contact-match'\n | (string & {})\n reasonSubject?: string\n record: { [_ in string]: unknown }\n isRead: boolean\n indexedAt: string\n labels?: ComAtprotoLabelDefs.Label[]\n}\n\nconst hashNotification = 'notification'\n\nexport function isNotification<V>(v: V) {\n return is$typed(v, id, hashNotification)\n}\n\nexport function validateNotification<V>(v: V) {\n return validate<Notification & V>(v, id, hashNotification)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"deleteSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,GAAG,cAAc,CAAA;CACxC;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,kCAAkC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.deleteSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\nexport type HandlerInput = void\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | void\n"]}
|
|
1
|
+
{"version":3,"file":"deleteSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,kCAAkC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.deleteSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\nexport type HandlerInput = void\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'InvalidToken' | 'ExpiredToken'\n}\n\nexport type HandlerOutput = HandlerError | void\n"]}
|
|
@@ -3,12 +3,12 @@ export type InputSchema = undefined;
|
|
|
3
3
|
export interface OutputSchema {
|
|
4
4
|
handle: string;
|
|
5
5
|
did: string;
|
|
6
|
-
email?: string;
|
|
7
|
-
emailConfirmed?: boolean;
|
|
8
|
-
emailAuthFactor?: boolean;
|
|
9
6
|
didDoc?: {
|
|
10
7
|
[_ in string]: unknown;
|
|
11
8
|
};
|
|
9
|
+
email?: string;
|
|
10
|
+
emailConfirmed?: boolean;
|
|
11
|
+
emailAuthFactor?: boolean;
|
|
12
12
|
active?: boolean;
|
|
13
13
|
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
14
14
|
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,
|
|
1
|
+
{"version":3,"file":"getSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oOAAoO;IACpO,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACnE;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.getSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n handle: string\n did: string\n
|
|
1
|
+
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.getSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n handle: string\n did: string\n didDoc?: { [_ in string]: unknown }\n email?: string\n emailConfirmed?: boolean\n emailAuthFactor?: boolean\n active?: boolean\n /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */\n status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -8,6 +8,9 @@ export interface OutputSchema {
|
|
|
8
8
|
didDoc?: {
|
|
9
9
|
[_ in string]: unknown;
|
|
10
10
|
};
|
|
11
|
+
email?: string;
|
|
12
|
+
emailConfirmed?: boolean;
|
|
13
|
+
emailAuthFactor?: boolean;
|
|
11
14
|
active?: boolean;
|
|
12
15
|
/** Hosting status of the account. If not specified, then assume 'active'. */
|
|
13
16
|
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
@@ -23,7 +26,7 @@ export interface HandlerSuccess {
|
|
|
23
26
|
export interface HandlerError {
|
|
24
27
|
status: number;
|
|
25
28
|
message?: string;
|
|
26
|
-
error?: 'AccountTakedown';
|
|
29
|
+
error?: 'AccountTakedown' | 'InvalidToken' | 'ExpiredToken';
|
|
27
30
|
}
|
|
28
31
|
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
29
32
|
//# sourceMappingURL=refreshSession.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACnE;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"refreshSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACnE;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,iBAAiB,GAAG,cAAc,GAAG,cAAc,CAAA;CAC5D;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,mCAAmC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.refreshSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n accessJwt: string\n refreshJwt: string\n handle: string\n did: string\n didDoc?: { [_ in string]: unknown }\n active?: boolean\n /** Hosting status of the account. If not specified, then assume 'active'. */\n status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'AccountTakedown'\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
1
|
+
{"version":3,"file":"refreshSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,mCAAmC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.refreshSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n accessJwt: string\n refreshJwt: string\n handle: string\n did: string\n didDoc?: { [_ in string]: unknown }\n email?: string\n emailConfirmed?: boolean\n emailAuthFactor?: boolean\n active?: boolean\n /** Hosting status of the account. If not specified, then assume 'active'. */\n status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'AccountTakedown' | 'InvalidToken' | 'ExpiredToken'\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/pds",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.200",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
|
6
6
|
"keywords": [
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
"@atproto-labs/simple-store-memory": "0.1.4",
|
|
53
53
|
"@atproto-labs/simple-store-redis": "0.0.1",
|
|
54
54
|
"@atproto-labs/xrpc-utils": "0.0.24",
|
|
55
|
-
"@atproto/api": "^0.18.
|
|
55
|
+
"@atproto/api": "^0.18.9",
|
|
56
56
|
"@atproto/aws": "^0.2.31",
|
|
57
|
-
"@atproto/common": "^0.5.
|
|
57
|
+
"@atproto/common": "^0.5.4",
|
|
58
58
|
"@atproto/crypto": "^0.4.5",
|
|
59
59
|
"@atproto/identity": "^0.4.10",
|
|
60
|
-
"@atproto/lex-cbor": "^0.0.
|
|
61
|
-
"@atproto/lex-data": "^0.0.
|
|
60
|
+
"@atproto/lex-cbor": "^0.0.4",
|
|
61
|
+
"@atproto/lex-data": "^0.0.4",
|
|
62
62
|
"@atproto/lexicon": "^0.6.0",
|
|
63
|
-
"@atproto/oauth-provider": "^0.
|
|
63
|
+
"@atproto/oauth-provider": "^0.15.0",
|
|
64
64
|
"@atproto/oauth-scopes": "^0.3.0",
|
|
65
65
|
"@atproto/repo": "^0.8.12",
|
|
66
66
|
"@atproto/syntax": "^0.4.2",
|
|
67
67
|
"@atproto/xrpc": "^0.7.7",
|
|
68
|
-
"@atproto/xrpc-server": "^0.10.
|
|
68
|
+
"@atproto/xrpc-server": "^0.10.5"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"ts-node": "^10.8.2",
|
|
84
84
|
"typescript": "^5.6.3",
|
|
85
85
|
"ws": "^8.12.0",
|
|
86
|
-
"@atproto/api": "^0.18.
|
|
87
|
-
"@atproto/bsky": "^0.0.
|
|
86
|
+
"@atproto/api": "^0.18.9",
|
|
87
|
+
"@atproto/bsky": "^0.0.204",
|
|
88
88
|
"@atproto/lex-cli": "^0.9.8",
|
|
89
|
-
"@atproto/oauth-client-browser-example": "0.0.
|
|
89
|
+
"@atproto/oauth-client-browser-example": "0.0.9"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"codegen": "lex gen-server --yes ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ActorDb } from '../db'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
DECLARED_AGE_PREF,
|
|
4
|
+
PERSONAL_DETAILS_PREF,
|
|
5
|
+
PrefAllowedOptions,
|
|
6
|
+
getAgeFromDatestring,
|
|
7
|
+
prefAllowed,
|
|
8
|
+
} from './util'
|
|
3
9
|
|
|
4
10
|
export class PreferenceReader {
|
|
5
11
|
constructor(public db: ActorDb) {}
|
|
@@ -13,10 +19,28 @@ export class PreferenceReader {
|
|
|
13
19
|
.orderBy('id')
|
|
14
20
|
.selectAll()
|
|
15
21
|
.execute()
|
|
16
|
-
|
|
22
|
+
|
|
23
|
+
const prefs = prefsRes
|
|
17
24
|
.filter((pref) => !namespace || prefMatchNamespace(namespace, pref.name))
|
|
18
|
-
.filter((pref) => prefAllowed(pref.name, opts))
|
|
19
25
|
.map((pref) => JSON.parse(pref.valueJson) as AccountPreference)
|
|
26
|
+
const personalDetailsPref = prefs.find(
|
|
27
|
+
(pref) => pref.$type === PERSONAL_DETAILS_PREF,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
if (personalDetailsPref) {
|
|
31
|
+
if (typeof personalDetailsPref.birthDate === 'string') {
|
|
32
|
+
const age = getAgeFromDatestring(personalDetailsPref.birthDate)
|
|
33
|
+
const declaredAgePref: AccountPreference = {
|
|
34
|
+
$type: DECLARED_AGE_PREF,
|
|
35
|
+
isOverAge13: age >= 13,
|
|
36
|
+
isOverAge16: age >= 16,
|
|
37
|
+
isOverAge18: age >= 18,
|
|
38
|
+
}
|
|
39
|
+
prefs.push(declaredAgePref)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return prefs.filter((pref) => prefAllowed(pref.$type, opts))
|
|
20
44
|
}
|
|
21
45
|
}
|
|
22
46
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
PreferenceReader,
|
|
5
5
|
prefMatchNamespace,
|
|
6
6
|
} from './reader'
|
|
7
|
-
import { PrefAllowedOptions, prefAllowed } from './util'
|
|
7
|
+
import { PrefAllowedOptions, isReadOnlyPref, prefAllowed } from './util'
|
|
8
8
|
|
|
9
9
|
export class PreferenceTransactor extends PreferenceReader {
|
|
10
10
|
async putPreferences(
|
|
@@ -29,12 +29,14 @@ export class PreferenceTransactor extends PreferenceReader {
|
|
|
29
29
|
.selectFrom('account_pref')
|
|
30
30
|
.select(['id', 'name'])
|
|
31
31
|
.execute()
|
|
32
|
-
const putPrefs = values
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const putPrefs = values
|
|
33
|
+
.filter((value) => !isReadOnlyPref(value.$type))
|
|
34
|
+
.map((value) => {
|
|
35
|
+
return {
|
|
36
|
+
name: value.$type,
|
|
37
|
+
valueJson: JSON.stringify(value),
|
|
38
|
+
}
|
|
39
|
+
})
|
|
38
40
|
const allPrefIdsInNamespace = allPrefs
|
|
39
41
|
.filter((pref) => prefMatchNamespace(namespace, pref.name))
|
|
40
42
|
.filter((pref) => prefAllowed(pref.name, opts))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export const PERSONAL_DETAILS_PREF = 'app.bsky.actor.defs#personalDetailsPref'
|
|
2
|
+
export const DECLARED_AGE_PREF = 'app.bsky.actor.defs#declaredAgePref'
|
|
3
|
+
|
|
4
|
+
const FULL_ACCESS_ONLY_PREFS = new Set([PERSONAL_DETAILS_PREF])
|
|
4
5
|
|
|
5
6
|
export type PrefAllowedOptions = {
|
|
6
7
|
hasAccessFull?: boolean
|
|
@@ -16,3 +17,20 @@ export function prefAllowed(
|
|
|
16
17
|
|
|
17
18
|
return !FULL_ACCESS_ONLY_PREFS.has(prefType)
|
|
18
19
|
}
|
|
20
|
+
|
|
21
|
+
const READ_ONLY_PREFS = new Set([DECLARED_AGE_PREF])
|
|
22
|
+
|
|
23
|
+
export function isReadOnlyPref(prefType: string) {
|
|
24
|
+
return READ_ONLY_PREFS.has(prefType)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function getAgeFromDatestring(birthDate: string): number {
|
|
28
|
+
const bday = new Date(birthDate)
|
|
29
|
+
const today = new Date()
|
|
30
|
+
let age = today.getFullYear() - bday.getFullYear()
|
|
31
|
+
const m = today.getMonth() - bday.getMonth()
|
|
32
|
+
if (m < 0 || (m === 0 && today.getDate() < bday.getDate())) {
|
|
33
|
+
age--
|
|
34
|
+
}
|
|
35
|
+
return age
|
|
36
|
+
}
|
|
@@ -58,13 +58,14 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
58
58
|
return {
|
|
59
59
|
encoding: 'application/json',
|
|
60
60
|
body: {
|
|
61
|
+
accessJwt,
|
|
62
|
+
refreshJwt,
|
|
63
|
+
|
|
61
64
|
did: user.did,
|
|
62
65
|
didDoc,
|
|
63
66
|
handle: user.handle ?? INVALID_HANDLE,
|
|
64
67
|
email: user.email ?? undefined,
|
|
65
68
|
emailConfirmed: !!user.emailConfirmedAt,
|
|
66
|
-
accessJwt,
|
|
67
|
-
refreshJwt,
|
|
68
69
|
active,
|
|
69
70
|
status,
|
|
70
71
|
},
|
|
@@ -51,10 +51,10 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
51
51
|
return {
|
|
52
52
|
encoding: 'application/json',
|
|
53
53
|
body: output(auth, {
|
|
54
|
-
handle: user.handle ?? INVALID_HANDLE,
|
|
55
54
|
did: user.did,
|
|
56
|
-
email: user.email ?? undefined,
|
|
57
55
|
didDoc,
|
|
56
|
+
handle: user.handle ?? INVALID_HANDLE,
|
|
57
|
+
email: user.email ?? undefined,
|
|
58
58
|
emailConfirmed: !!user.emailConfirmedAt,
|
|
59
59
|
active,
|
|
60
60
|
status,
|
|
@@ -50,11 +50,14 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
50
50
|
return {
|
|
51
51
|
encoding: 'application/json',
|
|
52
52
|
body: {
|
|
53
|
+
accessJwt: rotated.accessJwt,
|
|
54
|
+
refreshJwt: rotated.refreshJwt,
|
|
55
|
+
|
|
53
56
|
did: user.did,
|
|
54
57
|
didDoc,
|
|
55
58
|
handle: user.handle ?? INVALID_HANDLE,
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
email: user.email ?? undefined,
|
|
60
|
+
emailConfirmed: !!user.emailConfirmedAt,
|
|
58
61
|
active,
|
|
59
62
|
status,
|
|
60
63
|
},
|
package/src/lexicon/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ import * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.j
|
|
|
28
28
|
import * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js'
|
|
29
29
|
import * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js'
|
|
30
30
|
import * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js'
|
|
31
|
+
import * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'
|
|
31
32
|
import * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
|
|
32
33
|
import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
|
|
33
34
|
import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator.js'
|
|
@@ -678,6 +679,18 @@ export class AppBskyContactNS {
|
|
|
678
679
|
return this._server.xrpc.method(nsid, cfg)
|
|
679
680
|
}
|
|
680
681
|
|
|
682
|
+
sendNotification<A extends Auth = void>(
|
|
683
|
+
cfg: MethodConfigOrHandler<
|
|
684
|
+
A,
|
|
685
|
+
AppBskyContactSendNotification.QueryParams,
|
|
686
|
+
AppBskyContactSendNotification.HandlerInput,
|
|
687
|
+
AppBskyContactSendNotification.HandlerOutput
|
|
688
|
+
>,
|
|
689
|
+
) {
|
|
690
|
+
const nsid = 'app.bsky.contact.sendNotification' // @ts-ignore
|
|
691
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
692
|
+
}
|
|
693
|
+
|
|
681
694
|
startPhoneVerification<A extends Auth = void>(
|
|
682
695
|
cfg: MethodConfigOrHandler<
|
|
683
696
|
A,
|