import { z } from 'zod'; /** * A single typeahead row. Discriminated on `source`: a curated `entity` row * carries `entityId`, a `pdl` staging row carries `pdlId`. The union guarantees * the identifier for the row's source is always present, so a stable React key * can never be `entity:undefined`. The disambiguation fields * (domain/country/parentName) drive the dropdown display. */ declare const EntitySearchResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"entity">; entityId: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"pdl">; pdlId: z.ZodString; }, z.core.$strip>], "source">; type EntitySearchResult = z.infer; /** Response of `GET /api/entities/search`. */ declare const EntitySearchResponseSchema: z.ZodObject<{ results: z.ZodArray; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"entity">; entityId: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"pdl">; pdlId: z.ZodString; }, z.core.$strip>], "source">>; hasMore: z.ZodBoolean; }, z.core.$strip>; type EntitySearchResponse = z.infer; /** * Body of `POST /api/entities/select`: promote a PDL row OR bump an entity. * Exactly one of `entityId`/`pdlId` must be present -- supplying both is * ambiguous (the server would have to silently pick one) and is rejected. */ declare const EntitySelectRequestSchema: z.ZodObject<{ entityId: z.ZodOptional; pdlId: z.ZodOptional; }, z.core.$strip>; type EntitySelectRequest = z.infer; /** Response of `POST /api/entities/select`. `entityRef` is the portable * Wikidata/ROR/LEI URI to write to the position record, or null for a * PDL-only entity (its resolution stays AppView-side). */ declare const EntitySelectResponseSchema: z.ZodObject<{ entityId: z.ZodNumber; slug: z.ZodString; kind: z.ZodString; canonicalName: z.ZodString; domain: z.ZodNullable; website: z.ZodDefault>; websiteTier: z.ZodDefault>>; entityRef: z.ZodNullable; }, z.core.$strip>; type EntitySelectResponse = z.infer; /** Response of `POST /api/entities/import-search`. */ declare const EntityImportSearchResponseSchema: z.ZodObject<{ results: z.ZodArray; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"entity">; entityId: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"pdl">; pdlId: z.ZodString; }, z.core.$strip>], "source">>; }, z.core.$strip>; type EntityImportSearchResponse = z.infer; /** * Body of the domain grow-on-demand endpoints (`POST /api/entities/resolve-domain` * and `POST /api/entities/mint-domain`). The server re-validates the value as a * registrable domain; 253 is the max DNS name length. */ declare const EntityResolveDomainRequestSchema: z.ZodObject<{ domain: z.ZodString; }, z.core.$strip>; type EntityResolveDomainRequest = z.infer; /** * Response of `POST /api/entities/resolve-domain` (grow-on-demand Branch 1). Any * notable companies whose official website is the domain, imported from Wikidata. * `canMint` is true when nothing notable matched AND the domain is eligible for * the user-initiated mint-from-domain path -- it drives the "Add " * affordance. */ declare const EntityResolveDomainResponseSchema: z.ZodObject<{ results: z.ZodArray; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"entity">; entityId: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"pdl">; pdlId: z.ZodString; }, z.core.$strip>], "source">>; canMint: z.ZodBoolean; }, z.core.$strip>; type EntityResolveDomainResponse = z.infer; /** * Response of `POST /api/entities/mint-domain` (grow-on-demand Branch 2). The * linkable entity minted from (or already resolved for) the domain. A non-2xx * status (e.g. the domain is not mintable, a confusable look-alike, or the site * yielded nothing usable) surfaces as a thrown error, not a null result. * * `pending` is true when the entity is a fresh hidden-pending mint: the * requesting user's own link resolves to it immediately, but it stays out of * other users' typeahead + aggregation until an admin approves it. Clients should * reflect this ("added -- pending review") rather than "added & live". */ declare const EntityMintDomainResponseSchema: z.ZodObject<{ result: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"entity">; entityId: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodString; name: z.ZodString; domain: z.ZodNullable; country: z.ZodNullable; logoUrl: z.ZodNullable; parentName: z.ZodNullable; source: z.ZodLiteral<"pdl">; pdlId: z.ZodString; }, z.core.$strip>], "source">; pending: z.ZodBoolean; }, z.core.$strip>; type EntityMintDomainResponse = z.infer; /** * Profile row shared across `/api/following`, `/api/profile/:handleOrDid/mutuals`, * and `/api/me/bluesky-suggestions`. Matches the existing `FollowProfile` TS * interface byte-for-byte but adds runtime validation for the SDK's pagination * helpers and the upcoming `sifa-app` consumer (where we can't trust the wire). * * Per `sifa-api#674` PR body: mutuals + bluesky-suggestions reuse this shape * exactly, so a single Zod schema covers all three endpoints. */ declare const FollowProfileSchema: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; headline: z.ZodOptional; avatarUrl: z.ZodOptional; source: z.ZodString; claimed: z.ZodBoolean; followedAt: z.ZodString; blueskyVerified: z.ZodOptional; blueskyVerifiedAt: z.ZodOptional>; }, z.core.$strip>; type FollowProfileItem = z.infer; /** * Cursor-paginated page of {@link FollowProfileSchema} rows. Used by mutuals * + bluesky-suggestions. The legacy `/api/following` endpoint uses a different * wrapper key (`follows` instead of `items`) and is intentionally NOT covered * by this schema. */ declare const FollowProfilePageSchema: z.ZodObject<{ items: z.ZodArray; headline: z.ZodOptional; avatarUrl: z.ZodOptional; source: z.ZodString; claimed: z.ZodBoolean; followedAt: z.ZodString; blueskyVerified: z.ZodOptional; blueskyVerifiedAt: z.ZodOptional>; }, z.core.$strip>>; cursor: z.ZodNullable; }, z.core.$strip>; type FollowProfilePage = z.infer; /** * Per-flag allowlist row returned by `GET /api/admin/feature-allowlists/:flag`. * Mirrors the `feature_allowlists` table; `note` is optional free-form text. */ declare const FeatureAllowlistEntrySchema: z.ZodObject<{ did: z.ZodString; addedAt: z.ZodString; note: z.ZodOptional>; }, z.core.$strip>; type FeatureAllowlistEntry = z.infer; /** * Known feature flags accepted by the admin allowlist endpoints. Mirrors the * server-side `FEATURE_FLAGS` const in `sifa-api`. Kept as a `const` tuple so * consumers can `as const`-narrow when building UIs. */ declare const FEATURE_FLAGS: readonly ["FEED_V5_ENABLED"]; type FeatureFlag = (typeof FEATURE_FLAGS)[number]; /** * Feed item from `GET /api/following/feed`. Discriminated on `source`: * * - `sifa`: a Sifa-native event (e.g. profile update, endorsement). * - `atmosphere`: a curated creation event from another ATproto app * (Barazo post, etc.). Payload is the hydrated `app.bsky.embed.*#view` * shape, NOT the raw record (per memory `sifa-hydrated-view-embed-types`). * * Both variants share `actor`, `indexedAt`, and `id` (the materialized * `feed_events.id` row identifier, used in the cursor). */ declare const FeedActorSchema: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; avatarUrl: z.ZodOptional; }, z.core.$strip>; type FeedActor = z.infer; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ declare const SifaFeedItemSchema: z.ZodObject<{ id: z.ZodString; actor: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; avatarUrl: z.ZodOptional; }, z.core.$strip>; indexedAt: z.ZodString; eventType: z.ZodString; source: z.ZodLiteral<"sifa">; appId: z.ZodOptional>; payload: z.ZodRecord; }, z.core.$strip>; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ type SifaFeedItem = z.infer; /** * ATmosphere feed item. `payload` is intentionally permissive: it carries * a hydrated `app.bsky.embed.*#view` shape that varies by source app. The * AppView resolves the hydration; clients render via the existing * embed-view union (mirrors `sifa-web/src/components/stream/`). * * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ declare const AtmosphereFeedItemSchema: z.ZodObject<{ id: z.ZodString; actor: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; avatarUrl: z.ZodOptional; }, z.core.$strip>; indexedAt: z.ZodString; eventType: z.ZodString; source: z.ZodLiteral<"atmosphere">; appId: z.ZodString; uri: z.ZodOptional; cid: z.ZodOptional; payload: z.ZodRecord; }, z.core.$strip>; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ type AtmosphereFeedItem = z.infer; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ declare const FollowFeedItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ id: z.ZodString; actor: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; avatarUrl: z.ZodOptional; }, z.core.$strip>; indexedAt: z.ZodString; eventType: z.ZodString; source: z.ZodLiteral<"sifa">; appId: z.ZodOptional>; payload: z.ZodRecord; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; actor: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; avatarUrl: z.ZodOptional; }, z.core.$strip>; indexedAt: z.ZodString; eventType: z.ZodString; source: z.ZodLiteral<"atmosphere">; appId: z.ZodString; uri: z.ZodOptional; cid: z.ZodOptional; payload: z.ZodRecord; }, z.core.$strip>], "source">; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ type FollowFeedItem = z.infer; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ declare const FollowFeedPageSchema: z.ZodObject<{ items: z.ZodArray; avatarUrl: z.ZodOptional; }, z.core.$strip>; indexedAt: z.ZodString; eventType: z.ZodString; source: z.ZodLiteral<"sifa">; appId: z.ZodOptional>; payload: z.ZodRecord; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; actor: z.ZodObject<{ did: z.ZodString; handle: z.ZodString; displayName: z.ZodOptional; avatarUrl: z.ZodOptional; }, z.core.$strip>; indexedAt: z.ZodString; eventType: z.ZodString; source: z.ZodLiteral<"atmosphere">; appId: z.ZodString; uri: z.ZodOptional; cid: z.ZodOptional; payload: z.ZodRecord; }, z.core.$strip>], "source">>; cursor: z.ZodNullable; }, z.core.$strip>; /** * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674). * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere * Stream are two distinct surfaces with different data paths (Barazo API * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed * types are no longer consumed. Scheduled for removal in next major bump. */ type FollowFeedPage = z.infer; /** * Composite feed cursor `(indexedAt DESC, source, id)`. Encoded as a * URL-safe base64 string so it survives `URLSearchParams` round-trips * without further encoding. Decoupling encode/decode from the API call * lets consumers persist cursors (e.g. for "jump-back-here" UX) and * lets us unit-test the format. */ interface FeedCursor { indexedAt: string; source: 'sifa' | 'atmosphere'; id: string; } declare function encodeFeedCursor(cursor: FeedCursor): string; declare function decodeFeedCursor(encoded: string): FeedCursor; export { type AtmosphereFeedItem as A, type FollowProfileItem as B, type FollowProfilePage as C, FollowProfilePageSchema as D, type EntitySearchResult as E, FEATURE_FLAGS as F, FollowProfileSchema as G, SifaFeedItemSchema as H, decodeFeedCursor as I, encodeFeedCursor as J, type SifaFeedItem as S, AtmosphereFeedItemSchema as a, type EntityImportSearchResponse as b, EntityImportSearchResponseSchema as c, type EntityMintDomainResponse as d, EntityMintDomainResponseSchema as e, type EntityResolveDomainRequest as f, EntityResolveDomainRequestSchema as g, type EntityResolveDomainResponse as h, EntityResolveDomainResponseSchema as i, type EntitySearchResponse as j, EntitySearchResponseSchema as k, EntitySearchResultSchema as l, type EntitySelectRequest as m, EntitySelectRequestSchema as n, type EntitySelectResponse as o, EntitySelectResponseSchema as p, type FeatureAllowlistEntry as q, FeatureAllowlistEntrySchema as r, type FeatureFlag as s, type FeedActor as t, FeedActorSchema as u, type FeedCursor as v, type FollowFeedItem as w, FollowFeedItemSchema as x, type FollowFeedPage as y, FollowFeedPageSchema as z };