import { type NotificationDraftT, type Platform } from './notification.js'; /** * Capability Catalog contract. Unsupported fields must produce * explicit capability results, never silent loss. */ export type FieldStatus = 'supported' | 'unsupported' | 'downgraded'; export interface CapabilityField { /** JSON-pointer-ish path inside the draft, e.g. "presentation.title". */ path: string; status: FieldStatus; /** Present when unsupported/downgraded: why the target surface cannot honor it. */ reason?: string; constraints?: Record; } export interface CapabilityDocument { schema_version: number; platform: Platform; /** Opaque identity of the complete Notification Request schema this service accepts. */ notification_contract_fingerprint: string; /** Provider payload ceiling in bytes; null when no push provider carries the request. */ payload_limit_bytes: number | null; sounds: string[]; interruption_levels: string[]; fields: CapabilityField[]; } export declare const IOS_CAPABILITIES_V1: CapabilityDocument; export declare const MACOS_CAPABILITIES_V1: CapabilityDocument; export declare const WINDOWS_CAPABILITIES_V1: CapabilityDocument; export declare const LINUX_CAPABILITIES_V1: CapabilityDocument; /** Android 6+ with Google Play services, using an application-owned FCM data envelope. */ export declare const ANDROID_CAPABILITIES_V1: CapabilityDocument; /** * Catalog lookup for validation/help metadata. Version and build are explicit so * two binaries on one marketing line may diverge; advertised capabilities, not * this document, remain routing authority. */ export interface CapabilityRegistry { describe(platform: Platform, appVersion?: string, appBuild?: string): CapabilityDocument | null; } export declare function createCapabilityRegistry(documents: readonly CapabilityDocument[]): CapabilityRegistry; /** V1 publishes the client-visible contract for every current Companion surface. */ export declare const CAPABILITY_DOCUMENTS_V1: readonly [CapabilityDocument, CapabilityDocument, CapabilityDocument, CapabilityDocument, CapabilityDocument]; export declare const CAPABILITIES_V1: CapabilityRegistry; export interface ValidationIssue { code: 'invalid_request' | 'unsupported_field' | 'payload_too_large'; path: string; message: string; } export interface CapabilityWarning { path: string; message: string; } export interface ValidationReport { ok: boolean; errors: ValidationIssue[]; warnings: CapabilityWarning[]; } /** * Validate a draft against the schema and one or more capability documents. Shared by the * CLI (offline pre-flight with the bundled document) and the control plane * (authoritative check at submission). */ export declare function validateDraft(draft: unknown, capabilities?: CapabilityDocument | readonly CapabilityDocument[]): ValidationReport; /** * Conservative byte accounting for the exact APNs envelope. A fixed-length * signed media URL keeps pre-flight validation safe before a real URL exists. */ export declare function estimateApnsPayloadBytes(draft: NotificationDraftT): number; /** Conservative byte accounting for the exact FCM data map rendered for Android. */ export declare function estimateFcmPayloadBytes(draft: NotificationDraftT): number;