@atproto/bsky 0.0.202 → 0.0.204
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 +17 -0
- package/dist/api/age-assurance/const.d.ts.map +1 -1
- package/dist/api/age-assurance/const.js +40 -0
- package/dist/api/age-assurance/const.js.map +1 -1
- package/dist/api/app/bsky/contact/dismissMatch.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/dismissMatch.js +2 -3
- package/dist/api/app/bsky/contact/dismissMatch.js.map +1 -1
- package/dist/api/app/bsky/contact/getMatches.js +2 -3
- package/dist/api/app/bsky/contact/getMatches.js.map +1 -1
- package/dist/api/app/bsky/contact/getSyncStatus.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/getSyncStatus.js +2 -3
- package/dist/api/app/bsky/contact/getSyncStatus.js.map +1 -1
- package/dist/api/app/bsky/contact/importContacts.js +2 -3
- package/dist/api/app/bsky/contact/importContacts.js.map +1 -1
- package/dist/api/app/bsky/contact/removeData.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/removeData.js +2 -3
- package/dist/api/app/bsky/contact/removeData.js.map +1 -1
- package/dist/api/app/bsky/contact/sendNotification.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/sendNotification.js.map +1 -1
- package/dist/api/app/bsky/contact/startPhoneVerification.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/startPhoneVerification.js +2 -3
- package/dist/api/app/bsky/contact/startPhoneVerification.js.map +1 -1
- package/dist/api/app/bsky/contact/util.d.ts +7 -0
- package/dist/api/app/bsky/contact/util.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/util.js +68 -0
- package/dist/api/app/bsky/contact/util.js.map +1 -1
- package/dist/api/app/bsky/contact/verifyPhone.d.ts.map +1 -1
- package/dist/api/app/bsky/contact/verifyPhone.js +2 -3
- package/dist/api/app/bsky/contact/verifyPhone.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/hydration/actor.js +1 -1
- package/dist/hydration/actor.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +142 -52
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +93 -26
- package/dist/lexicon/lexicons.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/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/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 +8 -8
- package/proto/bsky.proto +1 -0
- package/src/api/age-assurance/const.ts +40 -0
- package/src/api/app/bsky/contact/dismissMatch.ts +7 -6
- package/src/api/app/bsky/contact/getMatches.ts +8 -7
- package/src/api/app/bsky/contact/getSyncStatus.ts +6 -5
- package/src/api/app/bsky/contact/importContacts.ts +8 -7
- package/src/api/app/bsky/contact/removeData.ts +6 -5
- package/src/api/app/bsky/contact/sendNotification.ts +2 -1
- package/src/api/app/bsky/contact/startPhoneVerification.ts +7 -6
- package/src/api/app/bsky/contact/util.ts +80 -1
- package/src/api/app/bsky/contact/verifyPhone.ts +8 -7
- package/src/api/index.ts +2 -0
- package/src/hydration/actor.ts +1 -1
- package/src/lexicon/lexicons.ts +94 -26
- 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/startPhoneVerification.ts +1 -1
- package/src/lexicon/types/app/bsky/contact/verifyPhone.ts +6 -1
- 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/dist/hydration/actor.js
CHANGED
|
@@ -130,7 +130,7 @@ class ActorHydrator {
|
|
|
130
130
|
async getNotificationDeclarations(uris, includeTakedowns = false) {
|
|
131
131
|
if (!uris.length)
|
|
132
132
|
return new util_1.HydrationMap();
|
|
133
|
-
const res = await this.dataplane.
|
|
133
|
+
const res = await this.dataplane.getNotificationDeclarationRecords({ uris });
|
|
134
134
|
return uris.reduce((acc, uri, i) => {
|
|
135
135
|
const record = (0, util_1.parseRecord)(res.records[i], includeTakedowns);
|
|
136
136
|
return acc.set(uri, record ?? null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor.js","sourceRoot":"","sources":["../../src/hydration/actor.ts"],"names":[],"mappings":";;;AACA,4CAA4C;AAO5C,iCAOe;AAkGf,MAAa,aAAa;IACxB,YAAmB,SAA0B;QAAjC;;;;mBAAO,SAAS;WAAiB;IAAG,CAAC;IAEjD,KAAK,CAAC,cAAc,CAAC,GAAkB;QACrC,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAA;QACrB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;YAChE,OAAO,IAAA,kBAAW,EAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAA;QACrC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;IAED,KAAK,CAAC,OAAO,CACX,YAAsB,EACtB,IAAyC;QAEzC,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAA;QACzE,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM;YACxB,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;gBACpC,OAAO;gBACP,oBAAoB,EAAE,IA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AAC,CAAC,CAAA;QAC7D,CAAC,EAAE,IAAI,mBAAY,EAAyC,CAAC,CAAA;IAC/D,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAc;QACvC,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,mBAAY,EAAc,CAAA;QACvD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;QAC/D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;YACjC,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;gBAClB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;gBACnC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;gBACjC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;aAC1C,CAAC,CAAA;QACJ,CAAC,EAAE,IAAI,mBAAY,EAAc,CAAC,CAAA;IACpC,CAAC;CACF;AAjSD,sCAiSC","sourcesContent":["import { AppBskyNotificationDeclaration } from '@atproto/api'\nimport { mapDefined } from '@atproto/common'\nimport { DataPlaneClient } from '../data-plane/client'\nimport { Record as ProfileRecord } from '../lexicon/types/app/bsky/actor/profile'\nimport { Record as StatusRecord } from '../lexicon/types/app/bsky/actor/status'\nimport { Record as NotificationDeclarationRecord } from '../lexicon/types/app/bsky/notification/declaration'\nimport { Record as ChatDeclarationRecord } from '../lexicon/types/chat/bsky/actor/declaration'\nimport { ActivitySubscription, VerificationMeta } from '../proto/bsky_pb'\nimport {\n HydrationMap,\n RecordInfo,\n isActivitySubscriptionEnabled,\n parseRecord,\n parseString,\n safeTakedownRef,\n} from './util'\n\ntype AllowActivitySubscriptions = Extract<\n AppBskyNotificationDeclaration.Record['allowSubscriptions'],\n 'followers' | 'mutuals' | 'none'\n>\n\nexport type Actor = {\n did: string\n handle?: string\n profile?: ProfileRecord\n profileCid?: string\n profileTakedownRef?: string\n sortedAt?: Date\n indexedAt?: Date\n takedownRef?: string\n isLabeler: boolean\n allowIncomingChatsFrom?: string\n upstreamStatus?: string\n createdAt?: Date\n priorityNotifications: boolean\n trustedVerifier?: boolean\n verifications: VerificationHydrationState[]\n status?: RecordInfo<StatusRecord>\n allowActivitySubscriptionsFrom: AllowActivitySubscriptions\n /**\n * Debug information for internal development\n */\n debug?: {\n pagerank?: number\n accountTags?: string[]\n profileTags?: string[]\n [key: string]: unknown\n }\n}\n\nexport type VerificationHydrationState = {\n issuer: string\n uri: string\n handle: string\n displayName: string\n createdAt: string\n}\n\nexport type VerificationMetaRequired = Required<VerificationMeta>\n\nexport type Actors = HydrationMap<Actor>\n\nexport type ChatDeclaration = RecordInfo<ChatDeclarationRecord>\n\nexport type ChatDeclarations = HydrationMap<ChatDeclaration>\nexport type NotificationDeclaration = RecordInfo<NotificationDeclarationRecord>\n\nexport type NotificationDeclarations = HydrationMap<NotificationDeclaration>\n\nexport type Status = RecordInfo<StatusRecord>\nexport type Statuses = HydrationMap<Status>\n\nexport type ProfileViewerState = {\n muted?: boolean\n mutedByList?: string\n blockedBy?: string\n blocking?: string\n blockedByList?: string\n blockingByList?: string\n following?: string\n followedBy?: string\n}\n\nexport type ProfileViewerStates = HydrationMap<ProfileViewerState>\n\ntype ActivitySubscriptionState = {\n post: boolean\n reply: boolean\n}\n\nexport type ActivitySubscriptionStates = HydrationMap<\n ActivitySubscriptionState | undefined\n>\n\ntype KnownFollowersState = {\n count: number\n followers: string[]\n}\n\nexport type KnownFollowersStates = HydrationMap<KnownFollowersState | undefined>\n\nexport type ProfileAgg = {\n followers: number\n follows: number\n posts: number\n lists: number\n feeds: number\n starterPacks: number\n}\n\nexport type ProfileAggs = HydrationMap<ProfileAgg>\n\nexport class ActorHydrator {\n constructor(public dataplane: DataPlaneClient) {}\n\n async getRepoRevSafe(did: string | null): Promise<string | null> {\n if (!did) return null\n try {\n const res = await this.dataplane.getLatestRev({ actorDid: did })\n return parseString(res.rev) ?? null\n } catch {\n return null\n }\n }\n\n async getDids(\n handleOrDids: string[],\n opts?: { lookupUnidirectional?: boolean },\n ): Promise<(string | undefined)[]> {\n const handles = handleOrDids.filter((actor) => !actor.startsWith('did:'))\n const res = handles.length\n ? await this.dataplane.getDidsByHandles({\n handles,\n lookupUnidirectional: opts?.lookupUnidirectional,\n })\n : { dids: [] }\n const didByHandle = handles.reduce(\n (acc, cur, i) => {\n const did = res.dids[i]\n if (did && did.length > 0) {\n return acc.set(cur, did)\n }\n return acc\n },\n new Map() as Map<string, string>,\n )\n return handleOrDids.map((id) =>\n id.startsWith('did:') ? id : didByHandle.get(id),\n )\n }\n\n async getDidsDefined(handleOrDids: string[]): Promise<string[]> {\n const res = await this.getDids(handleOrDids)\n // @ts-ignore\n return res.filter((did) => did !== undefined)\n }\n\n async getActors(\n dids: string[],\n opts: {\n includeTakedowns?: boolean\n skipCacheForDids?: string[]\n } = {},\n ): Promise<Actors> {\n const { includeTakedowns = false, skipCacheForDids } = opts\n if (!dids.length) return new HydrationMap<Actor>()\n const res = await this.dataplane.getActors({ dids, skipCacheForDids })\n return dids.reduce((acc, did, i) => {\n const actor = res.actors[i]\n const isNoHosted =\n actor.takenDown ||\n (actor.upstreamStatus && actor.upstreamStatus !== 'active')\n if (\n !actor.exists ||\n (isNoHosted && !includeTakedowns) ||\n !!actor.tombstonedAt\n ) {\n return acc.set(did, null)\n }\n\n const profile = actor.profile?.record\n ? parseRecord<ProfileRecord>(actor.profile, includeTakedowns)\n : undefined\n\n const status = actor.statusRecord\n ? parseRecord<StatusRecord>(actor.statusRecord, includeTakedowns)\n : undefined\n\n const verifications = mapDefined(\n Object.entries(actor.verifiedBy),\n ([actorDid, verificationMeta]) => {\n if (\n verificationMeta.handle &&\n verificationMeta.rkey &&\n verificationMeta.sortedAt\n ) {\n return {\n issuer: actorDid,\n uri: `at://${actorDid}/app.bsky.graph.verification/${verificationMeta.rkey}`,\n handle: verificationMeta.handle,\n displayName: verificationMeta.displayName,\n createdAt: verificationMeta.sortedAt.toDate().toISOString(),\n }\n }\n // Filter out the verification meta that doesn't contain all info.\n return undefined\n },\n )\n\n const allowActivitySubscriptionsFrom = (\n val: string,\n ): AllowActivitySubscriptions => {\n switch (val) {\n case 'followers':\n case 'mutuals':\n case 'none':\n return val\n default:\n // The dataplane should set the default of \"FOLLOWERS\". Just in case.\n return 'followers'\n }\n }\n\n const debug = {\n pagerank: actor.pagerank,\n accountTags: actor.tags,\n profileTags: actor.profileTags,\n }\n\n return acc.set(did, {\n did,\n handle: parseString(actor.handle),\n profile: profile?.record,\n profileCid: profile?.cid,\n profileTakedownRef: profile?.takedownRef,\n sortedAt: profile?.sortedAt,\n indexedAt: profile?.indexedAt,\n takedownRef: safeTakedownRef(actor),\n isLabeler: actor.labeler ?? false,\n allowIncomingChatsFrom: actor.allowIncomingChatsFrom || undefined,\n upstreamStatus: actor.upstreamStatus || undefined,\n createdAt: actor.createdAt?.toDate(),\n priorityNotifications: actor.priorityNotifications,\n trustedVerifier: actor.trustedVerifier,\n verifications,\n status: status,\n allowActivitySubscriptionsFrom: allowActivitySubscriptionsFrom(\n actor.allowActivitySubscriptionsFrom,\n ),\n debug,\n })\n }, new HydrationMap<Actor>())\n }\n\n async getChatDeclarations(\n uris: string[],\n includeTakedowns = false,\n ): Promise<ChatDeclarations> {\n if (!uris.length) return new HydrationMap<ChatDeclaration>()\n const res = await this.dataplane.getActorChatDeclarationRecords({ uris })\n return uris.reduce((acc, uri, i) => {\n const record = parseRecord<ChatDeclarationRecord>(\n res.records[i],\n includeTakedowns,\n )\n return acc.set(uri, record ?? null)\n }, new HydrationMap<ChatDeclaration>())\n }\n\n async getNotificationDeclarations(\n uris: string[],\n includeTakedowns = false,\n ): Promise<NotificationDeclarations> {\n if (!uris.length) return new HydrationMap<NotificationDeclaration>()\n const res = await this.dataplane.getActorChatDeclarationRecords({ uris })\n return uris.reduce((acc, uri, i) => {\n const record = parseRecord<NotificationDeclarationRecord>(\n res.records[i],\n includeTakedowns,\n )\n return acc.set(uri, record ?? null)\n }, new HydrationMap<NotificationDeclaration>())\n }\n\n async getStatus(uris: string[], includeTakedowns = false): Promise<Statuses> {\n if (!uris.length) return new HydrationMap<Status>()\n const res = await this.dataplane.getStatusRecords({ uris })\n return uris.reduce((acc, uri, i) => {\n const record = parseRecord<StatusRecord>(res.records[i], includeTakedowns)\n return acc.set(uri, record ?? null)\n }, new HydrationMap<Status>())\n }\n\n // \"naive\" because this method does not verify the existence of the list itself\n // a later check in the main hydrator will remove list uris that have been deleted or\n // repurposed to \"curate lists\"\n async getProfileViewerStatesNaive(\n dids: string[],\n viewer: string,\n ): Promise<ProfileViewerStates> {\n if (!dids.length) return new HydrationMap<ProfileViewerState>()\n const res = await this.dataplane.getRelationships({\n actorDid: viewer,\n targetDids: dids,\n })\n\n return dids.reduce((acc, did, i) => {\n const rels = res.relationships[i]\n if (viewer === did) {\n // ignore self-follows, self-mutes, self-blocks, self-activity-subscriptions\n return acc.set(did, {})\n }\n return acc.set(did, {\n muted: rels.muted ?? false,\n mutedByList: parseString(rels.mutedByList),\n blockedBy: parseString(rels.blockedBy),\n blocking: parseString(rels.blocking),\n blockedByList: parseString(rels.blockedByList),\n blockingByList: parseString(rels.blockingByList),\n following: parseString(rels.following),\n followedBy: parseString(rels.followedBy),\n })\n }, new HydrationMap<ProfileViewerState>())\n }\n\n async getKnownFollowers(\n dids: string[],\n viewer: string | null,\n ): Promise<KnownFollowersStates> {\n if (!viewer) return new HydrationMap<KnownFollowersState | undefined>()\n const { results: knownFollowersResults } = await this.dataplane\n .getFollowsFollowing(\n {\n actorDid: viewer,\n targetDids: dids,\n },\n {\n signal: AbortSignal.timeout(100),\n },\n )\n .catch(() => ({ results: [] }))\n return dids.reduce((acc, did, i) => {\n const result = knownFollowersResults[i]?.dids\n return acc.set(\n did,\n result && result.length > 0\n ? {\n count: result.length,\n followers: result.slice(0, 5),\n }\n : undefined,\n )\n }, new HydrationMap<KnownFollowersState | undefined>())\n }\n\n async getActivitySubscriptions(\n dids: string[],\n viewer: string | null,\n ): Promise<ActivitySubscriptionStates> {\n if (!viewer) {\n return new HydrationMap<ActivitySubscriptionState | undefined>()\n }\n\n const activitySubscription = (val: ActivitySubscription | undefined) => {\n if (!val) return undefined\n\n const result = {\n post: !!val.post,\n reply: !!val.reply,\n }\n if (!isActivitySubscriptionEnabled(result)) return undefined\n\n return result\n }\n\n const { subscriptions } = await this.dataplane\n .getActivitySubscriptionsByActorAndSubjects(\n { actorDid: viewer, subjectDids: dids },\n { signal: AbortSignal.timeout(100) },\n )\n .catch(() => ({ subscriptions: [] }))\n\n return dids.reduce((acc, did, i) => {\n return acc.set(did, activitySubscription(subscriptions[i]))\n }, new HydrationMap<ActivitySubscriptionState | undefined>())\n }\n\n async getProfileAggregates(dids: string[]): Promise<ProfileAggs> {\n if (!dids.length) return new HydrationMap<ProfileAgg>()\n const counts = await this.dataplane.getCountsForUsers({ dids })\n return dids.reduce((acc, did, i) => {\n return acc.set(did, {\n followers: counts.followers[i] ?? 0,\n follows: counts.following[i] ?? 0,\n posts: counts.posts[i] ?? 0,\n lists: counts.lists[i] ?? 0,\n feeds: counts.feeds[i] ?? 0,\n starterPacks: counts.starterPacks[i] ?? 0,\n })\n }, new HydrationMap<ProfileAgg>())\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"actor.js","sourceRoot":"","sources":["../../src/hydration/actor.ts"],"names":[],"mappings":";;;AACA,4CAA4C;AAO5C,iCAOe;AAkGf,MAAa,aAAa;IACxB,YAAmB,SAA0B;QAAjC;;;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AM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;gBACjC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;aAC1C,CAAC,CAAA;QACJ,CAAC,EAAE,IAAI,mBAAY,EAAc,CAAC,CAAA;IACpC,CAAC;CACF;AAjSD,sCAiSC","sourcesContent":["import { AppBskyNotificationDeclaration } from '@atproto/api'\nimport { mapDefined } from '@atproto/common'\nimport { DataPlaneClient } from '../data-plane/client'\nimport { Record as ProfileRecord } from '../lexicon/types/app/bsky/actor/profile'\nimport { Record as StatusRecord } from '../lexicon/types/app/bsky/actor/status'\nimport { Record as NotificationDeclarationRecord } from '../lexicon/types/app/bsky/notification/declaration'\nimport { Record as ChatDeclarationRecord } from '../lexicon/types/chat/bsky/actor/declaration'\nimport { ActivitySubscription, VerificationMeta } from '../proto/bsky_pb'\nimport {\n HydrationMap,\n RecordInfo,\n isActivitySubscriptionEnabled,\n parseRecord,\n parseString,\n safeTakedownRef,\n} from './util'\n\ntype AllowActivitySubscriptions = Extract<\n AppBskyNotificationDeclaration.Record['allowSubscriptions'],\n 'followers' | 'mutuals' | 'none'\n>\n\nexport type Actor = {\n did: string\n handle?: string\n profile?: ProfileRecord\n profileCid?: string\n profileTakedownRef?: string\n sortedAt?: Date\n indexedAt?: Date\n takedownRef?: string\n isLabeler: boolean\n allowIncomingChatsFrom?: string\n upstreamStatus?: string\n createdAt?: Date\n priorityNotifications: boolean\n trustedVerifier?: boolean\n verifications: VerificationHydrationState[]\n status?: RecordInfo<StatusRecord>\n allowActivitySubscriptionsFrom: AllowActivitySubscriptions\n /**\n * Debug information for internal development\n */\n debug?: {\n pagerank?: number\n accountTags?: string[]\n profileTags?: string[]\n [key: string]: unknown\n }\n}\n\nexport type VerificationHydrationState = {\n issuer: string\n uri: string\n handle: string\n displayName: string\n createdAt: string\n}\n\nexport type VerificationMetaRequired = Required<VerificationMeta>\n\nexport type Actors = HydrationMap<Actor>\n\nexport type ChatDeclaration = RecordInfo<ChatDeclarationRecord>\n\nexport type ChatDeclarations = HydrationMap<ChatDeclaration>\nexport type NotificationDeclaration = RecordInfo<NotificationDeclarationRecord>\n\nexport type NotificationDeclarations = HydrationMap<NotificationDeclaration>\n\nexport type Status = RecordInfo<StatusRecord>\nexport type Statuses = HydrationMap<Status>\n\nexport type ProfileViewerState = {\n muted?: boolean\n mutedByList?: string\n blockedBy?: string\n blocking?: string\n blockedByList?: string\n blockingByList?: string\n following?: string\n followedBy?: string\n}\n\nexport type ProfileViewerStates = HydrationMap<ProfileViewerState>\n\ntype ActivitySubscriptionState = {\n post: boolean\n reply: boolean\n}\n\nexport type ActivitySubscriptionStates = HydrationMap<\n ActivitySubscriptionState | undefined\n>\n\ntype KnownFollowersState = {\n count: number\n followers: string[]\n}\n\nexport type KnownFollowersStates = HydrationMap<KnownFollowersState | undefined>\n\nexport type ProfileAgg = {\n followers: number\n follows: number\n posts: number\n lists: number\n feeds: number\n starterPacks: number\n}\n\nexport type ProfileAggs = HydrationMap<ProfileAgg>\n\nexport class ActorHydrator {\n constructor(public dataplane: DataPlaneClient) {}\n\n async getRepoRevSafe(did: string | null): Promise<string | null> {\n if (!did) return null\n try {\n const res = await this.dataplane.getLatestRev({ actorDid: did })\n return parseString(res.rev) ?? null\n } catch {\n return null\n }\n }\n\n async getDids(\n handleOrDids: string[],\n opts?: { lookupUnidirectional?: boolean },\n ): Promise<(string | undefined)[]> {\n const handles = handleOrDids.filter((actor) => !actor.startsWith('did:'))\n const res = handles.length\n ? await this.dataplane.getDidsByHandles({\n handles,\n lookupUnidirectional: opts?.lookupUnidirectional,\n })\n : { dids: [] }\n const didByHandle = handles.reduce(\n (acc, cur, i) => {\n const did = res.dids[i]\n if (did && did.length > 0) {\n return acc.set(cur, did)\n }\n return acc\n },\n new Map() as Map<string, string>,\n )\n return handleOrDids.map((id) =>\n id.startsWith('did:') ? id : didByHandle.get(id),\n )\n }\n\n async getDidsDefined(handleOrDids: string[]): Promise<string[]> {\n const res = await this.getDids(handleOrDids)\n // @ts-ignore\n return res.filter((did) => did !== undefined)\n }\n\n async getActors(\n dids: string[],\n opts: {\n includeTakedowns?: boolean\n skipCacheForDids?: string[]\n } = {},\n ): Promise<Actors> {\n const { includeTakedowns = false, skipCacheForDids } = opts\n if (!dids.length) return new HydrationMap<Actor>()\n const res = await this.dataplane.getActors({ dids, skipCacheForDids })\n return dids.reduce((acc, did, i) => {\n const actor = res.actors[i]\n const isNoHosted =\n actor.takenDown ||\n (actor.upstreamStatus && actor.upstreamStatus !== 'active')\n if (\n !actor.exists ||\n (isNoHosted && !includeTakedowns) ||\n !!actor.tombstonedAt\n ) {\n return acc.set(did, null)\n }\n\n const profile = actor.profile?.record\n ? parseRecord<ProfileRecord>(actor.profile, includeTakedowns)\n : undefined\n\n const status = actor.statusRecord\n ? parseRecord<StatusRecord>(actor.statusRecord, includeTakedowns)\n : undefined\n\n const verifications = mapDefined(\n Object.entries(actor.verifiedBy),\n ([actorDid, verificationMeta]) => {\n if (\n verificationMeta.handle &&\n verificationMeta.rkey &&\n verificationMeta.sortedAt\n ) {\n return {\n issuer: actorDid,\n uri: `at://${actorDid}/app.bsky.graph.verification/${verificationMeta.rkey}`,\n handle: verificationMeta.handle,\n displayName: verificationMeta.displayName,\n createdAt: verificationMeta.sortedAt.toDate().toISOString(),\n }\n }\n // Filter out the verification meta that doesn't contain all info.\n return undefined\n },\n )\n\n const allowActivitySubscriptionsFrom = (\n val: string,\n ): AllowActivitySubscriptions => {\n switch (val) {\n case 'followers':\n case 'mutuals':\n case 'none':\n return val\n default:\n // The dataplane should set the default of \"FOLLOWERS\". Just in case.\n return 'followers'\n }\n }\n\n const debug = {\n pagerank: actor.pagerank,\n accountTags: actor.tags,\n profileTags: actor.profileTags,\n }\n\n return acc.set(did, {\n did,\n handle: parseString(actor.handle),\n profile: profile?.record,\n profileCid: profile?.cid,\n profileTakedownRef: profile?.takedownRef,\n sortedAt: profile?.sortedAt,\n indexedAt: profile?.indexedAt,\n takedownRef: safeTakedownRef(actor),\n isLabeler: actor.labeler ?? false,\n allowIncomingChatsFrom: actor.allowIncomingChatsFrom || undefined,\n upstreamStatus: actor.upstreamStatus || undefined,\n createdAt: actor.createdAt?.toDate(),\n priorityNotifications: actor.priorityNotifications,\n trustedVerifier: actor.trustedVerifier,\n verifications,\n status: status,\n allowActivitySubscriptionsFrom: allowActivitySubscriptionsFrom(\n actor.allowActivitySubscriptionsFrom,\n ),\n debug,\n })\n }, new HydrationMap<Actor>())\n }\n\n async getChatDeclarations(\n uris: string[],\n includeTakedowns = false,\n ): Promise<ChatDeclarations> {\n if (!uris.length) return new HydrationMap<ChatDeclaration>()\n const res = await this.dataplane.getActorChatDeclarationRecords({ uris })\n return uris.reduce((acc, uri, i) => {\n const record = parseRecord<ChatDeclarationRecord>(\n res.records[i],\n includeTakedowns,\n )\n return acc.set(uri, record ?? null)\n }, new HydrationMap<ChatDeclaration>())\n }\n\n async getNotificationDeclarations(\n uris: string[],\n includeTakedowns = false,\n ): Promise<NotificationDeclarations> {\n if (!uris.length) return new HydrationMap<NotificationDeclaration>()\n const res = await this.dataplane.getNotificationDeclarationRecords({ uris })\n return uris.reduce((acc, uri, i) => {\n const record = parseRecord<NotificationDeclarationRecord>(\n res.records[i],\n includeTakedowns,\n )\n return acc.set(uri, record ?? null)\n }, new HydrationMap<NotificationDeclaration>())\n }\n\n async getStatus(uris: string[], includeTakedowns = false): Promise<Statuses> {\n if (!uris.length) return new HydrationMap<Status>()\n const res = await this.dataplane.getStatusRecords({ uris })\n return uris.reduce((acc, uri, i) => {\n const record = parseRecord<StatusRecord>(res.records[i], includeTakedowns)\n return acc.set(uri, record ?? null)\n }, new HydrationMap<Status>())\n }\n\n // \"naive\" because this method does not verify the existence of the list itself\n // a later check in the main hydrator will remove list uris that have been deleted or\n // repurposed to \"curate lists\"\n async getProfileViewerStatesNaive(\n dids: string[],\n viewer: string,\n ): Promise<ProfileViewerStates> {\n if (!dids.length) return new HydrationMap<ProfileViewerState>()\n const res = await this.dataplane.getRelationships({\n actorDid: viewer,\n targetDids: dids,\n })\n\n return dids.reduce((acc, did, i) => {\n const rels = res.relationships[i]\n if (viewer === did) {\n // ignore self-follows, self-mutes, self-blocks, self-activity-subscriptions\n return acc.set(did, {})\n }\n return acc.set(did, {\n muted: rels.muted ?? false,\n mutedByList: parseString(rels.mutedByList),\n blockedBy: parseString(rels.blockedBy),\n blocking: parseString(rels.blocking),\n blockedByList: parseString(rels.blockedByList),\n blockingByList: parseString(rels.blockingByList),\n following: parseString(rels.following),\n followedBy: parseString(rels.followedBy),\n })\n }, new HydrationMap<ProfileViewerState>())\n }\n\n async getKnownFollowers(\n dids: string[],\n viewer: string | null,\n ): Promise<KnownFollowersStates> {\n if (!viewer) return new HydrationMap<KnownFollowersState | undefined>()\n const { results: knownFollowersResults } = await this.dataplane\n .getFollowsFollowing(\n {\n actorDid: viewer,\n targetDids: dids,\n },\n {\n signal: AbortSignal.timeout(100),\n },\n )\n .catch(() => ({ results: [] }))\n return dids.reduce((acc, did, i) => {\n const result = knownFollowersResults[i]?.dids\n return acc.set(\n did,\n result && result.length > 0\n ? {\n count: result.length,\n followers: result.slice(0, 5),\n }\n : undefined,\n )\n }, new HydrationMap<KnownFollowersState | undefined>())\n }\n\n async getActivitySubscriptions(\n dids: string[],\n viewer: string | null,\n ): Promise<ActivitySubscriptionStates> {\n if (!viewer) {\n return new HydrationMap<ActivitySubscriptionState | undefined>()\n }\n\n const activitySubscription = (val: ActivitySubscription | undefined) => {\n if (!val) return undefined\n\n const result = {\n post: !!val.post,\n reply: !!val.reply,\n }\n if (!isActivitySubscriptionEnabled(result)) return undefined\n\n return result\n }\n\n const { subscriptions } = await this.dataplane\n .getActivitySubscriptionsByActorAndSubjects(\n { actorDid: viewer, subjectDids: dids },\n { signal: AbortSignal.timeout(100) },\n )\n .catch(() => ({ subscriptions: [] }))\n\n return dids.reduce((acc, did, i) => {\n return acc.set(did, activitySubscription(subscriptions[i]))\n }, new HydrationMap<ActivitySubscriptionState | undefined>())\n }\n\n async getProfileAggregates(dids: string[]): Promise<ProfileAggs> {\n if (!dids.length) return new HydrationMap<ProfileAgg>()\n const counts = await this.dataplane.getCountsForUsers({ dids })\n return dids.reduce((acc, did, i) => {\n return acc.set(did, {\n followers: counts.followers[i] ?? 0,\n follows: counts.following[i] ?? 0,\n posts: counts.posts[i] ?? 0,\n lists: counts.lists[i] ?? 0,\n feeds: counts.feeds[i] ?? 0,\n starterPacks: counts.starterPacks[i] ?? 0,\n })\n }, new HydrationMap<ProfileAgg>())\n }\n}\n"]}
|
|
@@ -1695,7 +1695,7 @@ export declare const schemaDict: {
|
|
|
1695
1695
|
readonly defs: {
|
|
1696
1696
|
readonly main: {
|
|
1697
1697
|
readonly type: "procedure";
|
|
1698
|
-
readonly description: "
|
|
1698
|
+
readonly description: "Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.";
|
|
1699
1699
|
readonly input: {
|
|
1700
1700
|
readonly encoding: "application/json";
|
|
1701
1701
|
readonly schema: {
|
|
@@ -1718,8 +1718,9 @@ export declare const schemaDict: {
|
|
|
1718
1718
|
};
|
|
1719
1719
|
};
|
|
1720
1720
|
readonly errors: [{
|
|
1721
|
-
readonly name: "
|
|
1722
|
-
|
|
1721
|
+
readonly name: "InvalidDid";
|
|
1722
|
+
}, {
|
|
1723
|
+
readonly name: "InternalError";
|
|
1723
1724
|
}];
|
|
1724
1725
|
};
|
|
1725
1726
|
};
|
|
@@ -1730,7 +1731,7 @@ export declare const schemaDict: {
|
|
|
1730
1731
|
readonly defs: {
|
|
1731
1732
|
readonly main: {
|
|
1732
1733
|
readonly type: "query";
|
|
1733
|
-
readonly description: "
|
|
1734
|
+
readonly description: "Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.";
|
|
1734
1735
|
readonly parameters: {
|
|
1735
1736
|
readonly type: "params";
|
|
1736
1737
|
readonly properties: {
|
|
@@ -1765,8 +1766,13 @@ export declare const schemaDict: {
|
|
|
1765
1766
|
};
|
|
1766
1767
|
};
|
|
1767
1768
|
readonly errors: [{
|
|
1768
|
-
readonly name: "
|
|
1769
|
-
|
|
1769
|
+
readonly name: "InvalidDid";
|
|
1770
|
+
}, {
|
|
1771
|
+
readonly name: "InvalidLimit";
|
|
1772
|
+
}, {
|
|
1773
|
+
readonly name: "InvalidCursor";
|
|
1774
|
+
}, {
|
|
1775
|
+
readonly name: "InternalError";
|
|
1770
1776
|
}];
|
|
1771
1777
|
};
|
|
1772
1778
|
};
|
|
@@ -1777,7 +1783,7 @@ export declare const schemaDict: {
|
|
|
1777
1783
|
readonly defs: {
|
|
1778
1784
|
readonly main: {
|
|
1779
1785
|
readonly type: "query";
|
|
1780
|
-
readonly description: "
|
|
1786
|
+
readonly description: "Gets the user's current contact import status. Requires authentication.";
|
|
1781
1787
|
readonly parameters: {
|
|
1782
1788
|
readonly type: "params";
|
|
1783
1789
|
readonly properties: {};
|
|
@@ -1796,8 +1802,9 @@ export declare const schemaDict: {
|
|
|
1796
1802
|
};
|
|
1797
1803
|
};
|
|
1798
1804
|
readonly errors: [{
|
|
1799
|
-
readonly name: "
|
|
1800
|
-
|
|
1805
|
+
readonly name: "InvalidDid";
|
|
1806
|
+
}, {
|
|
1807
|
+
readonly name: "InternalError";
|
|
1801
1808
|
}];
|
|
1802
1809
|
};
|
|
1803
1810
|
};
|
|
@@ -1808,7 +1815,7 @@ export declare const schemaDict: {
|
|
|
1808
1815
|
readonly defs: {
|
|
1809
1816
|
readonly main: {
|
|
1810
1817
|
readonly type: "procedure";
|
|
1811
|
-
readonly description: "
|
|
1818
|
+
readonly description: "Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.";
|
|
1812
1819
|
readonly input: {
|
|
1813
1820
|
readonly encoding: "application/json";
|
|
1814
1821
|
readonly schema: {
|
|
@@ -1849,8 +1856,15 @@ export declare const schemaDict: {
|
|
|
1849
1856
|
};
|
|
1850
1857
|
};
|
|
1851
1858
|
readonly errors: [{
|
|
1852
|
-
readonly name: "
|
|
1853
|
-
|
|
1859
|
+
readonly name: "InvalidDid";
|
|
1860
|
+
}, {
|
|
1861
|
+
readonly name: "InvalidContacts";
|
|
1862
|
+
}, {
|
|
1863
|
+
readonly name: "TooManyContacts";
|
|
1864
|
+
}, {
|
|
1865
|
+
readonly name: "InvalidToken";
|
|
1866
|
+
}, {
|
|
1867
|
+
readonly name: "InternalError";
|
|
1854
1868
|
}];
|
|
1855
1869
|
};
|
|
1856
1870
|
};
|
|
@@ -1861,7 +1875,7 @@ export declare const schemaDict: {
|
|
|
1861
1875
|
readonly defs: {
|
|
1862
1876
|
readonly main: {
|
|
1863
1877
|
readonly type: "procedure";
|
|
1864
|
-
readonly description: "
|
|
1878
|
+
readonly description: "Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.";
|
|
1865
1879
|
readonly input: {
|
|
1866
1880
|
readonly encoding: "application/json";
|
|
1867
1881
|
readonly schema: {
|
|
@@ -1877,8 +1891,9 @@ export declare const schemaDict: {
|
|
|
1877
1891
|
};
|
|
1878
1892
|
};
|
|
1879
1893
|
readonly errors: [{
|
|
1880
|
-
readonly name: "
|
|
1881
|
-
|
|
1894
|
+
readonly name: "InvalidDid";
|
|
1895
|
+
}, {
|
|
1896
|
+
readonly name: "InternalError";
|
|
1882
1897
|
}];
|
|
1883
1898
|
};
|
|
1884
1899
|
};
|
|
@@ -1889,7 +1904,7 @@ export declare const schemaDict: {
|
|
|
1889
1904
|
readonly defs: {
|
|
1890
1905
|
readonly main: {
|
|
1891
1906
|
readonly type: "procedure";
|
|
1892
|
-
readonly description: "
|
|
1907
|
+
readonly description: "System endpoint to send notifications related to contact imports. Requires role authentication.";
|
|
1893
1908
|
readonly input: {
|
|
1894
1909
|
readonly encoding: "application/json";
|
|
1895
1910
|
readonly schema: {
|
|
@@ -1925,7 +1940,7 @@ export declare const schemaDict: {
|
|
|
1925
1940
|
readonly defs: {
|
|
1926
1941
|
readonly main: {
|
|
1927
1942
|
readonly type: "procedure";
|
|
1928
|
-
readonly description: "
|
|
1943
|
+
readonly description: "Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.";
|
|
1929
1944
|
readonly input: {
|
|
1930
1945
|
readonly encoding: "application/json";
|
|
1931
1946
|
readonly schema: {
|
|
@@ -1947,8 +1962,13 @@ export declare const schemaDict: {
|
|
|
1947
1962
|
};
|
|
1948
1963
|
};
|
|
1949
1964
|
readonly errors: [{
|
|
1950
|
-
readonly name: "
|
|
1951
|
-
|
|
1965
|
+
readonly name: "RateLimitExceeded";
|
|
1966
|
+
}, {
|
|
1967
|
+
readonly name: "InvalidDid";
|
|
1968
|
+
}, {
|
|
1969
|
+
readonly name: "InvalidPhone";
|
|
1970
|
+
}, {
|
|
1971
|
+
readonly name: "InternalError";
|
|
1952
1972
|
}];
|
|
1953
1973
|
};
|
|
1954
1974
|
};
|
|
@@ -1959,7 +1979,7 @@ export declare const schemaDict: {
|
|
|
1959
1979
|
readonly defs: {
|
|
1960
1980
|
readonly main: {
|
|
1961
1981
|
readonly type: "procedure";
|
|
1962
|
-
readonly description: "
|
|
1982
|
+
readonly description: "Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.";
|
|
1963
1983
|
readonly input: {
|
|
1964
1984
|
readonly encoding: "application/json";
|
|
1965
1985
|
readonly schema: {
|
|
@@ -1991,8 +2011,15 @@ export declare const schemaDict: {
|
|
|
1991
2011
|
};
|
|
1992
2012
|
};
|
|
1993
2013
|
readonly errors: [{
|
|
1994
|
-
readonly name: "
|
|
1995
|
-
|
|
2014
|
+
readonly name: "RateLimitExceeded";
|
|
2015
|
+
}, {
|
|
2016
|
+
readonly name: "InvalidDid";
|
|
2017
|
+
}, {
|
|
2018
|
+
readonly name: "InvalidPhone";
|
|
2019
|
+
}, {
|
|
2020
|
+
readonly name: "InvalidCode";
|
|
2021
|
+
}, {
|
|
2022
|
+
readonly name: "InternalError";
|
|
1996
2023
|
}];
|
|
1997
2024
|
};
|
|
1998
2025
|
};
|
|
@@ -12079,7 +12106,12 @@ export declare const schemaDict: {
|
|
|
12079
12106
|
readonly defs: {
|
|
12080
12107
|
readonly main: {
|
|
12081
12108
|
readonly type: "procedure";
|
|
12082
|
-
readonly description: "Delete the current session. Requires auth.";
|
|
12109
|
+
readonly description: "Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').";
|
|
12110
|
+
readonly errors: [{
|
|
12111
|
+
readonly name: "InvalidToken";
|
|
12112
|
+
}, {
|
|
12113
|
+
readonly name: "ExpiredToken";
|
|
12114
|
+
}];
|
|
12083
12115
|
};
|
|
12084
12116
|
};
|
|
12085
12117
|
};
|
|
@@ -12262,6 +12294,9 @@ export declare const schemaDict: {
|
|
|
12262
12294
|
readonly type: "string";
|
|
12263
12295
|
readonly format: "did";
|
|
12264
12296
|
};
|
|
12297
|
+
readonly didDoc: {
|
|
12298
|
+
readonly type: "unknown";
|
|
12299
|
+
};
|
|
12265
12300
|
readonly email: {
|
|
12266
12301
|
readonly type: "string";
|
|
12267
12302
|
};
|
|
@@ -12271,9 +12306,6 @@ export declare const schemaDict: {
|
|
|
12271
12306
|
readonly emailAuthFactor: {
|
|
12272
12307
|
readonly type: "boolean";
|
|
12273
12308
|
};
|
|
12274
|
-
readonly didDoc: {
|
|
12275
|
-
readonly type: "unknown";
|
|
12276
|
-
};
|
|
12277
12309
|
readonly active: {
|
|
12278
12310
|
readonly type: "boolean";
|
|
12279
12311
|
};
|
|
@@ -12363,6 +12395,15 @@ export declare const schemaDict: {
|
|
|
12363
12395
|
readonly didDoc: {
|
|
12364
12396
|
readonly type: "unknown";
|
|
12365
12397
|
};
|
|
12398
|
+
readonly email: {
|
|
12399
|
+
readonly type: "string";
|
|
12400
|
+
};
|
|
12401
|
+
readonly emailConfirmed: {
|
|
12402
|
+
readonly type: "boolean";
|
|
12403
|
+
};
|
|
12404
|
+
readonly emailAuthFactor: {
|
|
12405
|
+
readonly type: "boolean";
|
|
12406
|
+
};
|
|
12366
12407
|
readonly active: {
|
|
12367
12408
|
readonly type: "boolean";
|
|
12368
12409
|
};
|
|
@@ -12376,6 +12417,10 @@ export declare const schemaDict: {
|
|
|
12376
12417
|
};
|
|
12377
12418
|
readonly errors: [{
|
|
12378
12419
|
readonly name: "AccountTakedown";
|
|
12420
|
+
}, {
|
|
12421
|
+
readonly name: "InvalidToken";
|
|
12422
|
+
}, {
|
|
12423
|
+
readonly name: "ExpiredToken";
|
|
12379
12424
|
}];
|
|
12380
12425
|
};
|
|
12381
12426
|
};
|
|
@@ -15408,7 +15453,7 @@ export declare const schemas: ({
|
|
|
15408
15453
|
readonly defs: {
|
|
15409
15454
|
readonly main: {
|
|
15410
15455
|
readonly type: "procedure";
|
|
15411
|
-
readonly description: "
|
|
15456
|
+
readonly description: "Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.";
|
|
15412
15457
|
readonly input: {
|
|
15413
15458
|
readonly encoding: "application/json";
|
|
15414
15459
|
readonly schema: {
|
|
@@ -15431,8 +15476,9 @@ export declare const schemas: ({
|
|
|
15431
15476
|
};
|
|
15432
15477
|
};
|
|
15433
15478
|
readonly errors: [{
|
|
15434
|
-
readonly name: "
|
|
15435
|
-
|
|
15479
|
+
readonly name: "InvalidDid";
|
|
15480
|
+
}, {
|
|
15481
|
+
readonly name: "InternalError";
|
|
15436
15482
|
}];
|
|
15437
15483
|
};
|
|
15438
15484
|
};
|
|
@@ -15442,7 +15488,7 @@ export declare const schemas: ({
|
|
|
15442
15488
|
readonly defs: {
|
|
15443
15489
|
readonly main: {
|
|
15444
15490
|
readonly type: "query";
|
|
15445
|
-
readonly description: "
|
|
15491
|
+
readonly description: "Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.";
|
|
15446
15492
|
readonly parameters: {
|
|
15447
15493
|
readonly type: "params";
|
|
15448
15494
|
readonly properties: {
|
|
@@ -15477,8 +15523,13 @@ export declare const schemas: ({
|
|
|
15477
15523
|
};
|
|
15478
15524
|
};
|
|
15479
15525
|
readonly errors: [{
|
|
15480
|
-
readonly name: "
|
|
15481
|
-
|
|
15526
|
+
readonly name: "InvalidDid";
|
|
15527
|
+
}, {
|
|
15528
|
+
readonly name: "InvalidLimit";
|
|
15529
|
+
}, {
|
|
15530
|
+
readonly name: "InvalidCursor";
|
|
15531
|
+
}, {
|
|
15532
|
+
readonly name: "InternalError";
|
|
15482
15533
|
}];
|
|
15483
15534
|
};
|
|
15484
15535
|
};
|
|
@@ -15488,7 +15539,7 @@ export declare const schemas: ({
|
|
|
15488
15539
|
readonly defs: {
|
|
15489
15540
|
readonly main: {
|
|
15490
15541
|
readonly type: "query";
|
|
15491
|
-
readonly description: "
|
|
15542
|
+
readonly description: "Gets the user's current contact import status. Requires authentication.";
|
|
15492
15543
|
readonly parameters: {
|
|
15493
15544
|
readonly type: "params";
|
|
15494
15545
|
readonly properties: {};
|
|
@@ -15507,8 +15558,9 @@ export declare const schemas: ({
|
|
|
15507
15558
|
};
|
|
15508
15559
|
};
|
|
15509
15560
|
readonly errors: [{
|
|
15510
|
-
readonly name: "
|
|
15511
|
-
|
|
15561
|
+
readonly name: "InvalidDid";
|
|
15562
|
+
}, {
|
|
15563
|
+
readonly name: "InternalError";
|
|
15512
15564
|
}];
|
|
15513
15565
|
};
|
|
15514
15566
|
};
|
|
@@ -15518,7 +15570,7 @@ export declare const schemas: ({
|
|
|
15518
15570
|
readonly defs: {
|
|
15519
15571
|
readonly main: {
|
|
15520
15572
|
readonly type: "procedure";
|
|
15521
|
-
readonly description: "
|
|
15573
|
+
readonly description: "Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.";
|
|
15522
15574
|
readonly input: {
|
|
15523
15575
|
readonly encoding: "application/json";
|
|
15524
15576
|
readonly schema: {
|
|
@@ -15559,8 +15611,15 @@ export declare const schemas: ({
|
|
|
15559
15611
|
};
|
|
15560
15612
|
};
|
|
15561
15613
|
readonly errors: [{
|
|
15562
|
-
readonly name: "
|
|
15563
|
-
|
|
15614
|
+
readonly name: "InvalidDid";
|
|
15615
|
+
}, {
|
|
15616
|
+
readonly name: "InvalidContacts";
|
|
15617
|
+
}, {
|
|
15618
|
+
readonly name: "TooManyContacts";
|
|
15619
|
+
}, {
|
|
15620
|
+
readonly name: "InvalidToken";
|
|
15621
|
+
}, {
|
|
15622
|
+
readonly name: "InternalError";
|
|
15564
15623
|
}];
|
|
15565
15624
|
};
|
|
15566
15625
|
};
|
|
@@ -15570,7 +15629,7 @@ export declare const schemas: ({
|
|
|
15570
15629
|
readonly defs: {
|
|
15571
15630
|
readonly main: {
|
|
15572
15631
|
readonly type: "procedure";
|
|
15573
|
-
readonly description: "
|
|
15632
|
+
readonly description: "Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.";
|
|
15574
15633
|
readonly input: {
|
|
15575
15634
|
readonly encoding: "application/json";
|
|
15576
15635
|
readonly schema: {
|
|
@@ -15586,8 +15645,9 @@ export declare const schemas: ({
|
|
|
15586
15645
|
};
|
|
15587
15646
|
};
|
|
15588
15647
|
readonly errors: [{
|
|
15589
|
-
readonly name: "
|
|
15590
|
-
|
|
15648
|
+
readonly name: "InvalidDid";
|
|
15649
|
+
}, {
|
|
15650
|
+
readonly name: "InternalError";
|
|
15591
15651
|
}];
|
|
15592
15652
|
};
|
|
15593
15653
|
};
|
|
@@ -15597,7 +15657,7 @@ export declare const schemas: ({
|
|
|
15597
15657
|
readonly defs: {
|
|
15598
15658
|
readonly main: {
|
|
15599
15659
|
readonly type: "procedure";
|
|
15600
|
-
readonly description: "
|
|
15660
|
+
readonly description: "System endpoint to send notifications related to contact imports. Requires role authentication.";
|
|
15601
15661
|
readonly input: {
|
|
15602
15662
|
readonly encoding: "application/json";
|
|
15603
15663
|
readonly schema: {
|
|
@@ -15632,7 +15692,7 @@ export declare const schemas: ({
|
|
|
15632
15692
|
readonly defs: {
|
|
15633
15693
|
readonly main: {
|
|
15634
15694
|
readonly type: "procedure";
|
|
15635
|
-
readonly description: "
|
|
15695
|
+
readonly description: "Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.";
|
|
15636
15696
|
readonly input: {
|
|
15637
15697
|
readonly encoding: "application/json";
|
|
15638
15698
|
readonly schema: {
|
|
@@ -15654,8 +15714,13 @@ export declare const schemas: ({
|
|
|
15654
15714
|
};
|
|
15655
15715
|
};
|
|
15656
15716
|
readonly errors: [{
|
|
15657
|
-
readonly name: "
|
|
15658
|
-
|
|
15717
|
+
readonly name: "RateLimitExceeded";
|
|
15718
|
+
}, {
|
|
15719
|
+
readonly name: "InvalidDid";
|
|
15720
|
+
}, {
|
|
15721
|
+
readonly name: "InvalidPhone";
|
|
15722
|
+
}, {
|
|
15723
|
+
readonly name: "InternalError";
|
|
15659
15724
|
}];
|
|
15660
15725
|
};
|
|
15661
15726
|
};
|
|
@@ -15665,7 +15730,7 @@ export declare const schemas: ({
|
|
|
15665
15730
|
readonly defs: {
|
|
15666
15731
|
readonly main: {
|
|
15667
15732
|
readonly type: "procedure";
|
|
15668
|
-
readonly description: "
|
|
15733
|
+
readonly description: "Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.";
|
|
15669
15734
|
readonly input: {
|
|
15670
15735
|
readonly encoding: "application/json";
|
|
15671
15736
|
readonly schema: {
|
|
@@ -15697,8 +15762,15 @@ export declare const schemas: ({
|
|
|
15697
15762
|
};
|
|
15698
15763
|
};
|
|
15699
15764
|
readonly errors: [{
|
|
15700
|
-
readonly name: "
|
|
15701
|
-
|
|
15765
|
+
readonly name: "RateLimitExceeded";
|
|
15766
|
+
}, {
|
|
15767
|
+
readonly name: "InvalidDid";
|
|
15768
|
+
}, {
|
|
15769
|
+
readonly name: "InvalidPhone";
|
|
15770
|
+
}, {
|
|
15771
|
+
readonly name: "InvalidCode";
|
|
15772
|
+
}, {
|
|
15773
|
+
readonly name: "InternalError";
|
|
15702
15774
|
}];
|
|
15703
15775
|
};
|
|
15704
15776
|
};
|
|
@@ -25598,7 +25670,12 @@ export declare const schemas: ({
|
|
|
25598
25670
|
readonly defs: {
|
|
25599
25671
|
readonly main: {
|
|
25600
25672
|
readonly type: "procedure";
|
|
25601
|
-
readonly description: "Delete the current session. Requires auth.";
|
|
25673
|
+
readonly description: "Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').";
|
|
25674
|
+
readonly errors: [{
|
|
25675
|
+
readonly name: "InvalidToken";
|
|
25676
|
+
}, {
|
|
25677
|
+
readonly name: "ExpiredToken";
|
|
25678
|
+
}];
|
|
25602
25679
|
};
|
|
25603
25680
|
};
|
|
25604
25681
|
} | {
|
|
@@ -25777,6 +25854,9 @@ export declare const schemas: ({
|
|
|
25777
25854
|
readonly type: "string";
|
|
25778
25855
|
readonly format: "did";
|
|
25779
25856
|
};
|
|
25857
|
+
readonly didDoc: {
|
|
25858
|
+
readonly type: "unknown";
|
|
25859
|
+
};
|
|
25780
25860
|
readonly email: {
|
|
25781
25861
|
readonly type: "string";
|
|
25782
25862
|
};
|
|
@@ -25786,9 +25866,6 @@ export declare const schemas: ({
|
|
|
25786
25866
|
readonly emailAuthFactor: {
|
|
25787
25867
|
readonly type: "boolean";
|
|
25788
25868
|
};
|
|
25789
|
-
readonly didDoc: {
|
|
25790
|
-
readonly type: "unknown";
|
|
25791
|
-
};
|
|
25792
25869
|
readonly active: {
|
|
25793
25870
|
readonly type: "boolean";
|
|
25794
25871
|
};
|
|
@@ -25876,6 +25953,15 @@ export declare const schemas: ({
|
|
|
25876
25953
|
readonly didDoc: {
|
|
25877
25954
|
readonly type: "unknown";
|
|
25878
25955
|
};
|
|
25956
|
+
readonly email: {
|
|
25957
|
+
readonly type: "string";
|
|
25958
|
+
};
|
|
25959
|
+
readonly emailConfirmed: {
|
|
25960
|
+
readonly type: "boolean";
|
|
25961
|
+
};
|
|
25962
|
+
readonly emailAuthFactor: {
|
|
25963
|
+
readonly type: "boolean";
|
|
25964
|
+
};
|
|
25879
25965
|
readonly active: {
|
|
25880
25966
|
readonly type: "boolean";
|
|
25881
25967
|
};
|
|
@@ -25889,6 +25975,10 @@ export declare const schemas: ({
|
|
|
25889
25975
|
};
|
|
25890
25976
|
readonly errors: [{
|
|
25891
25977
|
readonly name: "AccountTakedown";
|
|
25978
|
+
}, {
|
|
25979
|
+
readonly name: "InvalidToken";
|
|
25980
|
+
}, {
|
|
25981
|
+
readonly name: "ExpiredToken";
|
|
25892
25982
|
}];
|
|
25893
25983
|
};
|
|
25894
25984
|
};
|