import { Sql } from 'postgres'; import { ResolvedActionDirective } from '../extractors/action_directives.js'; import { TableOfContents } from '../extractors/table_of_contents.js'; import { LegiResolver } from '../legi/resolver.js'; import { LinkType } from '../links.js'; export type ParsedBillSourceFormat = "assemblee-html" | "akoma-ntoso"; export type ParsedBillBlockKind = "directive_candidate" | "context" | "noise"; export type ParsedBillToc = TableOfContents; export type ParsedBillBlock = { id: string; articleId: string; kind: ParsedBillBlockKind; links: ParsedBillLink[]; text: string; html: string; }; export type ParsedBillLink = { id: string; insideFrenchQuotes?: boolean; text?: string; type: "article" | "division" | "text"; }; export type ParsedBillArticle = { id: string; label: string; num?: string; title?: string; text: string; html: string; directiveText: string; blocks: ParsedBillBlock[]; }; export type ParsedBillDirective = { articleId: string; blockId?: string; sourceBlockIds?: string[]; sourceBlockText?: string; sourceBlockHtml?: string; sourceBlockPosition?: { start: number; stop: number; }; sourceContextBlockIds?: string[]; sourceContextText?: string; sourceContextHtml?: string; sourceContextPosition?: { start: number; stop: number; }; directive: ResolvedActionDirective; createdArticle?: ParsedBillInternalArticleTarget; createdArticles?: ParsedBillInternalArticleTarget[]; internalTarget?: ParsedBillInternalArticleTarget & { resolution: "explicit" | "fallback"; }; internalTargetAmbiguity?: ParsedBillInternalArticleTarget; targetIds?: string[]; }; export type ParsedBillInternalArticleTarget = { definitionId: string; num: string; }; export type ParsedBillInternalArticleDefinition = ParsedBillInternalArticleTarget & { articleId: string; blockId?: string; html: string; parentTargetIds?: string[]; sourceDirectiveId?: string; sourceBlockHtml?: string; sourceBlockText?: string; text: string; }; export type ParseBillRawOptions = { canutesDb?: Sql; date?: string; legiResolver?: LegiResolver; linkBaseUrl: string; linkType: LinkType; linkedHtml?: string; logIgnoredReferencesTypes?: boolean; logPartialReferences?: boolean; logReferences?: boolean; }; export type LinkedBillDocument = { sourceFormat: ParsedBillSourceFormat; documentDate?: string; html: string; linkedHtml: string; }; export type ParsedBillDocument = { sourceFormat: ParsedBillSourceFormat; documentDate?: string; html: string; htmlWithLinks: string; tableOfContents: ParsedBillToc; articles: ParsedBillArticle[]; globalApplicabilityDate?: string; internalArticleDefinitions?: ParsedBillInternalArticleDefinition[]; directives: ParsedBillDirective[]; }; export declare function parseAssembleeBillRaw(input: string, options: ParseBillRawOptions): Promise; export declare function linkAssembleeBillRaw(input: string, options: ParseBillRawOptions): Promise; export declare function renderAkomaNtosoBillRaw(input: string): LinkedBillDocument; export declare function parseAkomaNtosoBillRaw(input: string, options: ParseBillRawOptions): Promise; export declare function linkAkomaNtosoBillRaw(input: string, options: ParseBillRawOptions): Promise;