@singi-labs/sifa-sdk 0.19.88 → 0.19.90
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/dist/{follow-profile-CcMgQDsh.d.ts → follow-profile-CVcA2w1v.d.ts} +1 -1
- package/dist/{follow-profile-D3zDoDll.d.cts → follow-profile-CgLLLQtJ.d.cts} +1 -1
- package/dist/{index-LxGL5I-J.d.ts → index-BEAuoL6l.d.ts} +1 -1
- package/dist/{index-C2n-GjH2.d.cts → index-DU0pYHch.d.cts} +1 -1
- package/dist/index.cjs +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.d.cts +2 -2
- package/dist/jsonld/index.d.ts +2 -2
- package/dist/{network-map-k2QxGpGf.d.ts → network-map-Bx5ohCEV.d.ts} +4 -4
- package/dist/{network-map-CFZx_xXE.d.cts → network-map-D39CQj9J.d.cts} +4 -4
- package/dist/{profile-summary-CwJD0-wo.d.cts → profile-summary-D56VII1x.d.cts} +1 -1
- package/dist/{profile-summary-2pFtukEK.d.ts → profile-summary-DPNTzeDv.d.ts} +1 -1
- package/dist/query/fetchers/index.d.cts +8 -8
- package/dist/query/fetchers/index.d.ts +8 -8
- package/dist/query/hooks/index.d.cts +6 -6
- package/dist/query/hooks/index.d.ts +6 -6
- package/dist/query/index.d.cts +11 -11
- package/dist/query/index.d.ts +11 -11
- package/dist/resume/export-contact.js +57 -0
- package/dist/resume/export-contact.js.map +1 -0
- package/dist/resume/funder-cv.js +3 -2
- package/dist/resume/funder-cv.js.map +1 -1
- package/dist/resume/index.cjs +63 -3
- package/dist/resume/index.cjs.map +1 -1
- package/dist/resume/index.d.cts +90 -5
- package/dist/resume/index.d.ts +90 -5
- package/dist/resume/index.js +12 -0
- package/dist/resume/index.js.map +1 -1
- package/dist/resume/json-resume.js +8 -1
- package/dist/resume/json-resume.js.map +1 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +2 -2
- package/dist/schemas/index.d.ts +2 -2
- package/dist/taxonomy/index.js +6 -2
- package/dist/taxonomy/index.js.map +1 -1
- package/dist/taxonomy/verification-providers.js +19 -1
- package/dist/taxonomy/verification-providers.js.map +1 -1
- package/dist/tokens/colors.js +6 -1
- package/dist/tokens/colors.js.map +1 -1
- package/dist/tokens/index.cjs +5 -0
- package/dist/tokens/index.cjs.map +1 -1
- package/dist/tokens/index.d.cts +17 -1
- package/dist/tokens/index.d.ts +17 -1
- package/dist/tokens/index.js +3 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/{types-CICITVJa.d.ts → types-BqxbmLY6.d.ts} +2 -2
- package/dist/{types-DkrZo5eF.d.cts → types-Dd7UMXIz.d.cts} +2 -2
- package/dist/{use-user-settings-Azxf51V9.d.cts → use-user-settings-CBH1CeDP.d.cts} +4 -4
- package/dist/{use-user-settings-DQNz9PYA.d.ts → use-user-settings-CFhaGcAq.d.ts} +4 -4
- package/dist/{user-settings-BDZ9i-Pk.d.cts → user-settings-ChPm0BFN.d.cts} +4 -4
- package/dist/{user-settings-DvqRXhdC.d.ts → user-settings-D1zKOWa2.d.ts} +4 -4
- package/dist/{verification-providers-BPdY3KyH.d.cts → verification-providers-DeyGqaoC.d.cts} +24 -4
- package/dist/{verification-providers-BPdY3KyH.d.ts → verification-providers-DeyGqaoC.d.ts} +24 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/blob-ref.ts","../../src/schemas/shared.ts","../../src/schemas/endorsement-confirmation.ts","../../src/schemas/entity.ts","../../src/schemas/endorsement.ts","../../src/schemas/confirmation.ts","../../src/schemas/org-profile.ts","../../src/schemas/org-employment-attestation.ts","../../src/schemas/employment-verification.ts","../../src/schemas/graph-follow.ts","../../src/taxonomy/verification-providers.ts","../../src/schemas/follow-profile.ts","../../src/schemas/feed.ts","../../src/schemas/profile-certification.ts","../../src/schemas/profile-course.ts","../../src/schemas/profile-education.ts","../../src/schemas/profile-external-account.ts","../../src/schemas/profile-honor.ts","../../src/schemas/profile-project.ts","../../src/schemas/profile-involvement.ts","../../src/schemas/profile-language.ts","../../src/schemas/profile-position.ts","../../src/schemas/profile-presentation.ts","../../src/schemas/profile-presentation-delivery.ts","../../src/schemas/profile-publication.ts","../../src/schemas/profile-self.ts","../../src/schemas/profile-skill.ts","../../src/schemas/profile-volunteering.ts","../../src/schemas/profile-investment.ts"],"names":["z","entityRefField"],"mappings":";;;;;AAQO,IAAM,aAAA,GAAgBA,MAAE,MAAA,CAAO;AAAA,EACpC,KAAA,EAAOA,KAAA,CAAE,OAAA,CAAQ,MAAM,CAAA;AAAA,EACvB,GAAA,EAAKA,KAAA,CAAE,MAAA,CAAO,EAAE,KAAA,EAAOA,KAAA,CAAE,MAAA,EAAO,CAAE,GAAA,CAAI,CAAC,CAAA,EAAG,CAAA;AAAA,EAC1C,QAAA,EAAUA,MAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA,CAAE,IAAI,GAAG,CAAA;AAAA,EACnC,MAAMA,KAAA,CAAE,MAAA,EAAO,CAAE,GAAA,GAAM,WAAA;AACzB,CAAC;ACJM,SAAS,aAAa,GAAA,EAAa;AACxC,EAAA,OAAO,CAAC,KAAA,KAA2B;AACjC,IAAA,MAAM,SAAA,GAAY,IAAI,IAAA,CAAK,SAAA,CAAU,QAAW,EAAE,WAAA,EAAa,YAAY,CAAA;AAC3E,IAAA,IAAI,KAAA,GAAQ,CAAA;AACZ,IAAA,KAAA,MAAW,CAAA,IAAK,SAAA,CAAU,OAAA,CAAQ,KAAK,CAAA,EAAG;AACxC,MAAA,KAAA,EAAA;AACA,MAAA,IAAI,KAAA,GAAQ,KAAK,OAAO,KAAA;AAAA,IAC1B;AACA,IAAA,OAAO,IAAA;AAAA,EACT,CAAA;AACF;AAGO,IAAM,YAAYA,KAAAA,CAAE,MAAA,EAAO,CAA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CAAA;AAAA,EAC7D,UAAA,EAAY,UAAU,QAAA,EAAS;AAAA,EAC/B,SAAA,EAAWC,eAAAA;AAAA,EACX,IAAA,EAAMD,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC1B,KAAA,EAAOA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC3B,MAAA,EAAQA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAE5B,GAAA,EAAKA,KAAAA,CAAE,MAAA,EAAO,CAAE,MAAA,CAAO,YAAA,CAAa,GAAG,CAAC,CAAA,CAAE,GAAA,CAAI,IAAI,CAAA,CAAE,QAAA,EAAS;AAAA,EAC7D,MAAA,EAAQ,UAAU,QAAA,EAAS;AAAA,EAC3B,YAAA,EAAcC,eAAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKd,MAAA,EAAQ,uBAAuB,QAAA,EAAS;AAAA,EACxC,SAAA,EAAW,kBAAkB,QAAA,EAAS;AAAA,EACtC,OAAA,EAAS,kBAAkB,QAAA,EAAS;AAAA,EACpC,WAAA,EAAaD,KAAAA,CAAE,MAAA,EAAO,CAAE,MAAA,CAAO,YAAA,CAAa,GAAI,CAAC,CAAA,CAAE,GAAA,CAAI,GAAK,CAAA,CAAE,QAAA,EAAS;AAAA,EACvE,KAAA,EAAOA,MAAE,KAAA,CAAM,kBAAkB,EAAE,GAAA,CAAI,EAAE,EAAE,QAAA,EAAS;AAAA,EACpD,MAAA,EAAQ,iBAAiB,QAAA,EAAS;AAAA,EAClC,SAAA,EAAW;AACb,CAAC,EACA,WAAA","file":"index.cjs","sourcesContent":["import { z } from 'zod';\n\n/**\n * Blob-ref passthrough shared by records that carry an uploaded blob (org logo,\n * presentation cover image, ...). Mirrors the `blobRefSchema` validated by the\n * sifa-api write endpoints -- the shape is validated, then written to the PDS\n * verbatim.\n */\nexport const BlobRefSchema = z.object({\n $type: z.literal('blob'),\n ref: z.object({ $link: z.string().min(1) }),\n mimeType: z.string().min(1).max(255),\n size: z.number().int().nonnegative(),\n});\n\nexport type BlobRef = z.infer<typeof BlobRefSchema>;\n","import { z } from 'zod';\n\n/**\n * Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`\n * constraint. JS strings are sequences of UTF-16 code units, but lexicon\n * `maxGraphemes` counts user-perceived characters (grapheme clusters), so\n * emoji sequences, regional indicators, ZWJ joins, and combining marks all\n * count as one unit each. We use `Intl.Segmenter` to enforce this correctly.\n */\nexport function maxGraphemes(max: number) {\n return (value: string): boolean => {\n const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });\n let count = 0;\n for (const _ of segmenter.segment(value)) {\n count++;\n if (count > max) return false;\n }\n return true;\n };\n}\n\n/** Decentralized identifier, AT Protocol `format: did`. */\nexport const didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, 'Invalid DID');\n\n/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */\nexport const datetimeSchema = z.string().datetime({ offset: true });\n\n/**\n * Freeform calendar date for user-facing profile dates (start/end, issued,\n * completed, awarded, published, etc.). Accepts a bare year, year-month,\n * year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps\n * through on backfill without loss). NOT strict `datetime` -- users typically\n * remember only month/year, and LinkedIn-importer writes carry partial dates,\n * so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record\n * metadata like `createdAt` stays on `datetimeSchema`.\n */\nexport const partialDateSchema = z\n .string()\n .regex(/^\\d{4}(-\\d{2}(-\\d{2}(T.+)?)?)?$/, 'Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime');\n\n/** Generic AT-URI, AT Protocol `format: at-uri`. */\nexport const atUriSchema = z.string().regex(/^at:\\/\\/[^\\s]+$/, 'Invalid AT-URI');\n\n/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */\nexport const cidSchema = z\n .string()\n .regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, 'Invalid CID');\n\n/** BCP 47 language tag, AT Protocol `format: language`. */\nexport const languageTagSchema = z\n .string()\n .regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, 'Invalid BCP 47 language tag');\n\n/** Generic URI, AT Protocol `format: uri`. */\nexport const uriSchema = z.string().url();\n\n/**\n * StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both\n * AT-URI (identity) and CID (version).\n */\nexport const strongRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema,\n});\n\n/**\n * Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors\n * `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable\n * records in the same user's repo, so the reference resolves live and tracks\n * edits to the target.\n */\nexport const skillRefSchema = z.object({\n uri: atUriSchema,\n});\n\n/**\n * Reference to a record by AT-URI, with an optional CID. Mirrors\n * `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:\n * consumers resolve the AT-URI live so the reference tracks edits to the\n * target, and the CID is a best-effort integrity hint only.\n */\nexport const externalRecordRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema.optional(),\n});\n\n/**\n * Shared reference to an organization or person named by a record. Mirrors\n * `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured\n * when the record was saved; `did` and `entityRef` are the durable identity and\n * should be resolved live. `name` is required so an empty object cannot validate\n * as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a\n * newer schema will define, and dropping them on a round-trip would silently\n * lose data.\n */\nexport const agentRefSchema = z\n .object({\n name: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n did: didSchema.optional(),\n entityRef: uriSchema.optional(),\n })\n .passthrough();\n\nexport type AgentRef = z.infer<typeof agentRefSchema>;\n\n/**\n * Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled\n * permissively because clients rarely construct this directly; the AppView\n * handles label validation.\n */\nexport const selfLabelsSchema = z.object({\n $type: z.literal('com.atproto.label.defs#selfLabels').optional(),\n values: z.array(z.object({ val: z.string() })),\n});\n","import { z } from 'zod';\n\nimport { datetimeSchema, strongRefSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.endorsement.confirmation` records.\n * Lives in the endorsee's PDS to approve display of an endorsement.\n */\nexport const EndorsementConfirmationRecordSchema = z.object({\n endorsement: strongRefSchema,\n /**\n * Skill record this endorsement applies to. Set when the endorsement proposed\n * a skill: the subject creates the record and links it here, because the\n * endorser cannot write to the subject's repository. Also set when a proposed\n * name matched a skill the subject already had.\n */\n skill: strongRefSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type EndorsementConfirmationRecord = z.infer<typeof EndorsementConfirmationRecordSchema>;\n","import { z } from 'zod';\n\n/**\n * Organization entity-resolution payloads (#159). Shared by the typeahead,\n * selection, and grow-on-demand import-search endpoints on sifa-api.\n */\n\n/**\n * A nullable string constrained to an http(s) URL. Rejects `javascript:` and\n * other script-bearing schemes at the SDK boundary so a hostile API response\n * cannot smuggle an XSS payload into a rendered `href`/`src`. Note: Wikidata\n * entity URIs are canonically `http://`, so both http and https are allowed.\n */\nconst httpUrlNullable = z\n .string()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'must be an http(s) URL' })\n .nullable();\n\nconst searchResultCommon = {\n kind: z.string(),\n name: z.string(),\n domain: z.string().nullable(),\n country: z.string().nullable(),\n logoUrl: httpUrlNullable,\n parentName: z.string().nullable(),\n};\n\n/**\n * A single typeahead row. Discriminated on `source`: a curated `entity` row\n * carries `entityId`, a `pdl` staging row carries `pdlId`. The union guarantees\n * the identifier for the row's source is always present, so a stable React key\n * can never be `entity:undefined`. The disambiguation fields\n * (domain/country/parentName) drive the dropdown display.\n */\nexport const EntitySearchResultSchema = z.discriminatedUnion('source', [\n z.object({\n source: z.literal('entity'),\n entityId: z.number().int().positive(),\n ...searchResultCommon,\n }),\n z.object({\n source: z.literal('pdl'),\n pdlId: z.string().min(1),\n ...searchResultCommon,\n }),\n]);\nexport type EntitySearchResult = z.infer<typeof EntitySearchResultSchema>;\n\n/** Response of `GET /api/entities/search`. */\nexport const EntitySearchResponseSchema = z.object({\n results: z.array(EntitySearchResultSchema),\n hasMore: z.boolean(),\n});\nexport type EntitySearchResponse = z.infer<typeof EntitySearchResponseSchema>;\n\n/**\n * Body of `POST /api/entities/select`: promote a PDL row OR bump an entity.\n * Exactly one of `entityId`/`pdlId` must be present -- supplying both is\n * ambiguous (the server would have to silently pick one) and is rejected.\n */\nexport const EntitySelectRequestSchema = z\n .object({\n entityId: z.number().int().positive().optional(),\n pdlId: z.string().min(1).optional(),\n })\n .refine((v) => (v.entityId != null) !== (v.pdlId != null), {\n message: 'exactly one of entityId or pdlId is required',\n });\nexport type EntitySelectRequest = z.infer<typeof EntitySelectRequestSchema>;\n\n/** Response of `POST /api/entities/select`. `entityRef` is the portable\n * Wikidata/ROR/LEI URI to write to the position record, or null for a\n * PDL-only entity (its resolution stays AppView-side). */\nexport const EntitySelectResponseSchema = z.object({\n entityId: z.number().int().positive(),\n slug: z.string(),\n kind: z.string(),\n canonicalName: z.string(),\n domain: z.string().nullable(),\n /**\n * The entity's website, gated to sources trustworthy enough to prefill into a\n * record the user signs. Narrower than `domain`, which is a display value and\n * may come from a crawl. Null when the entity has no such source.\n */\n website: httpUrlNullable.default(null),\n /** Which tier `website` came from. Crawled is never an accepted source. */\n websiteTier: z.enum(['org', 'curated']).nullable().default(null),\n entityRef: httpUrlNullable,\n});\nexport type EntitySelectResponse = z.infer<typeof EntitySelectResponseSchema>;\n\n/** Response of `POST /api/entities/import-search`. */\nexport const EntityImportSearchResponseSchema = z.object({\n results: z.array(EntitySearchResultSchema),\n});\nexport type EntityImportSearchResponse = z.infer<typeof EntityImportSearchResponseSchema>;\n\n/**\n * Body of the domain grow-on-demand endpoints (`POST /api/entities/resolve-domain`\n * and `POST /api/entities/mint-domain`). The server re-validates the value as a\n * registrable domain; 253 is the max DNS name length.\n */\nexport const EntityResolveDomainRequestSchema = z.object({\n domain: z.string().min(1).max(253),\n});\nexport type EntityResolveDomainRequest = z.infer<typeof EntityResolveDomainRequestSchema>;\n\n/**\n * Response of `POST /api/entities/resolve-domain` (grow-on-demand Branch 1). Any\n * notable companies whose official website is the domain, imported from Wikidata.\n * `canMint` is true when nothing notable matched AND the domain is eligible for\n * the user-initiated mint-from-domain path -- it drives the \"Add <domain>\"\n * affordance.\n */\nexport const EntityResolveDomainResponseSchema = z.object({\n results: z.array(EntitySearchResultSchema),\n canMint: z.boolean(),\n});\nexport type EntityResolveDomainResponse = z.infer<typeof EntityResolveDomainResponseSchema>;\n\n/**\n * Response of `POST /api/entities/mint-domain` (grow-on-demand Branch 2). The\n * linkable entity minted from (or already resolved for) the domain. A non-2xx\n * status (e.g. the domain is not mintable, a confusable look-alike, or the site\n * yielded nothing usable) surfaces as a thrown error, not a null result.\n *\n * `pending` is true when the entity is a fresh hidden-pending mint: the\n * requesting user's own link resolves to it immediately, but it stays out of\n * other users' typeahead + aggregation until an admin approves it. Clients should\n * reflect this (\"added -- pending review\") rather than \"added & live\".\n */\nexport const EntityMintDomainResponseSchema = z.object({\n result: EntitySearchResultSchema,\n pending: z.boolean(),\n});\nexport type EntityMintDomainResponse = z.infer<typeof EntityMintDomainResponseSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, strongRefSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.endorsement` records. Lives in the endorser's PDS;\n * the endorser identity is implicit (whoever owns the repository).\n */\nexport const EndorsementRecordSchema = z.object({\n subject: didSchema,\n /**\n * Absent when the endorser is proposing a skill the subject has not listed,\n * named by `skillName`. The record it becomes is linked from the subject's\n * confirmation, since only they can write to their own repository.\n */\n skill: strongRefSchema.optional(),\n skillName: z.string().min(1).refine(maxGraphemes(64)).max(640),\n comment: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type EndorsementRecord = z.infer<typeof EndorsementRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, strongRefSchema } from './shared.js';\n\n/**\n * Relations shipped today. The lexicon declares these as `knownValues`, not an\n * enum, so the schema accepts any string: a consumer that meets a relation it\n * does not recognise should still see that the named person affirmed something.\n */\nexport const CONFIRMATION_RELATIONS = [\n 'id.sifa.defs#coSpeaker',\n 'id.sifa.defs#projectMember',\n /**\n * A colleague affirming someone's `id.sifa.profile.position`. Unlike the\n * other relations the position does not name the confirmer: the AppView\n * accepts it only from someone with a reason to know, such as an overlapping\n * position at the same organization, or the organization's own account.\n */\n 'id.sifa.defs#colleague',\n] as const;\n\nexport type ConfirmationRelation = (typeof CONFIRMATION_RELATIONS)[number];\n\n/**\n * Zod schema for `id.sifa.confirmation` records.\n *\n * The subject strongRef carries no collection constraint by design: one record\n * type affirms a co-speaker credit, a project membership, and whatever\n * people-link relations come next. Resolve it by AT-URI; the CID pins the\n * version seen at confirmation time and is an integrity hint, not a join key,\n * because the claimer editing their record changes its CID without\n * invalidating anything.\n */\nexport const ConfirmationRecordSchema = z.object({\n subject: strongRefSchema,\n relation: z.string().min(1),\n /**\n * Name the subject record carried at confirmation time. Lives in the\n * confirming person's repo, out of the claimer's reach, so a rename after\n * the fact is detectable.\n */\n subjectName: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ConfirmationRecord = z.infer<typeof ConfirmationRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, selfLabelsSchema, uriSchema } from './shared.js';\n\n/**\n * Structured physical address for an organization. Mirrors\n * `community.lexicon.location.address` (all fields optional). Sifa enforces\n * ISO 3166-1 alpha-2 country codes at the app layer.\n */\nconst orgAddressSchema = z.object({\n country: z.string().optional(),\n postalCode: z.string().optional(),\n region: z.string().optional(),\n locality: z.string().optional(),\n street: z.string().optional(),\n name: z.string().optional(),\n});\n\n/** A featured link on the org profile. Both `name` and `url` are required. */\nconst orgLinkSchema = z.object({\n name: z.string().refine(maxGraphemes(60)).max(600),\n url: uriSchema.max(2048),\n});\n\n/**\n * Zod schema for `id.sifa.org.profile` records -- the self-declared\n * organization profile. Singleton (record key `self`), lives in the org's PDS.\n * Presence of this record marks the account as presenting as an organization;\n * trust is layered separately (rendering floor, verification labels).\n *\n * Mirrors the lexicon wire shape (grapheme + byte caps, blob logo, uri refs).\n * For the sifa-api write-endpoint contract, use the schemas under\n * `@singi-labs/sifa-sdk/schemas/write` instead.\n */\nexport const OrgProfileRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n /** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */\n logo: z.unknown().optional(),\n website: uriSchema.optional(),\n entityRefs: z.array(uriSchema).max(20).optional(),\n /** Contact email. NOT rendered publicly; validated as email at the app layer. */\n contact: z.string().optional(),\n /** Physical addresses (headquarters, offices). */\n addresses: z.array(orgAddressSchema).max(10).optional(),\n /**\n * Self-selected headcount range (a declared bucket, never a calculated count).\n * Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,\n * `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any\n * string is accepted so future ranges do not break older records.\n */\n companySize: z.string().optional(),\n companyType: z.string().optional(),\n /** Featured links or content surfaced on the org profile. */\n links: z.array(orgLinkSchema).max(10).optional(),\n /**\n * Self-declared industry/domain pairs (same shape as the person profile's\n * `industries`). Registry-sourced classifications are layered separately.\n */\n industries: z\n .array(\n z.object({\n industry: z.string().max(100),\n domain: z.string().max(100).optional(),\n }),\n )\n .max(10)\n .optional(),\n /** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */\n founded: z.string().max(10).optional(),\n /** Self-declared alternative names / acronyms (\"also known as\"). */\n aliases: z\n .array(z.string().refine(maxGraphemes(200)).max(2000))\n .max(20)\n .optional(),\n /**\n * Whether the account holder's personal profile stays visible alongside this\n * org profile. For sole traders whose personal domain is also their trade\n * name: one account, two facets, both pages render. Absent or false means the\n * account presents solely as an organization.\n */\n personalProfileVisible: z.boolean().optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgProfileRecord = z.infer<typeof OrgProfileRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n strongRefSchema,\n uriSchema,\n} from './shared.js';\n\n/**\n * Zod schema for `id.sifa.org.employmentAttestation` records (lexicon 0.13):\n * an organization's attestation that a person is or was employed at its\n * entity. Lives in the org's PDS (the org is whoever owns the repo).\n *\n * `position`, `title` and `startedAt` are optional. The org attests\n * employment at the entity, not a job title; the snapshots let a consumer\n * notice a later edit of the position, which makes the attestation stale,\n * never void. `status` and `source` take the `id.sifa.defs` tokens; the bare\n * words are still accepted for records written before the tokens existed.\n * `companyDid` is deprecated (the author is the org) and ignored by readers.\n */\nexport const OrgEmploymentAttestationRecordSchema = z.object({\n subject: didSchema,\n position: strongRefSchema.optional(),\n status: z.enum([\n 'id.sifa.defs#employmentCurrent',\n 'id.sifa.defs#employmentPast',\n 'current',\n 'past',\n ]),\n source: z\n .enum(['id.sifa.defs#attestationManual', 'id.sifa.defs#attestationDirectory'])\n .optional(),\n title: z.string().min(1).refine(maxGraphemes(256)).max(2560).optional(),\n startedAt: partialDateSchema.optional(),\n entityRef: uriSchema.optional(),\n /**\n * @deprecated The author DID is the organization. Still parsed so a record\n * that carries it validates; readers must not use it for anything.\n */\n companyDid: didSchema.optional(),\n endedAt: partialDateSchema.optional(),\n comment: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgEmploymentAttestationRecord = z.infer<typeof OrgEmploymentAttestationRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n externalRecordRefSchema,\n maxGraphemes,\n partialDateSchema,\n uriSchema,\n} from './shared.js';\n\nexport const EMPLOYMENT_STATUS_TOKENS = [\n 'id.sifa.defs#employmentCurrent',\n 'id.sifa.defs#employmentPast',\n] as const;\n\nexport const VERIFICATION_METHOD_TOKENS = [\n 'id.sifa.defs#verifiedByEmail',\n 'id.sifa.defs#verifiedByOrg',\n 'id.sifa.defs#verifiedByDirectory',\n 'id.sifa.defs#verifiedByPeer',\n] as const;\n\n/**\n * Zod schema for `id.sifa.verification.employment` records: Sifa's own\n * statement that it verified a person's employment, written only by Sifa's\n * issuer account. Strict on purpose: the lexicon says the record never\n * carries an email address or domain, so an unknown key is refused rather\n * than passed through.\n */\nexport const EmploymentVerificationRecordSchema = z\n .object({\n $type: z.literal('id.sifa.verification.employment').optional(),\n subject: didSchema,\n position: externalRecordRefSchema,\n status: z.enum(EMPLOYMENT_STATUS_TOKENS),\n // Open on purpose, like the lexicon's knownValues: a method Sifa adds\n // later must not make an older client reject the whole record. Compare\n // against VERIFICATION_METHOD_TOKENS when you need a specific one.\n methods: z.array(z.string().min(1)).min(1).max(4),\n title: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n startedAt: partialDateSchema,\n endedAt: partialDateSchema.optional(),\n entityRef: uriSchema.optional(),\n organization: didSchema.optional(),\n evidence: z.array(externalRecordRefSchema).max(20).optional(),\n verifiedAt: datetimeSchema,\n expiresAt: datetimeSchema.optional(),\n createdAt: datetimeSchema,\n })\n .strict();\n\nexport type EmploymentVerificationRecord = z.infer<typeof EmploymentVerificationRecordSchema>;\n\nexport interface ResolveEmploymentVerificationOptions {\n /** DID of the repository the record was read from. */\n repoDid: string;\n /** Sifa's published issuer DID, the only repository whose records count. */\n issuerDid: string;\n /** For the expiry check; defaults to now. */\n now?: Date;\n}\n\nexport type EmploymentVerificationResolution =\n | { ok: true; record: EmploymentVerificationRecord }\n | { ok: false; reason: 'not-issuer' | 'malformed' | 'lapsed' };\n\n/**\n * Apply the one trust rule for issued verifications: the record counts only\n * when it sits in the issuer's own repository, parses, and has not lapsed.\n */\nexport function resolveEmploymentVerification(\n value: unknown,\n options: ResolveEmploymentVerificationOptions,\n): EmploymentVerificationResolution {\n if (options.repoDid !== options.issuerDid) return { ok: false, reason: 'not-issuer' };\n const parsed = EmploymentVerificationRecordSchema.safeParse(value);\n if (!parsed.success) return { ok: false, reason: 'malformed' };\n // `expiresAt` is the first instant the record no longer counts (inclusive):\n // Sifa sets it to the last verification plus the grace window, so at that\n // moment the grace has passed.\n const now = options.now ?? new Date();\n if (parsed.data.expiresAt && new Date(parsed.data.expiresAt).getTime() <= now.getTime()) {\n return { ok: false, reason: 'lapsed' };\n }\n return { ok: true, record: parsed.data };\n}\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.graph.follow` records.\n *\n * One-way professional follow; the record lives in the follower's PDS. Per\n * iter-1 decisions (`plans/2026-06-01-in-sifa-follow-primitive.md`), this is\n * a **distinct** graph from `app.bsky.graph.follow`, not a superset — but\n * the required field shape (`subject` + `createdAt`) is intentionally\n * identical so generic Bluesky `listRecords` consumers get usable records.\n *\n * `note` is a Sifa addition: an optional reason for the follow (\"why I\n * followed\"). Capped at 200 graphemes to match other profile-flavored\n * lexicon fields.\n */\nexport const GraphFollowRecordSchema = z.object({\n subject: didSchema,\n createdAt: datetimeSchema,\n note: z.string().refine(maxGraphemes(200), 'note must be at most 200 graphemes').optional(),\n});\n\nexport type GraphFollowRecord = z.infer<typeof GraphFollowRecordSchema>;\n\n/**\n * Build a `GraphFollowRecordSchema` that rejects self-follow at the Zod\n * layer (CLAUDE.md mandatory standards #3 — input validation; sifa-api#673\n * E8 — defence in depth).\n *\n * Use this on the **client side** when constructing a new follow record\n * (the follower DID is the authenticated user). The plain\n * {@link GraphFollowRecordSchema} stays without the refine so firehose\n * consumers can validate records without context.\n */\nexport function makeGraphFollowRecordSchema(followerDid: string) {\n return GraphFollowRecordSchema.refine((record) => record.subject !== followerDid, {\n message: 'Self-follow is not allowed',\n path: ['subject'],\n });\n}\n","/**\n * Verification providers -- the trust roots Sifa recognizes for AT Protocol\n * `app.bsky.graph.verification` records.\n *\n * Framing (see decisions/2026-07-13-third-party-verification-providers.md, D4):\n * a verification checkmark is ONE low-tier trust layer, not Sifa's headline.\n * Most of what it certifies is \"this account is who they claim to be\" -- useful,\n * and worth carrying because it's an already-recognized network signal, but low\n * value on its own. It sits among Sifa's other trust signals and never becomes a\n * score or a gate. This registry only decides which issuers Sifa displays and\n * with what provenance.\n *\n * Data-only: badge colors and icons are consumer concerns (React DOM on web,\n * React Native on mobile), same split as {@link PLATFORM_LABELS}. Consumers map\n * a provider id to a token/color.\n */\n\nexport type VerificationProviderId = 'bluesky' | 'mu';\n\n/** How Sifa learns about a provider's verifications. */\nexport type VerificationSource = 'bluesky-api' | 'firehose';\n\nexport interface VerificationProvider {\n id: VerificationProviderId;\n /** Human label for the badge popover, e.g. \"Bluesky\", \"mu (Eurosky)\". */\n label: string;\n /**\n * Primary-display priority (D1): when an account holds verifications from\n * multiple providers, the lowest number wins the single inline badge and the\n * rest move into the popover. Must be unique across providers.\n */\n priority: number;\n /**\n * - `bluesky-api`: sourced from Bluesky's public-API `verifiedStatus`. Bluesky\n * maintains its own trusted-verifier set, so Sifa keeps no local DID list.\n * - `firehose`: sourced from the Jetstream, gated on {@link verifierDids}.\n */\n source: VerificationSource;\n /**\n * Trust-root DIDs for firehose-sourced providers. A verification record counts\n * if its ISSUER DID is a root or a member of {@link verifierListUri}. Empty for\n * `bluesky-api` providers (Bluesky's AppView owns that decision). DIDs, not\n * handles: a handle takeover must never confer verifier status.\n */\n verifierDids: readonly string[];\n /**\n * AT-URI of the `app.bsky.graph.list` where the provider publishes its\n * trusted verifiers. Consumers load its members at runtime and pass them to\n * {@link resolveVerifierProvider}, so a verifier the provider adds counts on\n * Sifa without a release. The list owner must be in {@link verifierDids}.\n */\n verifierListUri?: string;\n /**\n * Verifiers last confirmed by hand, used ONLY when the caller supplies no\n * list members (list not loaded yet, or a consumer that does not load it).\n * Keeps such callers working; once members are supplied, the list wins.\n */\n fallbackVerifierDids?: readonly string[];\n}\n\n/**\n * A verification held by an account, as surfaced to the UI. `issuerDid` is\n * present for firehose-sourced providers and absent for `bluesky-api`.\n */\nexport interface AccountVerification {\n provider: VerificationProviderId;\n verifiedAt?: string | null;\n issuerDid?: string | null;\n /** Display name of the issuer (firehose providers), when the API knows it. */\n issuerName?: string | null;\n}\n\n/**\n * mu / Eurosky trust root (see https://hello.mu.social/verification).\n * eurosky.social coordinates the trusted-verifier program and publishes the\n * verifier set as {@link MU_VERIFIER_LIST_URI}; the individual verifiers are\n * read from that list at runtime, not maintained here.\n */\nconst MU_ROOT_DID = 'did:plc:ooensn4mr5mhznzypvxelfa3'; // eurosky.social\n\n/** \"Trusted verifiers on mu\", owned by {@link MU_ROOT_DID}. */\nconst MU_VERIFIER_LIST_URI = `at://${MU_ROOT_DID}/app.bsky.graph.list/3mogaw2g4an23`;\n\n/** Snapshot of the mu verifiers confirmed by hand before the list was used. */\nconst MU_FALLBACK_VERIFIER_DIDS = [\n 'did:plc:durcipmx2rwgzzagbiumobs5', // france-atmosphe.re\n 'did:plc:zsf5p7rqilz2qvyd7ezmxrfj', // belgium-atmosphe.re\n 'did:plc:hd564mpf6bekrwzyhvujs54b', // medsky.network\n 'did:plc:u5zp7npt5kpueado77kuihyz', // npmx.dev\n 'did:plc:6tndl5lqrzjrx7ahjom2gjbq', // stewardshiplab.org\n 'did:plc:vnycpb2e4lh4tc7oyr3n2jvh', // newsmastfoundation.org\n 'did:plc:dsiqe4pszk5ldbjk66fyryjv', // cpesr.fr\n] as const;\n\nexport const VERIFICATION_PROVIDERS: Record<VerificationProviderId, VerificationProvider> = {\n bluesky: {\n id: 'bluesky',\n label: 'Bluesky',\n priority: 0,\n source: 'bluesky-api',\n verifierDids: [],\n },\n mu: {\n id: 'mu',\n label: 'mu (Eurosky)',\n priority: 1,\n source: 'firehose',\n verifierDids: [MU_ROOT_DID],\n verifierListUri: MU_VERIFIER_LIST_URI,\n fallbackVerifierDids: MU_FALLBACK_VERIFIER_DIDS,\n },\n};\n\nexport function isKnownVerificationProvider(id: string): id is VerificationProviderId {\n // Object.hasOwn, not `in`: `in` also matches inherited Object.prototype keys\n // ('toString', 'constructor', ...), which would wrongly narrow those strings\n // and make getVerificationProvider return a prototype function.\n return Object.hasOwn(VERIFICATION_PROVIDERS, id);\n}\n\nexport function getVerificationProvider(id: string): VerificationProvider | undefined {\n return isKnownVerificationProvider(id) ? VERIFICATION_PROVIDERS[id] : undefined;\n}\n\n/**\n * The firehose issuer gate: given the DID that authored an\n * `app.bsky.graph.verification` record, return the provider it verifies for, or\n * `null` if the issuer is not a recognized firehose verifier. A DID counts if it\n * is a provider's trust root, or if `listMembers` (built with\n * {@link buildVerifierListMembers}) maps it to a firehose provider. Without\n * `listMembers`, each provider's `fallbackVerifierDids` apply instead.\n * API-sourced providers (Bluesky) are never matched here -- their verifications\n * do not enter through the firehose, so a self-issued record cannot resolve to\n * them.\n */\nexport function resolveVerifierProvider(\n issuerDid: string,\n listMembers?: ReadonlyMap<string, VerificationProviderId>,\n): VerificationProviderId | null {\n for (const provider of Object.values(VERIFICATION_PROVIDERS)) {\n if (provider.source !== 'firehose') continue;\n if (provider.verifierDids.includes(issuerDid)) return provider.id;\n if (!listMembers && provider.fallbackVerifierDids?.includes(issuerDid)) return provider.id;\n }\n const fromList = listMembers?.get(issuerDid);\n if (fromList && getVerificationProvider(fromList)?.source === 'firehose') return fromList;\n return null;\n}\n\n/** One `app.bsky.graph.listitem` record value, plus the repo it was read from. */\nexport interface VerifierListItem {\n /** DID of the repo the listitem record was read from. */\n repoDid: string;\n list: unknown;\n subject: unknown;\n}\n\n/**\n * Build the `listMembers` map for {@link resolveVerifierProvider} from raw\n * listitem records. An item counts only if it belongs to a firehose provider's\n * {@link VerificationProvider.verifierListUri}, was read from that list owner's\n * repo, and that owner is one of the provider's trust roots. Anything else\n * (a list item someone else wrote, another list, a malformed subject) is dropped.\n */\nexport function buildVerifierListMembers(\n items: readonly VerifierListItem[],\n): Map<string, VerificationProviderId> {\n const members = new Map<string, VerificationProviderId>();\n for (const provider of Object.values(VERIFICATION_PROVIDERS)) {\n if (provider.source !== 'firehose' || !provider.verifierListUri) continue;\n const owner = provider.verifierListUri.split('/')[2];\n if (!owner || !provider.verifierDids.includes(owner)) continue;\n for (const item of items) {\n if (item.repoDid !== owner || item.list !== provider.verifierListUri) continue;\n if (typeof item.subject !== 'string' || !/^did:[a-z]+:[A-Za-z0-9._:%-]+$/.test(item.subject))\n continue;\n if (!members.has(item.subject)) members.set(item.subject, provider.id);\n }\n }\n return members;\n}\n\n/**\n * D1 primary-provider selection: from all verifications an account holds, pick\n * the one whose provider has the highest priority (lowest `priority` number) for\n * the single inline badge. The rest belong in the popover. Verifications from\n * unknown providers are ignored. Returns `null` when nothing is displayable.\n */\nexport function primaryVerification(\n verifications: readonly AccountVerification[],\n): AccountVerification | null {\n let best: AccountVerification | null = null;\n let bestPriority = Number.POSITIVE_INFINITY;\n for (const verification of verifications) {\n const provider = getVerificationProvider(verification.provider);\n if (!provider) continue;\n if (provider.priority < bestPriority) {\n best = verification;\n bestPriority = provider.priority;\n }\n }\n return best;\n}\n","import { z } from 'zod';\n\nimport {\n VERIFICATION_PROVIDERS,\n type AccountVerification,\n type VerificationProviderId,\n} from '../taxonomy/verification-providers.js';\nimport { datetimeSchema, didSchema } from './shared.js';\n\nconst AccountVerificationSchema = z.object({\n provider: z.custom<VerificationProviderId>(\n (value) => typeof value === 'string' && Object.hasOwn(VERIFICATION_PROVIDERS, value),\n ),\n verifiedAt: datetimeSchema.nullable().optional(),\n issuerDid: didSchema.nullable().optional(),\n // Bluesky caps displayName at 640 bytes; anything longer is not a real name.\n issuerName: z.string().max(640).nullable().optional(),\n});\n\n/**\n * `verificationBadges[]` as emitted by the AppView. A badge from a provider this\n * SDK version does not know (or a malformed entry) is dropped instead of failing\n * the whole row, so a new server-side provider never breaks older clients.\n */\nconst VerificationBadgesSchema = z.array(z.unknown()).transform((items): AccountVerification[] =>\n items.flatMap((item) => {\n const result = AccountVerificationSchema.safeParse(item);\n return result.success ? [result.data] : [];\n }),\n);\n\n/**\n * Profile row shared across `/api/following`, `/api/profile/:handleOrDid/mutuals`,\n * and `/api/me/bluesky-suggestions`. Matches the existing `FollowProfile` TS\n * interface byte-for-byte but adds runtime validation for the SDK's pagination\n * helpers and the upcoming `sifa-app` consumer (where we can't trust the wire).\n *\n * Per `sifa-api#674` PR body: mutuals + bluesky-suggestions reuse this shape\n * exactly, so a single Zod schema covers all three endpoints.\n */\nexport const FollowProfileSchema = z.object({\n did: didSchema,\n handle: z.string(),\n displayName: z.string().optional(),\n headline: z.string().optional(),\n avatarUrl: z.string().optional(),\n source: z.string(),\n claimed: z.boolean(),\n followedAt: datetimeSchema,\n blueskyVerified: z.boolean().optional(),\n blueskyVerifiedAt: datetimeSchema.nullable().optional(),\n verificationBadges: VerificationBadgesSchema.optional(),\n});\n\nexport type FollowProfileItem = z.infer<typeof FollowProfileSchema>;\n\n/**\n * Cursor-paginated page of {@link FollowProfileSchema} rows. Used by mutuals\n * + bluesky-suggestions. The legacy `/api/following` endpoint uses a different\n * wrapper key (`follows` instead of `items`) and is intentionally NOT covered\n * by this schema.\n */\nexport const FollowProfilePageSchema = z.object({\n items: z.array(FollowProfileSchema),\n cursor: z.string().nullable(),\n});\n\nexport type FollowProfilePage = z.infer<typeof FollowProfilePageSchema>;\n\n/**\n * Per-flag allowlist row returned by `GET /api/admin/feature-allowlists/:flag`.\n * Mirrors the `feature_allowlists` table; `note` is optional free-form text.\n */\nexport const FeatureAllowlistEntrySchema = z.object({\n did: didSchema,\n addedAt: datetimeSchema,\n note: z.string().nullable().optional(),\n});\n\nexport type FeatureAllowlistEntry = z.infer<typeof FeatureAllowlistEntrySchema>;\n\n/**\n * Known feature flags accepted by the admin allowlist endpoints. Mirrors the\n * server-side `FEATURE_FLAGS` const in `sifa-api`. Kept as a `const` tuple so\n * consumers can `as const`-narrow when building UIs.\n */\nexport const FEATURE_FLAGS = ['FEED_V5_ENABLED'] as const;\nexport type FeatureFlag = (typeof FEATURE_FLAGS)[number];\n","import { z } from 'zod';\n\nimport { atUriSchema, cidSchema, datetimeSchema, didSchema } from './shared.js';\n\n/**\n * Feed item from `GET /api/following/feed`. Discriminated on `source`:\n *\n * - `sifa`: a Sifa-native event (e.g. profile update, endorsement).\n * - `atmosphere`: a curated creation event from another ATproto app\n * (Barazo post, etc.). Payload is the hydrated `app.bsky.embed.*#view`\n * shape, NOT the raw record (per memory `sifa-hydrated-view-embed-types`).\n *\n * Both variants share `actor`, `indexedAt`, and `id` (the materialized\n * `feed_events.id` row identifier, used in the cursor).\n */\nexport const FeedActorSchema = z.object({\n did: didSchema,\n handle: z.string(),\n displayName: z.string().optional(),\n avatarUrl: z.string().optional(),\n});\n\nexport type FeedActor = z.infer<typeof FeedActorSchema>;\n\nconst FeedItemBaseSchema = z.object({\n id: z.string(),\n actor: FeedActorSchema,\n indexedAt: datetimeSchema,\n eventType: z.string(),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const SifaFeedItemSchema = FeedItemBaseSchema.extend({\n source: z.literal('sifa'),\n appId: z.literal('sifa').optional(),\n payload: z.record(z.string(), z.unknown()),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type SifaFeedItem = z.infer<typeof SifaFeedItemSchema>;\n\n/**\n * ATmosphere feed item. `payload` is intentionally permissive: it carries\n * a hydrated `app.bsky.embed.*#view` shape that varies by source app. The\n * AppView resolves the hydration; clients render via the existing\n * embed-view union (mirrors `sifa-web/src/components/stream/`).\n *\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const AtmosphereFeedItemSchema = FeedItemBaseSchema.extend({\n source: z.literal('atmosphere'),\n appId: z.string(),\n uri: atUriSchema.optional(),\n cid: cidSchema.optional(),\n payload: z.record(z.string(), z.unknown()),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type AtmosphereFeedItem = z.infer<typeof AtmosphereFeedItemSchema>;\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const FollowFeedItemSchema = z.discriminatedUnion('source', [\n SifaFeedItemSchema,\n AtmosphereFeedItemSchema,\n]);\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type FollowFeedItem = z.infer<typeof FollowFeedItemSchema>;\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const FollowFeedPageSchema = z.object({\n items: z.array(FollowFeedItemSchema),\n cursor: z.string().nullable(),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type FollowFeedPage = z.infer<typeof FollowFeedPageSchema>;\n\n/**\n * Composite feed cursor `(indexedAt DESC, source, id)`. Encoded as a\n * URL-safe base64 string so it survives `URLSearchParams` round-trips\n * without further encoding. Decoupling encode/decode from the API call\n * lets consumers persist cursors (e.g. for \"jump-back-here\" UX) and\n * lets us unit-test the format.\n */\nexport interface FeedCursor {\n indexedAt: string;\n source: 'sifa' | 'atmosphere';\n id: string;\n}\n\nconst FeedCursorSchema = z.object({\n indexedAt: datetimeSchema,\n source: z.union([z.literal('sifa'), z.literal('atmosphere')]),\n id: z.string().min(1),\n});\n\ninterface BufferLike {\n from: (input: string, encoding: 'utf-8' | 'base64') => { toString: (encoding: string) => string };\n}\n\ninterface Base64Global {\n btoa?: (input: string) => string;\n atob?: (input: string) => string;\n Buffer?: BufferLike;\n}\n\nfunction toBase64Url(input: string): string {\n const g = globalThis as unknown as Base64Global;\n const b64: string =\n typeof g.btoa === 'function'\n ? g.btoa(unescape(encodeURIComponent(input)))\n : (g.Buffer as BufferLike).from(input, 'utf-8').toString('base64');\n // Strip up to 2 trailing '=' (base64 padding). CodeQL flags `/=+$/` as a\n // polynomial regex on tainted input; we don't accept tainted input here,\n // but the deterministic loop sidesteps the alert.\n let end = b64.length;\n while (end > 0 && b64.charCodeAt(end - 1) === 61) end--;\n return b64.slice(0, end).replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n\nfunction fromBase64Url(input: string): string {\n const padded = input.replace(/-/g, '+').replace(/_/g, '/') + '==='.slice((input.length + 3) % 4);\n const g = globalThis as unknown as Base64Global;\n if (typeof g.atob === 'function') {\n return decodeURIComponent(escape(g.atob(padded)));\n }\n return (g.Buffer as BufferLike).from(padded, 'base64').toString('utf-8');\n}\n\nexport function encodeFeedCursor(cursor: FeedCursor): string {\n return toBase64Url(JSON.stringify(cursor));\n}\n\nexport function decodeFeedCursor(encoded: string): FeedCursor {\n const json = fromBase64Url(encoded);\n const parsed: unknown = JSON.parse(json);\n return FeedCursorSchema.parse(parsed);\n}\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n uriSchema,\n} from './shared.js';\n\n/** Zod schema for `id.sifa.profile.certification` records. */\nexport const ProfileCertificationRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n authority: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n authorityDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n credentialId: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n credentialUrl: uriSchema.optional(),\n issuedAt: partialDateSchema.optional(),\n expiresAt: partialDateSchema.optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileCertificationRecord = z.infer<typeof ProfileCertificationRecordSchema>;\n","import { z } from 'zod';\n\nimport { atUriSchema, datetimeSchema, maxGraphemes, partialDateSchema } from './shared.js';\n\n/** Zod schema for `id.sifa.profile.course` records. */\nexport const ProfileCourseRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n number: z.string().refine(maxGraphemes(50)).max(500).optional(),\n institution: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n // AT-URI of the id.sifa.profile.education the course was part of. Plain\n // at-uri (not a strongRef) so the link tracks the live education record.\n education: atUriSchema.optional(),\n // AT-URI of the associated id.sifa.profile.certification record. Plain\n // at-uri (not a strongRef) so the link tracks the live certification.\n credential: atUriSchema.optional(),\n completedAt: partialDateSchema.optional(),\n // id.sifa.defs#courseRole token; absent means the user took the course.\n role: z.string().refine(maxGraphemes(64)).max(640).optional(),\n // Teaching period of a taught or assisted course.\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n // AT-URI of the id.sifa.profile.position the course was part of (taught\n // under it, or taken as part of the job). Plain at-uri (not a strongRef) so\n // the link tracks the live position.\n position: atUriSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileCourseRecord = z.infer<typeof ProfileCourseRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n} from './shared.js';\n\n/** Zod schema for `id.sifa.profile.education` records. */\nexport const ProfileEducationRecordSchema = z.object({\n institution: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n institutionDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n degree: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n fieldOfStudy: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n // European Qualifications Framework level, 1 to 8 (8 = doctoral) (#594).\n eqfLevel: z.number().int().min(1).max(8).optional(),\n grade: z.string().refine(maxGraphemes(50)).max(500).optional(),\n activities: z.string().refine(maxGraphemes(1000)).max(10000).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n location: z.unknown().optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n labels: selfLabelsSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileEducationRecord = z.infer<typeof ProfileEducationRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, uriSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.externalAccount` records.\n *\n * `platform` is advisory (`knownValues` in the lexicon) -- known values live\n * under `id.sifa.defs#platform*` but unknown values are accepted.\n */\nexport const ProfileExternalAccountRecordSchema = z.object({\n platform: z.string(),\n url: uriSchema,\n label: z.string().refine(maxGraphemes(64)).max(640).optional(),\n feedUrl: uriSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileExternalAccountRecord = z.infer<typeof ProfileExternalAccountRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, partialDateSchema } from './shared.js';\n\n/** Zod schema for `id.sifa.profile.honor` records. */\nexport const ProfileHonorRecordSchema = z.object({\n title: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n issuer: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n issuerDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n awardedAt: partialDateSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileHonorRecord = z.infer<typeof ProfileHonorRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n externalRecordRefSchema,\n selfLabelsSchema,\n strongRefSchema,\n uriSchema,\n} from './shared.js';\n\n/**\n * A person named as a member of a project. Mirrors `id.sifa.defs#projectMemberRef`.\n *\n * A claim by the record author, not a fact: the named person carries a display\n * name, avatar, and profile link only once they publish a matching\n * `id.sifa.confirmation`. `role` is display only, since a record living in\n * someone else's repository cannot grant write access to anything.\n */\nexport const projectMemberRefSchema = z.object({\n did: didSchema,\n role: z.string().optional(),\n title: z.string().refine(maxGraphemes(128)).max(1280).optional(),\n});\n\nexport type ProjectMemberRef = z.infer<typeof projectMemberRefSchema>;\n\n/** Zod schema for `id.sifa.profile.project` records. */\nexport const ProfileProjectRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n // The user's own role on the project (#596), e.g. Maintainer.\n role: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n url: uriSchema.optional(),\n members: z.array(projectMemberRefSchema).max(50).optional(),\n /**\n * The canonical `id.sifa.project.self` this personal entry corresponds to.\n * A composition link. For the same project recorded on someone else's\n * profile, see `sameAs`.\n */\n projectRef: strongRefSchema.optional(),\n /**\n * The same project as recorded on another person's profile. Each side stays\n * its own record; this only says the two describe one thing. Resolves by\n * AT-URI, since they will keep editing their copy.\n */\n sameAs: externalRecordRefSchema.optional(),\n position: strongRefSchema.optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n labels: selfLabelsSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileProjectRecord = z.infer<typeof ProfileProjectRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n externalRecordRefSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n uriSchema,\n} from './shared.js';\nimport { projectMemberRefSchema } from './profile-project.js';\n\n/** Collection NSID for involvement records. Pass to the generic record helpers. */\nexport const PROFILE_INVOLVEMENT_NSID = 'id.sifa.profile.involvement';\n\n/**\n * A public artifact proving a piece of work. Mirrors `id.sifa.defs#artifactLink`.\n * `kind` is an open enum (bare-string knownValues), so any string is accepted.\n * `.passthrough()` keeps unknown fields a newer client or co-writer may emit.\n */\nexport const ArtifactLinkSchema = z\n .object({\n url: uriSchema,\n kind: z.string().optional(),\n label: z.string().refine(maxGraphemes(200)).max(2000).optional(),\n })\n .passthrough();\n\nexport type ArtifactLink = z.infer<typeof ArtifactLinkSchema>;\n\n/**\n * Zod schema for `id.sifa.profile.involvement` records.\n *\n * `.passthrough()` (not `.strict()`): external apps (Verak, weareonhire)\n * co-write `id.sifa.*`, so an older SDK must not reject a record carrying a\n * field it doesn't know yet. `kind` is an open enum matching the lexicon's\n * knownValues but accepting any string for the same forward-compat reason.\n */\nexport const ProfileInvolvementRecordSchema = z\n .object({\n kind: z.string(),\n upstream: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n upstreamDid: didSchema.optional(),\n upstreamUrl: uriSchema.optional(),\n role: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n links: z.array(ArtifactLinkSchema).max(50).optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the resolver\n // typeahead, constrained to http(s) so a script scheme is never a valid ref.\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n // community.lexicon.location.address — validated at the app layer.\n location: z.unknown().optional(),\n // id.sifa.defs#skillRef references (at-uri to a skill record in the same repo).\n skills: z\n .array(z.object({ uri: z.string() }))\n .max(50)\n .optional(),\n labels: selfLabelsSchema.optional(),\n collaborators: z.array(projectMemberRefSchema).max(50).optional(),\n sameAs: externalRecordRefSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n })\n .passthrough();\n\nexport type ProfileInvolvementRecord = z.infer<typeof ProfileInvolvementRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.language` records.\n *\n * `proficiency` is advisory (`knownValues` in the lexicon) -- known values\n * are the five-level LinkedIn-compatible scale under `id.sifa.defs#*`.\n */\nexport const ProfileLanguageRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(64)).max(640),\n proficiency: z.string().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileLanguageRecord = z.infer<typeof ProfileLanguageRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n skillRefSchema,\n} from './shared.js';\n\n// Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n// Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n// Shared by the two entity references on a position so the scheme check cannot\n// drift between them.\nconst entityRefField = z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional();\n\n/** Zod schema for `id.sifa.profile.position` records. */\nexport const ProfilePositionRecordSchema = z\n .object({\n company: z.string().min(1).refine(maxGraphemes(100)).max(1000).optional(),\n companyDid: didSchema.optional(),\n entityRef: entityRefField,\n title: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n employmentType: z.string().optional(),\n // Disclosure that the role is held as someone else's representative -- most often\n // a fund whose board seat this is. Capped at the lexicon's 256 graphemes rather\n // than the tighter limit used for `company`: a schema stricter than the lexicon\n // would reject records other clients can legally write.\n onBehalfOf: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n // May resolve to an organization or to a person (a family-office principal); a DID\n // does not distinguish the two, so this stays permissive.\n onBehalfOfDid: didSchema.optional(),\n onBehalfOfEntityRef: entityRefField,\n workplaceType: z.string().optional(),\n location: z.unknown().optional(),\n startedAt: partialDateSchema,\n endedAt: partialDateSchema.optional(),\n // id.sifa.defs#skillRef -- at-uri only, no cid. Skills are mutable records\n // in the same repo, so the ref resolves live rather than pinning a version.\n skills: z.array(skillRefSchema).max(50).optional(),\n isPrimary: z.boolean().optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n })\n .passthrough();\n\nexport type ProfilePositionRecord = z.infer<typeof ProfilePositionRecordSchema>;\n","import { z } from 'zod';\n\nimport { BlobRefSchema } from './blob-ref.js';\nimport { datetimeSchema, externalRecordRefSchema, maxGraphemes, uriSchema } from './shared.js';\n\n/**\n * Duration of a presentation, in minutes. Mirrors\n * `id.sifa.profile.presentation#duration`: a fixed length (minMinutes only) or\n * a range (minMinutes to maxMinutes).\n */\nexport const PresentationDurationSchema = z\n .object({\n minMinutes: z.number().int().min(1),\n maxMinutes: z.number().int().min(1).optional(),\n })\n .refine((d) => d.maxMinutes === undefined || d.maxMinutes >= d.minMinutes, {\n message: 'maxMinutes must be greater than or equal to minMinutes',\n path: ['maxMinutes'],\n });\n\nexport type PresentationDuration = z.infer<typeof PresentationDurationSchema>;\n\n/**\n * A related link for a presentation or one of its deliveries. Mirrors\n * `id.sifa.defs#presentationLink`. `type` is an open enum (knownValues), so any\n * string is accepted.\n */\nexport const PresentationLinkSchema = z.object({\n uri: uriSchema,\n label: z.string().refine(maxGraphemes(64)).max(640).optional(),\n type: z.string().optional(),\n});\n\nexport type PresentationLink = z.infer<typeof PresentationLinkSchema>;\n\n/** Zod schema for `id.sifa.profile.presentation` records (the reusable content). */\nexport const ProfilePresentationRecordSchema = z.object({\n title: z.string().min(1).refine(maxGraphemes(300)).max(3000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n duration: PresentationDurationSchema.optional(),\n intendedAudiences: z\n .array(z.string().refine(maxGraphemes(100)).max(1000))\n .max(20)\n .optional(),\n links: z.array(PresentationLinkSchema).max(20).optional(),\n // Optional reference to a long-form write-up (pub.leaflet.document or\n // site.standard.document). Plain at-uri + optional cid so it tracks edits.\n writeupRef: externalRecordRefSchema.optional(),\n // Optional uploaded cover image for the talk page.\n coverImage: BlobRefSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfilePresentationRecord = z.infer<typeof ProfilePresentationRecordSchema>;\n","import { z } from 'zod';\n\nimport { PresentationLinkSchema } from './profile-presentation.js';\nimport { datetimeSchema, externalRecordRefSchema, maxGraphemes } from './shared.js';\n\n/**\n * Structured address for a delivery occasion. Mirrors\n * `community.lexicon.location.address` (all fields optional).\n */\nconst communityAddressSchema = z.object({\n country: z.string().optional(),\n postalCode: z.string().optional(),\n region: z.string().optional(),\n locality: z.string().optional(),\n street: z.string().optional(),\n name: z.string().optional(),\n});\n\n/**\n * Zod schema for `id.sifa.profile.presentationDelivery` records (one occasion\n * on which a presentation was delivered). Works standalone or linked to a\n * presentation and/or a calendar event. `role`, `mode`, and `status` are open\n * enums (knownValues); `mode`/`status` store the full\n * `community.lexicon.calendar.event` token.\n */\nexport const ProfilePresentationDeliveryRecordSchema = z.object({\n // Optional reference to the id.sifa.profile.presentation delivered here.\n presentationRef: externalRecordRefSchema.optional(),\n // Fallback title used when there is no presentationRef.\n title: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n role: z.string().refine(maxGraphemes(64)).max(640).optional(),\n eventName: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n // Calendar date as YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown.\n date: z\n .string()\n .regex(/^\\d{4}(-\\d{2}(-\\d{2})?)?$/, 'date must be YYYY, YYYY-MM or YYYY-MM-DD')\n .optional(),\n location: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n // Structured community.lexicon.location.address for the occasion. The\n // free-text `location` string above stays as a legacy fallback.\n address: communityAddressSchema.optional(),\n mode: z.string().optional(),\n status: z.string().optional(),\n links: z.array(PresentationLinkSchema).max(20).optional(),\n // Optional reference to a community.lexicon.calendar.event for this occasion.\n eventRef: externalRecordRefSchema.optional(),\n // DIDs of co-speakers who presented alongside the author at this occasion.\n coSpeakers: z\n .array(z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'))\n .max(20)\n .optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfilePresentationDeliveryRecord = z.infer<\n typeof ProfilePresentationDeliveryRecordSchema\n>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, partialDateSchema, uriSchema } from './shared.js';\n\n/** Author shape from `id.sifa.profile.publication#author`. */\nexport const PublicationAuthorSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n did: didSchema.optional(),\n});\n\nexport type PublicationAuthor = z.infer<typeof PublicationAuthorSchema>;\n\n/** `id.sifa.defs#relatedIdentifier`: a typed link to another version of the work (#590). */\nexport const RelatedIdentifierSchema = z.object({\n identifier: z.string().min(1).max(2048),\n identifierType: z.string().max(32).optional(),\n relationType: z.string().min(1).max(64),\n});\n\n/** Zod schema for `id.sifa.profile.publication` records. */\nexport const ProfilePublicationRecordSchema = z.object({\n title: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n subtitle: z.string().refine(maxGraphemes(200)).max(2000).optional(),\n publisher: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n url: uriSchema.optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n authors: z.array(PublicationAuthorSchema).max(50).optional(),\n relatedIdentifiers: z.array(RelatedIdentifierSchema).max(20).optional(),\n publishedAt: partialDateSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfilePublicationRecord = z.infer<typeof ProfilePublicationRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, languageTagSchema, maxGraphemes, selfLabelsSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.self` records. Singleton (record key `self`).\n *\n * `knownValues` on `openTo` and `preferredWorkplace` are advisory per the\n * lexicon spec -- unknown values are allowed, but documented options live\n * under the `id.sifa.defs#*` namespace.\n */\nexport const ProfileSelfRecordSchema = z.object({\n headline: z.string().refine(maxGraphemes(120)).max(1200).optional(),\n about: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n industry: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n givenName: z.string().refine(maxGraphemes(64)).max(640).optional(),\n familyName: z.string().refine(maxGraphemes(64)).max(640).optional(),\n namePronunciation: z.string().refine(maxGraphemes(64)).max(640).optional(),\n location: z.unknown().optional(),\n openTo: z.array(z.string()).max(10).optional(),\n preferredWorkplace: z.array(z.string()).max(3).optional(),\n langs: z.array(languageTagSchema).max(3).optional(),\n labels: selfLabelsSchema.optional(),\n discoverable: z.boolean().optional(),\n /**\n * Where the avatar comes from instead of the avatar blob. Open per the\n * lexicon (`knownValues`); Sifa renders `actor.rpg.sprite`, the user's\n * rpg.actor character.\n */\n avatarSource: z.string().max(128).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileSelfRecord = z.infer<typeof ProfileSelfRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.skill` records.\n *\n * `category` is advisory (`knownValues` in the lexicon) -- known values live\n * under `id.sifa.defs#*` but unknown values are accepted. `subCategory` is a\n * freeform user-defined grouping label nested under `category` (no known\n * values); renderers decide its display label.\n */\nexport const ProfileSkillRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(64)).max(640),\n category: z.string().optional(),\n subCategory: z.string().refine(maxGraphemes(64)).max(640).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileSkillRecord = z.infer<typeof ProfileSkillRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, partialDateSchema } from './shared.js';\n\n/** Zod schema for `id.sifa.profile.volunteering` records. */\nexport const ProfileVolunteeringRecordSchema = z.object({\n organization: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n organizationDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n role: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n cause: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileVolunteeringRecord = z.infer<typeof ProfileVolunteeringRecordSchema>;\n","import { z } from 'zod';\n\nimport { ArtifactLinkSchema } from './profile-involvement.js';\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n} from './shared.js';\n\n// Portable entity identifier (Wikidata/ROR/LEI URI) from the typeahead. Constrained\n// to http(s) so a script-bearing scheme is never a valid ref (#159). An investment\n// carries two of these -- the company and the vehicle -- so the check is shared.\nconst entityRefField = z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional();\n\n/**\n * A deliberately structured amount. Free text was rejected here: an unparseable\n * money string is worse than no amount at all, and cannot be repaired once people\n * have written them.\n */\nexport const InvestmentAmountSchema = z.object({\n /** Whole major currency units (euros, not cents). Cheque sizes are round numbers. */\n value: z.number().int().min(0),\n /** ISO 4217 three-letter code, uppercase. */\n currency: z.string().length(3),\n});\n\n/** Collection NSID for investment records. */\nexport const PROFILE_INVESTMENT_NSID = 'id.sifa.profile.investment';\n\n/** Zod schema for `id.sifa.profile.investment` records. */\nexport const ProfileInvestmentRecordSchema = z\n .object({\n /** For a limited-partner entry this names the fund, not a portfolio company. */\n company: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n companyDid: didSchema.optional(),\n entityRef: entityRefField,\n role: z.string().optional(),\n stage: z.string().optional(),\n status: z.string().optional(),\n /** The vehicle the capital went through. Absent for a cheque in the person's own name. */\n via: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n viaDid: didSchema.optional(),\n viaEntityRef: entityRefField,\n /**\n * Optional and empty by default. Cheque size is a personal financial disclosure,\n * and clients must not prompt for it.\n */\n amount: InvestmentAmountSchema.optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n links: z.array(ArtifactLinkSchema).max(50).optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n })\n .passthrough();\n\nexport type ProfileInvestmentRecord = z.infer<typeof ProfileInvestmentRecordSchema>;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/blob-ref.ts","../../src/schemas/shared.ts","../../src/schemas/endorsement-confirmation.ts","../../src/schemas/entity.ts","../../src/schemas/endorsement.ts","../../src/schemas/confirmation.ts","../../src/schemas/org-profile.ts","../../src/schemas/org-employment-attestation.ts","../../src/schemas/employment-verification.ts","../../src/schemas/graph-follow.ts","../../src/taxonomy/verification-providers.ts","../../src/schemas/follow-profile.ts","../../src/schemas/feed.ts","../../src/schemas/profile-certification.ts","../../src/schemas/profile-course.ts","../../src/schemas/profile-education.ts","../../src/schemas/profile-external-account.ts","../../src/schemas/profile-honor.ts","../../src/schemas/profile-project.ts","../../src/schemas/profile-involvement.ts","../../src/schemas/profile-language.ts","../../src/schemas/profile-position.ts","../../src/schemas/profile-presentation.ts","../../src/schemas/profile-presentation-delivery.ts","../../src/schemas/profile-publication.ts","../../src/schemas/profile-self.ts","../../src/schemas/profile-skill.ts","../../src/schemas/profile-volunteering.ts","../../src/schemas/profile-investment.ts"],"names":["z","ent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A,EAAO,CAAE,MAAA,CAAO,YAAA,CAAa,GAAG,CAAC,CAAA,CAAE,GAAA,CAAI,IAAI,CAAA,CAAE,QAAA,EAAS;AAAA,EAC7D,MAAA,EAAQ,UAAU,QAAA,EAAS;AAAA,EAC3B,YAAA,EAAcC,eAAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKd,MAAA,EAAQ,uBAAuB,QAAA,EAAS;AAAA,EACxC,SAAA,EAAW,kBAAkB,QAAA,EAAS;AAAA,EACtC,OAAA,EAAS,kBAAkB,QAAA,EAAS;AAAA,EACpC,WAAA,EAAaD,KAAAA,CAAE,MAAA,EAAO,CAAE,MAAA,CAAO,YAAA,CAAa,GAAI,CAAC,CAAA,CAAE,GAAA,CAAI,GAAK,CAAA,CAAE,QAAA,EAAS;AAAA,EACvE,KAAA,EAAOA,MAAE,KAAA,CAAM,kBAAkB,EAAE,GAAA,CAAI,EAAE,EAAE,QAAA,EAAS;AAAA,EACpD,MAAA,EAAQ,iBAAiB,QAAA,EAAS;AAAA,EAClC,SAAA,EAAW;AACb,CAAC,EACA,WAAA","file":"index.cjs","sourcesContent":["import { z } from 'zod';\n\n/**\n * Blob-ref passthrough shared by records that carry an uploaded blob (org logo,\n * presentation cover image, ...). Mirrors the `blobRefSchema` validated by the\n * sifa-api write endpoints -- the shape is validated, then written to the PDS\n * verbatim.\n */\nexport const BlobRefSchema = z.object({\n $type: z.literal('blob'),\n ref: z.object({ $link: z.string().min(1) }),\n mimeType: z.string().min(1).max(255),\n size: z.number().int().nonnegative(),\n});\n\nexport type BlobRef = z.infer<typeof BlobRefSchema>;\n","import { z } from 'zod';\n\n/**\n * Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`\n * constraint. JS strings are sequences of UTF-16 code units, but lexicon\n * `maxGraphemes` counts user-perceived characters (grapheme clusters), so\n * emoji sequences, regional indicators, ZWJ joins, and combining marks all\n * count as one unit each. We use `Intl.Segmenter` to enforce this correctly.\n */\nexport function maxGraphemes(max: number) {\n return (value: string): boolean => {\n const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });\n let count = 0;\n for (const _ of segmenter.segment(value)) {\n count++;\n if (count > max) return false;\n }\n return true;\n };\n}\n\n/** Decentralized identifier, AT Protocol `format: did`. */\nexport const didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, 'Invalid DID');\n\n/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */\nexport const datetimeSchema = z.string().datetime({ offset: true });\n\n/**\n * Freeform calendar date for user-facing profile dates (start/end, issued,\n * completed, awarded, published, etc.). Accepts a bare year, year-month,\n * year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps\n * through on backfill without loss). NOT strict `datetime` -- users typically\n * remember only month/year, and LinkedIn-importer writes carry partial dates,\n * so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record\n * metadata like `createdAt` stays on `datetimeSchema`.\n */\nexport const partialDateSchema = z\n .string()\n .regex(/^\\d{4}(-\\d{2}(-\\d{2}(T.+)?)?)?$/, 'Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime');\n\n/** Generic AT-URI, AT Protocol `format: at-uri`. */\nexport const atUriSchema = z.string().regex(/^at:\\/\\/[^\\s]+$/, 'Invalid AT-URI');\n\n/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */\nexport const cidSchema = z\n .string()\n .regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, 'Invalid CID');\n\n/** BCP 47 language tag, AT Protocol `format: language`. */\nexport const languageTagSchema = z\n .string()\n .regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, 'Invalid BCP 47 language tag');\n\n/** Generic URI, AT Protocol `format: uri`. */\nexport const uriSchema = z.string().url();\n\n/**\n * StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both\n * AT-URI (identity) and CID (version).\n */\nexport const strongRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema,\n});\n\n/**\n * Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors\n * `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable\n * records in the same user's repo, so the reference resolves live and tracks\n * edits to the target.\n */\nexport const skillRefSchema = z.object({\n uri: atUriSchema,\n});\n\n/**\n * Reference to a record by AT-URI, with an optional CID. Mirrors\n * `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:\n * consumers resolve the AT-URI live so the reference tracks edits to the\n * target, and the CID is a best-effort integrity hint only.\n */\nexport const externalRecordRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema.optional(),\n});\n\n/**\n * Shared reference to an organization or person named by a record. Mirrors\n * `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured\n * when the record was saved; `did` and `entityRef` are the durable identity and\n * should be resolved live. `name` is required so an empty object cannot validate\n * as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a\n * newer schema will define, and dropping them on a round-trip would silently\n * lose data.\n */\nexport const agentRefSchema = z\n .object({\n name: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n did: didSchema.optional(),\n entityRef: uriSchema.optional(),\n })\n .passthrough();\n\nexport type AgentRef = z.infer<typeof agentRefSchema>;\n\n/**\n * Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled\n * permissively because clients rarely construct this directly; the AppView\n * handles label validation.\n */\nexport const selfLabelsSchema = z.object({\n $type: z.literal('com.atproto.label.defs#selfLabels').optional(),\n values: z.array(z.object({ val: z.string() })),\n});\n","import { z } from 'zod';\n\nimport { datetimeSchema, strongRefSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.endorsement.confirmation` records.\n * Lives in the endorsee's PDS to approve display of an endorsement.\n */\nexport const EndorsementConfirmationRecordSchema = z.object({\n endorsement: strongRefSchema,\n /**\n * Skill record this endorsement applies to. Set when the endorsement proposed\n * a skill: the subject creates the record and links it here, because the\n * endorser cannot write to the subject's repository. Also set when a proposed\n * name matched a skill the subject already had.\n */\n skill: strongRefSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type EndorsementConfirmationRecord = z.infer<typeof EndorsementConfirmationRecordSchema>;\n","import { z } from 'zod';\n\n/**\n * Organization entity-resolution payloads (#159). Shared by the typeahead,\n * selection, and grow-on-demand import-search endpoints on sifa-api.\n */\n\n/**\n * A nullable string constrained to an http(s) URL. Rejects `javascript:` and\n * other script-bearing schemes at the SDK boundary so a hostile API response\n * cannot smuggle an XSS payload into a rendered `href`/`src`. Note: Wikidata\n * entity URIs are canonically `http://`, so both http and https are allowed.\n */\nconst httpUrlNullable = z\n .string()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'must be an http(s) URL' })\n .nullable();\n\nconst searchResultCommon = {\n kind: z.string(),\n name: z.string(),\n domain: z.string().nullable(),\n country: z.string().nullable(),\n logoUrl: httpUrlNullable,\n parentName: z.string().nullable(),\n};\n\n/**\n * A single typeahead row. Discriminated on `source`: a curated `entity` row\n * carries `entityId`, a `pdl` staging row carries `pdlId`. The union guarantees\n * the identifier for the row's source is always present, so a stable React key\n * can never be `entity:undefined`. The disambiguation fields\n * (domain/country/parentName) drive the dropdown display.\n */\nexport const EntitySearchResultSchema = z.discriminatedUnion('source', [\n z.object({\n source: z.literal('entity'),\n entityId: z.number().int().positive(),\n ...searchResultCommon,\n }),\n z.object({\n source: z.literal('pdl'),\n pdlId: z.string().min(1),\n ...searchResultCommon,\n }),\n]);\nexport type EntitySearchResult = z.infer<typeof EntitySearchResultSchema>;\n\n/** Response of `GET /api/entities/search`. */\nexport const EntitySearchResponseSchema = z.object({\n results: z.array(EntitySearchResultSchema),\n hasMore: z.boolean(),\n});\nexport type EntitySearchResponse = z.infer<typeof EntitySearchResponseSchema>;\n\n/**\n * Body of `POST /api/entities/select`: promote a PDL row OR bump an entity.\n * Exactly one of `entityId`/`pdlId` must be present -- supplying both is\n * ambiguous (the server would have to silently pick one) and is rejected.\n */\nexport const EntitySelectRequestSchema = z\n .object({\n entityId: z.number().int().positive().optional(),\n pdlId: z.string().min(1).optional(),\n })\n .refine((v) => (v.entityId != null) !== (v.pdlId != null), {\n message: 'exactly one of entityId or pdlId is required',\n });\nexport type EntitySelectRequest = z.infer<typeof EntitySelectRequestSchema>;\n\n/** Response of `POST /api/entities/select`. `entityRef` is the portable\n * Wikidata/ROR/LEI URI to write to the position record, or null for a\n * PDL-only entity (its resolution stays AppView-side). */\nexport const EntitySelectResponseSchema = z.object({\n entityId: z.number().int().positive(),\n slug: z.string(),\n kind: z.string(),\n canonicalName: z.string(),\n domain: z.string().nullable(),\n /**\n * The entity's website, gated to sources trustworthy enough to prefill into a\n * record the user signs. Narrower than `domain`, which is a display value and\n * may come from a crawl. Null when the entity has no such source.\n */\n website: httpUrlNullable.default(null),\n /** Which tier `website` came from. Crawled is never an accepted source. */\n websiteTier: z.enum(['org', 'curated']).nullable().default(null),\n entityRef: httpUrlNullable,\n});\nexport type EntitySelectResponse = z.infer<typeof EntitySelectResponseSchema>;\n\n/** Response of `POST /api/entities/import-search`. */\nexport const EntityImportSearchResponseSchema = z.object({\n results: z.array(EntitySearchResultSchema),\n});\nexport type EntityImportSearchResponse = z.infer<typeof EntityImportSearchResponseSchema>;\n\n/**\n * Body of the domain grow-on-demand endpoints (`POST /api/entities/resolve-domain`\n * and `POST /api/entities/mint-domain`). The server re-validates the value as a\n * registrable domain; 253 is the max DNS name length.\n */\nexport const EntityResolveDomainRequestSchema = z.object({\n domain: z.string().min(1).max(253),\n});\nexport type EntityResolveDomainRequest = z.infer<typeof EntityResolveDomainRequestSchema>;\n\n/**\n * Response of `POST /api/entities/resolve-domain` (grow-on-demand Branch 1). Any\n * notable companies whose official website is the domain, imported from Wikidata.\n * `canMint` is true when nothing notable matched AND the domain is eligible for\n * the user-initiated mint-from-domain path -- it drives the \"Add <domain>\"\n * affordance.\n */\nexport const EntityResolveDomainResponseSchema = z.object({\n results: z.array(EntitySearchResultSchema),\n canMint: z.boolean(),\n});\nexport type EntityResolveDomainResponse = z.infer<typeof EntityResolveDomainResponseSchema>;\n\n/**\n * Response of `POST /api/entities/mint-domain` (grow-on-demand Branch 2). The\n * linkable entity minted from (or already resolved for) the domain. A non-2xx\n * status (e.g. the domain is not mintable, a confusable look-alike, or the site\n * yielded nothing usable) surfaces as a thrown error, not a null result.\n *\n * `pending` is true when the entity is a fresh hidden-pending mint: the\n * requesting user's own link resolves to it immediately, but it stays out of\n * other users' typeahead + aggregation until an admin approves it. Clients should\n * reflect this (\"added -- pending review\") rather than \"added & live\".\n */\nexport const EntityMintDomainResponseSchema = z.object({\n result: EntitySearchResultSchema,\n pending: z.boolean(),\n});\nexport type EntityMintDomainResponse = z.infer<typeof EntityMintDomainResponseSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, strongRefSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.endorsement` records. Lives in the endorser's PDS;\n * the endorser identity is implicit (whoever owns the repository).\n */\nexport const EndorsementRecordSchema = z.object({\n subject: didSchema,\n /**\n * Absent when the endorser is proposing a skill the subject has not listed,\n * named by `skillName`. The record it becomes is linked from the subject's\n * confirmation, since only they can write to their own repository.\n */\n skill: strongRefSchema.optional(),\n skillName: z.string().min(1).refine(maxGraphemes(64)).max(640),\n comment: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type EndorsementRecord = z.infer<typeof EndorsementRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, strongRefSchema } from './shared.js';\n\n/**\n * Relations shipped today. The lexicon declares these as `knownValues`, not an\n * enum, so the schema accepts any string: a consumer that meets a relation it\n * does not recognise should still see that the named person affirmed something.\n */\nexport const CONFIRMATION_RELATIONS = [\n 'id.sifa.defs#coSpeaker',\n 'id.sifa.defs#projectMember',\n /**\n * A colleague affirming someone's `id.sifa.profile.position`. Unlike the\n * other relations the position does not name the confirmer: the AppView\n * accepts it only from someone with a reason to know, such as an overlapping\n * position at the same organization, or the organization's own account.\n */\n 'id.sifa.defs#colleague',\n] as const;\n\nexport type ConfirmationRelation = (typeof CONFIRMATION_RELATIONS)[number];\n\n/**\n * Zod schema for `id.sifa.confirmation` records.\n *\n * The subject strongRef carries no collection constraint by design: one record\n * type affirms a co-speaker credit, a project membership, and whatever\n * people-link relations come next. Resolve it by AT-URI; the CID pins the\n * version seen at confirmation time and is an integrity hint, not a join key,\n * because the claimer editing their record changes its CID without\n * invalidating anything.\n */\nexport const ConfirmationRecordSchema = z.object({\n subject: strongRefSchema,\n relation: z.string().min(1),\n /**\n * Name the subject record carried at confirmation time. Lives in the\n * confirming person's repo, out of the claimer's reach, so a rename after\n * the fact is detectable.\n */\n subjectName: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ConfirmationRecord = z.infer<typeof ConfirmationRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, selfLabelsSchema, uriSchema } from './shared.js';\n\n/**\n * Structured physical address for an organization. Mirrors\n * `community.lexicon.location.address` (all fields optional). Sifa enforces\n * ISO 3166-1 alpha-2 country codes at the app layer.\n */\nconst orgAddressSchema = z.object({\n country: z.string().optional(),\n postalCode: z.string().optional(),\n region: z.string().optional(),\n locality: z.string().optional(),\n street: z.string().optional(),\n name: z.string().optional(),\n});\n\n/** A featured link on the org profile. Both `name` and `url` are required. */\nconst orgLinkSchema = z.object({\n name: z.string().refine(maxGraphemes(60)).max(600),\n url: uriSchema.max(2048),\n});\n\n/**\n * Zod schema for `id.sifa.org.profile` records -- the self-declared\n * organization profile. Singleton (record key `self`), lives in the org's PDS.\n * Presence of this record marks the account as presenting as an organization;\n * trust is layered separately (rendering floor, verification labels).\n *\n * Mirrors the lexicon wire shape (grapheme + byte caps, blob logo, uri refs).\n * For the sifa-api write-endpoint contract, use the schemas under\n * `@singi-labs/sifa-sdk/schemas/write` instead.\n */\nexport const OrgProfileRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n /** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */\n logo: z.unknown().optional(),\n website: uriSchema.optional(),\n entityRefs: z.array(uriSchema).max(20).optional(),\n /** Contact email. NOT rendered publicly; validated as email at the app layer. */\n contact: z.string().optional(),\n /** Physical addresses (headquarters, offices). */\n addresses: z.array(orgAddressSchema).max(10).optional(),\n /**\n * Self-selected headcount range (a declared bucket, never a calculated count).\n * Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,\n * `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any\n * string is accepted so future ranges do not break older records.\n */\n companySize: z.string().optional(),\n companyType: z.string().optional(),\n /** Featured links or content surfaced on the org profile. */\n links: z.array(orgLinkSchema).max(10).optional(),\n /**\n * Self-declared industry/domain pairs (same shape as the person profile's\n * `industries`). Registry-sourced classifications are layered separately.\n */\n industries: z\n .array(\n z.object({\n industry: z.string().max(100),\n domain: z.string().max(100).optional(),\n }),\n )\n .max(10)\n .optional(),\n /** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */\n founded: z.string().max(10).optional(),\n /** Self-declared alternative names / acronyms (\"also known as\"). */\n aliases: z\n .array(z.string().refine(maxGraphemes(200)).max(2000))\n .max(20)\n .optional(),\n /**\n * Whether the account holder's personal profile stays visible alongside this\n * org profile. For sole traders whose personal domain is also their trade\n * name: one account, two facets, both pages render. Absent or false means the\n * account presents solely as an organization.\n */\n personalProfileVisible: z.boolean().optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgProfileRecord = z.infer<typeof OrgProfileRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n strongRefSchema,\n uriSchema,\n} from './shared.js';\n\n/**\n * Zod schema for `id.sifa.org.employmentAttestation` records (lexicon 0.13):\n * an organization's attestation that a person is or was employed at its\n * entity. Lives in the org's PDS (the org is whoever owns the repo).\n *\n * `position`, `title` and `startedAt` are optional. The org attests\n * employment at the entity, not a job title; the snapshots let a consumer\n * notice a later edit of the position, which makes the attestation stale,\n * never void. `status` and `source` take the `id.sifa.defs` tokens; the bare\n * words are still accepted for records written before the tokens existed.\n * `companyDid` is deprecated (the author is the org) and ignored by readers.\n */\nexport const OrgEmploymentAttestationRecordSchema = z.object({\n subject: didSchema,\n position: strongRefSchema.optional(),\n status: z.enum([\n 'id.sifa.defs#employmentCurrent',\n 'id.sifa.defs#employmentPast',\n 'current',\n 'past',\n ]),\n source: z\n .enum(['id.sifa.defs#attestationManual', 'id.sifa.defs#attestationDirectory'])\n .optional(),\n title: z.string().min(1).refine(maxGraphemes(256)).max(2560).optional(),\n startedAt: partialDateSchema.optional(),\n entityRef: uriSchema.optional(),\n /**\n * @deprecated The author DID is the organization. Still parsed so a record\n * that carries it validates; readers must not use it for anything.\n */\n companyDid: didSchema.optional(),\n endedAt: partialDateSchema.optional(),\n comment: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgEmploymentAttestationRecord = z.infer<typeof OrgEmploymentAttestationRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n externalRecordRefSchema,\n maxGraphemes,\n partialDateSchema,\n uriSchema,\n} from './shared.js';\n\nexport const EMPLOYMENT_STATUS_TOKENS = [\n 'id.sifa.defs#employmentCurrent',\n 'id.sifa.defs#employmentPast',\n] as const;\n\nexport const VERIFICATION_METHOD_TOKENS = [\n 'id.sifa.defs#verifiedByEmail',\n 'id.sifa.defs#verifiedByOrg',\n 'id.sifa.defs#verifiedByDirectory',\n 'id.sifa.defs#verifiedByPeer',\n] as const;\n\n/**\n * Zod schema for `id.sifa.verification.employment` records: Sifa's own\n * statement that it verified a person's employment, written only by Sifa's\n * issuer account. Strict on purpose: the lexicon says the record never\n * carries an email address or domain, so an unknown key is refused rather\n * than passed through.\n */\nexport const EmploymentVerificationRecordSchema = z\n .object({\n $type: z.literal('id.sifa.verification.employment').optional(),\n subject: didSchema,\n position: externalRecordRefSchema,\n status: z.enum(EMPLOYMENT_STATUS_TOKENS),\n // Open on purpose, like the lexicon's knownValues: a method Sifa adds\n // later must not make an older client reject the whole record. Compare\n // against VERIFICATION_METHOD_TOKENS when you need a specific one.\n methods: z.array(z.string().min(1)).min(1).max(4),\n title: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n startedAt: partialDateSchema,\n endedAt: partialDateSchema.optional(),\n entityRef: uriSchema.optional(),\n organization: didSchema.optional(),\n evidence: z.array(externalRecordRefSchema).max(20).optional(),\n verifiedAt: datetimeSchema,\n expiresAt: datetimeSchema.optional(),\n createdAt: datetimeSchema,\n })\n .strict();\n\nexport type EmploymentVerificationRecord = z.infer<typeof EmploymentVerificationRecordSchema>;\n\nexport interface ResolveEmploymentVerificationOptions {\n /** DID of the repository the record was read from. */\n repoDid: string;\n /** Sifa's published issuer DID, the only repository whose records count. */\n issuerDid: string;\n /** For the expiry check; defaults to now. */\n now?: Date;\n}\n\nexport type EmploymentVerificationResolution =\n | { ok: true; record: EmploymentVerificationRecord }\n | { ok: false; reason: 'not-issuer' | 'malformed' | 'lapsed' };\n\n/**\n * Apply the one trust rule for issued verifications: the record counts only\n * when it sits in the issuer's own repository, parses, and has not lapsed.\n */\nexport function resolveEmploymentVerification(\n value: unknown,\n options: ResolveEmploymentVerificationOptions,\n): EmploymentVerificationResolution {\n if (options.repoDid !== options.issuerDid) return { ok: false, reason: 'not-issuer' };\n const parsed = EmploymentVerificationRecordSchema.safeParse(value);\n if (!parsed.success) return { ok: false, reason: 'malformed' };\n // `expiresAt` is the first instant the record no longer counts (inclusive):\n // Sifa sets it to the last verification plus the grace window, so at that\n // moment the grace has passed.\n const now = options.now ?? new Date();\n if (parsed.data.expiresAt && new Date(parsed.data.expiresAt).getTime() <= now.getTime()) {\n return { ok: false, reason: 'lapsed' };\n }\n return { ok: true, record: parsed.data };\n}\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.graph.follow` records.\n *\n * One-way professional follow; the record lives in the follower's PDS. Per\n * iter-1 decisions (`plans/2026-06-01-in-sifa-follow-primitive.md`), this is\n * a **distinct** graph from `app.bsky.graph.follow`, not a superset — but\n * the required field shape (`subject` + `createdAt`) is intentionally\n * identical so generic Bluesky `listRecords` consumers get usable records.\n *\n * `note` is a Sifa addition: an optional reason for the follow (\"why I\n * followed\"). Capped at 200 graphemes to match other profile-flavored\n * lexicon fields.\n */\nexport const GraphFollowRecordSchema = z.object({\n subject: didSchema,\n createdAt: datetimeSchema,\n note: z.string().refine(maxGraphemes(200), 'note must be at most 200 graphemes').optional(),\n});\n\nexport type GraphFollowRecord = z.infer<typeof GraphFollowRecordSchema>;\n\n/**\n * Build a `GraphFollowRecordSchema` that rejects self-follow at the Zod\n * layer (CLAUDE.md mandatory standards #3 — input validation; sifa-api#673\n * E8 — defence in depth).\n *\n * Use this on the **client side** when constructing a new follow record\n * (the follower DID is the authenticated user). The plain\n * {@link GraphFollowRecordSchema} stays without the refine so firehose\n * consumers can validate records without context.\n */\nexport function makeGraphFollowRecordSchema(followerDid: string) {\n return GraphFollowRecordSchema.refine((record) => record.subject !== followerDid, {\n message: 'Self-follow is not allowed',\n path: ['subject'],\n });\n}\n","/**\n * Verification providers -- the trust roots Sifa recognizes for AT Protocol\n * `app.bsky.graph.verification` records.\n *\n * Framing (see decisions/2026-07-13-third-party-verification-providers.md, D4):\n * a verification checkmark is ONE low-tier trust layer, not Sifa's headline.\n * Most of what it certifies is \"this account is who they claim to be\" -- useful,\n * and worth carrying because it's an already-recognized network signal, but low\n * value on its own. It sits among Sifa's other trust signals and never becomes a\n * score or a gate. This registry only decides which issuers Sifa displays and\n * with what provenance.\n *\n * Data-only: badge colors live in the `/tokens` entry point\n * (`verificationColors`, keyed by provider id); icons and components are\n * consumer concerns (React DOM on web, React Native on mobile).\n */\n\nexport type VerificationProviderId = 'bluesky' | 'mu';\n\n/** How Sifa learns about a provider's verifications. */\nexport type VerificationSource = 'bluesky-api' | 'firehose';\n\nexport interface VerificationProvider {\n id: VerificationProviderId;\n /** Human label for the badge popover, e.g. \"Bluesky\", \"mu (Eurosky)\". */\n label: string;\n /**\n * Primary-display priority (D1): when an account holds verifications from\n * multiple providers, the lowest number wins the single inline badge and the\n * rest move into the popover. Must be unique across providers.\n */\n priority: number;\n /**\n * - `bluesky-api`: sourced from Bluesky's public-API `verifiedStatus`. Bluesky\n * maintains its own trusted-verifier set, so Sifa keeps no local DID list.\n * - `firehose`: sourced from the Jetstream, gated on {@link verifierDids}.\n */\n source: VerificationSource;\n /**\n * Trust-root DIDs for firehose-sourced providers. A verification record counts\n * if its ISSUER DID is a root or a member of {@link verifierListUri}. Empty for\n * `bluesky-api` providers (Bluesky's AppView owns that decision). DIDs, not\n * handles: a handle takeover must never confer verifier status.\n */\n verifierDids: readonly string[];\n /**\n * AT-URI of the `app.bsky.graph.list` where the provider publishes its\n * trusted verifiers. Consumers load its members at runtime and pass them to\n * {@link resolveVerifierProvider}, so a verifier the provider adds counts on\n * Sifa without a release. The list owner must be in {@link verifierDids}.\n */\n verifierListUri?: string;\n /**\n * Verifiers last confirmed by hand, used ONLY when the caller supplies no\n * list members (list not loaded yet, or a consumer that does not load it).\n * Keeps such callers working; once members are supplied, the list wins.\n */\n fallbackVerifierDids?: readonly string[];\n}\n\n/**\n * A verification held by an account, as surfaced to the UI. `issuerDid` is\n * present for firehose-sourced providers and absent for `bluesky-api`.\n */\nexport interface AccountVerification {\n provider: VerificationProviderId;\n verifiedAt?: string | null;\n issuerDid?: string | null;\n /** Display name of the issuer (firehose providers), when the API knows it. */\n issuerName?: string | null;\n}\n\n/**\n * mu / Eurosky trust root (see https://hello.mu.social/verification).\n * eurosky.social coordinates the trusted-verifier program and publishes the\n * verifier set as {@link MU_VERIFIER_LIST_URI}; the individual verifiers are\n * read from that list at runtime, not maintained here.\n */\nconst MU_ROOT_DID = 'did:plc:ooensn4mr5mhznzypvxelfa3'; // eurosky.social\n\n/** \"Trusted verifiers on mu\", owned by {@link MU_ROOT_DID}. */\nconst MU_VERIFIER_LIST_URI = `at://${MU_ROOT_DID}/app.bsky.graph.list/3mogaw2g4an23`;\n\n/** Snapshot of the mu verifiers confirmed by hand before the list was used. */\nconst MU_FALLBACK_VERIFIER_DIDS = [\n 'did:plc:durcipmx2rwgzzagbiumobs5', // france-atmosphe.re\n 'did:plc:zsf5p7rqilz2qvyd7ezmxrfj', // belgium-atmosphe.re\n 'did:plc:hd564mpf6bekrwzyhvujs54b', // medsky.network\n 'did:plc:u5zp7npt5kpueado77kuihyz', // npmx.dev\n 'did:plc:6tndl5lqrzjrx7ahjom2gjbq', // stewardshiplab.org\n 'did:plc:vnycpb2e4lh4tc7oyr3n2jvh', // newsmastfoundation.org\n 'did:plc:dsiqe4pszk5ldbjk66fyryjv', // cpesr.fr\n] as const;\n\nexport const VERIFICATION_PROVIDERS: Record<VerificationProviderId, VerificationProvider> = {\n bluesky: {\n id: 'bluesky',\n label: 'Bluesky',\n priority: 0,\n source: 'bluesky-api',\n verifierDids: [],\n },\n mu: {\n id: 'mu',\n label: 'mu (Eurosky)',\n priority: 1,\n source: 'firehose',\n verifierDids: [MU_ROOT_DID],\n verifierListUri: MU_VERIFIER_LIST_URI,\n fallbackVerifierDids: MU_FALLBACK_VERIFIER_DIDS,\n },\n};\n\nexport function isKnownVerificationProvider(id: string): id is VerificationProviderId {\n // Object.hasOwn, not `in`: `in` also matches inherited Object.prototype keys\n // ('toString', 'constructor', ...), which would wrongly narrow those strings\n // and make getVerificationProvider return a prototype function.\n return Object.hasOwn(VERIFICATION_PROVIDERS, id);\n}\n\nexport function getVerificationProvider(id: string): VerificationProvider | undefined {\n return isKnownVerificationProvider(id) ? VERIFICATION_PROVIDERS[id] : undefined;\n}\n\n/**\n * The firehose issuer gate: given the DID that authored an\n * `app.bsky.graph.verification` record, return the provider it verifies for, or\n * `null` if the issuer is not a recognized firehose verifier. A DID counts if it\n * is a provider's trust root, or if `listMembers` (built with\n * {@link buildVerifierListMembers}) maps it to a firehose provider. Without\n * `listMembers`, each provider's `fallbackVerifierDids` apply instead.\n * API-sourced providers (Bluesky) are never matched here -- their verifications\n * do not enter through the firehose, so a self-issued record cannot resolve to\n * them.\n */\nexport function resolveVerifierProvider(\n issuerDid: string,\n listMembers?: ReadonlyMap<string, VerificationProviderId>,\n): VerificationProviderId | null {\n for (const provider of Object.values(VERIFICATION_PROVIDERS)) {\n if (provider.source !== 'firehose') continue;\n if (provider.verifierDids.includes(issuerDid)) return provider.id;\n if (!listMembers && provider.fallbackVerifierDids?.includes(issuerDid)) return provider.id;\n }\n const fromList = listMembers?.get(issuerDid);\n if (fromList && getVerificationProvider(fromList)?.source === 'firehose') return fromList;\n return null;\n}\n\n/** One `app.bsky.graph.listitem` record value, plus the repo it was read from. */\nexport interface VerifierListItem {\n /** DID of the repo the listitem record was read from. */\n repoDid: string;\n list: unknown;\n subject: unknown;\n}\n\n/**\n * Build the `listMembers` map for {@link resolveVerifierProvider} from raw\n * listitem records. An item counts only if it belongs to a firehose provider's\n * {@link VerificationProvider.verifierListUri}, was read from that list owner's\n * repo, and that owner is one of the provider's trust roots. Anything else\n * (a list item someone else wrote, another list, a malformed subject) is dropped.\n */\nexport function buildVerifierListMembers(\n items: readonly VerifierListItem[],\n): Map<string, VerificationProviderId> {\n const members = new Map<string, VerificationProviderId>();\n for (const provider of Object.values(VERIFICATION_PROVIDERS)) {\n if (provider.source !== 'firehose' || !provider.verifierListUri) continue;\n const owner = provider.verifierListUri.split('/')[2];\n if (!owner || !provider.verifierDids.includes(owner)) continue;\n for (const item of items) {\n if (item.repoDid !== owner || item.list !== provider.verifierListUri) continue;\n if (typeof item.subject !== 'string' || !/^did:[a-z]+:[A-Za-z0-9._:%-]+$/.test(item.subject))\n continue;\n if (!members.has(item.subject)) members.set(item.subject, provider.id);\n }\n }\n return members;\n}\n\n/**\n * D1 primary-provider selection: from all verifications an account holds, pick\n * the one whose provider has the highest priority (lowest `priority` number) for\n * the single inline badge. The rest belong in the popover. Verifications from\n * unknown providers are ignored. Returns `null` when nothing is displayable.\n */\nexport function primaryVerification(\n verifications: readonly AccountVerification[],\n): AccountVerification | null {\n let best: AccountVerification | null = null;\n let bestPriority = Number.POSITIVE_INFINITY;\n for (const verification of verifications) {\n const provider = getVerificationProvider(verification.provider);\n if (!provider) continue;\n if (provider.priority < bestPriority) {\n best = verification;\n bestPriority = provider.priority;\n }\n }\n return best;\n}\n\n/** Longest verifier name a label shows (Bluesky's displayName limit in graphemes). */\nconst MAX_LABEL_LENGTH = 64;\n\n/**\n * Label for one verification: the verifier's own display name (`issuerName`,\n * sent by the API for firehose providers such as mu, where each verifier is\n * shown by name), otherwise the provider label. Long names are shortened with\n * an ellipsis. A provider this SDK version does not know falls back to its raw\n * id ({@link resolveVerificationBadges} already drops those).\n */\nexport function verificationLabel(v: Pick<AccountVerification, 'provider' | 'issuerName'>): string {\n const name = v.issuerName?.trim();\n if (name) {\n const chars = [...name];\n return chars.length > MAX_LABEL_LENGTH\n ? `${chars.slice(0, MAX_LABEL_LENGTH - 1).join('')}…`\n : name;\n }\n return getVerificationProvider(v.provider)?.label ?? v.provider;\n}\n\n/**\n * The verifications a badge should render, as a new array. Keeps the API's\n * `verificationBadges` from providers this SDK knows; an empty array means\n * \"none\", even with the legacy flag. When the array is absent, or holds only\n * unknown providers, builds a Bluesky entry from the legacy `blueskyVerified`\n * flag (payloads that predate `verificationBadges`).\n */\nexport function resolveVerificationBadges(input: {\n verificationBadges?: readonly AccountVerification[] | null;\n blueskyVerified?: boolean;\n blueskyVerifiedAt?: string | null;\n}): AccountVerification[] {\n const badges = input.verificationBadges;\n if (badges && badges.length === 0) return [];\n const known = (badges ?? []).filter((b) => isKnownVerificationProvider(b.provider));\n if (known.length > 0) return known;\n return input.blueskyVerified\n ? [{ provider: 'bluesky', verifiedAt: input.blueskyVerifiedAt ?? null }]\n : [];\n}\n","import { z } from 'zod';\n\nimport {\n VERIFICATION_PROVIDERS,\n type AccountVerification,\n type VerificationProviderId,\n} from '../taxonomy/verification-providers.js';\nimport { datetimeSchema, didSchema } from './shared.js';\n\nconst AccountVerificationSchema = z.object({\n provider: z.custom<VerificationProviderId>(\n (value) => typeof value === 'string' && Object.hasOwn(VERIFICATION_PROVIDERS, value),\n ),\n verifiedAt: datetimeSchema.nullable().optional(),\n issuerDid: didSchema.nullable().optional(),\n // Bluesky caps displayName at 640 bytes; anything longer is not a real name.\n issuerName: z.string().max(640).nullable().optional(),\n});\n\n/**\n * `verificationBadges[]` as emitted by the AppView. A badge from a provider this\n * SDK version does not know (or a malformed entry) is dropped instead of failing\n * the whole row, so a new server-side provider never breaks older clients.\n */\nconst VerificationBadgesSchema = z.array(z.unknown()).transform((items): AccountVerification[] =>\n items.flatMap((item) => {\n const result = AccountVerificationSchema.safeParse(item);\n return result.success ? [result.data] : [];\n }),\n);\n\n/**\n * Profile row shared across `/api/following`, `/api/profile/:handleOrDid/mutuals`,\n * and `/api/me/bluesky-suggestions`. Matches the existing `FollowProfile` TS\n * interface byte-for-byte but adds runtime validation for the SDK's pagination\n * helpers and the upcoming `sifa-app` consumer (where we can't trust the wire).\n *\n * Per `sifa-api#674` PR body: mutuals + bluesky-suggestions reuse this shape\n * exactly, so a single Zod schema covers all three endpoints.\n */\nexport const FollowProfileSchema = z.object({\n did: didSchema,\n handle: z.string(),\n displayName: z.string().optional(),\n headline: z.string().optional(),\n avatarUrl: z.string().optional(),\n source: z.string(),\n claimed: z.boolean(),\n followedAt: datetimeSchema,\n blueskyVerified: z.boolean().optional(),\n blueskyVerifiedAt: datetimeSchema.nullable().optional(),\n verificationBadges: VerificationBadgesSchema.optional(),\n});\n\nexport type FollowProfileItem = z.infer<typeof FollowProfileSchema>;\n\n/**\n * Cursor-paginated page of {@link FollowProfileSchema} rows. Used by mutuals\n * + bluesky-suggestions. The legacy `/api/following` endpoint uses a different\n * wrapper key (`follows` instead of `items`) and is intentionally NOT covered\n * by this schema.\n */\nexport const FollowProfilePageSchema = z.object({\n items: z.array(FollowProfileSchema),\n cursor: z.string().nullable(),\n});\n\nexport type FollowProfilePage = z.infer<typeof FollowProfilePageSchema>;\n\n/**\n * Per-flag allowlist row returned by `GET /api/admin/feature-allowlists/:flag`.\n * Mirrors the `feature_allowlists` table; `note` is optional free-form text.\n */\nexport const FeatureAllowlistEntrySchema = z.object({\n did: didSchema,\n addedAt: datetimeSchema,\n note: z.string().nullable().optional(),\n});\n\nexport type FeatureAllowlistEntry = z.infer<typeof FeatureAllowlistEntrySchema>;\n\n/**\n * Known feature flags accepted by the admin allowlist endpoints. Mirrors the\n * server-side `FEATURE_FLAGS` const in `sifa-api`. Kept as a `const` tuple so\n * consumers can `as const`-narrow when building UIs.\n */\nexport const FEATURE_FLAGS = ['FEED_V5_ENABLED'] as const;\nexport type FeatureFlag = (typeof FEATURE_FLAGS)[number];\n","import { z } from 'zod';\n\nimport { atUriSchema, cidSchema, datetimeSchema, didSchema } from './shared.js';\n\n/**\n * Feed item from `GET /api/following/feed`. Discriminated on `source`:\n *\n * - `sifa`: a Sifa-native event (e.g. profile update, endorsement).\n * - `atmosphere`: a curated creation event from another ATproto app\n * (Barazo post, etc.). Payload is the hydrated `app.bsky.embed.*#view`\n * shape, NOT the raw record (per memory `sifa-hydrated-view-embed-types`).\n *\n * Both variants share `actor`, `indexedAt`, and `id` (the materialized\n * `feed_events.id` row identifier, used in the cursor).\n */\nexport const FeedActorSchema = z.object({\n did: didSchema,\n handle: z.string(),\n displayName: z.string().optional(),\n avatarUrl: z.string().optional(),\n});\n\nexport type FeedActor = z.infer<typeof FeedActorSchema>;\n\nconst FeedItemBaseSchema = z.object({\n id: z.string(),\n actor: FeedActorSchema,\n indexedAt: datetimeSchema,\n eventType: z.string(),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const SifaFeedItemSchema = FeedItemBaseSchema.extend({\n source: z.literal('sifa'),\n appId: z.literal('sifa').optional(),\n payload: z.record(z.string(), z.unknown()),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type SifaFeedItem = z.infer<typeof SifaFeedItemSchema>;\n\n/**\n * ATmosphere feed item. `payload` is intentionally permissive: it carries\n * a hydrated `app.bsky.embed.*#view` shape that varies by source app. The\n * AppView resolves the hydration; clients render via the existing\n * embed-view union (mirrors `sifa-web/src/components/stream/`).\n *\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const AtmosphereFeedItemSchema = FeedItemBaseSchema.extend({\n source: z.literal('atmosphere'),\n appId: z.string(),\n uri: atUriSchema.optional(),\n cid: cidSchema.optional(),\n payload: z.record(z.string(), z.unknown()),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type AtmosphereFeedItem = z.infer<typeof AtmosphereFeedItemSchema>;\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const FollowFeedItemSchema = z.discriminatedUnion('source', [\n SifaFeedItemSchema,\n AtmosphereFeedItemSchema,\n]);\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type FollowFeedItem = z.infer<typeof FollowFeedItemSchema>;\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport const FollowFeedPageSchema = z.object({\n items: z.array(FollowFeedItemSchema),\n cursor: z.string().nullable(),\n});\n\n/**\n * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).\n * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere\n * Stream are two distinct surfaces with different data paths (Barazo API\n * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed\n * types are no longer consumed. Scheduled for removal in next major bump.\n */\nexport type FollowFeedPage = z.infer<typeof FollowFeedPageSchema>;\n\n/**\n * Composite feed cursor `(indexedAt DESC, source, id)`. Encoded as a\n * URL-safe base64 string so it survives `URLSearchParams` round-trips\n * without further encoding. Decoupling encode/decode from the API call\n * lets consumers persist cursors (e.g. for \"jump-back-here\" UX) and\n * lets us unit-test the format.\n */\nexport interface FeedCursor {\n indexedAt: string;\n source: 'sifa' | 'atmosphere';\n id: string;\n}\n\nconst FeedCursorSchema = z.object({\n indexedAt: datetimeSchema,\n source: z.union([z.literal('sifa'), z.literal('atmosphere')]),\n id: z.string().min(1),\n});\n\ninterface BufferLike {\n from: (input: string, encoding: 'utf-8' | 'base64') => { toString: (encoding: string) => string };\n}\n\ninterface Base64Global {\n btoa?: (input: string) => string;\n atob?: (input: string) => string;\n Buffer?: BufferLike;\n}\n\nfunction toBase64Url(input: string): string {\n const g = globalThis as unknown as Base64Global;\n const b64: string =\n typeof g.btoa === 'function'\n ? g.btoa(unescape(encodeURIComponent(input)))\n : (g.Buffer as BufferLike).from(input, 'utf-8').toString('base64');\n // Strip up to 2 trailing '=' (base64 padding). CodeQL flags `/=+$/` as a\n // polynomial regex on tainted input; we don't accept tainted input here,\n // but the deterministic loop sidesteps the alert.\n let end = b64.length;\n while (end > 0 && b64.charCodeAt(end - 1) === 61) end--;\n return b64.slice(0, end).replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n\nfunction fromBase64Url(input: string): string {\n const padded = input.replace(/-/g, '+').replace(/_/g, '/') + '==='.slice((input.length + 3) % 4);\n const g = globalThis as unknown as Base64Global;\n if (typeof g.atob === 'function') {\n return decodeURIComponent(escape(g.atob(padded)));\n }\n return (g.Buffer as BufferLike).from(padded, 'base64').toString('utf-8');\n}\n\nexport function encodeFeedCursor(cursor: FeedCursor): string {\n return toBase64Url(JSON.stringify(cursor));\n}\n\nexport function decodeFeedCursor(encoded: string): FeedCursor {\n const json = fromBase64Url(encoded);\n const parsed: unknown = JSON.parse(json);\n return FeedCursorSchema.parse(parsed);\n}\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n uriSchema,\n} from './shared.js';\n\n/** Zod schema for `id.sifa.profile.certification` records. */\nexport const ProfileCertificationRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n authority: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n authorityDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n credentialId: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n credentialUrl: uriSchema.optional(),\n issuedAt: partialDateSchema.optional(),\n expiresAt: partialDateSchema.optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileCertificationRecord = z.infer<typeof ProfileCertificationRecordSchema>;\n","import { z } from 'zod';\n\nimport { atUriSchema, datetimeSchema, maxGraphemes, partialDateSchema } from './shared.js';\n\n/** Zod schema for `id.sifa.profile.course` records. */\nexport const ProfileCourseRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n number: z.string().refine(maxGraphemes(50)).max(500).optional(),\n institution: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n // AT-URI of the id.sifa.profile.education the course was part of. Plain\n // at-uri (not a strongRef) so the link tracks the live education record.\n education: atUriSchema.optional(),\n // AT-URI of the associated id.sifa.profile.certification record. Plain\n // at-uri (not a strongRef) so the link tracks the live certification.\n credential: atUriSchema.optional(),\n completedAt: partialDateSchema.optional(),\n // id.sifa.defs#courseRole token; absent means the user took the course.\n role: z.string().refine(maxGraphemes(64)).max(640).optional(),\n // Teaching period of a taught or assisted course.\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n // AT-URI of the id.sifa.profile.position the course was part of (taught\n // under it, or taken as part of the job). Plain at-uri (not a strongRef) so\n // the link tracks the live position.\n position: atUriSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileCourseRecord = z.infer<typeof ProfileCourseRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n} from './shared.js';\n\n/** Zod schema for `id.sifa.profile.education` records. */\nexport const ProfileEducationRecordSchema = z.object({\n institution: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n institutionDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n degree: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n fieldOfStudy: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n // European Qualifications Framework level, 1 to 8 (8 = doctoral) (#594).\n eqfLevel: z.number().int().min(1).max(8).optional(),\n grade: z.string().refine(maxGraphemes(50)).max(500).optional(),\n activities: z.string().refine(maxGraphemes(1000)).max(10000).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n location: z.unknown().optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n labels: selfLabelsSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileEducationRecord = z.infer<typeof ProfileEducationRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, uriSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.externalAccount` records.\n *\n * `platform` is advisory (`knownValues` in the lexicon) -- known values live\n * under `id.sifa.defs#platform*` but unknown values are accepted.\n */\nexport const ProfileExternalAccountRecordSchema = z.object({\n platform: z.string(),\n url: uriSchema,\n label: z.string().refine(maxGraphemes(64)).max(640).optional(),\n feedUrl: uriSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileExternalAccountRecord = z.infer<typeof ProfileExternalAccountRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, partialDateSchema } from './shared.js';\n\n/** Zod schema for `id.sifa.profile.honor` records. */\nexport const ProfileHonorRecordSchema = z.object({\n title: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n issuer: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n issuerDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n awardedAt: partialDateSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileHonorRecord = z.infer<typeof ProfileHonorRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n externalRecordRefSchema,\n selfLabelsSchema,\n strongRefSchema,\n uriSchema,\n} from './shared.js';\n\n/**\n * A person named as a member of a project. Mirrors `id.sifa.defs#projectMemberRef`.\n *\n * A claim by the record author, not a fact: the named person carries a display\n * name, avatar, and profile link only once they publish a matching\n * `id.sifa.confirmation`. `role` is display only, since a record living in\n * someone else's repository cannot grant write access to anything.\n */\nexport const projectMemberRefSchema = z.object({\n did: didSchema,\n role: z.string().optional(),\n title: z.string().refine(maxGraphemes(128)).max(1280).optional(),\n});\n\nexport type ProjectMemberRef = z.infer<typeof projectMemberRefSchema>;\n\n/** Zod schema for `id.sifa.profile.project` records. */\nexport const ProfileProjectRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n // The user's own role on the project (#596), e.g. Maintainer.\n role: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n url: uriSchema.optional(),\n members: z.array(projectMemberRefSchema).max(50).optional(),\n /**\n * The canonical `id.sifa.project.self` this personal entry corresponds to.\n * A composition link. For the same project recorded on someone else's\n * profile, see `sameAs`.\n */\n projectRef: strongRefSchema.optional(),\n /**\n * The same project as recorded on another person's profile. Each side stays\n * its own record; this only says the two describe one thing. Resolves by\n * AT-URI, since they will keep editing their copy.\n */\n sameAs: externalRecordRefSchema.optional(),\n position: strongRefSchema.optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n labels: selfLabelsSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileProjectRecord = z.infer<typeof ProfileProjectRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n externalRecordRefSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n uriSchema,\n} from './shared.js';\nimport { projectMemberRefSchema } from './profile-project.js';\n\n/** Collection NSID for involvement records. Pass to the generic record helpers. */\nexport const PROFILE_INVOLVEMENT_NSID = 'id.sifa.profile.involvement';\n\n/**\n * A public artifact proving a piece of work. Mirrors `id.sifa.defs#artifactLink`.\n * `kind` is an open enum (bare-string knownValues), so any string is accepted.\n * `.passthrough()` keeps unknown fields a newer client or co-writer may emit.\n */\nexport const ArtifactLinkSchema = z\n .object({\n url: uriSchema,\n kind: z.string().optional(),\n label: z.string().refine(maxGraphemes(200)).max(2000).optional(),\n })\n .passthrough();\n\nexport type ArtifactLink = z.infer<typeof ArtifactLinkSchema>;\n\n/**\n * Zod schema for `id.sifa.profile.involvement` records.\n *\n * `.passthrough()` (not `.strict()`): external apps (Verak, weareonhire)\n * co-write `id.sifa.*`, so an older SDK must not reject a record carrying a\n * field it doesn't know yet. `kind` is an open enum matching the lexicon's\n * knownValues but accepting any string for the same forward-compat reason.\n */\nexport const ProfileInvolvementRecordSchema = z\n .object({\n kind: z.string(),\n upstream: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n upstreamDid: didSchema.optional(),\n upstreamUrl: uriSchema.optional(),\n role: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n links: z.array(ArtifactLinkSchema).max(50).optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the resolver\n // typeahead, constrained to http(s) so a script scheme is never a valid ref.\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n // community.lexicon.location.address — validated at the app layer.\n location: z.unknown().optional(),\n // id.sifa.defs#skillRef references (at-uri to a skill record in the same repo).\n skills: z\n .array(z.object({ uri: z.string() }))\n .max(50)\n .optional(),\n labels: selfLabelsSchema.optional(),\n collaborators: z.array(projectMemberRefSchema).max(50).optional(),\n sameAs: externalRecordRefSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n })\n .passthrough();\n\nexport type ProfileInvolvementRecord = z.infer<typeof ProfileInvolvementRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.language` records.\n *\n * `proficiency` is advisory (`knownValues` in the lexicon) -- known values\n * are the five-level LinkedIn-compatible scale under `id.sifa.defs#*`.\n */\nexport const ProfileLanguageRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(64)).max(640),\n proficiency: z.string().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileLanguageRecord = z.infer<typeof ProfileLanguageRecordSchema>;\n","import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n skillRefSchema,\n} from './shared.js';\n\n// Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n// Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n// Shared by the two entity references on a position so the scheme check cannot\n// drift between them.\nconst entityRefField = z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional();\n\n/** Zod schema for `id.sifa.profile.position` records. */\nexport const ProfilePositionRecordSchema = z\n .object({\n company: z.string().min(1).refine(maxGraphemes(100)).max(1000).optional(),\n companyDid: didSchema.optional(),\n entityRef: entityRefField,\n title: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n employmentType: z.string().optional(),\n // Disclosure that the role is held as someone else's representative -- most often\n // a fund whose board seat this is. Capped at the lexicon's 256 graphemes rather\n // than the tighter limit used for `company`: a schema stricter than the lexicon\n // would reject records other clients can legally write.\n onBehalfOf: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n // May resolve to an organization or to a person (a family-office principal); a DID\n // does not distinguish the two, so this stays permissive.\n onBehalfOfDid: didSchema.optional(),\n onBehalfOfEntityRef: entityRefField,\n workplaceType: z.string().optional(),\n location: z.unknown().optional(),\n startedAt: partialDateSchema,\n endedAt: partialDateSchema.optional(),\n // id.sifa.defs#skillRef -- at-uri only, no cid. Skills are mutable records\n // in the same repo, so the ref resolves live rather than pinning a version.\n skills: z.array(skillRefSchema).max(50).optional(),\n isPrimary: z.boolean().optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n })\n .passthrough();\n\nexport type ProfilePositionRecord = z.infer<typeof ProfilePositionRecordSchema>;\n","import { z } from 'zod';\n\nimport { BlobRefSchema } from './blob-ref.js';\nimport { datetimeSchema, externalRecordRefSchema, maxGraphemes, uriSchema } from './shared.js';\n\n/**\n * Duration of a presentation, in minutes. Mirrors\n * `id.sifa.profile.presentation#duration`: a fixed length (minMinutes only) or\n * a range (minMinutes to maxMinutes).\n */\nexport const PresentationDurationSchema = z\n .object({\n minMinutes: z.number().int().min(1),\n maxMinutes: z.number().int().min(1).optional(),\n })\n .refine((d) => d.maxMinutes === undefined || d.maxMinutes >= d.minMinutes, {\n message: 'maxMinutes must be greater than or equal to minMinutes',\n path: ['maxMinutes'],\n });\n\nexport type PresentationDuration = z.infer<typeof PresentationDurationSchema>;\n\n/**\n * A related link for a presentation or one of its deliveries. Mirrors\n * `id.sifa.defs#presentationLink`. `type` is an open enum (knownValues), so any\n * string is accepted.\n */\nexport const PresentationLinkSchema = z.object({\n uri: uriSchema,\n label: z.string().refine(maxGraphemes(64)).max(640).optional(),\n type: z.string().optional(),\n});\n\nexport type PresentationLink = z.infer<typeof PresentationLinkSchema>;\n\n/** Zod schema for `id.sifa.profile.presentation` records (the reusable content). */\nexport const ProfilePresentationRecordSchema = z.object({\n title: z.string().min(1).refine(maxGraphemes(300)).max(3000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n duration: PresentationDurationSchema.optional(),\n intendedAudiences: z\n .array(z.string().refine(maxGraphemes(100)).max(1000))\n .max(20)\n .optional(),\n links: z.array(PresentationLinkSchema).max(20).optional(),\n // Optional reference to a long-form write-up (pub.leaflet.document or\n // site.standard.document). Plain at-uri + optional cid so it tracks edits.\n writeupRef: externalRecordRefSchema.optional(),\n // Optional uploaded cover image for the talk page.\n coverImage: BlobRefSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfilePresentationRecord = z.infer<typeof ProfilePresentationRecordSchema>;\n","import { z } from 'zod';\n\nimport { PresentationLinkSchema } from './profile-presentation.js';\nimport { datetimeSchema, externalRecordRefSchema, maxGraphemes } from './shared.js';\n\n/**\n * Structured address for a delivery occasion. Mirrors\n * `community.lexicon.location.address` (all fields optional).\n */\nconst communityAddressSchema = z.object({\n country: z.string().optional(),\n postalCode: z.string().optional(),\n region: z.string().optional(),\n locality: z.string().optional(),\n street: z.string().optional(),\n name: z.string().optional(),\n});\n\n/**\n * Zod schema for `id.sifa.profile.presentationDelivery` records (one occasion\n * on which a presentation was delivered). Works standalone or linked to a\n * presentation and/or a calendar event. `role`, `mode`, and `status` are open\n * enums (knownValues); `mode`/`status` store the full\n * `community.lexicon.calendar.event` token.\n */\nexport const ProfilePresentationDeliveryRecordSchema = z.object({\n // Optional reference to the id.sifa.profile.presentation delivered here.\n presentationRef: externalRecordRefSchema.optional(),\n // Fallback title used when there is no presentationRef.\n title: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n role: z.string().refine(maxGraphemes(64)).max(640).optional(),\n eventName: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n // Calendar date as YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown.\n date: z\n .string()\n .regex(/^\\d{4}(-\\d{2}(-\\d{2})?)?$/, 'date must be YYYY, YYYY-MM or YYYY-MM-DD')\n .optional(),\n location: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n // Structured community.lexicon.location.address for the occasion. The\n // free-text `location` string above stays as a legacy fallback.\n address: communityAddressSchema.optional(),\n mode: z.string().optional(),\n status: z.string().optional(),\n links: z.array(PresentationLinkSchema).max(20).optional(),\n // Optional reference to a community.lexicon.calendar.event for this occasion.\n eventRef: externalRecordRefSchema.optional(),\n // DIDs of co-speakers who presented alongside the author at this occasion.\n coSpeakers: z\n .array(z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'))\n .max(20)\n .optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfilePresentationDeliveryRecord = z.infer<\n typeof ProfilePresentationDeliveryRecordSchema\n>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, partialDateSchema, uriSchema } from './shared.js';\n\n/** Author shape from `id.sifa.profile.publication#author`. */\nexport const PublicationAuthorSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n did: didSchema.optional(),\n});\n\nexport type PublicationAuthor = z.infer<typeof PublicationAuthorSchema>;\n\n/** `id.sifa.defs#relatedIdentifier`: a typed link to another version of the work (#590). */\nexport const RelatedIdentifierSchema = z.object({\n identifier: z.string().min(1).max(2048),\n identifierType: z.string().max(32).optional(),\n relationType: z.string().min(1).max(64),\n});\n\n/** Zod schema for `id.sifa.profile.publication` records. */\nexport const ProfilePublicationRecordSchema = z.object({\n title: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n subtitle: z.string().refine(maxGraphemes(200)).max(2000).optional(),\n publisher: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n url: uriSchema.optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n authors: z.array(PublicationAuthorSchema).max(50).optional(),\n relatedIdentifiers: z.array(RelatedIdentifierSchema).max(20).optional(),\n publishedAt: partialDateSchema.optional(),\n isPrimary: z.boolean().optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfilePublicationRecord = z.infer<typeof ProfilePublicationRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, languageTagSchema, maxGraphemes, selfLabelsSchema } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.self` records. Singleton (record key `self`).\n *\n * `knownValues` on `openTo` and `preferredWorkplace` are advisory per the\n * lexicon spec -- unknown values are allowed, but documented options live\n * under the `id.sifa.defs#*` namespace.\n */\nexport const ProfileSelfRecordSchema = z.object({\n headline: z.string().refine(maxGraphemes(120)).max(1200).optional(),\n about: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n industry: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n givenName: z.string().refine(maxGraphemes(64)).max(640).optional(),\n familyName: z.string().refine(maxGraphemes(64)).max(640).optional(),\n namePronunciation: z.string().refine(maxGraphemes(64)).max(640).optional(),\n location: z.unknown().optional(),\n openTo: z.array(z.string()).max(10).optional(),\n preferredWorkplace: z.array(z.string()).max(3).optional(),\n langs: z.array(languageTagSchema).max(3).optional(),\n labels: selfLabelsSchema.optional(),\n discoverable: z.boolean().optional(),\n /**\n * Where the avatar comes from instead of the avatar blob. Open per the\n * lexicon (`knownValues`); Sifa renders `actor.rpg.sprite`, the user's\n * rpg.actor character.\n */\n avatarSource: z.string().max(128).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileSelfRecord = z.infer<typeof ProfileSelfRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes } from './shared.js';\n\n/**\n * Zod schema for `id.sifa.profile.skill` records.\n *\n * `category` is advisory (`knownValues` in the lexicon) -- known values live\n * under `id.sifa.defs#*` but unknown values are accepted. `subCategory` is a\n * freeform user-defined grouping label nested under `category` (no known\n * values); renderers decide its display label.\n */\nexport const ProfileSkillRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(64)).max(640),\n category: z.string().optional(),\n subCategory: z.string().refine(maxGraphemes(64)).max(640).optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileSkillRecord = z.infer<typeof ProfileSkillRecordSchema>;\n","import { z } from 'zod';\n\nimport { datetimeSchema, didSchema, maxGraphemes, partialDateSchema } from './shared.js';\n\n/** Zod schema for `id.sifa.profile.volunteering` records. */\nexport const ProfileVolunteeringRecordSchema = z.object({\n organization: z.string().min(1).refine(maxGraphemes(100)).max(1000),\n organizationDid: didSchema.optional(),\n // Portable org entity identifier (Wikidata/ROR/LEI URI) from the typeahead.\n // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).\n entityRef: z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional(),\n role: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n cause: z.string().refine(maxGraphemes(100)).max(1000).optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type ProfileVolunteeringRecord = z.infer<typeof ProfileVolunteeringRecordSchema>;\n","import { z } from 'zod';\n\nimport { ArtifactLinkSchema } from './profile-involvement.js';\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n} from './shared.js';\n\n// Portable entity identifier (Wikidata/ROR/LEI URI) from the typeahead. Constrained\n// to http(s) so a script-bearing scheme is never a valid ref (#159). An investment\n// carries two of these -- the company and the vehicle -- so the check is shared.\nconst entityRefField = z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional();\n\n/**\n * A deliberately structured amount. Free text was rejected here: an unparseable\n * money string is worse than no amount at all, and cannot be repaired once people\n * have written them.\n */\nexport const InvestmentAmountSchema = z.object({\n /** Whole major currency units (euros, not cents). Cheque sizes are round numbers. */\n value: z.number().int().min(0),\n /** ISO 4217 three-letter code, uppercase. */\n currency: z.string().length(3),\n});\n\n/** Collection NSID for investment records. */\nexport const PROFILE_INVESTMENT_NSID = 'id.sifa.profile.investment';\n\n/** Zod schema for `id.sifa.profile.investment` records. */\nexport const ProfileInvestmentRecordSchema = z\n .object({\n /** For a limited-partner entry this names the fund, not a portfolio company. */\n company: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n companyDid: didSchema.optional(),\n entityRef: entityRefField,\n role: z.string().optional(),\n stage: z.string().optional(),\n status: z.string().optional(),\n /** The vehicle the capital went through. Absent for a cheque in the person's own name. */\n via: z.string().refine(maxGraphemes(256)).max(2560).optional(),\n viaDid: didSchema.optional(),\n viaEntityRef: entityRefField,\n /**\n * Optional and empty by default. Cheque size is a personal financial disclosure,\n * and clients must not prompt for it.\n */\n amount: InvestmentAmountSchema.optional(),\n startedAt: partialDateSchema.optional(),\n endedAt: partialDateSchema.optional(),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n links: z.array(ArtifactLinkSchema).max(50).optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n })\n .passthrough();\n\nexport type ProfileInvestmentRecord = z.infer<typeof ProfileInvestmentRecordSchema>;\n"]}
|
package/dist/schemas/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as ArtifactLink, c as ArtifactLinkSchema, d as AtmosphereFeedItem, e as AtmosphereFeedItemSchema, B as BlobRef, f as BlobRefSchema, E as EMPLOYMENT_STATUS_TOKENS, g as EmploymentVerificationRecord, h as EmploymentVerificationRecordSchema, i as EmploymentVerificationResolution, j as EndorsementConfirmationRecord, k as EndorsementConfirmationRecordSchema, l as EndorsementRecord, m as EndorsementRecordSchema, F as FeedActor, n as FeedActorSchema, o as FeedCursor, p as FollowFeedItem, q as FollowFeedItemSchema, r as FollowFeedPage, s as FollowFeedPageSchema, G as GraphFollowRecord, t as GraphFollowRecordSchema, I as InvestmentAmountSchema, u as OrgEmploymentAttestationRecord, v as OrgEmploymentAttestationRecordSchema, O as OrgProfileRecord, w as OrgProfileRecordSchema, x as PROFILE_INVESTMENT_NSID, y as PROFILE_INVOLVEMENT_NSID, P as PresentationDuration, z as PresentationDurationSchema, C as PresentationLink, D as PresentationLinkSchema, H as ProfileCertificationRecord, J as ProfileCertificationRecordSchema, K as ProfileCourseRecord, L as ProfileCourseRecordSchema, M as ProfileEducationRecord, N as ProfileEducationRecordSchema, Q as ProfileExternalAccountRecord, R as ProfileExternalAccountRecordSchema, S as ProfileHonorRecord, T as ProfileHonorRecordSchema, am as ProfileInvestmentRecord, U as ProfileInvestmentRecordSchema, V as ProfileInvolvementRecord, W as ProfileInvolvementRecordSchema, X as ProfileLanguageRecord, Y as ProfileLanguageRecordSchema, Z as ProfilePositionRecord, _ as ProfilePositionRecordSchema, a as ProfilePresentationDeliveryRecord, $ as ProfilePresentationDeliveryRecordSchema, b as ProfilePresentationRecord, a0 as ProfilePresentationRecordSchema, a1 as ProfileProjectRecord, a2 as ProfileProjectRecordSchema, a3 as ProfilePublicationRecord, a4 as ProfilePublicationRecordSchema, a5 as ProfileSelfRecord, a6 as ProfileSelfRecordSchema, a7 as ProfileSkillRecord, a8 as ProfileSkillRecordSchema, a9 as ProfileVolunteeringRecord, aa as ProfileVolunteeringRecordSchema, ab as PublicationAuthor, ac as PublicationAuthorSchema, ad as RelatedIdentifierSchema, ae as ResolveEmploymentVerificationOptions, af as SifaFeedItem, ag as SifaFeedItemSchema, ah as VERIFICATION_METHOD_TOKENS, ai as decodeFeedCursor, aj as encodeFeedCursor, ak as makeGraphFollowRecordSchema, al as resolveEmploymentVerification } from '../profile-investment-QSwX2GL5.cjs';
|
|
2
|
-
export { a as EntityImportSearchResponse, b as EntityImportSearchResponseSchema, c as EntityMintDomainResponse, d as EntityMintDomainResponseSchema, e as EntityResolveDomainRequest, f as EntityResolveDomainRequestSchema, g as EntityResolveDomainResponse, h as EntityResolveDomainResponseSchema, i as EntitySearchResponse, j as EntitySearchResponseSchema, E as EntitySearchResult, k as EntitySearchResultSchema, l as EntitySelectRequest, m as EntitySelectRequestSchema, n as EntitySelectResponse, o as EntitySelectResponseSchema, F as FEATURE_FLAGS, p as FeatureAllowlistEntry, q as FeatureAllowlistEntrySchema, r as FeatureFlag, s as FollowProfileItem, t as FollowProfilePage, u as FollowProfilePageSchema, v as FollowProfileSchema } from '../follow-profile-
|
|
2
|
+
export { a as EntityImportSearchResponse, b as EntityImportSearchResponseSchema, c as EntityMintDomainResponse, d as EntityMintDomainResponseSchema, e as EntityResolveDomainRequest, f as EntityResolveDomainRequestSchema, g as EntityResolveDomainResponse, h as EntityResolveDomainResponseSchema, i as EntitySearchResponse, j as EntitySearchResponseSchema, E as EntitySearchResult, k as EntitySearchResultSchema, l as EntitySelectRequest, m as EntitySelectRequestSchema, n as EntitySelectResponse, o as EntitySelectResponseSchema, F as FEATURE_FLAGS, p as FeatureAllowlistEntry, q as FeatureAllowlistEntrySchema, r as FeatureFlag, s as FollowProfileItem, t as FollowProfilePage, u as FollowProfilePageSchema, v as FollowProfileSchema } from '../follow-profile-CgLLLQtJ.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
export { A as AgentRef, f as agentRefSchema, g as atUriSchema, i as cidSchema, j as datetimeSchema, k as didSchema, l as externalRecordRefSchema, o as languageTagSchema, p as maxGraphemes, q as partialDateSchema,
|
|
4
|
+
export { A as AgentRef, f as agentRefSchema, g as atUriSchema, i as cidSchema, j as datetimeSchema, k as didSchema, l as externalRecordRefSchema, o as languageTagSchema, p as maxGraphemes, q as partialDateSchema, u as selfLabelsSchema, v as skillRefSchema, w as strongRefSchema, x as uriSchema } from '../verification-providers-DeyGqaoC.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Relations shipped today. The lexicon declares these as `knownValues`, not an
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as ArtifactLink, c as ArtifactLinkSchema, d as AtmosphereFeedItem, e as AtmosphereFeedItemSchema, B as BlobRef, f as BlobRefSchema, E as EMPLOYMENT_STATUS_TOKENS, g as EmploymentVerificationRecord, h as EmploymentVerificationRecordSchema, i as EmploymentVerificationResolution, j as EndorsementConfirmationRecord, k as EndorsementConfirmationRecordSchema, l as EndorsementRecord, m as EndorsementRecordSchema, F as FeedActor, n as FeedActorSchema, o as FeedCursor, p as FollowFeedItem, q as FollowFeedItemSchema, r as FollowFeedPage, s as FollowFeedPageSchema, G as GraphFollowRecord, t as GraphFollowRecordSchema, I as InvestmentAmountSchema, u as OrgEmploymentAttestationRecord, v as OrgEmploymentAttestationRecordSchema, O as OrgProfileRecord, w as OrgProfileRecordSchema, x as PROFILE_INVESTMENT_NSID, y as PROFILE_INVOLVEMENT_NSID, P as PresentationDuration, z as PresentationDurationSchema, C as PresentationLink, D as PresentationLinkSchema, H as ProfileCertificationRecord, J as ProfileCertificationRecordSchema, K as ProfileCourseRecord, L as ProfileCourseRecordSchema, M as ProfileEducationRecord, N as ProfileEducationRecordSchema, Q as ProfileExternalAccountRecord, R as ProfileExternalAccountRecordSchema, S as ProfileHonorRecord, T as ProfileHonorRecordSchema, am as ProfileInvestmentRecord, U as ProfileInvestmentRecordSchema, V as ProfileInvolvementRecord, W as ProfileInvolvementRecordSchema, X as ProfileLanguageRecord, Y as ProfileLanguageRecordSchema, Z as ProfilePositionRecord, _ as ProfilePositionRecordSchema, a as ProfilePresentationDeliveryRecord, $ as ProfilePresentationDeliveryRecordSchema, b as ProfilePresentationRecord, a0 as ProfilePresentationRecordSchema, a1 as ProfileProjectRecord, a2 as ProfileProjectRecordSchema, a3 as ProfilePublicationRecord, a4 as ProfilePublicationRecordSchema, a5 as ProfileSelfRecord, a6 as ProfileSelfRecordSchema, a7 as ProfileSkillRecord, a8 as ProfileSkillRecordSchema, a9 as ProfileVolunteeringRecord, aa as ProfileVolunteeringRecordSchema, ab as PublicationAuthor, ac as PublicationAuthorSchema, ad as RelatedIdentifierSchema, ae as ResolveEmploymentVerificationOptions, af as SifaFeedItem, ag as SifaFeedItemSchema, ah as VERIFICATION_METHOD_TOKENS, ai as decodeFeedCursor, aj as encodeFeedCursor, ak as makeGraphFollowRecordSchema, al as resolveEmploymentVerification } from '../profile-investment-QSwX2GL5.js';
|
|
2
|
-
export { a as EntityImportSearchResponse, b as EntityImportSearchResponseSchema, c as EntityMintDomainResponse, d as EntityMintDomainResponseSchema, e as EntityResolveDomainRequest, f as EntityResolveDomainRequestSchema, g as EntityResolveDomainResponse, h as EntityResolveDomainResponseSchema, i as EntitySearchResponse, j as EntitySearchResponseSchema, E as EntitySearchResult, k as EntitySearchResultSchema, l as EntitySelectRequest, m as EntitySelectRequestSchema, n as EntitySelectResponse, o as EntitySelectResponseSchema, F as FEATURE_FLAGS, p as FeatureAllowlistEntry, q as FeatureAllowlistEntrySchema, r as FeatureFlag, s as FollowProfileItem, t as FollowProfilePage, u as FollowProfilePageSchema, v as FollowProfileSchema } from '../follow-profile-
|
|
2
|
+
export { a as EntityImportSearchResponse, b as EntityImportSearchResponseSchema, c as EntityMintDomainResponse, d as EntityMintDomainResponseSchema, e as EntityResolveDomainRequest, f as EntityResolveDomainRequestSchema, g as EntityResolveDomainResponse, h as EntityResolveDomainResponseSchema, i as EntitySearchResponse, j as EntitySearchResponseSchema, E as EntitySearchResult, k as EntitySearchResultSchema, l as EntitySelectRequest, m as EntitySelectRequestSchema, n as EntitySelectResponse, o as EntitySelectResponseSchema, F as FEATURE_FLAGS, p as FeatureAllowlistEntry, q as FeatureAllowlistEntrySchema, r as FeatureFlag, s as FollowProfileItem, t as FollowProfilePage, u as FollowProfilePageSchema, v as FollowProfileSchema } from '../follow-profile-CVcA2w1v.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
export { A as AgentRef, f as agentRefSchema, g as atUriSchema, i as cidSchema, j as datetimeSchema, k as didSchema, l as externalRecordRefSchema, o as languageTagSchema, p as maxGraphemes, q as partialDateSchema,
|
|
4
|
+
export { A as AgentRef, f as agentRefSchema, g as atUriSchema, i as cidSchema, j as datetimeSchema, k as didSchema, l as externalRecordRefSchema, o as languageTagSchema, p as maxGraphemes, q as partialDateSchema, u as selfLabelsSchema, v as skillRefSchema, w as strongRefSchema, x as uriSchema } from '../verification-providers-DeyGqaoC.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Relations shipped today. The lexicon declares these as `knownValues`, not an
|
package/dist/taxonomy/index.js
CHANGED
|
@@ -138,7 +138,9 @@ import {
|
|
|
138
138
|
isKnownVerificationProvider,
|
|
139
139
|
resolveVerifierProvider,
|
|
140
140
|
buildVerifierListMembers,
|
|
141
|
-
primaryVerification
|
|
141
|
+
primaryVerification,
|
|
142
|
+
resolveVerificationBadges,
|
|
143
|
+
verificationLabel
|
|
142
144
|
} from "./verification-providers.js";
|
|
143
145
|
import {
|
|
144
146
|
INVESTMENT_ROLE_OPTIONS,
|
|
@@ -258,8 +260,10 @@ export {
|
|
|
258
260
|
openToValueToToken,
|
|
259
261
|
primaryVerification,
|
|
260
262
|
readEqfLevel,
|
|
263
|
+
resolveVerificationBadges,
|
|
261
264
|
resolveVerifierProvider,
|
|
262
265
|
splitCoursesByRole,
|
|
263
|
-
suggestEqfLevelFromDegree
|
|
266
|
+
suggestEqfLevelFromDegree,
|
|
267
|
+
verificationLabel
|
|
264
268
|
};
|
|
265
269
|
//# sourceMappingURL=index.js.map
|