export declare const TICKET_TTL_SECONDS = 300;
export declare const TICKET_NONCE_BYTES = 16;
export type QrTokenScope = 'checkpoint' | 'shared';
export interface TicketPayload {
    companyId: string;
    targetMode: 'local' | 'external';
    targetCode: string | null;
    targetUrl: string | null;
    dispatchCheckpointId: string;
    dispatchOrigin: string;
    ts: number;
    nonce: string;
}
export interface QrTokenValidationResult {
    valid: boolean;
    reason?: 'invalid' | 'expired' | 'malformed';
}
export declare function getAllowedHosts(): string[];
export declare function isAllowedHost(url: string): boolean;
export interface IssueQrTokenParams {
    scope: QrTokenScope;
    checkpointCode: string;
    rotationSeconds: number | null;
    now?: number;
}
export interface IssueQrTokenResult {
    token: string;
    expiresAt: number | null;
}
export declare function issueQrToken(params: IssueQrTokenParams): IssueQrTokenResult;
export interface ValidateQrTokenParams {
    token: string;
    scope: QrTokenScope;
    checkpointCode: string;
    rotationSeconds: number | null;
    graceSeconds: number;
    now?: number;
}
export declare function validateQrToken(params: ValidateQrTokenParams): QrTokenValidationResult;
export interface IssueTicketParams {
    companyId: string;
    targetMode: 'local' | 'external';
    targetCode: string | null;
    targetUrl: string | null;
    dispatchCheckpointId: string;
    dispatchOrigin: string;
    now?: number;
}
export interface IssueTicketResult {
    ticket: string;
    payload: TicketPayload;
    expiresAt: number;
}
export declare function issueTicket(params: IssueTicketParams): IssueTicketResult;
export type ValidateTicketReason = 'malformed' | 'invalid' | 'expired' | 'origin_not_allowed';
export interface ValidateTicketShapeResult {
    valid: boolean;
    reason?: ValidateTicketReason;
    payload?: TicketPayload;
}
export declare function validateTicketShape(ticket: string, now?: number): ValidateTicketShapeResult;
