import { z } from "zod"; /** The JWS `typ` of the signed entitlement document. */ export declare const ENTITLEMENT_TYPE = "decionis-edge-entitlement+jwt"; /** How long after a period ends its report is due, when no entitlement says otherwise. */ export declare const DEFAULT_REPORT_DUE_DAYS = 35; /** * The entitlement's claims (Edge evaluator phase 4, section 2). Claims this * host does not read are allowed, so Decionis can add one without breaking * a deployed executor. `volume_band` is read only for a ceiling it states. */ export declare const EntitlementClaimsSchema: z.ZodObject<{ iss: z.ZodString; aud: z.ZodString; iat: z.ZodNumber; exp: z.ZodNumber; plan: z.ZodString; tier: z.ZodEnum<{ hosted: "hosted"; dedicated: "dedicated"; self_managed: "self_managed"; }>; included_actions_per_month: z.ZodNullable; volume_band: z.ZodUnknown; edge: z.ZodBoolean; usage_report_due_days: z.ZodNumber; }, z.core.$loose>; export type EntitlementClaims = z.infer; /** * What the host could establish about the entitlement before evaluating it: * none to read, or one read whose claims are those its signature verified, * and null when the signature did not verify. */ export type EntitlementState = { readonly status: "missing"; } | { readonly status: "read"; readonly claims: unknown; }; /** * Everything a licence warning can say. None of them stops or changes a * decision: each is a line, a security event and a metric for someone to * act on. */ export type LicenceWarning = "ENTITLEMENT_MISSING" | "ENTITLEMENT_INVALID" | "ENTITLEMENT_EXPIRED" | "EDGE_NOT_ENTITLED" | "INCLUDED_ACTIONS_EXCEEDED" | "VOLUME_BAND_EXCEEDED" | "USAGE_REPORT_KEY_MISSING" | "USAGE_REPORT_OVERDUE"; export interface LicenceInput { readonly entitlement: EntitlementState; /** The organisation the executor decides for: the entitlement's audience. */ readonly orgId: string; readonly now: number; /** Governed actions this month as this installation counted them: decisions not delegated. */ readonly governed: number; /** Whether a usage-report key is configured; without one no report is ever made. */ readonly reporting: boolean; /** Completed periods whose report has not been delivered. */ readonly undelivered: readonly string[]; } /** * The licence warnings that stand at `now`, in a fixed order. An entitlement * that is missing, or whose claims are not an entitlement for this * organisation, is a warning about itself and says nothing else; one that * verified is read in full even when expired, so every limit it states is * reported. A report is overdue once its period ended more than the * entitlement's due days ago (35 without one). */ export declare function licenceWarnings(input: LicenceInput): readonly LicenceWarning[]; //# sourceMappingURL=EntitlementEvaluation.d.ts.map