/** * @file 七政四余本命出生时间整秒区间 * @description 核验固定 UTC+8 的本命候选区间,不接收流曜与行限目标。 */ import { type QizhengInput, type QizhengResult } from './index'; export type QizhengBirthRangeInput = { startTimestamp: number; endTimestamp: number; }; export type QizhengBirthRangeOptions = { onProgress?: (completed: number, total: number) => void; signal?: AbortSignal; }; export type QizhengBirthRangeSource = { startTimestamp: number; endTimestamp: number; endExclusive: true; timezone: 'Asia/Shanghai'; offsetHours: 8; }; export type QizhengBirthRangeContinuousFact = { /** 机器读取路径;展示层应使用 label。 */ path: string; /** 面向提示词/UI 的中文事实名称。 */ label: string; unit: string; /** 起点样本的原始值;圆周量不在此处改写。 */ first: number; /** 终点前一秒样本的原始值;圆周量不在此处改写。 */ last: number; /** * 整秒样本观察值的最小值。圆周量按相对首样本的最短弧解卷绕后统计, * 因此 min/max 可能超出 0-360 显示范围。 */ min: number; max: number; sampleCount: number; circular?: { period: number; mode: 'shortest-arc-from-first'; note: string; }; }; export type QizhengBirthRangeBranch = { startTimestamp: number; endTimestamp: number; endExclusive: true; sampleCount: number; /** 离散分支起点的完整七政本命盘。 */ representative: QizhengResult; /** 离散分支终点前一秒的完整七政本命盘。 */ last: QizhengResult; continuous: QizhengBirthRangeContinuousFact[]; }; export type QizhengBirthRange = { /** 仅覆盖出生本命,不包含流曜目标期。 */ coverage: 'natal'; status: 'stable' | 'conditional'; source: QizhengBirthRangeSource; resolutionSeconds: 1; sampleCount: number; branches: QizhengBirthRangeBranch[]; }; type ContinuousSample = { path: string; label: string; unit: string; value: number; circularPeriod?: number; }; /** * 流曜出生区间复用的本命离散事实指纹。 * 这里必须沿用本命范围的完整投影,避免流曜范围自行缩减七曜、太阳交界和证据字段。 */ export declare function getQizhengBirthRangeDiscreteFingerprint(result: QizhengResult): string; export type QizhengBirthRangeContinuousSample = ContinuousSample; /** 流曜出生区间复用本命连续事实的采样集合。 */ export declare function collectQizhengBirthRangeContinuousSamples(result: QizhengResult): QizhengBirthRangeContinuousSample[]; export declare function generateQizhengBirthRange(input: QizhengInput, range: QizhengBirthRangeInput, options?: QizhengBirthRangeOptions): QizhengBirthRange; export {};