import { w as PresentationLinkView, b as PdsProviderInfo } from './index-CTzpbW81.cjs'; /** * Types for the `id.sifa.getProfileView` XRPC query: the aggregated public * professional profile view served by a Sifa AppView. This is a curated public * projection, viewer-specific and internal fields are not included and hidden * items are omitted. Mirrors the `id.sifa.getProfileView` lexicon in * @singi-labs/sifa-lexicons. */ interface IndustryDomain { industry: string; domain?: string; } interface ProfileLocationView { rkey: string; type?: string; label?: string; isPrimary?: boolean; locationCountry?: string; locationRegion?: string; locationLocality?: string; countryCode?: string; location?: string; } interface PositionView { rkey: string; title: string; company?: string; companyDid?: string; entityRef?: string; entityName?: string; description?: string; employmentType?: string; onBehalfOf?: string; onBehalfOfDid?: string; onBehalfOfEntityRef?: string; /** Resolved name for the represented party. Render `onBehalfOf` when absent -- never the raw ref URI. */ onBehalfOfEntityName?: string; workplaceType?: string; locationCountry?: string; locationRegion?: string; locationLocality?: string; countryCode?: string; location?: string; startedAt?: string; endedAt?: string; primary?: boolean; skillRkeys?: string[]; } interface EducationView { rkey: string; institution?: string; institutionDid?: string; entityRef?: string; degree?: string; fieldOfStudy?: string; activities?: string; description?: string; startedAt?: string; endedAt?: string; } interface SkillView { rkey: string; name: string; category?: string; /** Freeform user-defined grouping label nested under `category` (#305). */ subCategory?: string; positionRkeys?: string[]; } interface CertificationView { rkey: string; name: string; issuingOrg?: string; entityRef?: string; issueDate?: string; expiryDate?: string; credentialUrl?: string; } interface ProjectView { rkey: string; name: string; description?: string; url?: string; startDate?: string; endDate?: string; members?: ProjectMemberView[]; /** AT-URI of the same project as recorded elsewhere, when this entry duplicates another. */ /** AT-URI of the same record on another person's profile, when they keep one. */ sameAs?: string; } /** A person named as a member of a project. Identity fields appear only once confirmed. */ interface ProjectMemberView { did: string; handle: string; displayName?: string; avatar?: string; confirmed?: boolean; confirmedStale?: boolean; role?: string; title?: string; } interface VolunteeringView { rkey: string; organization: string; entityRef?: string; role?: string; cause?: string; description?: string; startDate?: string; endDate?: string; } interface InvolvementLinkView { url: string; kind?: string; label?: string; verified?: boolean; verifiedPlatform?: string; } interface InvolvementView { rkey: string; kind?: string; upstream?: string; upstreamDid?: string; upstreamUrl?: string; role?: string; description?: string; startedAt?: string; endedAt?: string; links: InvolvementLinkView[]; legacy: boolean; /** Other people named on this involvement, hydrated from the stored DIDs. */ collaborators?: ProjectMemberView[]; /** AT-URI of the same involvement as recorded on another person's profile. */ sameAs?: string; } interface ContributorView { name: string; orcidId?: string; did?: string; handle?: string; } interface PublicationView { rkey: string; title: string; subtitle?: string; publisher?: string; date?: string; url?: string; description?: string; doi?: string; type?: string; typeLabel?: string; contributors?: ContributorView[]; verified: boolean; verifiedVia?: string; orcidCorroborated?: boolean; publicationUri?: string; publicationUrl?: string; publicationName?: string; image?: string; } interface CourseView { rkey: string; name: string; number?: string; institution?: string; entityRef?: string; credentialRkey?: string; } interface DurationView { minMinutes: number; maxMinutes?: number; } /** * A co-speaker on a presentation delivery. * * `displayName` and `avatar` are served only once `confirmed` is true. The * lexicon also declares an unlinked free-text `name`, which the AppView has * never emitted -- the record field is `format: did`, so there is nothing to * emit it from. */ interface CoSpeakerView { did?: string; handle?: string; displayName?: string; avatar?: string; hasSifaProfile?: boolean; confirmed?: boolean; confirmedStale?: boolean; name?: string; } interface PresentationDeliveryView { rkey: string; presentationRkey?: string; title?: string; role?: string; eventName?: string; date?: string; location?: string; locationCountry?: string; locationRegion?: string; locationLocality?: string; countryCode?: string; mode?: string; status?: string; links?: PresentationLinkView[]; eventUri?: string; coSpeakers?: CoSpeakerView[]; /** AT-URI of the same session as recorded on another person's profile. */ sameAs?: string; } interface PresentationView { rkey: string; title: string; description?: string; duration?: DurationView; intendedAudiences?: string[]; links?: PresentationLinkView[]; writeupUri?: string; coverImageUrl?: string; deliveries: PresentationDeliveryView[]; } interface HonorView { rkey: string; title: string; issuer?: string; entityRef?: string; description?: string; date?: string; } interface LanguageView { rkey: string; language: string; proficiency?: string; } interface ExternalAccountView { rkey: string; platform?: string; url: string; label?: string; feedUrl?: string; verifiable?: boolean; verified?: boolean; verifiedVia?: string; primary?: boolean; } interface ActiveAppView { id: string; name: string; category?: string; recentCount?: number; latestRecordAt?: string; } interface AtfundLinkView { url: string; label?: string; } /** Aggregated public professional profile view (`id.sifa.getProfileView#profileView`). */ interface ProfileView { did: string; handle: string; displayName?: string; givenName?: string; familyName?: string; avatar?: string; pronouns?: string; headline?: string; about?: string; industries?: IndustryDomain[]; locationCountry?: string; locationRegion?: string; locationLocality?: string; countryCode?: string; location?: string; locations?: ProfileLocationView[]; website?: string; openTo?: string[]; preferredWorkplace?: string[]; availableFromUtc?: number; availableToUtc?: number; langs?: string[]; createdAt?: string; positions?: PositionView[]; education?: EducationView[]; skills?: SkillView[]; certifications?: CertificationView[]; projects?: ProjectView[]; volunteering?: VolunteeringView[]; involvement?: InvolvementView[]; publications?: PublicationView[]; courses?: CourseView[]; presentations?: PresentationView[]; presentationDeliveries?: PresentationDeliveryView[]; honors?: HonorView[]; languages?: LanguageView[]; externalAccounts?: ExternalAccountView[]; atfundContribute?: AtfundLinkView; followersCount?: number; followingCount?: number; connectionsCount?: number; metInPersonCount?: number; atprotoFollowersCount?: number; blueskyVerified?: boolean; blueskyVerifiedAt?: string; activeApps?: ActiveAppView[]; pdsProvider?: PdsProviderInfo; claimed?: boolean; } /** * Adult-content gating for Bluesky activity items. * * Bluesky's official moderation labeler attaches content labels to * `app.bsky.feed.defs#postView.labels`. The four sex-and-violence labels * below are the ones we hide by default on Sifa: media is replaced with an * `` placeholder card in sifa-web. Authenticated * viewers can reveal per-card; anonymous viewers cannot. * * The list mirrors Bluesky's own globalLabelStrings; if the official set * grows (e.g. a new `extreme-violence` label), update this constant. * * Why a constant + predicate live in the SDK: the same logic needs to run * in sifa-web today and sifa-app tomorrow, and the API only forwards the * raw labels — the hide decision is a client concern. */ declare const ADULT_CONTENT_LABELS: readonly ["porn", "sexual", "nudity", "graphic-media"]; type AdultContentLabel = (typeof ADULT_CONTENT_LABELS)[number]; /** * A single label entry as emitted by `app.bsky.feed.defs#postView.labels`. * Matches `com.atproto.label.defs#label` (the on-wire shape after the AppView * resolves a `postView`). `neg: true` marks a retraction. */ interface ActivityLabel { val: string; src: string; uri: string; cts?: string; neg?: boolean; } /** * Return true if the item carries at least one adult-content label that is * not negated. Items without a `labels` field (every non-Bluesky source, * legacy responses) are treated as safe. */ declare function hasAdultContent(item: { labels?: ActivityLabel[]; }): boolean; /** * The buckets a repo data-management UI shows instead of raw collections. * * "id.sifa.profile.presentationDelivery" means nothing to someone who has never * heard of a lexicon. Grouping is the whole difference between a developer tool * and something a user can act on, so it lives here rather than in one app: the * web settings page and a future native app must agree on what a bucket holds, * or the same repo reads differently depending where you look at it. * * Ids only, no display strings -- copy is translated at the surface. */ type RepoGroupId = 'profile-basics' | 'work-history' | 'education' | 'skills-endorsements' | 'projects' | 'publications-talks' | 'people' | 'meetings' | 'other'; interface RepoGroupDefinition { id: RepoGroupId; /** Collections this bucket claims, in the order a UI should list them. */ collections: readonly string[]; } /** * Ordered so the buckets a user recognises come first and the machinery they * never think about (consents, access grants) comes last. * * `other` is deliberately absent: it is not a claim over a fixed set, it is * where anything unmapped lands. See {@link repoGroupForCollection}. */ declare const SIFA_REPO_GROUPS: readonly RepoGroupDefinition[]; /** * Which bucket a collection belongs to, or `other` when we have not mapped it. * * Unmapped falls through to a visible bucket rather than being filtered out. A * lexicon we mint later would otherwise be invisible on the one page whose job * is to show everything in the repo -- the user would be told their data is * accounted for while some of it was silently omitted. */ declare function repoGroupForCollection(collection: string): RepoGroupId; /** * One line of text identifying a record to the person who wrote it. * * Split into parts rather than one joined string: joining needs a connective * ("Senior Engineer at Acme") and a connective is copy, which is translated at * the surface. Every value here comes straight from the user's own record, so * the SDK contributes no language of its own. */ interface RepoRecordLabel { /** The record's own identifying text, or the collection leaf when it has none. */ primary: string; /** Employer, institution, event, or publisher, when the record names one. */ secondary?: string; /** The date the record is about, not when it was written. May be partial ("2021-03"). */ date?: string; /** * The person a record is about, for records whose meaning is a relationship * rather than text: endorsements, follows, confirmations, attestations. * * Kept out of {@link primary} so a surface can resolve it to a handle and * avatar without parsing a DID back out of display text. */ subjectDid?: string; /** * Handle and display name for {@link subjectDid}, when a surface resolved it. * * Records whose whole meaning is a relationship -- follows, meetings, * endorsements -- carry only a DID. A page listing 33 of them shows 33 * identical rows and a column of did:plc: strings, which is unusable for * deciding which one to remove. Resolution has to be batched by the caller, * so the SDK leaves room for the answer rather than fetching it. */ subjectHandle?: string; subjectName?: string; /** * Set when the record carried no readable text and {@link primary} is the * collection leaf rather than the user's own data. * * A surface must substitute its own wording for these -- a row reading * "follow" or "location" tells the reader nothing about which record they * are about to delete. The flag exists because the leaf is indistinguishable * from real content once it is a string: a headline that genuinely says * "location" must not be relabelled. */ isFallback?: true; } /** * Describe one record from the user's repo in terms they will recognise. * * Never throws and never returns an empty primary. This runs over whatever is * actually in the repo, including records written by older versions of Sifa and * records hand-edited elsewhere. A page that crashes on one malformed record * would hide the rest, which is exactly the data the user came to manage. */ declare function describeSifaRecord(collection: string, value: unknown): RepoRecordLabel; /** One record in the user's repo, reduced to what a management UI needs. */ interface RepoRecordSummary { /** Full AT-URI, the stable identity of the record. */ uri: string; /** Record key, the part a delete request names. */ rkey: string; collection: string; label: RepoRecordLabel; /** When the record was written, from its own `createdAt`. Absent if it has none. */ createdAt?: string; } /** One bucket of the inventory. Buckets the user has no records in are omitted. */ interface RepoCollectionGroup { id: RepoGroupId; /** Collections in this bucket the user actually has records in. */ collections: string[]; recordCount: number; records: RepoRecordSummary[]; } /** * What is in the user's repo under id.sifa.*, as their PDS reports it. * * Read from the PDS rather than the AppView. This is the one surface whose * entire purpose is to say what the user owns, so an index that has drifted -- * lagging the firehose, or holding records deleted elsewhere -- would be * lying about the thing the page exists to answer. */ interface RepoInventory { did: string; /** When the PDS was read, so a UI can say how fresh this is. */ fetchedAt: string; groups: RepoCollectionGroup[]; totalRecords: number; /** * Collections found in the repo that could not be listed. Their records are * missing from `groups`, so a UI must not present the inventory as complete. */ unreadableCollections?: string[]; } /** What happened to one record in a delete request. */ type RepoDeleteOutcome = /** The PDS confirmed the record is gone. */ 'deleted' /** The delete was attempted and the record is still there. */ | 'remaining' /** We could not establish either way. Not the same as `remaining`, and never success. */ | 'unknown'; interface RepoDeleteRecordResult { rkey: string; outcome: RepoDeleteOutcome; } /** * Result of a delete request. * * Carries no success flag of its own. The transport adds one meaning "the * request was accepted", which is not the same question: a request can be * accepted and still leave four of five records in place. What actually * happened to the data is in `results`, per record, and callers report that. */ interface RepoDeleteResult { collection: string; results: RepoDeleteRecordResult[]; /** * Set when the current OAuth grant cannot delete this collection, in which * case nothing was attempted. `scope` is the value to request. * * Present instead of a failure so a UI sends the user to consent rather than * telling them the delete failed for no stated reason. */ needsScopeUpgrade?: { scope: string; collections: string[]; }; } export { ADULT_CONTENT_LABELS as A, describeSifaRecord as B, type CertificationView as C, type DurationView as D, type EducationView as E, hasAdultContent as F, repoGroupForCollection as G, type HonorView as H, type IndustryDomain as I, type LanguageView as L, type PositionView as P, type RepoCollectionGroup as R, SIFA_REPO_GROUPS as S, type VolunteeringView as V, type ActiveAppView as a, type ActivityLabel as b, type AdultContentLabel as c, type AtfundLinkView as d, type CoSpeakerView as e, type ContributorView as f, type CourseView as g, type ExternalAccountView as h, type InvolvementLinkView as i, type InvolvementView as j, type PresentationDeliveryView as k, type PresentationView as l, type ProfileLocationView as m, type ProfileView as n, type ProjectMemberView as o, type ProjectView as p, type PublicationView as q, type RepoDeleteOutcome as r, type RepoDeleteRecordResult as s, type RepoDeleteResult as t, type RepoGroupDefinition as u, type RepoGroupId as v, type RepoInventory as w, type RepoRecordLabel as x, type RepoRecordSummary as y, type SkillView as z };