import { type APArticle, type APNote, type APCreate } from './activityTypes.js'; export interface ContentItemInput { id: string; type: string; title: string; slug: string; description?: string | null; content?: unknown; coverImageUrl?: string | null; publishedAt?: Date | null; updatedAt?: Date | null; /** Tag names to include as AP Hashtag objects */ tags?: string[]; /** Stored canonical AP object URI — if present, used instead of generating one */ apObjectId?: string | null; /** CommonPub metadata: difficulty, build time, cost, parts, etc. */ difficulty?: string | null; buildTime?: string | null; estimatedCost?: string | null; parts?: unknown[] | null; } export interface AuthorInput { username: string; displayName?: string | null; } export interface CommentInput { id: string; content: string; targetId: string; targetType: string; createdAt?: Date | null; } /** Map a CommonPub content item to an AP Article */ export declare function contentToArticle(item: ContentItemInput, author: AuthorInput, domain: string): APArticle; /** * Build a Create activity wrapping a content item's AP Article, suitable for an * actor's OUTBOX projection. * * Unlike `buildCreateActivity` (which stamps a RANDOM activity id + `published: now`), * this is DETERMINISTIC: the activity id is `#create` and `published` is the * content's real publish time. Both properties are load-bearing for the outbox: * - the outbox is rebuilt on every crawl, so the activity id must be stable (otherwise * every render emits a new id, breaking consumer de-dup / caching), and * - bounded backfill paginates by `published`, so it must reflect the real date, not "now". * * De-dup on the consumer side keys on `object.id` (the content's canonical AP URI), so * sharing this builder between live delivery and the outbox never produces duplicates. */ export declare function contentToCreateActivity(item: ContentItemInput, author: AuthorInput, domain: string): APCreate; /** Escape HTML for safe embedding in AP objects */ export declare function escapeHtmlForAP(text: string): string; /** Map a CommonPub comment to an AP Note */ export declare function contentToNote(comment: CommentInput, author: AuthorInput, domain: string, parentObjectUri?: string): APNote; /** Parse an AP Article into a content insert shape */ export declare function articleToContent(article: APArticle): { title: string; content: string; description?: string; coverImageUrl?: string; publishedAt?: Date; }; /** Parse an AP Note into a comment insert shape */ export declare function noteToComment(note: APNote): { content: string; inReplyTo?: string; }; //# sourceMappingURL=contentMapper.d.ts.map